rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (useOrigin) { | if (useOrigin && artifactRef.getResource().isLocal()) { | public DownloadReport download(Artifact[] artifacts, Ivy ivy, File cache, boolean useOrigin) { clearArtifactAttempts(); DownloadReport dr = new DownloadReport(); for (int i = 0; i < artifacts.length; i++) { final ArtifactDownloadReport adr = new ArtifactDownloadReport(artifacts[i]); ... |
String expected = FileUtil.readEntirely(new BufferedReader(new FileReader(checksumFile))).trim().toLowerCase(); | String csFileContent = FileUtil.readEntirely(new BufferedReader(new FileReader(checksumFile))).trim().toLowerCase(); String expected; int spaceIndex = csFileContent.indexOf(' '); if (spaceIndex != -1) { expected = csFileContent.substring(0, spaceIndex); } else { expected = csFileContent; } | public static boolean check(File dest, File checksumFile, String algorithm) throws IOException { String expected = FileUtil.readEntirely(new BufferedReader(new FileReader(checksumFile))).trim().toLowerCase(); String computed = computeAsString(dest, algorithm).trim().toLowerCase(); return expected.equals(computed); ... |
addAttribute("origin", _report.getArtifactOrigin().getLocation()); addAttribute("local", String.valueOf(_report.getArtifactOrigin().isLocal())); | ArtifactOrigin origin = report.getArtifactOrigin(); if (origin != null) { addAttribute("origin", _report.getArtifactOrigin().getLocation()); addAttribute("local", String.valueOf(_report.getArtifactOrigin().isLocal())); } else { addAttribute("origin", ""); addAttribute("local", ""); } | public EndArtifactDownloadEvent(Ivy source, DependencyResolver resolver, Artifact artifact, ArtifactDownloadReport report) { super(source, NAME, artifact); _resolver = resolver; _report = report; addAttribute("resolver", _resolver.getName()); addAttribute("status", _report.getDown... |
out.print(" force=\""+dds[i].isForce()+"\""); out.print(" changing=\""+dds[i].isChanging()+"\""); out.print(" transitive=\""+dds[i].isTransitive()+"\""); | if (dds[i].isForce()) { out.print(" force=\""+dds[i].isForce()+"\""); } if (dds[i].isChanging()) { out.print(" changing=\""+dds[i].isChanging()+"\""); } if (!dds[i].isTransitive()) { out.print(" transitive=\""+dds[i].isTransitive()+"\""); } | public static void write(ModuleDescriptor md, File output) throws IOException { if (output.getParentFile() != null) { output.getParentFile().mkdirs(); } PrintWriter out = new PrintWriter(new FileOutputStream(output)); try { out.println("<ivy-module version=\"1.0\">"); ... |
pane.search("ab"); | pane.search("abc"); | public static void main(String[] args) { ConsoleStyledDocument doc = new ConsoleStyledDocument(); javax.swing.text.AttributeSet a = new javax.swing.text.SimpleAttributeSet(); ConsoleTextPane pane = new ConsoleTextPane(doc); pane.appendString("abcdefghijklmnopqrstuvw", a); pane.search("ab"); pa... |
pane.searchNext(); | public static void main(String[] args) { ConsoleStyledDocument doc = new ConsoleStyledDocument(); javax.swing.text.AttributeSet a = new javax.swing.text.SimpleAttributeSet(); ConsoleTextPane pane = new ConsoleTextPane(doc); pane.appendString("abcdefghijklmnopqrstuvw", a); pane.search("ab"); pa... | |
pane.searchNext(); | public static void main(String[] args) { ConsoleStyledDocument doc = new ConsoleStyledDocument(); javax.swing.text.AttributeSet a = new javax.swing.text.SimpleAttributeSet(); ConsoleTextPane pane = new ConsoleTextPane(doc); pane.appendString("abcdefghijklmnopqrstuvw", a); pane.search("ab"); pa... | |
if (len >= MAX_CHARACTERS) { | if (len >= bufferSize) { | public void appendString(String s, AttributeSet a) { try { int len = s.length(); // special case, the string is larger than the document // just insert the end of the string if (len >= MAX_CHARACTERS) { remove(0, getLength()); super.insertString(0, s.substring(len - MAX_CHARACTERS... |
super.insertString(0, s.substring(len - MAX_CHARACTERS), a); | super.insertString(0, s.substring(len - bufferSize), a); | public void appendString(String s, AttributeSet a) { try { int len = s.length(); // special case, the string is larger than the document // just insert the end of the string if (len >= MAX_CHARACTERS) { remove(0, getLength()); super.insertString(0, s.substring(len - MAX_CHARACTERS... |
if (neededSpace > MAX_CHARACTERS) { int tmp = Math.max(neededSpace - MAX_CHARACTERS, MIN_REMOVE_CHARACTERS); | if (neededSpace > bufferSize) { int tmp = Math.max(neededSpace - bufferSize, minRemoveSize); | public void appendString(String s, AttributeSet a) { try { int len = s.length(); // special case, the string is larger than the document // just insert the end of the string if (len >= MAX_CHARACTERS) { remove(0, getLength()); super.insertString(0, s.substring(len - MAX_CHARACTERS... |
this(this.message, PLAIN_MESSAGE, DEFAULT_OPTION, null, null, null); | this("JOptionPane message", PLAIN_MESSAGE, DEFAULT_OPTION, null, null, null); | public JOptionPane() { this(this.message, PLAIN_MESSAGE, DEFAULT_OPTION, null, null, null); } |
return false; } if (doc == null) { | public static boolean importCommunityXML(File xmlFile, String assemblyID) { if (log.isDebugEnabled()) { log.debug("importcommXML with file " + xmlFile + " and ASB " + assemblyID); } XMLUtils xml = new XMLUtils(); Document doc; try { doc = xml.loadXMLFile(xmlFile); } catch (Exception e) { ... | |
public static String getListMatch(String oneitem) { List ol = new ArrayList(1); ol.add(oneitem); return DBUtils.getListMatch(ol, null); | public static String getListMatch(List listItems, String badStartPattern) { StringBuffer assemblyMatch = null; if (listItems != null && listItems.size() != 0) { assemblyMatch = new StringBuffer(); assemblyMatch.append("in ("); Iterator iter = listItems.iterator(); boolean first = true; while (iter.hasNext()) { String ... | public static String getListMatch(String oneitem) { List ol = new ArrayList(1); ol.add(oneitem); return DBUtils.getListMatch(ol, null); } |
if (canGetValueForBinding("id")) { _id = (String)valueForBinding("id"); } else { _id = AjaxUtils.toSafeElementID(aContext.elementID()); } | public void appendToResponse(WOResponse aResponse, WOContext aContext) { if (canGetValueForBinding("id")) { _id = (String)valueForBinding("id"); } else { _id = AjaxUtils.toSafeElementID(aContext.elementID()); } super.appendToResponse(aResponse, aContext); } | |
if (_id == null) { if (hasBinding("id")) { _id = (String) valueForBinding("id"); } else { _id = AjaxUtils.toSafeElementID(context().elementID()); } } | public String id() { return _id; } | |
return _id + "Update();"; | return id() + "Update();"; | public String updateFunctionName() { return _id + "Update();"; } |
if (hostName == null || hostName.length() == 0) | if (hostName == null || hostName.trim().length() == 0) | public void createHost() { String hostName = null; while (true) { hostName = JOptionPane.showInputDialog("New host name: "); // FIXME: Forbid localhost here? if (hostName == null || hostName.length() == 0) return; HostComponent[] hc = experiment.getHostComponents(); boolean isUni... |
hostName = hostName.trim(); | public void createHost() { String hostName = null; while (true) { hostName = JOptionPane.showInputDialog("New host name: "); // FIXME: Forbid localhost here? if (hostName == null || hostName.length() == 0) return; HostComponent[] hc = experiment.getHostComponents(); boolean isUni... | |
if (nodeName == null || nodeName.length() == 0) | if (nodeName == null || nodeName.trim().length() == 0) | private void newNodeInTree(JTree tree) { TreePath path = tree.getSelectionPath(); if (path == null) { if(log.isWarnEnabled()) { log.warn("HostConfigurationBuilder newNodeInTree called with null path; ignoring"); } return; } DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode... |
nodeName = nodeName.trim(); | private void newNodeInTree(JTree tree) { TreePath path = tree.getSelectionPath(); if (path == null) { if(log.isWarnEnabled()) { log.warn("HostConfigurationBuilder newNodeInTree called with null path; ignoring"); } return; } DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode... | |
if (s != null && s.length() != 0) setPropertyOfNode(hostTree, "Description", s); | if (s != null && s.trim().length() != 0) setPropertyOfNode(hostTree, "Description", s.trim()); | public void setHostDescription() { String description = getPropertyOfNode(hostTree, "Description"); String s = (String)JOptionPane.showInputDialog(this, "Enter Host Description", "Host Description", ... |
if (s != null && s.length() != 0) setPropertyOfNode(hostTree, "Location", s); | if (s != null && s.trim().length() != 0) setPropertyOfNode(hostTree, "Location", s.trim()); | public void setHostLocation() { String location = getPropertyOfNode(hostTree, "Location"); String s = (String)JOptionPane.showInputDialog(this, "Enter Host Location", "Host Location", JO... |
if (s != null && s.length() != 0) setPropertyOfNode(hostTree, "MachineType", s); | if (s != null && s.trim().length() != 0) setPropertyOfNode(hostTree, "MachineType", s.trim()); | public void setHostType() { String machineType = getPropertyOfNode(hostTree, "MachineType"); String[] machineTypes = { "Linux", "Solaris", "Windows" }; String s = (String)JOptionPane.showInputDialog(this, "Enter Host Machine Type", ... |
if (description != null && description.length() != 0) setPropertyOfNode(hostTree, "Description", description); | if (description != null && description.trim().length() != 0) setPropertyOfNode(hostTree, "Description", description.trim()); | public void setNodeDescription() { boolean askedUser = false; String description = ""; if (getSelectedNodesInHostTree() != null) { description = getPropertyOfNode(hostTree, "Description"); description = (String)JOptionPane.showInputDialog(this, "Ent... |
if (description != null && description.length() != 0) setPropertyOfNode(nodeTree, "Description", description); | if (description != null && description.trim().length() != 0) setPropertyOfNode(nodeTree, "Description", description.trim()); | public void setNodeDescription() { boolean askedUser = false; String description = ""; if (getSelectedNodesInHostTree() != null) { description = getPropertyOfNode(hostTree, "Description"); description = (String)JOptionPane.showInputDialog(this, "Ent... |
public NodeArgumentDialog(String title, Properties props, boolean isLocal) { super((Frame)null, title, true); | public NodeArgumentDialog(String title, Properties props, boolean isLocal, boolean isEditable) { super((Frame)null, title, isEditable); | public NodeArgumentDialog(String title, Properties props, boolean isLocal) { super((Frame)null, title, true); // display modal dialog createLogger(); Box nodeArgPanel = Box.createVerticalBox(); JPanel argumentPanel = new JPanel(); // ok and cancel buttons panel JPanel buttonPanel = new JPanel(); ... |
argTable = new JTable(); argTable.getTableHeader().setReorderingAllowed(false); argTable.setColumnSelectionAllowed(false); argTable.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); JScrollPane scrollPane = new JScrollPane(argTable); JPanel tablePanel = new JPanel(new BorderLayout()); tablePan... | public NodeArgumentDialog(String title, Properties props, boolean isLocal) { super((Frame)null, title, true); // display modal dialog createLogger(); Box nodeArgPanel = Box.createVerticalBox(); JPanel argumentPanel = new JPanel(); // ok and cancel buttons panel JPanel buttonPanel = new JPanel(); ... | |
argumentPanel.setBorder(BorderFactory.createTitledBorder("Arguments")); args = new JTextArea(10, 40); args.setToolTipText("Enter command line args one per line"); argumentPanel.add(args); | public NodeArgumentDialog(String title, Properties props, boolean isLocal) { super((Frame)null, title, true); // display modal dialog createLogger(); Box nodeArgPanel = Box.createVerticalBox(); JPanel argumentPanel = new JPanel(); // ok and cancel buttons panel JPanel buttonPanel = new JPanel(); ... | |
this.props = props; String value = props.getProperty(CSMARTConsole.COMMAND_ARGUMENTS); setArguments(value); model = new NodeArgumentTableModel(props, isLocal); argTable.setModel(model); | public NodeArgumentDialog(String title, Properties props, boolean isLocal) { super((Frame)null, title, true); // display modal dialog createLogger(); Box nodeArgPanel = Box.createVerticalBox(); JPanel argumentPanel = new JPanel(); // ok and cancel buttons panel JPanel buttonPanel = new JPanel(); ... | |
TreePath path = hostTree.getSelectionPath(); if (path == null) { System.out.println("CSMARTConsole deleteHostMenuItem called with null path; ignoring"); return; | TreePath[] selectedPaths = hostTree.getSelectionPaths(); for (int i = 0; i < selectedPaths.length; i++) { DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)selectedPaths[i].getLastPathComponent(); ConsoleTreeObject hostCTO = (ConsoleTreeObject)selectedNode.getUserObject(); DefaultTreeModel nodeModel = (De... | public void deleteHostMenuItem_actionPerformed(ActionEvent e) { TreePath path = hostTree.getSelectionPath(); if (path == null) { System.out.println("CSMARTConsole deleteHostMenuItem called with null path; ignoring"); return; } DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)p... |
DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)path.getLastPathComponent(); ConsoleTreeObject hostCTO = (ConsoleTreeObject)selectedNode.getUserObject(); DefaultTreeModel nodeModel = (DefaultTreeModel)nodeTree.getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode)nodeModel.getRoot(); int n =... | public void deleteHostMenuItem_actionPerformed(ActionEvent e) { TreePath path = hostTree.getSelectionPath(); if (path == null) { System.out.println("CSMARTConsole deleteHostMenuItem called with null path; ignoring"); return; } DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)p... | |
private void deleteNodeFromTree(JTree tree) { TreePath path = tree.getSelectionPath(); if (path == null) { System.out.println("HostConfigurationBuilder deleteNodeMenuItem called with null path; ignoring"); return; } | private void deleteNodeFromTree(JTree tree, TreePath path) { | private void deleteNodeFromTree(JTree tree) { TreePath path = tree.getSelectionPath(); if (path == null) { System.out.println("HostConfigurationBuilder deleteNodeMenuItem called with null path; ignoring"); return; } DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)path.getLast... |
deleteNodeFromTree(hostTree); | TreePath[] selectedPaths = hostTree.getSelectionPaths(); for (int i = 0; i < selectedPaths.length; i++) deleteNodeFromTree(hostTree, selectedPaths[i]); | public void deleteNodeInHostMenuItem_actionPerformed(ActionEvent e) { deleteNodeFromTree(hostTree); // setRunButtonEnabled(); } |
deleteNodeFromTree(nodeTree); | TreePath[] selectedPaths = nodeTree.getSelectionPaths(); for (int i = 0; i < selectedPaths.length; i++) deleteNodeFromTree(nodeTree, selectedPaths[i]); | public void deleteNodeMenuItem_actionPerformed(ActionEvent e) { deleteNodeFromTree(nodeTree); } |
hostTree.setSelectionPath(selPath); DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)selPath.getLastPathComponent(); ConsoleTreeObject selected = (ConsoleTreeObject)selNode.getUserObject(); if (selected.isRoot()) hostRootMenu.show(hostTree, e.getX(), e.getY()); else if (selected.isHost()) hostHostMenu.show(hos... | TreePath[] selectedPaths = hostTree.getSelectionPaths(); if (hostTree.isPathSelected(selPath) && selectedPaths.length > 1) { boolean haveHosts = false; boolean haveNodes = false; for (int i = 0; i < selectedPaths.length; i++) { DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)selectedPaths[i].getLastPathCompone... | public void displayHostTreeMenu(MouseEvent e) { TreePath selPath = hostTree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // set the selected node to be the node the mouse is pointing at hostTree.setSelectionPath(selPath); DefaultMutableTreeNode selNode = (DefaultMutabl... |
nodeTree.setSelectionPath(selPath); DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)selPath.getLastPathComponent(); ConsoleTreeObject selected = (ConsoleTreeObject)selNode.getUserObject(); if (selected.isRoot()) nodeRootMenu.show(nodeTree, e.getX(), e.getY()); else if (selected.isNode()) nodeNodeMenu.show(nod... | TreePath[] selectedPaths = nodeTree.getSelectionPaths(); if (nodeTree.isPathSelected(selPath) && selectedPaths.length > 1) { boolean haveNodes = false; for (int i = 0; i < selectedPaths.length; i++) { DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)selectedPaths[i].getLastPathComponent(); ConsoleTreeObject sel... | public void displayNodeTreeMenu(MouseEvent e) { TreePath selPath = nodeTree.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // set the selected node to be the node the mouse is pointing at nodeTree.setSelectionPath(selPath); DefaultMutableTreeNode selNode = (DefaultMutabl... |
JMenuItem newNodeInHostMenuItem = new JMenuItem(NEW_NODE_MENU_ITEM); | newNodeInHostMenuItem = new JMenuItem(NEW_NODE_MENU_ITEM); | 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... |
JMenuItem cmdLineNodeInHostMenuItem = | cmdLineNodeInHostMenuItem = | 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... |
JMenuItem cmdLineNodeMenuItem = new JMenuItem(NODE_COMMAND_LINE_MENU_ITEM); | cmdLineNodeMenuItem = new JMenuItem(NODE_COMMAND_LINE_MENU_ITEM); | 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... |
DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)tree.getSelectionPath().getLastPathComponent(); ConsoleTreeObject cto = (ConsoleTreeObject)selectedNode.getUserObject(); ConfigurableComponent component = (ConfigurableComponent)cto.getComponent(); component.addProperty(name, value); | TreePath[] selectedPaths = tree.getSelectionPaths(); for (int i = 0; i < selectedPaths.length; i++) { DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)selectedPaths[i].getLastPathComponent(); ConsoleTreeObject cto = (ConsoleTreeObject)selectedNode.getUserObject(); ConfigurableComponent component = (Configu... | private void setPropertyOfNode(JTree tree, String name, String value) { DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)tree.getSelectionPath().getLastPathComponent(); ConsoleTreeObject cto = (ConsoleTreeObject)selectedNode.getUserObject(); ConfigurableComponent component = (Configur... |
Object source = e.getSource(); if (hostTree.getModel().equals(source)) setNameServerHostName(); experimentBuilder.setModified(true); | if (hostTree.getModel().equals(source)) { DefaultMutableTreeNode parent = (DefaultMutableTreeNode)e.getTreePath().getLastPathComponent(); if (((ConsoleTreeObject)parent.getUserObject()).isRoot()) { setNameServerHostName(); experimentBuilder.setModified(true); return; } } if (hostTree.getModel().equals(source) || nodeT... | public void treeNodesChanged(TreeModelEvent e) { // System.out.println("Tree Node Changed: " + // ((ConsoleTreeObject)((DefaultMutableTreeNode)e.getTreePath().getLastPathComponent()).getUserObject()).getName()); Object source = e.getSource(); if (hostTree.getModel().equals(source)... |
return newInstance(parts[0], parts[1], parts[2]); | String revision = parts[2]; if (NO_REVISION.equals(revision)) { revision = ""; } return newInstance(parts[0], parts[1], revision); | public static ModuleRevisionId decode(String encoded) { String[] parts = encoded.split(ENCODE_SEPARATOR); if (parts.length != 3) { throw new IllegalArgumentException("badly encoded module revision id: '"+encoded+"'"); } return newInstance(parts[0], parts[1], parts[2]); } |
return getOrganisation() + ENCODE_SEPARATOR+getName()+ ENCODE_SEPARATOR+getRevision(); | String revision = getRevision(); if ((revision == null) || (revision.length() == 0)) { revision = NO_REVISION; } return getOrganisation() + ENCODE_SEPARATOR + getName()+ ENCODE_SEPARATOR + revision; | public String encodeToString() { return getOrganisation() + ENCODE_SEPARATOR+getName()+ ENCODE_SEPARATOR+getRevision(); } |
} if (bigArray != bigArrayVBO) { | public void display(GLDrawable drawable) { // Don't try to do OpenGL operations if we're tearing things down if (quit) { return; } GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); // Check to see whether to animate if (getFlag(' ')) { phase += phaseRate; ... | |
public abstract FloatBuffer put (int index, float b); | public FloatBuffer put (FloatBuffer src) { if (src == this) throw new IllegalArgumentException (); if (src.remaining () > remaining ()) throw new BufferOverflowException (); if (src.remaining () > 0) { float[] toPut = new float [src.remaining ()]; src.get (toPut); src.put (toPut); } return this; } | public abstract FloatBuffer put (int index, float b); |
public final Buffer position (int newPosition) | public final int position () | public final Buffer position (int newPosition) { if ((newPosition < 0) || (newPosition > limit)) throw new IllegalArgumentException (); if (newPosition <= mark) mark = -1; pos = newPosition; return this; } |
if ((newPosition < 0) || (newPosition > limit)) throw new IllegalArgumentException (); if (newPosition <= mark) mark = -1; pos = newPosition; return this; | return pos; | public final Buffer position (int newPosition) { if ((newPosition < 0) || (newPosition > limit)) throw new IllegalArgumentException (); if (newPosition <= mark) mark = -1; pos = newPosition; return this; } |
ACC_PUBLIC, | ACC_FINAL | ( mtd.getModifiers() & ~ACC_ABSTRACT & ~ACC_NATIVE & ~ACC_SYNCHRONIZED ), | private static MethodGen toMethodGen( java.lang.reflect.Method mtd, String className, InstructionList il, ConstantPoolGen cp) { return new MethodGen( ACC_PUBLIC, toType(mtd.getReturnType()), toType(mtd.getParameterTypes()), null, mtd.getName(), cl... |
modified = false; fireModification(new ModificationEvent(this, RECIPE_SAVED)); | private void initFromDatabase() { if(assemblyId != null) { try { dbp = DBProperties.readQueryFile(DBUtils.QUERY_FILE); } catch (IOException ioe) { if(log.isErrorEnabled()) { log.error("IO Exception reading Query File", ioe); } } initAgentsFromDb(); initPlugins... | |
modified = false; fireModification(new ModificationEvent(this, RECIPE_SAVED)); | public void initProperties() { propAssemblyId = addProperty(ASSEMBLY_PROP, ((assemblyId != null) ? assemblyId : "")); propAssemblyId.setVisible(false); if(assemblyId != null) { if(cdata != null) initFromCData(); else initFromDatabase(); } else if (cdata != null) { initFromCDa... | |
if(name.startsWith("$$CP")) { int start = name.indexOf("."); String component = name.substring((start+1), name.indexOf(".", (start+1))); | if(name.startsWith("$$CP=")) { int start = name.indexOf("="); String component = name.substring(start+1); | private void initTargetsFromDb() { Map substitutions = new HashMap(); if (recipeId != null) { substitutions.put(":recipe_id", recipeId); try { Connection conn = DBUtils.getConnection(); try { Statement stmt = conn.createStatement(); String query = DBUtils.getQuery("queryRecipeProperties", substitu... |
ConfigurableComponent cc = (ConfigurableComponent)getChild(i); if(cc.getShortName().equals(component)) { cc.addProperty(name.substring(name.lastIndexOf(".")+1), rs.getString(2)); | ComponentBase cc = (ComponentBase)getChild(i); String tag = cc.getComponentClassName() + "-" + i; if(log.isDebugEnabled()) { log.debug("Compare with: " + tag); } if(tag.equals(component)) { if(log.isDebugEnabled()) { log.debug("Found Desired Parent: " + tag + " adding parameter"); } cc.addProperty(PROP_TARGET_COMPONENT... | private void initTargetsFromDb() { Map substitutions = new HashMap(); if (recipeId != null) { substitutions.put(":recipe_id", recipeId); try { Connection conn = DBUtils.getConnection(); try { Statement stmt = conn.createStatement(); String query = DBUtils.getQuery("queryRecipeProperties", substitu... |
public AgentDBComponent(String name, List assemblyID) { super(name); this.name = name; this.assemblyID = assemblyID; createLogger(); | public AgentDBComponent() { this("Name", new ArrayList()); | public AgentDBComponent(String name, List assemblyID) { super(name); this.name = name; this.assemblyID = assemblyID; createLogger(); } |
if (response != null && (response.headerForKey(ERXSession.DONT_STORE_PAGE) != null || (response.userInfo() != null && response.userInfo().objectForKey(ERXSession.DONT_STORE_PAGE) != null))) { String pageCacheKey = response.headerForKey(ERXSession.PAGE_REPLACEMENT_CACHE_LOOKUP_KEY); | if (shouldNotStorePage(response) || shouldNotStorePage(request) || request.formValueForKey("AJAX_SUBMIT_BUTTON_NAME") != null) { String pageCacheKey = null; if (response != null) { pageCacheKey = response.headerForKey(ERXSession.PAGE_REPLACEMENT_CACHE_LOOKUP_KEY); } if (pageCacheKey == null && request != null) { pageCa... | public void savePage(WOComponent page) { WOContext context = context(); WOResponse response = context.response(); if (response != null && (response.headerForKey(ERXSession.DONT_STORE_PAGE) != null || (response.userInfo() != null && response.userInfo().objectForKey(ERXSession.DONT_STORE_PAGE) != null))) { ... |
System.out.println("ERXSession.savePage: regular save page"); | public void savePage(WOComponent page) { WOContext context = context(); WOResponse response = context.response(); if (response != null && (response.headerForKey(ERXSession.DONT_STORE_PAGE) != null || (response.userInfo() != null && response.userInfo().objectForKey(ERXSession.DONT_STORE_PAGE) != null))) { ... | |
public void setEncodingToResponse(WOResponse response) { setEncodingToResponse(response, encoding()); | public static void setEncodingToResponse(WOResponse response, String encoding) { if (! availableEncodings().containsObject(encoding)) throw createIllegalArgumentException(encoding, "encoding", "availableEncodings()"); String mimeType = response.headerForKey("Content-Type"); if(mimeType != null && mimeType.equals("te... | public void setEncodingToResponse(WOResponse response) { setEncodingToResponse(response, encoding()); } |
log.info("Factory null creating default browser factory. " + browserFactoryClass); | log.debug("Factory null creating default browser factory. " + browserFactoryClass); | public static ERXBrowserFactory factory() { if (_factory == null) { String browserFactoryClass = System.getProperty("er.extensions.ERXBrowserFactory.FactoryClassName"); if (browserFactoryClass != null && !browserFactoryClass.equals("er.extensions.ERXBrowserFactory")) { lo... |
public void setDefaultFormValueEncodingToRequest(WORequest request) { setDefaultFormValueEncodingToRequest(request, encoding()); | public static void setDefaultFormValueEncodingToRequest(WORequest request, String encoding) { if (! availableEncodings().containsObject(encoding)) throw createIllegalArgumentException(encoding, "encoding", "availableEncodings()"); request.setDefaultFormValueEncoding (encoding); request.setFormValueEncodingDetectionEna... | public void setDefaultFormValueEncodingToRequest(WORequest request) { setDefaultFormValueEncodingToRequest(request, encoding()); } |
firePropertyRemoved(new PropertyEvent(p, PropertyEvent.PROPERTY_ADDED)); | firePropertyRemoved(new PropertyEvent(p, PropertyEvent.PROPERTY_REMOVED)); | private void firePropertyRemoved(Property p) { firePropertyRemoved(new PropertyEvent(p, PropertyEvent.PROPERTY_ADDED)); } |
createLogger(); if(log.isDebugEnabled()) { log.debug(" setting up subscriptions"); } | public void setupSubscriptions() { createLogger(); if(log.isDebugEnabled()) { log.debug(" setting up subscriptions"); } // get the service broker ServiceBroker serviceBroker = getBindingSite().getServiceBroker(); // get the MessageTransport controller mtController = (SlowMessageTransportSer... | |
log = (LoggingService) serviceBroker.getService(this, LoggingService.class, null); | public void setupSubscriptions() { createLogger(); if(log.isDebugEnabled()) { log.debug(" setting up subscriptions"); } // get the service broker ServiceBroker serviceBroker = getBindingSite().getServiceBroker(); // get the MessageTransport controller mtController = (SlowMessageTransportSer... | |
if(log.isDebugEnabled()) { log.debug("Substitutions: " + substitutions); } | private void cleanTrial(String cmtType, String hnaType, String csmiType, String oldTrialId) throws SQLException { substitutions.put(":trial_id:", oldTrialId); substitutions.put(":cmt_type:", cmtType); substitutions.put(":hna_type:", hnaType); substitutions.put(":csmi_type:", cs... | |
runStart = new Date(); | private void createNodes() { ConfigurationWriter configWriter = experiment.getConfigurationWriter(nodesToRun); boolean haveRunningNode = false; for (int i = 0; i < nodesToRun.length; i++) { NodeComponent nodeComponent = nodesToRun[i]; if (createNode(nodeComponent, nodeComponent.toString(), ... | |
return agentName + fileDateFormat.format(new Date()) + ".log"; | return agentName + fileDateFormat.format(runStart) + ".log"; | private String getLogFileName(String agentName) { return agentName + fileDateFormat.format(new Date()) + ".log"; } |
"Results-" + fileDateFormat.format(new Date()); | "Results-" + fileDateFormat.format(runStart); | private void saveResults() { if (currentTrial < 0) return; // nothing to save File resultDir = getResultDir(); if (resultDir == null) return; // can't save, user didn't specify metrics directory Trial trial = experiment.getTrials()[currentTrial]; String dirname = resultDir.getAbsolutePath() +... |
trial.addTrialResult(new TrialResult(new Date(), url)); | trial.addTrialResult(new TrialResult(runStart, url)); | private void saveResults() { if (currentTrial < 0) return; // nothing to save File resultDir = getResultDir(); if (resultDir == null) return; // can't save, user didn't specify metrics directory Trial trial = experiment.getTrials()[currentTrial]; String dirname = resultDir.getAbsolutePath() +... |
{ } | { this(SwingConstants.TOP, WRAP_TAB_LAYOUT); } | public JTabbedPane() { } |
public PropertyEditorPanel(ModifiableConfigurableComponent[] configComps) { | public PropertyEditorPanel(ModifiableConfigurableComponent configComp) { | public PropertyEditorPanel(ModifiableConfigurableComponent[] configComps) { // create the configComp panel configCompPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); setLayout(new BorderLayout()); add(configCompPanel, BorderLayout.CENTER); compsToConfig = configComps; componentToConfigure = conf... |
compsToConfig = configComps; componentToConfigure = configComps[0]; isEditable = true; for (int i = 0; i < configComps.length; i++) { if (! (configComps[i].isEditable())) { isEditable = false; break; } } | componentToConfigure = configComp; compsToConfig = new ModifiableConfigurableComponent[1]; compsToConfig[0] = configComp; isEditable = componentToConfigure.isEditable(); | public PropertyEditorPanel(ModifiableConfigurableComponent[] configComps) { // create the configComp panel configCompPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); setLayout(new BorderLayout()); add(configCompPanel, BorderLayout.CENTER); compsToConfig = configComps; componentToConfigure = conf... |
Action clearAction = new AbstractAction(CLEAR_ACTION) { public void actionPerformed(ActionEvent e) { clear_actionPerformed(); } }; clearAction.setEnabled(false); editMenu.add(clearAction); | public ConsoleInternalFrame(NodeComponent node, ConsoleNodeListener listener, JScrollPane pane, JRadioButton statusButton, String logFileName, NodeServesClient nodeServer) ... | |
mi.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, Event.CTRL_MASK)); | public ConsoleInternalFrame(NodeComponent node, ConsoleNodeListener listener, JScrollPane pane, JRadioButton statusButton, String logFileName, NodeServesClient nodeServer) ... | |
mi.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, | mi.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, | public ConsoleInternalFrame(NodeComponent node, ConsoleNodeListener listener, JScrollPane pane, JRadioButton statusButton, String logFileName, NodeServesClient nodeServer) ... |
selectAll_actionPerformed(); | find_actionPerformed(); | public void actionPerformed(ActionEvent e) { selectAll_actionPerformed(); } |
find_actionPerformed(); | findNext_actionPerformed(); | public void actionPerformed(ActionEvent e) { find_actionPerformed(); } |
findNext_actionPerformed(); | displayLog_actionPerformed(); | public void actionPerformed(ActionEvent e) { findNext_actionPerformed(); } |
displayLog_actionPerformed(); | setViewSize_actionPerformed(); | public void actionPerformed(ActionEvent e) { displayLog_actionPerformed(); } |
setViewSize_actionPerformed(); | filter_actionPerformed(); | public void actionPerformed(ActionEvent e) { setViewSize_actionPerformed(); } |
filter_actionPerformed(); | public void actionPerformed(ActionEvent e) { filter_actionPerformed(); } | |
trace_actionPerformed(); | public void actionPerformed(ActionEvent e) { } | |
trace_actionPerformed(); | notify_actionPerformed(); | public void actionPerformed(ActionEvent e) { trace_actionPerformed(); } |
notify_actionPerformed(); | removeNotify_actionPerformed(); | public void actionPerformed(ActionEvent e) { notify_actionPerformed(); } |
removeNotify_actionPerformed(); | notifyNext_actionPerformed(); | public void actionPerformed(ActionEvent e) { removeNotify_actionPerformed(); } |
notifyNext_actionPerformed(); | resetNotifyAction_actionPerformed(); | public void actionPerformed(ActionEvent e) { notifyNext_actionPerformed(); } |
clear_actionPerformed(); | selectAll_actionPerformed(); | public void actionPerformed(ActionEvent e) { clear_actionPerformed(); } |
SET_NOTIFY_ACTION); am.put(SET_NOTIFY_ACTION, notifyAction); im.put(KeyStroke.getKeyStroke(KeyEvent.VK_O, Event.CTRL_MASK), | private void initKeyMap(ConsoleTextPane pane) { InputMap im = pane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW); ActionMap am = pane.getActionMap(); im.put(KeyStroke.getKeyStroke(KeyEvent.VK_F, Event.CTRL_MASK), FIND_ACTION); am.put(FIND_ACTION, findAction); im.put(KeyStroke.getKeyStroke(K... | |
String s = (String)JOptionPane.showInputDialog(this, "Search string:", "Notification", JOptionPane.QUESTION_MESSAGE, null, null, consoleTextPane.getNotifyCondition()); setNotification(s); | JPanel notifyPanel = new JPanel(new GridBagLayout()); int x = 0; int y = 0; notifyPanel.add(new JLabel("Search string:"), new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(10, 0, 5, 5), 0, 0)); JTextField notifyField = new JTextField(20); notifyField.setText(con... | private void notify_actionPerformed() { String s = (String)JOptionPane.showInputDialog(this, "Search string:", "Notification", JOptionPane.QUESTION_MESSAGE, ... |
((NodeStatusButton)statusButton).setNotifyOnStandardError(false); | private void removeNotify_actionPerformed() { setNotification(null); ((NodeStatusButton)statusButton).clearError(); } | |
if (parent == null) { | if (parent == null || node == parent) { | private void resolveConflict(IvyNode node, IvyNode parent, Collection toevict) { if (parent == null) { return; } if (node.getId().equals(node.getResolvedId()) && parent.getResolvedRevisions(node.getModuleId(), node.getRootModuleConf()).contains(node.getId())) { // resolve ... |
if (readOnlyKeys == null) return false; if (readOnlyKeys.contains(key)) return true; if (defaults instanceof ReadOnlyProperties) { return ((ReadOnlyProperties) defaults).isReadOnly(key); } return false; | if (readOnlyKeys == null) return false; if (readOnlyKeys.contains(key)) return true; if (defaults instanceof ReadOnlyProperties) { return ((ReadOnlyProperties) defaults).isReadOnly(key); | public boolean isReadOnly(Object key) { if (readOnlyKeys == null) return false; if (readOnlyKeys.contains(key)) return true; if (defaults instanceof ReadOnlyProperties) { return ((ReadOnlyProperties) defaults).isReadOnly(key); } return false; } |
return false; } | public boolean isReadOnly(Object key) { if (readOnlyKeys == null) return false; if (readOnlyKeys.contains(key)) return true; if (defaults instanceof ReadOnlyProperties) { return ((ReadOnlyProperties) defaults).isReadOnly(key); } return false; } | |
if (System.getProperty("org.cougaar.tools.csmart.allowComplexRecipeQueries", "false").equalsIgnoreCase("true")) { | if (doComplex) { | public void saveToDb(DBConflictHandler ch) { PopulateDb pdb = null; // To debug slow saves, bug 2002. // Added per bug 2015 long saveStartTime = Calendar.getInstance().getTimeInMillis(); if (log.isShoutEnabled()) log.shout("saveToDb starting save"); // Make sure we have the Community Assembly s... |
} else { if (log.isWarnEnabled()) log.warn("saveToDb not allowing complex recipe queries. Only queries based on Agent names, Node names, Host names, and community information, and non-recipe component information will work."); | public void saveToDb(DBConflictHandler ch) { PopulateDb pdb = null; // To debug slow saves, bug 2002. // Added per bug 2015 long saveStartTime = Calendar.getInstance().getTimeInMillis(); if (log.isShoutEnabled()) log.shout("saveToDb starting save"); // Make sure we have the Community Assembly s... | |
if (! System.getProperty("org.cougaar.tools.csmart.allowComplexRecipeQueries", "false").equalsIgnoreCase("true")) { if (log.isWarnEnabled()) log.warn("saveToDb now save all modifications"); | if (! doComplex) { if (log.isInfoEnabled()) log.info("saveToDb: Now saving all modifications at once."); | public void saveToDb(DBConflictHandler ch) { PopulateDb pdb = null; // To debug slow saves, bug 2002. // Added per bug 2015 long saveStartTime = Calendar.getInstance().getTimeInMillis(); if (log.isShoutEnabled()) log.shout("saveToDb starting save"); // Make sure we have the Community Assembly s... |
if (file == null) { if (log.isErrorEnabled()) log.error("dumpCommXML: unable to get file " + xmlFileFullName); return false; } | public static boolean dumpCommunityXML(String xmlFileFullName, String assemblyID) { if (log.isDebugEnabled()) { log.debug("dumpCommXML with filename: " + xmlFileFullName + " and ASB " + assemblyID); } File file = new File(xmlFileFullName); try { if(file.exists()) { file.delete(); ... | |
protected long getTimeInMillis() | public long getTimeInMillis() | protected long getTimeInMillis() { if (!isTimeSet) computeTime(); return time; } |
public static Object enhance( Class cls, Class interfaces[], MethodInterceptor ih) { return enhance( cls, interfaces, ih, null, null); } | public static Factory enhance(Class clazz, MethodInterceptor interceptor ){ return (Factory)enhanceHelper( clazz.isInterface() ? null : clazz, clazz.isInterface() ? new Class[]{clazz} : null , interceptor, clazz.getClassLoader(), null, null ); } | public static Object enhance( Class cls, Class interfaces[], MethodInterceptor ih) { return enhance( cls, interfaces, ih, null, null); } |
NSMutableSet frameworkNames = new NSMutableSet(); | NSMutableArray frameworkNames = new NSMutableArray(); | public static NSArray allFrameworkNames() { NSMutableSet frameworkNames = new NSMutableSet(); for (Enumeration e = NSBundle.frameworkBundles().objectEnumerator(); e.hasMoreElements();) { NSBundle bundle = (NSBundle)e.nextElement(); String frameworkName = D2WModel.nameFromFramewor... |
return frameworkNames.allObjects(); | cat.info(frameworkNames); return frameworkNames; | public static NSArray allFrameworkNames() { NSMutableSet frameworkNames = new NSMutableSet(); for (Enumeration e = NSBundle.frameworkBundles().objectEnumerator(); e.hasMoreElements();) { NSBundle bundle = (NSBundle)e.nextElement(); String frameworkName = D2WModel.nameFromFramewor... |
private int current; | private int current = 0; | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... |
return current < 2; | return current >= 2; | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.