rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
DBUtils.deleteItems(asbPrefix+"asb_thread", "assembly_id", DBUtils.sqlQuote(assembly_id), QUERY_FILE);
public static void reallyClearCMTasb(String assembly_id){ DBUtils.deleteItems(asbPrefix+"asb_component_hierarchy", "assembly_id", DBUtils.sqlQuote(assembly_id), QUERY_FILE); DBUtils.deleteItems(asbPrefix+"asb_agent", "assembly_id", DBUtils.sqlQuote(assembly_id), QUERY_FILE); DBUtils.deleteItems(asbPrefix+"as...
} else if (_module == null && context.endsWith("artifactId") && !context.equals("project/parent/artifactId")) {
} else if (_module == null && context.endsWith("artifactId")) {
public void characters(char[] ch, int start, int length) throws SAXException { String txt = IvyPatternHelper.substituteVariables(new String(ch, start, length).trim(), _properties); String context = getContext(); if (_md.getModuleRevisionId() == null || context.startsWith("projec...
frame.setResizable(false);
public void run(String[] args) { if (args.length < 6 || args.length > 8) { usage(); } try { int argNo = 0; if (args[argNo].equals("-cg")) { useCg = true; ++argNo; } hdrFilename = args[argNo++]; pbuffer_w = Integer.parseInt(args[argNo++]); pbuffer_h ...
frame.setResizable(false);
public void run(String[] args) { if (args.length < 6 || args.length > 8) { usage(); } try { int argNo = 0; if (args[argNo].equals("-cg")) { useCg = true; ++argNo; } hdrFilename = args[argNo++]; pbuffer_w = Integer.parseInt(args[argNo++]); pbuffer_h ...
Point p = ((Component) source).getLocation (); p.x = x - p.x; p.y = y - p.y; return p;
return new Point (x, y);
public Point getPoint () { Point p = ((Component) source).getLocation (); p.x = x - p.x; p.y = y - p.y; return p; }
SQLWarning(String message, String SQLState)
SQLWarning()
SQLWarning(String message, String SQLState){ this(message, SQLState, 0);}
this(message, SQLState, 0);
this(null, null, 0);
SQLWarning(String message, String SQLState){ this(message, SQLState, 0);}
Choice.this.processItemEvent(new ItemEvent(Choice.this, ItemEvent.ITEM_STATE_CHANGED, this, ItemEvent.SELECTED));
Choice.this.select( i );
public boolean doAccessibleAction(int i) { if (i < 0 || i >= pItems.size()) return false; Choice.this.processItemEvent(new ItemEvent(Choice.this, ItemEvent.ITEM_STATE_CHANGED, this, ItemEvent.SELECTED)); return true; }
add(String item) { if (item == null) throw new NullPointerException ("item must be non-null");
public synchronized void add(String item) { if (item == null) throw new NullPointerException ("item must be non-null");
add(String item){ if (item == null) throw new NullPointerException ("item must be non-null"); pItems.addElement(item); int i = pItems.size () - 1; if (peer != null) { ChoicePeer cp = (ChoicePeer) peer; cp.add (item, i); } else if (selectedIndex == -1) select(0);}
int i = pItems.size () - 1; if (peer != null) { ChoicePeer cp = (ChoicePeer) peer; cp.add (item, i); } else if (selectedIndex == -1) select(0); }
if (peer != null) ((ChoicePeer) peer).add(item, getItemCount() - 1); if (selectedIndex == -1) select( 0 ); }
add(String item){ if (item == null) throw new NullPointerException ("item must be non-null"); pItems.addElement(item); int i = pItems.size () - 1; if (peer != null) { ChoicePeer cp = (ChoicePeer) peer; cp.add (item, i); } else if (selectedIndex == -1) select(0);}
addItem(String item) { add(item); }
public synchronized void addItem(String item) { add(item); }
addItem(String item){ add(item);}
addItemListener(ItemListener listener) { item_listeners = AWTEventMulticaster.add(item_listeners, listener); }
public synchronized void addItemListener(ItemListener listener) { item_listeners = AWTEventMulticaster.add(item_listeners, listener); }
addItemListener(ItemListener listener){ item_listeners = AWTEventMulticaster.add(item_listeners, listener);}
addNotify() { if (peer == null) peer = getToolkit ().createChoice (this); super.addNotify (); }
public void addNotify() { if (peer == null) peer = getToolkit ().createChoice (this); super.addNotify (); }
addNotify(){ if (peer == null) peer = getToolkit ().createChoice (this); super.addNotify ();}
countItems() { return(pItems.size()); }
public int countItems() { return pItems.size(); }
countItems(){ return(pItems.size());}
dispatchEventImpl(AWTEvent e) { if (e.id <= ItemEvent.ITEM_LAST && e.id >= ItemEvent.ITEM_FIRST && (item_listeners != null || (eventMask & AWTEvent.ITEM_EVENT_MASK) != 0)) processEvent(e); else
void dispatchEventImpl(AWTEvent e) {
dispatchEventImpl(AWTEvent e){ if (e.id <= ItemEvent.ITEM_LAST && e.id >= ItemEvent.ITEM_FIRST && (item_listeners != null || (eventMask & AWTEvent.ITEM_EVENT_MASK) != 0)) processEvent(e); else super.dispatchEventImpl(e);}
}
if( e.id <= ItemEvent.ITEM_LAST && e.id >= ItemEvent.ITEM_FIRST && ( item_listeners != null || ( eventMask & AWTEvent.ITEM_EVENT_MASK ) != 0 ) ) processEvent(e); }
dispatchEventImpl(AWTEvent e){ if (e.id <= ItemEvent.ITEM_LAST && e.id >= ItemEvent.ITEM_FIRST && (item_listeners != null || (eventMask & AWTEvent.ITEM_EVENT_MASK) != 0)) processEvent(e); else super.dispatchEventImpl(e);}
getItem(int index) { return((String)pItems.elementAt(index)); }
public String getItem(int index) { return (String)pItems.elementAt(index); }
getItem(int index){ return((String)pItems.elementAt(index));}
getItemCount() { return countItems (); }
public int getItemCount() { return countItems (); }
getItemCount(){ return countItems ();}
getSelectedIndex() { return(selectedIndex); }
public int getSelectedIndex() { return selectedIndex; }
getSelectedIndex(){ return(selectedIndex);}
getSelectedItem() { return (selectedIndex == -1 ? null : ((String)pItems.elementAt(selectedIndex))); }
public synchronized String getSelectedItem() { return (selectedIndex == -1 ? null : ((String)pItems.elementAt(selectedIndex))); }
getSelectedItem(){ return (selectedIndex == -1 ? null : ((String)pItems.elementAt(selectedIndex)));}
getSelectedObjects() { if (selectedIndex == -1) return null;
public synchronized Object[] getSelectedObjects() { if (selectedIndex == -1) return null;
getSelectedObjects(){ if (selectedIndex == -1) return null; Object[] objs = new Object[1]; objs[0] = pItems.elementAt(selectedIndex); return(objs);}
return(objs); }
return objs; }
getSelectedObjects(){ if (selectedIndex == -1) return null; Object[] objs = new Object[1]; objs[0] = pItems.elementAt(selectedIndex); return(objs);}
insert(String item, int index) { if (index < 0) throw new IllegalArgumentException ("index may not be less then 0");
public synchronized void insert(String item, int index) { if (index < 0) throw new IllegalArgumentException ("index may not be less then 0");
insert(String item, int index){ if (index < 0) throw new IllegalArgumentException ("index may not be less then 0"); if (index > getItemCount ()) index = getItemCount (); pItems.insertElementAt(item, index); if (peer != null) { ChoicePeer cp = (ChoicePeer) peer; cp.add (item, index); } else if...
if (peer != null) { ChoicePeer cp = (ChoicePeer) peer; cp.add (item, index); } else if (selectedIndex == -1 || selectedIndex >= index) select(0); }
if (peer != null) ((ChoicePeer) peer).add (item, index); if (selectedIndex == -1 || selectedIndex >= index) select(0); }
insert(String item, int index){ if (index < 0) throw new IllegalArgumentException ("index may not be less then 0"); if (index > getItemCount ()) index = getItemCount (); pItems.insertElementAt(item, index); if (peer != null) { ChoicePeer cp = (ChoicePeer) peer; cp.add (item, index); } else if...
paramString() { return ("selectedIndex=" + selectedIndex + "," + super.paramString()); }
protected String paramString() { return "selectedIndex=" + selectedIndex + "," + super.paramString(); }
paramString(){ return ("selectedIndex=" + selectedIndex + "," + super.paramString());}
processEvent(AWTEvent event) { if (event instanceof ItemEvent) processItemEvent((ItemEvent)event); else super.processEvent(event); }
protected void processEvent(AWTEvent event) { if (event instanceof ItemEvent) processItemEvent((ItemEvent)event); else super.processEvent(event); }
processEvent(AWTEvent event){ if (event instanceof ItemEvent) processItemEvent((ItemEvent)event); else super.processEvent(event);}
processItemEvent(ItemEvent event) { int index = pItems.indexOf((String) event.getItem()); if (event.getStateChange() == ItemEvent.SELECTED) this.selectedIndex = index; if (item_listeners != null) item_listeners.itemStateChanged(event); }
protected void processItemEvent(ItemEvent event) { int index = pItems.indexOf((String) event.getItem()); if (item_listeners != null) item_listeners.itemStateChanged(event); }
processItemEvent(ItemEvent event){ int index = pItems.indexOf((String) event.getItem()); // Don't call back into the peers when selecting index here if (event.getStateChange() == ItemEvent.SELECTED) this.selectedIndex = index; if (item_listeners != null) item_listeners.itemStateChanged(event);}
remove(String item) { int index = pItems.indexOf(item); if (index == -1) throw new IllegalArgumentException ("item \"" + item + "\" not found in Choice"); remove(index); }
public synchronized void remove(String item) { int index = pItems.indexOf(item); if (index == -1) throw new IllegalArgumentException ("item \"" + item + "\" not found in Choice"); remove(index); }
remove(String item){ int index = pItems.indexOf(item); if (index == -1) throw new IllegalArgumentException ("item \"" + item + "\" not found in Choice"); remove(index);}
removeAll() { if (getItemCount() <= 0) return;
public synchronized void removeAll() { if (getItemCount() <= 0) return;
removeAll(){ if (getItemCount() <= 0) return; pItems.removeAllElements (); if (peer != null) { ChoicePeer cp = (ChoicePeer) peer; cp.removeAll (); } selectedIndex = -1;}
removeItemListener(ItemListener listener) { item_listeners = AWTEventMulticaster.remove(item_listeners, listener); }
public synchronized void removeItemListener(ItemListener listener) { item_listeners = AWTEventMulticaster.remove(item_listeners, listener); }
removeItemListener(ItemListener listener){ item_listeners = AWTEventMulticaster.remove(item_listeners, listener);}
select(int index) { if ((index < 0) || (index >= getItemCount())) throw new IllegalArgumentException("Bad index: " + index);
public synchronized void select(int index) { if ((index < 0) || (index >= getItemCount())) throw new IllegalArgumentException("Bad index: " + index);
select(int index){ if ((index < 0) || (index >= getItemCount())) throw new IllegalArgumentException("Bad index: " + index); if (pItems.size() > 0) { selectedIndex = index; ChoicePeer cp = (ChoicePeer) peer; if (cp != null) { cp.select(index); } }}
if (pItems.size() > 0) { selectedIndex = index; ChoicePeer cp = (ChoicePeer) peer; if (cp != null) { cp.select(index); }
if( selectedIndex == index ) return; selectedIndex = index; if( peer != null ) ((ChoicePeer)peer).select( index );
select(int index){ if ((index < 0) || (index >= getItemCount())) throw new IllegalArgumentException("Bad index: " + index); if (pItems.size() > 0) { selectedIndex = index; ChoicePeer cp = (ChoicePeer) peer; if (cp != null) { cp.select(index); } }}
}
select(int index){ if ((index < 0) || (index >= getItemCount())) throw new IllegalArgumentException("Bad index: " + index); if (pItems.size() > 0) { selectedIndex = index; ChoicePeer cp = (ChoicePeer) peer; if (cp != null) { cp.select(index); } }}
if ((status & COMPLETE) == COMPLETE) { synchronized (MediaTracker.this)
synchronized (MediaTracker.this)
public boolean imageUpdate(Image img, int flags, int x, int y, int width, int height) { if ((flags & ABORT) != 0) status = ABORTED | COMPLETE; else if ((flags & ERROR) != 0) status = ERRORED | COMPLETE; else if ((flags & ALLBITS) != 0) status = COMPLETE; else if...
e.next = head; head = e; int flags = target.checkImage(image, e); e.imageUpdate(image, flags, -1, -1, -1, -1);
synchronized(this) { e.next = head; head = e; }
public void addImage(Image image, int id) { MediaEntry e = new MediaEntry(); e.id = id; e.image = image; e.next = head; head = e; // Start tracking image status. int flags = target.checkImage(image, e); e.imageUpdate(image, flags, -1, -1, -1, -1); }
MediaEntry e = head; MediaEntry prev = null; while (e != null)
synchronized (this)
public void removeImage(Image image) { MediaEntry e = head; MediaEntry prev = null; while (e != null) { if (e.image == image) { if (prev == null) head = e.next; else prev.next = e.next; } prev = e; e = e.next; } }
if (e.image == image) { if (prev == null) head = e.next; else prev.next = e.next; } prev = e; e = e.next;
MediaEntry e = head; MediaEntry prev = null; while (e != null) { if (e.image == image) { if (prev == null) head = e.next; else prev.next = e.next; } prev = e; e = e.next; }
public void removeImage(Image image) { MediaEntry e = head; MediaEntry prev = null; while (e != null) { if (e.image == image) { if (prev == null) head = e.next; else prev.next = e.next; } prev = e; e = e.next; } }
{ target.prepareImage(e.image, e); e.status = LOADING; }
{ boolean complete = target.prepareImage(e.image, e); if (complete) e.status = COMPLETE; else e.status = LOADING; }
public int statusAll(boolean load) { int result = 0; MediaEntry e = head; while (e != null) { if (load && e.status == 0) { target.prepareImage(e.image, e); e.status = LOADING; } result |= e.status; e = e.next; } return result; }
{ target.prepareImage(e.image, e); e.status = LOADING; }
{ boolean complete = target.prepareImage(e.image, e); if (complete) e.status = COMPLETE; else e.status = LOADING; }
public int statusID(int id, boolean load) { int result = 0; MediaEntry e = head; while (e != null) { if (e.id == id) { if (load && e.status == 0) { target.prepareImage(e.image, e); e.status = LOADING; } result |= e.status; } e = e.next; } return re...
if (image == null) throw new NullPointerException ();
public boolean prepareImage(Image image, ImageObserver observer) { return prepareImage(image, image.getWidth(observer), image.getHeight(observer), observer); }
Method other = (Method)methodMap.get(methodKey); if( other != null && compare( other, method ) >= 0 ){ checkReturnTypesEqual(method, other); }else{ methodMap.put(methodKey, method);
Method existing = (Method)methodMap.get(methodKey); if (existing == null || (Modifier.isProtected(existing.getModifiers()) && Modifier.isPublic(method.getModifiers()))) { methodMap.put(methodKey, method); } else { checkReturnTypesEqual(method, existing);
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 (getComponentType().equalsIgnoreCase("Node.AgentManager.Binder")) {
self.setType(getComponentType()); if (self.getType().equalsIgnoreCase("Node.AgentManager.Binder")) {
public ComponentData addComponentData(ComponentData data) { if(log.isDebugEnabled()) { log.debug("Adding ComponentData for: " + data.getName()); } // Warning: This assumes it has been handed the component in // which to add itself if (data.getType() != ComponentData.AGENT && data.getType() != ...
} else if (getComponentType().equalsIgnoreCase("Node.AgentManager.Agent.PluginManager.Binder")) {
} else if (self.getType().equalsIgnoreCase("Node.AgentManager.Agent.PluginManager.Binder")) {
public ComponentData addComponentData(ComponentData data) { if(log.isDebugEnabled()) { log.debug("Adding ComponentData for: " + data.getName()); } // Warning: This assumes it has been handed the component in // which to add itself if (data.getType() != ComponentData.AGENT && data.getType() != ...
} else if (getComponentType().equalsIgnoreCase("Node.AgentManager.Agent.PluginManager.Plugin")) {
} else if (self.getType().equalsIgnoreCase("Node.AgentManager.Agent.PluginManager.Plugin")) {
public ComponentData addComponentData(ComponentData data) { if(log.isDebugEnabled()) { log.debug("Adding ComponentData for: " + data.getName()); } // Warning: This assumes it has been handed the component in // which to add itself if (data.getType() != ComponentData.AGENT && data.getType() != ...
} else if (getComponentType().equalsIgnoreCase("Node.AgentManager.Agent")) {
} else if (self.getType().equalsIgnoreCase("Node.AgentManager.Agent")) {
public ComponentData addComponentData(ComponentData data) { if(log.isDebugEnabled()) { log.debug("Adding ComponentData for: " + data.getName()); } // Warning: This assumes it has been handed the component in // which to add itself if (data.getType() != ComponentData.AGENT && data.getType() != ...
} else { self.setType(getComponentType());
public ComponentData addComponentData(ComponentData data) { if(log.isDebugEnabled()) { log.debug("Adding ComponentData for: " + data.getName()); } // Warning: This assumes it has been handed the component in // which to add itself if (data.getType() != ComponentData.AGENT && data.getType() != ...
protected boolean alreadyAdded(ComponentData parent, ComponentData self) { if (self == null)
protected boolean alreadyAdded(final ComponentData parent, final ComponentData self) { if (self == null || parent == null)
protected boolean alreadyAdded(ComponentData parent, ComponentData self) { if (self == null) return true; ComponentData[] children = parent.getChildren(); for (int i = 0; i < children.length; i++) { boolean isdiff = false; ComponentData kid = children[i]; if (kid == null) { if (log.isWarn...
continue; } if (kid.getClassName().equals(self.getClassName())) {
} else if (kid.getClassName().equals(self.getClassName())) {
protected boolean alreadyAdded(ComponentData parent, ComponentData self) { if (self == null) return true; ComponentData[] children = parent.getChildren(); for (int i = 0; i < children.length; i++) { boolean isdiff = false; ComponentData kid = children[i]; if (kid == null) { if (log.isWarn...
"customComponent <" + d2wContext().valueForKey("customComponentName") + ">");
"customComponent <" + d2wContext().valueForKey("customComponentName") + ">", ex);
public static void reportException(Exception ex, D2WContext d2wContext) { if(d2wContext != null) { log.error("Exception <"+ex+">: "+ "pageConfiguration <" + d2wContext.valueForKeyPath("pageConfiguration") + ">, "+ "propertyKey <" + d2wContext.propertyKey()...
if (addr.lenth == 16)
if (addr.length == 16)
public boolean isMulticastAddress() { // Mask against high order bits of 1110 if (addr.length == 4) return (addr [0] & 0xF0) == 0xE0; // Mask against high order bits of 11111111 if (addr.lenth == 16) return addr [0] == (byte) 0xFF; return false; }
JScrollPane jsp = new JScrollPane(plugInsList); jsp.setMinimumSize(new Dimension(50, 50));
JScrollPane jsp = new JScrollPane(plugInsList, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); jsp.setPreferredSize(new Dimension(400, 100));
private void displayPlugins(String agentName) { ComponentData societyComponentData = experiment.getSocietyComponentData(); if (societyComponentData == null) { if(log.isWarnEnabled()) { log.warn("ConsoleInternalFrame: Need to save experiment"); } return; } ComponentData[] children = s...
new GridBagConstraints(x, y++, 1, 1, 1.0, 0.0,
new GridBagConstraints(x, y++, 1, 1, 0.0, 0.0,
private void displayPlugins(String agentName) { ComponentData societyComponentData = experiment.getSocietyComponentData(); if (societyComponentData == null) { if(log.isWarnEnabled()) { log.warn("ConsoleInternalFrame: Need to save experiment"); } return; } ComponentData[] children = s...
GridBagConstraints.HORIZONTAL,
GridBagConstraints.NONE,
private void displayPlugins(String agentName) { ComponentData societyComponentData = experiment.getSocietyComponentData(); if (societyComponentData == null) { if(log.isWarnEnabled()) { log.warn("ConsoleInternalFrame: Need to save experiment"); } return; } ComponentData[] children = s...
MessageImpl impl = Message.getImpl(); ant.execute(); markBuilt(f); Message.setImpl(impl);
MessageImpl impl = IvyContext.getContext().getMessageImpl(); try { IvyContext.getContext().setMessageImpl(null); ant.execute(); markBuilt(f); } finally { IvyContext.getContext().setMessageImpl(impl); }
public void progress(IvyEvent event) { File f = getBuildFile(event); if (f.exists()) { if (_onlyonce && isBuilt(f)) { Message.verbose("target build file already built, skipping: "+f); } else { Ant ant = new Ant(); Project project = (Project)IvyContext.getContext().get(IvyTask.ANT_PROJECT_CONTEXT_KEY); ...
boolean result;
boolean result = false;
public static boolean eoEquals(EOEnterpriseObject firstEO, EOEnterpriseObject secondEO) { boolean result; if (firstEO != null && secondEO != null) { final EOEditingContext firstContext = firstEO.editingContext(); final EOEditingContext secondContext = secondEO.editingCont...
if (firstEO != null && secondEO != null) {
if ( firstEO == secondEO ) { result = true; } else if (firstEO != null && secondEO != null) {
public static boolean eoEquals(EOEnterpriseObject firstEO, EOEnterpriseObject secondEO) { boolean result; if (firstEO != null && secondEO != null) { final EOEditingContext firstContext = firstEO.editingContext(); final EOEditingContext secondContext = secondEO.editingCont...
else if (firstContext == null && secondContext == null) { result = firstEO.equals(secondEO); } else { result = false; } } else if (firstEO != null || secondEO != null) { result = false; } else { result = true;
public static boolean eoEquals(EOEnterpriseObject firstEO, EOEnterpriseObject secondEO) { boolean result; if (firstEO != null && secondEO != null) { final EOEditingContext firstContext = firstEO.editingContext(); final EOEditingContext secondContext = secondEO.editingCont...
public String getHost(String agentName);
String getHost(String agentName);
public String getHost(String agentName);
public int getPort(String agentName);
int getPort(String agentName);
public int getPort(String agentName);
String targetLanguage = erv.targetLanguage() != null ? erv.targetLanguage() : ERXLocalizer.defaultLanguage();
String targetLanguage = erv.targetLanguage() != null ? erv.targetLanguage() : ERXLocalizer.currentLocalizer().language();
public String templateForException(ERXValidationException erv) { String template = null; if (erv.delegate() != null && erv.delegate() instanceof ExceptionDelegateInterface) { template = ((ExceptionDelegateInterface)erv.delegate()).templateForException(erv); } if (template == n...
ERXMultiKey k = new ERXMultiKey(new NSArray(new Object[] {_kvcNullValue(entityName), _kvcNullValue(property), _kvcNullValue(type), _kvcNullValue(targetLanguage)}));
ERXMultiKey k = new ERXMultiKey(new Object[] {entityName, property, type,targetLanguage});
public String templateForException(ERXValidationException erv) { String template = null; if (erv.delegate() != null && erv.delegate() instanceof ExceptionDelegateInterface) { template = ((ExceptionDelegateInterface)erv.delegate()).templateForException(erv); } if (template == n...
sleep((int)(Math.random() * 500));
sleep((int)((Math.random() * 20)));
public void run () { int value = 0; int ref = 0; for (int i = 0; i < 20; i++) { int rand = (int)(Math.random ()*20); /* Read `value', ref is kept for comparison */ value = Integer.parseInt (d.get()); /* change `value' and ref by a random number, store `value'. */ value += rand; ref += rand;...
System.out.println("JFrame.getPrefSize(): " + d + " , comp="+countComponents() + ", layout=" + getLayout());
System.out.println("JFrame.getPrefSize(): " + d + " , comp="+ getComponentCount () + ", layout=" + getLayout());
public Dimension getPreferredSize() { Dimension d = super.getPreferredSize(); System.out.println("JFrame.getPrefSize(): " + d + " , comp="+countComponents() + ", layout=" + getLayout()); return d; }
e.printStackTrace();
if(log.isErrorEnabled()) { log.error("Exception", e); }
private ComponentData addAssetData(ComponentData data) { AgentAssetData assetData = new AgentAssetData((AgentComponentData)data); assetData.setType(AgentAssetData.ORG); String orgClass = queryOrgClass(); assetData.setAssetClass(orgClass); // Get list of assemblies for use in query, ignoring CMT ass...
e.printStackTrace();
if(log.isErrorEnabled()) { log.error("Exception", e); }
public ComponentData addComponentData(ComponentData data) {// if(log.isDebugEnabled()) {// log.debug("In CMTAgent addComponentData");// } // The incoming data is an agent String name = data.getName(); int dotPos = name.lastIndexOf('.'); if (dotPos >= 0) { name = name.substring(dotPos + ...
ioe.printStackTrace();
if(log.isErrorEnabled()) { log.error("Exception", ioe); }
public void initProperties() { String componentID = name; String componentCategory = "agent"; propName = addProperty(PROP_AGENT_NAME, name, new ConfigurableComponentPropertyAdapter() { public void PropertyValueChanged(PropertyEvent e) { } }); propComponentID = addProperty(PROP_COMP...
e.printStackTrace();
if(log.isErrorEnabled()) { log.error("Exception", e); }
private String queryOrgClass() { String orgClass = null; substitutions.put(":agent_name", name); try { Connection conn = DBUtils.getConnection(); try { Statement stmt = conn.createStatement(); String query = DBUtils.getQuery(QUERY_AGENT_ASSET_CLASS, substitutions); ResultSet rs = stmt.executeQuery...
if (false && !modified) {
if (!modified) {
public void save() { if (false && !modified) { JOptionPane.showMessageDialog(this, "No modifications were made."); return; } modified = false; if (experiment.isCloned()) { experiment.saveToDb(); return; } // get unique name in both database and CSMART if (ExperimentDB.isExperi...
return ("KeyEvent[" + keyCode + "," + keyChar + "," + modifiers + ";" + super.paramString () + "]");
String r; switch (id) { case KEY_PRESSED: r = "KEY_PRESSED"; break; case KEY_RELEASED: r = "KEY_RELEASED"; break; case KEY_TYPED: r = "KEY_TYPED"; break; } r += ",keyCode=" + keyCode + "," + getKeyText(keyCode) + ",modifiers=" + getKeyModifiersText(modifiers); return r;
public String paramString () { return ("KeyEvent[" + keyCode + "," + keyChar + "," + modifiers + ";" + super.paramString () + "]"); }
ListPageInterface result=(ListPageInterface)ERDirectToWeb.printerFriendlyPageForD2WContext(d2wContext,session);
ListPageInterface result=(ListPageInterface)ERD2WFactory.erFactory().printerFriendlyPageForD2WContext(d2wContext,session);
public static WOComponent printerFriendlyVersion(D2WContext d2wContext, WOSession session, EODataSource dataSource, WODisplayGroup displayGroup) { ListPageInterface result=(ListPageInterface)ERDirectToWeb.printerFriendlyPageForD2WContext(d2wContext,session); result.setDataSource(dataSource); WO...
public Project(ProjectDTO dto) { this.dto = dto;
public Project() { this(new ProjectDTO());
public Project(ProjectDTO dto) { this.dto = dto; }
List authPrefs = new ArrayList(2); authPrefs.add(AuthPolicy.DIGEST); authPrefs.add(AuthPolicy.BASIC); client.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPrefs);
private HttpClient getClient() { HttpClient client = new HttpClient(); if (useProxy()) { client.getHostConfiguration().setProxy(_proxyHost, _proxyPort); if (useProxyAuthentication()) { client.getState().setProxyCredentials(_proxyRealm, _proxyHost, ...
texture = TextureIO.newTexture(file);
texture = TextureIO.newTexture(file, true);
public void display(GLAutoDrawable drawable) { GL gl = drawable.getGL(); gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); if (flushTexture) { flushTexture = false; if (texture != null) { texture.dispose(); texture = null; } } if (newTexture) { newTexture = ...
public final static float degToRad (float deg) { return (deg * ((float)Math.PI / 180.0f));
public static final double degToRad (double deg) { return (deg * (Math.PI / 180.0d));
public final static float degToRad (float deg) { return (deg * ((float)Math.PI / 180.0f)); }
public final static float radToDeg (float rad) { return (rad * (180.0f / (float)Math.PI));
public static final double radToDeg (double rad) { return (rad * (180.0d / Math.PI));
public final static float radToDeg (float rad) { return (rad * (180.0f / (float)Math.PI)); }
public final static boolean approximately_equal(float a, float b, float epsilon) {
public static final boolean approximately_equal(double a, double b, double epsilon) {
public final static boolean approximately_equal(float a, float b, float epsilon) { return (Math.abs(a-b) <= epsilon); }
public final static int hashLatLon (float lat, float lon) {
public static final int hashLatLon (float lat, float lon) {
public final static int hashLatLon (float lat, float lon) { if (lat == -0f) lat = 0f;//handle negative zero (anything else?) if (lon == -0f) lon = 0f; int tmp = Float.floatToIntBits(lat); int hash = (tmp<<5) | (tmp>>27);//rotate the lat bits return hash ^ Float.floatToIntBits(lon);//XOR with lon }
if(log.isDebugEnabled()) {
if(log.isWarnEnabled()) {
public UIProperties() { createLogger(); // define default properties Properties defaults = new Properties(); setDefaults(defaults); // define new properties from config file; default to defaults properties = new Properties(defaults); ConfigFinder configFinder = ConfigFinder.getInstance(); File...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
public void saveProperties(File file) { try { properties.store(new FileOutputStream(file), "CSMART UI Properties"); } catch (Exception e) { if(log.isDebugEnabled()) { log.error("Could not save CSMART UI Properties in: " + file.getPath() + " " + e); } } }
file.getPath() + " " + e);
file.getPath() + " ", e);
public void saveProperties(File file) { try { properties.store(new FileOutputStream(file), "CSMART UI Properties"); } catch (Exception e) { if(log.isDebugEnabled()) { log.error("Could not save CSMART UI Properties in: " + file.getPath() + " " + e); } } }
if(log.isDebugEnabled()) { log.error("Exception parsing color string: " + e);
if(log.isErrorEnabled()) { log.error("Exception parsing color string: ", e);
private Color stringToColor(String s) { StringTokenizer st = new StringTokenizer(s, ","); if (st.countTokens() < 3) return Color.green; // bad color string, return default color int[] rgb = new int[3]; try { for (int i = 0; i < 3; i++) rgb[i] = Integer.parseInt(st.nextToken()); } catch (Excep...
super.ready();
public void run() { System.out.println("join()"); try { join(2000); System.out.println("Error: join() completed normally??!"); } catch (InterruptedException x) { if (isInterrupted() || interrupted()) System.out.println("Error: interrupt flag is still set."); System.o...
for (long i=0; i < yields; i++)
long start = System.currentTimeMillis(); while (true)
public void run() { System.out.println ("Busy waiting"); int count = 0; for (long i=0; i < yields; i++) { Thread.yield(); count += 5; if (isInterrupted ()) break; } synchronized (this) { if (interrupted ()) { System.out.println ("interrupted - ok"); if (isInterrupted () |...
count += 5;
public void run() { System.out.println ("Busy waiting"); int count = 0; for (long i=0; i < yields; i++) { Thread.yield(); count += 5; if (isInterrupted ()) break; } synchronized (this) { if (interrupted ()) { System.out.println ("interrupted - ok"); if (isInterrupted () |...
break; long now = System.currentTimeMillis(); if ((now - start) > 5000)
public void run() { System.out.println ("Busy waiting"); int count = 0; for (long i=0; i < yields; i++) { Thread.yield(); count += 5; if (isInterrupted ()) break; } synchronized (this) { if (interrupted ()) { System.out.println ("interrupted - ok"); if (isInterrupted () |...
sleep(2000);
sleep(5000);
public void run() { System.out.println ("sleep()"); try { sleep(2000); System.out.println("Error: sleep() completed normally."); } catch (InterruptedException x) { if (isInterrupted() || interrupted()) System.out.println("Error: interrupt flag is still set."); System...
public static void sleep_and_interrupt(Thread t)
public static void sleep_and_interrupt(ThreadBase t)
public static void sleep_and_interrupt(Thread t) { try { Thread.sleep (250); t.interrupt (); long t1 = System.currentTimeMillis(); t.join (5000); long time = System.currentTimeMillis() - t1; if (time > 2900) { System.out.println ("Error: join() from main thread timed out"...
Thread.sleep (250);
synchronized (t) { while (!t.ready) t.wait(10); } Thread.sleep (50);
public static void sleep_and_interrupt(Thread t) { try { Thread.sleep (250); t.interrupt (); long t1 = System.currentTimeMillis(); t.join (5000); long time = System.currentTimeMillis() - t1; if (time > 2900) { System.out.println ("Error: join() from main thread timed out"...
super.ready();
public synchronized void run() { System.out.println ("wait()"); try { wait(); System.out.println("Error: wait() completed normally."); } catch (InterruptedException x) { if (isInterrupted() || interrupted()) System.out.println("Error: interrupt flag is still set."); } ...
boolean r = interrupt_flag; interrupt_flag = false; return r;
return interrupt_flag;
public boolean isInterrupted () { boolean r = interrupt_flag; interrupt_flag = false; return r; }
return currentThread().isInterrupted();
return currentThread().isInterrupted_();
public static boolean interrupted () { return currentThread().isInterrupted(); }
return super.defineClass(name, b, 0, b.length, DOMAIN);
Class c = super.defineClass(name, b, 0, b.length, DOMAIN); postProcess(c); return c;
public Class loadClass(String name) throws ClassNotFoundException { Class loaded = findLoadedClass(name); if( loaded != null ){ if( loaded.getClassLoader() == this ){ return loaded; }//else reload with this class loader } if (!f...
RecipeComponent[] recipes = experiments[i].getRecipes();
RecipeComponent[] recipes = experiments[i].getRecipeComponents();
private ArrayList getExperimentsInWorkspace(RecipeComponent rc) { ArrayList results = new ArrayList(); Experiment[] experiments = csmart.getExperimentsInWorkspace(); for (int i = 0; i < experiments.length; i++) { RecipeComponent[] recipes = experiments[i].getRecipes(); for (int j = 0; j < recipes.l...
"gnu.java.security.provider.DSASignature");
gnu.java.security.provider.DSASignature.class.getName());
public Gnu() { super( "GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA"); // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Sign...
"gnu.java.security.provider.DSAKeyPairGenerator");
gnu.java.security.provider.DSAKeyPairGenerator.class.getName());
public Gnu() { super( "GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA"); // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Sign...
put("MessageDigest.SHA", "gnu.java.security.provider.SHA"); put("MessageDigest.MD5", "gnu.java.security.provider.MD5");
put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName()); put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName());
public Gnu() { super( "GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA"); // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Sign...
"gnu.java.security.provider.DSAParameters");
gnu.java.security.provider.DSAParameters.class.getName());
public Gnu() { super( "GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA"); // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Sign...
"gnu.java.security.provider.DSAParameterGenerator");
gnu.java.security.provider.DSAParameterGenerator.class.getName());
public Gnu() { super( "GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA"); // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Sign...
"gnu.java.security.provider.SHA1PRNG");
gnu.java.security.provider.SHA1PRNG.class.getName());
public Gnu() { super( "GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA"); // Note that all implementation class names are referenced by using // Class.getName(). That way when we staticly link the Gnu provider // we automatically get all the implementation classes. // Signature put("Sign...
EOEnterpriseObject eo = ERXUtilities.createEO(destinationEntity().name(), editingContext());
EOEnterpriseObject eo = ERXEOControlUtilities.createAndInsertObject( editingContext(), destinationEntity().name());
public WOComponent newObjectAction() { WOComponent result; if (isEntityReadOnly()) { throw new IllegalStateException("You cannot create new instances of " + entity().name() + "; it is read-only."); } else { _state = NEW; EOEnterpriseObject eo = ERXUtilities.crea...