rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
tk_class_name = "gnu.awt.peer.gtk.GTKToolkit"; | tk_class_name = "gnu.awt.gtk.GtkToolkit"; | public static Toolkit getDefaultToolkit() { if (defaultToolkit != null) return defaultToolkit; Class toolkit_class; String tk_class_name = System.getProperty("awt.toolkit"); if (tk_class_name == null) tk_class_name = "gnu.awt.peer.gtk.GTKToolkit"; try { toolkit_class = Class.forN... |
assertEquals(12, dependencies.length); | assertEquals(13, dependencies.length); | public void testFull() throws Exception { ModuleDescriptor md = XmlModuleDescriptorParser.parseDescriptor(_ivy, getClass().getResource("test.xml"), true); assertNotNull(md); assertEquals("myorg", md.getModuleRevisionId().getOrganisation()); assertEquals("mymodule", md.getModuleRevisionId... |
assertFalse(dd.isChanging()); assertTrue(dd.isTransitive()); dd = getDependency(dependencies, "mymodule3"); assertNotNull(dd); assertTrue(dd.isChanging()); assertFalse(dd.isTransitive()); | public void testFull() throws Exception { ModuleDescriptor md = XmlModuleDescriptorParser.parseDescriptor(_ivy, getClass().getResource("test.xml"), true); assertNotNull(md); assertEquals("myorg", md.getModuleRevisionId().getOrganisation()); assertEquals("mymodule", md.getModuleRevisionId... | |
public GregorianCalendar(int year, int month, int day, int hour, int minute, int second) | public GregorianCalendar() | public GregorianCalendar(int year, int month, int day, int hour, int minute, int second) { super(); set(year, month, day, hour, minute, second); } |
super(); set(year, month, day, hour, minute, second); | this(TimeZone.getDefault(), Locale.getDefault()); | public GregorianCalendar(int year, int month, int day, int hour, int minute, int second) { super(); set(year, month, day, hour, minute, second); } |
cat.info(frameworkNames); | public static NSArray allFrameworkNames() { NSMutableArray frameworkNames = new NSMutableArray(); for (Enumeration e = NSBundle.frameworkBundles().objectEnumerator(); e.hasMoreElements();) { NSBundle bundle = (NSBundle)e.nextElement(); String frameworkName = D2WModel.nameFromFram... | |
int start = indexString == null ? 0 : index; int end = indexString == null ? count : (index + 1); WOActionResults woactionresults = null; for (int i = start; i < end && woactionresults == null; i++) { _prepareForIterationWithIndex(context, i, wocontext, wocomponent); | if(indexString != null) { if (_item != null) { Object object = context.objectAtIndex(index); _item._setValueNoValidation(object, wocomponent); } if (_index != null) { Integer integer = ERXConstant.integerForInt(index); _index._setValueNoValidation(integer, wocomponent); } wocontext.appendElementIDComponent(indexString)... | public WOActionResults invokeAction(WORequest worequest, WOContext wocontext) { WOComponent wocomponent = wocontext.component(); Context context = createContext(wocomponent); int count = _count(context, wocomponent); String indexString = _indexOfChosenItem(worequest, woco... |
} if (count > 0) { _cleanupAfterIteration(count, wocontext, wocomponent); | wocontext.deleteLastElementIDComponent(); } else { int start = indexString == null ? 0 : index; int end = indexString == null ? count : (index + 1); for (int i = start; i < end && woactionresults == null; i++) { _prepareForIterationWithIndex(context, i, wocontext, wocomponent); woactionresults = super.invokeAction(w... | public WOActionResults invokeAction(WORequest worequest, WOContext wocontext) { WOComponent wocomponent = wocontext.component(); Context context = createContext(wocomponent); int count = _count(context, wocomponent); String indexString = _indexOfChosenItem(worequest, woco... |
for (int i = 0; i < cnt; i++) { | for (int i = cnt - 1; i >= 0; i--) { | protected NSArray fixAbbreviationArray(NSArray languages) { NSMutableArray nsmutablearray = new NSMutableArray(languages.count()); int cnt = languages.count(); for (int i = 0; i < cnt; i++) { String string = (String) languages.objectAtIndex(i); int offset; strin... |
String cooked; cooked = string.substring(0, 2); cooked = cooked + "_"; cooked = cooked + string.substring(offset+1, offset+3); string = cooked; | String langPrefix = string.substring(0, 2); if (!nsmutablearray.containsObject(langPrefix)) nsmutablearray.insertObjectAtIndex(langPrefix, 0); StringBuffer cooked = new StringBuffer(string.length()); cooked.append(langPrefix) .append("_") .append(string.substring(offset+1, offset+3)); string = cooked.toString(); | protected NSArray fixAbbreviationArray(NSArray languages) { NSMutableArray nsmutablearray = new NSMutableArray(languages.count()); int cnt = languages.count(); for (int i = 0; i < cnt; i++) { String string = (String) languages.objectAtIndex(i); int offset; strin... |
nsmutablearray.addObject(string); | nsmutablearray.insertObjectAtIndex(string, 0); | protected NSArray fixAbbreviationArray(NSArray languages) { NSMutableArray nsmutablearray = new NSMutableArray(languages.count()); int cnt = languages.count(); for (int i = 0; i < cnt; i++) { String string = (String) languages.objectAtIndex(i); int offset; strin... |
if(!task().isDone()) { String modifiedDynamicUrl = aContext.urlWithRequestHandlerKey(WOApplication.application().componentRequestHandlerKey(), null, null); String header = "" +refreshInterval()+ ";url=" +modifiedDynamicUrl+ "/" + aContext.session().sessionID()+ "/" +aContext.contextID()+ "." +WOMetaRefreshSenderId; a... | if(!done || (doneButNotRefreshed)) { | public void appendToResponse(WOResponse aResponse, WOContext aContext) { if (!_performingAction) { _performingAction = true; task().setLongResponse(this); task().start(); } // If the refreshInterval was set and we did not get a result yet, let's add the refresh... |
String header = "0;url=" +modifiedDynamicUrl+ "/" + aContext.session().sessionID()+ "/" +aContext.contextID()+ "." +WOMetaRefreshSenderId; | String header = interval + ";url=" +modifiedDynamicUrl+ "/" + aContext.session().sessionID()+ "/" +aContext.contextID()+ "." +WOMetaRefreshSenderId; | public void appendToResponse(WOResponse aResponse, WOContext aContext) { if (!_performingAction) { _performingAction = true; task().setLongResponse(this); task().start(); } // If the refreshInterval was set and we did not get a result yet, let's add the refresh... |
_doneAndRefreshed = true; | if((doneButNotRefreshed)) { _doneAndRefreshed = true; } | public void appendToResponse(WOResponse aResponse, WOContext aContext) { if (!_performingAction) { _performingAction = true; task().setLongResponse(this); task().start(); } // If the refreshInterval was set and we did not get a result yet, let's add the refresh... |
if ( myUdhElements == null) { return null; } | public byte[] getUserDataHeaders() { ByteArrayOutputStream baos = new ByteArrayOutputStream(100); try { for(int i=0; i < myUdhElements.length; i++) { myUdhElements[i].writeTo(baos); } } catch (IOException ioe) { ... | |
Message.info("\tpublished "+artifact.getName()+" to "+dest); | Message.info("\tpublished "+artifact.getName()+" to "+hidePassword(dest)); | public void publish(Artifact artifact, File src, boolean overwrite) throws IOException { String destPattern; if ("ivy".equals(artifact.getType()) && !getIvyPatterns().isEmpty()) { destPattern = (String)getIvyPatterns().get(0); } else if (!getArtifactPatterns().isEmpty()) { ... |
FileDescriptor desc = new FileDescriptor (); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkWrite (desc); | if (directory == null) { String dirname = tmpdir; if (dirname == null) throw new IOException("Cannot determine system temporary directory"); directory = new File(dirname); if (!directory.exists()) throw new IOException("System temporary directory " + directory.getName() + " does not exist."); if (!directory.isDirector... | public static File createTempFile (String prefix, String suffix, File directory) throws IOException { FileDescriptor desc = new FileDescriptor (); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkWrite (desc); if (prefix.length () < 3) throw new IllegalArgumentE... |
throw new IllegalArgumentException (); | throw new IllegalArgumentException ("Prefix too short: " + prefix); | public static File createTempFile (String prefix, String suffix, File directory) throws IOException { FileDescriptor desc = new FileDescriptor (); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkWrite (desc); if (prefix.length () < 3) throw new IllegalArgumentE... |
File ret = new File (""); | File f; | public static File createTempFile (String prefix, String suffix, File directory) throws IOException { FileDescriptor desc = new FileDescriptor (); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkWrite (desc); if (prefix.length () < 3) throw new IllegalArgumentE... |
desc = new FileDescriptor (l, FileDescriptor.WRITE | FileDescriptor.EXCL); desc.close (); ret.setPath(l); return ret; | f = new File(directory, l); if (f.exists()) continue; else { String af = f.getAbsolutePath (); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkWrite (af); FileDescriptor fd = new FileDescriptor (af, FileDescriptor.WRITE | FileDescriptor.EXCL); fd.close (); return f; } | public static File createTempFile (String prefix, String suffix, File directory) throws IOException { FileDescriptor desc = new FileDescriptor (); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkWrite (desc); if (prefix.length () < 3) throw new IllegalArgumentE... |
throw new IOException ("couldn't make temp file"); | throw new IOException ("cannot create temporary file"); | public static File createTempFile (String prefix, String suffix, File directory) throws IOException { FileDescriptor desc = new FileDescriptor (); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkWrite (desc); if (prefix.length () < 3) throw new IllegalArgumentE... |
if (task.scheduled >= 0) | if (! queue.isStopped () && task.scheduled >= 0) | public void run() { TimerTask task; while ((task = queue.serve()) != null) { // If this task has not been canceled if (task.scheduled >= 0) { // Mark execution time task.lastExecutionTime = task.scheduled; // Repeatable task? if (task.period < 0) { // Last time this ... |
ArrayList newNames = dialog.getNodeArgumentNames(); ArrayList newValues = dialog.getNodeArgumentValues(); i = component.getPropertyNames(); while (i.hasNext()) { CompositeName name = (CompositeName)i.next(); if (!newNames.contains(name)) { System.out.println("Remove: " + name); } } for (int j = 0; j < names.size(); j+... | public void cmdLineNodeMenuItem_actionPerformed(JTree tree) { ArrayList names = new ArrayList(); ArrayList values = new ArrayList(); NodeArgumentDialog dialog = new NodeArgumentDialog(); DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)tree.getSelectionPath().getLastPathComponent(); C... | |
try { path = file.getCanonicalPath(); } catch (Exception e) { | if (file != null) { try { path = file.getCanonicalPath(); } catch (Exception e) { if(log.isWarnEnabled()) { log.warn("Could not find: " + filename); } } } else { | public static String getPath(String filename) { Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.util.Util"); ConfigFinder configFinder = ConfigFinder.getInstance(); File file = configFinder.locateFile(filename); String path = null; try { path = file.getCanonicalPath(); } catch (Ex... |
Component c = argTable.getEditorComponent(); if (c != null) if (c instanceof JTextField) { int rowIndex = argTable.getEditingRow(); int colIndex = argTable.getEditingColumn(); if (rowIndex != -1 && colIndex != -1) argTable.getModel().setValueAt(((JTextField)c).getText(), rowIndex, colIndex); } else System.out.println("... | public NodeArgumentDialog(String title) { super((Frame)null, title, true); // display modal dialog Box nodeArgPanel = Box.createVerticalBox(); JPanel argumentPanel = new JPanel(); // ok and cancel buttons panel JPanel buttonPanel = new JPanel(); JButton okButton = new JButton("OK"); okButton.addA... | |
public static Border createBevelBorder(int type) { return null; } | public static Border createBevelBorder (int type) { return new BevelBorder (type); } | public static Border createBevelBorder(int type) { /* Create a beveled border of the specified type, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. (In a lowered border, shadows are on top and highlights are underneath.). Parameters: type - ... |
writer.println("uic = " + aad.getUIC()); | writer.println("uic = " + ((aad == null) ? "UIC/" + ac.getName() : aad.getUIC())); | private void writeAgentFile(File configDir, AgentComponentData ac) throws IOException { PrintWriter writer = new PrintWriter(new FileWriter(new File(configDir, ac.getName() + ".ini"))); try { writer.println("[ Cluster ]"); writer.println("class = " + ac.getClassName()); AgentAssetData aad = ac.ge... |
super(new SimpleName(name)); | super(SimpleName.getSimpleName(name)); | public ComponentName(BaseComponent cc, String name) { super(new SimpleName(name)); component = cc; } |
public void dragDropEnd(DragSourceDragEvent e) | public void dragDropEnd(DragSourceDropEvent e) | public void dragDropEnd(DragSourceDragEvent e) { } |
public void dragExit(DragSourceDragEvent e) | public void dragExit(DragSourceEvent e) | public void dragExit(DragSourceDragEvent e) { } |
throw new JellyException( "Unable to locate a transition." ); | return; | public void doTag(final XMLOutput output) throws Exception { TransitionTag transitionTag = (TransitionTag) findAncestorWithClass( TransitionTag.class ); if ( transitionTag == null ) { throw new JellyException( "Unable to locate a transition." ); } Transition transiti... |
final Script script = getBody(); Guard guard = new Guard() { public boolean test(Transition transition, ProcessContext procession) { try { script.run( getContext(), output ); } catch (PassException e) { return true; } catch (FailException e) { return false; } catch (JellyException e) { return false; } catch (Exception... | public void doTag(final XMLOutput output) throws Exception { TransitionTag transitionTag = (TransitionTag) findAncestorWithClass( TransitionTag.class ); if ( transitionTag == null ) { throw new JellyException( "Unable to locate a transition." ); } Transition transiti... | |
task.getProject().addBuildListener(new BuildListener() { private int stackDepth = 0; public void buildFinished(BuildEvent event) { } public void buildStarted(BuildEvent event) { } public void targetStarted(BuildEvent event) { } public void targetFinished(BuildEvent event) { } public void taskStarted(BuildEvent event) {... | public AntMessageImpl(Task task) { _task = task; } | |
_impl = null; | IvyContext.getContext().setMessageImpl(null); | public static void uninit() { _impl = null; } |
static int ceiNext (CollationElementIterator cei) | int ceiNext (CollationElementIterator cei) | static int ceiNext (CollationElementIterator cei) { if (cei.lookahead_set) { cei.lookahead_set = false; return cei.lookahead; } int save = cei.index; int max = cei.text.length(); String s = null; // It is possible to have a case where `abc' has a mapping, but // neither `ab' nor `abd' do.... |
for (i = save; i < max; ++i) | for (i = save + 1; i <= max; ++i) | static int ceiNext (CollationElementIterator cei) { if (cei.lookahead_set) { cei.lookahead_set = false; return cei.lookahead; } int save = cei.index; int max = cei.text.length(); String s = null; // It is possible to have a case where `abc' has a mapping, but // neither `ab' nor `abd' do.... |
cs = new CollationElementIterator (source); ct = new CollationElementIterator (target); | cs = new CollationElementIterator (source, this); ct = new CollationElementIterator (target, this); | public int compare (String source, String target) { CollationElementIterator cs, ct; cs = new CollationElementIterator (source); ct = new CollationElementIterator (target); while (true) { int os = next (cs, strength); int ot = next (ct, strength); if (os == CollationElementIterator.NULLORDER && ... |
return 1; | { return -1; } | public int compare (String source, String target) { CollationElementIterator cs, ct; cs = new CollationElementIterator (source); ct = new CollationElementIterator (target); while (true) { int os = next (cs, strength); int ot = next (ct, strength); if (os == CollationElementIterator.NULLORDER && ... |
return -1; | { return 1; } | public int compare (String source, String target) { CollationElementIterator cs, ct; cs = new CollationElementIterator (source); ct = new CollationElementIterator (target); while (true) { int os = next (cs, strength); int ot = next (ct, strength); if (os == CollationElementIterator.NULLORDER && ... |
return new CollationElementIterator (expand.toString()); | return new CollationElementIterator (expand.toString(), this); | public CollationElementIterator getCollationElementIterator (String source) { StringBuffer expand = new StringBuffer (source.length()); int max = source.length(); for (int i = 0; i < max; ++i) decomposeCharacter (source.charAt(i), expand); return new CollationElementIterator (expand.toString()); } |
c |= CollationElementIterator.primaryOrder(os); | c = os & ~0xffff; break; | static final int next (CollationElementIterator iter, int strength) { while (true) { int os = iter.next(); if (os == CollationElementIterator.NULLORDER) return os; int c = 0; switch (strength) { case PRIMARY: c |= CollationElementIterator.primaryOrder(os); /* Fall through. */ case SECONDARY:... |
c |= CollationElementIterator.secondaryOrder(os); | c = os & ~0x00ff; break; | static final int next (CollationElementIterator iter, int strength) { while (true) { int os = iter.next(); if (os == CollationElementIterator.NULLORDER) return os; int c = 0; switch (strength) { case PRIMARY: c |= CollationElementIterator.primaryOrder(os); /* Fall through. */ case SECONDARY:... |
c |= CollationElementIterator.tertiaryOrder(os); break; | static final int next (CollationElementIterator iter, int strength) { while (true) { int os = iter.next(); if (os == CollationElementIterator.NULLORDER) return os; int c = 0; switch (strength) { case PRIMARY: c |= CollationElementIterator.primaryOrder(os); /* Fall through. */ case SECONDARY:... | |
break; | static final int next (CollationElementIterator iter, int strength) { while (true) { int os = iter.next(); if (os == CollationElementIterator.NULLORDER) return os; int c = 0; switch (strength) { case PRIMARY: c |= CollationElementIterator.primaryOrder(os); /* Fall through. */ case SECONDARY:... | |
public int indexOf(Object elem) | public synchronized int indexOf(Object e, int index) | public int indexOf(Object elem) { return indexOf(elem, 0); } |
return indexOf(elem, 0); | for (int i = index; i < elementCount; i++) { if (e == null ? elementData[i] == null : e.equals(elementData[i])) return i; } return -1; | public int indexOf(Object elem) { return indexOf(elem, 0); } |
super.addNotify (); | public void addNotify () { if (peer != null) peer = getToolkit ().createList (this); } | |
if (peer != null) { ListPeer l = (ListPeer) peer; l.delItems (index, index); l.add (item, index); } | public void replaceItem (String item, int index) { items.setElementAt (item, index); // FIXME: notify peer } | |
if (!attValue.startsWith(ENCODE_PREFIX)) { throw new IllegalArgumentException("badly encoded module revision id: '"+encoded+"': "+attValue+" doesn't start with "+ENCODE_PREFIX); } else { attValue = attValue.substring(1); } | 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(attName).append(ENCODE_SEPARATOR).append(attributes.get(attName)).append(ENCODE_SEPARATOR); | buf.append(ENCODE_PREFIX).append(attName).append(ENCODE_SEPARATOR).append(ENCODE_PREFIX).append(attributes.get(attName)).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(attName).append(ENCODE_SEPARATOR).append(attri... |
public AntProperties(Properties arg0) { super(arg0); putAllProperties(arg0); | public AntProperties() { super(); | public AntProperties(Properties arg0) { super(arg0); putAllProperties(arg0); } |
super(5,5,5,5, null); | super(5,5,5,5, Color.black); | BasicBorder() { super(5,5,5,5, null); } |
super(5,5,5,5, null); | super(5,5,5,5, Color.black); | PanelBorder() { super(5,5,5,5, null); } |
drawLine(x2, y1, x1, y2); | drawLine(x2, y2, x1, y2); | draw3DRect(int x, int y, int width, int height, boolean raised){ Color color = getColor(); Color tl = color.brighter(); Color br = color.darker(); if (!raised) { Color tmp = tl; tl = br; br = tmp; } int x1 = x; int y1 = y; int x2 = x + width; int y2 = y + height; setColor(tl); ... |
public static JRootPane getRootPane (Component a) | public static JRootPane getRootPane(Component comp) | public static JRootPane getRootPane (Component a) { if (a instanceof JRootPane) return (JRootPane) a; a = a.getParent(); if (a != null) { return getRootPane(a); } return null; } |
if (a instanceof JRootPane) return (JRootPane) a; a = a.getParent(); if (a != null) { return getRootPane(a); } return null; | if (comp instanceof RootPaneContainer) return ((RootPaneContainer)comp).getRootPane(); else return (JRootPane) getAncestorOfClass(JRootPane.class, comp); | public static JRootPane getRootPane (Component a) { if (a instanceof JRootPane) return (JRootPane) a; a = a.getParent(); if (a != null) { return getRootPane(a); } return null; } |
String text, Icon i, int vert_a, int hor_i, int vert_text_pos, int hor_text_pos, Rectangle vr, Rectangle ir, Rectangle tr, int gap) | String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap) | public static String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon i, int vert_a, in... |
int next_x = vr.x; int next_y = vr.y; ir.height = ir.width = ir.y = ir.x = 0; | public static String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon i, int vert_a, in... | |
if (i != null) | if (icon == null) | public static String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon i, int vert_a, in... |
ir.x = vr.x; ir.y = vr.y; ir.width = i.getIconWidth(); ir.height = i.getIconWidth(); | textIconGap = 0; iconR.width = 0; iconR.height = 0; } else { iconR.width = icon.getIconWidth(); iconR.height = icon.getIconWidth(); } textR.width = fm.stringWidth(text); textR.height = fm.getHeight(); | public static String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon i, int vert_a, in... |
next_x += gap + i.getIconWidth(); next_y += gap + i.getIconHeight(); | switch (horizontalTextPosition) { case LEFT: textR.x = 0; iconR.x = textR.width + textIconGap; break; case RIGHT: iconR.x = 0; textR.x = iconR.width + textIconGap; break; case CENTER: int centerLine = Math.max(textR.width, iconR.width) / 2; textR.x = centerLine - textR.width/2; iconR.x = centerLine - iconR.width/2; bre... | public static String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon i, int vert_a, in... |
tr.x = next_x; tr.y = vr.y; | public static String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon i, int vert_a, in... | |
tr.width = fm.stringWidth(text); tr.height = fm.getHeight(); | switch (verticalTextPosition) { case TOP: textR.y = 0; iconR.y = textR.height + textIconGap; break; case BOTTOM: iconR.y = 0; textR.y = iconR.height + textIconGap; break; case CENTER: int centerLine = Math.max(textR.height, iconR.height) / 2; textR.y = centerLine - textR.height/2; iconR.y = centerLine - iconR.height/2;... | public static String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon i, int vert_a, in... |
public static void updateComponentTreeUI(JFrame comp) | public static void updateComponentTreeUI(Component comp) | public static void updateComponentTreeUI(JFrame comp) { } |
if (comp == null) return; if (comp instanceof Container) { Component[] children = ((Container)comp).getComponents(); for (int i = 0; i < children.length; ++i) updateComponentTreeUI(children[i]); } if (comp instanceof JComponent) ((JComponent)comp).updateUI(); | public static void updateComponentTreeUI(JFrame comp) { } | |
public JFrame getToolFrame(String toolTitle, String societyName) { String newTitle = toolTitle + ": " + societyName; | public JFrame getToolFrame(String toolTitle) { | public JFrame getToolFrame(String toolTitle, String societyName) { String newTitle = toolTitle + ": " + societyName; Enumeration titles = titleToFrame.keys(); while (titles.hasMoreElements()) { String title = (String)titles.nextElement(); if (title.startsWith(toolTitle)) { JFrame frame = (JFrame)ti... |
if (title.startsWith(toolTitle)) { JFrame frame = (JFrame)titleToFrame.get(title); if (title.equals(newTitle)) return frame; else { titleToFrame.remove(title); titleToFrame.put(newTitle, frame); frame.setTitle(newTitle); setChanged(); notifyObservers(new Event(frame, newTitle, Event.CHANGED, title)); return frame; } }... | if (title.startsWith(toolTitle)) return (JFrame)titleToFrame.get(title); } | public JFrame getToolFrame(String toolTitle, String societyName) { String newTitle = toolTitle + ": " + societyName; Enumeration titles = titleToFrame.keys(); while (titles.hasMoreElements()) { String title = (String)titles.nextElement(); if (title.startsWith(toolTitle)) { JFrame frame = (JFrame)ti... |
public JPasswordField(String text) { | public JPasswordField() { | public JPasswordField(String text) { // TODO } // JPasswordField() |
public ExtensionFileFilter(String[] filters, String description) { this(); for (int i = 0; i < filters.length; i++) { addExtension(filters[i]); } if(description!=null) setDescription(description); | public ExtensionFileFilter() { this.filters = new Hashtable(); | public ExtensionFileFilter(String[] filters, String description) { this(); for (int i = 0; i < filters.length; i++) { // add filters one by one addExtension(filters[i]); } if(description!=null) setDescription(description); } |
value = e.formatValueForAttribute(value, attribute); | boolean isPostgres = e.getClass().getName().equals("com.webobjects.jdbcadaptor.PostgresqlExpression"); value = isPostgres ? e.formatValueForAttribute(value, attribute) : e.sqlStringForValue(value, key); | public static String sqlWhereClauseStringForKey(EOSQLExpression e, String key, NSArray valueArray) { if(valueArray.count() == 0) { return "0=1"; } StringBuffer sb = new StringBuffer(); EOAttribute attribute = e.entity().attributeNamed(key); if (attribute == null) { ... |
ClassDef(String name, Occurrence occ, ClassDef superClass, JavaVector interfaces, ScopedDef parentScope) { super(name, occ, parentScope); if (superClass != null) { this.superClass = superClass; } this.interfaces = interfaces; | public ClassDef() { | ClassDef(String name, // thhe name of the class Occurrence occ, // where it was defined ClassDef superClass, // its superclass (if applicable) JavaVector interfaces, // interfaces that it implements ScopedDef parentScope) { // which scope owns it super(name,... |
HasImports(String name, Occurrence occ, ScopedDef parentScope) { super(name, occ, parentScope); | public HasImports() { | HasImports(String name, // name of the symbol Occurrence occ, // where it's defined ScopedDef parentScope) { // which scope owns it super(name, occ, parentScope); } |
String getUniqueName(String name) { return names.getName(name); | String getUniqueName(JavaToken tok) { return getUniqueName(tok.getText()); | String getUniqueName(String name) { return names.getName(name); } |
public DummyClass(String name, Occurrence occ, String packageName) { | public DummyClass() { | public DummyClass(String name, Occurrence occ, String packageName) { super(name, occ, null, null, null); this.packageName = packageName; // if (name.equals("SymbolTable")) // new Exception("occ="+occ).printStackTrace(); // System.out.println("DummyClass packageName="+packageName);... |
super(name, occ, null, null, null); | super(); | public DummyClass(String name, Occurrence occ, String packageName) { super(name, occ, null, null, null); this.packageName = packageName; // if (name.equals("SymbolTable")) // new Exception("occ="+occ).printStackTrace(); // System.out.println("DummyClass packageName="+packageName);... |
this.packageName = packageName; | this.packageName = "java.lang"; | public DummyClass(String name, Occurrence occ, String packageName) { super(name, occ, null, null, null); this.packageName = packageName; // if (name.equals("SymbolTable")) // new Exception("occ="+occ).printStackTrace(); // System.out.println("DummyClass packageName="+packageName);... |
DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)tree.getSelectionPath().getLastPathComponent(); ModifiableComponent society = (ModifiableComponent)nodeToComponent.get(selNode); | if (society instanceof ComplexRecipeComponent) { while (name.equals(society.getFullName().toString())) { if (log.isInfoEnabled()) log.info("Cant add agent to Complex recipe with same name as recipe: " + name); name = (String)JOptionPane.showInputDialog(this, "Enter Agent Name different from Recipe name", "Agent Name", ... | private void addAgent() { String name = (String)JOptionPane.showInputDialog(this, "Enter Agent Name", "Agent Name", JOptionPane.QUESTION_MESSAGE, null, null, ""); if (name == null) r... |
lastParamNumber = Integer.parseInt(name.substring(index+6)); | curNum = Integer.parseInt(name.substring(index+6)); | private String generateName(ConfigurableComponent cc) { // get all properties Iterator i = cc.getSortedLocalPropertyNames(); // find the highest numbered property of the form param-x int lastParamNumber = -1; while (i.hasNext()) { String name = ((CompositeName)i.next()).last().toString(); int... |
System.out.println("NFE: " + nfe); | private String generateName(ConfigurableComponent cc) { // get all properties Iterator i = cc.getSortedLocalPropertyNames(); // find the highest numbered property of the form param-x int lastParamNumber = -1; while (i.hasNext()) { String name = ((CompositeName)i.next()).last().toString(); int... | |
if (curNum > lastParamNumber) lastParamNumber = curNum; | private String generateName(ConfigurableComponent cc) { // get all properties Iterator i = cc.getSortedLocalPropertyNames(); // find the highest numbered property of the form param-x int lastParamNumber = -1; while (i.hasNext()) { String name = ((CompositeName)i.next()).last().toString(); int... | |
addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { int col = columnAtPoint(e.getPoint()); int row = rowAtPoint(e.getPoint()); if (col == Model.LABEL_COL) { Property prop = model.getProperty(row); if (prop != null) { URL url = prop.getHelp(); if (url != null) Browser.setPage(url); } } } }); | addMouseListener(new MyMouseAdapter(this)); | public PropertyTable(boolean isEditable) { model = new Model(isEditable); setModel(model); setDefaultRenderer(String.class, model.getCellRenderer()); addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { int col = columnAtPoint(e.getPoint()); int row = rowAtPoin... |
void setPage(URL page) | void setPage(String url) | void setPage(URL page) { // Sets the current URL being displayed. } |
public static Map getExperimentNames() { | public static SortedMap getExperimentNames() { | public static Map getExperimentNames() { return queryHT("getExperimentNames",new HashMap()); } |
public static Map getOrganizationGroups(String experiment_id) { | public static SortedMap getOrganizationGroups(String experiment_id) { | public static Map getOrganizationGroups(String experiment_id) { Map subs = new HashMap(); subs.put(":experiment_id",experiment_id); return queryHT("getOrganizationGroups",subs); } |
public static Map getSocietyTemplates() { | public static SortedMap getSocietyTemplates() { | public static Map getSocietyTemplates() { return queryHT("getSocietyTemplates",new HashMap()); } |
public static Map getTrialNames(String experiment_id) { | public static SortedMap getTrialNames(String experiment_id) { | public static Map getTrialNames(String experiment_id) { return queryHT("getTrialNames",addSubs(new HashMap(),":experiment_id",experiment_id)); } |
public static Map queryHT(String query, Map substitutions){ | public static SortedMap queryHT(String query, Map substitutions){ | public static Map queryHT(String query, Map substitutions){ String dbQuery = getQuery(query, substitutions); Map ht = new TreeMap(); try { Connection conn = getConnection(); try { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(dbQuery); while (rs.next()) { ht.put(rs.getSt... |
Connection conn = null; | public static Map queryHT(String query, Map substitutions){ String dbQuery = getQuery(query, substitutions); Map ht = new TreeMap(); try { Connection conn = getConnection(); try { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(dbQuery); while (rs.next()) { ht.put(rs.getSt... | |
Connection conn = getConnection(); | conn = getConnection(); | public static Map queryHT(String query, Map substitutions){ String dbQuery = getQuery(query, substitutions); Map ht = new TreeMap(); try { Connection conn = getConnection(); try { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(dbQuery); while (rs.next()) { ht.put(rs.getSt... |
return ht; | return (SortedMap)ht; | public static Map queryHT(String query, Map substitutions){ String dbQuery = getQuery(query, substitutions); Map ht = new TreeMap(); try { Connection conn = getConnection(); try { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(dbQuery); while (rs.next()) { ht.put(rs.getSt... |
if (hasBinding("pageName") || hasBinding("value")) { | if (hasBinding("pageName") || hasBinding("value") || hasBinding("actionName")) { | public String srcUrl() { if (hasBinding("src")) { return (String)_WOJExtensionsUtil.valueForBindingOrNull("src",this); } if (hasBinding("pageName") || hasBinding("value")) { return context().componentActionURL(); } return "ERROR_URL_NOT_FOUND"; } |
log = CSMART.createLogger("org.cougaar.tools.csmart.core.db"); | createLogger(); | public PopulateDb(String cmtType, String hnaType, String csmiType, String experimentName, String exptId, String trialId, boolean createNew, DBConflictHandler ch) throws SQLException, IOException { super(); log = CSMART.createLogg... |
if( ret.endsWith("\\")) { ret += "\\"; } | protected static String sqlQuote(String s) { if (s == null) return "null"; String ret = null; int quoteIndex = s.indexOf('\''); // If the string already starts & ends with a single quote, we're done if (quoteIndex == 0 && s.lastIndexOf('\'') == s.length() - 1) return s; ret = new String(s); ... | |
if(log.isDebugEnabled()) { log.debug("executeUpdate: " + query); } | protected int executeUpdate(String query) throws SQLException { if (query == null) throw new IllegalArgumentException("executeUpdate: null query"); try { long startTime = 0; if (pwlog != null) startTime = System.currentTimeMillis(); int result = updateStmt.executeUpdate(query); if (pwlog != ... | |
public static boolean isNaN (float v) | public boolean isNaN () | public static boolean isNaN (float v) { // This works since NaN != NaN is the only reflexive inequality // comparison which returns true. return v != v; } |
return v != v; | return isNaN (value); | public static boolean isNaN (float v) { // This works since NaN != NaN is the only reflexive inequality // comparison which returns true. return v != v; } |
getOption(int option_id) throws SocketException; | Object getOption(int option_id) throws SocketException; | getOption(int option_id) throws SocketException; |
setOption(int option_id, Object val) throws SocketException; | void setOption(int option_id, Object val) throws SocketException; | setOption(int option_id, Object val) throws SocketException; |
visible = false; | Window() { setLayout(new BorderLayout()); } | |
toInternalNames(interfaces), | TypeUtils.toInternalNames(interfaces), | public void begin_class(int access, String className, Type superType, Type[] interfaces, String sourceFile) { init(); this.classAccess = access; this.classType = Type.getType("L" + className.replace('.', '/') + ";"); this.superType = (superType != null) ? superType : Constants.TYPE_OBJEC... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.