rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
Thread.dumpStack(); | public void setSource(ClusterIdentifier asource) { ClusterIdentifier old = getSource(); if (old != null) { if (! asource.equals(old)) { if(log.isDebugEnabled()) { log.error("Bad InfrastructureEvent.setSource("+asource+") was "+old+":"); Thread.dumpStack(); } } } else... | |
Transferable draggableObject = makeDraggableObject(new DMTNArray(dragSourceNodes)); | Transferable draggableObject = null; try { draggableObject = makeDraggableObject(new DMTNArray(dragSourceNodes)); } catch (IllegalArgumentException iae) { if (log.isErrorEnabled()) { log.error("Illegal argument exception: " + iae); } } if (draggableObject == null) return; | public void dragGestureRecognized(DragGestureEvent event) { InputEvent ie = event.getTriggerEvent(); // ignore right mouse events if ((ie.getModifiers() & InputEvent.BUTTON3_MASK) != 0) return; if (!isEditable()) return; // if tree isn't editable, return DefaultMutableTreeNode target = getDropTarg... |
Transferable draggableObject = makeDraggableObject(target); | Transferable draggableObject = null; try { draggableObject = makeDraggableObject(target); } catch (IllegalArgumentException iae) { if (log.isErrorEnabled()) { log.error("Illegal argument exception: " + iae); } } if (draggableObject == null) return; | public void dragGestureRecognized(DragGestureEvent event) { InputEvent ie = event.getTriggerEvent(); // ignore right mouse events if ((ie.getModifiers() & InputEvent.BUTTON3_MASK) != 0) return; if (!isEditable()) return; // if tree isn't editable, return DefaultMutableTreeNode target = getDropTarg... |
return(getMinimumSize(getColumns())); | return getMinimumSize (getColumns ()); | getMinimumSize(){ return(getMinimumSize(getColumns()));} |
return(getPreferredSize(getColumns())); | return getPreferredSize (getColumns ()); | getPreferredSize(){ return(getPreferredSize(getColumns()));} |
return(getMinimumSize(getColumns())); | return minimumSize (getColumns ()); | minimumSize(){ return(getMinimumSize(getColumns()));} |
return(getPreferredSize(getColumns())); | return preferredSize (getColumns ()); | preferredSize(){ return(getPreferredSize(getColumns()));} |
this.echoChar = echoChar; TextFieldPeer tfp = (TextFieldPeer)getPeer(); if (tfp != null) tfp.setEchoChar(echoChar); | setEchoCharacter (echoChar); | setEchoChar(char echoChar){ this.echoChar = echoChar; TextFieldPeer tfp = (TextFieldPeer)getPeer(); if (tfp != null) tfp.setEchoChar(echoChar);} |
setEchoChar(echoChar); | this.echoChar = echoChar; TextFieldPeer peer = (TextFieldPeer) getPeer (); if (peer != null) peer.setEchoChar (echoChar); | setEchoCharacter(char echoChar){ setEchoChar(echoChar);} |
if(spec.sortOrderings() != null ) { NSMutableArray ommitedOrderings = new NSMutableArray(); for(Enumeration e = spec.sortOrderings().objectEnumerator(); e.hasMoreElements();) { EOSortOrdering ordering = (EOSortOrdering) e.nextElement(); if(ordering.key().indexOf(".") > 0) { ommitedOrderings.addObject(ordering); } } if(... | spec = localizeFetchSpecification(ec, spec); | public static EOSQLExpression sqlExpressionForFetchSpecification(EOEditingContext ec, EOFetchSpecification spec, long start, long end) { EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, spec.entityName()); EOModel model = entity.model(); EODatabaseContext dbc = EOUtilities.databaseContext... |
exit(); | if(!PropertyBuilder.this.getGlassPane().isVisible()) { exit(); } | public PropertyBuilder(CSMART csmart, ModifiableComponent mc, ModifiableComponent originalComponent, Experiment experiment) { log = CSMART.createLogger(this.getClass().getName()); this.csmart = csmart; this.originalComponent = originalComponent; this.experi... |
exit(); | if(!PropertyBuilder.this.getGlassPane().isVisible()) { exit(); } | public void windowClosing(WindowEvent e) { exit(); } |
public int anchor() { return _anchor; | public String anchor() { return "" + _anchor; | public int anchor() { return _anchor; } |
EOEditingContext peer = ERXExtensions.newEditingContext(); | EOEditingContext peer = ERXEC.newEditingContext(); | public WOComponent editGroup() { // This will be a peer of the session's default editingContext. We want to edit in a peer so in case they hit // the back button the ec won't be dirty EOEditingContext peer = ERXExtensions.newEditingContext(); EditPageInterface epi = (EditPageInterface)D... |
if (!f.mkdirs()) { | if (!f.exists() && !f.mkdirs() && !f.exists()) { | 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]; if (runStart == null) runStart = new Date... |
multipart.addBodyPart (htmlPart); | if (inlineAttachments().count() == 0) { multipart.addBodyPart(htmlPart); } else { MimeMultipart relatedMultiparts = new MimeMultipart("related"); relatedMultiparts.addBodyPart(htmlPart); Enumeration en = this.inlineAttachments ().objectEnumerator (); while (en.hasMoreElements ()) { ERMailAttachment attachment = (ERM... | protected DataHandler prepareMail () throws MessagingException { MimeMultipart multipart = null; MimeBodyPart textPart = null; MimeBodyPart htmlPart = null; this.mimeMessage ().setSentDate (new Date ()); multipart = new MimeMultipart ("alternative"); // set the plain text part if (_hasHiddenP... |
if (this.inlineAttachments ().count () > 0) { MimeMultipart relatedMultiparts = new MimeMultipart ("related"); Enumeration en = this.inlineAttachments ().objectEnumerator (); while (en.hasMoreElements ()) { ERMailAttachment attachment = (ERMailAttachment)en.nextElement (); BodyPart bp = attachment.getBodyPart (); re... | BodyPart relatedAttachmentsBodyPart = new MimeBodyPart(); | protected DataHandler prepareMail () throws MessagingException { MimeMultipart multipart = null; MimeBodyPart textPart = null; MimeBodyPart htmlPart = null; this.mimeMessage ().setSentDate (new Date ()); multipart = new MimeMultipart ("alternative"); // set the plain text part if (_hasHiddenP... |
if (lineSeparator == null) { GetPropertyAction getProperty = new GetPropertyAction("line.separator"); lineSeparator = (String) AccessController.doPrivileged(getProperty); } StringBuffer sb = new StringBuffer(); String[] files = file.list(); for (int index = 0; index < files.length; ++index) sb.append(files[index]).ap... | inputStream = new ByteArrayInputStream(getDirectoryListing()); | public void connect() throws IOException { // Call is ignored if already connected. if (connected) return; // If not connected, then file needs to be openned. file = new File (getURL().getFile()); if (! file.isDirectory()) { if (doInput) inputStream = new BufferedInputStream(new FileIn... |
return Long.toString(file.length()); | { if (file.isDirectory()) { return Integer.toString(getContentLength()); } return Long.toString(file.length()); } | public String getHeaderField(String field) { try { if (!connected) connect(); if (field.equals("content-type")) return guessContentTypeFromName(file.getName()); else if (field.equals("content-length")) return Long.toString(file.length()); else if (field.equals("last-modified")) { sy... |
public PopulateDb(String cmtType, String hnaType, String csmType, | public PopulateDb(String cmtType, String hnaType, String csmiType, | public PopulateDb(String cmtType, String hnaType, String csmType, String experimentName, String exptId, String trialId, boolean createNew) throws SQLException, IOException { if (cmtType == null) throw new IllegalArgumentException("null cmtType"); if ... |
if (csmType == null) throw new IllegalArgumentException("null csmType"); | if (csmiType == null) throw new IllegalArgumentException("null csmiType"); | public PopulateDb(String cmtType, String hnaType, String csmType, String experimentName, String exptId, String trialId, boolean createNew) throws SQLException, IOException { if (cmtType == null) throw new IllegalArgumentException("null cmtType"); if ... |
cleanTrial(csmType, trialId); | cleanTrial(cmtType, hnaType, csmiType, trialId); | public PopulateDb(String cmtType, String hnaType, String csmType, String experimentName, String exptId, String trialId, boolean createNew) throws SQLException, IOException { if (cmtType == null) throw new IllegalArgumentException("null cmtType"); if ... |
csmAssemblyId = addAssembly(csmType); | csmAssemblyId = addAssembly(csmiType); | public PopulateDb(String cmtType, String hnaType, String csmType, String experimentName, String exptId, String trialId, boolean createNew) throws SQLException, IOException { if (cmtType == null) throw new IllegalArgumentException("null cmtType"); if ... |
private void cleanTrial(String csmType, String oldTrialId) | private void cleanTrial(String cmtType, String hnaType, String csmiType, String oldTrialId) | private void cleanTrial(String csmType, String oldTrialId) throws SQLException { substitutions.put(":trial_id:", oldTrialId); substitutions.put(":csm_id_pattern:", csmType + "-____"); executeUpdate(dbp.getQuery(CLEAN_TRIAL_ASSEMBLY, substitutions)); } |
substitutions.put(":csm_id_pattern:", csmType + "-____"); | substitutions.put(":cmt_type:", cmtType); substitutions.put(":hna_type:", hnaType); substitutions.put(":csmi_type:", csmiType); | private void cleanTrial(String csmType, String oldTrialId) throws SQLException { substitutions.put(":trial_id:", oldTrialId); substitutions.put(":csm_id_pattern:", csmType + "-____"); executeUpdate(dbp.getQuery(CLEAN_TRIAL_ASSEMBLY, substitutions)); } |
int interpreter = 0; | int internal = 0; | private static StackTraceElement[] sanitizeStack(StackTraceElement[] elements, Throwable t) { StackTraceElement[] stack; String className = t.getClass().getName(); String consName; int lastDot = className.lastIndexOf('.'); if (lastDot == -1) consName = className + '('; else consNa... |
interpreter = 0; | internal = 0; | private static StackTraceElement[] sanitizeStack(StackTraceElement[] elements, Throwable t) { StackTraceElement[] stack; String className = t.getClass().getName(); String consName; int lastDot = className.lastIndexOf('.'); if (lastDot == -1) consName = className + '('; else consNa... |
else if (remove_interpreter | else if (remove_internal | private static StackTraceElement[] sanitizeStack(StackTraceElement[] elements, Throwable t) { StackTraceElement[] stack; String className = t.getClass().getName(); String consName; int lastDot = className.lastIndexOf('.'); if (lastDot == -1) consName = className + '('; else consNa... |
|| (CName != null && CName.equals("_Jv_InterpMethod")))) interpreter++; else if ("main(java.lang.String[])".equals(MName)) | || (CName != null && CName.startsWith("_Jv_")) || (CName == null && MName != null && MName.startsWith("_Jv_")))) internal++; else if (("java.lang.Thread".equals(CName) || "gnu.java.lang.MainThread".equals(CName)) && "run()".equals(MName)) | private static StackTraceElement[] sanitizeStack(StackTraceElement[] elements, Throwable t) { StackTraceElement[] stack; String className = t.getClass().getName(); String consName; int lastDot = className.lastIndexOf('.'); if (lastDot == -1) consName = className + '('; else consNa... |
int nr_elements = end-begin-unknown-interpreter+1; if ((begin > 0 || end < length-1 || unknown > 0 || interpreter > 0) | int nr_elements = end - begin - unknown - internal + 1; if ((begin > 0 || end < length-1 || unknown > 0 || internal > 0) | private static StackTraceElement[] sanitizeStack(StackTraceElement[] elements, Throwable t) { StackTraceElement[] stack; String className = t.getClass().getName(); String consName; int lastDot = className.lastIndexOf('.'); if (lastDot == -1) consName = className + '('; else consNa... |
&& MName != null && MName.startsWith("ffi_")) || (CName != null && CName.equals("_Jv_InterpMethod")))) ; | && MName != null && MName.startsWith("ffi_")) || (CName != null && CName.startsWith("_Jv_")) || (CName == null && MName != null && MName.startsWith("_Jv_")))) ; | private static StackTraceElement[] sanitizeStack(StackTraceElement[] elements, Throwable t) { StackTraceElement[] stack; String className = t.getClass().getName(); String consName; int lastDot = className.lastIndexOf('.'); if (lastDot == -1) consName = className + '('; else consNa... |
stack[pos] = elements[i]; | if (MName == null || CName == null) { MName = MName == null ? "" : MName; CName = CName == null ? "" : CName; stack[pos] = newElement(elements[i].getFileName(), elements[i].getLineNumber(), CName, MName, elements[i].isNativeMethod()); } else stack[pos] = elements[i]; | private static StackTraceElement[] sanitizeStack(StackTraceElement[] elements, Throwable t) { StackTraceElement[] stack; String className = t.getClass().getName(); String consName; int lastDot = className.lastIndexOf('.'); if (lastDot == -1) consName = className + '('; else consNa... |
if (!node.isEvicted(node.getRootModuleConf())) { String[] confs = node.getRealConfs(conf); for (int i = 0; i < confs.length; i++) { doFetchDependencies(node, confs[i]); } } } else if (!node.hasProblem()) { | private void fetchDependencies(IvyNode node, String conf, boolean shouldBePublic) { long start = System.currentTimeMillis(); Message.debug(node.getId()+" => resolving dependencies in "+conf); resolveConflict(node, node.getParent()); if (node.loadData(conf, shouldBePublic)) { ... | |
if (value == null) { value = "["+token+"]"; } | public static String substituteTokens(String pattern, Map tokens) { StringBuffer buffer = new StringBuffer(); char[] chars = pattern.toCharArray(); StringBuffer optionalPart = null; StringBuffer tokenBuffer = null; boolean insideOptionalPart = false; boolean... | |
Method proxied = thisClass.getDeclaredMethod("CGLIB$ACCESS_O", args); CGLIB$ACCESS_0 = MethodProxy.create(proxied); | CGLIB$ACCESS_0 = MethodProxy.create(cls, "toString()Ljava.lang.String;", thisClass, "CGLIB$ACCESS_0()Ljava.lang.String;"); | public void generateStatic(CodeGenerator cg, Context context) { /* generates: static { Class [] args; Class cls = findClass("java.lang.Object"); args = new Class[0]; METHOD_1 = cls.getDeclaredMethod("toString", args); Class thisClass = fin... |
cg.dup(); cg.store_local(m); | public void generateStatic(CodeGenerator cg, Context context) { /* generates: static { Class [] args; Class cls = findClass("java.lang.Object"); args = new Class[0]; METHOD_1 = cls.getDeclaredMethod("toString", args); Class thisClass = fin... | |
cg.load_class_this(); cg.push(accessName); cg.load_local(m); cg.invoke(MethodConstants.GET_PARAMETER_TYPES); cg.invoke(MethodConstants.GET_DECLARED_METHOD); | String desc = ReflectUtils.getMethodDescriptor(method); cg.invoke(MethodConstants.GET_DECLARING_CLASS); cg.push(method.getName() + desc); cg.load_class_this(); cg.push(accessName + desc); | public void generateStatic(CodeGenerator cg, Context context) { /* generates: static { Class [] args; Class cls = findClass("java.lang.Object"); args = new Class[0]; METHOD_1 = cls.getDeclaredMethod("toString", args); Class thisClass = fin... |
host = spec.substring(start, hostEnd); | authority = host = spec.substring(start, hostEnd); | 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)) { String genuineHost; int hostEnd; int colon; int at_host; start += 2; int ... |
genuineHost = host.substring(at_host); | { genuineHost = host.substring(at_host); userInfo = host.substring(0, at_host); } | 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)) { String genuineHost; int hostEnd; int colon; int at_host; start += 2; int ... |
char sepChar = '/'; int lastSlash = file.lastIndexOf(sepChar); if (lastSlash < 0 && File.separatorChar != sepChar && url.getProtocol().equals("file")) { sepChar = File.separatorChar; lastSlash = file.lastIndexOf(sepChar); } | int lastSlash = file.lastIndexOf('/'); | 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)) { String genuineHost; int hostEnd; int colon; int at_host; start += 2; int ... |
file.substring(0, lastSlash) + sepChar + spec.substring(start, end); | file.substring(0, lastSlash) + '/' + spec.substring(start, end); | 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)) { String genuineHost; int hostEnd; int colon; int at_host; start += 2; int ... |
setURL(url, url.getProtocol(), host, port, file, ref); | setURL(url, url.getProtocol(), host, port, authority, userInfo, file, query, ref); | 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)) { String genuineHost; int hostEnd; int colon; int at_host; start += 2; int ... |
host = url.getHost(); if (host == null) host = ""; port = url.getPort(); | authority = url.getAuthority(); if (authority == null) authority = ""; | protected String toExternalForm(URL url) { String protocol; String host; String file; String ref; String user; int port; protocol = url.getProtocol(); // JDK 1.2 online doc infers that host could be null because it // explicitly states that file cannot be null, but is silent on host. ho... |
user = url.getUserInfo(); | protected String toExternalForm(URL url) { String protocol; String host; String file; String ref; String user; int port; protocol = url.getProtocol(); // JDK 1.2 online doc infers that host could be null because it // explicitly states that file cannot be null, but is silent on host. ho... | |
int size = protocol.length() + host.length() + file.length() + 24; | int size = protocol.length() + authority.length() + file.length() + 24; | protected String toExternalForm(URL url) { String protocol; String host; String file; String ref; String user; int port; protocol = url.getProtocol(); // JDK 1.2 online doc infers that host could be null because it // explicitly states that file cannot be null, but is silent on host. ho... |
if (protocol.length() != 0) | if (protocol != null && protocol.length() > 0) | protected String toExternalForm(URL url) { String protocol; String host; String file; String ref; String user; int port; protocol = url.getProtocol(); // JDK 1.2 online doc infers that host could be null because it // explicitly states that file cannot be null, but is silent on host. ho... |
if (host.length() != 0) | if (authority.length() != 0) | protected String toExternalForm(URL url) { String protocol; String host; String file; String ref; String user; int port; protocol = url.getProtocol(); // JDK 1.2 online doc infers that host could be null because it // explicitly states that file cannot be null, but is silent on host. ho... |
sb.append(" if (user != null && ! "".equals(user)) sb.append(user).append('@'); sb.append(host); if (port >= 0) sb.append(':').append(port); | sb.append(" | protected String toExternalForm(URL url) { String protocol; String host; String file; String ref; String user; int port; protocol = url.getProtocol(); // JDK 1.2 online doc infers that host could be null because it // explicitly states that file cannot be null, but is silent on host. ho... |
log.error(e.toString()); | log.error("Exception setting view size", e); | static int displayViewSizeDialog(int currentViewSize) { JPanel bufferEventsPanel = new JPanel(); JRadioButton allButton = new JRadioButton("All"); JRadioButton sizeButton = new JRadioButton("Buffer Size"); JTextField sizeTF = new JTextField(8); Logger log = CSMART.createLogger("org.cougaar.tools.csmart... |
log.error("Couldn't create results directory: " + e); | log.error("Couldn't create results directory: ", e); | private String getLogFileName(String agentName) { String filename = agentName + fileDateFormat.format(runStart) + ".log"; File resultDir = experiment.getResultDirectory(); // if user didn't specify results directory, save in local directory if (resultDir == null) return filename; Trial trial = ex... |
log.error("Exception parsing " + CSMARTUL.AGENT_PORT + " : " + e); | log.error("Exception parsing " + CSMARTUL.AGENT_PORT + " : ", e); | private String getOPlanAgentURL() { HostComponent[] hosts = experiment.getHosts(); for (int i = 0; i < hosts.length; i++) { NodeComponent[] nodes = hosts[i].getNodes(); for (int j = 0; j < nodes.length; j++) { AgentComponent[] agents = nodes[j].getAgents(); for (int k = 0; k < agents.len... |
log.error("Unable to create output for: " + nodeName); | log.error("Unable to create output for: " + nodeName, e); | private void prepareToCreateNodes() { // first need to set configuration file name property in ALL nodes // as these are all used by each experiment configuration writer for (int i = 0; i < nodesToRun.length; i++) { NodeComponent nodeComponent = nodesToRun[i]; nodeComponent.addProperty("Configurati... |
log.error("CSMARTConsole: cannot create node: " + nodeName); | log.error("CSMARTConsole: cannot create node: " + nodeName, e); | private void prepareToCreateNodes() { // first need to set configuration file name property in ALL nodes // as these are all used by each experiment configuration writer for (int i = 0; i < nodesToRun.length; i++) { NodeComponent nodeComponent = nodesToRun[i]; nodeComponent.addProperty("Configurati... |
log.error(e.toString()); | log.error("Exception getting Host Server", e); | public NodeServesClient restartNode(NodeComponent nodeComponent) { boolean doRun = false; synchronized (runningNodes) { if (oldNodes.size() + runningNodes.size() == 1) doRun = true; } // end synchronized if (doRun) { runButton_actionPerformed(); return null; // it doesn't matter what... |
log.error(e.toString()); | log.error("Exception", e); | public NodeServesClient restartNode(NodeComponent nodeComponent) { boolean doRun = false; synchronized (runningNodes) { if (oldNodes.size() + runningNodes.size() == 1) doRun = true; } // end synchronized if (doRun) { runButton_actionPerformed(); return null; // it doesn't matter what... |
re.printStackTrace(); | if(log.isErrorEnabled()) { log.error("Exception", re); } | private void runTrial() { setTrialValues(); runStart = new Date(); nodeCreationInfoList = new ArrayList(); prepareToCreateNodes(); stopNodeCreation = false; startTimers(); nodeCreator = new Thread("CreateNodes") { public void run() { createNodes(); starting = false; // r... |
log.error("Exception waiting for node creation thread to die: " + ie); | log.error("Exception waiting for node creation thread to die: ", ie); | private void stopAllNodes() { // if there's a thread still creating nodes, stop it stopNodeCreation = true; // wait for the creating thread to stop if (nodeCreator != null) { try { nodeCreator.join(); } catch (InterruptedException ie) { if(log.isErrorEnabled()) { log.error... |
log.error("Unable to destroy node, assuming it's dead: " + ex); | log.error("Unable to destroy node, assuming it's dead: ", ex); | private void stopAllNodes() { // if there's a thread still creating nodes, stop it stopNodeCreation = true; // wait for the creating thread to stop if (nodeCreator != null) { try { nodeCreator.join(); } catch (InterruptedException ie) { if(log.isErrorEnabled()) { log.error... |
log.error("Unable to destroy node, assuming it's dead: " + ex); | log.error("Unable to destroy node, assuming it's dead: ", ex); | public void stopNode(NodeComponent node) { boolean doAbort = false; synchronized (runningNodesLock) { if (runningNodes.size() == 1) doAbort = true; } // end synchronized if (doAbort) { abortButton_actionPerformed(); return; } NodeServesClient nsc; synchronized (runningNodesL... |
super.addNotify (); | public void addNotify () { if (peer == null) peer = getToolkit ().createDialog (this); } | |
if (peer != null) | if (peer == null) | addNotify(){ if (peer != null) peer = getToolkit ().createPopupMenu (this); super.addNotify ();} |
if (getPeer() == null) this.addNotify(); | show(Component component, int x, int y){ PopupMenuPeer pmp = (PopupMenuPeer)getPeer(); if (pmp != null) { /* XXX Event e = new Event (component, Event.ACTION_EVENT, component); e.x = x; e.y = y;*/ pmp.show (component, x, y); }} | |
addToTree(communityTree.addNode(null, communityName, "Community", null), | addToTree(communityTree.addNode((DefaultMutableTreeNode)communityTree.getModel().getRoot(), communityName, "Community", null), | private void putAllCommunitiesInTree() { ArrayList communityNames = CommunityDBUtils.getCommunitiesForExperiment(experiment.getCommAsbID()); if (communityNames == null || communityNames.size() == 0) return; communityTree.getModel().removeTreeModelListener(treeModelListener); for (Iterator iter = comm... |
if (communityNames == null || communityNames.size() == 0) | if (communityNames == null || communityNames.size() == 0) { if (log.isDebugEnabled()) { log.debug("selectComms got none"); } JOptionPane.showMessageDialog(null, "No Communities defined for this Experiment."); | private String selectCommunityToDisplay() { // This version shows all communities anywhere // ArrayList communityNames = CommunityDBUtils.getCommunities(); // But I think I only want those in this experiment ArrayList communityNames = CommunityDBUtils.getCommunitiesForExperiment(experiment.getCommAsbID... |
} communityNames.add(0, "All"); | private String selectCommunityToDisplay() { // This version shows all communities anywhere // ArrayList communityNames = CommunityDBUtils.getCommunities(); // But I think I only want those in this experiment ArrayList communityNames = CommunityDBUtils.getCommunitiesForExperiment(experiment.getCommAsbID... | |
GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); | GLCanvas canvas = new GLCanvas(); | public static void main(String[] args) { boolean startSlow = false; if (args.length > 1) { usage(); } if (args.length == 1) { if (args[0].equals("-slow")) { startSlow = true; } else { usage(); } } GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new G... |
EventQueue eq = Toolkit.getDefaultToolkit().getSystemEventQueue(); | EventQueue eq = Toolkit.getDefaultToolkit().getSystemEventQueue(); while (eq.next != null) eq = eq.next; | public static boolean isDispatchThread() { EventQueue eq = Toolkit.getDefaultToolkit().getSystemEventQueue(); return (Thread.currentThread() == eq.dispatchThread); } |
if (next != null) { next.push (newEventQueue); return; } | public synchronized void push(EventQueue newEventQueue) { if (newEventQueue == null) throw new NullPointerException (); int i = next_out; while (i != next_in) { newEventQueue.postEvent(queue[i]); next_out = i; if (++i == queue.length) i = 0; } next = newEventQ... | |
ReflectOps.constructor_switch(e, constructors, new ObjectSwitchCallback() { | ComplexOps.constructor_switch(e, constructors, new ObjectSwitchCallback() { | public void generateClass(ClassVisitor v) throws Exception { ClassEmitter ce = new ClassEmitter(v); final List clist = Arrays.asList(constructors); ce.begin_class(Constants.ACC_PUBLIC, getClassName(), null, new Type[]{ Type.get... |
hostConfigurationBuilder.findHost(); | hcb.findHost(); | public void actionPerformed(ActionEvent e) { hostConfigurationBuilder.findHost(); } |
hostConfigurationBuilder.findNode(); | hcb.findNode(); | public void actionPerformed(ActionEvent e) { hostConfigurationBuilder.findNode(); } |
hostConfigurationBuilder.findAgent(); | hcb.findAgent(); | public void actionPerformed(ActionEvent e) { hostConfigurationBuilder.findAgent(); } |
if (tabbedPane.getSelectedComponent().equals(hostConfigurationBuilder)) | if (tabbedPane.getSelectedComponent().equals(hcb)) | public ExperimentBuilder(CSMART csmart, Experiment experiment) { this.csmart = csmart; setExperiment(experiment); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); JMenu fileMenu = new JMenu(FILE_MENU); for (int i = 0; i < fileActions.length; i++) { fileMenu.add(fileActions... |
hostConfigurationBuilder = | hcb = | public ExperimentBuilder(CSMART csmart, Experiment experiment) { this.csmart = csmart; setExperiment(experiment); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); JMenu fileMenu = new JMenu(FILE_MENU); for (int i = 0; i < fileActions.length; i++) { fileMenu.add(fileActions... |
tabbedPane.add("Configurations", hostConfigurationBuilder); | tabbedPane.add("Configurations", hcb); | public ExperimentBuilder(CSMART csmart, Experiment experiment) { this.csmart = csmart; setExperiment(experiment); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); JMenu fileMenu = new JMenu(FILE_MENU); for (int i = 0; i < fileActions.length; i++) { fileMenu.add(fileActions... |
hostConfigurationBuilder.reinit(experiment); | hcb.reinit(experiment); | public void reinit(Experiment newExperiment) { // saveSilently(); if (modified) saveAs(); // restore editable flag on previous experiment experiment.setEditInProgress(false); experiment = newExperiment; propertyBuilder.reinit(experiment); hostConfigurationBuilder.reinit(experiment); //... |
public void setTarget(ClassVisitor v, ClassVisitor outer) { super.setTarget(chain[0], outer); | public void setTarget(ClassVisitor v) { super.setTarget(chain[0]); | public void setTarget(ClassVisitor v, ClassVisitor outer) { super.setTarget(chain[0], outer); ClassVisitor next = v; for (int i = chain.length - 1; i >= 0; i--) { chain[i].setTarget(next, outer); next = chain[i]; } } |
chain[i].setTarget(next, outer); | chain[i].setTarget(next); | public void setTarget(ClassVisitor v, ClassVisitor outer) { super.setTarget(chain[0], outer); ClassVisitor next = v; for (int i = chain.length - 1; i >= 0; i--) { chain[i].setTarget(next, outer); next = chain[i]; } } |
public void setTarget(ClassVisitor target, ClassVisitor outer) { | public void setTarget(ClassVisitor target) { | public void setTarget(ClassVisitor target, ClassVisitor outer) { cv = target; } |
if ((w<=0) || (h<=0)) throw new IllegalArgumentException(); | if ((w <= 0) || (h <= 0)) throw new IllegalArgumentException((w <= 0 ? " width<=0" : " width is ok") +(h <= 0 ? " height<=0" : " height is ok")); | public SampleModel(int dataType, int w, int h, int numBands) { if ((w<=0) || (h<=0)) throw new IllegalArgumentException(); // FIXME: How can an int be greater than Integer.MAX_VALUE? // FIXME: How do we identify an unsupported data type? this.dataType = dataType; this.width = w; this.height = h; ... |
organizer.addTreeModelListener(this); | public CSMART() { setTitle("CSMART"); createLog(); // Write initial CSMART info to the log file if (log.isFatalEnabled()) { log.fatal(writeDebug()); } resultDir = initResultDir(); JMenuBar menuBar = new JMenuBar(); getRootPane().setJMenuBar(menuBar); // set-up file menu which includes ... | |
if (components.size() == 0) { organizer.addSociety(); societies = organizer.getSelectedSocieties(); if (societies != null) for (int i = 0; i < societies.length; i++) components.add(societies[i]); } | public void actionPerformed(ActionEvent e) { String s = ((AbstractButton)e.getSource()).getActionCommand(); if (s.equals(NEW_MENU_ITEM)) { newWorkspace(); } else if (s.equals(NEW_RESULTS_MENU_ITEM)) { setResultDir(); } else if (s.equals(EXIT_MENU_ITEM)) { exit(); } else if (s.equals(HELP... | |
log.info("Loading: " + fileName + " - " | log.debug("Loading: " + fileName + " - " | public void load() { cache.removeAllObjects(); createdKeys.removeAllObjects(); if (log.isDebugEnabled()) log.debug("Loading templates for language: " + language + " for files: " + fileNamesToWatch() + " with search path: " + frameworkSearchPath()); ... |
log.info("Unable to create path for resource named: " + fileName | log.debug("Unable to create path for resource named: " + fileName | public void load() { cache.removeAllObjects(); createdKeys.removeAllObjects(); if (log.isDebugEnabled()) log.debug("Loading templates for language: " + language + " for files: " + fileNamesToWatch() + " with search path: " + frameworkSearchPath()); ... |
AgentComponent[] nagents = experimentCopy.getAgents(); for (int y=0; y < nagents.length; y++ ) { if (nagents[y].getFullName().equals(oagents[x].getFullName())) { nnode.addAgent(nagents[y]); } } | AgentComponent[] nagents = experimentCopy.getAgents(); for (int y=0; y < nagents.length; y++ ) { if (nagents[y].getShortName().equals(oagents[x].getShortName())) { nnode.addAgent(nagents[y]); } } | public Experiment copy(Organizer organizer, Object context) { String uniqueName = organizer.generateExperimentName(getExperimentName()); Experiment experimentCopy = null; if (inDatabase) experimentCopy = new Experiment(uniqueName, expID, trialID); else experimentCopy = new Experiment(uniqueName... |
break; | public Experiment copy(Organizer organizer, Object context) { String uniqueName = organizer.generateExperimentName(getExperimentName()); Experiment experimentCopy = null; if (inDatabase) experimentCopy = new Experiment(uniqueName, expID, trialID); else experimentCopy = new Experiment(uniqueName... | |
true); | allowOrig); | private boolean cloneExperiment() { // ask user to confirm cloning experiment// int result = JOptionPane.showConfirmDialog(this,// "Modify Experiment",// "Modify Experiment?",// ... |
public void processResults() { | public boolean processResults() { | public void processResults() { boolean modified = false; int n = ULThreads.length; for (int i = 0; i < n; i++) { JCheckBox cb = (JCheckBox)ULThreadCheckBoxes.get(i); Boolean b = (Boolean)originalThreadSelected.get(i); if (b.booleanValue() == cb.isSelected()) continue; if (!modified... |
return; | return false; | public void processResults() { boolean modified = false; int n = ULThreads.length; for (int i = 0; i < n; i++) { JCheckBox cb = (JCheckBox)ULThreadCheckBoxes.get(i); Boolean b = (Boolean)originalThreadSelected.get(i); if (b.booleanValue() == cb.isSelected()) continue; if (!modified... |
if(log.isDebugEnabled()) { | if(log.isInfoEnabled()) { | public void processResults() { boolean modified = false; int n = ULThreads.length; for (int i = 0; i < n; i++) { JCheckBox cb = (JCheckBox)ULThreadCheckBoxes.get(i); Boolean b = (Boolean)originalThreadSelected.get(i); if (b.booleanValue() == cb.isSelected()) continue; if (!modified... |
return true; | public void processResults() { boolean modified = false; int n = ULThreads.length; for (int i = 0; i < n; i++) { JCheckBox cb = (JCheckBox)ULThreadCheckBoxes.get(i); Boolean b = (Boolean)originalThreadSelected.get(i); if (b.booleanValue() == cb.isSelected()) continue; if (!modified... | |
") addresses:\n"; | ") addresses:" + separator; | public String toString () { // FIXME: check if this is correct String result; result = "name: " + getDisplayName () + " (" + getName () + ") addresses:\n"; for (Enumeration e = inetAddresses.elements (); e.hasMoreElements (); ) { InetAddress address = (InetAddress) e.nextElement ... |
result += address.toString () + "\n"; | result += address.toString () + separator; | public String toString () { // FIXME: check if this is correct String result; result = "name: " + getDisplayName () + " (" + getName () + ") addresses:\n"; for (Enumeration e = inetAddresses.elements (); e.hasMoreElements (); ) { InetAddress address = (InetAddress) e.nextElement ... |
NodeComponent node = null; | public void addHostChildren(ComponentData[] children, HostComponent host) { for(int i=0; i < children.length; i++) { boolean foundInHost = false; boolean foundInSociety = false; ComponentData child = children[i]; NodeComponent expNode = null; NodeComponent[] allNodes = getNodeComponents();... | |
node = host.addNode(expNode); | expNode = host.addNode(expNode); | public void addHostChildren(ComponentData[] children, HostComponent host) { for(int i=0; i < children.length; i++) { boolean foundInHost = false; boolean foundInSociety = false; ComponentData child = children[i]; NodeComponent expNode = null; NodeComponent[] allNodes = getNodeComponents();... |
node = host.addNode(addNode(child.getName())); | expNode = host.addNode(addNode(child.getName())); | public void addHostChildren(ComponentData[] children, HostComponent host) { for(int i=0; i < children.length; i++) { boolean foundInHost = false; boolean foundInSociety = false; ComponentData child = children[i]; NodeComponent expNode = null; NodeComponent[] allNodes = getNodeComponents();... |
addNodeChildren(child.getChildren(), node); | public void addHostChildren(ComponentData[] children, HostComponent host) { for(int i=0; i < children.length; i++) { boolean foundInHost = false; boolean foundInSociety = false; ComponentData child = children[i]; NodeComponent expNode = null; NodeComponent[] allNodes = getNodeComponents();... | |
addNodeChildren(child.getChildren(), expNode); | public void addHostChildren(ComponentData[] children, HostComponent host) { for(int i=0; i < children.length; i++) { boolean foundInHost = false; boolean foundInSociety = false; ComponentData child = children[i]; NodeComponent expNode = null; NodeComponent[] allNodes = getNodeComponents();... | |
public static NSArray arrayMinusArray(NSArray main, NSArray minus){ NSSet result = ERXArrayUtilities.setFromArray(main); return result.setBySubtractingSet(ERXArrayUtilities.setFromArray(minus)).allObjects(); } | public static NSArray arrayMinusArray(NSArray main, NSArray minus) { NSSet minusSet = new NSSet(minus); NSMutableArray mutableResult = new NSMutableArray(main.count()); Enumeration enum = main.objectEnumerator(); while (enum.hasMoreElements()) { Object obj = enum.nextElement(); if (! minusSet.containsObject(obj)) mutab... | public static NSArray arrayMinusArray(NSArray main, NSArray minus){ NSSet result = ERXArrayUtilities.setFromArray(main); return result.setBySubtractingSet(ERXArrayUtilities.setFromArray(minus)).allObjects(); } |
log.error("Analyzer: copyResultFiles: ", e); | log.error("CSMARTConsole: copyResultFiles failed: ", e); | private void copyResultFiles(RemoteFileSystem remoteFS, String dirname) { char[] cbuf = new char[1000]; try { // FIXME: This reads just from the current directory, // but should read from wherever the BasicMetric told it to read, // or in general, wherever the Compon... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.