rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
drawable.setGL(new DebugGL(drawable.getGL())); | if (!(drawable.getGL() instanceof DebugGL)) { drawable.setGL(new DebugGL(drawable.getGL())); } | public void init(GLDrawable drawable) { System.out.println("Listener.init()"); drawable.setGL(new DebugGL(drawable.getGL())); GL gl = drawable.getGL(); float pos[] = { 5.0f, 5.0f, 10.0f, 0.0f }; gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, pos); gl.glEnable(GL.GL_CULL_FACE); gl.glEn... |
if (target != null) { if (target.getAllowsChildren()) { DataFlavor[] possibleFlavors = event.getCurrentDataFlavors(); if (isDroppable(possibleFlavors, target) == DnDConstants.ACTION_NONE) { after = target; target = (DefaultMutableTreeNode)after.getParent(); } | DataFlavor[] possibleFlavors = event.getCurrentDataFlavors(); Transferable transferable = event.getTransferable(); while (target != null) { if (isAllowed(possibleFlavors, target)) { action = addElement(transferable, target, after); break; | public void drop(DropTargetDropEvent event) { int action = DnDConstants.ACTION_NONE; DefaultMutableTreeNode target = getDropTarget(event.getLocation()); DefaultMutableTreeNode after = null;// // if the target does not allow children, then drop on its parent// if (target != null && !target.getAllows... |
} if (target != null) { Transferable transferable = event.getTransferable(); action = addElement(transferable, target, after); | public void drop(DropTargetDropEvent event) { int action = DnDConstants.ACTION_NONE; DefaultMutableTreeNode target = getDropTarget(event.getLocation()); DefaultMutableTreeNode after = null;// // if the target does not allow children, then drop on its parent// if (target != null && !target.getAllows... | |
URLConnection connection = url.openConnection(); if (data != null) ((HttpURLConnection)connection).setRequestMethod("PUT"); | connection = (HttpURLConnection)url.openConnection(); if (data != null) { connection.setRequestMethod("PUT"); } | public static Collection getCollectionFromAgent(String agentURL, String servletId, ArrayList parameterNames, ArrayList parameterValues, ... |
ObjectInputStream p = new ObjectInputStream(is); results = (Collection)p.readObject(); | if (is != null) { ObjectInputStream p = new ObjectInputStream(is); results = (Collection)p.readObject(); is.close(); } else { if (log.isInfoEnabled()) { log.info("Got null input stream talking to " + urlSpec); } } | public static Collection getCollectionFromAgent(String agentURL, String servletId, ArrayList parameterNames, ArrayList parameterValues, ... |
} finally { connection.disconnect(); | public static Collection getCollectionFromAgent(String agentURL, String servletId, ArrayList parameterNames, ArrayList parameterValues, ... | |
private ServerSocket() | public ServerSocket() throws IOException | private ServerSocket() { if (factory != null) impl = factory.createSocketImpl(); else impl = new PlainSocketImpl(); } |
if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException ("Address type not supported"); | public void bind (SocketAddress endpoint) throws IOException { if (impl == null) throw new IOException ("Cannot initialize Socket implementation"); InetSocketAddress tmp = (InetSocketAddress) endpoint; SecurityManager s = System.getSecurityManager (); if (s != null) s.checkListen (tmp.ge... | |
if (ch != null && !ch.isBlocking()) throw new IllegalBlockingModeException(); | protected final void implAccept (Socket s) throws IOException { impl.accept(s.impl); } | |
assertEquals(new File("test/buildlist/C/build.xml").getAbsolutePath(), new File(files[0]).getAbsolutePath()); assertEquals(new File("test/buildlist/A/build.xml").getAbsolutePath(), new File(files[0]).getAbsolutePath()); | assertEquals(new File("test/buildlist/C/build.xml").getAbsolutePath(), new File(files[1]).getAbsolutePath()); assertEquals(new File("test/buildlist/A/build.xml").getAbsolutePath(), new File(files[2]).getAbsolutePath()); | public void testSimple() { Project p = new Project(); IvyBuildList buildlist = new IvyBuildList(); buildlist.setProject(p); FileSet fs = new FileSet(); fs.setDir(new File("test/buildlist")); fs.setIncludes("**/build.xml"); buildlist.addFileset(fs); ... |
LogManager.resetConfiguration(); } | LogManager.resetConfiguration(); BasicConfigurator.configure(); Logger.getRootLogger().setLevel(Level.INFO); } | public static synchronized void configureLogging(Properties properties) { if (_isFirstTimeConfig) { boolean is522OrHigher = false; _isFirstTimeConfig = false; is522OrHigher = ERXProperties.webObjectsVersionIs522OrHigher(); if (!is522OrHigher) { Basic... |
ERXCompilerProxy.defaultProxy().setClassForName(ERXAnyField.class, "WOAnyField"); | public void installPatches() { if(contextClassName().equals("WOContext")) setContextClassName("er.extensions.ERXWOContext"); ERXCompilerProxy.defaultProxy().setClassForName(ERXWOForm.class, "WOForm"); //ERXCompilerProxy.defaultProxy().setClassForName(ERXSubmitButton.class, "WOSubmitB... | |
System.out.println("Couldn't create edge from: " + lastNode + " " + node + " " + e); | public Subgraph[] createRankedSubgraphs(int numberOfSubgraphs) { Node lastNode = null; Subgraph[] subgraphs = new Subgraph[numberOfSubgraphs]; for (int i = 0; i < numberOfSubgraphs; i++) { subgraphs[i] = new Subgraph(this); subgraphs[i].setAttribute(RANK_ATTRIBUTE, RANK_SAME); Node node = new ... | |
System.out.println("Couldn't create edge from: " + inEdge.getTail() + " " + outEdge.getHead() + " " + e); | private void deleteEdges(Node node) { Enumeration inEdgeElements; Enumeration outEdgeElements; inEdgeElements = node.inEdgeElements(); // first, connect in-edges to out-edges while (inEdgeElements.hasMoreElements()) { Edge inEdge = (Edge)inEdgeElements.nextElement(); outEdgeElements = node.ou... | |
System.out.println("Couldn't create edge from: " + inEdge.getTail() + " " + outEdge.getHead() + " " + e); | private void hideEdges(Node node) { Enumeration inEdgeElements; Enumeration outEdgeElements; inEdgeElements = node.inEdgeElements(); // first, connect in-edges to out-edges using wider lines // but only add a new edge if both ends are visible GrappaStyle gs = new GrappaStyle(GrappaConstants.EDGE, "l... | |
validationFailedWithException(ex, anObject, propertyKey()); | public Object validateTakeValueForKeyPath (Object anObject, String aPath) throws NSValidation.ValidationException { Number number = null; try { if (anObject instanceof String) { number = (Number)numberFormatValueForString((String)anObject); } else if (anObject!=nul... | |
return super.validateTakeValueForKeyPath(convertNumber(number), aPath); | return super.validateTakeValueForKeyPath(convertNumber(number), propertyKey()); | public Object validateTakeValueForKeyPath (Object anObject, String aPath) throws NSValidation.ValidationException { Number number = null; try { if (anObject instanceof String) { number = (Number)numberFormatValueForString((String)anObject); } else if (anObject!=nul... |
sqle.printStackTrace(); | if(log.isErrorEnabled()) { log.error("Exception", sqle); } | public ComponentData modifyComponentData(ComponentData data, PopulateDb pdb) { try { Set targets = pdb.executeQuery(propQuery.getValue().toString()); modifyComponentData(data, pdb, targets); } catch (SQLException sqle) { sqle.printStackTrace(); } return data; } |
filter.SetMeanPercentError( Integer.parseInt( argv[3] ) ); filter.SetSTDPercentError( Integer.parseInt( argv[4] ) ); | filter.SetMeanPercentError( Double.parseDouble( argv[3] ) ); filter.SetSTDPercentError( Double.parseDouble( argv[4] ) ); | public static void main( String argv[] ) { System.out.println("VoronoiSegmentationImageFilter Example"); itkImageFileReaderUC2_Pointer readerInput = itkImageFileReaderUC2.itkImageFileReaderUC2_New(); itkImageFileReaderUC2_Pointer readerPrior = itkImageFileReaderUC2.itkImageFileReaderUC2_New(... |
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.console"); | createLogger(); | public ConsoleNodeListener(CSMARTConsole console, NodeComponent nodeComponent, String logFileName, NodeStatusButton statusButton, ConsoleStyledDocument doc) throws IOException { log = CSMART.createLogger("org.cougaar.tools.csmart.ui.console"); this.console = con... |
private void displayComponents(Collection propertyNames) { for (Iterator i = propertyNames.iterator(); i.hasNext(); ) { | private void displayComponents(PropertyTreeNode node) { BaseComponent component = (BaseComponent)nodeToComponent.get(node); for (Iterator i = component.getLocalPropertyNames(); i.hasNext(); ) { | private void displayComponents(Collection propertyNames) { for (Iterator i = propertyNames.iterator(); i.hasNext(); ) { CompositeName propName = (CompositeName) i.next(); for (int j = 0; j < compsToConfig.length; j++) { Property property = compsToConfig[j].getProperty(propName); // FIXME: If there are 2 ... |
for (int j = 0; j < compsToConfig.length; j++) { Property property = compsToConfig[j].getProperty(propName); if (property != null) { addComponentForProperty(property); break; } } | Property property = component.getProperty(propName); if (property != null) addComponentForProperty(property); | private void displayComponents(Collection propertyNames) { for (Iterator i = propertyNames.iterator(); i.hasNext(); ) { CompositeName propName = (CompositeName) i.next(); for (int j = 0; j < compsToConfig.length; j++) { Property property = compsToConfig[j].getProperty(propName); // FIXME: If there are 2 ... |
if (log.isErrorEnabled()) { log.error("PropertyEditorPanel: WARNING: adding new component to tree: " + name); } | private PropertyTreeNode findPropertyNode(CompositeName name, boolean create) { MutableTreeNode parentNode; if (name.size() > 1) { parentNode = findPropertyNode(name.getPrefix(), create); if (parentNode == null) return null; } else { parentNode = root; } for (int i = 0, n = parentNode.ge... | |
List props = new ArrayList(); | List components = new ArrayList(); DefaultTreeModel model = (DefaultTreeModel)tree.getModel(); | private DefaultMutableTreeNode makeTree() { List props = new ArrayList(); // FIXME: This will have trouble if there are more than one property // with the same name for (int i = 0; i < compsToConfig.length; i++) { props.addAll(compsToConfig[i].getPropertyNamesList()); } // SortedSet names = ... |
props.addAll(compsToConfig[i].getPropertyNamesList()); | BaseComponent component = compsToConfig[i]; PropertyTreeNode node = new PropertyTreeNode(component.getFullName()); model.insertNodeInto(node, root, root.getChildCount()); componentToNode.put(component, node); nodeToComponent.put(node, component); components.add(component); | private DefaultMutableTreeNode makeTree() { List props = new ArrayList(); // FIXME: This will have trouble if there are more than one property // with the same name for (int i = 0; i < compsToConfig.length; i++) { props.addAll(compsToConfig[i].getPropertyNamesList()); } // SortedSet names = ... |
SortedSet names = new TreeSet(props); for (Iterator i = names.iterator(); i.hasNext(); ) { CompositeName name = (CompositeName) i.next(); addPropertyName(name); | int i = 0; while (i < components.size()) { BaseComponent component = (BaseComponent)components.get(i); PropertyTreeNode parentNode = (PropertyTreeNode)componentToNode.get(component); int nChildren = component.getChildCount(); for (int j = 0; j < nChildren; j++) { BaseComponent childComponent = component.getChild(j); Pr... | private DefaultMutableTreeNode makeTree() { List props = new ArrayList(); // FIXME: This will have trouble if there are more than one property // with the same name for (int i = 0; i < compsToConfig.length; i++) { props.addAll(compsToConfig[i].getPropertyNamesList()); } // SortedSet names = ... |
propertyEditorPanelListener = this; | private void setModifiableConfigurableComponent() { if (tree != null) configCompPanel.remove(tree); // create tree and model before adding to it // as the add methods reference the tree and model root = new DefaultMutableTreeNode("Properties"); tree = new JTree(new DefaultTreeModel(root)); if (... | |
displayComponents(node.getPropertyNames()); | displayComponents(node); | public void valueChanged(TreeSelectionEvent event) { TreePath path = event.getPath(); if (path == null) return; Object o = path.getLastPathComponent(); if (o instanceof PropertyTreeNode) { stopEditing(); propertyTable.removeAll(); // clear what was displayed PropertyTreeNode node = (Propert... |
sql = "SELECT SETVAL('" + sequenceName + "', (SELECT MAX(" + priKeyAttribute.columnName() +") FROM " + entity.externalName() +") INTO TEMP EOF_TMP_TABLE"; | sql = "SELECT SETVAL('" + sequenceName + "', (SELECT MAX(" + priKeyAttribute.columnName() +") FROM " + entity.externalName() +")) INTO TEMP EOF_TMP_TABLE"; | public NSArray primaryKeySupportStatementsForEntityGroup(NSArray entityGroup) { EOEntity entity; int count; int i; NSMutableArray results; NSArray priKeyAttributes; EOAttribute priKeyAttribute; String sequenceName; results = new NSMutableArray(); count ... |
if (desc == null) return; | private void initFromSingleFile() { String filename = name; if(log.isDebugEnabled()) { log.debug("Parse File: " + filename); } desc = ComponentConnector.parseFile(filename); for(int i=0; i < desc.length; i++) { String agentName = ComponentConnector.getAgentName(desc[i]); if(log.isDebugEn... | |
jsp.getViewport().setBackingStoreEnabled(true); | jsp.getViewport().setScrollMode(JViewport.BACKINGSTORE_SCROLL_MODE); | private void init() { addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { NamedFrame.getNamedFrame().removeFrame(myFrame); e.getWindow().dispose(); } }); setSize(600, 275); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setLocation((screenSi... |
public CSMARTMetrics(ArrayList names, ArrayList data ) { log = CSMART.createLogger(this.getClass().getName()); createTableModel(names, data); init(); | public CSMARTMetrics() { this(null, null); | public CSMARTMetrics(ArrayList names, ArrayList data ) { log = CSMART.createLogger(this.getClass().getName()); createTableModel(names, data); init(); } |
public void saveMetrics() { if(inputFile != null) { saveMetrics(inputFile); } else { saveAsMetrics(); | private void saveMetrics(File outputFile) { if( outputFile == null ) { return; | public void saveMetrics() { if(inputFile != null) { saveMetrics(inputFile); } else { saveAsMetrics(); } } |
String pathname = outputFile.getPath(); String extension = ""; int i = pathname.lastIndexOf('.'); if(i > 0 && i < pathname.length()-1) { extension = pathname.substring(i+1).toLowerCase(); } if(extension.length() == 0 || !extension.equals("mtr")) { pathname = pathname + ".mtr"; outputFile = new File(pathname); } try {... | public void saveMetrics() { if(inputFile != null) { saveMetrics(inputFile); } else { saveAsMetrics(); } } | |
if (inputFile != null && inputFile.exists()) jfc.setSelectedFile(inputFile); jfc.setDialogTitle("Save Metrics data in file..."); | public void saveAsMetrics() { JFileChooser jfc = new JFileChooser(System.getProperty("org.cougaar.install.path")); ExtensionFileFilter filter; String[] filters = { "mtr" }; filter = new ExtensionFileFilter(filters, "Tasks Metric files"); jfc.addChoosableFileFilter(filter); if(jfc.showSaveDialo... | |
handler.verror("SYSTEM id has an URI fragment: " + ids.systemId); | handler.verror("SYSTEM id has a URI fragment: " + ids.systemId); | private ExternalIdentifiers readExternalIds(boolean inNotation, boolean isSubset) throws Exception { char c; ExternalIdentifiers ids = new ExternalIdentifiers(); int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF; if (tryRead("PUBLIC")) ... |
CharConversionException(String message) | CharConversionException() | CharConversionException(String message){ super(message);} |
super(message); | super(); | CharConversionException(String message){ super(message);} |
{ if (!attributes) { attributes = true; if (namespaces) prefixStack.pushContext (); } if (namespaces) { int index; if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) { declarePrefix ("", value); if (!xmlNames) return; } else if ((index = qname.indexOf (':')) == 5 && qname.startsWith ("xmlns"))... | { if (!attributes) { attributes = true; if (namespaces) { prefixStack.pushContext(); } | void attribute (String qname, String value, boolean isSpecified) throws SAXException { if (!attributes) { attributes = true; if (namespaces) prefixStack.pushContext (); } // process namespace decls immediately; // then maybe forget this as an attribute if (namespaces) { int index; // default... |
attributeCount++; attributesList.add(new Attribute(qname, value, isSpecified)); } | void attribute (String qname, String value, boolean isSpecified) throws SAXException { if (!attributes) { attributes = true; if (namespaces) prefixStack.pushContext (); } // process namespace decls immediately; // then maybe forget this as an attribute if (namespaces) { int index; // default... | |
{ if (lexicalHandler != base) lexicalHandler.comment (ch, start, length); } | { if (lexicalHandler != base) { lexicalHandler.comment(ch, start, length); } } | void comment (char ch[], int start, int length) throws SAXException { if (lexicalHandler != base) lexicalHandler.comment (ch, start, length); } |
public String getSystemId () { if (entityStack.empty ()) return null; else return (String) entityStack.peek (); } | public String getSystemId() { if (entityStack.empty()) { return null; } else { return (String) entityStack.peek(); } } | public String getSystemId () { if (entityStack.empty ()) return null; else return (String) entityStack.peek (); } |
{ if (resolver2 == null || !useResolver2 || !extPE) return null; return resolver2.getExternalSubset (name, baseURI); } | { if (resolver2 == null || !useResolver2 || !extPE) { return null; } return resolver2.getExternalSubset(name, baseURI); } | InputSource getExternalSubset (String name, String baseURI) throws SAXException, IOException { if (resolver2 == null || !useResolver2 || !extPE) return null; return resolver2.getExternalSubset (name, baseURI); } |
if (!namespaces) { handler.endElement ("", "", elname); return; } prefixStack.processName (elname, nsTemp, false); handler.endElement (nsTemp [0], nsTemp [1], elname); Enumeration prefixes = prefixStack.getDeclaredPrefixes (); while (prefixes.hasMoreElements ()) handler.endPrefixMapping ((String) prefixes.nextElement... | if (!namespaces) { handler.endElement("", "", elname); return; } prefixStack.processName(elname, nsTemp, false); handler.endElement(nsTemp[0], nsTemp[1], elname); Enumeration prefixes = prefixStack.getDeclaredPrefixes(); while (prefixes.hasMoreElements()) { handler.endPrefixMapping((String) prefixes.nextElement()); }... | void endElement (String elname) throws SAXException { ContentHandler handler = contentHandler; if (!namespaces) { handler.endElement ("", "", elname); return; } prefixStack.processName (elname, nsTemp, false); handler.endElement (nsTemp [0], nsTemp [1], elname); Enumeration prefixes = prefixStack.getD... |
if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) co... | if (!attributes) { if (namespaces) { prefixStack.pushContext(); } } else if (namespaces) { Iterator itt = attributesList.iterator(); while (itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; if (stringInterning) { if ("xmlns" == qname) { continue; } } else { if... | void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with ... |
{ try { dtdHandler.unparsedEntityDecl (name, ids [0], resolveAll ? absolutize (ids [2], ids [1], true) : ids [1], notation); } catch (IOException e) { throw new SAXParseException (e.getMessage (), this, e); } } | { try { dtdHandler.unparsedEntityDecl(name, publicId, resolveAll ? absolutize(baseUri, systemId, true) : systemId, notation); } catch (IOException e) { throw new SAXParseException(e.getMessage(), this, e); } } | void unparsedEntityDecl (String name, String ids [], String notation) throws SAXException { try { dtdHandler.unparsedEntityDecl (name, ids [0], resolveAll ? absolutize (ids [2], ids [1], true) : ids [1], notation); } catch (IOException e) { // "can't happen" throw new SAXParseExcepti... |
{ try { if (baseURI == null) { warn ("No base URI; hope this SYSTEM id is absolute: " + systemId); return new URL (systemId).toString (); } else return new URL (new URL (baseURI), systemId).toString (); } catch (MalformedURLException e) { if (!nice) throw e; warn ("Can't absolutize SYSTEM id: " + e.getMessag... | { try { if (baseURI == null) { if (XmlParser.uriWarnings) { warn ("No base URI; hope this SYSTEM id is absolute: " + systemId); } return new URL(systemId).toString(); } else { return new URL(new URL(baseURI), systemId).toString(); } } catch (MalformedURLException e) { if (!nice) { throw e; } warn("Can't absolu... | String absolutize (String baseURI, String systemId, boolean nice) throws MalformedURLException, SAXException { // FIXME normalize system IDs -- when? // - Convert to UTF-8 // - Map reserved and non-ASCII characters to %HH try { if (baseURI == null) { warn ("No base URI; hope this SYSTEM id is absolute: "... |
{ if (!"[document]".equals (name)) lexicalHandler.endEntity (name); entityStack.pop (); } | { if (!"[document]".equals(name)) { lexicalHandler.endEntity(name); } entityStack.pop(); } | void endExternalEntity (String name) throws SAXException { if (!"[document]".equals (name)) lexicalHandler.endEntity (name); entityStack.pop (); } |
{ InputSource source; | { InputSource source; if (isPE && !extPE) { return null; } if (!isPE && !extGE) { return null; } | InputSource resolveEntity (boolean isPE, String name, InputSource in, String baseURI) throws SAXException, IOException { InputSource source; // external entities might be skipped if (isPE && !extPE) return null; if (!isPE && !extGE) return null; // ... or not lexicalHandler.startEntity (name); if ... |
if (isPE && !extPE) return null; if (!isPE && !extGE) return null; lexicalHandler.startEntity (name); if (resolver2 != null && useResolver2) { source = resolver2.resolveEntity (name, in.getPublicId (), baseURI, in.getSystemId ()); if (source == null) { in.setSystemId (absolutize (baseURI, in.getSystemId (), false)); ... | lexicalHandler.startEntity(name); if (resolver2 != null && useResolver2) { source = resolver2.resolveEntity(name, in.getPublicId(), baseURI, in.getSystemId()); if (source == null) { in.setSystemId(absolutize(baseURI, in.getSystemId(), false)); source = in; } } else { in.setSystemId(absolutize(baseURI, in.getSystemId(),... | InputSource resolveEntity (boolean isPE, String name, InputSource in, String baseURI) throws SAXException, IOException { InputSource source; // external entities might be skipped if (isPE && !extPE) return null; if (!isPE && !extGE) return null; // ... or not lexicalHandler.startEntity (name); if ... |
{ if (!stackOnly) lexicalHandler.startEntity (name); entityStack.push (systemId); } | { if (!stackOnly) { lexicalHandler.startEntity(name); } entityStack.push(systemId); } | void startExternalEntity (String name, String systemId, boolean stackOnly) throws SAXException { // The following warning was deleted because the application has the // option of not setting systemId. Sun's JAXP or Xerces seems to // ignore this case. /* if (systemId == null) warn ("URI was not report... |
{ try { dtdHandler.notationDecl (name, ids [0], (resolveAll && ids [1] != null) ? absolutize (ids [2], ids [1], true) : ids [1]); } catch (IOException e) { throw new SAXParseException (e.getMessage (), this, e); } } | { try { dtdHandler.notationDecl(name, publicId, (resolveAll && systemId != null) ? absolutize(baseUri, systemId, true) : systemId); } catch (IOException e) { throw new SAXParseException(e.getMessage(), this, e); } } | void notationDecl (String name, String ids []) throws SAXException { try { dtdHandler.notationDecl (name, ids [0], (resolveAll && ids [1] != null) ? absolutize (ids [2], ids [1], true) : ids [1]); } catch (IOException e) { // "can't happen" throw new SAXParseException (e.getMessage (), this, ... |
if (requestHandlingLog.isDebugEnabled()) { requestHandlingLog.debug("Dispatching request: " + request); } | public WOResponse dispatchRequest(WORequest request) { WOResponse response = null; if (requestHandlingLog.isDebugEnabled()) { requestHandlingLog.debug("Dispatching request: " + request); } try { if(useComponentActionRedirection()) { ERXComponentAction... | |
checkForeignKeys(entity); | public void applicationDidFinishLaunching(NSNotification n) { log.debug("ApplicationDidFinishLaunching: " + n); for (Enumeration ge = EOModelGroup.defaultGroup().models().objectEnumerator(); ge.hasMoreElements();) { EOModel model = (EOModel)ge.nextElement(); S... | |
checkForeignKeys(eoentity); | public void registerDescriptionForEntitiesInModel(EOModel model) { if (!_registeredModelNames.containsObject(model.name())) { for (Enumeration e = model.entities().objectEnumerator(); e.hasMoreElements();) { EOEntity eoentity = (EOEntity)e.nextElement(); ... | |
public ERXValidationException convertException(NSValidation.ValidationException eov, Object value) { ERXValidationException erve = null; if (log.isDebugEnabled()) log.debug("Converting exception: " + eov + " value: " + (value != null ? value : "<NULL>")); if (!(eov instanceof ERXValidationException)) { String message =... | public ERXValidationException convertException(NSValidation.ValidationException eov) { return convertException(eov, null); | public ERXValidationException convertException(NSValidation.ValidationException eov, Object value) { ERXValidationException erve = null; if (log.isDebugEnabled()) log.debug("Converting exception: " + eov + " value: " + (value != null ? value : "<NULL>")); if (!(eov instanceof ERXVali... |
load_arg(0); instance_of_this(); ifeq("failure"); | private void generateEquals() { begin_method(EQUALS_METHOD); for (int i = 0; i < numArgs; i++) { String fieldName = "FIELD_" + i; load_this(); getfield(fieldName); load_arg(0); checkcast_this(); getfield(fieldName); not_equal... | |
invoke(hashCode); | invoke(HASH_CODE); | private void hash_object() { // (f == null) ? 0 : f.hashCode() String isNull = newLabel(); String end = newLabel(); dup(); ifnull(isNull); invoke(hashCode); goTo(end); nop(isNull); pop(); push(0); nop(end); } |
invoke(doubleToLongBits); | invoke(DOUBLE_TO_LONG_BITS); | private void hash_primitive(Class clazz) { if (clazz.equals(Boolean.TYPE)) { // f ? 0 : 1 push(1); ixor(); } else if (clazz.equals(Double.TYPE)) { // Double.doubleToLongBits(f), hash_code(Long.TYPE) invoke(doubleToLongBits); hash_long()... |
invoke(floatToIntBits); | invoke(FLOAT_TO_INT_BITS); | private void hash_primitive(Class clazz) { if (clazz.equals(Boolean.TYPE)) { // f ? 0 : 1 push(1); ixor(); } else if (clazz.equals(Double.TYPE)) { // Double.doubleToLongBits(f), hash_code(Long.TYPE) invoke(doubleToLongBits); hash_long()... |
return paramString(); | return this.getClass().getName() + "[" + paramString() + "]"; | public String toString() { return paramString(); } |
public JarURLConnection(URL url) | protected JarURLConnection(URL url) | public JarURLConnection(URL url) throws MalformedURLException { super(url); String spec = url.getFile(); int bang = spec.indexOf ("!/", 0); if (bang == -1) throw new MalformedURLException (url + ": No `!/' in spec."); // Extact the url for the jar itself. jarFileURL = new URL(spec.substring... |
public JarEntry getJarEntry () throws java.io.IOException | public JarEntry getJarEntry () throws IOException | public JarEntry getJarEntry () throws java.io.IOException { JarFile jarfile = null; if (element == null) return null; if (! doInput) throw new ProtocolException("Can't open JarEntry if doInput is false"); try { jarfile = getJarFile (); } catch (java.io.IOException x) { /* igno... |
catch (java.io.IOException x) | catch (IOException x) | public JarEntry getJarEntry () throws java.io.IOException { JarFile jarfile = null; if (element == null) return null; if (! doInput) throw new ProtocolException("Can't open JarEntry if doInput is false"); try { jarfile = getJarFile (); } catch (java.io.IOException x) { /* igno... |
if (VERBOSE) { if(log.isDebugEnabled()) { log.error( "Expecting the service-requestor to be the client (OK)"); } | if(log.isErrorEnabled()) { log.error("Expecting the service-requestor to be the client (OK)"); | public void registerClient(final MessageTransportClient mtc) { if (mtc != this.mtc) { if (VERBOSE) { if(log.isDebugEnabled()) { log.error( "Expecting the service-requestor to be the client (OK)"); } } } this.wrappedClient = new MessageTransportClient(... |
if (_rootModuleConf != null) { _confsToFetch.clear(); } | public void setRootModuleConf(String rootModuleConf) { if (rootModuleConf != null && rootModuleConf.equals(_rootModuleConf)) { _selected.put(new ModuleIdConf(_id.getModuleId(), rootModuleConf), Collections.singleton(this)); } _rootModuleConf = rootModuleConf; } | |
if(key.indexOf("@") != 0) { log.warn("No relationship or attribute <" + key + "> in entity: " + entity); } | if(key.indexOf("@") != 0) { if(!_keysWithWarning.contains(key + "-" + entity)) { _keysWithWarning.add(key + "-" + entity); log.warn("No relationship or attribute <" + key + "> in entity: " + entity); } } | public static EOEntity destinationEntityForKeyPath(EOEntity entity, String keyPath) { if(keyPath == null || keyPath.length() == 0) { return entity; } NSArray keyArray = NSArray.componentsSeparatedByString(keyPath, "."); for(Enumeration keys = keyArray.objectEnumerator(); keys.... |
EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName); EODatabaseContext dbContext = EODatabaseContext.registeredDatabaseContextForModel(entity.model(), ec); NSDictionary primaryKey = null; try { dbContext.lock(); EOAdaptorChannel adaptorChannel = dbContext.availableChannel().adaptorChannel(); if (!adaptor... | EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName); EODatabaseContext dbContext = EODatabaseContext.registeredDatabaseContextForModel(entity.model(), ec); NSDictionary primaryKey = null; dbContext.lock(); try { EOAdaptorChannel adaptorChannel = dbContext.availableChannel().adaptorChannel(); if (!adaptor... | public static NSDictionary primaryKeyDictionaryForEntity(EOEditingContext ec, String entityName) { EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName); EODatabaseContext dbContext = EODatabaseContext.registeredDatabaseContextForModel(entity.model(), ec); NSDictionary primaryKey =... |
NSMutableArray result = new NSMutableArray(); if (eos.count() > 0) { String entityName = ((EOEnterpriseObject) eos.objectAtIndex(0)).entityName(); EOEditingContext ec = ((EOEnterpriseObject) eos.objectAtIndex(0)).editingContext(); EOEntity entity = EOUtilities.entityNamed(ec, entityName); EORelationship relationship = ... | NSMutableArray result = new NSMutableArray(); if (eos.count() > 0) { EOEnterpriseObject eo = (EOEnterpriseObject)eos.lastObject(); String entityName = eo.entityName(); EOEditingContext ec = eo.editingContext(); EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName); EORelationship relationship = entity.rela... | public static NSArray snapshotsForObjectsFromRelationshipNamed(NSArray eos, String relKey) { NSMutableArray result = new NSMutableArray(); if (eos.count() > 0) { String entityName = ((EOEnterpriseObject) eos.objectAtIndex(0)).entityName(); EOEditingContext ec = ((EOEnterpriseObje... |
return keySet().size() == 0; | return size() == 0; | public boolean isEmpty() { return keySet().size() == 0; } |
} catch (InterruptedException ie) { return; | public void run() { while (true) { try { AWTEvent evt = queue.getNextEvent(); queue.dispatchEvent(evt); } catch (Throwable x) { System.err.println("Exception during event dispatch:"); x.printStackTrace(System.err); } } } | |
trialName = experiment.getTrials()[currentTrial].getShortName(); | Trial[] trials = experiment.getTrials(); if (currentTrial < trials.length) { trialName = trials[currentTrial].getShortName(); } else { if (log.isWarnEnabled()) log.warn("Bug 2072 in makeResultDirectory: currentTrial >= # trials? currentTrial=" + currentTrial + ", trials.length=" + trials.length); currentTrial--; } | private String makeResultDirectory() { // defaults, if we don't have an experiment File resultDir = csmart.getResultDir(); String experimentName = "Experiment"; String trialName = "Trial 1"; if (experiment != null && usingExperiment && currentTrial >= 0) { resultDir = experiment.getResultDirectory... |
Trial trial = experiment.getTrials()[currentTrial]; | Trial[] trials = experiment.getTrials(); Trial trial = null; if (currentTrial < trials.length) { trial = trials[currentTrial]; } else { trial = trials[0]; if (log.isWarnEnabled()) log.warn("saveResults: Bug 2071/2. currentTrial=" + currentTrial + ", trials.length=" + trials.length); currentTrial--; } | private void saveResults() { if (currentTrial < 0) return; // nothing to save String dirname = makeResultDirectory(); if (experiment != null && usingExperiment) { try { String myHostName = InetAddress.getLocalHost().getHostName(); URL url = new URL("file", myHostName, dirname); ... |
Trial trial = experiment.getTrials()[currentTrial]; | Trial[] trials = experiment.getTrials(); Trial trial = null; if (currentTrial < trials.length) { trial = trials[currentTrial]; } else { if (log.isWarnEnabled()) log.warn("Bug 2071 in setTrialValues. currTrial = " + currentTrial + ", trials.length=" + trials.length); trial = trials[0]; currentTrial--; } | private void setTrialValues() { if (currentTrial >= 0) unsetTrialValues(); // unset previous trial values currentTrial++; // starts with 0 Trial trial = experiment.getTrials()[currentTrial]; trialNameLabel.setText(trial.getShortName()); trialProgressBar.setValue(currentTrial+1); Property[] pro... |
Trial trial = experiment.getTrials()[currentTrial]; | Trial[] trials = experiment.getTrials(); Trial trial = null; if (currentTrial < trials.length) { trial = trials[currentTrial]; } else { if (log.isWarnEnabled()) log.warn("unsetTrialValues, bug 2071/2. currentTrial=" + currentTrial + ", trials.length= " + trials.length); trial = trials[0]; currentTrial--; } | private void unsetTrialValues() { if (experiment == null || !usingExperiment) return; if (currentTrial < 0) return; Trial trial = experiment.getTrials()[currentTrial]; Property[] properties = trial.getParameters(); for (int i = 0; i < properties.length; i++) properties[i].setValue(null)... |
int crc = (int) (filter.getChecksum().getValue()); | long crc = filter.getChecksum().getValue(); | public void closeEntry () throws IOException { int uncompressed_size = def.getTotalIn(); int compressed_size = def.getTotalOut(); int crc = (int) (filter.getChecksum().getValue()); bytes_written += compressed_size; bytes_written += put4 (0x08074b50); if (current.getCrc() == -1 || current.getCompre... |
public void write (byte[] buf, int off, int len) throws IOException | public void write (int bval) throws IOException | public void write (byte[] buf, int off, int len) throws IOException { out.write(buf, off, len); sum.update(buf, off, len); } |
out.write(buf, off, len); sum.update(buf, off, len); | out.write(bval); sum.update(bval); | public void write (byte[] buf, int off, int len) throws IOException { out.write(buf, off, len); sum.update(buf, off, len); } |
public BitString(byte[] bytes, int ignoredBits) | public BitString(byte[] bytes, int ignoredBits, boolean doShift) | public BitString(byte[] bytes, int ignoredBits) { this(bytes, 0, bytes.length, ignoredBits, false); } |
this(bytes, 0, bytes.length, ignoredBits, false); | this(bytes, 0, bytes.length, ignoredBits, doShift); | public BitString(byte[] bytes, int ignoredBits) { this(bytes, 0, bytes.length, ignoredBits, false); } |
super(GLDrawableFactory.getFactory().chooseGraphicsConfiguration(capabilities, null, null)); | super(unwrap((AWTGraphicsConfiguration) GLDrawableFactory.getFactory().chooseGraphicsConfiguration(capabilities, null, null))); | public DualContext(GLCapabilities capabilities) { super(GLDrawableFactory.getFactory().chooseGraphicsConfiguration(capabilities, null, null)); drawable = GLDrawableFactory.getFactory().getGLDrawable(this, capabilities, null); context1 = drawable.createContext(null); context2 = drawable.createContext(null)... |
expression.setStatement( "select count(*) from pg_class where relname = '"+ sequenceName.toLowerCase() +"' and relkind = 'S'" ); | int dotIndex = sequenceName.indexOf("."); if ( dotIndex == -1 ) { expression.setStatement( "select count(*) from pg_class where relname = '"+ sequenceName.toLowerCase() +"' and relkind = 'S'" ); } else { String schemaName = sequenceName.substring(0, dotIndex); String sequenceNameOnly = sequenceName.toLowerCase().substr... | public NSArray newPrimaryKeys (int count, EOEntity entity, JDBCChannel channel) { if( isPrimaryKeyGenerationNotSupported( entity ) ) return null; NSMutableArray results = new NSMutableArray(count); String sequenceName = sequenceNameForEntity( entity ); PostgresqlExpression exp... |
if( new Long( 0 ).equals( row.objectForKey( "COUNT" ) ) ) { | Number numCount = (Number) row.objectForKey("COUNT"); if( numCount != null && numCount.longValue() == 0L ) { | public NSArray newPrimaryKeys (int count, EOEntity entity, JDBCChannel channel) { if( isPrimaryKeyGenerationNotSupported( entity ) ) return null; NSMutableArray results = new NSMutableArray(count); String sequenceName = sequenceNameForEntity( entity ); PostgresqlExpression exp... |
} else { throw new IllegalStateException("Caught exception, but sequence did already exist: " + ex); | } else if ( numCount == null ) { throw new IllegalStateException("Couldn't call sequence " + sequenceName + " and couldn't get sequence information from pg_class: " + ex); } else { throw new IllegalStateException("Caught exception, but sequence did already exist: " + ex); | public NSArray newPrimaryKeys (int count, EOEntity entity, JDBCChannel channel) { if( isPrimaryKeyGenerationNotSupported( entity ) ) return null; NSMutableArray results = new NSMutableArray(count); String sequenceName = sequenceNameForEntity( entity ); PostgresqlExpression exp... |
return entity.primaryKeyRootName() + "_SEQ"; | return entity.primaryKeyRootName() + "_seq"; | protected static String sequenceNameForEntity(EOEntity entity) { return entity.primaryKeyRootName() + "_SEQ"; } |
public static int solveQuadratic(double[] eqn, double[] res) | public static int solveQuadratic(double[] eqn) | public static int solveQuadratic(double[] eqn, double[] res) { double c = eqn[0]; double b = eqn[1]; double a = eqn[2]; if (a == 0) { if (b == 0) return -1; res[0] = -c / b; return 1; } c /= a; b /= a * 2; double det = Math.sqrt(b * b - c); if (det != d... |
double c = eqn[0]; double b = eqn[1]; double a = eqn[2]; if (a == 0) { if (b == 0) return -1; res[0] = -c / b; return 1; } c /= a; b /= a * 2; double det = Math.sqrt(b * b - c); if (det != det) return 0; if (b > 0) { res[0] = -b - det; res[1] = -c / (b + det); } else { res[0] = -c / (b - det); res[1] = -b + det; } ret... | return solveQuadratic(eqn, eqn); | public static int solveQuadratic(double[] eqn, double[] res) { double c = eqn[0]; double b = eqn[1]; double a = eqn[2]; if (a == 0) { if (b == 0) return -1; res[0] = -c / b; return 1; } c /= a; b /= a * 2; double det = Math.sqrt(b * b - c); if (det != d... |
return getName(); | return VfsResolver.prepareForDisplay(getName()); | public String toString() { return getName(); } |
int quoteIndex = s.indexOf('\''); while (quoteIndex >= 0) { s = s.substring(0, quoteIndex) + "''" + s.substring(quoteIndex + 1); quoteIndex = s.indexOf('\'', quoteIndex + 2); } | private static String sqlQuote(String s) { if (s == null) return "null"; return "'" + s + "'"; } | |
this.chain = cloneAndLink(chain); | this.chain = clone(chain); | public TransformerChain(ClassTransformer[] chain) { this.chain = cloneAndLink(chain); } |
public Object clone() { TransformerChain t = (TransformerChain)super.clone(); t.chain = cloneAndLink(chain); return t; | private static ClassTransformer[] clone(ClassTransformer[] chain) { ClassTransformer[] copy = new ClassTransformer[chain.length]; for (int i = chain.length - 1; i >= 0; i--) { copy[i] = (ClassTransformer)chain[i].clone(); } return copy; | public Object clone() { TransformerChain t = (TransformerChain)super.clone(); t.chain = cloneAndLink(chain); return t; } |
public void setTarget(ClassVisitor v) { super.setTarget(chain[0]); chain[chain.length - 1].setTarget(v); | 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 v) { super.setTarget(chain[0]); chain[chain.length - 1].setTarget(v); } |
if (returns) { load_local("result"); } | protected void generate() throws NoSuchMethodException, NoSuchFieldException { declare_interface(iface); generateNullConstructor(); // generate proxied method begin_method(method); load_this(); super_getfield("delegates"); process_arra... | |
if (returns) { store_local("result"); } | public void processElement(Class type) { checkcast(iface); load_args(); invoke(method); } | |
new NSSelector("didSave", ERXConstant.NotificationClassArray), | new NSSelector("fileDidChange", ERXConstant.NotificationClassArray), | public void loadTemplates() { resetTemplateCache(); resetTemplateHolder(); int loadedTempaltes = 0; if (cat.isDebugEnabled()) cat.debug("Starting loading of templates"); // Load all of the files from all of the frameworks. for (Enumeration e = ERXUtilities.allFrameworkNames... |
cat.debug("Found validation template in file: " + fileName + " in framework: " + frameworkName + " for taget language: " + | cat.debug("Found validation template in file: " + fileName + " in framework: " + frameworkName + " for target language: " + | public void loadTemplates() { resetTemplateCache(); resetTemplateHolder(); int loadedTempaltes = 0; if (cat.isDebugEnabled()) cat.debug("Starting loading of templates"); // Load all of the files from all of the frameworks. for (Enumeration e = ERXUtilities.allFrameworkNames... |
if (!cachingEnabled()) { String filePath = WOApplication.application().resourceManager().pathForResourceNamed(fileName, null, new NSArray(targetLanguage)); ERXFileNotificationCenter.defaultCenter().addObserver(defaultFileObserver(), new NSSelector("fileDidChange", ERXConstant.NotificationClassArray), filePath); } | public void loadTemplates() { resetTemplateCache(); resetTemplateHolder(); int loadedTempaltes = 0; if (cat.isDebugEnabled()) cat.debug("Starting loading of templates"); // Load all of the files from all of the frameworks. for (Enumeration e = ERXUtilities.allFrameworkNames... | |
flush(); | public boolean checkError () { return error; } | |
if (out.count + count >= out.buf.length) { out.flush(); if (out.count != 0) throw new IOException("unable to flush output byte buffer"); } converter.setOutput(out.buf, out.count); | converter.setOutput(work_bytes, 0); | private void writeChars(char[] buf, int offset, int count) throws IOException { while (count > 0) { // We must flush if out.count == out.buf.length. // It is probably a good idea to flush if out.buf is almost full. // This test is an approximation for "almost full". if (out.count + count >= out.buf.length... |
out.count = converter.count; | out.write(work_bytes, 0, converter.count); | private void writeChars(char[] buf, int offset, int count) throws IOException { while (count > 0) { // We must flush if out.count == out.buf.length. // It is probably a good idea to flush if out.buf is almost full. // This test is an approximation for "almost full". if (out.count + count >= out.buf.length... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.