rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
EOEnterpriseObject joinEO=ERXUtilities.createEO(entity().name(), editingContext()); | EOEnterpriseObject joinEO=ERXEOControlUtilities.createAndInsertObject(editingContext(), entity().name()); | public WOComponent selectAction() { EOEnterpriseObject _localEoToAddToRelationship = _eoToAddToRelationship != null ? EOUtilities.localInstanceOfObject(editingContext(),_eoToAddToRelationship) : null; if (_localEoToAddToRelationship != null) { // we create a join EO EOEnte... |
&& ERXUtilities.booleanValue(relationship.userInfo().objectForKey(SortedJoinRelationshipUserInfoKey))) { | && ERXValueUtilities.booleanValue(relationship.userInfo().objectForKey(SortedJoinRelationshipUserInfoKey))) { | public static NSArray joinRelationshipsForJoinEntity(EOEntity entity) { NSArray joinRelationships = null; if (entity.relationships() == null || entity.relationships().count() < 2) { throw new RuntimeException("Join entity: " + entity + " does not have any relationships!"); } else if ... |
result = result + "::" + columnTypeStringForAttribute(attribute); | String s = columnTypeStringForAttribute(attribute); if (v instanceof NSTimestamp) { NSTimestamp t = (NSTimestamp)v; String timestampString = "'"+timestampFormatter.format(t); Timestamp ts = new Timestamp(t.getTime()); String nanoString = ts.getNanos() + ""; nanoString = nanoString.substring(0, 3); timestampString += "... | public String sqlStringForValue(Object v, String kp) { String result = super.sqlStringForValue(v,kp); if(v != null && v != NSKeyValueCoding.NullValue) { EOAttribute attribute; int lastDotIdx = kp.lastIndexOf("."); if (lastDotIdx == -1) { attribute = enti... |
me = getBindingSite().getAgentIdentifier(); | me = MetricsPlugin.this.getBindingSite().getAgentIdentifier(); | public MessageWatcher() { // me = getAgentIdentifier(); me = getBindingSite().getAgentIdentifier(); } |
addScriptResourceInHead(context, response, "wonder.js"); | protected void addRequiredWebResources(WOResponse response, WOContext context) { addScriptResourceInHead(context, response, "prototype.js"); addScriptResourceInHead(context, response, "scriptaculous.js"); } | |
properties.setProperty(Experiment.EXPERIMENT_ID, | if (experiment.getTrialID() != null) properties.setProperty(Experiment.EXPERIMENT_ID, | private void prepareToCreateNodes() { HostComponent[] hostsToRunOn = experiment.getHostComponents(); for (int i = 0; i < hostsToRunOn.length; i++) { String hostName = hostsToRunOn[i].getShortName(); NodeComponent[] nodesToRun = hostsToRunOn[i].getNodes(); for (int j = 0; j < nodesToRun.length; j+... |
if (properties.getProperty("org.cougaar.core.persistence.clear") | if (properties.getProperty(Experiment.PERSIST_CLEAR) | private void prepareToCreateNodes() { HostComponent[] hostsToRunOn = experiment.getHostComponents(); for (int i = 0; i < hostsToRunOn.length; i++) { String hostName = hostsToRunOn[i].getShortName(); NodeComponent[] nodesToRun = hostsToRunOn[i].getNodes(); for (int j = 0; j < nodesToRun.length; j+... |
properties.setProperty("org.cougaar.core.persistence.clear", | properties.setProperty(Experiment.PERSIST_CLEAR, | private void prepareToCreateNodes() { HostComponent[] hostsToRunOn = experiment.getHostComponents(); for (int i = 0; i < hostsToRunOn.length; i++) { String hostName = hostsToRunOn[i].getShortName(); NodeComponent[] nodesToRun = hostsToRunOn[i].getNodes(); for (int j = 0; j < nodesToRun.length; j+... |
properties.remove("org.cougaar.core.persistence.clear"); | properties.remove(Experiment.PERSIST_CLEAR); | public RemoteProcess restartNode(NodeComponent nodeComponent) { boolean doRun = false; synchronized (runningNodes) { if (oldNodes.size() + runningNodes.size() == 1) doRun = true; } // end synchronized if (doRun) { runButton_actionPerformed(); return null; // it doesn't matter what we... |
return Show.valueOf(element.elementText("show")); | String show = element.elementText("show"); if (show == null) { return null; } else { return Show.valueOf(show); } | public Show getShow() { return Show.valueOf(element.elementText("show")); } |
log = CSMART.createLogger("org.cougaar.tools.csmart.recipe"); | createLogger(); | public RecipeBase (String name){ super(name); log = CSMART.createLogger("org.cougaar.tools.csmart.recipe"); } |
setNamePrefix(classes[findPackageProtected(classes)].getName()); | setNamePrefix(classes[ReflectUtils.findPackageProtected(classes)].getName()); | public Mixin create() { if (classes == null) { if (asBeans) { classes = ReflectUtils.getClasses(delegates); route = null; } else { Route r = route(delegates); classes = r.classes; ... |
hostConfigurationBuilder = new HostConfigurationBuilder(experiment); | hostConfigurationBuilder = new HostConfigurationBuilder(experiment, csmart); | public ExperimentBuilder(CSMART csmart, Experiment experiment) { this.experiment = experiment; isEditable = experiment.isEditable(); isRunnable = experiment.isRunnable(); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); JMenu fileMenu = new JMenu(FILE_MENU); for (int i = 0; ... |
if (!experiment.isInDatabase()) return; | public void save() { if (modified) saveHelper(); else JOptionPane.showMessageDialog(this, "No modifications were made."); } | |
public void saveToDb(PopulateDb.ConflictHandler ch) { | public void saveToDb(DBConflictHandler ch) { | public void saveToDb(PopulateDb.ConflictHandler ch) { try { updateNameServerHostName(); // Be sure this is up-to-date Set writtenNodes = new HashSet(); List components = getComponents(); NodeComponent[] nodesToWrite = getNodes(); ComponentData theSoc = new GenericComponentData(); theS... |
_mrid = ModuleRevisionId.newInstance(_organisation, _module, _revision, ExtendableItemHelper.getExtraAttributes(attributes, new String[] {"position", "name", "default", "evicted", "error", "pubdate"})); | _mrid = ModuleRevisionId.newInstance(_organisation, _module, _revision, ExtendableItemHelper.getExtraAttributes(attributes, new String[] {"position", "name", "default", "evicted", "error", "pubdate", "conf", "searched", "downloaded", "resolver", "artresolver", "status"})); | public void parse() throws Exception { SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser(); saxParser.parse(_report, new DefaultHandler() { private String _organisation; private String _module; private String _revision; ... |
_mrid = ModuleRevisionId.newInstance(_organisation, _module, _revision, ExtendableItemHelper.getExtraAttributes(attributes, new String[] {"position", "name", "default", "evicted", "error", "pubdate"})); | _mrid = ModuleRevisionId.newInstance(_organisation, _module, _revision, ExtendableItemHelper.getExtraAttributes(attributes, new String[] {"position", "name", "default", "evicted", "error", "pubdate", "conf", "searched", "downloaded", "resolver", "artresolver", "status"})); | public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if ("module".equals(qName)) { _organisation = attributes.getValue("organisation"); _module = attributes.getValue("name"); ... |
setPropertyVisible(prop, false); | boolean wasVisible = isPropertyVisible(prop); if (!wasVisible) return; Object oldValue = getMyProperties().remove(prop.getName()); if (oldValue == null) { if (log.isErrorEnabled()) log.error("", new Throwable("Attempting to remove non-local property: " + prop.getName())); return; } | public void removeProperty(Property prop) { setPropertyVisible(prop, false); firePropertyRemoved(prop); } |
; | public String toString () { StringBuffer sbuf = new StringBuffer (); sbuf.append ("<").append(getClass ().getName ()).append (" "); if (message == null) { sbuf.append("No mime message is set."); } else { try { sbuf.append(allRecipientsAsString ()); ... | |
} else if (componentType.equals(ComponentData.HOST) || componentType.equals(ComponentData.NODE)) { | } else if (componentType.equals(ComponentData.NODE)) { | public String getComponentAlibId(ComponentData data) { // This relies on being able to find the ancestors // for plugins and binders, which you cant always do // FIXME!! if (data == null) return null; String result = data.getAlibID(); if (result == null) { String componentType = data.getType();... |
_secretDESKey = null; | private static Key secretDESKey() { _secretDESKey = null; if(_secretDESKey == null){ InputStream is = null; if(_secretKeyPath != null) { try { is = new FileInputStream(new File(_secretKeyPath)); } catch (FileNotFoundException e) { ... | |
public final void init(int opmode, Key key) throws InvalidKeyException | public final void init(int opmode, Certificate certificate) throws InvalidKeyException | public final void init(int opmode, Key key) throws InvalidKeyException { state = opmode; if (cipherSpi != null) { cipherSpi.engineInit(opmode, key, new SecureRandom()); } } |
state = opmode; if (cipherSpi != null) { cipherSpi.engineInit(opmode, key, new SecureRandom()); } | init(opmode, certificate, new SecureRandom()); | public final void init(int opmode, Key key) throws InvalidKeyException { state = opmode; if (cipherSpi != null) { cipherSpi.engineInit(opmode, key, new SecureRandom()); } } |
response.appendContentString("function " + id + "Update() { new Ajax.Updater('" + id + "', $(" + id + ").getAttribute('updateUrl'), "); | response.appendContentString(id + "Update = function() { new Ajax.Updater('" + id + "', $(" + id + ").getAttribute('updateUrl'), "); | public void appendToResponse(WOResponse response, WOContext context) { WOComponent component = context.component(); String elementName = (String) valueForBinding("elementName", "span", component); String id = containerID(context); response.appendContentString("<" + elementName + " "); ... |
soc = (SocietyDBComponent)organizer.getSociety(societyName); if (soc == null) { | SocietyComponent sc = organizer.getSociety(societyName); if (sc != null && (sc instanceof SocietyDBComponent)) soc = (SocietyDBComponent)sc; else { | public Experiment createExperiment(String originalExperimentName, String experimentName, String experimentId, String trialId) { createLogger(); // get assembly ids for trial ArrayList assemblyIds = get... |
} else { soc = null; | public Experiment createExperiment(String originalExperimentName, String experimentName, String experimentId, String trialId) { createLogger(); // get assembly ids for trial ArrayList assemblyIds = get... | |
if( model.size() >= max_size ){ model.removeElementAt(0); } | public void add(String s){ if( model.size() >= max_size ){ model.removeElementAt(0); } model.addElement(s); } | |
protected BlissedException(String msg) | protected BlissedException() | protected BlissedException(String msg) { super( msg ); } |
super( msg ); | protected BlissedException(String msg) { super( msg ); } | |
isVisible(construct, clazz.getPackage().getName()))) { | isVisible( construct, clazz.getPackage() ))) { | /* package */ EnhancerGenerator(String className, Class clazz, Class[] interfaces, MethodInterceptor ih, ClassLoader loader, Method wreplace, boolean delegating) { super(className, clazz, loader); this.interfaces = interfaces; this.ih = ih; this.wreplac... |
String packageName = getSuperclass().getPackage().getName(); | Package packageName = getSuperclass().getPackage(); | protected void generate() throws NoSuchMethodException { if (wreplace == null) { wreplace = Enhancer.InternalReplace.class.getMethod("writeReplace", OBJECT_CLASS_ARRAY); } declare_interface(Factory.class); declare_field(Modifier.PRIVATE, MethodInterceptor.class, INTERC... |
if (getFieldInfo(name) != null) { | if (fieldInfo.get(name) != null) { | public void declare_field(int modifiers, Class type, String name) { if (getFieldInfo(name) != null) { throw new IllegalArgumentException("Field \"" + name + "\" already exists"); } backend.declare_field(modifiers, type, name); fieldInfo.put(name, new FieldInfo(Modifier.isStati... |
public void store_local(Local local) { store_local(local.getType(), local.getIndex()); | private void store_local(Class t, int pos) { if (t != null && t.isPrimitive()) { if (t.equals(Long.TYPE)) { backend.emit_var(Opcodes.LSTORE, pos); } else if (t.equals(Double.TYPE)) { backend.emit_var(Opcodes.DSTORE, pos); } else if (t.equals(Float.TYPE)) { backend.emit_var(Opcodes.FSTORE, pos); } else { backend.emit_va... | public void store_local(Local local) { store_local(local.getType(), local.getIndex()); } |
public void newarray(Class type) { if (type.isPrimitive()) { backend.emit_int(Opcodes.NEWARRAY, Opcodes.newarray(type)); } else { backend.emit_type(Opcodes.ANEWARRAY, type.getName()); } | public void newarray() { newarray(Object.class); | public void newarray(Class type) { if (type.isPrimitive()) { backend.emit_int(Opcodes.NEWARRAY, Opcodes.newarray(type)); } else { backend.emit_type(Opcodes.ANEWARRAY, type.getName()); } } |
public void load_local(Local local) { load_local(local.getType(), local.getIndex()); | private void load_local(Class t, int pos) { if (t != null && t.isPrimitive()) { if (t.equals(Long.TYPE)) { backend.emit_var(Opcodes.LLOAD, pos); } else if (t.equals(Double.TYPE)) { backend.emit_var(Opcodes.DLOAD, pos); } else if (t.equals(Float.TYPE)) { backend.emit_var(Opcodes.FLOAD, pos); } else { backend.emit_var(Op... | public void load_local(Local local) { load_local(local.getType(), local.getIndex()); } |
public void invoke_constructor_this(Class[] parameterTypes) { invoke_constructor(className, parameterTypes); | public void invoke_constructor_this() { invoke_constructor_this(Constants.TYPES_EMPTY); | public void invoke_constructor_this(Class[] parameterTypes) { invoke_constructor(className, parameterTypes); } |
public void super_invoke() { | public void super_invoke(Method method) { | public void super_invoke() { backend.emit_invoke(Opcodes.INVOKESPECIAL, superclass.getName(), methodName, returnType, parameterTypes); } |
methodName, returnType, parameterTypes); | method.getName(), method.getReturnType(), method.getParameterTypes()); | public void super_invoke() { backend.emit_invoke(Opcodes.INVOKESPECIAL, superclass.getName(), methodName, returnType, parameterTypes); } |
} else | traceAction.setEnabled(true); } else { | private void updateMenuItems(String state) { if (state.startsWith("NODE_STATE")) { if (state.equals(model.STATE_RUNNING)) { stopAction.setEnabled(true); } else stopAction.setEnabled(false); if (state.equals(NodeModel.STATE_STOPPED)) startAction.setEnabled(true); else ... |
if (state.equals(NodeModel.STATE_STOPPED)) | } if (state.equals(NodeModel.STATE_STOPPED)) { | private void updateMenuItems(String state) { if (state.startsWith("NODE_STATE")) { if (state.equals(model.STATE_RUNNING)) { stopAction.setEnabled(true); } else stopAction.setEnabled(false); if (state.equals(NodeModel.STATE_STOPPED)) startAction.setEnabled(true); else ... |
else | traceAction.setEnabled(false); } else { | private void updateMenuItems(String state) { if (state.startsWith("NODE_STATE")) { if (state.equals(model.STATE_RUNNING)) { stopAction.setEnabled(true); } else stopAction.setEnabled(false); if (state.equals(NodeModel.STATE_STOPPED)) startAction.setEnabled(true); else ... |
} | private void updateMenuItems(String state) { if (state.startsWith("NODE_STATE")) { if (state.equals(model.STATE_RUNNING)) { stopAction.setEnabled(true); } else stopAction.setEnabled(false); if (state.equals(NodeModel.STATE_STOPPED)) startAction.setEnabled(true); else ... | |
DoubleBuffer a = (DoubleBuffer) obj; | DoubleBuffer other = (DoubleBuffer) obj; | public int compareTo (Object obj) { DoubleBuffer a = (DoubleBuffer) 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) { DoubleBuffer a = (DoubleBuffer) 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; | double a = get(pos_this++); double b = other.get(pos_other++); if (a == b) continue; if (a < b) return -1; return 1; | public int compareTo (Object obj) { DoubleBuffer a = (DoubleBuffer) 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) { DoubleBuffer a = (DoubleBuffer) 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 dictionary.objectForKey(key); | return valueForKey(key); | public Object objectForKey(String key) { return dictionary.objectForKey(key); } |
log.info("Fetching primary keys."); | log.debug("Fetching primary keys."); | protected void fetchPrimaryKeys() { if (!hasFetchedPrimaryKeys()) { if (editingContext() == null) throw new RuntimeException("Attempting to fetch the primary keys for a null editingContext"); EOEntity entity = EOUtilities.entityNamed(editingContext(), fetchSpecification.e... |
this.include = (String)parameters.getParameter("include-if", "/"); this.exclude = (String)parameters.getParameter("exclude-if", null); | public void setup(SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws ProcessingException, SAXException, IOException { super.setup(resolver, objectModel, source, parameters); this.include = (String)parameters.getParameter("include", "/"); thi... | |
log = CSMART.createLogger("org.cougaar.tools.csmart.runtime.ldm.event"); | createLogger(); | public RealWorldEventImpl (UID uid) { log = CSMART.createLogger("org.cougaar.tools.csmart.runtime.ldm.event"); setUID(uid); } |
myUdhElements = new SmsUdhElement[theUdhElements.length]; | if (theUdhElements!=null) { myUdhElements = new SmsUdhElement[theUdhElements.length]; | public void setUserDataHeaders(SmsUdhElement[] theUdhElements) { myUdhElements = new SmsUdhElement[theUdhElements.length]; System.arraycopy(theUdhElements, 0, myUdhElements, 0, theUdhElements.length); } |
System.arraycopy(theUdhElements, 0, myUdhElements, 0, theUdhElements.length); | System.arraycopy(theUdhElements, 0, myUdhElements, 0, theUdhElements.length); } else { myUdhElements=null; } | public void setUserDataHeaders(SmsUdhElement[] theUdhElements) { myUdhElements = new SmsUdhElement[theUdhElements.length]; System.arraycopy(theUdhElements, 0, myUdhElements, 0, theUdhElements.length); } |
try { dbp = DBProperties.readQueryFile(DBUtils.DATABASE, DBUtils.QUERY_FILE); database = dbp.getProperty("database"); username = dbp.getProperty("username"); password = dbp.getProperty("password"); assemblyMatch = new StringBuffer(); assemblyMatch.append("in ("); Iterator iter = assemblyID.iterator(); boolean first = t... | assemblyMatch = new StringBuffer(); assemblyMatch.append("in ("); Iterator iter = assemblyID.iterator(); boolean first = true; while (iter.hasNext()) { String val = (String)iter.next(); if (first) { first = false; } else { assemblyMatch.append(", "); | public void initProperties() { Map substitutions = new HashMap(); StringBuffer assemblyMatch = null; if (assemblyID.size() != 0) { try { dbp = DBProperties.readQueryFile(DBUtils.DATABASE, DBUtils.QUERY_FILE); database = dbp.getProperty("database"); username = dbp.getProperty("username"); password = dbp.... |
assemblyMatch.append(")"); | assemblyMatch.append("'"); assemblyMatch.append(val); assemblyMatch.append("'"); } assemblyMatch.append(")"); | public void initProperties() { Map substitutions = new HashMap(); StringBuffer assemblyMatch = null; if (assemblyID.size() != 0) { try { dbp = DBProperties.readQueryFile(DBUtils.DATABASE, DBUtils.QUERY_FILE); database = dbp.getProperty("database"); username = dbp.getProperty("username"); password = dbp.... |
substitutions.put(":assemblyMatch", assemblyMatch.toString()); substitutions.put(":insertion_point", "Node.AgentManager.Agent"); } catch(IOException e) { throw new RuntimeException("Error: " + e); } | substitutions.put(":assemblyMatch", assemblyMatch.toString()); substitutions.put(":insertion_point", "Node.AgentManager.Agent"); | public void initProperties() { Map substitutions = new HashMap(); StringBuffer assemblyMatch = null; if (assemblyID.size() != 0) { try { dbp = DBProperties.readQueryFile(DBUtils.DATABASE, DBUtils.QUERY_FILE); database = dbp.getProperty("database"); username = dbp.getProperty("username"); password = dbp.... |
Connection conn = DBConnectionPool.getConnection(database, username, password); | Connection conn = DBUtils.getConnection(); | public void initProperties() { Map substitutions = new HashMap(); StringBuffer assemblyMatch = null; if (assemblyID.size() != 0) { try { dbp = DBProperties.readQueryFile(DBUtils.DATABASE, DBUtils.QUERY_FILE); database = dbp.getProperty("database"); username = dbp.getProperty("username"); password = dbp.... |
String query = dbp.getQuery(QUERY_AGENT_NAMES, substitutions); | String query = DBUtils.getQuery(QUERY_AGENT_NAMES, substitutions); | public void initProperties() { Map substitutions = new HashMap(); StringBuffer assemblyMatch = null; if (assemblyID.size() != 0) { try { dbp = DBProperties.readQueryFile(DBUtils.DATABASE, DBUtils.QUERY_FILE); database = dbp.getProperty("database"); username = dbp.getProperty("username"); password = dbp.... |
public CMTAgent(String name, List assemblyID) { super(name); this.name = name; this.assemblyID = assemblyID; | public CMTAgent() { this("Name", new ArrayList()); | public CMTAgent(String name, List assemblyID) { super(name); this.name = name; this.assemblyID = assemblyID; } |
return new StringBuffer(c).append(super.sqlStringForValue(v,kp)).append("'::").append(s).toString(); | return new StringBuffer(c).append(super.sqlStringForValue(v,kp)).append(c).append("::").append(s).toString(); | public String sqlStringForValue(Object v, String kp) { if(disableTypeCasting()) { return super.sqlStringForValue(v,kp); } EOAttribute attribute; int lastDotIdx = kp.lastIndexOf("."); if (lastDotIdx == -1) { attribute = entity().attributeNamed(kp); } el... |
Set returnQ = new HashSet(); if (popDBQueries == null) { try { popDBQueries = new HashSet(); for (Iterator i = DBProperties.readQueryFile(PDbBase.QUERY_FILE).keySet().iterator(); i.hasNext(); ) { String s = i.next().toString(); if (s.startsWith("recipeQuery")) popDBQueries.add(new StringRange(s)); } } catch (IOExcep... | private static Set getAvailableQueries() { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.recipe.RecipeQueryProperty"); Set returnQ = new HashSet(); // list to return // Read PopDB for recipe queries exactly once if (popDBQueries == null) { try { popDBQueries = new HashSet(); ... | |
if (newMod == rQFileLastMod) { if (log.isDebugEnabled()) { log.debug("Not re-reading unmodified " + RecipeComponent.RECIPE_QUERY_FILE); | if (availQueries == null || newMod != rQFileLastMod) { availQueries = new HashSet(); rQFileLastMod = 0l; DBProperties dbp = null; try { dbp = DBProperties.readQueryFile(PDbBase.QUERY_FILE); } catch (IOException ioe) { if (log.isDebugEnabled()) { log.debug("Couldn't read " + PDbBase.QUERY_FILE); } | private static Set getAvailableQueries() { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.recipe.RecipeQueryProperty"); Set returnQ = new HashSet(); // list to return // Read PopDB for recipe queries exactly once if (popDBQueries == null) { try { popDBQueries = new HashSet(); ... |
if (recipeQQueries != null) returnQ.addAll(recipeQQueries); return returnQ; } | private static Set getAvailableQueries() { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.recipe.RecipeQueryProperty"); Set returnQ = new HashSet(); // list to return // Read PopDB for recipe queries exactly once if (popDBQueries == null) { try { popDBQueries = new HashSet(); ... | |
if (recipeQQueries == null) recipeQQueries = new HashSet(); else recipeQQueries.clear(); try { DBProperties dbp = DBProperties.readQueryFile(RecipeComponent.RECIPE_QUERY_FILE); dbp.addQueryFile(RecipeComponent.RECIPE_QUERY_FILE); | try { dbp.addQueryFile(RecipeComponent.RECIPE_QUERY_FILE); rQFileLastMod = newMod; } catch (IOException e) { if (log.isDebugEnabled()) { log.debug("No " + RecipeComponent.RECIPE_QUERY_FILE + " file found."); } } | private static Set getAvailableQueries() { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.recipe.RecipeQueryProperty"); Set returnQ = new HashSet(); // list to return // Read PopDB for recipe queries exactly once if (popDBQueries == null) { try { popDBQueries = new HashSet(); ... |
rQFileLastMod = newMod; | private static Set getAvailableQueries() { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.recipe.RecipeQueryProperty"); Set returnQ = new HashSet(); // list to return // Read PopDB for recipe queries exactly once if (popDBQueries == null) { try { popDBQueries = new HashSet(); ... | |
if (! recipeQQueries.contains(new StringRange(s))) recipeQQueries.add(new StringRange(s)); | StringRange sr = new StringRange(s); if (! availQueries.contains(sr)) availQueries.add(sr); | private static Set getAvailableQueries() { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.recipe.RecipeQueryProperty"); Set returnQ = new HashSet(); // list to return // Read PopDB for recipe queries exactly once if (popDBQueries == null) { try { popDBQueries = new HashSet(); ... |
} } catch (FileNotFoundException e) { if (log.isDebugEnabled()) { log.debug("No " + RecipeComponent.RECIPE_QUERY_FILE + " to parse."); } } catch (IOException ioe) { if(log.isErrorEnabled()) { log.error("Exception", ioe); } } returnQ.addAll(recipeQQueries); return returnQ; | } } return availQueries; | private static Set getAvailableQueries() { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.recipe.RecipeQueryProperty"); Set returnQ = new HashSet(); // list to return // Read PopDB for recipe queries exactly once if (popDBQueries == null) { try { popDBQueries = new HashSet(); ... |
EOEnterpriseObject eo = ERXUtilities.createEO(entityName(), ec); | EOEnterpriseObject eo = ERXEOControlUtilities.createAndInsertObject(ec,entityName()); | public EOEnterpriseObject createAndInsertObject(EOEditingContext ec) { EOEnterpriseObject eo = ERXUtilities.createEO(entityName(), ec); return eo; } |
ioe.printStackTrace(); | if(log.isErrorEnabled()) { log.error("Exception", ioe); } | private void setModifiableConfigurableComponent() { if (tree != null) configCompPanel.remove(tree); // create tree and model before adding to it // as the add methods reference the tree and model root = new DefaultMutableTreeNode("Properties"); tree = new JTree(new DefaultTreeModel(root)); if (... |
Definition(String name, Occurrence occ, ScopedDef parentScope) { | public Definition() { | Definition(String name, // the symbol name Occurrence occ, // the location of its definition ScopedDef parentScope) { // scope containing the def this(); this.definition = occ; this.parentScope = parentScope; if (name != null) { this.name = name.... |
this(); this.definition = occ; this.parentScope = parentScope; if (name != null) { this.name = name.intern(); } else { this.name = name; } setupFileNames(occ); | this.references = new JavaVector(); | Definition(String name, // the symbol name Occurrence occ, // the location of its definition ScopedDef parentScope) { // scope containing the def this(); this.definition = occ; this.parentScope = parentScope; if (name != null) { this.name = name.... |
System.out.println("db"+type+": "+dbQuery); e.printStackTrace(); | if(log.isErrorEnabled()) { log.error("db"+type+": "+dbQuery, e); } | public static int dbExecute(String dbQuery, String type, String qFile){ int count=0; try { Connection conn = DBUtils.getConnection(qFile); if (traceQueries){ System.out.println("\nStarting dbExecute at "+new Date()+"\n\n"+dbQuery); } if (execute){ try { Statement stmt = conn.createStatemen... |
if(log.isDebugEnabled()) { | if(log.isInfoEnabled()) { | static int deleteItems(String table, String column, String val, String qFile){ String dbQuery = "delete from "+ table.toUpperCase() +" where "+column+"="+val; Logger log = CSMART.createLogger("org.cougaar.tools.csmart.core.db.DBUtils"); Logger qLog = CSMART.createLogger("queries"); int count=0; try { ... |
System.out.println("query1Int: "+dbQuery); e.printStackTrace(); | if(log.isErrorEnabled()) { log.error("Exception", e); } | static Integer query1Int(String query, Map substitutions, String qFile){ String dbQuery = DBUtils.getQuery(query, substitutions, qFile); Integer res = null; try { Connection conn = DBUtils.getConnection(qFile); try { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(dbQuery... |
if(log.isDebugEnabled()) { | if(log.isInfoEnabled()) { | static SortedMap queryHT(String query, Map substitutions, String qFile){ String dbQuery = DBUtils.getQuery(query, substitutions, qFile); Logger log = CSMART.createLogger("org.cougaar.tools.csmart.core.db.DBUtils"); Connection conn = null; Map ht = new TreeMap(); try { conn = DBUtils.getConnection(... |
propNewServletArgs[servnum][0] = addProperty("New Servlet " + (servnum+1) + " arg 1", ""); | propNewServletArgs[servnum][0] = addProperty("_New Servlet " + (servnum+1) + " arg 1", ""); | private void updateNewServletArgCount(int servnum, Integer newCount) { int count = newCount.intValue(); // First remove the old ones if (propNewServletArgs != null && propNewServletArgs[servnum] != null && propNewServletArgs[servnum].length != count) { for (int i = 0; i < (propNewServletArgs[servnum]).l... |
propNewServletArgs[servnum][i] = addProperty("New Servlet " + (servnum+1) + " arg " + (i+1), ""); | propNewServletArgs[servnum][i] = addProperty("_New Servlet " + (servnum+1) + " arg " + (i+1), ""); | private void updateNewServletArgCount(int servnum, Integer newCount) { int count = newCount.intValue(); // First remove the old ones if (propNewServletArgs != null && propNewServletArgs[servnum] != null && propNewServletArgs[servnum].length != count) { for (int i = 0; i < (propNewServletArgs[servnum]).l... |
propNewServlets[i] = addProperty("Classname of servlet " + (i+1), DFLT_SERVLET_CLASS); | propNewServlets[i] = addProperty("_Classname of servlet " + (i+1), DFLT_SERVLET_CLASS); | private void updateNewServletCount(Integer newCount) { int count = newCount.intValue(); // For now delete all variable props and start fresh. // Annoying for the user, but it works. if( propNewServlets != null && count != propNewServlets.length ) { for(int i=0; i < propNewServlets.length; i++) { ... |
propNewServletNumArgs[i] = addProperty("Number of args for servlet " + (i+1), PROP_NEW_SERVLETS_ARG_COUNT_DFLT); | propNewServletNumArgs[i] = addProperty("_Number of args for servlet " + (i+1), PROP_NEW_SERVLETS_ARG_COUNT_DFLT); | private void updateNewServletCount(Integer newCount) { int count = newCount.intValue(); // For now delete all variable props and start fresh. // Annoying for the user, but it works. if( propNewServlets != null && count != propNewServlets.length ) { for(int i=0; i < propNewServlets.length; i++) { ... |
registerTag( "activity", | registerTag( "do-activity", | public BlissedTagLibrary() { registerTag( "blissed", BlissedTag.class ); registerTag( "process", ProcessTag.class ); registerTag( "state", StateTag.class ); registerTag( "transition", TransitionTag.class )... |
ObjectStoreCoordinatorSynchronizer.sharedInstance.addObjectStoreCoordinator(this); | ObjectStoreCoordinatorSynchronizer.sharedInstance(this).addObjectStoreCoordinator(this); databaseContextsForModels = new Hashtable(); EOModelGroup eomodelgroup = EOModelGroup.modelGroupForObjectStoreCoordinator(this); for (int i = 0; i < eomodelgroup.models().count(); i++) { EOModel m = (EOModel)eomodelgroup.models().... | public ObjectStoreCoordinator() { super(); ObjectStoreCoordinatorSynchronizer.sharedInstance.addObjectStoreCoordinator(this); } |
public ObjectStoreCoordinatorSynchronizer() { | private ObjectStoreCoordinatorSynchronizer() { | public ObjectStoreCoordinatorSynchronizer() { oscs = new NSMutableArray(); addObjectStoreCoordinator(EOObjectStoreCoordinator.defaultCoordinator()); } |
addObjectStoreCoordinator(EOObjectStoreCoordinator.defaultCoordinator()); | queueThread = new ProcessChangesQueue(this); new Thread(queueThread).start(); | public ObjectStoreCoordinatorSynchronizer() { oscs = new NSMutableArray(); addObjectStoreCoordinator(EOObjectStoreCoordinator.defaultCoordinator()); } |
public void addObjectStoreCoordinator(EOObjectStoreCoordinator osc) { | private void addObjectStoreCoordinator(EOObjectStoreCoordinator osc) { if (!(osc instanceof ObjectStoreCoordinator)) { throw new RuntimeException("cannot add "+osc+" because its not an instanceof ObjectStoreCoordinator"); } | public void addObjectStoreCoordinator(EOObjectStoreCoordinator osc) { oscs.addObject(osc); NSSelector sel = new NSSelector("publishChange", new Class[] { NSNotification.class } ); NSNotificationCenter.defaultCenter().addObserver( ... |
public static EODatabaseContext databaseContextForEntityNamed(String entityName, EOObjectStoreCoordinator osc) { | private static synchronized EODatabaseContext databaseContextForEntityNamed(String entityName, ObjectStoreCoordinator osc) { | public static EODatabaseContext databaseContextForEntityNamed(String entityName, EOObjectStoreCoordinator osc) { String modelName = EOModelGroup.defaultGroup().entityNamed(entityName).model().name(); EOModelGroup eomodelgroup = EOModelGroup.modelGroupForObjectStoreCoordinator(osc); ... |
EOModelGroup eomodelgroup = EOModelGroup.modelGroupForObjectStoreCoordinator(osc); EOModel eomodel = eomodelgroup.modelNamed(modelName); if(eomodel == null) { throw new EOObjectNotAvailableException("databaseContextForEntityNamed: cannot find model named " + modelName + " associated with this EOEditingContext"); } else... | Hashtable h = osc.databaseContextsForModels(); EODatabaseContext dbc = (EODatabaseContext)h.get(modelName); return dbc; | public static EODatabaseContext databaseContextForEntityNamed(String entityName, EOObjectStoreCoordinator osc) { String modelName = EOModelGroup.defaultGroup().entityNamed(entityName).model().name(); EOModelGroup eomodelgroup = EOModelGroup.modelGroupForObjectStoreCoordinator(osc); ... |
EOObjectStoreCoordinator osc = (EOObjectStoreCoordinator)n.object(); | ObjectStoreCoordinator osc = (ObjectStoreCoordinator)n.object(); | public void publishChange(NSNotification n) { NSDictionary userInfo = n.userInfo(); EOObjectStoreCoordinator osc = (EOObjectStoreCoordinator)n.object(); NSDictionary sh = snapshotsGroupedByEntity((NSArray)userInfo.objectForKey("updated"), osc); processUpdates(sh, osc)... |
processUpdates(sh, osc); | queueThread.addToUpdatesQueue(sh, osc); | public void publishChange(NSNotification n) { NSDictionary userInfo = n.userInfo(); EOObjectStoreCoordinator osc = (EOObjectStoreCoordinator)n.object(); NSDictionary sh = snapshotsGroupedByEntity((NSArray)userInfo.objectForKey("updated"), osc); processUpdates(sh, osc)... |
public static ObjectStoreCoordinatorSynchronizer sharedInstance() { return sharedInstance; } | private static ObjectStoreCoordinatorSynchronizer sharedInstance(ObjectStoreCoordinator osc) { if (!inited) { inited = true; EOObjectStoreCoordinator.setDefaultCoordinator(osc); sharedInstance.addObjectStoreCoordinator(EOObjectStoreCoordinator.defaultCoordinator()); } return sharedInstance; } | public static ObjectStoreCoordinatorSynchronizer sharedInstance() { return sharedInstance; } |
public NSDictionary snapshotsGroupedByEntity(NSArray objects, EOObjectStoreCoordinator osc) { | private NSDictionary snapshotsGroupedByEntity(NSArray objects, ObjectStoreCoordinator osc) { | public NSDictionary snapshotsGroupedByEntity(NSArray objects, EOObjectStoreCoordinator osc) { if (objects == null) return NSDictionary.EmptyDictionary; NSMutableDictionary result = new NSMutableDictionary(); Enumeration e = objects.objectEnumerator(); while (e.hasMor... |
snapshotsForEntity.addObject(dbContext.snapshotForGlobalID(globalID)); | synchronized (snapshotsForEntity) { Object o = dbContext.snapshotForGlobalID(globalID); if (o != null) { snapshotsForEntity.addObject(o); } } | public NSDictionary snapshotsGroupedByEntity(NSArray objects, EOObjectStoreCoordinator osc) { if (objects == null) return NSDictionary.EmptyDictionary; NSMutableDictionary result = new NSMutableDictionary(); Enumeration e = objects.objectEnumerator(); while (e.hasMor... |
public ERXObjectStoreCoordinatorPool() { | private ERXObjectStoreCoordinatorPool() { | public ERXObjectStoreCoordinatorPool() { maxOS = ERXProperties.intForKey("er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators"); if (maxOS == 0) //this should work like the default implementation maxOS = 1; observer = new Observer(); oscForSession = new Hash... |
public void _initObjectStores() { | private void _initObjectStores() { | public void _initObjectStores() { log.info("initializing Pool..."); objectStores = new ObjectStoreCoordinator[maxOS]; for (int i = 0; i < maxOS; i++) { objectStores[i] = new ObjectStoreCoordinator(); } log.info("initializing Pool finished"); } |
if (sessionID != null) { oscForSession.put(sessionID, os); } | public EOObjectStore currentRootObjectStore() { String sessionID = sessionID(); EOObjectStore os = null; if (sessionID != null) { os = (EOObjectStore) oscForSession.get(sessionID); } else { os = nextObjectStore(); if (sessionID != null) { o... | |
Enumeration e = localizers.objectEnumerator(); | Enumeration e = languages.objectEnumerator(); | public static ERXLocalizer localizerForLanguages(NSArray languages) { if(languages == null || languages.count() == 0) return localizerForLanguage(defaultLanguage); ERXLocalizer l = null; Enumeration e = localizers.objectEnumerator(); while(e.hasMoreElements()) { String languag... |
assertEquals( "test.process", e.getProcess().getName() ); assertEquals( "state.1", e.getStateName() ); | public void testAddState_Duplicate() throws Exception { try { State state1 = this.process.addState( "state.1", "state one" ); fail( "Should have thrown DuplicateStateException" ); } catch (DuplicateStat... | |
public Set getEdges() | public Set getEdges(Vertex vertex) | public Set getEdges() { Iterator stateIter = this.states.values().iterator(); State eachState = null; Set edges = new HashSet(); while ( stateIter.hasNext() ) { eachState = (State) stateIter.next(); edges.addAll( getEdges( eachState ) ); } ... |
Iterator stateIter = this.states.values().iterator(); State eachState = null; | public Set getEdges() { Iterator stateIter = this.states.values().iterator(); State eachState = null; Set edges = new HashSet(); while ( stateIter.hasNext() ) { eachState = (State) stateIter.next(); edges.addAll( getEdges( eachState ) ); } ... | |
while ( stateIter.hasNext() ) { eachState = (State) stateIter.next(); edges.addAll( getEdges( eachState ) ); } | edges.addAll( getInbound( vertex ) ); edges.addAll( getOutbound( vertex ) ); | public Set getEdges() { Iterator stateIter = this.states.values().iterator(); State eachState = null; Set edges = new HashSet(); while ( stateIter.hasNext() ) { eachState = (State) stateIter.next(); edges.addAll( getEdges( eachState ) ); } ... |
protected State removeState(State state) | protected boolean removeState(State state) | 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. ... |
return (State) this.states.remove( removed.getName() ); | this.states.remove( removed.getName() ); removed.clearTransitions(); return true; | 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. ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.