bugged stringlengths 6 599k | fixed stringlengths 6 40.8M | __index_level_0__ int64 0 3.24M |
|---|---|---|
public Object build(BuildContext bc) throws BuildException { if (directive == null) throw new BuildException("Error instantiating Directive object for #" + desc.name); return directive.build(this, bc); } | public Object build(BuildContext bc) throws BuildException { if (directive == null) throw new BuildException("Error instantiating Directive object for #" + desc.name); }; return d.build(this, bc); } | 3,230,863 |
protected String renderGT() { System.err.println ("render: >"); return ">"; } | protected String renderGT() { return ">"; } | 3,230,864 |
protected String renderLT() { System.err.println ("render: <"); return "<"; } | protected String renderLT() { return "<"; } | 3,230,865 |
public Object doInHibernate(org.hibernate.Session session) throws org.hibernate.HibernateException, java.sql.SQLException { Experimenter o = (Experimenter) session.get(Experimenter.class, new Integer(1)); if (o == null) ... | public Object doInHibernate(org.hibernate.Session session) throws org.hibernate.HibernateException, java.sql.SQLException { Experimenter o = (Experimenter) session.get(Experimenter.class, new Integer(1)); if (o == null) ... | 3,230,866 |
public Object doInHibernate(org.hibernate.Session session) throws org.hibernate.HibernateException, java.sql.SQLException { Experimenter o = (Experimenter) session.get(Experimenter.class, new Integer(1)); if (o == null) ... | public Object doInHibernate(org.hibernate.Session session) throws org.hibernate.HibernateException, java.sql.SQLException { Experimenter o = (Experimenter) session.get(Experimenter.class, new Integer(1)); if (o == null) ... | 3,230,867 |
public Object doInHibernate(org.hibernate.Session session) throws org.hibernate.HibernateException, java.sql.SQLException { Experimenter o = (Experimenter) session.get(Experimenter.class, new Integer(1)); if (o == null) ... | public Object doInHibernate(org.hibernate.Session session) throws org.hibernate.HibernateException, java.sql.SQLException { Experimenter o = (Experimenter) session.get(Experimenter.class, new Integer(1)); if (o == null) ... | 3,230,868 |
protected void setUp() { String[] paths = new String[] { "config.xml", "data.xml", "hibernate.xml" }; ctx = new ClassPathXmlApplicationContext(paths); ht = (HibernateTemplate) ctx.getBean("hibernateTemplate"); ht.execute(new HibernateCallback() { publi... | protected void setUp() throws IOException { String[] paths = new String[] { "config.xml", "data.xml", "hibernate.xml" }; ctx = new ClassPathXmlApplicationContext(paths); ht = (HibernateTemplate) ctx.getBean("hibernateTemplate"); ht.execute(new HibernateCallback() ... | 3,230,869 |
protected void setUp() { String[] paths = new String[] { "config.xml", "data.xml", "hibernate.xml" }; ctx = new ClassPathXmlApplicationContext(paths); ht = (HibernateTemplate) ctx.getBean("hibernateTemplate"); ht.execute(new HibernateCallback() { publi... | protected void setUp() { String[] paths = new String[] { "config.xml", "data.xml", "hibernate.xml" }; ctx = new ClassPathXmlApplicationContext(paths); ht = (HibernateTemplate) ctx.getBean("hibernateTemplate"); ht.execute(new HibernateCallback() { publi... | 3,230,870 |
private RubyRegexp getPattern(IRubyObject[] args) { if (args.length == 0) { isWhitespace = true; return RubyRegexp.newRegexp(runtime, "\\s+", 0, null); } if (args[0] instanceof RubyRegexp) { // Even if we have whitespace-only explicit regexp we do not ... | private RubyRegexp getPattern(IRubyObject[] args) { if (args.length == 0) { isWhitespace = true; return RubyRegexp.newRegexp(runtime, "\\s+", 0, null); } if (args[0] instanceof RubyRegexp) { // Even if we have whitespace-only explicit regexp we do not ... | 3,230,872 |
private void process() { if (limit == 1) { result.add(splitee); return; } int last = 0; int beg = 0; int hits = 0; int len = splitee.length(); while ((beg = pattern.searchAgain(splitee)) > -1) { hits++; RubyMatchData matchData = (RubyMatchData) runtime.getCurrentCo... | private void process() { if (limit == 1) { result.add(splitee); return; } int last = 0; int beg = 0; int hits = 0; int len = splitee.length(); while ((beg = pattern.searchAgain(splitee)) > -1) { hits++; RubyMatchData matchData = (RubyMatchData) runtime.getCurrentCo... | 3,230,873 |
public PixelBuffer (Integer id, Pixels pixels) { if (id == null) throw new NullPointerException("Expecting a not-null id."); this.pixels = pixels; this.id = id; path = Helper.getPixelsPath(id); } | PixelBuffer (Pixels pixels) { if (id == null) throw new NullPointerException("Expecting a not-null id."); this.pixels = pixels; this.id = id; path = Helper.getPixelsPath(id); } | 3,230,874 |
public PixelBuffer (Integer id, Pixels pixels) { if (id == null) throw new NullPointerException("Expecting a not-null id."); this.pixels = pixels; this.id = id; path = Helper.getPixelsPath(id); } | public PixelBuffer (Integer id, Pixels pixels) { if (id == null) throw new NullPointerException("Expecting a not-null id."); this.pixels = pixels; this.id = id; path = Helper.getPixelsPath(id); } | 3,230,875 |
public PixelBuffer (Integer id, Pixels pixels) { if (id == null) throw new NullPointerException("Expecting a not-null id."); this.pixels = pixels; this.id = id; path = Helper.getPixelsPath(id); } | public PixelBuffer (Integer id, Pixels pixels) { if (id == null) throw new NullPointerException("Expecting a not-null id."); this.pixels = pixels; this.id = id; path = Helper.getPixelsPath(id); } | 3,230,876 |
int getBitDepth() { return 2; // FIXME pixels.getPixelsType(); } | int getBitDepth() { return 16; // FIXME pixels.getPixelsType(); } | 3,230,877 |
public MappedByteBuffer getPlane(Integer z, Integer c, Integer t) throws IOException { Long offset = getPlaneOffset(z, c, t); Integer size = getPlaneSize(); return getRegion(size, offset); } | publicMappedByteBuffergetPlane(Integerz,Integerc,Integert)throwsIOException{Longoffset=getPlaneOffset(z,c,t);Integersize=getPlaneSize();returngetRegion(size,offset);} | 3,230,878 |
public Integer getPlaneSize() { if (planeSize == null) planeSize = getSizeX() * getSizeY() * getBitDepth(); return planeSize; } | public Integer getPlaneSize() { if (planeSize == null) planeSize = getSizeX() * getSizeY() * getByteWidth(); return planeSize; } | 3,230,879 |
public void testNowLetsTryToSaveSomething() throws Exception { // prepare data ImageData imgData = new ImageData(); imgData.setName("My test image"); imgData.setDescription("My test description"); // convert it // FIXME mapper.reverse } | Image img = (Image) reverse.map(imgData); img = (Image) psrv.createDataObject(img,null); assertNotNull("We should get something back",img); assertNotNull("Should have an id",img.getId()); Image img2 = (Image) q.getById(Image.class,img.getId()); assertNotNull("And we should be able to find it again.",img2); Image img ... | 3,230,881 |
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinit... | public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinit... | 3,230,882 |
void visitBeanFactory(ConfigurableListableBeanFactory beanRegistry) throws BeansException; | void visitBeanFactory(ConfigurableListableBeanFactory beanRegistry) throws BeansException; | 3,230,883 |
public static Date getDate() { synchronized(_clock) { if ((TIME - dateTime) > 1000) { date = new Date(TIME); } return date; } } | public static Date getDate() { synchronized(_clock) { if ((TIME - dateTime) > 1000) { date = new Date(TIME); } return date; } } | 3,230,884 |
protected String getExceptedArgsString(RubyObject[] methodArgs) { StringBuffer sb = new StringBuffer(); sb.append("Wrong arguments:"); if (methodArgs == null || methodArgs.length == 0) { sb.append(" No args"); } else { sb.append(" ("); for (int i ... | protected String getExceptedArgsString(RubyObject[] methodArgs) { StringBuffer sb = new StringBuffer(); sb.append("Wrong arguments:"); if (methodArgs.length == 0) { sb.append(" No args"); } else { sb.append(" ("); for (int i = 0; i < methodArgs.le... | 3,230,886 |
protected String getExceptedArgsString(RubyObject[] methodArgs) { StringBuffer sb = new StringBuffer(); sb.append("Wrong arguments:"); if (methodArgs == null || methodArgs.length == 0) { sb.append(" No args"); } else { sb.append(" ("); for (int i ... | protected String getExceptedArgsString(RubyObject[] methodArgs) { StringBuffer sb = new StringBuffer(); sb.append("Wrong arguments:"); if (methodArgs == null || methodArgs.length == 0) { sb.append(" No args"); } else { sb.append(" ("); for (int i ... | 3,230,887 |
protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (methodArgs == null) { methodArgs = new Object[0]; } if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs = ... | protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (methodArgs == null) { methodArgs = new Object[0]; } if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs = ... | 3,230,888 |
protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (methodArgs == null) { methodArgs = new Object[0]; } if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs = ... | protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (methodArgs == null) { methodArgs = new Object[0]; } if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs = ... | 3,230,889 |
protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (methodArgs == null) { methodArgs = new Object[0]; } if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs = ... | protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (methodArgs == null) { methodArgs = new Object[0]; } if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs = ... | 3,230,890 |
protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (methodArgs == null) { methodArgs = new Object[0]; } if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs = ... | protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (methodArgs == null) { methodArgs = new Object[0]; }*/ if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs ... | 3,230,891 |
protected void testArgsCount(RubyObject[] methodArgs) { if (args == null && methodArgs != null && methodArgs.length > 0) { throw new RubyArgumentException(getExceptedArgsString(methodArgs)); } else if (args == null && (methodArgs == null || methodArgs.length == 0)) { return; ... | protected void testArgsCount(RubyObject[] methodArgs) { if (args == null && methodArgs != null && methodArgs.length > 0) { throw new RubyArgumentException(getExceptedArgsString(methodArgs)); } else if (args == null && (methodArgs == null || methodArgs.length == 0)) { return; ... | 3,230,892 |
protected void testArgsCount(RubyObject[] methodArgs) { if (args == null && methodArgs != null && methodArgs.length > 0) { throw new RubyArgumentException(getExceptedArgsString(methodArgs)); } else if (args == null && (methodArgs == null || methodArgs.length == 0)) { return; ... | protected void testArgsCount(RubyObject[] methodArgs) { if (args == null && methodArgs != null && methodArgs.length > 0) { throw new RubyArgumentException(getExceptedArgsString(methodArgs)); } else if (args == null && (methodArgs == null || methodArgs.length == 0)) { return; ... | 3,230,893 |
protected void testArgsCount(RubyObject[] methodArgs) { if (args == null && methodArgs != null && methodArgs.length > 0) { throw new RubyArgumentException(getExceptedArgsString(methodArgs)); } else if (args == null && (methodArgs == null || methodArgs.length == 0)) { return; ... | protected void testArgsCount(RubyObject[] methodArgs) { if (args == null && methodArgs != null && methodArgs.length > 0) { throw new RubyArgumentException(getExceptedArgsString(methodArgs)); } else if (args == null && (methodArgs == null || methodArgs.length == 0)) { return; ... | 3,230,894 |
public Class getJavaClass() { return value.getClass(); } | public Class getJavaClass() { return value != null ? value.getClass() : Object.class; } | 3,230,895 |
public void setIvar(RubyId id, RubyObject value) { //return null; } | public RubyObject setIvar(RubyId id, RubyObject value) { return null; //return null; } | 3,230,896 |
public String[] getNames() { try { getFiles(); } catch (PatternSyntaxException e) { System.out.println("BAD PATTERN: " + e.getPattern()); // This can happen if someone does Dir.glob("{") or similiar. return new String[] {}; } Collection allMatchedName... | public String[] getNames() { try { getFiles(); } catch (PatternSyntaxException e) { // This can happen if someone does Dir.glob("{") or similiar. return new String[] {}; } Collection allMatchedNames = new TreeSet(); for (Iterator iter = patterns.iter... | 3,230,897 |
public Collection findCollection(Collection source){ if (source==null) return null; Collection target = (Collection) model2target.get(source); if (null==target) { try { target = (Collection) source.getClass().newInstance(); // TODO do we want to use the map here? model2target.put(source,target); } catc... | public Collection findCollection(Collection source){ if (source==null) return null; Collection target = (Collection) model2target.get(source); if (null==target) { try { target = (Collection) source.getClass().newInstance(); // TODO do we want to use the map here? model2target.put(source,target); } catc... | 3,230,898 |
public Object findTarget(Object current){ // IMMUTABLES if (null == current | current instanceof Integer | current instanceof String) // TODO can use findTarget then for these as well. { return current; } else // Special cases TODO put into doFindTarget if (current instanceof Date){ return new Timest... | public Object findTarget(Object current){ // IMMUTABLES if (null == current | current instanceof Integer | current instanceof String) // TODO can use findTarget then for these as well. { return current; } else // Special cases TODO put into doFindTarget if (current instanceof Date){ return new Timest... | 3,230,899 |
public Object findTarget(Object current){ // IMMUTABLES if (null == current | current instanceof Integer | current instanceof String) // TODO can use findTarget then for these as well. { return current; } else // Special cases TODO put into doFindTarget if (current instanceof Date){ return new Timest... | public Object findTarget(Object current){ // IMMUTABLES if (null == current | current instanceof Integer | current instanceof String) // TODO can use findTarget then for these as well. { return current; } else // Special cases TODO put into doFindTarget if (current instanceof Date){ return new Timest... | 3,230,900 |
public Object findTarget(Object current){ // IMMUTABLES if (null == current | current instanceof Integer | current instanceof String) // TODO can use findTarget then for these as well. { return current; } else // Special cases TODO put into doFindTarget if (current instanceof Date){ return new Timest... | public Object findTarget(Object current){ // IMMUTABLES if (null == current | current instanceof Integer | current instanceof String) // TODO can use findTarget then for these as well. { return current; } else // Special cases TODO put into doFindTarget if (current instanceof Date){ return new Timest... | 3,230,901 |
public Object findTarget(Object current){ // IMMUTABLES if (null == current | current instanceof Integer | current instanceof String) // TODO can use findTarget then for these as well. { return current; } else // Special cases TODO put into doFindTarget if (current instanceof Date){ return new Timest... | public Object findTarget(Object current){ // IMMUTABLES if (null == current | current instanceof Integer | current instanceof String) // TODO can use findTarget then for these as well. { return current; } else // Special cases TODO put into doFindTarget if (current instanceof Date){ return new Timest... | 3,230,902 |
public Object findTarget(Object current){ // IMMUTABLES if (null == current | current instanceof Integer | current instanceof String) // TODO can use findTarget then for these as well. { return current; } else // Special cases TODO put into doFindTarget if (current instanceof Date){ return new Timest... | public Object findTarget(Object current){ // IMMUTABLES if (null == current | current instanceof Integer | current instanceof String) // TODO can use findTarget then for these as well. { return current; } else // Special cases TODO put into doFindTarget if (current instanceof Date){ return new Timest... | 3,230,903 |
public HTMLReport(ProjectData projectData, File outputDir, FileFinder finder) throws Exception { this.destinationDir = outputDir; this.finder = finder; this.projectData = projectData; CopyFiles.copy(outputDir); generatePackageList(); generateSourceFileLists(); generateOverviews(); generateSourceFiles(); } | public HTMLReport(ProjectData projectData, File outputDir, FileFinder finder) throws Exception { this.destinationDir = outputDir; this.finder = finder; this.projectData = projectData; CopyFiles.copy(outputDir); generatePackageList(); generateSourceFileLists(); generateOverviews(); generateSourceFiles(); } | 3,230,905 |
private void generateSourceFile(SourceFileData sourceFileData) throws IOException { if (!sourceFileData.containsInstrumentationInfo()) { LOGGER.info("Data file does not contain instrumentation " + "information for the file " + sourceFileData.getName() + ". Ensure this class was instrumented, and this " ... | private void generateSourceFile(SourceFileData sourceFileData) throws IOException { if (!sourceFileData.containsInstrumentationInfo()) { LOGGER.info("Data file does not contain instrumentation " + "information for the file " + sourceFileData.getName() + ". Ensure this class was instrumented, and this " ... | 3,230,907 |
private String generateTableRowForPackage(PackageData packageData) { StringBuffer ret = new StringBuffer(); String url1 = "frame-summary-" + packageData.getName() + ".html"; String url2 = "frame-sourcefiles-" + packageData.getName() + ".html"; double lineCoverage = -1; double branchCoverage = -1; double cc... | private String generateTableRowForPackage(PackageData packageData) { StringBuffer ret = new StringBuffer(); String url1 = "frame-summary-" + packageData.getName() + ".html"; String url2 = "frame-sourcefiles-" + packageData.getName() + ".html"; double lineCoverage = -1; double branchCoverage = -1; double cc... | 3,230,908 |
private String generateTableRowForSourceFile(SourceFileData sourceFileData) { StringBuffer ret = new StringBuffer(); double lineCoverage = -1; double branchCoverage = -1; File file = finder.findFile(sourceFileData.getName()); if (file == null) { System.out.println("FILE IS NULL: " + sourceFileData.getName()); ... | private String generateTableRowForSourceFile(SourceFileData sourceFileData) { StringBuffer ret = new StringBuffer(); double lineCoverage = -1; double branchCoverage = -1; File file = finder.findFile(sourceFileData.getName()); if (file == null) { System.out.println("FILE IS NULL: " + sourceFileData.getName()); ... | 3,230,909 |
private String generateTableRowForTotal() { StringBuffer ret = new StringBuffer(); double lineCoverage = -1; double branchCoverage = -1; double ccnSum = 0; int count = 0; for (Iterator it = finder.getBaseDirectories().iterator(); it.hasNext(); ) { File basedir = (File) it.next(); ccnSum += Util.getCCN(base... | private String generateTableRowForTotal() { StringBuffer ret = new StringBuffer(); double lineCoverage = -1; double branchCoverage = -1; double ccnSum = 0; int count = 0; for (Iterator it = finder.getBaseDirectories().iterator(); it.hasNext(); ) { File basedir = (File) it.next(); ccnSum += Util.getCCN(base... | 3,230,910 |
public IRubyObject chomp_bang(IRubyObject[] args) { if (isEmpty()) { return getRuntime().getNil(); } String separator = getRuntime().getGlobalVariables().get("$/").asSymbol(); if (args.length > 0) { separator = args[0].asSymbol(); } if (getValue().endsWit... | public IRubyObject chomp_bang(IRubyObject[] args) { if (isEmpty()) { return getRuntime().getNil(); } String separator = getRuntime().getGlobalVariables().get("$/").asSymbol(); if (args.length > 0) { separator = args[0].asSymbol(); } if (getValue().endsWit... | 3,230,911 |
private void buildContactList() { XMPPConnection con = SparkManager.getConnection(); final Roster roster = con.getRoster(); roster.addRosterListener(this); for (RosterGroup group : roster.getGroups()) { ContactGroup contactGroup = addContactGroup(group.getName()); f... | private void buildContactList() { XMPPConnection con = SparkManager.getConnection(); final Roster roster = con.getRoster(); roster.addRosterListener(this); for (RosterGroup group : roster.getGroups()) { ContactGroup contactGroup = addContactGroup(group.getName()); f... | 3,230,913 |
private synchronized void handleEntriesUpdated(final Collection addresses) { SwingUtilities.invokeLater(new Runnable() { public void run() { Roster roster = SparkManager.getConnection().getRoster(); Iterator jids = addresses.iterator(); while (jids.hasN... | private synchronized void handleEntriesUpdated(final Collection addresses) { SwingUtilities.invokeLater(new Runnable() { public void run() { Roster roster = SparkManager.getConnection().getRoster(); Iterator jids = addresses.iterator(); while (jids.hasN... | 3,230,914 |
public void run() { Roster roster = SparkManager.getConnection().getRoster(); Iterator jids = addresses.iterator(); while (jids.hasNext()) { String jid = (String)jids.next(); RosterEntry rosterEntry = roster.getEntry(jid); ... | public void run() { Roster roster = SparkManager.getConnection().getRoster(); Iterator jids = addresses.iterator(); while (jids.hasNext()) { String jid = (String)jids.next(); RosterEntry rosterEntry = roster.getEntry(jid); ... | 3,230,915 |
private void moveToOfflineGroup(String bareJID) { final Iterator groupIterator = new ArrayList(groupList).iterator(); while (groupIterator.hasNext()) { final ContactGroup group = (ContactGroup)groupIterator.next(); final ContactItem item = group.getContactItemByJID(bareJID); ... | private void moveToOfflineGroup(final String bareJID) { final Iterator groupIterator = new ArrayList(groupList).iterator(); while (groupIterator.hasNext()) { final ContactGroup group = (ContactGroup)groupIterator.next(); final ContactItem item = group.getContactItemByJID(bareJID)... | 3,230,916 |
private void updateUserPresence(Presence presence) { if (presence == null) { return; } Roster roster = SparkManager.getConnection().getRoster(); final String bareJID = StringUtils.parseBareAddress(presence.getFrom()); RosterEntry entry = roster.getEntry(bareJID); ... | private void updateUserPresence(Presence presence) { if (presence == null) { return; } Roster roster = SparkManager.getConnection().getRoster(); final String bareJID = StringUtils.parseBareAddress(presence.getFrom()); RosterEntry entry = roster.getEntry(bareJID); ... | 3,230,919 |
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | public void searchContacts(String contact, final JFrame parent) { if (parents.get(parent) == null) { parents.put(parent, parent.getGlassPane()); } final Component glassPane = (Component)parents.get(parent); parent.setGlassPane(glassPane); final Map contactMap = new HashMap(); final Set contacts = n... | 3,230,920 |
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | 3,230,921 |
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | 3,230,922 |
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | 3,230,923 |
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | 3,230,924 |
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | 3,230,925 |
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | 3,230,926 |
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g... | 3,230,927 |
public static void createDigestMD5(IRuby runtime) { runtime.getModule("Kernel").callMethod(runtime.getCurrentContext(),"require",runtime.newString("digest.so")); RubyModule mDigest = runtime.getModule("Digest"); RubyClass cDigestBase = mDigest.getClass("Base"); RubyClass cDigest_MD5 = mD... | public static void createDigestMD5(IRuby runtime) { runtime.getLoadService().require("digest.so"); RubyModule mDigest = runtime.getModule("Digest"); RubyClass cDigestBase = mDigest.getClass("Base"); RubyClass cDigest_MD5 = mDigest.defineClassUnder("MD5",cDigestBase); cDigest_MD5.s... | 3,230,929 |
public static void createDigestRMD160(IRuby runtime) { runtime.getModule("Kernel").callMethod(runtime.getCurrentContext(),"require",runtime.newString("digest.so")); RubyModule mDigest = runtime.getModule("Digest"); RubyClass cDigestBase = mDigest.getClass("Base"); RubyClass cDigest_RMD16... | public static void createDigestRMD160(IRuby runtime) { runtime.getLoadService().require("digest.so"); RubyModule mDigest = runtime.getModule("Digest"); RubyClass cDigestBase = mDigest.getClass("Base"); RubyClass cDigest_RMD160 = mDigest.defineClassUnder("RMD160",cDigestBase); cDig... | 3,230,930 |
public static void createDigestSHA1(IRuby runtime) { runtime.getModule("Kernel").callMethod(runtime.getCurrentContext(),"require",runtime.newString("digest.so")); RubyModule mDigest = runtime.getModule("Digest"); RubyClass cDigestBase = mDigest.getClass("Base"); RubyClass cDigest_SHA1 = ... | public static void createDigestSHA1(IRuby runtime) { runtime.getLoadService().require("digest.so"); RubyModule mDigest = runtime.getModule("Digest"); RubyClass cDigestBase = mDigest.getClass("Base"); RubyClass cDigest_SHA1 = mDigest.defineClassUnder("SHA1",cDigestBase); cDigest_SH... | 3,230,931 |
public static void createDigestSHA2(IRuby runtime) { try { MessageDigest.getInstance("SHA-256"); } catch(NoSuchAlgorithmException e) { throw runtime.newLoadError("SHA2 not supported"); } runtime.getModule("Kernel").callMethod(runtime.getCurrentContext(),"require",ru... | public static void createDigestSHA2(IRuby runtime) { try { MessageDigest.getInstance("SHA-256"); } catch(NoSuchAlgorithmException e) { throw runtime.newLoadError("SHA2 not supported"); } runtime.getLoadService().require("digest.so"); RubyModule mDigest = runt... | 3,230,932 |
public void setZoomFactor(double factor) { if(factor != -1) { if (factor > ZoomAction.MAX_ZOOM_FACTOR || factor < ZoomAction.MIN_ZOOM_FACTOR) throw new IllegalArgumentException("The zoom factor is value " + "between "+ZoomAction.MIN_ZOOM_FACTOR+" and "+ ... | public void setZoomFactor(double factor) { if (factor != -1) { if (factor > ZoomAction.MAX_ZOOM_FACTOR || factor < ZoomAction.MIN_ZOOM_FACTOR) throw new IllegalArgumentException("The zoom factor is value " + "between "+ZoomAction.MIN_ZOOM_FACTOR+" and "+ ... | 3,230,933 |
public static IRubyObject nth_match(int n, IRubyObject match) { return match.isNil() ? match : ((RubyMatchData) match).group(n); } | public static IRubyObject nth_match(int n, IRubyObject match) { IRubyObject nil = match.getRuntime().getNil(); if (match.isNil()) { return nil; } RubyMatchData rmd = (RubyMatchData) match; if (n > rmd.getSize()) { return nil; } if (n < 0) { n += rmd.getSize(); if (n <= 0) { return nil; } } return rmd.grou... | 3,230,934 |
public void copy(IObject model, ModelMapper mapper) { if (model instanceof Image) { Image i = (Image) model; super.copy(model,mapper); // Details if (i.getDetails() != null){ Details d = i.getDetails(); this.setCreated(mapper.event2tim... | public void copy(IObject model, ModelMapper mapper) { if (model instanceof Image) { Image i = (Image) model; super.copy(model,mapper); // Details if (i.getDetails() != null){ Details d = i.getDetails(); this.setCreated(mapper.event2tim... | 3,230,936 |
public OMEData init() { // Test data : calculated before to not change times. if (!initialized) { super.init(); imgsPDI = getPercentOfCollection(allImgs, percent); imgsCGCI = getPercentOfCollection(allImgs, percent); imgsAnn1 = getPercentOfCollection(allImgs... | public OMEData init() { // Test data : calculated before to not change times. if (!initialized) { super.init(); imgsPDI = getPercentOfCollection(allImgs, percent); imgsCGCI = getPercentOfCollection(allImgs, percent); imgsAnn1 = getPercentOfCollection(allImgs... | 3,230,937 |
public List childNodes() { return Collections.EMPTY_LIST; } | public List childNodes() { return EMPTY_LIST; } | 3,230,938 |
public void copy(IObject model, ModelMapper mapper) { if (model instanceof Dataset) { Dataset d = (Dataset) model; super.copy(model,mapper); // Details if (d.getDetails() != null){ Details details = d.getDetails(); this.setOwner((E... | public void copy(IObject model, ModelMapper mapper) { if (model instanceof Dataset) { Dataset d = (Dataset) model; super.copy(model,mapper); // Details if (d.getDetails() != null){ Details details = d.getDetails(); this.setOwner((E... | 3,230,939 |
private boolean ISUPPER(char c) { return Character.toUpperCase(c) == c; } | private boolean ISUPPER(char c) { return Character.isUpperCase(c); } | 3,230,940 |
public void testFindImageAnnotationsSet() { System.out .println("HierarchyBrowsingTest.testFindImageAnnotationsSet()"); Set ids = new HashSet(); ids.add(new Integer(11)); ids.add(new Integer(13)); Map map = hb.findImageAnnotations(ids); assertTrue(nonNull, ma... | public void testFindImageAnnotationsSet() { System.out .println(" ***** HierarchyBrowsingTest.testFindImageAnnotationsSet()"); Set ids = new HashSet(); ids.add(new Integer(11)); ids.add(new Integer(13)); Map map = hb.findImageAnnotations(ids); assertTrue(nonN... | 3,230,942 |
public void testFindImageAnnotationsSetint() { System.out.println(" ***** HierarchyBrowsingTest.testFindImageAnnotationsSetint()"); Set ids = new HashSet(); ids.add(new Integer(11)); ids.add(new Integer(13)); Map map = hb.findImageAnnotations(ids,5); assertTrue(nonNull, map... | public void testFindImageAnnotationsSetint() { System.out.println(" ***** HierarchyBrowsingTest.testFindImageAnnotationsSetint()"); Set ids = new HashSet(); ids.add(new Integer(11)); ids.add(new Integer(13)); Map map = hb.findImageAnnotationsForExperimenter(ids,5); assertTr... | 3,230,943 |
public void testNulls(){ // Each method should return a null or an empty set as appropriate //TODO hb.findCGCIHierarchies( ); Set test = new HashSet(); test.add(new Integer(0)); // Non-existence set of ids int nonExp = 0; // Non-existence experimenter ID // a... | public void testNulls(){ // Each method should return a null or an empty set as appropriate //TODO hb.findCGCIHierarchies( ); Set test = new HashSet(); test.add(new Integer(0)); // Non-existence set of ids int nonExp = 0; // Non-existence experimenter ID // a... | 3,230,944 |
public void testNulls(){ // Each method should return a null or an empty set as appropriate //TODO hb.findCGCIHierarchies( ); Set test = new HashSet(); test.add(new Integer(0)); // Non-existence set of ids int nonExp = 0; // Non-existence experimenter ID // a... | public void testNulls(){ // Each method should return a null or an empty set as appropriate //TODO hb.findCGCIHierarchies( ); Set test = new HashSet(); test.add(new Integer(0)); // Non-existence set of ids int nonExp = 0; // Non-existence experimenter ID // a... | 3,230,945 |
public void setRefreshedHierarchy(Map set); | public void setRefreshedHierarchy(Map set); | 3,230,946 |
public TestRubyHash(String name) { super(name); } | public TestRubyHash(String name) { super(name); } | 3,230,948 |
public void setUp() { ruby = Ruby.getDefaultInstance(GNURegexpAdapter.class); eval("$h = {'foo' => 'bar'}"); } | public void setUp() { ruby = Ruby.getDefaultInstance(GNURegexpAdapter.class); eval("$h = {'foo' => 'bar'}"); } | 3,230,949 |
public void tearDown() { super.tearDown(); } | public void tearDown() { super.tearDown(); } | 3,230,950 |
public void testConstructors() { result = eval("hash = {'a', 100}; p hash"); assertEquals("{\"a\"=>100}", result); result = eval("hash = Hash['b', 200]; p hash"); assertEquals("{\"b\"=>200}", result); result = eval("hash = Hash.new(); p hash['test']"); assertEquals("nil", result); result = eval("hash = Hash.new('de... | public void testConstructors() { result = eval("hash = {'a', 100}; p hash"); assertEquals("{\"a\"=>100}", result); result = eval("hash = Hash['b', 200]; p hash"); assertEquals("{\"b\"=>200}", result); result = eval("hash = Hash.new(); p hash['test']"); assertEquals("nil", result); result = eval("hash = Hash.new('de... | 3,230,951 |
public void testConversions() { result = eval("p $h.to_s"); assertEquals("\"foobar\"", result); result = eval("p $h.to_a"); assertEquals("[[\"foo\", \"bar\"]]", result); result = eval("p $h.to_hash"); assertEquals("{\"foo\"=>\"bar\"}", result); } | public void testConversions() { result = eval("p $h.to_s"); assertEquals("\"foobar\"", result); result = eval("p $h.to_a"); assertEquals("[[\"foo\", \"bar\"]]", result); result = eval("p $h.to_hash"); assertEquals("{\"foo\"=>\"bar\"}", result); } | 3,230,952 |
public void testLookups() { // value equality result = eval("key = 'a'; hash = {key => 'one'}; hash.store('a', 'two'); puts hash[key]"); assertEquals("two", result); result = eval("key = [1,2]; hash = {key => 'one'}; hash[[1,2]] = 'two'; puts hash[key]"); assertEquals("two", result); result = eval("key = :a; hash =... | public void testLookups() { // value equality result = eval("key = 'a'; hash = {key => 'one'}; hash.store('a', 'two'); puts hash[key]"); assertEquals("two", result); result = eval("key = [1,2]; hash = {key => 'one'}; hash[[1,2]] = 'two'; puts hash[key]"); assertEquals("two", result); result = eval("key = :a; hash =... | 3,230,953 |
public void testSizeRelated() { assertEquals("1", eval("p $h.size")); assertEquals("1", eval("p $h.length")); assertEquals("false", eval("p $h.empty?")); assertEquals("true", eval("p Hash.new().empty?")); } | public void testSizeRelated() { assertEquals("1", eval("p $h.size")); assertEquals("1", eval("p $h.length")); assertEquals("false", eval("p $h.empty?")); assertEquals("true", eval("p Hash.new().empty?")); } | 3,230,954 |
public void testLookups() throws Exception { // value equality result = eval("key = 'a'; hash = {key => 'one'}; hash.store('a', 'two'); puts hash[key]"); assertEquals("two", result); result = eval("key = [1,2]; hash = {key => 'one'}; hash[[1,2]] = 'two'; puts hash[key]"); assertEq... | public void testLookups() throws Exception { // value equality result = eval("key = 'a'; hash = {key => 'one'}; hash.store('a', 'two'); puts hash[key]"); assertEquals("two", result); result = eval("key = [1,2]; hash = {key => 'one'}; hash[[1,2]] = 'two'; puts hash[key]"); assertEq... | 3,230,955 |
public RubyModule defineModuleUnder(String name, RubyModule parentModule) { RubyModule newModule = RubyModule.newModule(this, name, parentModule); getClasses().putClass(name, newModule); return newModule; } | public RubyModule defineModuleUnder(String name, RubyModule parentModule) { RubyModule newModule = RubyModule.newModule(this, name, parentModule); getClasses().putClass(name, newModule, parentModule); return newModule; } | 3,230,956 |
private static void initializeRuntime(final Ruby runtime, String filename) { IRubyObject argumentArray = runtime.newArray(JavaUtil.convertJavaArrayToRuby(runtime, commandline.scriptArguments)); runtime.setVerbose(runtime.newBoolean(commandline.verbose)); // $VERBOSE can be true, false, or nil. ... | private static void initializeRuntime(final Ruby runtime, String filename) { IRubyObject argumentArray = runtime.newArray(JavaUtil.convertJavaArrayToRuby(runtime, commandline.scriptArguments)); runtime.setVerbose(runtime.newBoolean(commandline.verbose)); // $VERBOSE can be true, false, or nil. ... | 3,230,957 |
public MetaClass getSingletonClass() { if (isNil()) { return getNilSingletonClass(); } RubyClass type = getMetaClass(); if (!type.isSingleton()) { type = makeMetaClass(getMetaClass()); } assert type instanceof MetaClass; type.setTaint(isTaint(... | public MetaClass getSingletonClass() { if (isNil()) { return getNilSingletonClass(); } RubyClass type = getMetaClass(); if (!type.isSingleton()) { type = makeMetaClass(getMetaClass()); } assert type instanceof MetaClass; type.setTaint(isTaint(... | 3,230,958 |
public MetaClass getSingletonClass() { if (isNil()) { return getNilSingletonClass(); } RubyClass type = getMetaClass(); if (!type.isSingleton()) { type = makeMetaClass(getMetaClass()); } assert type instanceof MetaClass; type.setTaint(isTaint(... | public MetaClass getSingletonClass() { if (isNil()) { return getNilSingletonClass(); } RubyClass type = getMetaClass(); if (!type.isSingleton()) { type = makeMetaClass(type, getRuntime().getCurrentContext().getRubyClass()); } assert type instanceof Me... | 3,230,959 |
public MetaClass getSingletonClass() { if (isNil()) { return getNilSingletonClass(); } RubyClass type = getMetaClass(); if (!type.isSingleton()) { type = makeMetaClass(getMetaClass()); } assert type instanceof MetaClass; type.setTaint(isTaint(... | public MetaClass getSingletonClass() { if (isNil()) { return getNilSingletonClass(); } RubyClass type = getMetaClass(); if (!type.isSingleton()) { type = makeMetaClass(getMetaClass()); } assert type instanceof MetaClass; type.setTaint(isTaint(... | 3,230,960 |
public MetaClass makeMetaClass(RubyClass type) { MetaClass metaClass = type.newSingletonClass(); setMetaClass(metaClass); metaClass.attachToObject(this); return metaClass; } | public MetaClass makeMetaClass(RubyClass type) { MetaClass metaClass = type.newSingletonClass(); setMetaClass(metaClass); metaClass.attachToObject(this); return metaClass; } | 3,230,961 |
public static Test suite() throws Throwable { TestSuite suite = new TestSuite(); suite.addTest(new TestSuite(TestRubyObject.class)); suite.addTest(new TestSuite(TestRubyNil.class)); suite.addTest(new TestSuite(TestRubyHash.class)); suite.addTest(new TestSuite(TestRubyTime.class));... | public static Test suite() throws Throwable { TestSuite suite = new TestSuite(); suite.addTest(new TestSuite(TestRubyObject.class)); suite.addTest(new TestSuite(TestRubyNil.class)); suite.addTest(new TestSuite(TestRubyHash.class)); suite.addTest(new TestSuite(TestRuby.class... | 3,230,962 |
public static Test suite() { TestSuite suite = new TestSuite(); suite.addTest(new TestSuite(TestRubyProxyFactory.class)); return suite; } | public static Test suite() { TestSuite suite = new TestSuite(); suite.addTest(new TestSuite(TestBSF.class)); return suite; } | 3,230,963 |
public ArticleListViewer() { super(); setBeanIdentifier(ARTICLE_LIST_BEAN); setResourcePath(DEFAULT_RESOURCE_PATH); } | public ArticleListViewer() { super(); setBeanIdentifier(ARTICLE_LIST_BEAN); setResourcePath(DEFAULT_RESOURCE_PATH); } | 3,230,964 |
private Object[] extractConstructorArgs(Map propertyValues, Class[] constructorArgTypes) { Object[] parameters = new Object[constructorArgNames.length]; for (int i = 0; i < constructorArgNames.length; i++) { String name = constructorArgNames[i]; Class type = constructorArgTypes[i... | private Object[] extractConstructorArgs(Map propertyValues, Class[] constructorArgTypes) { Object[] parameters = new Object[constructorArgNames.length]; for (int i = 0; i < constructorArgNames.length; i++) { Property name = new Property(constructorArgNames[i]); Class type = const... | 3,230,965 |
public Object getProperty(String name) { if (name == null) throw new NullPointerException("name is null"); Object value = properties.get(name); return value; } | public Object getProperty(String name) { if (name == null) throw new NullPointerException("name is null"); Object value = properties.get(name); return value; } | 3,230,966 |
public static RubyFloat str2fnum(IRuby runtime, RubyString arg) { String str = arg.toString().trim(); double d = 0.0; int pos = str.length(); for (int i = 0; i < pos; i++) { if ("0123456789eE+-.".indexOf(str.charAt(i)) == -1) { pos = i + 1; break;... | public static RubyFloat str2fnum(IRuby runtime, RubyString arg) { String str = arg.toString().trim(); double d = 0.0; int pos = str.length(); for (int i = 0; i < pos; i++) { if ("0123456789eE+-.".indexOf(str.charAt(i)) == -1) { pos = i + 1; break;... | 3,230,967 |
public static RubyInteger str2inum(IRuby runtime, RubyString str, int base) { StringBuffer sbuf = new StringBuffer(str.toString().trim()); if (sbuf.length() == 0) { return RubyFixnum.zero(runtime); } int pos = 0; int radix = (base != 0) ? base : 10; boolean digit... | public static RubyInteger str2inum(IRuby runtime, RubyString str, int base) { StringBuffer sbuf = new StringBuffer(str.toString().trim()); if (sbuf.length() == 0) { return RubyFixnum.zero(runtime); } int pos = 0; int radix = (base != 0) ? base : 10; boolean digit... | 3,230,968 |
public static RubyBoolean op_ge(Ruby ruby, RubyObject recv, RubyObject other) { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", other); return RubyBoolean.newBoolean(ruby, fn.getValue() >= 0); } | public static RubyBoolean op_ge(Ruby ruby, RubyObject recv, RubyObject other) { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", other); return RubyBoolean.newBoolean(ruby, fn.getValue() >= 0); } | 3,230,969 |
public static RubyBoolean op_gt(Ruby ruby, RubyObject recv, RubyObject other) { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", other); return RubyBoolean.newBoolean(ruby, fn.getValue() > 0); } | public static RubyBoolean op_gt(Ruby ruby, RubyObject recv, RubyObject other) { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", other); return RubyBoolean.newBoolean(ruby, fn.getValue() > 0); } | 3,230,970 |
public static RubyBoolean op_le(Ruby ruby, RubyObject recv, RubyObject other) { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", other); return RubyBoolean.newBoolean(ruby, fn.getValue() <= 0); } | public static RubyBoolean op_le(Ruby ruby, RubyObject recv, RubyObject other) { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", other); return RubyBoolean.newBoolean(ruby, fn.getValue() <= 0); } | 3,230,971 |
public static RubyBoolean op_lt(Ruby ruby, RubyObject recv, RubyObject other) { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", other); return RubyBoolean.newBoolean(ruby, fn.getValue() < 0); } | public static RubyBoolean op_lt(Ruby ruby, RubyObject recv, RubyObject other) { RubyFixnum fn = (RubyFixnum) recv.funcall("<=>", other); return RubyBoolean.newBoolean(ruby, fn.getValue() < 0); } | 3,230,972 |
private Class returnedObjectType(Object javaResult, Method returningMethod) { Class narrowestClass = javaResult.getClass(); Class widestClass = returningMethod.getReturnType(); if (narrowestClass.isPrimitive()) { return narrowestClass; } if (widestClass.isPrimitive()) {... | private Class returnedObjectType(Object javaResult, Method returningMethod) { Class narrowestClass = javaResult.getClass(); if (narrowestClass.isPrimitive()) { return narrowestClass; } if (widestClass.isPrimitive()) { return widestClass; } Asser... | 3,230,973 |
public static boolean isCompatible(IRubyObject arg, Class javaClass) { if (arg.isNil()) { return true; } if (javaClass.isInstance(arg)) { // arg is already of the required jruby class (or subclass) return true; } if (javaClass == Object.class || ja... | public static boolean isCompatible(IRubyObject arg, Class javaClass) { if (arg.isNil()) { return true; } if (javaClass.isInstance(arg)) { // arg is already of the required jruby class (or subclass) return true; } if (javaClass == Object.class || ja... | 3,230,974 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.