rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
return null;
return false;
protected State removeState(State state) { // Since we do a name-based lookup, and multiple // states from multiple processes might have the // same name, we must first ensure that we're truly // attempting to remove the same state that's been // passed in as a parameter. ...
response._appendTagAttributeAndValue("id", idValue.toString(), false);
response._appendTagAttributeAndValue("id", idValue.toString(), true);
public static void appendIdentifierTagAndValue(WODynamicElement element, WOAssociation id, WOResponse response, WOContext context) { if(id != null) { Object idValue = id.valueInComponent(context.component()); if(idValue != null) response._appendTagAttr...
response._appendTagAttributeAndValue("id", componentIdentifier, false);
response._appendTagAttributeAndValue("id", componentIdentifier, true);
public static void appendIdentifierTagAndValue(WODynamicElement element, WOAssociation id, WOResponse response, WOContext context) { if(id != null) { Object idValue = id.valueInComponent(context.component()); if(idValue != null) response._appendTagAttr...
ERXPatcher.setClassForName(DynamicElementsPatches.GenericContainer.class, "WOGenericContainer");
public static synchronized void installPatches() { DynamicElementsPatches.cleanupXHTML = ERXValueUtilities.booleanValueWithDefault(System.getProperty("er.extensions.ERXPatcher.cleanupXHTML"), false); ERXPatcher.setClassForName(DynamicElementsPatches.SubmitButton.class, "WOSubmitButton"); ...
log = CSMART.createLogger("org.cougaar.tools.csmart.society.scalability");
createLogger();
public ScalabilityXLevel(int level, ScalabilityXAgent superior) { super("lvl" + level); this.level = level; this.superior = superior; log = CSMART.createLogger("org.cougaar.tools.csmart.society.scalability"); }
myAutoLogin = true; String autoLoginStr = (String) _parameters.objectForKey(InstantMessengerAdaptor.AUTO_LOGIN_KEY); if (autoLoginStr == null) { autoLoginStr = System.getProperty(InstantMessengerAdaptor.AUTO_LOGIN_KEY); } if (autoLoginStr != null && !Boolean.valueOf(autoLoginStr).booleanValue()) { myAutoLogin = false; ...
public InstantMessengerAdaptor(String _name, NSDictionary _parameters) throws InstantiationException, IllegalAccessException, ClassNotFoundException { super(_name, _parameters); myConversations = new HashMap(); myApplication = WOApplication.application(); myScreenName = getScreenName(InstantMessengerAdapt...
headers.setObjectForKey(Boolean.TRUE, InstantMessengerAdaptor.IS_IM_KEY); headers.setObjectForKey(_buddyName, InstantMessengerAdaptor.BUDDY_NAME_KEY); headers.setObjectForKey(_message, InstantMessengerAdaptor.MESSAGE_KEY); headers.setObjectForKey(conversation, InstantMessengerAdaptor.CONVERSATION_KEY); WORequest reques...
NSMutableDictionary userInfo = new NSMutableDictionary(); userInfo.setObjectForKey(Boolean.TRUE, InstantMessengerAdaptor.IS_IM_KEY); userInfo.setObjectForKey(_buddyName, InstantMessengerAdaptor.BUDDY_NAME_KEY); userInfo.setObjectForKey(_message, InstantMessengerAdaptor.MESSAGE_KEY); userInfo.setObjectForKey(conversatio...
public synchronized void messageReceived(IInstantMessenger _instantMessenger, String _buddyName, String _message) { Conversation conversation; synchronized (myConversations) { conversation = (Conversation) myConversations.get(_buddyName); if (conversation == null || conversation.isExpired(myConversati...
try { myInstantMessenger = myFactory.createInstantMessenger(myScreenName, myPassword); myInstantMessenger.addMessageListener(this); myInstantMessenger.connect(); if (myWatcherFactory != null) { myWatcherInstantMessenger = myWatcherFactory.createInstantMessenger(myWatcherScreenName, myWatcherPassword); myWatcherInstant...
myInstantMessenger = myFactory.createInstantMessenger(myScreenName, myPassword); if (myAutoLogin) { connect();
public void registerForEvents() { try { myInstantMessenger = myFactory.createInstantMessenger(myScreenName, myPassword); myInstantMessenger.addMessageListener(this); myInstantMessenger.connect(); if (myWatcherFactory != null) { myWatcherInstantMessenger = myWatcherFactory.createInstantMe...
conversationExpired(conversation);
protected void removeExpiredConversations() { synchronized (myConversations) { Iterator conversationsIter = myConversations.entrySet().iterator(); while (conversationsIter.hasNext()) { Map.Entry entry = (Map.Entry) conversationsIter.next(); Conversation conversation = (Conversation) entry.g...
if (myWatcherInstantMessenger != null) { myWatchedTester.stop(); myWatcherTester.stop(); myWatcherInstantMessenger.disconnect(); }
public void unregisterForEvents() { myRunning = false; if (myInstantMessenger != null) { myInstantMessenger.disconnect(); } }
myValues = new NSMutableDictionary();
public Conversation() { myLastContact = System.currentTimeMillis(); }
return state.staticHook;
return false;
public boolean isStaticHook() { return state.staticHook; }
if(CaseInsensitiveRegexOperator.name().equals( selector.name() ) || RegexOperator.equals( selector.name() ) ) {
if(CaseInsensitiveRegexOperator.name().equals( selector.name() ) || RegexOperator.name().equals( selector.name() ) ) {
public String sqlStringForSelector(NSSelector selector, Object value){ if(CaseInsensitiveRegexOperator.name().equals( selector.name() ) || RegexOperator.equals( selector.name() ) ) { return selector.name(); } return super.sqlStringForSelector(selector, value); }
return false;
if (o instanceof DefaultMutableTreeNode) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) o; if( node == getModel().getRoot()) { return false; } return true;
public boolean isDraggable(Object o) { return false; }
return false; }
public boolean isDraggable(Object o) { return false; }
System.out.println(cflavor.getSourceClassName());
private int testFlavors(DataFlavor[] possibleFlavors, CSMARTDataFlavor testFlavor) { for (int i = 0; i < possibleFlavors.length; i++) { DataFlavor flavor = possibleFlavors[i]; if (flavor instanceof CSMARTDataFlavor) { CSMARTDataFlavor cflavor = (CSMARTDataFlavor) flavor; ...
notifier.notifyAll ();
{ synchronized (notifier) { notifier.notifyAll (); } }
public void dispatch () { Exception e = null; if (catchExceptions) try { runnable.run (); } catch (Exception x) { exception = x; } else runnable.run (); if (notifier != null) notifier.notifyAll (); }
get (buf);
get (position (), buf);
public String toString () { if (hasArray ()) return new String (array (), position (), length ()); char[] buf = new char [length ()]; get (buf); return new String (buf); }
mrid = ModuleRevisionId.newInstance("fr.jayasoft.unknown", "test", "1.0"); rmr = resolver.getDependency(new DefaultDependencyDescriptor(mrid, false), _data); assertNull(rmr); resolver.reportFailure();
public void testMaven2() throws Exception { FileSystemResolver resolver = new FileSystemResolver(); resolver.setName("test"); resolver.setIvy(_ivy); resolver.setM2compatible(true); assertEquals("test", resolver.getName()); resolver.addIvyPattern("test/repositories/m...
if (root == null) throw new IllegalArgumentException (); return null;
return getFirstComponent (root);
public Component getDefaultComponent(Container root) { if (root == null) throw new IllegalArgumentException (); return null; }
if (!root.isVisible () || !root.isDisplayable ()) return null; if (accept (root)) return root; Component[] componentArray = root.getComponents (); for (int i = 0; i < componentArray.length; i++) { Component component = componentArray [i]; if (component instanceof Container) { Component result = getLastComponent ((C...
public Component getFirstComponent(Container root) { if (root == null) throw new IllegalArgumentException (); return null; }
if (!root.isVisible () || !root.isDisplayable ()) return null; if (accept (root)) return root; Component[] componentArray = root.getComponents (); for (int i = componentArray.length - 1; i >= 0; i++) { Component component = componentArray [i]; if (component instanceof Container) { Component result = getLastComponen...
public Component getLastComponent(Container root) { if (root == null) throw new IllegalArgumentException (); return null; }
boolean implicitDownCycleTraversal = value;
implicitDownCycleTraversal = value;
public void setImplicitDownCycleTraversal(boolean value) { boolean implicitDownCycleTraversal = value; }
assert("Test isInRange()", tst.isInRange(testString)); assert("Test isInRange()", !tst.isInRange(new String("Hello")));
assertTrue("Test isInRange()", tst.isInRange(testString)); assertTrue("Test isInRange()", !tst.isInRange(new String("Hello")));
public void testIsInRange() { assert("Test isInRange()", tst.isInRange(testString)); assert("Test isInRange()", !tst.isInRange(new String("Hello"))); }
Object currentValue = NSKeyValueCodingAdditions.DefaultImplementation.valueForKeyPath(currentObject, keyPath);
Object currentValue = NSKeyValueCodingAdditions.Utility.valueForKeyPath(currentObject, keyPath);
public static int indexOfFirstObjectWithValueForKeyPath(NSArray array, Object value, String keyPath) { final int count = array.count(); int result = -1; int i = 0; while ( i < count) { Object currentObject = array.objectAtIndex(i); if(currentObject != NSKeyValueCodi...
if ((getLength() + s.length()) > MAX_CHARACTERS) remove(0, s.length());
int len = s.length(); if (len >= MAX_CHARACTERS) { remove(0, MAX_CHARACTERS); super.insertString(0, s.substring(len - MAX_CHARACTERS), a); return; } int neededSpace = getLength() + len; if (neededSpace > MAX_CHARACTERS) remove(0, neededSpace - MAX_CHARACTERS);
public void appendString(String s, AttributeSet a) { try { if ((getLength() + s.length()) > MAX_CHARACTERS) remove(0, s.length()); super.insertString(getLength(), s, a); } catch (BadLocationException ble) { System.out.println("Bad location exception: " + ble); } }
private AgentAssetData parsePrototypeFile(String agentName) { String filename = agentName + "-prototype-ini.dat"; String uic = ""; String className = ""; String unitName = null;
public AgentAssetData parsePrototypeFile(String cId) { clusterId = cId;
private AgentAssetData parsePrototypeFile(String agentName) { String filename = agentName + "-prototype-ini.dat"; // Use the same domainname for all org assets now String uic = ""; String className = ""; String unitName = null; String dataItem = ""; int newVal; BufferedReader input = null; ...
aad.setType(AgentAssetData.ORG);
private AgentAssetData parsePrototypeFile(String agentName) { String filename = agentName + "-prototype-ini.dat"; // Use the same domainname for all org assets now String uic = ""; String className = ""; String unitName = null; String dataItem = ""; int newVal; BufferedReader input = null; ...
if (tokens.ttype == StreamTokenizer.TT_WORD) { dataItem = tokens.sval; if (dataItem.equals("[Prototype]")) { tokens.nextToken(); className = tokens.sval; aad.setAssetClass(className); if(log.isDebugEnabled()) { log.debug("AgentAssetData Class: " + aad.getAssetClass()); } newVal = tokens.nextToken(); } else if (dataItem...
if (tokens.ttype != StreamTokenizer.TT_WORD) formatError("ttype: " + tokens.ttype + " sval: " + tokens.sval); dataItem = tokens.sval; if (dataItem.equals("[Prototype]")) { newVal = tokens.nextToken(); String assetClassName = tokens.sval; aad.setAssetClass(assetClassName); if(log.isDebugEnabled()) { log.debug("AgentAsse...
private AgentAssetData parsePrototypeFile(String agentName) { String filename = agentName + "-prototype-ini.dat"; // Use the same domainname for all org assets now String uic = ""; String className = ""; String unitName = null; String dataItem = ""; int newVal; BufferedReader input = null; ...
if (input != null) input.close();
private AgentAssetData parsePrototypeFile(String agentName) { String filename = agentName + "-prototype-ini.dat"; // Use the same domainname for all org assets now String uic = ""; String className = ""; String unitName = null; String dataItem = ""; int newVal; BufferedReader input = null; ...
if(log.isDebugEnabled()) { log.debug("Added ClusterPG: " + name); }
private PropGroupData setClusterPG(String name) { PropGroupData pgData = new PropGroupData(PropGroupData.CLUSTER); PGPropData propData = new PGPropData(); propData.setName("ClusterIdentifier"); propData.setType("ClusterIdentifier"); propData.setValue(name); pgData.addProperty(propData); return pg...
if(log.isDebugEnabled()) { log.debug("Added CommunityPG"); }
private PropGroupData setCommunityPG() { PropGroupData pgData = new PropGroupData(PropGroupData.COMMUNITY); PGPropData propData = new PGPropData(); propData.setName("TimeSpan"); propData.setType("TimeSpan"); propData.setValue(""); // Leave empty pgData.addProperty(propData); propData = ...
propData = new PGPropData(); propData.setName("AlternateItemIdentification"); propData.setType("String"); propData.setValue(altid); pgData.addProperty(propData);
private PropGroupData setItemIdentificationPG(String id, String nomenclature, String altid) { PropGroupData pgData = new PropGroupData(PropGroupData.ITEM_IDENTIFICATION); PGPropData propData = new PGPropData(); pr...
if(log.isDebugEnabled()) { log.debug("Added TypeIdentification"); }
private PropGroupData setTypeIdentificationPG() { PropGroupData pgData = new PropGroupData(PropGroupData.TYPE_IDENTIFICATION); PGPropData propData = new PGPropData(); propData.setName("TypeIdentification"); propData.setType("String"); propData.setValue("UTC/RTOrg"); pgData.addProperty(propData); ...
throw new IllegalArgumentException("value may not be less then 0");
throw new IllegalArgumentException("value may not be less than 0");
public JobImpressions(int value) { super(value); if (value < 0) throw new IllegalArgumentException("value may not be less then 0"); }
log.debug( "_model:"+_model.hList()); log.debug( "[objs records]: "+(_model.records().count())+" ");
log.debug( "model(): DRReportModel@" + _model.hashCode()); log.debug( "model().records(): "+_model.records().count());
public DRReportModel model() { if (_model == null) { if(super.hasBinding("model")) { _model = (DRReportModel)super.valueForBinding("model"); } if(_model == null) { _model = DRReportModel.withRawRecordsCriteriaListAttributeList(objects(), criteria...
if(_model == notification.object()) {
if(_model == notification.object() || notification.object() == null) {
public void synchModel(NSNotification notification) { if(_model == notification.object()) { DRReportModel model = _model; reset(); model.initWithRawRecords(objects(), criteriaArray(), attributeArray()); log.info("Model was re-set."); //reset(); } ...
log.info("valueForBinding: "+ name + " : " + result);
log.debug("valueForBinding: "+ name + " : " + result);
public Object valueForBinding(String name) { Object result; if(super.hasBinding(name)) { result = super.valueForBinding(name); } else { result = settingsDictionary().objectForKey(name); } if(log.isDebugEnabled()) { log.info("valueForBinding: "+ nam...
if (jdbcInfo!=null) {
if (jdbcInfoDictionary != null) { newConnectionDictionary.setObjectForKey(jdbcInfoDictionary, "jdbc2Info"); } else if (jdbcInfo!=null) {
public void resetConnectionDictionaryInModel(EOModel aModel) { if(aModel!=null) { String aModelName=aModel.name(); log.debug("Adjusting "+aModelName); NSMutableDictionary newConnectionDictionary=null; if (aModel.adaptorName().indexOf("Oracle")!=-1) { ...
void dragDropEnd(DragSourceDragEvent e);
void dragDropEnd(DragSourceDropEvent e);
void dragDropEnd(DragSourceDragEvent e);
void dragExit(DragSourceDragEvent e);
void dragExit(DragSourceEvent e);
void dragExit(DragSourceDragEvent e);
String items[] = new String[count];
public GtkChoicePeer (Choice c) { super (c); int count = c.getItemCount (); if (count > 0) { String items[] = new String[count]; for (int i = 0; i < count; i++) items[i] = c.getItem (i); append (items); } int selected = c.getSelectedIndex(); if (selected >= 0) select(selected); }
items[i] = c.getItem (i); append (items);
add( c.getItem(i), i ); selected = c.getSelectedIndex(); if( selected >= 0 ) select( selected );
public GtkChoicePeer (Choice c) { super (c); int count = c.getItemCount (); if (count > 0) { String items[] = new String[count]; for (int i = 0; i < count; i++) items[i] = c.getItem (i); append (items); } int selected = c.getSelectedIndex(); if (selected >= 0) select(selected); }
int selected = c.getSelectedIndex(); if (selected >= 0) select(selected);
else selected = -1;
public GtkChoicePeer (Choice c) { super (c); int count = c.getItemCount (); if (count > 0) { String items[] = new String[count]; for (int i = 0; i < count; i++) items[i] = c.getItem (i); append (items); } int selected = c.getSelectedIndex(); if (selected >= 0) select(selected); }
protected void postChoiceItemEvent (String label, int stateChange)
protected void postChoiceItemEvent ( int index )
protected void postChoiceItemEvent (String label, int stateChange) { postItemEvent (label, stateChange); }
postItemEvent (label, stateChange);
if( selected != index ) { selected = index; postItemEvent (((Choice) awtComponent).getItem( selected ), ItemEvent.SELECTED); }
protected void postChoiceItemEvent (String label, int stateChange) { postItemEvent (label, stateChange); }
int before = nativeGetSelected(); int after; nativeRemove (index); after = nativeGetSelected(); if ((before == index) && (after >= 0)) { ((Choice) awtComponent).select (((Choice) awtComponent).getItem (0)); postItemEvent (((Choice) awtComponent).getItem (0), ItemEvent.SELECTED); }
if( index == 0 && selected == 0 ) selected = -1; nativeRemove( index );
public void remove (int index) { int before = nativeGetSelected(); int after; nativeRemove (index); after = nativeGetSelected(); /* Generate an ItemEvent if we are removing the currently selected item and there are at least one item left. */ if ((before == index) && (after >= 0)) ...
selected = -1;
public void removeAll () { nativeRemoveAll(); }
public void close () throws IOException
public synchronized void close () throws IOException
public void close () throws IOException { impl.close(); }
throw new InternalError("Socket.getLocalAddres not implemented");
InetAddress localAddress; try { localAddress = (InetAddress)impl.getOption(SocketOptions.SO_BINDADDR); } catch (SocketException x) { System.err.println(x); throw new java.lang.InternalError("Error in PlainSocketImpl.getOption"); } return localAddress;
public InetAddress getLocalAddress () { // There doesn't seem to be any way to implement this // using a (generic) SocketImpl ... What am I missing? throw new InternalError("Socket.getLocalAddres not implemented"); }
throw new InternalError("Socket.getReceiveBufferSize not implemented");
Integer buf = (Integer)impl.getOption(SocketOptions.SO_RCVBUF); return buf.intValue();
public int getReceiveBufferSize () throws SocketException { throw new InternalError("Socket.getReceiveBufferSize not implemented"); }
throw new InternalError("Socket.getSendBufferSize not implemented");
Integer buf = (Integer)impl.getOption(SocketOptions.SO_SNDBUF); return buf.intValue();
public int getSendBufferSize () throws SocketException { throw new InternalError("Socket.getSendBufferSize not implemented"); }
throw new InternalError("Socket.getSoLinger not implemented");
Object linger = impl.getOption(SocketOptions.SO_LINGER); if (linger instanceof Integer) return ((Integer)linger).intValue(); else return -1;
public int getSoLinger() throws SocketException { throw new InternalError("Socket.getSoLinger not implemented"); }
public int getSoTimeout () throws SocketException
public synchronized int getSoTimeout () throws SocketException
public int getSoTimeout () throws SocketException { throw new InternalError("Socket.getSoTimeout not implemented"); }
throw new InternalError("Socket.getSoTimeout not implemented");
Object timeout = impl.getOption(SocketOptions.SO_TIMEOUT); if (timeout instanceof Integer) return ((Integer)timeout).intValue(); else return 0;
public int getSoTimeout () throws SocketException { throw new InternalError("Socket.getSoTimeout not implemented"); }
throw new InternalError("Socket.getTcpNoDelay not implemented");
Boolean bool = (Boolean)impl.getOption( SocketOptions.TCP_NODELAY ); return bool.booleanValue();
public boolean getTcpNoDelay() throws SocketException { throw new InternalError("Socket.getTcpNoDelay not implemented"); }
throw new InternalError("Socket.setReceiveBufferSize not implemented");
if (size <= 0) throw new IllegalArgumentException("Invalid buffer size: " + size); impl.setOption(SocketOptions.SO_RCVBUF, new Integer(size));
public void setReceiveBufferSize (int size) throws SocketException { throw new InternalError("Socket.setReceiveBufferSize not implemented"); }
throw new InternalError("Socket.setSendBufferSize not implemented");
if (size <= 0) throw new IllegalArgumentException("Invalid buffer size: " + size); impl.setOption(SocketOptions.SO_SNDBUF, new Integer(size));
public void setSendBufferSize (int size) throws SocketException { throw new InternalError("Socket.setSendBufferSize not implemented"); }
throw new InternalError("Socket.setSoLinger not implemented");
if ( on && (linger >= 0) ) { if (linger > 65535) linger = 65535; impl.setOption( SocketOptions.SO_LINGER, new Integer(linger) ); } else if ( on && (linger < 0) ) throw new IllegalArgumentException("SO_LINGER must be >= 0"); else impl.setOption( SocketOptions.SO_LINGER, new Boolean(false) );
public void setSoLinger(boolean on, int linger) throws SocketException { throw new InternalError("Socket.setSoLinger not implemented"); }
public void setSoTimeout (int timeout) throws SocketException
public synchronized void setSoTimeout (int timeout) throws SocketException
public void setSoTimeout (int timeout) throws SocketException { throw new InternalError("Socket.setSoTimeout not implemented"); }
throw new InternalError("Socket.setSoTimeout not implemented");
if (timeout < 0) throw new IllegalArgumentException("Invalid timeout: " + timeout); impl.setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout));
public void setSoTimeout (int timeout) throws SocketException { throw new InternalError("Socket.setSoTimeout not implemented"); }
public static void setSocketImplFactory (SocketImplFactory fac)
public static synchronized void setSocketImplFactory (SocketImplFactory fac)
public static void setSocketImplFactory (SocketImplFactory fac) throws IOException { factory = fac; }
throw new InternalError("Socket.setTcpNoDelay not implemented");
impl.setOption( SocketOptions.TCP_NODELAY, new Boolean(on) );
public void setTcpNoDelay (boolean on) throws SocketException { throw new InternalError("Socket.setTcpNoDelay not implemented"); }
return impl.toString();
return "Socket" + impl.toString();
public String toString () { return impl.toString(); }
if(name.indexOf("CustomComponent")>=0) {
if(name != null && name.indexOf("CustomComponent")>=0) {
public String d2wComponentName() { String name = (String)d2wContext().valueForKey("componentName"); if(name.indexOf("CustomComponent")>=0) { name = (String)d2wContext().valueForKey("customComponentName"); } return name; }
if (_org != null && getResolvedDescriptor(_org, _name+"-caller", true) == null) { IvyResolve resolve = createResolve(isHaltonfailure()); resolve.setOrg(_org); resolve.setName(_name); resolve.setRev(_rev); String conf = _conf == null ? "*" : _conf; resolve.setConf(conf); resolve.execute(); _conf = "default";
if (_org != null) { _conf = _conf == null ? "*" : _conf; String[] toResolve = getConfsToResolve(_org, _name+"-caller", _conf, true); if (toResolve.length > 0) { Message.verbose("using inline mode to resolve "+_org+" "+_name+" "+_rev+" ("+StringUtils.join(toResolve, ", ")+")"); IvyResolve resolve = createResolve(isHalto...
protected void prepareAndCheck() { Ivy ivy = getIvyInstance(); _organisation = getProperty(_organisation, ivy, "ivy.organisation"); _module = getProperty(_module, ivy, "ivy.module"); if (_org != null && getResolvedDescriptor(_org, _name+"-caller", true) == null) { IvyReso...
ensureResolved(isHaltonfailure(), isTransitive(), getOrganisation(), getModule());
Message.debug("using standard ensure resolved"); ensureResolved(isHaltonfailure(), isTransitive(), getOrganisation(), getModule(), getProperty(_conf, ivy, "ivy.resolved.configurations"));
protected void prepareAndCheck() { Ivy ivy = getIvyInstance(); _organisation = getProperty(_organisation, ivy, "ivy.organisation"); _module = getProperty(_module, ivy, "ivy.module"); if (_org != null && getResolvedDescriptor(_org, _name+"-caller", true) == null) { IvyReso...
public boolean postEvent(Event evt) { return null; }
public boolean postEvent(Event evt) { return false; }
public boolean postEvent(Event evt) { return null; } // FIXME
assert("Test equals()", av1.equals(av2));
assertTrue("Test equals()", av1.equals(av2));
public void testEquals() { ArgValue av1 = new ArgValue("Value1:val1", ":"); ArgValue av2 = new ArgValue("Value1:val1", ":"); assert("Test equals()", av1.equals(av2)); } public static Test suite() { return new TestSuite(ArgValueTest.class); }
public static Test suite() { return new TestSuite(ArgValueTest.class); }
public void testEquals() { ArgValue av1 = new ArgValue("Value1:val1", ":"); ArgValue av2 = new ArgValue("Value1:val1", ":"); assert("Test equals()", av1.equals(av2)); } public static Test suite() { return new TestSuite(ArgValueTest.class); }
if (other != null) {
if( other != null && compare( other, method ) > 0 ){
protected void generate() throws NoSuchMethodException { if (wreplace == null) { wreplace = Enhancer.InternalReplace.class.getMethod("writeReplace", TYPES_OBJECT); } declare_interface(Factory.class); declare_field(Modifier.PRIVATE, MethodInterceptor.class, INTERCEPTOR_...
if (log.isDebugEnabled()) {
if (log.isInfoEnabled()) {
protected final boolean allocate( final Task task, final int startingRuleIndex, final long currTime, final Object parent) { DeadlineTimerEvent deadlineI = null; Allocation allocI = null; if (parent instanceof DeadlineTimerEvent) { // called from handleDeadline - prev. alloc...
if (log.isDebugEnabled()) {
if (log.isWarnEnabled()) {
public void execute() { // get the current time long currTime = currentTimeMillis(); // // Watch for added Assets // LocalAssets should all happen at once in the first execute cycle. // Entitys however will likely dribble in over time // So create sorted lists of these separately, then combine th...
if (log.isDebugEnabled()) {
if (log.isInfoEnabled()) {
public void execute() { // get the current time long currTime = currentTimeMillis(); // // Watch for added Assets // LocalAssets should all happen at once in the first execute cycle. // Entitys however will likely dribble in over time // So create sorted lists of these separately, then combine th...
if (log.isDebugEnabled()) {
if (log.isErrorEnabled()) {
public void execute() { // get the current time long currTime = currentTimeMillis(); // // Watch for added Assets // LocalAssets should all happen at once in the first execute cycle. // Entitys however will likely dribble in over time // So create sorted lists of these separately, then combine th...
if (log.isDebugEnabled()) {
if (log.isErrorEnabled()) {
private final void handleAllocation( final Allocation allocI, final long currTime) { AllocationResult responseI = allocI.getReportedResult(); if (responseI == null) { if (log.isDebugEnabled()) { log.error("handleAllocation: " + this + " got alloc with null AR: " + allocI); } ...
log.info("handleAllocation: " + this + " got failed response due to " + reason + " for alloc " + allocI);
if(log.isInfoEnabled()) { log.info("handleAllocation: " + this + " got failed response due to " + reason + " for alloc " + allocI); }
private final void handleAllocation( final Allocation allocI, final long currTime) { AllocationResult responseI = allocI.getReportedResult(); if (responseI == null) { if (log.isDebugEnabled()) { log.error("handleAllocation: " + this + " got alloc with null AR: " + allocI); } ...
if (log.isDebugEnabled()) {
if (log.isWarnEnabled()) {
private final void handleDeadlineEvent( final DeadlineTimerEvent deadlineI, final long currTime) { Allocation allocI = (Allocation)deadlineI.getRegarding(); if (allocI == null) { // I guess the Allocation in question was rescinded or something. // rescind the DeadlineEvent & log so...
if (log.isDebugEnabled()) {
if (log.isInfoEnabled()) {
private final void handleDeadlineEvent( final DeadlineTimerEvent deadlineI, final long currTime) { Allocation allocI = (Allocation)deadlineI.getRegarding(); if (allocI == null) { // I guess the Allocation in question was rescinded or something. // rescind the DeadlineEvent & log so...
if (log.isDebugEnabled()) {
if (log.isInfoEnabled()) {
private final void publishAllocation( final Task task, final int matchingRuleIndex, final long deadlineTime, final long taskDeadlineTime) { // set the new deadline for the resulting task, if this is an // allocation to a remote Org. (for local allocations, this // is meaningless) ...
if (log.isDebugEnabled()) {
if (log.isInfoEnabled()) {
private void publishFailureDisposition( String reason, int[] aspect_types, double[] results, Task task) { AllocationResult estAR = null; // Should this only include the Aspects on which this failed? // All? How do I know which are relevant? // FIXME!!!! estAR = theLDMF.newAllocation...
if (log.isDebugEnabled()) {
if (log.isInfoEnabled()) {
private void rescindAllocation(Allocation alloc) { // Lets make sure we don't do anything with this Allocation later. if (getAllocRuleIndex(alloc) > -100) setAllocRuleIndex(alloc, (-1 * (getAllocRuleIndex(alloc) + 100))); // log something if (log.isDebugEnabled()) { log.info("rescindAllocation:...
if (log.isDebugEnabled()) {
if (log.isInfoEnabled()) {
private void rescindDeadlineTimerEvent(DeadlineTimerEvent deadline) { // log something if (log.isDebugEnabled()) { log.info("rescindDeadlineTimerEvent: " + this + " deleting DeadlineTimerEvent " + deadline); } // rescind the deadline publishRemove(deadline); } // end of rescindDeadlineTimerEvent
if(Modifier.isPublic(method.getModifiers())) {
if(Modifier.isPublic(method.getModifiers()) && !Modifier.isStatic(method.getModifiers())) {
public void addMethod(Method method) { if(Modifier.isPublic(method.getModifiers())) { String name = ClassHelper.getTruncatedName(method.getName()); Class retType = method.getReturnType(); Class[] params = method.getParameterTypes(); boolean isVoid = retType.equals(java.lang.Void.TYPE); Class methodClass = m...
} for (int i=0; i<attributes.getLength(); i++) { if (!stdAtts.contains(attributes.getQName(i))) { out.print(" "+attributes.getQName(i)+"=\""+substitute(ivy, attributes.getValue(i))+"\""); }
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if (_justOpen != null) { out.print(">"); } _context.push(qName);...
boolean doNotAddOne=ERXUtilities.booleanValueForBindingOnComponentWithDefault("doNotAddOneToComputedIndex",
boolean doNotAddOne=ERXValueUtilities.booleanValueForBindingOnComponentWithDefault("doNotAddOneToComputedIndex",
public String onClickString() { String result=null; Object item=valueForBinding("selectsItem"); NSArray list=(NSArray)valueForBinding("list"); String popupName=(String)valueForBinding("popupName"); if (list!=null && item!=null) { int index=list.indexOfObject(item); ...
GregorianCalendar cal = new GregorianCalendar (TimeZone.zoneGMT);
GregorianCalendar cal = new GregorianCalendar (TimeZone.getTimeZone("GMT"));
public static long UTC (int year, int month, int date, int hours, int minutes, int seconds) { GregorianCalendar cal = new GregorianCalendar (TimeZone.zoneGMT); cal.set(year+1900, month, date, hours, minutes, seconds); return cal.getTimeInMillis(); }
fmt.setTimeZone(TimeZone.zoneGMT);
fmt.setTimeZone(TimeZone.getTimeZone("GMT"));
public String toGMTString () { // This method is deprecated. We don't care if it is very slow. SimpleDateFormat fmt = new SimpleDateFormat ("d MMM yyyy HH:mm:ss 'GMT'", Locale.US); fmt.setTimeZone(TimeZone.zoneGMT); return fmt.format(this); }
totalMessageBytes = messageStatsService.getMessageStatistics(false).totalMessageBytes;
totalMessageBytes = messageStatsService.getMessageStatistics(false).totalSentMessageBytes;
private void sampleStatistics() { long currentTime = System.currentTimeMillis(); // MessageStatsService double averageMessageQueueLength = 0.0; long totalMessageBytes = 0l; long totalMessageCount = 0l; if (messageStatsService != null) { averageMessageQueueLength = messageStatsService.getMessage...
totalMessageCount = messageStatsService.getMessageStatistics(false).totalMessageCount;
totalMessageCount = messageStatsService.getMessageStatistics(false).totalSentMessageCount;
private void sampleStatistics() { long currentTime = System.currentTimeMillis(); // MessageStatsService double averageMessageQueueLength = 0.0; long totalMessageBytes = 0l; long totalMessageCount = 0l; if (messageStatsService != null) { averageMessageQueueLength = messageStatsService.getMessage...
JOptionPane.showMessageDialog(null, message, "Unavailable extension", JOptionPane.ERROR_MESSAGE); runExit(); }
animator.stop(); System.exit(0); }
public void run() { JOptionPane.showMessageDialog(null, message, "Unavailable extension", JOptionPane.ERROR_MESSAGE); runExit(); }
animator.stop(); System.exit(0);
new Thread(new Runnable() { public void run() { animator.stop(); System.exit(0); } }).start();
public void run(String[] args) { canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas.addGLEventListener(new Listener()); animator = new Animator(canvas); Frame frame = new Frame("Refraction Using Vertex Programs"); frame.setLayout(new BorderLayout()); canvas.setSize(...
animator.stop(); System.exit(0);
new Thread(new Runnable() { public void run() { animator.stop(); System.exit(0); } }).start();
public void windowClosing(WindowEvent e) { animator.stop(); System.exit(0); }
public PipedInputStream(PipedOutputStream src) throws IOException { buffer = new byte[PIPE_SIZE]; connect(src); }
PipedInputStream() { return; }
public PipedInputStream(PipedOutputStream src) throws IOException { buffer = new byte[PIPE_SIZE]; connect(src); }
public synchronized int available() throws IOException { if (in < 0) return 0; if (in > out) return in - out; return buffer.length - out + in; }
available() throws IOException { if (in == -1) return(0); else if (in > out) return(in - out); else return(in + (pipe_size - out)); }
public synchronized int available() throws IOException { if (in < 0) return 0; if (in > out) return in - out; // Buffer has wrapped around. return buffer.length - out + in; }
public void close() throws IOException { buffer = null; po = null; in = -1; }
close() throws IOException { closed = true; notifyAll(); }
public void close() throws IOException { buffer = null; po = null; // Mark as empty for available method. in = -1; }
public void connect(PipedOutputStream src) throws IOException { if (buffer == null) throw new IOException("pipe closed");
connect(PipedOutputStream src) throws IOException { if (src == this.src) return;
public void connect(PipedOutputStream src) throws IOException { if (buffer == null) throw new IOException("pipe closed"); if (po != null) if (po == src) return; else throw new IOException("pipe already connected"); po = src; try { src.connect(this); } catch (IOExceptio...
if (po != null) if (po == src) return; else throw new IOException("pipe already connected");
if (ever_connected) throw new IOException("Already connected");
public void connect(PipedOutputStream src) throws IOException { if (buffer == null) throw new IOException("pipe closed"); if (po != null) if (po == src) return; else throw new IOException("pipe already connected"); po = src; try { src.connect(this); } catch (IOExceptio...
po = src; try { src.connect(this); } catch (IOException ex) { po = null; throw ex; } }
if (closed) throw new IOException("Stream is closed and cannot be reopened"); src.connect(this); ever_connected = true; }
public void connect(PipedOutputStream src) throws IOException { if (buffer == null) throw new IOException("pipe closed"); if (po != null) if (po == src) return; else throw new IOException("pipe already connected"); po = src; try { src.connect(this); } catch (IOExceptio...
public synchronized int read() throws IOException { if (po == null) if (buffer == null) throw new IOException("pipe closed"); else throw new IOException("pipe unconnected");
read() throws IOException { int bytes_read = read(read_buf, 0, read_buf.length);
public synchronized int read() throws IOException { // TBD: Spec says to throw IOException if thread writing to output stream // died. What does this really mean? Theoretically, multiple threads // could be writing to this object. Do you track the first, last, or // all of them? if (po == null) ...