rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
Point parentLocation = nativeContainer.getLocationOnScreen(); Point childLocation = mouseEventTarget.getLocationOnScreen(); me.translatePoint(parentLocation.x - childLocation.x, parentLocation.y - childLocation.y); Component oldSource = (Component) me.getSource (); me.setSource (mouseEventTarget); mouseEventTarget.dis... | MouseEvent newEvt = SwingUtilities.convertMouseEvent(nativeContainer, me, mouseEventTarget); mouseEventTarget.dispatchEvent(newEvt); | boolean handleEvent (AWTEvent e) { if ((eventMask & e.getID ()) == 0) return false; if (e instanceof MouseEvent) { MouseEvent me = (MouseEvent) e; acquireComponentForMouseEvent (me); // Avoid dispatching an ENTERED event twice if (mouseEventTarget != null && e.g... |
public CapacityChart create(double factor, long start, long stop); | CapacityChart create(double factor, long start, long stop); | public CapacityChart create(double factor, long start, long stop); |
public double getArea(long start, long stop); | double getArea(long start, long stop); | public double getArea(long start, long stop); |
public double getCapacity(long time); | double getCapacity(long time); | public double getCapacity(long time); |
public long getTime(); | long getTime(); | public long getTime(); |
System.out.println("Here."); | public void doParse() throws Exception { MyHandler handler = new MyHandler(); SAXParserFactory factory = SAXParserFactory.newInstance(); //factory.setValidating(true); factory.setNamespaceAware(true); SAXParser saxParser = factory.newSAXParser(); monitor = new ProgressMonitorInputStream(parent, "Par... | |
public void write (char[] buffer, int offset, int len) throws IOException | public void write (int oneChar) | public void write (char[] buffer, int offset, int len) throws IOException { synchronized (lock) { if (closed) throw new IOException ("Stream closed"); if (len >= 0) resize (len); System.arraycopy(buffer, offset, buf, count, len); count += len; } } |
if (closed) throw new IOException ("Stream closed"); if (len >= 0) resize (len); System.arraycopy(buffer, offset, buf, count, len); count += len; | resize (1); buf[count++] = (char) oneChar; | public void write (char[] buffer, int offset, int len) throws IOException { synchronized (lock) { if (closed) throw new IOException ("Stream closed"); if (len >= 0) resize (len); System.arraycopy(buffer, offset, buf, count, len); count += len; } } |
installListeners(); | private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { ois.defaultReadObject(); createLogger(); modified = false; } | |
System.err.println("CGLIB writing " + file); | public final Class define() { try { init(); generate(); postGenerate(); byte[] bytes = backend.getBytes(); if (debugLocation != null) { File file = new File(new File(debugLocation), className + ".class"); ... | |
if (log.isDebugEnabled()) { | if (log.isInfoEnabled()) { | public void execute() {// if (log.isDebugEnabled()) {// log.info("execute:" + this);// } long currentTime = currentTimeMillis(); for (Enumeration en = allocSub.getAddedList(); en.hasMoreElements(); ) { if (log.isDebugEnabled()) { log.info("execute:" + this + ": got... |
"Component is not editable; create copy?", | cc.getShortName() + " is not editable; create copy?", | public void runBuilder(ModifiableConfigurableComponent cc, boolean alwaysNew, boolean openForEditing) { if (!cc.isEditable() && openForEditing) { int result = JOptionPane.showConfirmDialog(this, "Component is not editable; create copy?", "Component Not Editable", JOptionPane.YES_NO_OPT... |
"Experiment is not editable; create copy?", | experiment.getShortName() + " is not editable; create copy?", | public void runExperimentBuilder(Experiment experiment, boolean alwaysNew, boolean openForEditing) { if (!experiment.isEditable() && openForEditing) { int result = JOptionPane.showConfirmDialog(this, "Experiment is not editable; create copy?", "Experiment Not Editable", JOptionPane.... |
boolean classOnly, | public Object newInstance(Class type, Class[] interfaces, CallbackFilter filter, Class[] callbackTypes, boolean classOnly, boolean useFactory); | |
Object key = KEY_FACTORY.newInstance(superclass, interfaces, filter, callbackTypes, classOnly, useFactory); | Object key = KEY_FACTORY.newInstance(superclass, interfaces, filter, callbackTypes, useFactory); | private Object createHelper() { if (classOnly ^ (callbacks == null)) { if (classOnly) { throw new IllegalStateException("createClass does not accept callbacks"); } else { throw new IllegalStateException("callbacks are required unless using createClass"); ... |
return instance; | return protoclass; | protected Object nextInstance(Object instance) { if (classOnly) { return instance; } else if (instance instanceof Factory) { if (argumentTypes != null) { return ((Factory)instance).newInstance(argumentTypes, arguments, callbacks); } else { ... |
return createUsingReflection(instance.getClass()); | return createUsingReflection(protoclass); | protected Object nextInstance(Object instance) { if (classOnly) { return instance; } else if (instance instanceof Factory) { if (argumentTypes != null) { return ((Factory)instance).newInstance(argumentTypes, arguments, callbacks); } else { ... |
} else if (type.equals(FixedValue.class)) { return FixedValueGenerator.INSTANCE; | static CallbackGenerator getGenerator(Class type) { if (type.equals(NoOp.class)) { return NoOpGenerator.INSTANCE; } else if (type.equals(MethodInterceptor.class)) { return MethodInterceptorGenerator.INSTANCE; } else if (type.equals(InvocationHandler.class)) { ret... | |
test = typeHelper(callback, test, FixedValue.class); | static Class determineType(Callback callback) { Class test = typeHelper(callback, null, NoOp.class); test = typeHelper(callback, test, MethodInterceptor.class); test = typeHelper(callback, test, InvocationHandler.class); test = typeHelper(callback, test, LazyLoader.class); test = ... | |
gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP, cubemap); gl.glEnable(GL.GL_TEXTURE_CUBE_MAP); | cubemap.bind(); cubemap.enable(); | public void display(GLAutoDrawable drawable) { if (!initComplete) { return; } time.update(); GL gl = drawable.getGL(); gl.glClear(GL.GL_COLOR_BUFFER_BIT|GL.GL_DEPTH_BUFFER_BIT); if (doViewAll) { viewer.viewAll(gl); doViewAll = false; } if (getFlag(' ')) { viewer.rotateAbout... |
gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP, cubemap); gl.glEnable(GL.GL_TEXTURE_CUBE_MAP); | cubemap.bind(); cubemap.enable(); | private void drawSkyBox(GL gl) { // Compensates for ExaminerViewer's modification of modelview matrix gl.glMatrixMode(GL.GL_MODELVIEW); gl.glLoadIdentity(); gl.glActiveTexture(GL.GL_TEXTURE1); gl.glDisable(GL.GL_TEXTURE_CUBE_MAP); gl.glActiveTexture(GL.GL_TEXTURE0); gl.glBindTexture(GL.GL_TEXTU... |
int[] cubemapTmp = new int[1]; gl.glGenTextures(1, cubemapTmp, 0); cubemap = cubemapTmp[0]; gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP, cubemap); gl.glTexParameteri(GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR); gl.glTexParameteri(GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR_MIPMAP_LIN... | public void init(GLAutoDrawable drawable) { initComplete = false; GL gl = drawable.getGL(); float cc = 1.0f; gl.glClearColor(cc, cc, cc, 1); gl.glColor3f(1,1,1); gl.glEnable(GL.GL_DEPTH_TEST); try { initExtension(gl, "GL_ARB_vertex_program"); initExtension(gl, "GL_VERSION_1_3"); // For ... | |
loadPNGCubemap(gl, "demos/data/cubemaps/uffizi", true); | cubemap = Cubemap.loadFromStreams(getClass().getClassLoader(), "demos/data/cubemaps/uffizi_", "png", true); | public void init(GLAutoDrawable drawable) { initComplete = false; GL gl = drawable.getGL(); float cc = 1.0f; gl.glClearColor(cc, cc, cc, 1); gl.glColor3f(1,1,1); gl.glEnable(GL.GL_DEPTH_TEST); try { initExtension(gl, "GL_ARB_vertex_program"); initExtension(gl, "GL_VERSION_1_3"); // For ... |
viewer.detach(); | public void shutdownDemo() { if (drawable != null) { ManipManager.getManipManager().unregisterWindow(drawable); drawable.removeGLEventListener(this); } super.shutdownDemo(); } | |
final public static IntBuffer wrap (int[] array) | final public static IntBuffer wrap (int[] array, int offset, int length) | final public static IntBuffer wrap (int[] array) { return wrap (array, 0, array.length); } |
return wrap (array, 0, array.length); | return new IntBufferImpl (array, 0, array.length, offset + length, offset, -1, false); | final public static IntBuffer wrap (int[] array) { return wrap (array, 0, array.length); } |
size = len; | private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { // Read the threshold and loadFactor fields. s.defaultReadObject(); // Read and use capacity, followed by key/value pairs. buckets = new HashEntry[s.readInt()]; int len = s.readInt(); while (len-- > 0) ... | |
if (b[' ']) { canvas.repaint(); } | public void display(GLDrawable drawable) { if (quit) { return; } GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); gl.glMatrixMode(GL.GL_PROJECTION); gl.glLoadIdentity(); if (doViewAll) { viewer.viewAll(gl); doViewAll = false; } objectManipXform... | |
if (log.isDebugEnabled()) { log.debug("Copying society " + this.getSocietyName() + " with assembly " + getAssemblyId() + " into new name " + name); } | public ModifiableComponent copy(String name) { String assemblyID = getAssemblyId(); ModifiableComponent sc = new SocietyDBComponent(name, assemblyID); sc.initProperties(); ((SocietyDBComponent)sc).saveToDatabase(); return sc; } | |
saveInProgress = false; | public boolean saveToDatabase() { if(log.isInfoEnabled()) { log.info("saveToDatabase society (" + getSocietyName() + ") with asb: " + getAssemblyId() + " and old Assembly: " + oldAssemblyId); } // TODO: // Should I notice when I need to save and only save then? // Should I resist creating a new as... | |
properties.setProperty("org.cougaar.core.cluster.persistence.clear", "true"); | private boolean createNode(NodeComponent nodeComponent, String hostName) { String nodeName = nodeComponent.getShortName(); // create an unique node name to circumvent server problems String uniqueNodeName = nodeName; // get arguments from NodeComponent and pass them to ApplicationServer // note that th... | |
properties.remove("org.cougaar.core.cluster.persistence.clear"); | public NodeServesClient restartNode(NodeComponent nodeComponent) { if (oldNodes.size() + runningNodes.size() == 1) { runButton_actionPerformed(); return null; // it doesn't matter what we return, the caller is going away } CommunityServesClient communitySupport = new ClientCommunityController(); ... | |
throw new NoClassDefFoundError(klass_name); | NoClassDefFoundError ncdfe = new NoClassDefFoundError(klass_name); ncdfe.initCause(x); throw ncdfe; | public void run() { if (is_jar) klass_name = getMain(klass_name); if (klass == null) { try { klass = Class.forName(klass_name); } catch (ClassNotFoundException x) { throw new NoClassDefFoundError(klass_name); } } call_main(); } |
throw new Error ("FIXME: compiler error - AbstractSet.equals"); | return containsAll((Collection)o); | public boolean equals(Object o) { if (o == this) { return true; } else if (o instanceof Set && ((Set)o).size() == size()) { throw new Error ("FIXME: compiler error - AbstractSet.equals"); /* FIXME: this is the correct implementation, but a compiler error prevents us from building it. return ... |
throw new ClassNotFoundException(className + " not found in " + urls); | throw new ClassNotFoundException(className + " not found in " + this); | protected Class findClass(final String className) throws ClassNotFoundException { // Just try to find the resource by the (almost) same name String resourceName = className.replace('.', '/') + ".class"; int max = urlinfos.size(); Resource resource = null; for (int i = 0; i < max && resource == null... |
throw new ClassNotFoundException(className, ioe); | ClassNotFoundException cnfe; cnfe = new ClassNotFoundException(className + " not found in " + this); cnfe.initCause(ioe); throw cnfe; | protected Class findClass(final String className) throws ClassNotFoundException { // Just try to find the resource by the (almost) same name String resourceName = className.replace('.', '/') + ".class"; int max = urlinfos.size(); Resource resource = null; for (int i = 0; i < max && resource == null... |
public abstract JarFile getJarFile() throws java.io.IOException; | public abstract JarFile getJarFile() throws IOException; | public abstract JarFile getJarFile() throws java.io.IOException; |
return super.getInputStream(entry); | if (!verified.containsKey(entry.getName()) && verify) { if (DEBUG) debug("reading and verifying " + entry); return new EntryInputStream(entry, super.getInputStream(entry), this); } else { if (DEBUG) debug("reading already verified entry " + entry); if (verify && verified.get(entry.getName()) == Boolean.FALSE) throw new... | public synchronized InputStream getInputStream(ZipEntry entry) throws ZipException, IOException { return super.getInputStream(entry); // XXX verify } |
if (index % 3 != 0 || language.length() != 2) | if (index % 3 != 0 || country.length() != 2) | public String getISO3Country() { if (country == "") return ""; int index = ("AD,AE,AF,AG,AI,AL,AM,AN,AO,AQ,AR,AS,AT,AU,AW,AZ,BA,BB,BD,BE,BF," + "BG,BH,BI,BJ,BM,BN,BO,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CF,CG,CH,CI,CK," + "CL,CM,CN,CO,CR,CU,CV,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER," ... |
throw new Error("java.awt.MenuItem: not implemented"); | this.label = label; | public MenuItem (String label) { throw new Error("java.awt.MenuItem: not implemented"); } |
public synchronized void addActionListener (ActionListener listener) | public synchronized void addActionListener(ActionListener l) | public synchronized void addActionListener (ActionListener listener) { /* FIXME */ } |
actionListener = AWTEventMulticaster.add(actionListener, l); if (actionListener != null) enableEvents(AWTEvent.ACTION_EVENT_MASK); | public synchronized void addActionListener (ActionListener listener) { /* FIXME */ } | |
if (addr1 != null || addr2 != null) | if (addr1 != null && addr2 != null) | protected boolean hostsEqual (URL url1, URL url2) { InetAddress addr1 = getHostAddress (url1); InetAddress addr2 = getHostAddress (url2); if (addr1 != null || addr2 != null) return addr1.equals (addr2); String host1 = url1.getHost(); String host2 = url2.getHost(); if (host1 != null && host... |
if (protocol != null && protocol.length() > 0) | if (protocol.length() != 0) | protected String toExternalForm(URL u) { String protocol, host, file, ref, user; int port; protocol = u.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. host = u.getHost(); if (host == null) ... |
while (true) | do | protected void deflate () throws IOException { while (true) { int len = def.deflate(buf, 0, buf.length); if (len == 0 || len == -1) break; out.write(buf, 0, len); } } |
if (len == 0 || len == -1) break; out.write(buf, 0, len); } | if (len > 0) out.write(buf, 0, len); } while (! def.needsInput()); | protected void deflate () throws IOException { while (true) { int len = def.deflate(buf, 0, buf.length); if (len == 0 || len == -1) break; out.write(buf, 0, len); } } |
deflate (); | while (! def.finished ()) { int len = def.deflate(buf, 0, buf.length); if (len > 0) out.write(buf, 0, len); } | public void finish () throws IOException { def.finish(); deflate (); } |
byte[] b = new byte[1]; b[0] = (byte) bval; write (b, 0, 1); | if (inbuf == null) { inbuf = new byte[128]; } else if (inbufLength == inbuf.length) { def.setInput (inbuf, 0, inbufLength); deflate (); inbufLength = 0; } inbuf[inbufLength++] = (byte) bval; | public void write (int bval) throws IOException { byte[] b = new byte[1]; b[0] = (byte) bval; write (b, 0, 1); } |
return _impl != null; | return IvyContext.getContext().getMessageImpl() != null; | public static boolean isInitialised() { return _impl != null; } |
public AntMessageImpl(Project project) { _project = project; | public AntMessageImpl(Task task) { _task = task; | public AntMessageImpl(Project project) { _project = project; } |
_impl = impl; | IvyContext.getContext().setMessageImpl(impl); | public static void init(MessageImpl impl) { _impl = impl; showInfo(); } |
addAttributeNamed(selectedEntity, "attributeName"); | addAttributeNamed(selectedEntity, "attributeName", null); | public WOComponent addAttribute() { addAttributeNamed(selectedEntity, "attributeName"); return null; } |
public EOAttribute addAttributeNamed(EOEntity entity, String name) { | public EOAttribute addAttributeNamed(EOEntity entity, String name, EOAttribute prototype) { | public EOAttribute addAttributeNamed(EOEntity entity, String name) { EOAttribute a = new EOAttribute(); a.setName(name); a.setColumnName(name.toLowerCase()); entity.addAttribute(a); return a; } |
entity.addAttribute(a); | updateClassProperties(entity,a,false); | public EOAttribute addAttributeNamed(EOEntity entity, String name) { EOAttribute a = new EOAttribute(); a.setName(name); a.setColumnName(name.toLowerCase()); entity.addAttribute(a); return a; } |
log.info(selectedPK + "--" + selectedPK.prototype()); | public void addBackRelationship(EOEntity selectedEntity, EOEntity targetEntity, EOAttribute foreignAttribute, boolean isToMany, boolean addBack) { EORelationship relationship = new EORelationship(); String targetName = targetEntity.name().toLowerCase(); String selectedName = sel... | |
foreignAttribute = new EOAttribute(); foreignAttribute.setName(targetName+"id"); foreignAttribute.setColumnName(targetName+"id"); selectedEntity.addAttribute(foreignAttribute); foreignAttribute.setPrototype(selectedPK.prototype()); updateClassProperties(selectedEntity,foreignAttribute,false); | foreignAttribute = addAttributeNamed(selectedEntity, targetName+"id", selectedPK.prototype()); | public void addBackRelationship(EOEntity selectedEntity, EOEntity targetEntity, EOAttribute foreignAttribute, boolean isToMany, boolean addBack) { EORelationship relationship = new EORelationship(); String targetName = targetEntity.name().toLowerCase(); String selectedName = sel... |
public WOComponent addRelationship() { return null; | public void addRelationship(EOEntity selectedEntity, EOEntity targetEntity, EOAttribute foreignAttribute, boolean isToMany, boolean addBack) { String targetName = targetEntity.name().toLowerCase(); String selectedName = selectedEntity.name().toLowerCase(); EOAttribute selectedPK = (EOAttribute)selectedEntity.primaryKey... | public WOComponent addRelationship() { return null; } |
protected void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) | protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) | protected void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) { if (changeSupport != null) changeSupport.firePropertyChange(propertyName, oldValue, newValue); } |
public void setBounds(int x, int y, int width, int height) | public void setBounds(Rectangle r) | public void setBounds(int x, int y, int width, int height) { this.x = x; this.y = y; this.width = width; this.height = height; } |
this.x = x; this.y = y; this.width = width; this.height = height; | setBounds (r.x, r.y, r.width, r.height); | public void setBounds(int x, int y, int width, int height) { this.x = x; this.y = y; this.width = width; this.height = height; } |
public SmsTextMessage(String theMsg, int theAlphabet) | public SmsTextMessage(String theMsg, int theAlphabet, byte theMessageClass) | public SmsTextMessage(String theMsg, int theAlphabet) { try { switch (theAlphabet) { case SmsConstants.ALPHABET_GSM: // 7-bit encoding, No message class, No compression setDataCodingScheme(SmsConstants.DCS_DEFAULT_7BIT); ... |
try { switch (theAlphabet) { case SmsConstants.ALPHABET_GSM: setDataCodingScheme(SmsConstants.DCS_DEFAULT_7BIT); setContent(null, SmsPduUtil.getSeptets(theMsg), theMsg.length()); break; case SmsConstants.ALPHABET_8BIT: setDataCodingScheme(SmsConstants.DCS_DEFAULT_8BIT); setContent(null, theMsg.getBytes("ISO-8859-1"),... | this(theMsg, theAlphabet); int dcs = getDataCodingScheme() | 0x10 | theMessageClass; setDataCodingScheme((byte)(dcs & 0xff)); | public SmsTextMessage(String theMsg, int theAlphabet) { try { switch (theAlphabet) { case SmsConstants.ALPHABET_GSM: // 7-bit encoding, No message class, No compression setDataCodingScheme(SmsConstants.DCS_DEFAULT_7BIT); ... |
createSiPush(push); } | createSiPush(push, false); } | public WapSiPushMessage(String uri, String message) { super(); SIPush push = new SIPush(uri, message); createSiPush(push); } |
File f = new File( + "/CPFileList.txt"); | File f = new File( path + "/CPFileList.txt"); | NSArray projectPaths() { NSArray frameworkNames = (NSArray)NSBundle.frameworkBundles().valueForKey("name"); NSMutableArray projectPaths = new NSMutableArray(); String mainProject = null; String mainBundleName = NSBundle.mainBundle().name(); // horrendous hack to avoid having to set the NSProjectPath manually... |
assertEquals(new HashSet(Arrays.asList(new String[] {"compile", "runtime", "master"})), new HashSet(Arrays.asList(dds[0].getDependencyConfigurations("runtime")))); | assertEquals(new HashSet(Arrays.asList(new String[] {"compile(*)", "runtime(*)", "master(*)"})), new HashSet(Arrays.asList(dds[0].getDependencyConfigurations("runtime")))); | public void testDependenciesWithScope() throws Exception { ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(new Ivy(), getClass().getResource("test-dependencies-with-scope.pom"), false); assertNotNull(md); assertEquals(ModuleRevisionId.newInstance("fr.jayaso... |
assertEquals(new HashSet(Arrays.asList(new String[] {"master", "compile"})), new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("compile")))); assertEquals(new HashSet(Arrays.asList(new String[] {"runtime"})), new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("runtime")))); | assertEquals(new HashSet(Arrays.asList(new String[] {"master(*)", "compile(*)"})), new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("compile")))); assertEquals(new HashSet(Arrays.asList(new String[] {"runtime(*)"})), new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("runtime")))); | public void testDependenciesWithScope() throws Exception { ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(new Ivy(), getClass().getResource("test-dependencies-with-scope.pom"), false); assertNotNull(md); assertEquals(ModuleRevisionId.newInstance("fr.jayaso... |
assertEquals(new HashSet(Arrays.asList(new String[] {"master", "compile"})), new HashSet(Arrays.asList(dds[2].getDependencyConfigurations("compile")))); assertEquals(new HashSet(Arrays.asList(new String[] {"runtime"})), new HashSet(Arrays.asList(dds[2].getDependencyConfigurations("runtime")))); | assertEquals(new HashSet(Arrays.asList(new String[] {"master(*)", "compile(*)"})), new HashSet(Arrays.asList(dds[2].getDependencyConfigurations("compile")))); assertEquals(new HashSet(Arrays.asList(new String[] {"runtime(*)"})), new HashSet(Arrays.asList(dds[2].getDependencyConfigurations("runtime")))); | public void testDependenciesWithScope() throws Exception { ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(new Ivy(), getClass().getResource("test-dependencies-with-scope.pom"), false); assertNotNull(md); assertEquals(ModuleRevisionId.newInstance("fr.jayaso... |
assertEquals(new HashSet(Arrays.asList(new String[] {"master", "compile"})), new HashSet(Arrays.asList(dds[0].getDependencyConfigurations("compile")))); assertEquals(new HashSet(Arrays.asList(new String[] {"runtime"})), new HashSet(Arrays.asList(dds[0].getDependencyConfigurations("runtime")))); | assertEquals(new HashSet(Arrays.asList(new String[] {"master(*)", "compile(*)"})), new HashSet(Arrays.asList(dds[0].getDependencyConfigurations("compile")))); assertEquals(new HashSet(Arrays.asList(new String[] {"runtime(*)"})), new HashSet(Arrays.asList(dds[0].getDependencyConfigurations("runtime")))); | public void testExclusion() throws Exception { ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(new Ivy(), getClass().getResource("test-exclusion.pom"), false); assertNotNull(md); assertEquals(ModuleRevisionId.newInstance("fr.jayasoft", "test", "1.0"), md.ge... |
assertEquals(new HashSet(Arrays.asList(new String[] {"master", "compile"})), new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("compile")))); assertEquals(new HashSet(Arrays.asList(new String[] {"runtime"})), new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("runtime")))); | assertEquals(new HashSet(Arrays.asList(new String[] {"master(*)", "compile(*)"})), new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("compile")))); assertEquals(new HashSet(Arrays.asList(new String[] {"runtime(*)"})), new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("runtime")))); | public void testExclusion() throws Exception { ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(new Ivy(), getClass().getResource("test-exclusion.pom"), false); assertNotNull(md); assertEquals(ModuleRevisionId.newInstance("fr.jayasoft", "test", "1.0"), md.ge... |
assertEquals(new HashSet(Arrays.asList(new String[] {"master", "compile"})), new HashSet(Arrays.asList(dds[2].getDependencyConfigurations("compile")))); assertEquals(new HashSet(Arrays.asList(new String[] {"runtime"})), new HashSet(Arrays.asList(dds[2].getDependencyConfigurations("runtime")))); | assertEquals(new HashSet(Arrays.asList(new String[] {"master(*)", "compile(*)"})), new HashSet(Arrays.asList(dds[2].getDependencyConfigurations("compile")))); assertEquals(new HashSet(Arrays.asList(new String[] {"runtime(*)"})), new HashSet(Arrays.asList(dds[2].getDependencyConfigurations("runtime")))); | public void testExclusion() throws Exception { ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(new Ivy(), getClass().getResource("test-exclusion.pom"), false); assertNotNull(md); assertEquals(ModuleRevisionId.newInstance("fr.jayasoft", "test", "1.0"), md.ge... |
assertEquals(new HashSet(Arrays.asList(new String[] {"compile", "runtime", "master"})), new HashSet(Arrays.asList(dds[0].getDependencyConfigurations("optional")))); | assertEquals(new HashSet(Arrays.asList(new String[] {"compile(*)", "runtime(*)", "master(*)"})), new HashSet(Arrays.asList(dds[0].getDependencyConfigurations("optional")))); | public void testOptional() throws Exception { ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(new Ivy(), getClass().getResource("test-optional.pom"), false); assertNotNull(md); assertEquals(ModuleRevisionId.newInstance("fr.jayasoft", "test", "1.0"), md.getM... |
assertEquals(new HashSet(Arrays.asList(new String[] {"master", "compile"})), new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("compile")))); assertEquals(new HashSet(Arrays.asList(new String[] {"runtime"})), new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("runtime")))); | assertEquals(new HashSet(Arrays.asList(new String[] {"master(*)", "compile(*)"})), new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("compile")))); assertEquals(new HashSet(Arrays.asList(new String[] {"runtime(*)"})), new HashSet(Arrays.asList(dds[1].getDependencyConfigurations("runtime")))); | public void testOptional() throws Exception { ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(new Ivy(), getClass().getResource("test-optional.pom"), false); assertNotNull(md); assertEquals(ModuleRevisionId.newInstance("fr.jayasoft", "test", "1.0"), md.getM... |
URL url = new URL("http: | public void testRetrieveListing() throws Exception { URL url = new URL("http://www.ibiblio.org/maven/ant/jars/"); ApacheURLLister lister = new ApacheURLLister(); List files = lister.retrieveListing(url, true, false); assertNotNull(files); assertTrue(files.size() > 0); Itera... | |
List files = lister.retrieveListing(url, true, false); | List files = lister.retrieveListing(ApacheURLListerTest.class.getResource("apache-file-listing.html"), true, false); | public void testRetrieveListing() throws Exception { URL url = new URL("http://www.ibiblio.org/maven/ant/jars/"); ApacheURLLister lister = new ApacheURLLister(); List files = lister.retrieveListing(url, true, false); assertNotNull(files); assertTrue(files.size() > 0); Itera... |
Iterator iter = files.iterator(); while (iter.hasNext()) { URL file = (URL) iter.next(); assertNotNull(file); assertTrue("found non matching file: "+file.getPath(), file.getPath().matches(".*/ant/jars/[^/]*$")); } | public void testRetrieveListing() throws Exception { URL url = new URL("http://www.ibiblio.org/maven/ant/jars/"); ApacheURLLister lister = new ApacheURLLister(); List files = lister.retrieveListing(url, true, false); assertNotNull(files); assertTrue(files.size() > 0); Itera... | |
url = new URL("http: | List dirs = lister.retrieveListing(ApacheURLListerTest.class.getResource("apache-dir-listing.html"), false, true); assertNotNull(dirs); assertEquals(4, dirs.size()); | public void testRetrieveListing() throws Exception { URL url = new URL("http://www.ibiblio.org/maven/ant/jars/"); ApacheURLLister lister = new ApacheURLLister(); List files = lister.retrieveListing(url, true, false); assertNotNull(files); assertTrue(files.size() > 0); Itera... |
List dirs = lister.retrieveListing(url, false, true); assertNotNull(dirs); assertTrue(dirs.size() > 0); | public void testRetrieveListing() throws Exception { URL url = new URL("http://www.ibiblio.org/maven/ant/jars/"); ApacheURLLister lister = new ApacheURLLister(); List files = lister.retrieveListing(url, true, false); assertNotNull(files); assertTrue(files.size() > 0); Itera... | |
iter = dirs.iterator(); while (iter.hasNext()) { URL dir = (URL) iter.next(); assertNotNull(dir); assertTrue("found non matching dir: "+dir.getPath(), dir.getPath().matches(".*/$")); } List empty = lister.retrieveListing(url, true, false); | List empty = lister.retrieveListing(ApacheURLListerTest.class.getResource("apache-dir-listing.html"), true, false); | public void testRetrieveListing() throws Exception { URL url = new URL("http://www.ibiblio.org/maven/ant/jars/"); ApacheURLLister lister = new ApacheURLLister(); List files = lister.retrieveListing(url, true, false); assertNotNull(files); assertTrue(files.size() > 0); Itera... |
if (!url.getPath().endsWith("/")) { | if (!url.getPath().endsWith("/") && !url.getPath().endsWith(".html")) { | public List retrieveListing(URL url, boolean includeFiles, boolean includeDirectories) throws IOException { List urlList = new ArrayList(); // add trailing slash for relative urls if (!url.getPath().endsWith("/")) { url = new URL(url.getProtocol(), url.getHost(), url.getPort()... |
sc = createSoc(name, item.cls); | private DefaultMutableTreeNode newSociety(DefaultMutableTreeNode node) { ArrayList values = new ArrayList(10); // add in ComboItems for societies such as scalability and abc for (int i = 0; i < socComboItems.length; i++) values.add(socComboItems[i]); // add in society names from database try { ... | |
sc = createSoc(name, item.cls); | private DefaultMutableTreeNode newSociety(DefaultMutableTreeNode node) { ArrayList values = new ArrayList(10); // add in ComboItems for societies such as scalability and abc for (int i = 0; i < socComboItems.length; i++) values.add(socComboItems[i]); // add in society names from database try { ... | |
public String getSourceClassName() { return getParameter(sourceClassParameter); | public static String getSourceClassName(DataFlavor flavor) { return flavor.getParameter(sourceClassParameter); | public String getSourceClassName() { return getParameter(sourceClassParameter); } |
sm.checkPermission (new SerializablePermission ("enableSubtitution")); | sm.checkPermission (new SerializablePermission ("enableSubstitution")); | protected boolean enableResolveObject (boolean enable) throws SecurityException { if (enable) { SecurityManager sm = System.getSecurityManager (); if (sm != null) sm.checkPermission (new SerializablePermission ("enableSubtitution")); } boolean old_val = this.resolveEnabled; this.resolveEnable... |
public final int read(byte[] b, int off, int len) throws IOException | public final int read(byte[] b) throws IOException | public final int read(byte[] b, int off, int len) throws IOException { if (off < 0 || len < 0 || off + len > b.length) throw new ArrayIndexOutOfBoundsException(); return super.read(b, off, len); } |
if (off < 0 || len < 0 || off + len > b.length) throw new ArrayIndexOutOfBoundsException(); return super.read(b, off, len); | return super.read(b, 0, b.length); | public final int read(byte[] b, int off, int len) throws IOException { if (off < 0 || len < 0 || off + len > b.length) throw new ArrayIndexOutOfBoundsException(); return super.read(b, off, len); } |
while (true) | readloop: while (true) | public final String readLine() throws IOException { StringBuffer strb = new StringBuffer(); while (true) { int c = read(); if (c < 0) // got an EOF return strb.length() > 0 ? strb.toString() : null; char ch = (char) c; if ((ch &= 0xFF) == '\n') break; if (ch == '\r') { // FIXME: The following co... |
int c = read(); if (c < 0) return strb.length() > 0 ? strb.toString() : null; char ch = (char) c; if ((ch &= 0xFF) == '\n') break; | int c = 0; char ch = ' '; boolean getnext = true; while (getnext) { getnext = false; c = read(); if (c < 0) return strb.length() > 0 ? strb.toString() : null; ch = (char) c; if ((ch &= 0xFF) == '\n') if (ignoreInitialNewline) { ignoreInitialNewline = false; getnext = true; } else break readloop; } | public final String readLine() throws IOException { StringBuffer strb = new StringBuffer(); while (true) { int c = read(); if (c < 0) // got an EOF return strb.length() > 0 ? strb.toString() : null; char ch = (char) c; if ((ch &= 0xFF) == '\n') break; if (ch == '\r') { // FIXME: The following co... |
if (in instanceof BufferedInputStream && (read() & 0xFF) != '\n') | int next_c = 0; char next_ch = ' '; if (in instanceof BufferedInputStream) | public final String readLine() throws IOException { StringBuffer strb = new StringBuffer(); while (true) { int c = read(); if (c < 0) // got an EOF return strb.length() > 0 ? strb.toString() : null; char ch = (char) c; if ((ch &= 0xFF) == '\n') break; if (ch == '\r') { // FIXME: The following co... |
BufferedInputStream bin = (BufferedInputStream) in; if (bin.pos > 0) bin.pos--; | next_c = read(); next_ch = (char) (next_c & 0xFF); if ((next_ch != '\n') && (next_c >= 0)) { BufferedInputStream bin = (BufferedInputStream) in; if (bin.pos > 0) bin.pos--; } | public final String readLine() throws IOException { StringBuffer strb = new StringBuffer(); while (true) { int c = read(); if (c < 0) // got an EOF return strb.length() > 0 ? strb.toString() : null; char ch = (char) c; if ((ch &= 0xFF) == '\n') break; if (ch == '\r') { // FIXME: The following co... |
mark(1); if ((read() & 0xFF) != '\n') reset(); } | next_c = read(); next_ch = (char) (next_c & 0xFF); if ((next_ch != '\n') && (next_c >= 0)) { mark(1); if ((read() & 0xFF) != '\n') reset(); } } else ignoreInitialNewline = true; | public final String readLine() throws IOException { StringBuffer strb = new StringBuffer(); while (true) { int c = read(); if (c < 0) // got an EOF return strb.length() > 0 ? strb.toString() : null; char ch = (char) c; if ((ch &= 0xFF) == '\n') break; if (ch == '\r') { // FIXME: The following co... |
ObjectStreamField (String name, String typename) | ObjectStreamField (Field field) | ObjectStreamField (String name, String typename) { this.name = name; this.typename = typename; try { type = TypeSignature.getClassForEncoding(typename); } catch(ClassNotFoundException e) { } } |
this.name = name; this.typename = typename; try { type = TypeSignature.getClassForEncoding(typename); } catch(ClassNotFoundException e) { } | this (field.getName(), field.getType()); this.field = field; toset = !Modifier.isFinal(field.getModifiers()); | ObjectStreamField (String name, String typename) { this.name = name; this.typename = typename; try { type = TypeSignature.getClassForEncoding(typename); } catch(ClassNotFoundException e) { } } |
int comp = fields[i].getName().compareTo(exportedFields[j].getName()); | int comp = fields[i].compareTo(exportedFields[j]); | void setClass(Class cl, ObjectStreamClass superClass) throws InvalidClassException { this.clazz = cl; cacheMethods(); long class_uid = getClassUID(cl); if (uid == 0) uid = class_uid; else { // Check that the actual UID of the resolved class matches the UID from // the stream. if (uid !=... |
try { exportedFields[j].lookupField(clazz); exportedFields[j].checkFieldType(); } catch (NoSuchFieldException _) { } | void setClass(Class cl, ObjectStreamClass superClass) throws InvalidClassException { this.clazz = cl; cacheMethods(); long class_uid = getClassUID(cl); if (uid == 0) uid = class_uid; else { // Check that the actual UID of the resolved class matches the UID from // the stream. if (uid !=... | |
public SAXParseException (String message, String publicId, String systemId, int lineNumber, int columnNumber) { | public SAXParseException (String message, Locator locator) { | public SAXParseException (String message, String publicId, String systemId, int lineNumber, int columnNumber) { super(message); init(publicId, systemId, lineNumber, columnNumber); } |
init(publicId, systemId, lineNumber, columnNumber); | if (locator != null) { init(locator.getPublicId(), locator.getSystemId(), locator.getLineNumber(), locator.getColumnNumber()); } else { init(null, null, -1, -1); } | public SAXParseException (String message, String publicId, String systemId, int lineNumber, int columnNumber) { super(message); init(publicId, systemId, lineNumber, columnNumber); } |
String strPluginList = filteringProperties .getProperty("project.required.plugins"); if (strPluginList != null) { StringTokenizer st = new StringTokenizer(strPluginList, ","); while (st.hasMoreTokens()) { forrestPropertiesStringURI = ForrestConfUtils.getPluginDir(st .nextToken().trim()); try { forrestPropertiesStringUR... | public void initialize() throws Exception { forrestHome = ForrestConfUtils.getForrestHome(); projectHome = ForrestConfUtils.getProjectHome(); contextHome = ForrestConfUtils.getContextHome(); filteringProperties = new AntProperties(); // add forrest.home and project.home to properties filteringProperties.setPrope... | |
String strPluginList = filteringProperties .getProperty("project.required.plugins"); if (strPluginList != null) { StringTokenizer st = new StringTokenizer(strPluginList, ","); while (st.hasMoreTokens()) { forrestPropertiesStringURI = ForrestConfUtils.getPluginDir(st .nextToken().trim()); try { forrestPropertiesStringUR... | public void initialize() throws Exception { forrestHome = ForrestConfUtils.getForrestHome(); projectHome = ForrestConfUtils.getProjectHome(); contextHome = ForrestConfUtils.getContextHome(); filteringProperties = new AntProperties(); // add forrest.home and project.home to properties filteringProperties.setPrope... | |
sb.append("TransformerChain{"); | sb.append("ClassTransformerChain{"); | public String toString() { StringBuffer sb = new StringBuffer(); sb.append("TransformerChain{"); for (int i = 0; i < chain.length; i++) { if (i > 0) { sb.append(", "); } sb.append(chain[i].toString()); } sb.append("}"); return... |
serialComm_.setTimeout(props.getProperty("sms.gsm.timeout", "0")); | public void init(Properties props) { String appName = props.getProperty("sms.gsm.appname", DEFAULT_SERIAL_PORT_APP_NAME); String portName = props.getProperty("sms.gsm.serialport", "COM1"); serialComm_ = new SerialComm(appName, portName); serialComm_.setBitRate(props.getProperty("sms.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.