rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
log = CSMART.createLogger("org.cougaar.tools.csmart.runtime.plugin"); | createLogger(); | public void setupSubscriptions() { log = CSMART.createLogger("org.cougaar.tools.csmart.runtime.plugin"); if(log.isDebugEnabled()) { log.debug(" setting up subscriptions"); } // get the service broker ServiceBroker serviceBroker = getBindingSite().getServiceBroker(); // get the MessageTransport ... |
reset(); | public void appendToResponse(WOResponse aResponse, WOContext aContext) { reset(); super.appendToResponse(aResponse, aContext); } | |
uniqueID=null; | public void invalidateCaches() { _selection=null; currentItem=null; index=null; } | |
reset(); setSelection((String)aRequest.formValueForKey(uniqueID())); | setSelection(aRequest.stringFormValueForKey(uniqueID())); | public void takeValuesFromRequest(WORequest aRequest, WOContext aContext) { reset(); setSelection((String)aRequest.formValueForKey(uniqueID())); super.takeValuesFromRequest(aRequest, aContext); } |
Object id = valueForBinding("uniqueID"); if(id == null) { return context().elementID(); } else { return id.toString(); } | return uniqueID.toString(); | public String uniqueID() { Object id = valueForBinding("uniqueID"); if(id == null) { return context().elementID(); } else { return id.toString(); } } |
Object result=null; if (newValue!=null && ((String)newValue).length()==0) { if (value()!=null) result=super.validateTakeValueForKeyPath(newValue,keyPath); else result=super.validateTakeValueForKeyPath(null,keyPath); } else result=super.validateTakeValueForKeyPath(newValue,keyPath); return result; | return super.validateTakeValueForKeyPath((newValue!=null && ((String)newValue).length()==0) ? null : newValue, keyPath); | public Object validateTakeValueForKeyPath(Object newValue, String keyPath) { Object result=null; if (newValue!=null && ((String)newValue).length()==0) { if (value()!=null) result=super.validateTakeValueForKeyPath(newValue,keyPath); else result=super.... |
society.addChild(agentComponent); | private void addAgent() { String name = (String)JOptionPane.showInputDialog(this, "Enter Agent Name", "Agent Name", JOptionPane.QUESTION_MESSAGE, null, null, ""); if (name == null) r... | |
addContainerComponent(agentComponent, "Binders"); addContainerComponent(agentComponent, "Plugins"); | addContainerComponent(agentNode, agentComponent, "Binders"); addContainerComponent(agentNode, agentComponent, "Plugins"); | private void addAgent() { String name = (String)JOptionPane.showInputDialog(this, "Enter Agent Name", "Agent Name", JOptionPane.QUESTION_MESSAGE, null, null, ""); if (name == null) r... |
agentComponent.addChild(asset); addContainerComponent(asset, "Property Groups"); addContainerComponent(asset, "Relationships"); | addContainerComponent(assetNode, asset, "Property Groups"); addContainerComponent(assetNode, asset, "Relationships"); | private void addAgent() { String name = (String)JOptionPane.showInputDialog(this, "Enter Agent Name", "Agent Name", JOptionPane.QUESTION_MESSAGE, null, null, ""); if (name == null) r... |
BaseComponent parentBC = (BaseComponent)nodeToComponent.get(selNode); parentBC.addChild(bc); | private void addBaseComponent(BaseComponent bc) { DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)tree.getSelectionPath().getLastPathComponent(); DefaultMutableTreeNode newNode = createTreeNode(bc, selNode); bc.initProperties(); BaseComponent parentBC = (BaseComponent)nodeToComponent.get(sel... | |
private void addContainerComponent(BaseComponent parent, String name) { | private void addContainerComponent(DefaultMutableTreeNode parentNode, BaseComponent parent, String name) { | private void addContainerComponent(BaseComponent parent, String name) { ContainerComponent containerComponent = (ContainerComponent)new ContainerBase(name); createTreeNode(containerComponent, (DefaultMutableTreeNode)tree.getSelectionPath().getLastPathComponent()); containerComponent.initProperti... |
createTreeNode(containerComponent, (DefaultMutableTreeNode)tree.getSelectionPath().getLastPathComponent()); | parent.addChild(containerComponent); createTreeNode(containerComponent, parentNode); | private void addContainerComponent(BaseComponent parent, String name) { ContainerComponent containerComponent = (ContainerComponent)new ContainerBase(name); createTreeNode(containerComponent, (DefaultMutableTreeNode)tree.getSelectionPath().getLastPathComponent()); containerComponent.initProperti... |
parent.addChild(containerComponent); | private void addContainerComponent(BaseComponent parent, String name) { ContainerComponent containerComponent = (ContainerComponent)new ContainerBase(name); createTreeNode(containerComponent, (DefaultMutableTreeNode)tree.getSelectionPath().getLastPathComponent()); containerComponent.initProperti... | |
listeningOnProperties.add(property); | private void addTableEntryForProperty(Property property) { propertyTable.addProperty(property); property.addPropertyListener(this); } | |
if (node == null) { if (log.isErrorEnabled()) { log.error("No node for component: " + cc); } return; } | public void propertyAdded(PropertyEvent e) { Property prop = e.getProperty(); // get the tree node for this property's configurable component ModifiableComponent cc = (ModifiableComponent)prop.getConfigurableComponent(); PropertyTreeNode node = (PropertyTreeNode)componentToNode.get(cc); Composite... | |
listeningOnProperties.add(p); | public void propertyValueChanged(PropertyEvent e) { Property p = e.getProperty(); p.removePropertyListener(this); int row = ((PropTableModelBase)(propertyTable.getModel())).getRowForProperty(p); if (row != -1) { Object value = null; if (p.isValueSet()) value = p.getValue(); else value... | |
listeningOnProperties.remove(property); | private void removeTableEntryForProperty(Property property) { propertyTable.removeProperty(property); property.removePropertyListener(this); } | |
private void gear(GL gl, float inner_radius, float outer_radius, float width, int teeth, float tooth_depth) | public static void gear(GL gl, float inner_radius, float outer_radius, float width, int teeth, float tooth_depth) | private void gear(GL gl, float inner_radius, float outer_radius, float width, int teeth, float tooth_depth) { int i; float r0, r1, r2; float angle, da; float u, v, len; r0 = inner_radius; r1 = outer_radiu... |
return (Charset) charsets.get (canonicalize (charsetName)); | return (Charset) charsets.get(canonicalNames.get(charsetName.toLowerCase())); | public Charset charsetForName (String charsetName) { return (Charset) charsets.get (canonicalize (charsetName)); } |
dbp.setDebug(true); | private void copyCMTThreads(String oldTrialId, String newTrialId) throws SQLException { dbp.setDebug(true); substitutions.put(":old_trial_id:", oldTrialId); substitutions.put(":new_trial_id:", newTrialId); String qs = dbp.getQuery("copyCMTThreadsQueryNames", substitutions); ... | |
private void setAssemblyMatch() { substitutions.put(":assembly_match:", "in (select assembly_id from v4_expt_trial_assembly where trial_id = '" + trialId + "')"); | private void setAssemblyMatch() throws SQLException { ResultSet rs = executeQuery(stmt, dbp.getQuery("queryTrialAssemblies", substitutions)); StringBuffer q = new StringBuffer(); boolean first = true; q.append("in ("); while (rs.next()) { if (first) { first = false; } else { q.append(", "); } q.append("'").append(rs.ge... | private void setAssemblyMatch() { substitutions.put(":assembly_match:", "in (select assembly_id from v4_expt_trial_assembly where trial_id = '" + trialId + "')"); } |
return _checkHashCodesDefault; | return _checkHashCodesDefault || true; | private boolean checkHashCodes(WOComponent wocomponent, WOContext wocontext) { if(_checkHashCodes != null) { return _checkHashCodes.booleanValueInComponent(wocomponent); } return _checkHashCodesDefault; } |
Object object = context.objectAtIndex(index); if(checkHashCodes) { if(object != null && hashCode != 0) { int objectHashCode = hashCodeForObject(object); if(objectHashCode != hashCode) { boolean found = false; for(int i = 0; i < context.count() && !found; i++) { Object o = context.objectAtIndex(i); int otherHashCode = h... | Object object = null; if(checkHashCodes) { boolean found = false; int otherHashCode = 0; for(int i = 0; i < context.count() && !found; i++) { Object o = context.objectAtIndex(i); otherHashCode = hashCodeForObject(o); if(otherHashCode == hashCode) { object = o; index = i; found = true; } } if(!found) { if(raiseOnUnmatch... | public WOActionResults invokeAction(WORequest worequest, WOContext wocontext) { WOComponent wocomponent = wocontext.component(); Context context = createContext(wocomponent); int count = _count(context, wocomponent); WOActionResults woactionresults = null; String i... |
protected boolean isVisible(Member member, String packageName) { | protected boolean isVisible(Member member, Package packageName) { | protected boolean isVisible(Member member, String packageName) { int mod = member.getModifiers(); if (Modifier.isPrivate(mod)) { return false; } if (Modifier.isProtected(mod) || Modifier.isPublic(mod)) { return true; } return member.getDeclaringClass()... |
return member.getDeclaringClass().getPackage().getName().equals(packageName); | Package p = member.getDeclaringClass().getPackage(); return ( null == packageName ? p == null : packageName.equals(p) ); | protected boolean isVisible(Member member, String packageName) { int mod = member.getModifiers(); if (Modifier.isPrivate(mod)) { return false; } if (Modifier.isProtected(mod) || Modifier.isPublic(mod)) { return true; } return member.getDeclaringClass()... |
System.setProperty("cglib.debugLocation", System.getProperty("user.home") + System.getProperty("file.separator") + "cglib-debug" ); | if(System.getProperty(DebuggingClassWriter.DEBUG_LOCATION_PROPERTY) == null){ System.setProperty(DebuggingClassWriter.DEBUG_LOCATION_PROPERTY,DEFAULT_DEBUG_LOACATION); } | public static void main(String args[])throws Exception { System.setProperty("cglib.debugLocation", System.getProperty("user.home") + System.getProperty("file.separator") + "cglib-debug" ); String[] testCaseName = {TestAll.class.getName()}; junit.textui.TestRunner.mai... |
return "locationmap.xml"; | return Utilities.getPathToContent() + java.io.File.separator + "locationmap.xml"; | protected String getFilename() { return "locationmap.xml"; } |
if (name.equals(PropertyNames.PLAN_OBJECTS_TO_IGNORE)) planObjectsToIgnore = value; | if (name.equals(PropertyNames.PLAN_OBJECTS_TO_IGNORE)) { try { StringTokenizer st = new StringTokenizer(value, ","); while (st.hasMoreTokens()) { String s = st.nextToken(); if (s.equals(PropertyNames.PLAN_ELEMENT_OBJECT)) { ignorePlanElements = true; } else if (s.equals(PropertyNames.DIRECT_OBJECT)) { ignoreDirectObjec... | public void setParam(String name, String value) { if (name.equals(PropertyNames.PLAN_OBJECTS_TO_IGNORE)) planObjectsToIgnore = value; } |
parseFilter(query_parameters, psc); | PlanPSPState pspState = new PlanPSPState(this, query_parameters, psc); pspState.configure(query_parameters); List ret = getObjects(psc, pspState); | public void execute(PrintStream out, HttpInput query_parameters, PlanServiceContext psc, PlanServiceUtilities psu) throws Exception { try { parseFilter(query_parameters, psc); ObjectOutputStream oos = new ObjectOutputStream(out); oos.writeObject(getAllObjects(psc)); } catch (... |
oos.writeObject(getAllObjects(psc)); | oos.writeObject(ret); | public void execute(PrintStream out, HttpInput query_parameters, PlanServiceContext psc, PlanServiceUtilities psu) throws Exception { try { parseFilter(query_parameters, psc); ObjectOutputStream oos = new ObjectOutputStream(out); oos.writeObject(getAllObjects(psc)); } catch (... |
if (o instanceof Task || o instanceof HappinessChangeEvent || o instanceof Asset || o instanceof PlanElement) return true; return false; | return (o instanceof Task || o instanceof PlanElement || o instanceof Asset || o instanceof HappinessChangeEvent); | private static UnaryPredicate getPred() { return new UnaryPredicate() { public boolean execute(Object o) { if (o instanceof Task || o instanceof HappinessChangeEvent || o instanceof Asset || o instanceof PlanElement) return true; return false; } }; } |
if (o instanceof Task || o instanceof HappinessChangeEvent || o instanceof Asset || o instanceof PlanElement) return true; return false; | return (o instanceof Task || o instanceof PlanElement || o instanceof Asset || o instanceof HappinessChangeEvent); | public boolean execute(Object o) { if (o instanceof Task || o instanceof HappinessChangeEvent || o instanceof Asset || o instanceof PlanElement) return true; return false; } |
log = CSMART.createLogger("org.cougaar.tools.csmart.runtime.binder"); | public ObjectReleaseQueue(double objectsPerSecond) { if (objectsPerSecond < 0.0) { throw new IllegalArgumentException( "Expecting maximum release rate be >= 0.0 per-second"); } this.objectsPerMS = (objectsPerSecond / 1000.0); // begin with the base-line 100% capacity capChart = CapacityCh... | |
if (canSetValueForBinding("droppedObject")) { WOComponent page = context.page(); Object droppedObject = AjaxDraggable.draggableObjectForPage(page, droppedDraggableID); setValueForBinding(droppedObject, "droppedObject"); } | } if (canSetValueForBinding("droppedObject")) { WOComponent page = context.page(); Object droppedObject = AjaxDraggable.draggableObjectForPage(page, droppedDraggableID); setValueForBinding(droppedObject, "droppedObject"); | protected WOActionResults handleRequest(WORequest request, WOContext context) { String droppedDraggableID = request.stringFormValueForKey(_draggableIDKeyName); if (canSetValueForBinding("droppedDraggableID")) { setValueForBinding(droppedDraggableID, "droppedDraggableID"); if (canSetValueForBinding("dr... |
onDropBuffer.append("var data = '" + _draggableIDKeyName + "=' + element.draggableID;"); | onDropBuffer.append("var data = '" + _draggableIDKeyName + "=' + element.getAttribute(\'draggableID\');"); | public String onDrop() { StringBuffer onDropBuffer = new StringBuffer(); onDropBuffer.append("function(element, droppableElement) {"); // onComplete:ajaxResponse String droppableElementID = (String) valueForBinding("id"); onDropBuffer.append("if (droppableElement.id == '" + droppableElementID + "') {")... |
boolean result = false; PDbBase pdbb = null; try { propAssemblyId.setVisible(true); pdbb = new PDbBase(); pdbb.insureLibRecipe(this); result = true; } catch (Exception sqle) { if(log.isErrorEnabled()) { log.error("Exception", sqle); } result = false; } finally { try { if (pdbb != null) pdbb.close(); } catch (Exception ... | propAssemblyId.setVisible(true); ret &= super.saveToDatabase(); | public boolean saveToDatabase() { // First, save the new recipe assembly. saveInProgress = true; if(log.isInfoEnabled()) { log.info("saveToDatabase recipe (" + getRecipeName() + ") with asb: " + getAssemblyId() + " and old Assembly: " + oldAssemblyId); } // TODO: // Should I notice when I need ... |
modified = false; saveInProgress = false; fireModification(new ModificationEvent(this, RECIPE_SAVED)); | public boolean saveToDatabase() { // First, save the new recipe assembly. saveInProgress = true; if(log.isInfoEnabled()) { log.info("saveToDatabase recipe (" + getRecipeName() + ") with asb: " + getAssemblyId() + " and old Assembly: " + oldAssemblyId); } // TODO: // Should I notice when I need ... | |
ShortBuffer a = (ShortBuffer) obj; | ShortBuffer other = (ShortBuffer) obj; | public int compareTo (Object obj) { ShortBuffer a = (ShortBuffer) obj; if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ()) { return 1; } int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) ... |
if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ()) | int num = Math.min(remaining(), other.remaining()); int pos_this = position(); int pos_other = other.position(); for (int count = 0; count < num; count++) | public int compareTo (Object obj) { ShortBuffer a = (ShortBuffer) obj; if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ()) { return 1; } int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) ... |
return 1; | short a = get(pos_this++); short b = other.get(pos_other++); if (a == b) continue; if (a < b) return -1; return 1; | public int compareTo (Object obj) { ShortBuffer a = (ShortBuffer) obj; if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ()) { return 1; } int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) ... |
int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) { int t = (int) (get (i1) - a.get (i2)); if (t != 0) { return (int) t; } } return 0; | return remaining() - other.remaining(); | public int compareTo (Object obj) { ShortBuffer a = (ShortBuffer) obj; if (a.remaining () != remaining ()) return 1; if (! hasArray () || ! a.hasArray ()) { return 1; } int r = remaining (); int i1 = position (); int i2 = a.position (); for (int i = 0; i < r; i++) ... |
if(false) { _indexDict.removeAllObjects(); _model = null; _colorDict = null; } | initializeDimensionArrayFromBindings(); | public void appendToResponse(WOResponse r, WOContext c) { if(false) { _indexDict.removeAllObjects(); _model = null; _colorDict = null; } super.appendToResponse(r, c); } |
_initializedDimensionArrayFromBindings = true; | public void initializeDimensionArrayFromBindings() { if(!_initializedDimensionArrayFromBindings) { _initializedDimensionArrayFromBindings = true; if(model() != null) { initializeDimensionArrayFromBindings("H"); initializeDimensionArrayFromBindings("V"); ... | |
_initializedDimensionArrayFromBindings = true; | public void initializeDimensionArrayFromBindings() { if(!_initializedDimensionArrayFromBindings) { _initializedDimensionArrayFromBindings = true; if(model() != null) { initializeDimensionArrayFromBindings("H"); initializeDimensionArrayFromBindings("V"); ... | |
public void rebuildModel(NSNotification not) { _currentZCriteria.removeAllObjects(); log.info("Rebuild model"); | public void rebuildModel(NSNotification notification) { if(_model == notification.object() || notification.object() == null) { _currentZCriteria.removeAllObjects(); _initializedDimensionArrayFromBindings = false; _model = null; log.info("Rebuild model"); } | public void rebuildModel(NSNotification not) { _currentZCriteria.removeAllObjects(); //_initializedDimensionArrayFromBindings = false; //initializeDimensionArrayFromBindings(); log.info("Rebuild model"); } |
src.put (toPut); | put (toPut); | public ShortBuffer put (ShortBuffer src) { if (src == this) throw new IllegalArgumentException (); checkForOverflow(src.remaining ()); if (src.remaining () > 0) { short[] toPut = new short [src.remaining ()]; src.get (toPut); src.put (toPut); } return this; } |
return Readline.readline(prompt.toString()); | return Readline.readline(prompt==null ? "" : prompt.toString()); | public String raw_input(PyObject prompt) { try { return Readline.readline(prompt.toString()); } catch (java.io.EOFException eofe) { throw new PyException(Py.EOFError); } catch (java.io.UnsupportedEncodingException e) { throw new PyException(); } } |
return _checkHashCodesDefault || true; | return _checkHashCodesDefault; | private boolean checkHashCodes(WOComponent wocomponent, WOContext wocontext) { if(_checkHashCodes != null) { return _checkHashCodes.booleanValueInComponent(wocomponent); } return _checkHashCodesDefault || true; } |
JSplitPane hostPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); | JSplitPane hostPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); | private void initDisplay() { // host split pane contains host tree and // the bottom split pane which contains the node and agent trees JSplitPane hostPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); // tree of hosts and assigned nodes and agents DefaultMutableTreeNode root = new DefaultMutable... |
JSplitPane bottomPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); | JSplitPane bottomPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); | private void initDisplay() { // host split pane contains host tree and // the bottom split pane which contains the node and agent trees JSplitPane hostPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); // tree of hosts and assigned nodes and agents DefaultMutableTreeNode root = new DefaultMutable... |
hostPane.setDividerLocation(100); bottomPane.setDividerLocation(100); | hostPane.setDividerLocation(220); bottomPane.setDividerLocation(220); | private void initDisplay() { // host split pane contains host tree and // the bottom split pane which contains the node and agent trees JSplitPane hostPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); // tree of hosts and assigned nodes and agents DefaultMutableTreeNode root = new DefaultMutable... |
System.out.println("Cloning experiment: " + experimentName); | private boolean cloneExperiment() { // ask user to confirm cloning experiment// int result = JOptionPane.showConfirmDialog(this,// "Modify Experiment",// "Modify Experiment?",// ... | |
throw new SocketException("MulticastSocket.getInterface - not yet implemented"); | return (InetAddress) impl.getOption(SocketOptions.IP_MULTICAST_IF); | public InetAddress getInterface() throws SocketException { // FIXME: TODO - MulticastSocket.getInterface throw new SocketException("MulticastSocket.getInterface - not yet implemented"); } |
if (! mcastaddr.isMulticastAddress()) throw new IOException("Not a Multicast address"); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkMulticast(mcastaddr); | public void joinGroup(InetAddress mcastaddr) throws IOException { impl.join(mcastaddr); } | |
if (! mcastaddr.isMulticastAddress()) throw new IOException("Not a Multicast address"); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkMulticast(mcastaddr); | public void leaveGroup(InetAddress mcastaddr) throws IOException { impl.leave(mcastaddr); } | |
public void send(DatagramPacket p, byte ttl) throws IOException | public synchronized void send(DatagramPacket p, byte ttl) throws IOException | public void send(DatagramPacket p, byte ttl) throws IOException { // FIXME: use ttl instead of getTTL() for time to live. impl.send(p); } |
SecurityManager s = System.getSecurityManager(); if (s != null) { InetAddress addr = p.getAddress(); if (addr.isMulticastAddress()) s.checkMulticast(addr, ttl); else s.checkConnect(addr.getHostAddress(), p.getPort()); } int oldttl = impl.getTimeToLive(); impl.setTimeToLive(((int) ttl) & 0xFF); | public void send(DatagramPacket p, byte ttl) throws IOException { // FIXME: use ttl instead of getTTL() for time to live. impl.send(p); } | |
impl.setTimeToLive(oldttl); | public void send(DatagramPacket p, byte ttl) throws IOException { // FIXME: use ttl instead of getTTL() for time to live. impl.send(p); } | |
throw new SocketException("MulticastSocket.setInterface - not yet implemented"); | impl.setOption(SocketOptions.IP_MULTICAST_IF, inf); | public void setInterface(InetAddress inf) throws SocketException { // FIXME: TODO - MulticastSocket.setInterface throw new SocketException("MulticastSocket.setInterface - not yet implemented"); } |
if (ttl < 0 || ttl > 255) throw new IllegalArgumentException("Invalid ttl: " + ttl); | public void setTimeToLive(int ttl) throws IOException { impl.setTimeToLive(ttl); } | |
anUnsortedArray = ERXUtilities.localInstancesOfObjects(((EOEnterpriseObject)sourceObject()).editingContext(), aDataSource.fetchObjects()); | anUnsortedArray = ERXEOControlUtilities.localInstancesOfObjects(((EOEnterpriseObject)sourceObject()).editingContext(), aDataSource.fetchObjects()); | public NSArray theList() { NSMutableArray aSortedArray; NSArray anUnsortedArray; if (_privateList()==null) { EODataSource aDataSource = _localDataSource(); // Need to make sure that the eos are in the right editingContext. anUnsortedArray = ERXUtilities.localIns... |
localArray.addObject((ec != eo.editingContext() && ERXUtilities.localInstanceOfObject(ec, eo) != null ? ERXUtilities.localInstanceOfObject(ec, eo) : eo)); | localArray.addObject((ec != eo.editingContext() && ERXEOControlUtilities.localInstanceOfObject(ec, eo) != null ? ERXEOControlUtilities.localInstanceOfObject(ec, eo) : eo)); | public NSArray theList() { NSMutableArray aSortedArray; NSArray anUnsortedArray; if (_privateList()==null) { EODataSource aDataSource = _localDataSource(); // Need to make sure that the eos are in the right editingContext. anUnsortedArray = ERXUtilities.localIns... |
newValues = ERXUtilities.localInstancesOfObjects(_eo.editingContext(), newValues); | newValues = ERXEOControlUtilities.localInstancesOfObjects(_eo.editingContext(), newValues); | public void updateSourceObject(NSArray newValues) { // If no selections are choosen then newValues is null. newValues = newValues != null ? newValues : NSArray.EmptyArray; String masterKey = _localRelationshipKey(); Object aSourceObject = _localSourceObject(); boolean isDictionary... |
fileList = file.listFiles(); for (int i = 0; i < fileList.length; i++) { if (fileList[i].getName().indexOf(".js") != -1) { v.addElement(fileList[i]); } | if (!file.isDirectory()) { throw new BuildException("destDir has to be a directory"); | public GenerateHTMLIndex(String jSDir, String destDir) { if (jSDir == null) { throw new BuildException("jSDir attribute can't be empty"); } if (destDir == null) { throw new BuildException("destDir can't be empty"); } if (!"/".equals(jSDir.substring(jSDir.leng... |
collectFiles(file, v); | public GenerateHTMLIndex(String jSDir, String destDir) { if (jSDir == null) { throw new BuildException("jSDir attribute can't be empty"); } if (destDir == null) { throw new BuildException("destDir can't be empty"); } if (!"/".equals(jSDir.substring(jSDir.leng... | |
fos.write(("<H2>ndice de files</H2>" + LINE_SEPARATOR).getBytes()); | fos.write(("<H2>Index</H2>" + LINE_SEPARATOR).getBytes()); | public GenerateHTMLIndex(String jSDir, String destDir) { if (jSDir == null) { throw new BuildException("jSDir attribute can't be empty"); } if (destDir == null) { throw new BuildException("destDir can't be empty"); } if (!"/".equals(jSDir.substring(jSDir.leng... |
fos.write(("<B>Nome do file</B></FONT></TD>" + LINE_SEPARATOR).getBytes()); | fos.write(("<B>Filename</B></FONT></TD>" + LINE_SEPARATOR).getBytes()); | public GenerateHTMLIndex(String jSDir, String destDir) { if (jSDir == null) { throw new BuildException("jSDir attribute can't be empty"); } if (destDir == null) { throw new BuildException("destDir can't be empty"); } if (!"/".equals(jSDir.substring(jSDir.leng... |
fos.write(("<B>Resumo do contedo</B></FONT></TD>" + LINE_SEPARATOR).getBytes()); | fos.write(("<B>Summary</B></FONT></TD>" + LINE_SEPARATOR).getBytes()); | public GenerateHTMLIndex(String jSDir, String destDir) { if (jSDir == null) { throw new BuildException("jSDir attribute can't be empty"); } if (destDir == null) { throw new BuildException("destDir can't be empty"); } if (!"/".equals(jSDir.substring(jSDir.leng... |
docGenerator = new GenerateHTMLDoc(jSDir, destDir, file.getName()); | docGenerator = new GenerateHTMLDoc(file, destDir); | public GenerateHTMLIndex(String jSDir, String destDir) { if (jSDir == null) { throw new BuildException("jSDir attribute can't be empty"); } if (destDir == null) { throw new BuildException("destDir can't be empty"); } if (!"/".equals(jSDir.substring(jSDir.leng... |
fis = new FileInputStream(jSDir + file.getName()); | fis = new FileInputStream(file); | public GenerateHTMLIndex(String jSDir, String destDir) { if (jSDir == null) { throw new BuildException("jSDir attribute can't be empty"); } if (destDir == null) { throw new BuildException("destDir can't be empty"); } if (!"/".equals(jSDir.substring(jSDir.leng... |
for (Enumeration en = ec.updatedObjects().objectEnumerator(); en.hasMoreElements();) buffer.append("\n" + toDebugString((EOEnterpriseObject)en.nextElement())); | for (Enumeration en = ec.updatedObjects().objectEnumerator(); en.hasMoreElements();) { buffer.append('\n'); buffer.append(toDebugString((EOEnterpriseObject)en.nextElement())); } | public void editingContextWillSaveChanges(EOEditingContext ec) throws Throwable { try { if (cat.isDebugEnabled()) cat.debug("EditingContextWillSaveChanges: start calling will*"); _isInWillSaveChanges=true; if (ec != null && ec.hasChanges()) {... |
for (Enumeration en = ec.insertedObjects().objectEnumerator(); en.hasMoreElements();) | for (Enumeration en = ec.insertedObjects().objectEnumerator(); en.hasMoreElements();) { buffer.append('\n'); | public void editingContextWillSaveChanges(EOEditingContext ec) throws Throwable { try { if (cat.isDebugEnabled()) cat.debug("EditingContextWillSaveChanges: start calling will*"); _isInWillSaveChanges=true; if (ec != null && ec.hasChanges()) {... |
for (Enumeration en = ec.deletedObjects().objectEnumerator(); en.hasMoreElements();) | for (Enumeration en = ec.deletedObjects().objectEnumerator(); en.hasMoreElements();) { buffer.append('\n'); | public void editingContextWillSaveChanges(EOEditingContext ec) throws Throwable { try { if (cat.isDebugEnabled()) cat.debug("EditingContextWillSaveChanges: start calling will*"); _isInWillSaveChanges=true; if (ec != null && ec.hasChanges()) {... |
} | public void editingContextWillSaveChanges(EOEditingContext ec) throws Throwable { try { if (cat.isDebugEnabled()) cat.debug("EditingContextWillSaveChanges: start calling will*"); _isInWillSaveChanges=true; if (ec != null && ec.hasChanges()) {... | |
if (log.isWarnEnabled()) log.warn("Unable to find servlets.txt!"); | if (log.isWarnEnabled()) { log.warn("Unable to find servlets.txt! Report bug 2000."); log.warn("config.path= " + System.getProperty("org.cougaar.config.path")); log.warn("Trying again with verbose on: "); cf.setVerbose(true); try { inputFile = cf.locateFile("servlets.txt"); } catch(Exception e) { log.error("Could not r... | private Vector getServletList() { Vector vec = null; ConfigFinder cf = ConfigFinder.getInstance(); File inputFile = null; try { inputFile = cf.locateFile("servlets.txt"); } catch(Exception e) { if (log.isErrorEnabled()) { log.error("Could not read servlets file.", e); } } if (vec ... |
for (int i = 0; i < confs.length; i++) { if (_xsl) { genreport(ivy, _cache, _organisation, _module, confs[i]); } if (_xml) { genxml(ivy, _cache, _organisation, _module, confs[i]); } if (_graph) { gengraph(ivy, _cache, _organisation, _module, confs[i]); } | if (_xsl) { genreport(_cache, _organisation, _module, confs); } if (_xml) { genxml(_cache, _organisation, _module, confs); } if (_graph) { gengraph(_cache, _organisation, _module, confs); | public void execute() throws BuildException { Ivy ivy = getIvyInstance(); _organisation = getProperty(_organisation, ivy, "ivy.organisation"); _module = getProperty(_module, ivy, "ivy.module"); if (_cache == null) { _cache = ivy.getDefaultCache(); } _conf... |
private void gengraph(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { | private void gengraph(File cache, String organisation, String module, String[] confs) throws IOException { | private void gengraph(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { // process the report with xslt to generate graphml File out; if (_todir != null) { out = _todir; } else { out = new File("."); } X... |
xslt.setExtension(".graphml"); xslt.setIncludes(XmlReportOutputter.getReportFileName(new ModuleId(organisation, module), conf)); | Mapper mapper = new Mapper(getProject()); xslt.addMapper(mapper); for (int i = 0; i < confs.length; i++) { String reportFileName = XmlReportOutputter.getReportFileName(new ModuleId(organisation, module), confs[i]); xslt.setIncludes(reportFileName); FileNameMapper reportMapper = new GlobPatternMapper(); reportMapper.s... | private void gengraph(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { // process the report with xslt to generate graphml File out; if (_todir != null) { out = _todir; } else { out = new File("."); } X... |
private void genreport(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { | private void genreport(File cache, String organisation, String module, String[] confs) throws IOException { | private void genreport(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { // first process the report with xslt XSLTProcess xslt = new XSLTProcess(); xslt.setTaskName(getTaskName()); xslt.setProject(getProject()); xslt.init(); ... |
xslt.setIn(new File(cache, XmlReportOutputter.getReportFileName(new ModuleId(organisation, module), conf))); File out; | Mapper mapper = new Mapper(getProject()); xslt.addMapper(mapper); for (int i = 0; i < confs.length; i++) { String reportFileName = XmlReportOutputter.getReportFileName(new ModuleId(organisation, module), confs[i]); xslt.setIncludes(reportFileName); FileNameMapper reportMapper = new GlobPatternMapper(); reportMapper.s... | private void genreport(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { // first process the report with xslt XSLTProcess xslt = new XSLTProcess(); xslt.setTaskName(getTaskName()); xslt.setProject(getProject()); xslt.init(); ... |
out = new File(_todir, IvyPatternHelper.substitute(_outputpattern, organisation, module, "", "", "", _xslext, conf)); | xslt.setDestdir(_todir); | private void genreport(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { // first process the report with xslt XSLTProcess xslt = new XSLTProcess(); xslt.setTaskName(getTaskName()); xslt.setProject(getProject()); xslt.init(); ... |
out = new File(IvyPatternHelper.substitute(_outputpattern, organisation, module, "", "", "", _xslext, conf)); | xslt.setDestdir(new File(".")); | private void genreport(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { // first process the report with xslt XSLTProcess xslt = new XSLTProcess(); xslt.setTaskName(getTaskName()); xslt.setProject(getProject()); xslt.init(); ... |
if (out.getParentFile() != null && !out.getParentFile().exists()) { out.getParentFile().mkdirs(); } else if(out.getParentFile() == null) { out = new File("./"+out.getPath()); } xslt.setOut(out); | private void genreport(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { // first process the report with xslt XSLTProcess xslt = new XSLTProcess(); xslt.setTaskName(getTaskName()); xslt.setProject(getProject()); xslt.init(); ... | |
private void genxml(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { File xml = new File(cache, XmlReportOutputter.getReportFileName(new ModuleId(organisation, module), conf)); | private void genxml(File cache, String organisation, String module, String[] confs) throws IOException { for (int i = 0; i < confs.length; i++) { File xml = new File(cache, XmlReportOutputter.getReportFileName(new ModuleId(organisation, module), confs[i])); | private void genxml(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { File xml = new File(cache, XmlReportOutputter.getReportFileName(new ModuleId(organisation, module), conf)); File out; if (_todir != null) { out = new File(_todir, IvyPattern... |
File out; if (_todir != null) { out = new File(_todir, IvyPatternHelper.substitute(_outputpattern, organisation, module, "", "", "", "xml", conf)); } else { out = new File(IvyPatternHelper.substitute(_outputpattern, organisation, module, "", "", "", "xml", conf)); | File out; if (_todir != null) { out = new File(_todir, IvyPatternHelper.substitute(_outputpattern, organisation, module, "", "", "", "xml", confs[i])); } else { out = new File(IvyPatternHelper.substitute(_outputpattern, organisation, module, "", "", "", "xml", confs[i])); } FileUtil.copy(xml, out, null); | private void genxml(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { File xml = new File(cache, XmlReportOutputter.getReportFileName(new ModuleId(organisation, module), conf)); File out; if (_todir != null) { out = new File(_todir, IvyPattern... |
FileUtil.copy(xml, out, null); | private void genxml(Ivy ivy, File cache, String organisation, String module, String conf) throws IOException { File xml = new File(cache, XmlReportOutputter.getReportFileName(new ModuleId(organisation, module), conf)); File out; if (_todir != null) { out = new File(_todir, IvyPattern... | |
log = CSMART.createLogger(this.getClass().getName()); | public void setupSubscriptions() { log = CSMART.createLogger(this.getClass().getName()); if (log.isDebugEnabled()) { log.debug("setupSubscriptions:" + this + ":Entering"); } // Load in the config file. Vector pv = getParameters() != null ? new Vector(getParameters()) : null; if(pv == null )... | |
if (getShortName().equals(data.getName())) { | if (this.getShortName().equals(data.getName())) { | public ComponentData addComponentData(ComponentData data) { if (getShortName().equals(data.getName())) { // Add the planserver plugin. GenericComponentData plugin = new GenericComponentData(); plugin.setType(ComponentData.PLUGIN); plugin.setName(planServer_name); plugin.setPa... |
start(); | EventDispatchThread(EventQueue queue) { super(); setName("AWT-EventQueue-" + dispatchThreadNum++); this.queue = queue; setPriority(NORM_PRIORITY + 1); } | |
return hasBinding("showNumber") ? ERXUtilities.booleanValue(valueForBinding("showNumber")) : true; | return hasBinding("showNumber") ? ERXValueUtilities.booleanValue(valueForBinding("showNumber")) : true; | public boolean showNumber() { return hasBinding("showNumber") ? ERXUtilities.booleanValue(valueForBinding("showNumber")) : true; //boolean result=true; //Integer showNumber=(Integer); //if (showNumber!=null && showNumber.intValue()==0) // result=false; //return result; ... |
if ((v instanceof String) ) { | try{ if (v instanceof String) scr = new Double((String)v); else scr = DRCriteria.numberForValue(v); } catch(NumberFormatException e) { | public Object score() { if (_score == null) { synchronized(this){ Object scr = null; NSArray subMcs = _masterCriteria.subCriteriaList(); DRSubMasterCriteria smc = (DRSubMasterCriteria)subMcs.objectAtIndex(0); Object rawVal = _valueDict.ob... |
} else { scr = DRCriteria.numberForValue(v); | public Object score() { if (_score == null) { synchronized(this){ Object scr = null; NSArray subMcs = _masterCriteria.subCriteriaList(); DRSubMasterCriteria smc = (DRSubMasterCriteria)subMcs.objectAtIndex(0); Object rawVal = _valueDict.ob... | |
"demos/data/cubemaps/CloudyHills_{0}.tga", | "demos/data/cubemaps/CloudyHills_", "tga", | public void init(GLAutoDrawable drawable) { water.destroy(); water.initialize("demos/data/images/nvfixed.tga", "demos/data/images/nvspin.tga", "demos/data/images/droplet.tga", "demos/data/cubemaps/CloudyHills_{0}.tga", drawable);... |
viewer.detach(); | public void shutdownDemo() { ManipManager.getManipManager().unregisterWindow(drawable); drawable.removeGLEventListener(this); super.shutdownDemo(); } | |
if (result == null) { log.error("Null target component copying from " + this.getFullName().toString(), new Throwable()); return null; } | public BaseComponent copy(BaseComponent result) { // Make sure we're copying apples into apples // The result can be a sub-class, but we want it // to at least have the same set of properties if (! (this.getClass().isAssignableFrom(result.getClass()))) return null; Iterator iter = getSortedLocalPr... | |
return parseObject(filteredString); | return super.parseObject(filteredString); | public Object parseObject(String aString) throws java.text.ParseException { char[] chars = aString.toCharArray(); char[] filteredChars = new char[chars.length]; String ignoredChars = "$%,"; int count = 0; for (int i = 0; i < chars.length; i++) { if (ignoredChars.indexOf... |
organizer.generateSocietyName(society.getSocietyName()); | organizer.generateSocietyName(society.getSocietyName(), false); | protected void runBuilder(ModifiableComponent cc, boolean alwaysNew) { // note that cc is guaranteed non-null when this is called ModifiableComponent originalComponent = null; Experiment experiment = null; if (cc instanceof Experiment) { experiment = (Experiment)cc; // c... |
organizer.generateRecipeName(recipe.getRecipeName()); | organizer.generateRecipeName(recipe.getRecipeName(), false); if (newName == null) return; | protected void runBuilder(ModifiableComponent cc, boolean alwaysNew) { // note that cc is guaranteed non-null when this is called ModifiableComponent originalComponent = null; Experiment experiment = null; if (cc instanceof Experiment) { experiment = (Experiment)cc; // c... |
if (ret.remove("@")) { ret.add(moduleConfiguration); | for (Iterator iter = ret.iterator(); iter.hasNext();) { String c = (String)iter.next(); Matcher matcher = SELF_FALLBACK_PATTERN.matcher(c); if (matcher.matches()) { iter.remove(); ret.add(moduleConfiguration+matcher.group(1)); break; } | public String[] getDependencyConfigurations(String moduleConfiguration) { List confs = (List)_confs.get(moduleConfiguration); List defConfs = (List)_confs.get("*"); Collection ret = new LinkedHashSet(); if (confs != null) { ret.addAll(confs); } if (defConfs != null) { ret.addAll(defConfs); } if... |
mySender.addBuddy(new AIMBuddy(_buddyName)); | if (mySender != null) { mySender.addBuddy(new AIMBuddy(_buddyName)); } | public synchronized void addBuddy(String _buddyName) { mySender.addBuddy(new AIMBuddy(_buddyName)); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.