rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
if (isClosed()) throw new SocketException("socket is closed");
public int getSendBufferSize() throws SocketException { if (impl == null) throw new SocketException ("Cannot initialize Socket implementation"); Object obj = impl.getOption(SocketOptions.SO_SNDBUF); if (obj instanceof Integer) return(((Integer)obj).intValue()); else throw new SocketExcepti...
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
if (isClosed()) throw new SocketException("socket is closed");
public synchronized int getSoTimeout() throws SocketException { if (impl == null) throw new SocketException ("Cannot initialize Socket implementation"); Object timeout = impl.getOption(SocketOptions.SO_TIMEOUT); if (timeout instanceof Integer) return ((Integer)timeout).intValue(); else re...
if (impl == null) throw new SocketException( "Cannot initialize Socket implementation");
if (isClosed()) throw new SocketException("socket is closed");
public int getTrafficClass() throws SocketException { if (impl == null) throw new SocketException( "Cannot initialize Socket implementation"); Object obj = impl.getOption(SocketOptions.IP_TOS); if (obj instanceof Integer) return ((Integer) obj).intValue (); else throw new SocketException (...
if (impl == null) throw new IOException ("Cannot initialize Socket implementation"); if (remoteAddress != null && remoteAddress.isMulticastAddress ()) throw new IOException ( "Socket connected to a multicast address my not receive");
if (isClosed()) throw new SocketException("socket is closed"); if (remoteAddress != null && remoteAddress.isMulticastAddress()) throw new IOException ("Socket connected to a multicast address my not receive");
public synchronized void receive(DatagramPacket p) throws IOException { if (impl == null) throw new IOException ("Cannot initialize Socket implementation"); if (remoteAddress != null && remoteAddress.isMulticastAddress ()) throw new IOException ( "Socket connected to a multicast address my not...
if (isClosed()) throw new SocketException("socket is closed");
public void send(DatagramPacket p) throws IOException { // JDK1.2: Don't do security checks if socket is connected; see jdk1.2 api. SecurityManager s = System.getSecurityManager(); if (s != null && !isConnected ()) { InetAddress addr = p.getAddress(); if (addr.isMulticastAddress()) ...
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
if (isClosed()) throw new SocketException("socket is closed");
public void setBroadcast(boolean on) throws SocketException { if (impl == null) throw new SocketException ("Cannot initialize Socket implementation"); impl.setOption (SocketOptions.SO_BROADCAST, new Boolean (on)); }
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
if (isClosed()) throw new SocketException("socket is closed");
public void setReceiveBufferSize(int size) throws SocketException { if (impl == null) throw new SocketException ("Cannot initialize Socket implementation"); if (size < 0) throw new IllegalArgumentException("Buffer size is less than 0"); impl.setOption(SocketOptions.SO_RCVBUF, new Integer(size)); ...
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
if (isClosed()) throw new SocketException("socket is closed");
public void setReuseAddress(boolean on) throws SocketException { if (impl == null) throw new SocketException ("Cannot initialize Socket implementation"); impl.setOption (SocketOptions.SO_REUSEADDR, new Boolean (on)); }
if (isClosed()) throw new SocketException("socket is closed");
public void setSendBufferSize(int size) throws SocketException { if (size < 0) throw new IllegalArgumentException("Buffer size is less than 0"); impl.setOption(SocketOptions.SO_SNDBUF, new Integer(size)); }
if (isClosed()) throw new SocketException("socket is closed");
public synchronized void setSoTimeout(int timeout) throws SocketException { if (timeout < 0) throw new IllegalArgumentException("Invalid timeout: " + timeout); impl.setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout)); }
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
if (isClosed()) throw new SocketException("socket is closed");
public void setTrafficClass(int tc) throws SocketException { if (impl == null) throw new SocketException ("Cannot initialize Socket implementation"); if (tc < 0 || tc > 255) throw new IllegalArgumentException(); impl.setOption (SocketOptions.IP_TOS, new Integer (tc)); }
String updatedFilePath = null; try { updatedFilePath = updatedFile.getCanonicalPath(); } catch (IOException ex) { log.error(ex.toString()); return;
int firstDirtyFile = 0; if (updatedFile != null) { try { firstDirtyFile = monitoredProperties.indexOfObject(updatedFile.getCanonicalPath()); if (firstDirtyFile < 0) { return; } } catch (IOException ex) { log.error(ex.toString()); return; }
private void _updateSystemPropertiesFromMonitoredProperties(File updatedFile, NSArray monitoredProperties) { if (monitoredProperties == null || monitoredProperties.count() == 0) return; String updatedFilePath = null; try { updatedFilePath = updatedFile.getCanonicalPath(); ...
for (int i = monitoredProperties.indexOfObject(updatedFilePath); 0 <= i && i < _monitoredProperties.count(); i++) {
for (int i = firstDirtyFile; i < _monitoredProperties.count(); i++) {
private void _updateSystemPropertiesFromMonitoredProperties(File updatedFile, NSArray monitoredProperties) { if (monitoredProperties == null || monitoredProperties.count() == 0) return; String updatedFilePath = null; try { updatedFilePath = updatedFile.getCanonicalPath(); ...
try { ERXFileNotificationCenter.defaultCenter().addObserver(this, new NSSelector("updateSystemProperties", ERXConstant.NotificationClassArray), path); _monitoredProperties.addObject(path); log.debug("Registered: " + path); } catch (Exception ex) { log.error("An exception occured while registering the observer for the "...
_monitoredProperties.addObject(path); if (rapidTurnaround) { registerForFileNotification(path, "updateSystemProperties");
public void configureRapidTurnAround() { if (_isRapidTurnAroundInitialized) return; _isRapidTurnAroundInitialized = true; NSArray propertyPaths = ERXProperties.pathsForUserAndBundleProperties(/* logging */ true); _monitoredProperties = new NSMutableArray(); for (Enume...
if (!rapidTurnaround) { registerPropertiesTouchFiles(); }
public void configureRapidTurnAround() { if (_isRapidTurnAroundInitialized) return; _isRapidTurnAroundInitialized = true; NSArray propertyPaths = ERXProperties.pathsForUserAndBundleProperties(/* logging */ true); _monitoredProperties = new NSMutableArray(); for (Enume...
_updateSystemPropertiesFromMonitoredProperties((File)n.object(), _monitoredProperties);
_updateSystemPropertiesFromMonitoredProperties(n != null ? (File)n.object() : null, _monitoredProperties);
public synchronized void updateSystemProperties(NSNotification n) { _updateSystemPropertiesFromMonitoredProperties((File)n.object(), _monitoredProperties); if (_commandLineArguments != null && _commandLineArguments.length > 0) _reinsertCommandLineArgumentsToSystemProperties(_commandLineA...
buffer.append( (targetDictionary.valueForKey("scrollbars")!=null && targetDictionary.valueForKey("scrollbars")== "NO")? " " : "scrollbars");
buffer.append( ERXValueUtilities.booleanValueWithDefault(targetDictionary.valueForKey("scrollbars"), true) ? " " : "scrollbars");
public String targetString(){ String result = ""; if(targetDictionary != null){ StringBuffer buffer = new StringBuffer(); buffer.append( targetDictionary.valueForKey("targetName")!=null ? targetDictionary.valueForKey("targetName") : "foobar"); ...
public void characters (char buf [], int offset, int len) throws SAXException { docHandler.characters (buf, offset, len); }
public void characters(char[] buf, int offset, int len) throws SAXException { docHandler.characters(buf, offset, len); }
public void characters (char buf [], int offset, int len) throws SAXException { docHandler.characters (buf, offset, len); }
public void ignorableWhitespace (char buf [], int offset, int len) throws SAXException { docHandler.ignorableWhitespace (buf, offset, len); }
public void ignorableWhitespace(char[] buf, int offset, int len) throws SAXException { docHandler.ignorableWhitespace(buf, offset, len); }
public void ignorableWhitespace (char buf [], int offset, int len) throws SAXException { docHandler.ignorableWhitespace (buf, offset, len); }
boolean prefixEquality = prefix.equals("xml"); boolean uriEquality = uri.equals("http: if ((prefixEquality || uriEquality) && !(prefixEquality && uriEquality)) fatal ("xml is by definition bound to the namespace name " + "http: if (prefixEquality && uriEquality) return; prefixEquality = prefix.equals("xmlns"); uriE...
boolean prefixEquality = prefix.equals("xml"); boolean uriEquality = uri.equals("http: if ((prefixEquality || uriEquality) && !(prefixEquality && uriEquality)) { fatal("xml is by definition bound to the namespace name " + "http: } if (prefixEquality && uriEquality) { return; } prefixEquality = prefix.equals("xmlns"...
private void declarePrefix (String prefix, String uri) throws SAXException { int index = uri.indexOf (':'); // many versions of nwalsh docbook stylesheets // have bogus URLs; so this can't be an error... if (index < 1 && uri.length () != 0) warn ("relative URI for namespace: " + uri); // FIXME: char [0]...
public ContentHandler getContentHandler () { return contentHandler == base ? null : contentHandler; }
public ContentHandler getContentHandler() { return (contentHandler == base) ? null : contentHandler; }
public ContentHandler getContentHandler () { return contentHandler == base ? null : contentHandler; }
{ if ((PROPERTY + "declaration-handler").equals (propertyId)) return declHandler == base ? null : declHandler;
{ if ((PROPERTY + "declaration-handler").equals(propertyId)) { return (declHandler == base) ? null : declHandler; }
public Object getProperty (String propertyId) throws SAXNotRecognizedException { if ((PROPERTY + "declaration-handler").equals (propertyId)) return declHandler == base ? null : declHandler; if ((PROPERTY + "lexical-handler").equals (propertyId)) return lexicalHandler == base ? null : lexicalHandler; ...
if ((PROPERTY + "lexical-handler").equals (propertyId)) return lexicalHandler == base ? null : lexicalHandler; throw new SAXNotRecognizedException (propertyId); }
if ((PROPERTY + "lexical-handler").equals(propertyId)) { return (lexicalHandler == base) ? null : lexicalHandler; } throw new SAXNotRecognizedException(propertyId); }
public Object getProperty (String propertyId) throws SAXNotRecognizedException { if ((PROPERTY + "declaration-handler").equals (propertyId)) return declHandler == base ? null : declHandler; if ((PROPERTY + "lexical-handler").equals (propertyId)) return lexicalHandler == base ? null : lexicalHandler; ...
public boolean isDeclared (int index) { if (index < 0 || index >= attributeCount) throw new ArrayIndexOutOfBoundsException (); String type = parser.getAttributeType(elementName, getQName(index)); return (type != null); }
public boolean isDeclared(int index) { if (index < 0 || index >= attributeCount) { throw new ArrayIndexOutOfBoundsException(); } String type = parser.getAttributeType(elementName, getQName(index)); return (type != null); }
public boolean isDeclared (int index) { if (index < 0 || index >= attributeCount) throw new ArrayIndexOutOfBoundsException (); String type = parser.getAttributeType(elementName, getQName(index)); return (type != null); }
public void setContentHandler (ContentHandler handler) { if (handler == null) handler = base; contentHandler = handler; }
public void setContentHandler(ContentHandler handler) { if (handler == null) { handler = base; } contentHandler = handler; }
public void setContentHandler (ContentHandler handler) { if (handler == null) handler = base; contentHandler = handler; }
public void setDTDHandler (DTDHandler handler) { if (handler == null) handler = base; this.dtdHandler = handler; }
public void setDTDHandler(DTDHandler handler) { if (handler == null) { handler = base; } this.dtdHandler = handler; }
public void setDTDHandler (DTDHandler handler) { if (handler == null) handler = base; this.dtdHandler = handler; }
{ getProperty (propertyId); if ((PROPERTY + "declaration-handler").equals (propertyId)) { if (value == null) declHandler = base; else if (! (value instanceof DeclHandler)) throw new SAXNotSupportedException (propertyId); else declHandler = (DeclHandler) value; return ; } if ((PROPERTY + "lexical-handler").equals (...
{ getProperty(propertyId); if ((PROPERTY + "declaration-handler").equals(propertyId)) { if (value == null) { declHandler = base; } else if (!(value instanceof DeclHandler)) { throw new SAXNotSupportedException(propertyId); } else { declHandler = (DeclHandler) value; } return ; } if ((PROPERTY + "lexical-handler")....
public void setProperty (String propertyId, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { // see if the property is recognized getProperty (propertyId); // Properties with a defined value, we just change it if we can. if ((PROPERTY + "declaration-handler").equals (propertyId)) { ...
AbstractMap.BasicMapEntry ent = (AbstractMap.BasicMapEntry) i.next();
Map.Entry ent = (Map.Entry) i.next();
public void paintDirtyRegions() { // step 1: pull out roots and calculate spanning damage HashMap roots = new HashMap(); for (Enumeration e = dirtyComponents.keys(); e.hasMoreElements(); ) { JComponent comp = (JComponent) e.nextElement(); if (! (comp.isVisible() && comp.isShowing())) ...
rData.setRole((String)rel.getProperty(RelationshipBase.PROP_ROLE).getValue());
if(this.iniFormat == AgentAssetData.NEW_FORMAT) { rData.setRole((String)rel.getProperty(RelationshipBase.PROP_TYPE).getValue()); } else { rData.setRole((String)rel.getProperty(RelationshipBase.PROP_ROLE).getValue()); }
public ComponentData addComponentData(ComponentData data) { AgentAssetData assetData = new AgentAssetData((AgentComponentData)data); assetData.setIniFormat(this.iniFormat); assetData.setAssetClass((String)propAssetClass.getValue()); assetData.setUniqueID((String)propUniqueID.getValue()); assetData.setU...
public void generate(CodeGenerator cg, List methods, Context context) { for (int i = 0, size = methods.size(); i < size; i++) { Method method = (Method)methods.get(i); String accessName = getAccessName(method, i); String fieldName = getFieldName(i);
public void generate(CodeGenerator cg, Context context) { for (Iterator it = context.getMethods(); it.hasNext();) { Method method = (Method)it.next(); String accessName = getAccessName(context, method); String fieldName = getFieldName(context, method);
public void generate(CodeGenerator cg, List methods, Context context) { for (int i = 0, size = methods.size(); i < size; i++) { Method method = (Method)methods.get(i); String accessName = getAccessName(method, i); String fieldName = getFieldName(i); cg.declare_fiel...
generateAccessMethod(cg, method, accessName); generateAroundMethod(cg, method, accessName, fieldName, context);
generateAccessMethod(cg, context, method); generateAroundMethod(cg, context, method);
public void generate(CodeGenerator cg, List methods, Context context) { for (int i = 0, size = methods.size(); i < size; i++) { Method method = (Method)methods.get(i); String accessName = getAccessName(method, i); String fieldName = getFieldName(i); cg.declare_fiel...
private void generateAccessMethod(CodeGenerator cg, Method method, String accessName) {
protected void generateAccessMethod(CodeGenerator cg, Context context, Method method) {
private void generateAccessMethod(CodeGenerator cg, Method method, String accessName) { cg.begin_method(Modifier.FINAL, method.getReturnType(), accessName, method.getParameterTypes(), method.getExceptionTypes()); ...
accessName,
getAccessName(context, method),
private void generateAccessMethod(CodeGenerator cg, Method method, String accessName) { cg.begin_method(Modifier.FINAL, method.getReturnType(), accessName, method.getParameterTypes(), method.getExceptionTypes()); ...
private void generateAroundMethod(CodeGenerator cg, Method method, String accessName, String fieldName, Context context) {
protected void generateAroundMethod(CodeGenerator cg, Context context, Method method) {
private void generateAroundMethod(CodeGenerator cg, Method method, String accessName, String fieldName, Context context) { cg.begin_method(method, context.getMod...
cg.getfield(fieldName);
cg.getfield(getFieldName(context, method));
private void generateAroundMethod(CodeGenerator cg, Method method, String accessName, String fieldName, Context context) { cg.begin_method(method, context.getMod...
cg.getfield(accessName);
cg.getfield(getAccessName(context, method));
private void generateAroundMethod(CodeGenerator cg, Method method, String accessName, String fieldName, Context context) { cg.begin_method(method, context.getMod...
unbox(cg, method.getReturnType());
cg.unbox_or_zero(method.getReturnType());
private void generateAroundMethod(CodeGenerator cg, Method method, String accessName, String fieldName, Context context) { cg.begin_method(method, context.getMod...
generateHandleUndeclared(cg, method, handler);
cg.handle_undeclared(method.getExceptionTypes(), handler);
private void generateAroundMethod(CodeGenerator cg, Method method, String accessName, String fieldName, Context context) { cg.begin_method(method, context.getMod...
public void generateStatic(CodeGenerator cg, List methods) {
public void generateStatic(CodeGenerator cg, Context context) {
public void generateStatic(CodeGenerator cg, List methods) { /* generates: static { Class [] args; Class cls = findClass("java.lang.Object"); args = new Class[0]; METHOD_1 = cls.getDeclaredMethod("toString", args); Class thisClass = findCl...
for (int i = 0, size = methods.size(); i < size; i++) { Method method = (Method)methods.get(i); String fieldName = getFieldName(i);
for (Iterator it = context.getMethods(); it.hasNext();) { Method method = (Method)it.next();
public void generateStatic(CodeGenerator cg, List methods) { /* generates: static { Class [] args; Class cls = findClass("java.lang.Object"); args = new Class[0]; METHOD_1 = cls.getDeclaredMethod("toString", args); Class thisClass = findCl...
cg.putfield(fieldName);
cg.putfield(getFieldName(context, method));
public void generateStatic(CodeGenerator cg, List methods) { /* generates: static { Class [] args; Class cls = findClass("java.lang.Object"); args = new Class[0]; METHOD_1 = cls.getDeclaredMethod("toString", args); Class thisClass = findCl...
String accessName = getAccessName(method, i); cg.load_class_this(); cg.push(accessName); cg.load_local(args); cg.invoke(MethodConstants.GET_DECLARED_METHOD); cg.invoke(MAKE_PROXY); cg.putfield(accessName);
String accessName = getAccessName(context, method); if (needsMethodProxy()) { cg.load_class_this(); cg.push(accessName); cg.load_local(args); cg.invoke(MethodConstants.GET_DECLARED_METHOD); cg.invoke(MAKE_PROXY); cg.putfield(accessName); }
public void generateStatic(CodeGenerator cg, List methods) { /* generates: static { Class [] args; Class cls = findClass("java.lang.Object"); args = new Class[0]; METHOD_1 = cls.getDeclaredMethod("toString", args); Class thisClass = findCl...
private static String getAccessName(Method method, int index) { return "CGLIB$MI$ACCESS_" + index + "_" + method.getName();
protected String getAccessName(Context context, Method method) { return "CGLIB$$ACCESS_" + context.getUniqueName(method);
private static String getAccessName(Method method, int index) { return "CGLIB$MI$ACCESS_" + index + "_" + method.getName(); }
public PipedReader () { super (); writer = null; closed = false; in = -1; out = 0; pipeBuffer = new char[1024]; }
PipedReader() { return; }
public PipedReader () { super (); writer = null; closed = false; in = -1; out = 0; pipeBuffer = new char[1024]; }
public void close () throws IOException { closed = true; }
close() throws IOException { synchronized (lock) { closed = true; notifyAll(); } }
public void close () throws IOException { closed = true; }
public void connect (PipedWriter src) throws IOException { if (closed) throw new IOException ("already closed"); if (writer != null) { if (writer == src) return; throw new IOException ("already connected"); } try { writer = src; writer.connect(this); } catch (IOException e) { writer = null; throw e; } }
connect(PipedWriter src) throws IOException { if (src == this.src) return; if (ever_connected) throw new IOException("Already connected"); if (closed) throw new IOException("Stream is closed and cannot be reopened"); synchronized (lock) { src.connect(this); ever_connected = true; } }
public void connect (PipedWriter src) throws IOException { if (closed) throw new IOException ("already closed"); if (writer != null) { if (writer == src) return; throw new IOException ("already connected"); } try { writer = src; writer.connect(this); } catch (IOException e) ...
public int read (char buf[], int offset, int count) throws IOException { if (closed) throw new IOException ("closed"); if (count < 0) throw new ArrayIndexOutOfBoundsException (); int toCopy = count; synchronized (lock) { while (toCopy > 0) { while (in == -1) { if (writer.isClosed()) { if (toCopy < count) return coun...
read() throws IOException { char[] buf = new char[1];
public int read (char buf[], int offset, int count) throws IOException { if (closed) throw new IOException ("closed"); if (count < 0) throw new ArrayIndexOutOfBoundsException (); int toCopy = count; synchronized (lock) { while (toCopy > 0) { // Wait for data in the pipe. If the writ...
try { lock.wait(); } catch (InterruptedException e) { InterruptedIOException io = new InterruptedIOException (e.getMessage()); io.bytesTransferred = count - toCopy; throw io; } } int len; if (in < out) len = pipeBuffer.length - out; else len = in - out; len = len > toCopy ? toCopy : len; System.arraycopy(pipeBuffer, o...
return(read(buf, 0, buf.length)); }
public int read (char buf[], int offset, int count) throws IOException { if (closed) throw new IOException ("closed"); if (count < 0) throw new ArrayIndexOutOfBoundsException (); int toCopy = count; synchronized (lock) { while (toCopy > 0) { // Wait for data in the pipe. If the writ...
public void connect (PipedReader sink) throws IOException { if (closed) throw new IOException ("already closed"); if (reader != null) { if (reader == sink) return; throw new IOException ("already connected"); } try { reader = sink; reader.connect(this); } catch (IOException e) { reader = null; throw e; } }
connect(PipedReader snk) throws IOException { if (snk == this.snk) return; if (ever_connected) throw new IOException("Already connected"); if (closed) throw new IOException("Stream is closed and cannot be reopened"); synchronized (lock) { this.snk = snk; ever_connected = true; snk.src = this; snk.connect(this); }...
public void connect (PipedReader sink) throws IOException { if (closed) throw new IOException ("already closed"); if (reader != null) { if (reader == sink) return; throw new IOException ("already connected"); } try { reader = sink; reader.connect(this); } catch (IOException e) ...
String type = eoattribute.valueType(); if ("NSTimestamp".equals(type)) {
String type = columnTypeStringForAttribute(eoattribute); if ("timestamp".equals(type)) {
public boolean shouldUseBindVariableForAttribute(EOAttribute eoattribute) { String type = eoattribute.valueType(); if ("NSTimestamp".equals(type)) { return false; } else { return true; } }
myUri = uri; myMessage = message;
public SIPush(String uri, String message) { }
Universal Time (UTC), a 24-hour timekeeping system (indicated by the Z). The format is:
Universal Time (UTC), a 24-hour timekeeping system (indicated by the ?Z?). The format is:
private byte[] encodeDateTime(Date theDate) { return null;/*If used, the attribute value MUST be expressed in a date/time representation based on [ISO8601] as specified in[HTML4]. However, SI does not allow use of time zones; the time MUST always be expressed in Co-ordinatedUniversal Time (UTC), a 24-hour...
Where: YYYY = 4 digit year (0000 ... 9999) MM = 2 digit month (01=January, 02=February ... 12=December) DD = 2 digit day (01, 02 ... 31)
Where: YYYY = 4 digit year (?0000? ... ?9999?) MM = 2 digit month (?01?=January, ?02?=February ... ?12?=December) DD = 2 digit day (?01?, ?02? ... ?31?)
private byte[] encodeDateTime(Date theDate) { return null;/*If used, the attribute value MUST be expressed in a date/time representation based on [ISO8601] as specified in[HTML4]. However, SI does not allow use of time zones; the time MUST always be expressed in Co-ordinatedUniversal Time (UTC), a 24-hour...
mm = 2 digit minute (00 ... 59) ss = 2 digit second (00 ... 59)
mm = 2 digit minute (?00? ... ?59?) ss = 2 digit second (?00? ... ?59?)
private byte[] encodeDateTime(Date theDate) { return null;/*If used, the attribute value MUST be expressed in a date/time representation based on [ISO8601] as specified in[HTML4]. However, SI does not allow use of time zones; the time MUST always be expressed in Co-ordinatedUniversal Time (UTC), a 24-hour...
if (log.isDebugEnabled()) { log.error("publishEvents: Parse exception Parsing file: " + fileName);
if (log.isErrorEnabled()) { log.error("publishEvents: Parse exception Parsing file: " + fileName, spe);
private void publishEvents(String fileName) { try { DOMParser parser = new DOMParser(); parser.parse(new InputSource(getConfigFinder().open(fileName))); // Get a list of all Nodes in the document. "*" Returns all Elements. NodeList nodes = parser.getDocument().getElementsByTagName("*"...
spe.printStackTrace(System.err);
private void publishEvents(String fileName) { try { DOMParser parser = new DOMParser(); parser.parse(new InputSource(getConfigFinder().open(fileName))); // Get a list of all Nodes in the document. "*" Returns all Elements. NodeList nodes = parser.getDocument().getElementsByTagName("*"...
if (log.isDebugEnabled()) { log.error("publishEvents: SAX exception parsing file: " + fileName);
if (log.isErrorEnabled()) { log.error("publishEvents: SAX exception parsing file: " + fileName, se);
private void publishEvents(String fileName) { try { DOMParser parser = new DOMParser(); parser.parse(new InputSource(getConfigFinder().open(fileName))); // Get a list of all Nodes in the document. "*" Returns all Elements. NodeList nodes = parser.getDocument().getElementsByTagName("*"...
if (se.getException() != null) se.getException().printStackTrace(System.err); else se.printStackTrace(System.err);
private void publishEvents(String fileName) { try { DOMParser parser = new DOMParser(); parser.parse(new InputSource(getConfigFinder().open(fileName))); // Get a list of all Nodes in the document. "*" Returns all Elements. NodeList nodes = parser.getDocument().getElementsByTagName("*"...
if (log.isDebugEnabled()) { log.error("publishEvents: exception parsing Attack Tree File: " + fileName);
if (log.isErrorEnabled()) { log.error("publishEvents: exception parsing Attack Tree File: " + fileName, e);
private void publishEvents(String fileName) { try { DOMParser parser = new DOMParser(); parser.parse(new InputSource(getConfigFinder().open(fileName))); // Get a list of all Nodes in the document. "*" Returns all Elements. NodeList nodes = parser.getDocument().getElementsByTagName("*"...
e.printStackTrace(System.err);
private void publishEvents(String fileName) { try { DOMParser parser = new DOMParser(); parser.parse(new InputSource(getConfigFinder().open(fileName))); // Get a list of all Nodes in the document. "*" Returns all Elements. NodeList nodes = parser.getDocument().getElementsByTagName("*"...
if (isExperimentInEditor(experiment)) return; if (!experiment.isEditable()) { Object[] options = { "Edit", "View", "Copy", "Cancel" }; experiment = queryUser(experiment, options); if (experiment == null) return; }
protected void runExperimentBuilder(Experiment experiment, boolean alwaysNew) { // if this experiment is being edited, then don't edit again if (isExperimentInEditor(experiment)) return; if (!experiment.isEditable()) { // otherwise editability can be overwritte...
NSNotificationCenter.defaultCenter().postNotification(ERXConfigurationManager.ConfigurationDidChangeNotification, null);
public static synchronized void configureLogging(Properties properties) { LogManager.resetConfiguration(); BasicConfigurator.configure(); Logger.getRootLogger().setLevel(Level.INFO); boolean is522OrHigher = ERXProperties.webObjectsVersionIs522OrHigher(); if (i...
tabbedPane.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { if (tabbedPane.getSelectedComponent().equals(hostConfigurationBuilder)) findMenu.setEnabled(true); else findMenu.setEnabled(false); } });
public ExperimentBuilder(CSMART csmart, Experiment experiment) { this.csmart = csmart; setExperiment(experiment); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); JMenu fileMenu = new JMenu(FILE_MENU); for (int i = 0; i < fileActions.length; i++) { fileMenu.add(fileActions...
result[counter] = key.fd;
result[counter] = key.getNativeFD();
private final int[] getFDsAsArray (int ops) { int[] result; int counter = 0; Iterator it = keys.iterator (); // Count the number of file descriptors needed while (it.hasNext ()) { SelectionKeyImpl key = (SelectionKeyImpl) it.next (); if ((key.interestOps () & ops) != 0) { ...
JOptionPane.showMessageDialog(null, "Experiment cannot contain two agents with the same name: " + recAgents[j].getShortName(),
final String dupName = recAgents[j].getShortName(); javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { JOptionPane.showMessageDialog(null, "Experiment cannot contain two agents with the same name: " + dupName,
private boolean checkAdd(RecipeComponent rc) { AgentComponent[] recAgents = rc.getAgents(); if (recAgents != null && recAgents.length > 0) { for (int j=0; j < recAgents.length; j++) { if (!experiment.agentNameUnique(recAgents[j].getShortName())) { // Need to remove recipe and inform user....
} });
private boolean checkAdd(RecipeComponent rc) { AgentComponent[] recAgents = rc.getAgents(); if (recAgents != null && recAgents.length > 0) { for (int j=0; j < recAgents.length; j++) { if (!experiment.agentNameUnique(recAgents[j].getShortName())) { // Need to remove recipe and inform user....
agents.addAll(Arrays.asList(recagents));
for (int i = 0; i < recagents.length; i++) { if (! agents.contains(recagents[i]) ) agents.add(recagents[i]); }
private void createCMTExperiment(DefaultMutableTreeNode node, String originalExperimentName, String experimentName, String experimentId, String trialId) {// private void createCMT...
AgentComponent[] socagents = soc.getAgents(); if (socagents!= null && socagents.length > 0) { for (int i = 0; i < socagents.length; i++) { AgentComponent ac = socagents[i]; setComponentProperties((ConfigurableComponent) ac, ac.getShortName(), assemblyMatch); } agents.addAll(Arrays.asList(socagents)); }
private void createCMTExperiment(DefaultMutableTreeNode node, String originalExperimentName, String experimentName, String experimentId, String trialId) {// private void createCMT...
response.appendContentString(id);
response.appendContentString(className);
public void appendToResponse(WOResponse response, WOContext context) { WOComponent component = context.component(); String id; if (_idAssociation == null) { id = AjaxUtils.toSafeElementID(context.elementID()); } else { id = (String) _idAssociation.valueInComponent(component); } String e...
rQFileLastMod = 0l;
private static Set getAvailableQueries() { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.recipe.RecipeQueryProperty"); // Get the last modified date of the recipeQueries file. // If it's the same now as it was before, dont re-read File rqfile = ConfigFinder.getInstance().locateFile(RecipeComp...
dbp = DBProperties.readQueryFile(PDbBase.QUERY_FILE);
if (rQFileLastMod != 0l) { if (log.isDebugEnabled()) { log.debug("Re-reading query files."); } dbp = DBProperties.reReadQueryFile(PDbBase.QUERY_FILE); } else dbp = DBProperties.readQueryFile(PDbBase.QUERY_FILE);
private static Set getAvailableQueries() { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.recipe.RecipeQueryProperty"); // Get the last modified date of the recipeQueries file. // If it's the same now as it was before, dont re-read File rqfile = ConfigFinder.getInstance().locateFile(RecipeComp...
rQFileLastMod = 0l;
private static Set getAvailableQueries() { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.recipe.RecipeQueryProperty"); // Get the last modified date of the recipeQueries file. // If it's the same now as it was before, dont re-read File rqfile = ConfigFinder.getInstance().locateFile(RecipeComp...
options.setObjectForKey("'invokeWOElementID=' + $(" + updateContainerID + ").woElementID", "parameters");
options.setObjectForKey("'invokeWOElementID=' + $(" + updateContainerID + ").getAttribute('woElementID')", "parameters");
protected NSDictionary createAjaxOptions() { NSMutableArray ajaxOptionsArray = new NSMutableArray(); ajaxOptionsArray.addObject(new AjaxOption("onComplete", AjaxOption.SCRIPT)); ajaxOptionsArray.addObject(new AjaxOption("onSuccess", AjaxOption.SCRIPT)); ajaxOptionsArray.addObject(new AjaxOption("onFailure...
ServletUtil.ParamVisitor vis = new ServletUtil.ParamVisitor() { public void setParam(String name, String value) { } }; ServletUtil.parseParams(vis, request);
public void execute( HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { /* this.out = response.getOutputStream(); // create a URL parameter visitor ServletUtil.ParamVisitor vis = new ServletUtil.ParamVisitor() { public void ...
StringBuffer buf = HttpUtils.getRequestURL(request);
StringBuffer buf = request.getRequestURL();
public void execute( HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { /* this.out = response.getOutputStream(); // create a URL parameter visitor ServletUtil.ParamVisitor vis = new ServletUtil.ParamVisitor() { public void ...
nodes.add(result); result.addModificationListener(this); fireModification();
addNodeComponent(result);
public NodeComponent addNode(String name) { // FIXME! This allows 2 Nodes with the same name. Of itself, that's // OK, but on the same Host, that would be bad, and in general // its confusing. ExperimentNode result = new ExperimentNode(name, this); nodes.add(result); result.addModificationListener(t...
for (int i = 0; i < nodes.length; i++) nnodes[i] = experimentCopy.addNode(nodes[i].getShortName().toString());
for (int i = 0; i < nodes.length; i++) { nnodes[i] = ((ExperimentNode)nodes[i]).copy(experimentCopy); experimentCopy.addNodeComponent((ExperimentNode)nnodes[i]); }
public Experiment copy(Organizer organizer, Object context) { String uniqueName = organizer.generateExperimentName(getExperimentName()); Experiment experimentCopy = null; if (inDatabase) experimentCopy = new Experiment(uniqueName, expID, trialID); else experimentCopy = new Experiment(uniqueName...
exptId, trialId, false);
exptId, trialId, false, GUIUtils.createSaveToDbConflictHandler(myCon));
private void populateCMT() throws SQLException, IOException { pdb = new PopulateDb("", CMT_TYPE, CMT_TYPE, "REGRESSION Experiment " + exptId, exptId, trialId, false);// pdb.setDebug(true); for (int i = 0; i < nodeData.length; i++) { ComponentData node = ...
myCon = new Container();
public void setUp() throws SQLException, IOException, ClassNotFoundException { Map substitutions = new HashMap(); dbp = getDBProperties();// dbp.setDebug(true); Connection dbConnection = openConnection(); try { insertLib(dbConnection); insertExpt(dbConnecti...
myCon.removeAll(); myCon.invalidate();
public void tearDown() throws SQLException, ClassNotFoundException {// Connection dbConnection = openConnection();// removeAll(dbConnection);// dbConnection.close(); initializerServiceProvider.releaseService(null, this, ...
System.out.println("CSMARTGraph: WARNING: Displaying property: " + name + " of class: " + o.getClass() + " not supported");
System.out.println( "CSMARTGraph: WARNING: Displaying property: " + name + " of class: " + ((o != null) ? o.getClass().getName() : "null") + " not supported");
private Node makeNode(NodeObject obj) { String UID = obj.getUID(); if (UIDToNode.get(UID) != null) return null; // don't make duplicates Node node = new Node(this, UID); UIDToNode.put(UID, node); if (!obj.isVisible()) { node.setAttribute(INVISIBLE_ATTRIBUTE, "true"); node.visible = false...
HashSet hs = new HashSet(); hs.add(new Integer(1)); tst.setExperimentValues(hs); assertEquals("Test getExperimentValues()", hs, tst.getExperimentValues());
ArrayList al = new ArrayList(); al.add(new Integer(1)); tst.setExperimentValues(al); assertEquals("Test getExperimentValues()", al, tst.getExperimentValues());
public void testExperimentValues() { HashSet hs = new HashSet(); hs.add(new Integer(1)); tst.setExperimentValues(hs); assertEquals("Test getExperimentValues()", hs, tst.getExperimentValues()); }
for (int i = 0; i < names.length; i++)
for (int i = 0; i < names.length; i++) {
private boolean hasServlet(AgentComponentData cdata) { String[] names = cdata.getPluginNames(); for (int i = 0; i < names.length; i++) if (names[i].endsWith("org.cougaar.mlm.plugin.organization.GLSInitServlet")) return true; return false; }
}
private boolean hasServlet(AgentComponentData cdata) { String[] names = cdata.getPluginNames(); for (int i = 0; i < names.length; i++) if (names[i].endsWith("org.cougaar.mlm.plugin.organization.GLSInitServlet")) return true; return false; }
SwingUtilities.invokeLater(new Runnable() { public void run() { findServlet(); JInternalFrame jif = new JInternalFrame("GLS", true, false, true, true); jif.getContentPane().add(new GLSClient(getOPlanAgentURL())); jif.setSize(350, 350); jif.setLocation(0, 0); jif.setVisible(true); desktop.add(jif, JLayeredPane.DEFAULT_L...
if(findServlet()) { SwingUtilities.invokeLater(new Runnable() { public void run() { JInternalFrame jif = new JInternalFrame("GLS", true, false, true, true); jif.getContentPane().add(new GLSClient(getOPlanAgentURL())); jif.setSize(350, 350); jif.setLocation(0, 0); jif.setVisible(true); desktop.add(jif, JLayeredPane.DEFA...
private void runTrial() { setTrialValues(); runStart = new Date(); nodeCreationInfoList = new ArrayList(); prepareToCreateNodes(); stopNodeCreation = false; startTimers(); nodeCreator = new Thread("CreateNodes") { public void run() { createNodes(); starting = false; // r...
} });
}); }
private void runTrial() { setTrialValues(); runStart = new Date(); nodeCreationInfoList = new ArrayList(); prepareToCreateNodes(); stopNodeCreation = false; startTimers(); nodeCreator = new Thread("CreateNodes") { public void run() { createNodes(); starting = false; // r...
SwingUtilities.invokeLater(new Runnable() { public void run() { findServlet(); JInternalFrame jif = new JInternalFrame("GLS", true, false, true, true); jif.getContentPane().add(new GLSClient(getOPlanAgentURL())); jif.setSize(350, 350); jif.setLocation(0, 0); jif.setVisible(true); desktop.add(jif, JLayeredPane.DEFAULT_L...
if(findServlet()) { SwingUtilities.invokeLater(new Runnable() { public void run() { JInternalFrame jif = new JInternalFrame("GLS", true, false, true, true); jif.getContentPane().add(new GLSClient(getOPlanAgentURL())); jif.setSize(350, 350); jif.setLocation(0, 0); jif.setVisible(true); desktop.add(jif, JLayeredPane.DEFA...
public void run() { createNodes(); starting = false; // reset controls if no nodes started successfully boolean reset = false; synchronized (runningNodesLock) { if (runningNodes.isEmpty()) reset = true; } // end synchronized if (reset) { ...
} });
}); }
public void run() { createNodes(); starting = false; // reset controls if no nodes started successfully boolean reset = false; synchronized (runningNodesLock) { if (runningNodes.isEmpty()) reset = true; } // end synchronized if (reset) { ...
findServlet(); JInternalFrame jif = new JInternalFrame("GLS", true, false, true, true); jif.getContentPane().add(new GLSClient(getOPlanAgentURL())); jif.setSize(350, 350); jif.setLocation(0, 0); jif.setVisible(true); desktop.add(jif, JLayeredPane.DEFAULT_LAYER); try { jif.setIcon(true); } catch (PropertyVetoException e...
JInternalFrame jif = new JInternalFrame("GLS", true, false, true, true); jif.getContentPane().add(new GLSClient(getOPlanAgentURL())); jif.setSize(350, 350); jif.setLocation(0, 0); jif.setVisible(true); desktop.add(jif, JLayeredPane.DEFAULT_LAYER); try { jif.setIcon(true); } catch (PropertyVetoException e) { }
public void run() { findServlet(); JInternalFrame jif = new JInternalFrame("GLS", true, false, true, true); jif.getContentPane().add(new GLSClient(getOPlanAgentURL())); jif.setSize(350, 350); jif.setLocation(0, 0)...
}
public void run() { findServlet(); JInternalFrame jif = new JInternalFrame("GLS", true, false, true, true); jif.getContentPane().add(new GLSClient(getOPlanAgentURL())); jif.setSize(350, 350); jif.setLocation(0, 0)...
setEnabled(false);
if (!enabled) return; this.enabled = false; if (peer != null) ((MenuItemPeer) peer).setEnabled (false);
disable(){ setEnabled(false);}
setEnabled(enabled);
if (enabled) enable (); else disable ();
enable(boolean enabled){ setEnabled(enabled);}
if (enabled == this.enabled) return; this.enabled = enabled; if (peer != null) { MenuItemPeer mp = (MenuItemPeer) peer; mp.setEnabled (enabled); }
enable (enabled);
setEnabled(boolean enabled){ if (enabled == this.enabled) return; this.enabled = enabled; if (peer != null) { MenuItemPeer mp = (MenuItemPeer) peer; mp.setEnabled (enabled); }}
public int getHashConstant() {
int getHashConstant() {
public int getHashConstant() { return hashConstant; }
public int getHashMultiplier() {
int getHashMultiplier() {
public int getHashMultiplier() { return hashMultiplier; }
InetAddress iaddr = new InetAddress(null, null);
InetAddress iaddr = new InetAddress(null, host);
public static InetAddress getByName (String host) throws UnknownHostException { if (host == null) return getLocalHost(); byte[] address = aton(host); if (address != null) return new InetAddress(address, null); InetAddress iaddr = new InetAddress(null, null); lookup(host, iaddr, false); ...
prepareAndCheck();
public void execute() throws BuildException { if (_setid == null) { throw new BuildException("setid is required in ivy cachefileset"); } try { FileSet fileset = new FileSet(); fileset.setProject(getProject()); getProject().addReference(_setid, fileset...
XmlReportParser parser = new XmlReportParser(); String[] confs = splitConfs(_conf); Collection all = new LinkedHashSet(); for (int i = 0; i < confs.length; i++) { Artifact[] artifacts = parser.getArtifacts(new ModuleId(_organisation, _module), confs[i], _cache); all.addAll(Arrays.asList(artifacts)); }
Collection artifacts = getAllArtifacts();
protected List getPaths() throws BuildException, ParseException, IOException { Ivy ivy = getIvyInstance(); XmlReportParser parser = new XmlReportParser(); String[] confs = splitConfs(_conf); Collection all = new LinkedHashSet(); for (int i = 0; i < confs.length; i++) { ...
for (Iterator iter = all.iterator(); iter.hasNext();) {
for (Iterator iter = artifacts.iterator(); iter.hasNext();) {
protected List getPaths() throws BuildException, ParseException, IOException { Ivy ivy = getIvyInstance(); XmlReportParser parser = new XmlReportParser(); String[] confs = splitConfs(_conf); Collection all = new LinkedHashSet(); for (int i = 0; i < confs.length; i++) { ...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
public void setSource(ClusterIdentifier asource) { ClusterIdentifier old = getSource(); if (old != null) { if (! asource.equals(old)) { if(log.isDebugEnabled()) { log.error("Bad InfrastructureEvent.setSource("+asource+") was "+old+":"); Thread.dumpStack(); } } } else...