rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
log.error("TolerantSaver: UserInfo = "+userInfo+", exception: ", e); | public static String _save(EOEditingContext ec, boolean writeAnyWay, boolean merge) { if (log.isDebugEnabled()) log.debug("TolerantSaver: save..."); try { //if (log.isDebugEnabled()) log.debug("about to save changes..."); ec.saveChanges(); } catch(NSValidation.ValidationEx... | |
setProviderCount(); | private void changeLevels(Object prev) { int newLevels = getLevelCount(); if (newLevels < 1) throw new RuntimeException("Must have > 0 levels"); while (newLevels < getChildCount()) { removeChild(getChildCount() - 1); } if (newLevels > getChildCount()) { int[] agentCount = (int[]) getProperty(... | |
setProviderCount(); | public void finishConfiguration() { ScalabilityXLevel prevLvl = (ScalabilityXLevel) getChild(0); for (int i = 1, n = getChildCount(); i < n; i++) { ScalabilityXLevel thisLvl = (ScalabilityXLevel) getChild(i); thisLvl.setCustomers(prevLvl.getAgents()); prevLvl = thisLvl; } } | |
setLibID(cdata.getLibID()); setAlibID(cdata.getAlibID()); for (int i = 0; i < cdata.parameterCount(); i++) addParameter(cdata.getParameter(i)); | public void initProperties() { super.initProperties(); } | |
_contextDictionary = (NSDictionary)ERXWOContext.contextDictionary().objectForKey("contextDictionary"); | String key = "contextDictionary." + d2wContext().dynamicPage(); _contextDictionary = (NSDictionary)ERXWOContext.contextDictionary().objectForKey(key); | public NSDictionary contextDictionary() { if(_contextDictionary == null) { _contextDictionary = (NSDictionary)ERXWOContext.contextDictionary().objectForKey("contextDictionary"); if(_contextDictionary == null) { ERD2WContextDictionary dict = new ERD2WContextDictionary(d2wCont... |
ERXWOContext.contextDictionary().setObjectForKey(_contextDictionary, "contextDictionary"); | ERXWOContext.contextDictionary().setObjectForKey(_contextDictionary, key); | public NSDictionary contextDictionary() { if(_contextDictionary == null) { _contextDictionary = (NSDictionary)ERXWOContext.contextDictionary().objectForKey("contextDictionary"); if(_contextDictionary == null) { ERD2WContextDictionary dict = new ERD2WContextDictionary(d2wCont... |
for(Enumeration e = NSBundle.frameworkBundles().objectEnumerator(); e.hasMoreElements(); ) { | NSMutableArray bundles = NSBundle.frameworkBundles().mutableClone(); bundles.addObject(NSBundle.mainBundle()); for(Enumeration e = bundles.objectEnumerator(); e.hasMoreElements(); ) { | public ERD2WContextDictionary(String pageConfigurationName, NSArray pageKeys, NSArray componentKeys) { _pageConfiguration = pageConfigurationName; _context = ERD2WContext.newContext(); _context.setDynamicPage(_pageConfiguration); if(pageKeys == null) { _pageLevelKeys = new NSM... |
if (experiment != null) | if (experiment != null && usingExperiment) | private void createNodes() { int delay = 1; // get inter-node start delay String tmp = Parameters.findParameter("org.cougaar.tools.csmart.startdelay"); if (tmp != null) { try { delay = Integer.parseInt(tmp); } catch (NumberFormatException nfe) { } } final int interNodeStar... |
nci.outputPolicy); remoteNode = | CSMART.getNodeListenerId(), null, nci.outputPolicy); remoteNode = | private void createNodes() { int delay = 1; // get inter-node start delay String tmp = Parameters.findParameter("org.cougaar.tools.csmart.startdelay"); if (tmp != null) { try { delay = Integer.parseInt(tmp); } catch (NumberFormatException nfe) { } } final int interNodeStar... |
RemoteListenable rl = remoteNode.getRemoteListenable(); | private void createNodes() { int delay = 1; // get inter-node start delay String tmp = Parameters.findParameter("org.cougaar.tools.csmart.startdelay"); if (tmp != null) { try { delay = Integer.parseInt(tmp); } catch (NumberFormatException nfe) { } } final int interNodeStar... | |
rl.addListener(nci.listener, CSMART.getNodeListenerId()); | private void createNodes() { int delay = 1; // get inter-node start delay String tmp = Parameters.findParameter("org.cougaar.tools.csmart.startdelay"); if (tmp != null) { try { delay = Integer.parseInt(tmp); } catch (NumberFormatException nfe) { } } final int interNodeStar... | |
if (experiment != null) | if (experiment != null && usingExperiment) | private void experimentFinished() { if (experiment != null) trialProgressBar.setValue(experiment.getTrialCount() + 1); updateControls(false); runButton.setSelected(false); runButton.setEnabled(true); currentTrial = -1; experimentTimer.stop(); } |
if (experiment == null) | if (experiment == null || !usingExperiment) | private String findServlet() { if (experiment == null) return null; ArrayList componentData = new ArrayList(); ComponentData societyData = experiment.getSocietyComponentData(); ComponentData[] cdata = societyData.getChildren(); for (int i = 0; i < cdata.length; i++) componentData.add(cdata[i... |
if (experiment == null) | if (experiment == null || !usingExperiment) | protected ArrayList getAgentComponentDescriptions(String nodeName, String agentName) { if (experiment == null) return null; ComponentData societyComponentData = experiment.getSocietyComponentData(); if (societyComponentData == null) { if(log.isWarn... |
if (experiment == null) return null; | if (experiment == null || !usingExperiment) return null; | protected Object getHostPropertyValue(String hostName, String propertyName) { if (experiment == null) return null; HostComponent[] hosts = experiment.getHostComponents(); for (int i = 0; i < hosts.length; i++) { String s = hosts[i].getShortName(); if (s.equals(hostName)) return getPropertyVa... |
if (experiment == null) return null; | if (experiment == null || !usingExperiment) return null; | protected Object getNodePropertyValue(String nodeName, String propertyName) { if (experiment == null) return null; HostComponent[] hosts = experiment.getHostComponents(); for (int i = 0; i < hosts.length; i++) { NodeComponent[] nodes = hosts[i].getNodes(); for (int j = 0; j < nodes.length; j++) { ... |
if (experiment == null) | if (experiment == null || !usingExperiment) | private boolean haveMoreTrials() { if (experiment == null) return false; else return currentTrial < (experiment.getTrialCount()-1); } |
if (experiment == null) | if (experiment == null || !usingExperiment) | private boolean isResultFile(String filename) { File thisFile = new java.io.File(filename); // if no experiment, use default filter if (experiment == null) return new ResultsFileFilter().accept(thisFile); SocietyComponent societyComponent = experiment.getSocietyComponent(); if (societyComponent !... |
if (experiment != null) { | if (experiment != null && usingExperiment) { | private String makeResultDirectory() { // defaults, if we don't have an experiment File resultDir = csmart.getResultDir(); String experimentName = "Experiment"; String trialName = "Trial 1"; if (experiment != null) { resultDir = experiment.getResultDirectory(); experimentName = experiment.get... |
String experimentName = ""; if (experiment != null) | String experimentName = "Experiment"; if (experiment != null && usingExperiment) | public RemoteProcess restartNode(String nodeName) { NodeInfo nodeInfo = (NodeInfo)nodeToNodeInfo.get(nodeName); String hostName = nodeInfo.hostName; Properties properties = nodeInfo.properties; java.util.List args = nodeInfo.args; boolean doRun = false; synchronized (runningNodes) { if (oldNode... |
new RemoteListenableConfig(listener, new OutputPolicy(10)); | new RemoteListenableConfig(listener, CSMART.getNodeListenerId(), null, new OutputPolicy(10)); | public RemoteProcess restartNode(String nodeName) { NodeInfo nodeInfo = (NodeInfo)nodeToNodeInfo.get(nodeName); String hostName = nodeInfo.hostName; Properties properties = nodeInfo.properties; java.util.List args = nodeInfo.args; boolean doRun = false; synchronized (runningNodes) { if (oldNode... |
RemoteListenable rl = remoteNode.getRemoteListenable(); | public RemoteProcess restartNode(String nodeName) { NodeInfo nodeInfo = (NodeInfo)nodeToNodeInfo.get(nodeName); String hostName = nodeInfo.hostName; Properties properties = nodeInfo.properties; java.util.List args = nodeInfo.args; boolean doRun = false; synchronized (runningNodes) { if (oldNode... | |
rl.addListener(listener, CSMART.getNodeListenerId()); | public RemoteProcess restartNode(String nodeName) { NodeInfo nodeInfo = (NodeInfo)nodeToNodeInfo.get(nodeName); String hostName = nodeInfo.hostName; Properties properties = nodeInfo.properties; java.util.List args = nodeInfo.args; boolean doRun = false; synchronized (runningNodes) { if (oldNode... | |
if (experiment != null) | if (experiment != null) { usingExperiment = true; | private void runButton_actionPerformed() { if (log.isDebugEnabled()) { log.debug("Hit run button"); } destroyOldNodes(); // Get rid of any old stuff before creating the new userStoppedTrials = false; if (experiment != null) initNodesFromExperiment(); runTrial(); } |
} | private void runButton_actionPerformed() { if (log.isDebugEnabled()) { log.debug("Hit run button"); } destroyOldNodes(); // Get rid of any old stuff before creating the new userStoppedTrials = false; if (experiment != null) initNodesFromExperiment(); runTrial(); } | |
if (experiment != null) | if (experiment != null && usingExperiment) | private void runTrial() { if (log.isDebugEnabled()) { log.debug("runTrial about to setTrialValues"); } runStart = new Date(); // set now, cause it's used in logfilename if (experiment != null) setTrialValues(); nodeCreationInfoList = new ArrayList(); Collection values = nodeToNodeInfo.valu... |
if (experiment != null) { | if (experiment != null && usingExperiment) { | private void saveResults() { if (currentTrial < 0) return; // nothing to save String dirname = makeResultDirectory(); if (experiment != null) { try { String myHostName = InetAddress.getLocalHost().getHostName(); URL url = new URL("file", myHostName, dirname); Trial trial = expe... |
if (experiment == null) | if (experiment == null || !usingExperiment) | private void unsetTrialValues() { if (experiment == null) return; if (currentTrial < 0) return; Trial trial = experiment.getTrials()[currentTrial]; Property[] properties = trial.getParameters(); for (int i = 0; i < properties.length; i++) properties[i].setValue(null); } |
if (experiment != null) { | if (experiment != null && usingExperiment) { | private void updateControls(boolean isRunning) { if (experiment != null) { if (!isRunning) { experiment.experimentStopped(); csmart.removeRunningExperiment(experiment); } else csmart.addRunningExperiment(experiment); // update society experiment.getSocietyComponent().setRun... |
createLogger(); | public AppServerSupport() { remoteHostRegistry = RemoteHostRegistry.getInstance(); appServers = new AppServerList(); nodeToAppServer = new Hashtable(); } | |
public synchronized ArrayList getNodesToAttach() { if (appServers.size() == 0) | private String[] getNodesToAttach(ArrayList nodes) { Object[] selected = Util.getObjectsFromList(null, nodes, "Attach to Nodes", "Select Nodes:"); if (selected != null) { ArrayList sel = new ArrayList(selected.length); for (int i = 0; i < selected.length; i++) sel.add(selected[i]); return (String[])sel.toArray(new Stri... | public synchronized ArrayList getNodesToAttach() { if (appServers.size() == 0) return null; Set processNames = nodeToAppServer.keySet(); if (processNames.size() == 0) return null; ArrayList results = new ArrayList(); String[] attachToNodes = getNodesToAttach(new ArrayList(processNames)); f... |
Set processNames = nodeToAppServer.keySet(); if (processNames.size() == 0) return null; ArrayList results = new ArrayList(); String[] attachToNodes = getNodesToAttach(new ArrayList(processNames)); for (int i = 0; i < attachToNodes.length; i++) { String processName = attachToNodes[i]; AppServerDesc desc = (AppServerDesc... | public synchronized ArrayList getNodesToAttach() { if (appServers.size() == 0) return null; Set processNames = nodeToAppServer.keySet(); if (processNames.size() == 0) return null; ArrayList results = new ArrayList(); String[] attachToNodes = getNodesToAttach(new ArrayList(processNames)); f... | |
for(int i=0; i < propProperties.length; i++) { Property prop = propProperties[i]; | Iterator props = getSortedLocalPropertyNames(); while (props.hasNext()) { Property prop; CompositeName pname = (CompositeName)props.next(); if (pname != null) prop = getProperty(pname); else continue; | public PropGroupData getPropGroupData() { PropGroupData pgData = new PropGroupData(this.getShortName()); for(int i=0; i < propProperties.length; i++) { Property prop = propProperties[i]; PGPropData oldPG = getProp(getName(prop)); PGPropData pg = new PGPropData(); if(o... |
pg.setType(getType(prop)); | String type = getType(prop); if ((prop.getValue() != null) && (prop.getValue().getClass().isArray() || Collection.class.isAssignableFrom(prop.getValue().getClass()))) { pg.setSubType(type); pg.setType("Collection"); } else { pg.setType(type); } | public PropGroupData getPropGroupData() { PropGroupData pgData = new PropGroupData(this.getShortName()); for(int i=0; i < propProperties.length; i++) { Property prop = propProperties[i]; PGPropData oldPG = getProp(getName(prop)); PGPropData pg = new PGPropData(); if(o... |
propProperties = new Property[pgd.getPropertyCount()]; | public void initProperties() { propProperties = new Property[pgd.getPropertyCount()]; Iterator iter = pgd.getPropertiesIterator(); int i=0; while(iter.hasNext()) { PGPropData data = (PGPropData)iter.next(); // Compose Name of Name and Type. String name; if(data.getSubType() == null ||... | |
propProperties[i++] = addProperty(name, data.getValue()); | addProperty(name, data.getValue()); | public void initProperties() { propProperties = new Property[pgd.getPropertyCount()]; Iterator iter = pgd.getPropertiesIterator(); int i=0; while(iter.hasNext()) { PGPropData data = (PGPropData)iter.next(); // Compose Name of Name and Type. String name; if(data.getSubType() == null ||... |
if (NULL_ENCODE.equals(attValue)) { attValue = null; } | public static ModuleRevisionId decode(String encoded) { String[] parts = encoded.split(ENCODE_SEPARATOR); if (parts.length % 2 != 0) { throw new IllegalArgumentException("badly encoded module revision id: '"+encoded+"'"); } Map attributes = new HashMap(); for (int i = 0... | |
buf.append(ENCODE_PREFIX).append(attName).append(ENCODE_SEPARATOR).append(ENCODE_PREFIX).append(attributes.get(attName)).append(ENCODE_SEPARATOR); | String value = (String) attributes.get(attName); value = value == null ? NULL_ENCODE : value; buf.append(ENCODE_PREFIX).append(attName).append(ENCODE_SEPARATOR).append(ENCODE_PREFIX).append(value).append(ENCODE_SEPARATOR); | public String encodeToString() { StringBuffer buf = new StringBuffer(); Map attributes = getAttributes(); for (Iterator iter = attributes.keySet().iterator(); iter.hasNext();) { String attName = (String)iter.next(); buf.append(ENCODE_PREFIX).append(attName).append(ENCODE_S... |
log.error("Please report seeing Bug 1304: Null RelationshipBase at child spot # " + i + " out of " + container.getChildCount() + " for Agent " + agentName + " in assembly " + assemblyID, new Throwable()); | log.error("Please report seeing Bug 1304: Using CSMART " + CSMART.writeDebug() + " had Null RelationshipBase at child spot # " + i + " out of " + container.getChildCount() + " for Agent " + agentName + " in assembly " + assemblyID, new Throwable()); | public ComponentData addComponentData(ComponentData data) { AgentAssetData assetData = new AgentAssetData((AgentComponentData)data); // assetData.setType(((Integer)propAssetType.getValue()).intValue()); assetData.setAssetClass((String)propAssetClass.getValue()); assetData.setUniqueID((String)propUnique... |
log.error("Please report seeing Bug 1304: Null Relationship type for relationship at child spot #" + i + " out of " + container.getChildCount() + " for Agent " + agentName + " in assembly " + assemblyID + " where relationship role=" + rel.getProperty(RelationshipBase.PROP_ROLE) + ", and ItemID=" + rel.getProperty(Relat... | log.error("Please report seeing Bug 1304: Using CSMART " + CSMART.writeDebug() + " had Null Relationship type for relationship at child spot #" + i + " out of " + container.getChildCount() + " for Agent " + agentName + " in assembly " + assemblyID + " where relationship role=" + rel.getProperty(RelationshipBase.PROP_RO... | public ComponentData addComponentData(ComponentData data) { AgentAssetData assetData = new AgentAssetData((AgentComponentData)data); // assetData.setType(((Integer)propAssetType.getValue()).intValue()); assetData.setAssetClass((String)propAssetClass.getValue()); assetData.setUniqueID((String)propUnique... |
if (relationship == null) { if (log.isErrorEnabled()) { log.error("Report under bug 1304: " + this + " using CSMART " + CSMART.writeDebug() + " got null relationship to create from", new Throwable()); } } else if (relationship.getType() == null) { if (log.isErrorEnabled()) { log.error("Report under bug 1304: " + this +... | public void initProperties() { propType = addProperty(PROP_TYPE, relationship.getType()); propType.setToolTip(PROP_TYPE_DESC); propRole = addProperty(PROP_ROLE, relationship.getRole()); propRole.setToolTip(PROP_ROLE_DESC); propItem = addProperty(PROP_ITEM, relationship.getItemId()); propItem.setTool... | |
if (! CommunityDbUtils.dumpCommunityXML(f.getAbsolutePath() + "communities.xml", getCommAsbID())) log.error("Couldn't write communities.xml file"); | public void dumpINIFiles() { // FIXME: // If this Exp's society's assembly has entries in the oplan // tables, then must save out what the assembly ID is such // that on load of the INI files we can preserve the OPLAN INFO // Generate the complete Society generateCompleteSociety(); ExperimentIN... | |
public SiteDropListener(String projectName, Document document, TreeViewer treeViewer) { | public SiteDropListener() { | public SiteDropListener(String projectName, Document document, TreeViewer treeViewer) { // TODO Auto-generated constructor stub this.treeViewer = treeViewer; this.document = document; this.projectName = projectName; } |
this.treeViewer = treeViewer; this.document = document; this.projectName = projectName; | activeDocument = document; | public SiteDropListener(String projectName, Document document, TreeViewer treeViewer) { // TODO Auto-generated constructor stub this.treeViewer = treeViewer; this.document = document; this.projectName = projectName; } |
String localItemPath; String itemPath; | String relativePath = null; | public void drop(DropTargetEvent event) { if (event.data instanceof String[]) { String[] files = (String[]) event.data; File strFilename; String filePath = null; String localItemPath; String itemPath; for (int i = 0; i < files.length; i++) { ... |
localItemPath = filePath.substring(filePath .indexOf("xdocs") + "xdocs".length() + 1); itemPath = filePath.substring(Utilities .getPathToXDocs().length() + 2); | strFilename = new File(files[i]); filePath = strFilename.getPath(); Node insertionElement = (Element) event.item.getData(); Element element = activeDocument.createElement("NewElement"); relativePath = filePath.substring(xDocPath.length()); element.setAttribute("href", relativePath); element.setAttribute("description", ... | public void drop(DropTargetEvent event) { if (event.data instanceof String[]) { String[] files = (String[]) event.data; File strFilename; String filePath = null; String localItemPath; String itemPath; for (int i = 0; i < files.length; i++) { ... |
public IvyNode(ResolveData data, DependencyDescriptor dd) { | public IvyNode(ResolveData data, IvyNode parent, DependencyDescriptor dd) { | public IvyNode(ResolveData data, DependencyDescriptor dd) { _id = dd.getDependencyRevisionId(); _dd = dd; _isRoot = false; init(data, true); } |
_dd = dd; | _dds.put(parent, dd); | public IvyNode(ResolveData data, DependencyDescriptor dd) { _id = dd.getDependencyRevisionId(); _dd = dd; _isRoot = false; init(data, true); } |
if (_dd != null && _dd.canExclude()) { | DependencyDescriptor dd = getDependencyDescriptor(getParent()); if (dd != null && dd.canExclude()) { | private boolean canExclude(String rootModuleConf) { if (_dd != null && _dd.canExclude()) { return true; } Caller[] callers = getCallers(rootModuleConf); for (int i = 0; i < callers.length; i++) { if (callers[i].canExclude()) { return true; ... |
_module = resolver.getDependency(_dd, _data); | _module = resolver.getDependency(getDependencyDescriptor(getParent()), _data); | public boolean loadData(String conf, boolean shouldBePublic) { boolean loaded = false; if (!isEvicted(_rootModuleConf) && (hasConfigurationsToLoad() || !isRootModuleConfLoaded()) && !hasProblem()) { markRootModuleConfLoaded(); if (_md == null) { DependencyResolver ... |
if (_dd != null) { resolved.addDependencyArtifactsIncludes(_rootModuleConf, _dd.getDependencyArtifactsIncludes(getParentConf())); | DependencyDescriptor dd = getDependencyDescriptor(getParent()); if (dd != null) { resolved.addDependencyArtifactsIncludes(_rootModuleConf, dd.getDependencyArtifactsIncludes(getParentConf())); | public boolean loadData(String conf, boolean shouldBePublic) { boolean loaded = false; if (!isEvicted(_rootModuleConf) && (hasConfigurationsToLoad() || !isRootModuleConfLoaded()) && !hasProblem()) { markRootModuleConfLoaded(); if (_md == null) { DependencyResolver ... |
if (_dd != null) { addDependencyArtifactsIncludes(_rootModuleConf, _dd.getDependencyArtifactsIncludes(getParentConf())); | DependencyDescriptor dd = getDependencyDescriptor(getParent()); if (dd != null) { addDependencyArtifactsIncludes(_rootModuleConf, dd.getDependencyArtifactsIncludes(getParentConf())); | public boolean loadData(String conf, boolean shouldBePublic) { boolean loaded = false; if (!isEvicted(_rootModuleConf) && (hasConfigurationsToLoad() || !isRootModuleConfLoaded()) && !hasProblem()) { markRootModuleConfLoaded(); if (_md == null) { DependencyResolver ... |
public void show(int x, int y, int width, int heigth) | public void show(int x, int y, int width, int height) | public void show(int x, int y, int width, int heigth) { JLayeredPane layeredPane; layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane(); layeredPane.add(this, JLayeredPane.POPUP_LAYER, 0); this.setBounds(x, y, width, height); } |
console = this; | public CSMARTConsole(CSMART csmart) { this.csmart = csmart; experiment = csmart.getExperiment(); isEditable = experiment.isEditable(); experiment.setEditable(false); // not editable while we have it currentTrial = -1; societyComponent = experiment.getSocietyComponent(0); desktop = new ConsoleDesk... | |
for (int i = 0; i < nodesToRun.length; i++) { NodeComponent nodeComponent = nodesToRun[i]; ((ConfigurableComponent)nodeComponent).addProperty("ConfigurationFileName", nodeComponent.getShortName() + currentTrial); } | int delay = 1; | private void createNodes() { // first set configuration file name in all node components for (int i = 0; i < nodesToRun.length; i++) { NodeComponent nodeComponent = nodesToRun[i]; ((ConfigurableComponent)nodeComponent).addProperty("ConfigurationFileName", nodeComponent.... |
int delay = 1; | private void createNodes() { // first set configuration file name in all node components for (int i = 0; i < nodesToRun.length; i++) { NodeComponent nodeComponent = nodesToRun[i]; ((ConfigurableComponent)nodeComponent).addProperty("ConfigurationFileName", nodeComponent.... | |
boolean haveRunningNode = false; runStart = new Date(); for (int i = 0; i < nodesToRun.length; i++) { | final int interNodeStartDelay = delay; for (int i = 0; i < nodeCreationInfoList.size(); i++) { | private void createNodes() { // first set configuration file name in all node components for (int i = 0; i < nodesToRun.length; i++) { NodeComponent nodeComponent = nodesToRun[i]; ((ConfigurableComponent)nodeComponent).addProperty("ConfigurationFileName", nodeComponent.... |
Thread.sleep(delay); | Thread.sleep(interNodeStartDelay); | private void createNodes() { // first set configuration file name in all node components for (int i = 0; i < nodesToRun.length; i++) { NodeComponent nodeComponent = nodesToRun[i]; ((ConfigurableComponent)nodeComponent).addProperty("ConfigurationFileName", nodeComponent.... |
NodeComponent nodeComponent = nodesToRun[i]; if (createNode(nodeComponent, hostsToRunOn[i])) haveRunningNode = true; } if (!haveRunningNode) { runButton.setSelected(false); runButton.setEnabled(true); unsetTrialValues(); currentTrial--; | if (stopNodeCreation) break; final NodeCreationInfo nci = (NodeCreationInfo)nodeCreationInfoList.get(i); final NodeServesClient nsc; try { nsc = nci.hsc.createNode(nci.uniqueNodeName, nci.properties, nci.args, nci.listener, nci.filter, nci.configWriter); } catch (Exception e) { System.out.println("CSMARTConsole: cannot... | private void createNodes() { // first set configuration file name in all node components for (int i = 0; i < nodesToRun.length; i++) { NodeComponent nodeComponent = nodesToRun[i]; ((ConfigurableComponent)nodeComponent).addProperty("ConfigurationFileName", nodeComponent.... |
desktop.getNodeFrame(selectedNodeName).displayAbout(); | ConsoleInternalFrame frame = desktop.getNodeFrame(selectedNodeName); if (frame != null) frame.displayAbout(); | private void displayAboutNode() { desktop.getNodeFrame(selectedNodeName).displayAbout(); } |
if (runningNodes.get(nodeComponent) != null) { oldNodes.add(nodeComponent); runningNodes.remove(nodeComponent); } desktop.getNodeFrame(nodeComponent.getShortName()).enableRestart(); | synchronized (runningNodesLock) { if (runningNodes.get(nodeComponent) != null) { oldNodes.add(nodeComponent); runningNodes.remove(nodeComponent); } } ConsoleInternalFrame frame = desktop.getNodeFrame(nodeComponent.getShortName()); if (frame != null && !stopping) frame.enableRestart(true); if (starting) return; | public void nodeStopped(NodeComponent nodeComponent) { if (runningNodes.get(nodeComponent) != null) { oldNodes.add(nodeComponent); runningNodes.remove(nodeComponent); } // enable restart command on node output window desktop.getNodeFrame(nodeComponent.getShortName()).enableRestart(); // if an... |
if (runningNodes.isEmpty()) { | boolean finishedTrial = false; synchronized (runningNodesLock) { if (runningNodes.isEmpty()) finishedTrial = true; } if (finishedTrial) { | public void nodeStopped(NodeComponent nodeComponent) { if (runningNodes.get(nodeComponent) != null) { oldNodes.add(nodeComponent); runningNodes.remove(nodeComponent); } // enable restart command on node output window desktop.getNodeFrame(nodeComponent.getShortName()).enableRestart(); // if an... |
if (consoleTextPane == null) return; | private void resetNodeStatus() { ConsoleTextPane consoleTextPane = (ConsoleTextPane)nodePanes.get(selectedNodeName); consoleTextPane.clearNotify(); NodeStatusButton button = getNodeStatusButton(selectedNodeName); if (button != null) button.clearError(); } | |
if (oldNodes.size() + runningNodes.size() == 1) { | boolean doRun = false; synchronized (runningNodes) { if (oldNodes.size() + runningNodes.size() == 1) doRun = true; } if (doRun) { | public NodeServesClient restartNode(NodeComponent nodeComponent) { if (oldNodes.size() + runningNodes.size() == 1) { runButton_actionPerformed(); return null; // it doesn't matter what we return, the caller is going away } CommunityServesClient communitySupport = new ClientCommunityController(); ... |
if (nsc != null) runningNodes.put(nodeComponent, nsc); | if (nsc != null) { synchronized (runningNodesLock) { runningNodes.put(nodeComponent, nsc); } } | public NodeServesClient restartNode(NodeComponent nodeComponent) { if (oldNodes.size() + runningNodes.size() == 1) { runButton_actionPerformed(); return null; // it doesn't matter what we return, the caller is going away } CommunityServesClient communitySupport = new ClientCommunityController(); ... |
final CSMARTConsole console = this; GUIUtils.timeConsumingTaskStart(this); | runStart = new Date(); nodeCreationInfoList = new ArrayList(); prepareToCreateNodes(); stopNodeCreation = false; startTimers(); nodeCreator = new Thread("CreateNodes") { public void run() { createNodes(); starting = false; boolean reset = false; synchronized (runningNodesLock) { if (runningNodes.isEmpty()) reset = tru... | private void runTrial() { setTrialValues(); final CSMARTConsole console = this; GUIUtils.timeConsumingTaskStart(this); try { new Thread("CreateNodes") { public void run() { createNodes(); GUIUtils.timeConsumingTaskEnd(console); } }.start(); } catch (RuntimeExce... |
new Thread("CreateNodes") { public void run() { createNodes(); GUIUtils.timeConsumingTaskEnd(console); } }.start(); | nodeCreator.start(); | private void runTrial() { setTrialValues(); final CSMARTConsole console = this; GUIUtils.timeConsumingTaskStart(this); try { new Thread("CreateNodes") { public void run() { createNodes(); GUIUtils.timeConsumingTaskEnd(console); } }.start(); } catch (RuntimeExce... |
GUIUtils.timeConsumingTaskEnd(this); | private void runTrial() { setTrialValues(); final CSMARTConsole console = this; GUIUtils.timeConsumingTaskStart(this); try { new Thread("CreateNodes") { public void run() { createNodes(); GUIUtils.timeConsumingTaskEnd(console); } }.start(); } catch (RuntimeExce... | |
createNodes(); GUIUtils.timeConsumingTaskEnd(console); | createNodes(); starting = false; boolean reset = false; synchronized (runningNodesLock) { if (runningNodes.isEmpty()) reset = true; } if (reset) { SwingUtilities.invokeLater(new Runnable() { public void run() { runButton.setSelected(false); runButton.setEnabled(true); unsetTrialValues(); currentTrial--; } }); | public void run() { createNodes(); GUIUtils.timeConsumingTaskEnd(console); } |
} | public void run() { createNodes(); GUIUtils.timeConsumingTaskEnd(console); } | |
Enumeration nodeComponents = runningNodes.keys(); | Enumeration nodeComponents; synchronized (runningNodesLock) { nodeComponents = runningNodes.keys(); } | private void stopAllNodes() { // set a flag indicating that we're stopping the trial stopping = true; Enumeration nodeComponents = runningNodes.keys(); while (nodeComponents.hasMoreElements()) { NodeComponent nodeComponent = (NodeComponent)nodeComponents.nextElement(); NodeServesClient nsc = (N... |
(NodeComponent)nodeComponents.nextElement(); NodeServesClient nsc = (NodeServesClient)runningNodes.get(nodeComponent); | (NodeComponent)nodeComponents.nextElement(); NodeServesClient nsc; synchronized (runningNodesLock) { nsc = (NodeServesClient)runningNodes.get(nodeComponent); } | private void stopAllNodes() { // set a flag indicating that we're stopping the trial stopping = true; Enumeration nodeComponents = runningNodes.keys(); while (nodeComponents.hasMoreElements()) { NodeComponent nodeComponent = (NodeComponent)nodeComponents.nextElement(); NodeServesClient nsc = (N... |
if (runningNodes.size() == 1) { | boolean doAbort = false; synchronized (runningNodesLock) { if (runningNodes.size() == 1) doAbort = true; } if (doAbort) { | public void stopNode(NodeComponent node) { if (runningNodes.size() == 1) { abortButton_actionPerformed(); return; } NodeServesClient nsc = (NodeServesClient)runningNodes.get(node); if (nsc == null) return; try { nsc.flushNodeEvents(); nsc.destroy(); } catch (Exception ex) { ... |
NodeServesClient nsc = (NodeServesClient)runningNodes.get(node); | NodeServesClient nsc; synchronized (runningNodesLock) { nsc = (NodeServesClient)runningNodes.get(node); } | public void stopNode(NodeComponent node) { if (runningNodes.size() == 1) { abortButton_actionPerformed(); return; } NodeServesClient nsc = (NodeServesClient)runningNodes.get(node); if (nsc == null) return; try { nsc.flushNodeEvents(); nsc.destroy(); } catch (Exception ex) { ... |
JInternalFrame[] frames = desktop.getAllFrames(); for (int i = 0; i < frames.length; i++) { String s = frames[i].getTitle(); if (!s.equals("Configuration") && !s.equals("Trial Values")) ((ConsoleInternalFrame)frames[i]).enableRestart(false); } | private void updateExperimentControls(Experiment experiment, boolean isRunning) { if (!isRunning) { experiment.experimentStopped(); csmart.setRunningExperiment(null); } else csmart.setRunningExperiment(experiment); // update societies int nSocieties = experiment.getSocietyComponentCount... | |
log = CSMART.createLogger(this.getClass().getName()); | log = (Logger) NullLoggingServiceImpl.getNullLoggingServiceImpl(); | public MetricsServlet(SimpleServletSupport support) { super(); this.support = support; log = CSMART.createLogger(this.getClass().getName()); if ( ! ( "/CSMART_MetricsServlet".equals(support.getPath()) ) ) { System.out.println("Error in servlet path: " + support.getPath()); } } |
public void setPublisher(String publisher); | void setPublisher(String publisher); | public void setPublisher(String publisher); |
public void setTime(long time); | void setTime(long time); | public void setTime(long time); |
return className.substring( 0, className.lastIndexOf('.') ); | int index = className.lastIndexOf('.'); if( index == -1 ){ return ""; } return className.substring( 0, index ); | private static String getPackageName( String className ) throws Throwable{ return className.substring( 0, className.lastIndexOf('.') ); } |
throw new IllegalArgumentException("member may not be less then 0"); | throw new IllegalArgumentException("member may not be less than 0"); | protected SetOfIntegerSyntax(int member) { if (member < 0) throw new IllegalArgumentException("member may not be less then 0"); this.members = new int[][]{{member, member}}; } |
VMDirectByteBuffer.free(address); | if (owner == this) VMDirectByteBuffer.free(address); | protected void finalize() throws Throwable { VMDirectByteBuffer.free(address); } |
checkIfReadOnly(); | public ByteBuffer put(byte value) { checkIfReadOnly(); checkForOverflow(); int pos = position(); VMDirectByteBuffer.put(address, pos, value); position(pos + 1); return this; } | |
return new DirectByteBufferImpl | if (isReadOnly()) return new DirectByteBufferImpl.ReadOnly | public ByteBuffer slice() { int rem = remaining(); return new DirectByteBufferImpl (owner, VMDirectByteBuffer.adjustAddress(address, position()), rem, rem, 0, isReadOnly()); } |
rem, rem, 0, isReadOnly()); | rem, rem, 0); else return new DirectByteBufferImpl.ReadWrite (owner, VMDirectByteBuffer.adjustAddress(address, position()), rem, rem, 0); | public ByteBuffer slice() { int rem = remaining(); return new DirectByteBufferImpl (owner, VMDirectByteBuffer.adjustAddress(address, position()), rem, rem, 0, isReadOnly()); } |
file = file.substring(0, file.lastIndexOf('/')) + '/' + spec.substring(start, end); | char sepChar = '/'; int lastSlash = file.lastIndexOf (sepChar); if (lastSlash < 0 && File.separatorChar != sepChar && url.getProtocol ().equals ("file")) { sepChar = File.separatorChar; lastSlash = file.lastIndexOf (sepChar); } file = file.substring(0, lastSlash) + sepChar + spec.substring (start, end); if (url.getP... | protected void parseURL(URL url, String spec, int start, int end) { String host = url.getHost(); int port = url.getPort(); String file = url.getFile(); String ref = url.getRef(); if (spec.regionMatches (start, "//", 0, 2)) { int hostEnd; int colon; start += 2; int slash = spec.indexOf('/', st... |
this.authority = null; | this.authority = ""; | protected void set(String protocol, String host, int port, String file, String ref) { // TBD: Theoretically, a poorly written StreamHandler could pass an // invalid protocol. It will cause the handler to be set to null // thus overriding a valid handler. Callers of this method should ... |
if (host != null) this.authority += host; if (port >= 0) this.authority += ":" + port; | protected void set(String protocol, String host, int port, String file, String ref) { // TBD: Theoretically, a poorly written StreamHandler could pass an // invalid protocol. It will cause the handler to be set to null // thus overriding a valid handler. Callers of this method should ... | |
public void close() throws SQLException { dbConnection.commit(); dbConnection.close(); dbConnection = null; | public synchronized void close() throws SQLException { if (dbConnection != null) { dbConnection.commit(); dbConnection.close(); dbConnection = null; } | public void close() throws SQLException { dbConnection.commit(); dbConnection.close(); dbConnection = null; } |
private void setAssemblyId(String assemblyIdPrefix, String exptId, String trialId) | private void setAssemblyId(String assemblyType, String exptId, String trialId) | private void setAssemblyId(String assemblyIdPrefix, String exptId, String trialId) throws SQLException { String assemblyIdPrefix = assemblyType + "-"; substitutions.put(":assembly_id_pattern", assemblyIdPrefix + "____"); substitutions.put(":assembly_type", assemblyType); Decima... |
_useLinkForTabSwitch = ERXUtilities.booleanValue(session().valueForKey("browserIsIE")) && | _useLinkForTabSwitch = ERXUtilities.booleanValue(session().valueForKeyPath("browser.isIE")) && | public boolean useLinkForTabSwitch() { if (_useLinkForTabSwitch == null) { _useLinkForTabSwitch = ERXUtilities.booleanValue(session().valueForKey("browserIsIE")) && ERXUtilities.booleanValue(session().valueForKey("javaScriptEnabled")) ? Boolean.TRUE : Boolean.FALSE; } retu... |
node.addAgent(addAgent); | if(node.getShortName().equalsIgnoreCase(addAgent.getShortName())) { if(log.isWarnEnabled()) { log.warn("Agent name same as node, cannot perform addition"); } JOptionPane.showMessageDialog(null, "Cannot Map Agent to Node of Same name, ignoring agent: " + addAgent.getShortName()); } else { node.addAgent(addAgent); } | public void addNodeChildren(ComponentData[] children, NodeComponent node) { for(int i=0; i < children.length; i++) { boolean foundInSociety = false; boolean foundInNode = false; ComponentData child = children[i]; AgentComponent[] allAgents = getAgents(); AgentComponent addAgent = null; ... |
if (newNumberOfObjectsPerBatch!=null && newNumberOfObjectsPerBatch.intValue() != displayGroup().numberOfObjectsPerBatch()) { if (displayGroup()!=null) { if(log.isDebugEnabled()) log.debug("Setting db # of objects per batch to "+newNumberOfObjectsPerBatch); displayGroup().setNumberOfObjectsPerBatch(newNumberOfObjectsPer... | public void appendToResponse(WOResponse response, WOContext context) { if (displayGroup() != null && ! displayGroup().hasMultipleBatches()) { if (currentBatchIndex() != 0) setCurrentBatchIndex(ERXConstant.ZeroInteger); } super.appendToResponse(response, context); ... | |
if (newValue!=null) { if (displayGroup()!=null) { log.debug("Setting db # of objects per batch to "+newValue); displayGroup().setNumberOfObjectsPerBatch(newValue.intValue()); if(log.isDebugEnabled()) log.debug("The batch index is being set to : "+ 1); displayGroup().setCurrentBatchIndex(1); } Object context=valueForBi... | newNumberOfObjectsPerBatch = newValue; | public void setNumberOfObjectsPerBatch(Number newValue) { if (newValue!=null) { if (displayGroup()!=null) { log.debug("Setting db # of objects per batch to "+newValue); displayGroup().setNumberOfObjectsPerBatch(newValue.intValue()); if(log.isDebugEnable... |
b.getVerticalAlignment(), b.getHorizontalAlignment(), | SwingUtilities.TOP, SwingUtilities.LEFT, | public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) { Rectangle contentRect; Rectangle viewRect; Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets insets = b.getInsets(); Insets margin = b... |
boolean candidate_is_container_with_children = ((candidate != null) && (candidate instanceof Container) && (((Container)candidate).getComponentCount () > 0)); boolean candidate_does_not_contain_point = ((candidate != null) && (! candidate.contains (x - candidate.getX (), y - candidate.getY ()))); if (candidate == nul... | while(candidate != null) | void acquireComponentForMouseEvent (MouseEvent me) { int x = me.getX (); int y = me.getY (); Component candidate = mouseEventTarget; boolean candidate_is_container_with_children = ((candidate != null) && (candidate instanceof Container) && (((Container)candidate).getComponentCount () > ... |
candidate = nativeContainer.findComponentAt (x, y); | if (candidate.isShowing()) { Point cp = SwingUtilities.convertPoint(nativeContainer, x, y, candidate); if (candidate.contains(cp.x, cp.y)) { if (candidate instanceof Container && ((Container)candidate).getComponentCount() > 0) candidate = SwingUtilities.getDeepestComponentAt(candidate, cp.x, cp.y); break; } } cand... | void acquireComponentForMouseEvent (MouseEvent me) { int x = me.getX (); int y = me.getY (); Component candidate = mouseEventTarget; boolean candidate_is_container_with_children = ((candidate != null) && (candidate instanceof Container) && (((Container)candidate).getComponentCount () > ... |
int nx = x - mouseEventTarget.getX (); int ny = y - mouseEventTarget.getY (); | Point tp = SwingUtilities.convertPoint(nativeContainer, x, y, mouseEventTarget); | void acquireComponentForMouseEvent (MouseEvent me) { int x = me.getX (); int y = me.getY (); Component candidate = mouseEventTarget; boolean candidate_is_container_with_children = ((candidate != null) && (candidate instanceof Container) && (((Container)candidate).getComponentCount () > ... |
nx, ny, | tp.x, tp.y, | void acquireComponentForMouseEvent (MouseEvent me) { int x = me.getX (); int y = me.getY (); Component candidate = mouseEventTarget; boolean candidate_is_container_with_children = ((candidate != null) && (candidate instanceof Container) && (((Container)candidate).getComponentCount () > ... |
int nx = x - mouseEventTarget.getX (); int ny = y - mouseEventTarget.getY (); | Point cp = SwingUtilities.convertPoint(nativeContainer, x, y, candidate); | void acquireComponentForMouseEvent (MouseEvent me) { int x = me.getX (); int y = me.getY (); Component candidate = mouseEventTarget; boolean candidate_is_container_with_children = ((candidate != null) && (candidate instanceof Container) && (((Container)candidate).getComponentCount () > ... |
nx, ny, | cp.x, cp.y, | void acquireComponentForMouseEvent (MouseEvent me) { int x = me.getX (); int y = me.getY (); Component candidate = mouseEventTarget; boolean candidate_is_container_with_children = ((candidate != null) && (candidate instanceof Container) && (((Container)candidate).getComponentCount () > ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.