bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
|---|---|---|
public boolean isDefined(RubyId rubyId) { if (rubyId.equals(id)) { return true; } else if (next != null) { return next.isDefined(rubyId); } return false; }
|
public boolean isDefined(RubyId rubyId) { if (rubyId.equals(id)) { return true; } else if (next != null) { return next.isDefined(rubyId); } return false; }
| 3,235,486
|
public static void pop(Ruby ruby) { ruby.getInterpreter().setDynamicVars((RubyVarmap)((RubyStack)oldMap.get(ruby)).pop()); }
|
public static void pop(Ruby ruby) { ruby.setDynamicVars((RubyVarmap)((RubyStack)oldMap.get(ruby)).pop()); }
| 3,235,488
|
public static void push(Ruby ruby) { // HACK +++ if (oldMap.get(ruby) == null) { oldMap.put(ruby, new RubyStack()); // throw new RuntimeException("JRuby - BUG: Need Queue for oldMap in RubyVarmap"); } // HACK --- ((RubyStack)oldMap.get(ruby)).push(ruby.getInterpreter().getDynamicVars()); ruby.getInterpreter().setDynamicVars(null); }
|
public static void push(Ruby ruby) { // HACK +++ if (oldMap.get(ruby) == null) { oldMap.put(ruby, new RubyStack()); // throw new RuntimeException("JRuby - BUG: Need Queue for oldMap in RubyVarmap"); } // HACK --- ((RubyStack)oldMap.get(ruby)).push(ruby.getInterpreter().getDynamicVars()); ruby.getInterpreter().setDynamicVars(null); }
| 3,235,489
|
public void setConfig(String config) { // as we'll later use this as a prefix, it should end with a slash if (config.length() > 0 && !config.endsWith("/")) { if (log.loggingInfo()) log.info("ClassPathTemplateLoader: appending \"/\" to path " + config); config = config.concat("/"); } // It isn't clear from the javadocs, whether ClassLoader.getResource() // needs a starting slash, so won't add one at the moment. this.path = config; }
|
if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } public if (config.startsWith("/")) { config = config.substring(1); } void if (config.startsWith("/")) { config = config.substring(1); } setConfig(String if (config.startsWith("/")) { config = config.substring(1); } config) if (config.startsWith("/")) { config = config.substring(1); } { if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } // if (config.startsWith("/")) { config = config.substring(1); } as if (config.startsWith("/")) { config = config.substring(1); } we'll if (config.startsWith("/")) { config = config.substring(1); } later if (config.startsWith("/")) { config = config.substring(1); } use if (config.startsWith("/")) { config = config.substring(1); } this if (config.startsWith("/")) { config = config.substring(1); } as if (config.startsWith("/")) { config = config.substring(1); } a if (config.startsWith("/")) { config = config.substring(1); } prefix, if (config.startsWith("/")) { config = config.substring(1); } it if (config.startsWith("/")) { config = config.substring(1); } should if (config.startsWith("/")) { config = config.substring(1); } end if (config.startsWith("/")) { config = config.substring(1); } with if (config.startsWith("/")) { config = config.substring(1); } a if (config.startsWith("/")) { config = config.substring(1); } slash if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if if (config.startsWith("/")) { config = config.substring(1); } (config.length() if (config.startsWith("/")) { config = config.substring(1); } > if (config.startsWith("/")) { config = config.substring(1); } 0 if (config.startsWith("/")) { config = config.substring(1); } && if (config.startsWith("/")) { config = config.substring(1); } !config.endsWith("/")) if (config.startsWith("/")) { config = config.substring(1); } { if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if if (config.startsWith("/")) { config = config.substring(1); } (log.loggingInfo()) if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } log.info("ClassPathTemplateLoader: if (config.startsWith("/")) { config = config.substring(1); } appending if (config.startsWith("/")) { config = config.substring(1); } \"/\" if (config.startsWith("/")) { config = config.substring(1); } to if (config.startsWith("/")) { config = config.substring(1); } path if (config.startsWith("/")) { config = config.substring(1); } " if (config.startsWith("/")) { config = config.substring(1); } + if (config.startsWith("/")) { config = config.substring(1); } config); if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } config if (config.startsWith("/")) { config = config.substring(1); } = if (config.startsWith("/")) { config = config.substring(1); } config.concat("/"); if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } // if (config.startsWith("/")) { config = config.substring(1); } It if (config.startsWith("/")) { config = config.substring(1); } isn't if (config.startsWith("/")) { config = config.substring(1); } clear if (config.startsWith("/")) { config = config.substring(1); } from if (config.startsWith("/")) { config = config.substring(1); } the if (config.startsWith("/")) { config = config.substring(1); } javadocs, if (config.startsWith("/")) { config = config.substring(1); } whether if (config.startsWith("/")) { config = config.substring(1); } ClassLoader.getResource() if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } // if (config.startsWith("/")) { config = config.substring(1); } needs if (config.startsWith("/")) { config = config.substring(1); } a if (config.startsWith("/")) { config = config.substring(1); } starting if (config.startsWith("/")) { config = config.substring(1); } slash, if (config.startsWith("/")) { config = config.substring(1); } so if (config.startsWith("/")) { config = config.substring(1); } won't if (config.startsWith("/")) { config = config.substring(1); } add if (config.startsWith("/")) { config = config.substring(1); } one if (config.startsWith("/")) { config = config.substring(1); } at if (config.startsWith("/")) { config = config.substring(1); } the if (config.startsWith("/")) { config = config.substring(1); } moment. if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } this.path if (config.startsWith("/")) { config = config.substring(1); } = if (config.startsWith("/")) { config = config.substring(1); } config; if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } if (config.startsWith("/")) { config = config.substring(1); } }
| 3,235,491
|
static private String makeName(Object[] names) { StringBuffer buf = new StringBuffer(); buf.append("$("); for (int i = 0; i < names.length; i++) { if (i != 0) buf.append("."); buf.append((names[i] != null) ? names[i] : "NULL"); } buf.append(")"); return buf.toString(); }
|
static protected String makeName(Object[] names) { StringBuffer buf = new StringBuffer(); buf.append("$("); for (int i = 0; i < names.length; i++) { if (i != 0) buf.append("."); buf.append((names[i] != null) ? names[i] : "NULL"); } buf.append(")"); return buf.toString(); }
| 3,235,494
|
void cancel() { if (currentLoader != null) { currentLoader.cancel(); currentLoader = null; } state = Annotator.READY; }
|
void cancel() { if (currentLoader != null) { currentLoader.cancel(); currentLoader = null; } state = Annotator.READY; }
| 3,235,495
|
private AnnotationData getLastAnnotation(List list) { if (list == null || list.size() == 0) return null; Comparator c = new Comparator() { public int compare(Object o1, Object o2) { Timestamp t1 = ((AnnotationData) o1).getLastModified(), t2 = ((AnnotationData) o2).getLastModified(); long n1 = t1.getTime(); long n2 = t2.getTime(); int v = 0; if (n1 < n2) v = -1; else if (n1 > n2) v = 1; return v; } }; Collections.sort(list, c); return (AnnotationData) list.get(list.size()-1); }
|
private AnnotationData getLastAnnotation(List list) { if (list == null || list.size() == 0) return null; Comparator c = new Comparator() { public int compare(Object o1, Object o2) { Timestamp t1 = ((AnnotationData) o1).getLastModified(), t2 = ((AnnotationData) o2).getLastModified(); long n1 = t1.getTime(); long n2 = t2.getTime(); int v = 0; if (n1 < n2) v = -1; else if (n1 > n2) v = 1; return v; } }; Collections.sort(list, c); return (AnnotationData) list.get(list.size()-1); }
| 3,235,496
|
public int compare(Object o1, Object o2) { Timestamp t1 = ((AnnotationData) o1).getLastModified(), t2 = ((AnnotationData) o2).getLastModified(); long n1 = t1.getTime(); long n2 = t2.getTime(); int v = 0; if (n1 < n2) v = -1; else if (n1 > n2) v = 1; return v; }
|
public int compare(Object o1, Object o2) { Timestamp t1 = ((AnnotationData) o1).getLastModified(), t2 = ((AnnotationData) o2).getLastModified(); long n1 = t1.getTime(); long n2 = t2.getTime(); int v = 0; if (n1 < n2) v = -1; else if (n1 > n2) v = 1; return v; }
| 3,235,497
|
private String getPartialName(String originalName) { if (Pattern.compile("/").matcher(originalName).find()) { String[] l = originalName.split("/", 0); int n = l.length; if (n == 1) return l[0]; return UIUtilities.DOTS+l[n-2]+"/"+l[n-1]; } else if (Pattern.compile("\\\\").matcher(originalName).find()) { String[] l = originalName.split("\\\\", 0); int n = l.length; if (n == 1) return l[0]; return UIUtilities.DOTS+l[n-2]+"\\"+l[n-1]; } return originalName; }
|
private String getPartialName(String originalName) { if (Pattern.compile("/").matcher(originalName).find()) { String[] l = originalName.split("/", 0); int n = l.length; if (n == 1) return l[0]; return UIUtilities.DOTS+l[n-2]+"/"+l[n-1]; } else if (Pattern.compile("\\\\").matcher(originalName).find()) { String[] l = originalName.split("\\\\", 0); int n = l.length; if (n == 1) return l[0]; return UIUtilities.DOTS+l[n-2]+"\\"+l[n-1]; } return originalName; }
| 3,235,498
|
private boolean isAnnotatable(DataObject data) { if ((data instanceof ImageData)) { type = ImageData.class; return true; } else if (data instanceof DatasetData) { type = DatasetData.class; return true; } return false; }
|
private boolean isAnnotatable(DataObject data) { if ((data instanceof ImageData)) { type = ImageData.class; return true; } else if (data instanceof DatasetData) { type = DatasetData.class; return true; } return false; }
| 3,235,499
|
private boolean isObjectAnnotated(DataObject data) { Long n = null; if (data instanceof ImageData) { type = ImageData.class; n = ((ImageData) data).getAnnotationCount(); } else if (data instanceof DatasetData) { type = DatasetData.class; n = ((DatasetData) data).getAnnotationCount(); } if (n == null) return false; return (n.longValue() != 0); }
|
private boolean isObjectAnnotated(DataObject data) { Long n = null; if (data instanceof ImageData) { type = ImageData.class; n = ((ImageData) data).getAnnotationCount(); } else if (data instanceof DatasetData) { type = DatasetData.class; n = ((DatasetData) data).getAnnotationCount(); } if (n == null) return false; return (n.longValue() != 0); }
| 3,235,500
|
void showImages(List images) { removeAll(); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(Box.createRigidArea(DataManagerUIF.VBOX)); add(componentsPanel); add(Box.createRigidArea(DataManagerUIF.VBOX)); if (images != null && images.size() != 0) { add(buildImagesPanel(images)); setButtonsEnabled(true); } setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 10)); }
|
void showImages(List images) { removeAll(); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(Box.createRigidArea(DataManagerUIF.VBOX)); add(componentsPanel); add(Box.createRigidArea(DataManagerUIF.VBOX)); if (images != null && images.size() != 0) { add(buildImagesPanel(images)); setButtonsEnabled(true); } manager.getView().repaint(); }
| 3,235,501
|
private JMenu createEditMenu() { JMenu menu = new JMenu("Edit"); menu.setMnemonic(KeyEvent.VK_E); menu.add(new JMenuItem(controller.getAction(HiViewer.FIND))); menu.add(new JMenuItem(controller.getAction(HiViewer.CLEAR))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewer.VIEW))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(createClassifySubMenu()); menu.add(new JMenuItem( controller.getAction(HiViewer.ANNOTATE))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewer.PROPERTIES))); return menu; }
|
private JMenu createEditMenu() { JMenu menu = new JMenu("Edit"); menu.setMnemonic(KeyEvent.VK_E); menu.add(new JMenuItem(controller.getAction(HiViewer.FIND))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewer.VIEW))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(createClassifySubMenu()); menu.add(new JMenuItem( controller.getAction(HiViewer.ANNOTATE))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewer.PROPERTIES))); return menu; }
| 3,235,502
|
private JMenu createFileMenu() { JMenu menu = new JMenu("File"); menu.setMnemonic(KeyEvent.VK_H); menu.add(new JMenuItem( controller.getAction(HiViewer.SAVE_THUMB))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewer.EXIT))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem(controller.getAction(HiViewer.REFRESH))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem(controller.getAction( HiViewer.EXIT_APPLICATION))); return menu; }
|
private JMenu createFileMenu() { JMenu menu = new JMenu("File"); menu.setMnemonic(KeyEvent.VK_F); menu.add(new JMenuItem( controller.getAction(HiViewer.SAVE_THUMB))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewer.EXIT))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem(controller.getAction(HiViewer.REFRESH))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem(controller.getAction( HiViewer.EXIT_APPLICATION))); return menu; }
| 3,235,503
|
private JMenu createFileMenu() { JMenu menu = new JMenu("File"); menu.setMnemonic(KeyEvent.VK_H); menu.add(new JMenuItem( controller.getAction(HiViewer.SAVE_THUMB))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewer.EXIT))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem(controller.getAction(HiViewer.REFRESH))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem(controller.getAction( HiViewer.EXIT_APPLICATION))); return menu; }
|
private JMenu createFileMenu() { JMenu menu = new JMenu("File"); menu.setMnemonic(KeyEvent.VK_H); menu.add(new JMenuItem( controller.getAction(HiViewer.SAVE_THUMB))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(HiViewer.EXIT))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem(controller.getAction(HiViewer.REFRESH))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem(controller.getAction( HiViewer.EXIT_APPLICATION))); return menu; }
| 3,235,504
|
private void createWindowsMenu() { windowsMenu = new JMenu("Windows"); windowsMenu.setMnemonic(KeyEvent.VK_W); }
|
private void createWindowsMenu() { windowsMenu = new JMenu("Window"); windowsMenu.setMnemonic(KeyEvent.VK_W); }
| 3,235,505
|
public static IRubyObject primitive_to_java(IRubyObject recv, IRubyObject object) { if (object instanceof JavaObject) { return object; } IRuby runtime = recv.getRuntime(); Object javaObject; if (object.isNil()) { javaObject = null; } else if (object instanceof RubyFixnum) { javaObject = new Long(((RubyFixnum) object).getLongValue()); } else if (object instanceof RubyBignum) { javaObject = ((RubyBignum) object).getValue(); } else if (object instanceof RubyFloat) { javaObject = new Double(((RubyFloat) object).getValue()); } else if (object instanceof RubyString) { javaObject = ((RubyString) object).getValue(); } else if (object instanceof RubyBoolean) { javaObject = Boolean.valueOf(object.isTrue()); } else if (object instanceof RubyTime) { long milliseconds = ((RubyNumeric) object.callMethod("to_i")).getLongValue(); javaObject = new Date(milliseconds); } else { javaObject = object; } return JavaObject.wrap(runtime, javaObject); }
|
public static IRubyObject primitive_to_java(IRubyObject recv, IRubyObject object) { if (object instanceof JavaObject) { return object; } IRuby runtime = recv.getRuntime(); Object javaObject; if (object.isNil()) { javaObject = null; } else if (object instanceof RubyFixnum) { javaObject = new Long(((RubyFixnum) object).getLongValue()); } else if (object instanceof RubyBignum) { javaObject = ((RubyBignum) object).getValue(); } else if (object instanceof RubyFloat) { javaObject = new Double(((RubyFloat) object).getValue()); } else if (object instanceof RubyString) { javaObject = ((RubyString) object).toString(); } else if (object instanceof RubyBoolean) { javaObject = Boolean.valueOf(object.isTrue()); } else if (object instanceof RubyTime) { long milliseconds = ((RubyNumeric) object.callMethod("to_i")).getLongValue(); javaObject = new Date(milliseconds); } else { javaObject = object; } return JavaObject.wrap(runtime, javaObject); }
| 3,235,506
|
public IRubyObject op_div(IRubyObject other) { if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_div(other); } else if (other instanceof RubyNumeric) { BigInteger[] results = getValue().divideAndRemainder(bigIntValue((RubyNumeric) other)); if (results[0].compareTo(BigInteger.ZERO) <= 0 && results[1].compareTo(BigInteger.ZERO) != 0) { return bigNorm(getRuntime(), results[0].subtract(BigInteger.ONE)); } return bigNorm(getRuntime(), results[0]); } return callCoerced("/", other); }
|
public IRubyObject op_div(IRubyObject other) { if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_div(other); } else if (other instanceof RubyNumeric) { BigInteger otherBig = bigIntValue((RubyNumeric) other); if (otherBig.equals(BigInteger.ZERO)) { throw getRuntime().newZeroDivisionError(); } BigInteger[] results = getValue().divideAndRemainder(otherBig); if (results[0].compareTo(BigInteger.ZERO) <= 0 && results[1].compareTo(BigInteger.ZERO) != 0) { return bigNorm(getRuntime(), results[0].subtract(BigInteger.ONE)); } return bigNorm(getRuntime(), results[0]); } return callCoerced("/", other); }
| 3,235,507
|
private void buildMessagePanel(String msg, Icon msgIcon) { messagePanel.setLayout(new BoxLayout(messagePanel, BoxLayout.X_AXIS)); messagePanel.setOpaque(false); if (msgIcon != null) { JLabel iconLabel = new JLabel(msgIcon); iconLabel.setAlignmentY(TOP_ALIGNMENT); JPanel p = UIUtilities.buildComponentPanel(iconLabel); p.setAlignmentY(TOP_ALIGNMENT); messagePanel.add(p); messagePanel.add(Box.createRigidArea(H_SPACER_SIZE)); } MultilineLabel message = new MultilineLabel(msg); message.setOpaque(false); message.setPreferredSize(MSG_AREA_SIZE); message.setAlignmentY(TOP_ALIGNMENT); messagePanel.add(UIUtilities.buildComponentPanelRight(message)); }
|
private void buildMessagePanel(String msg, Icon msgIcon) { messagePanel.setLayout(new BoxLayout(messagePanel, BoxLayout.X_AXIS)); messagePanel.setOpaque(false); if (msgIcon != null) { JLabel iconLabel = new JLabel(msgIcon); iconLabel.setAlignmentY(TOP_ALIGNMENT); JPanel p = UIUtilities.buildComponentPanel(iconLabel); p.setAlignmentY(TOP_ALIGNMENT); messagePanel.add(p); messagePanel.add(Box.createRigidArea(H_SPACER_SIZE)); } JTextPane message = UIUtilities.buildTextPane(msg);; message.setOpaque(false); message.setPreferredSize(MSG_AREA_SIZE); message.setAlignmentY(TOP_ALIGNMENT); messagePanel.add(UIUtilities.buildComponentPanelRight(message)); }
| 3,235,508
|
public Set findCGCIHierarchies(Set imgIDs) { Set result = proxiedInterface.findCGCIHierarchies(imgIDs); Set dataObjects = new HashSet(); for (Iterator i = result.iterator(); i.hasNext();) { Object obj = i.next(); if (obj instanceof CategoryGroup) { CategoryGroup cg = (CategoryGroup) obj; dataObjects.add(AdapterUtils.go(cg)); } else if (obj instanceof Category) { Category ca = (Category) obj; dataObjects.add(AdapterUtils.go(ca)); } else if (obj instanceof Image) { Image img = (Image) obj; dataObjects.add(AdapterUtils.go(img)); } else { throw new RuntimeException("Method returned unexpected value type:" + obj.getClass() ); } } return dataObjects; }
|
public Set findCGCIHierarchies(Set imgIDs) { Set result = proxiedInterface.findCGCIHierarchies(imgIDs); Set dataObjects = new HashSet(); for (Iterator i = result.iterator(); i.hasNext();) { Object obj = i.next(); if (obj instanceof CategoryGroup) { CategoryGroup cg = (CategoryGroup) obj; dataObjects.add(AdapterUtils.go(cg)); } else if (obj instanceof Category) { Category ca = (Category) obj; dataObjects.add(AdapterUtils.go(ca)); } else if (obj instanceof Image) { Image img = (Image) obj; dataObjects.add(AdapterUtils.go(img)); } else { throw new RuntimeException("Method returned unexpected value type:" + obj.getClass() ); } } return dataObjects; }
| 3,235,509
|
public Map findDatasetAnnotations(Set datasetIDs) { Map result = proxiedInterface.findDatasetAnnotations(datasetIDs); return goDatasetAnnotations(result); }
|
public Map findDatasetAnnotations(Set datasetIDs) { Map result = proxiedInterface.findDatasetAnnotations(datasetIDs); return AdapterUtils.adaptFoundDatasetAnnotations(result); }
| 3,235,510
|
public Map findDatasetAnnotationsForExperimenter(Set datasetIDs, int experimenterID) { Map result = proxiedInterface.findDatasetAnnotationsForExperimenter(datasetIDs,experimenterID); return goDatasetAnnotations(result); }
|
public Map findDatasetAnnotationsForExperimenter(Set datasetIDs, int experimenterID) { Map result = proxiedInterface.findDatasetAnnotationsForExperimenter(datasetIDs,experimenterID); return AdapterUtils.adaptFoundDatasetAnnotations(result); }
| 3,235,511
|
public Map findImageAnnotations(Set imgIDs) { Map result = proxiedInterface.findImageAnnotations(imgIDs); return goImageAnnotations(result); }
|
public Map findImageAnnotations(Set imgIDs) { Map result = proxiedInterface.findImageAnnotations(imgIDs); return AdapterUtils.adaptFoundImageAnnotations(result); }
| 3,235,512
|
public Map findImageAnnotationsForExperimenter(Set imgIDs, int experimenterID) { Map result = proxiedInterface.findImageAnnotationsForExperimenter(imgIDs,experimenterID); return goImageAnnotations(result); }
|
public Map findImageAnnotationsForExperimenter(Set imgIDs, int experimenterID) { Map result = proxiedInterface.findImageAnnotationsForExperimenter(imgIDs,experimenterID); return AdapterUtils.adaptFoundImageAnnotations(result); }
| 3,235,513
|
public Set findPDIHierarchies(Set imgIDs) { Set result = proxiedInterface.findPDIHierarchies(imgIDs); Set dataObjects = new HashSet(); for (Iterator i = result.iterator(); i.hasNext();) { Object obj = i.next(); if (obj instanceof Project) { Project prj = (Project) obj; dataObjects.add(AdapterUtils.go(prj)); } else if (obj instanceof Dataset) { Dataset ds = (Dataset) obj; dataObjects.add(AdapterUtils.go(ds)); } else if (obj instanceof Image) { Image img = (Image) obj; dataObjects.add(AdapterUtils.go(img)); } else { throw new RuntimeException("Method returned unexpected value type:" + obj.getClass() ); } } return dataObjects; }
|
public Set findPDIHierarchies(Set imgIDs) { Set result = proxiedInterface.findPDIHierarchies(imgIDs); Set dataObjects = new HashSet(); for (Iterator i = result.iterator(); i.hasNext();) { Object obj = i.next(); if (obj instanceof Project) { Project prj = (Project) obj; dataObjects.add(AdapterUtils.go(prj)); } else if (obj instanceof Dataset) { Dataset ds = (Dataset) obj; dataObjects.add(AdapterUtils.go(ds)); } else if (obj instanceof Image) { Image img = (Image) obj; dataObjects.add(AdapterUtils.go(img)); } else { throw new RuntimeException("Method returned unexpected value type:" + obj.getClass() ); } } return dataObjects; }
| 3,235,514
|
public DataObject loadCGCIHierarchy(Class rootNodeType, int rootNodeID) { Object result = proxiedInterface.loadCGCIHierarchy(rootNodeType, rootNodeID); if (rootNodeType.equals(CategoryGroup.class)){ return AdapterUtils.go((CategoryGroup) result); } else if (rootNodeType.equals(Category.class)){ return AdapterUtils.go((Category) result); } else { throw new IllegalArgumentException("Method only takes CategoryGroup and Category as argument."); } }
|
public DataObject loadCGCIHierarchy(Class rootNodeType, int rootNodeID) { Object result = proxiedInterface.loadCGCIHierarchy(rootNodeType, rootNodeID); if (rootNodeType.equals(CategoryGroup.class)){ return AdapterUtils.go((CategoryGroup) result); } else if (rootNodeType.equals(Category.class)){ return AdapterUtils.go((Category) result); } else { throw new IllegalArgumentException("Method only takes CategoryGroup and Category as argument."); } }
| 3,235,515
|
public DataObject loadPDIHierarchy(Class rootNodeType, int rootNodeID) { Object result = proxiedInterface.loadPDIHierarchy(rootNodeType, rootNodeID); if (rootNodeType.equals(Project.class)){ return AdapterUtils.go((Project) result); } else if (rootNodeType.equals(Dataset.class)){ return AdapterUtils.go((Dataset) result); } else { throw new IllegalArgumentException("Method only takes Project and Dataset as argument."); } }
|
public DataObject loadPDIHierarchy(Class rootNodeType, int rootNodeID) { Object result = proxiedInterface.loadPDIHierarchy(rootNodeType, rootNodeID); if (rootNodeType.equals(Project.class)){ return AdapterUtils.go((Project) result); } else if (rootNodeType.equals(Dataset.class)){ return AdapterUtils.go((Dataset) result); } else { throw new IllegalArgumentException("Method only takes Project and Dataset as argument."); } }
| 3,235,516
|
void updateOutputStart(int y) { yStartOutput1 = y; yStartOutput2 = y-triangleW; yStartOutput3 = y+triangleW; startPt.setLocation(startPt.getX(), (double) y); super.repaint(); }
|
void updateOutputStart(int y) { yStartOutput1 = y; yStartOutput2 = y-triangleW; yStartOutput3 = y+triangleW; startPt.setLocation(startPt.getX(), (double) y); super.repaint(); }
| 3,235,517
|
void updateOutputEnd(int y) { yEndOutput1 = y; yEndOutput2 = y-triangleW; yEndOutput3 = y+triangleW; endPt.setLocation(endPt.getX(), (double) y); super.repaint(); }
|
void updateOutputEnd(int y) { yEndOutput1 = y; yEndOutput2 = y-triangleW; yEndOutput3 = y+triangleW; endPt.setLocation(endPt.getX(), (double) y); super.repaint(); }
| 3,235,518
|
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { return JavaUtil.convertJavaToRuby(ruby, bean.bean, bean.type); }
|
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { return JavaUtil.convertJavaToRuby(ruby, bean.bean, bean.type); }
| 3,235,519
|
public Quantization_8_16_bit(QuantumDef qd, PixelsType type) { super(qd, type); }
|
public Quantization_8_16_bit(QuantumDef qd, PixelsType type, IPixels iPixels) { super(qd, type); }
| 3,235,520
|
public Quantization_8_16_bit(QuantumDef qd, PixelsType type) { super(qd, type); }
|
public Quantization_8_16_bit(QuantumDef qd, PixelsType type) { super(qd, type, iPixels); }
| 3,235,521
|
public String[][] getROIStats() { String[][] stats = new String[2][8]; for (int i = 0; i < 8; i++) { stats[0][i] = ""+i; stats[1][i] = ""+2*i; } return stats; }
|
public String[][] getROIStats() { String[][] stats = new String[2][8]; for (int i = 0; i < 8; i++) { stats[0][i] = ""+i; stats[1][i] = ""+2*i; } return stats; }
| 3,235,523
|
private UnregisterServiceManager(ServiceManager serviceManager, StopStrategy stopStrategy, Throwable[] futureThrowable) { this.serviceManager = serviceManager; this.stopStrategy = stopStrategy; this.futureThrowable = futureThrowable; }
|
private UnregisterServiceManager(ServiceManager serviceManager, StopStrategy stopStrategy) { this.serviceManager = serviceManager; this.stopStrategy = stopStrategy; this.futureThrowable = futureThrowable; }
| 3,235,524
|
private UnregisterServiceManager(ServiceManager serviceManager, StopStrategy stopStrategy, Throwable[] futureThrowable) { this.serviceManager = serviceManager; this.stopStrategy = stopStrategy; this.futureThrowable = futureThrowable; }
|
private UnregisterServiceManager(ServiceManager serviceManager, StopStrategy stopStrategy, Throwable[] futureThrowable) { this.serviceManager = serviceManager; this.stopStrategy = stopStrategy; }
| 3,235,525
|
public Object call() { try { serviceManager.destroy(stopStrategy); synchronized (serviceManagers) { serviceManagers.remove(serviceManager.getServiceName()); } return null; } catch (Throwable e) { // we did not destroy the service... save the exception and return the service manager // so it remains registered with the kernel synchronized (futureThrowable) { futureThrowable[0] = e; } return serviceManager; } }
|
public Object call() { try { serviceManager.destroy(stopStrategy); synchronized (serviceManagers) { serviceManagers.remove(serviceManager.getServiceName()); } return null; } catch (Throwable e) { // we did not destroy the service... save the exception and return the service manager // so it remains registered with the kernel synchronized (futureThrowable) { futureThrowable[0] = e; } return serviceManager; } }
| 3,235,526
|
public void showGraphView() { if(attributeName != null && elementName != null) { BrowserModel browserModel = model.getInfoSource(); List thumbList = browserModel.getThumbnails(); Thumbnail[] thumbnails = new Thumbnail[thumbList.size()]; thumbList.toArray(thumbnails); ThumbnailDataPair[] stats = ThumbnailStatistics.sortByValue(thumbnails,currentMode, attributeName,elementName); browserModel.setLayoutMethod(new GraphLayoutMethod(stats)); } }
|
public void showGraphView() { if(attributeName != null && elementName != null) { BrowserModel browserModel = model.getInfoSource(); List thumbList = browserModel.getThumbnails(); Thumbnail[] thumbnails = new Thumbnail[thumbList.size()]; thumbList.toArray(thumbnails); ThumbnailDataPair[] stats = ThumbnailStatistics.sortByValue(thumbnails,currentMode, attributeName,elementName); if(stats != null && stats.length > 0) { browserModel.setLayoutMethod(new GraphLayoutMethod(stats)); } } }
| 3,235,528
|
public Instruction visitConstNode(ConstNode iVisited) { if (state.runtime.getClass("Module").getConstant(iVisited.getName(), false) != null) { definition = "constant"; } return null; }
|
public Instruction visitConstNode(ConstNode iVisited) { if (state.runtime.getClass("Module").getConstant(iVisited.getName(), false) != null) { definition = "constant"; } return null; }
| 3,235,529
|
private void initComponents() { newElement = new JMenuItem( controller.getAction(TreeViewerControl.CREATE_OBJECT)); initMenuItem(newElement); copyElement = new JMenuItem( controller.getAction(TreeViewerControl.COPY_OBJECT)); initMenuItem(newElement); pasteElement = new JMenuItem( controller.getAction(TreeViewerControl.PASTE_OBJECT)); initMenuItem(newElement); deleteElement = new JMenuItem( controller.getAction(TreeViewerControl.DELETE_OBJECT)); initMenuItem(newElement); existingElement = new JMenuItem( controller.getAction(TreeViewerControl.ADD_OBJECT)); initMenuItem(existingElement); }
|
private void initComponents() { newElement = new JMenuItem( controller.getAction(TreeViewerControl.CREATE_OBJECT)); initMenuItem(newElement); copyElement = new JMenuItem( controller.getAction(TreeViewerControl.COPY_OBJECT)); initMenuItem(newElement); pasteElement = new JMenuItem( controller.getAction(TreeViewerControl.PASTE_OBJECT)); initMenuItem(newElement); deleteElement = new JMenuItem( controller.getAction(TreeViewerControl.DELETE_OBJECT)); initMenuItem(newElement); existingElement = new JMenuItem( controller.getAction(TreeViewerControl.ADD_OBJECT)); initMenuItem(existingElement); }
| 3,235,532
|
public DisplayedNote(NoteTreeNode treeNode, Note note) { this.treeNode = treeNode; this.note = note; }
|
public DisplayedNote(NoteTreeNode treeNode, Note note) { this.treeNode = treeNode; this.note = note; }
| 3,235,533
|
private ConstructorMetadata getConstructor(RootBeanDefinition rootBeanDefinition) { Class beanType = rootBeanDefinition.getBeanClass(); // try to get the class metadata ClassMetadata classMetadata = metadataManager.getClassMetadata(beanType); // get a set containing the names of the defined properties Set propertyNames = new HashSet(); PropertyValue[] values = rootBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < values.length; i++) { propertyNames.add(values[i].getName()); } // get the constructors sorted by longest arg length first List constructors = new ArrayList(classMetadata.getConstructors()); Collections.sort(constructors, new ArgLengthComparator()); // try to find a constructor for which we have all of the properties defined for (Iterator iterator = constructors.iterator(); iterator.hasNext();) { ConstructorMetadata constructorMetadata = (ConstructorMetadata) iterator.next(); if (constructorMetadata.getProperties().containsKey("always-use")) { return constructorMetadata; } List constructorArgNames = getConstructorArgNames(constructorMetadata); if (constructorArgNames != null && propertyNames.containsAll(constructorArgNames)) { return constructorMetadata; } } return null; }
|
private ConstructorMetadata getConstructor(RootBeanDefinition rootBeanDefinition) { Class beanType = rootBeanDefinition.getBeanClass(); // try to get the class metadata ClassMetadata classMetadata = metadataManager.getClassMetadata(beanType); // get a set containing the names of the defined properties Set propertyNames = new HashSet(); PropertyValue[] values = rootBeanDefinition.getPropertyValues().getPropertyValues(); for (int i = 0; i < values.length; i++) { propertyNames.add(values[i].getName()); } // get the constructors sorted by longest arg length first List constructors = new ArrayList(classMetadata.getConstructors()); Collections.sort(constructors, new ArgLengthComparator()); // try to find a constructor for which we have all of the properties defined for (Iterator iterator = constructors.iterator(); iterator.hasNext();) { ConstructorMetadata constructorMetadata = (ConstructorMetadata) iterator.next(); if (constructorMetadata.getProperties().containsKey("always-use")) { return constructorMetadata; } List constructorArgNames = getConstructorArgNames(constructorMetadata); if (constructorArgNames != null && propertyNames.containsAll(constructorArgNames)) { return constructorMetadata; } } return null; }
| 3,235,535
|
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinition = ((RootBeanDefinition) beanDefinition); parametersToConstructorArgs(rootBeanDefinition); }
|
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinition = ((RootBeanDefinition) beanDefinition); parametersToConstructorArgs(rootBeanDefinition); }
| 3,235,536
|
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinition = ((RootBeanDefinition) beanDefinition); parametersToConstructorArgs(rootBeanDefinition); }
|
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinition = ((RootBeanDefinition) beanDefinition); processParameters(rootBeanDefinition); }
| 3,235,537
|
public Object get(final String query) throws NotFoundException { TimedReference r; try { r = (TimedReference) _cache.get(query); } catch (NullPointerException e) { throw new NotFoundException(this + " is not initialized", e); } Object o = null; if (r != null) { o = r.get(); } if (o == null) { // DOUBLE CHECKED LOCKING IS DANGEROUS IN JAVA: // this looks like double-checked locking but it isn't, we // synchrnoized on a less expensive lock inside _cache.get() // the following ilne lets us simultaneously load up to // writeLocks.length resources. int lockIndex = Math.abs(query.hashCode()) % _writeLocks.length; synchronized(_writeLocks[lockIndex]) { if (r != null){ o = r.get(); } if (o == null) { r = load(query); if (r != null) { _cache.put(query,r); } o = r.get(); try { _log.debug("cached: " + query + " for " + r.getTimeout()); _tl.scheduleTime( new Runnable() { public void run() { _cache.remove(query); _log.debug("cache expired: " + query); } }, r.getTimeout()); } catch (Exception e) { _log.error("CachingProvider caught an exception", e); } } } } return o; }
|
public Object get(final String query) throws NotFoundException { TimedReference r; try { r = (TimedReference) _cache.get(query); } catch (NullPointerException e) { throw new NotFoundException(this + " is not initialized", e); } Object o = null; if (r != null) { o = r.get(); } if (o == null) { // DOUBLE CHECKED LOCKING IS DANGEROUS IN JAVA: // this looks like double-checked locking but it isn't, we // synchrnoized on a less expensive lock inside _cache.get() // the following ilne lets us simultaneously load up to // writeLocks.length resources. int lockIndex = Math.abs(query.hashCode()) % _writeLocks.length; synchronized(_writeLocks[lockIndex]) { if (r != null){ o = r.get(); } if (o == null) { r = load(query); if (r != null) { _cache.put(query,r); } o = r.get(); try { _log.debug("cached: " + query + " for " + r.getTimeout()); _tl.scheduleTime( new Runnable() { public void run() { _cache.remove(query); _log.debug("cache expired: " + query); } }, r.getTimeout()); } catch (Exception e) { _log.error("CachingProvider caught an exception", e); } } } } return o; }
| 3,235,538
|
final public void resourceRequest(RequestResourceEvent evt) throws NotFoundException { try { URL u = new URL(evt.getName()); Reader in = new InputStreamReader(u.openStream()); char buf[] = new char[512]; StringWriter sw = new StringWriter(); int num; while ( (num = in.read(buf)) != -1 ) { sw.write(buf, 0, num); } evt.set(sw.toString()); in.close(); } catch (Exception e) { _log.exception(e); throw new NotFoundException( "Reactor: Unable to load URL " + evt.getName() + ":" + e); } }
|
final public void resourceRequest(RequestResourceEvent evt) throws NotFoundException { try { String name = evt.getName(); URL u; if (name.indexOf(":") < 3) { u = new URL("file",null,-1,name); } else { u = new URL(name); } Reader in = new InputStreamReader(u.openStream()); char buf[] = new char[512]; StringWriter sw = new StringWriter(); int num; while ( (num = in.read(buf)) != -1 ) { sw.write(buf, 0, num); } evt.set(sw.toString()); in.close(); } catch (Exception e) { _log.exception(e); throw new NotFoundException( "Reactor: Unable to load URL " + evt.getName() + ":" + e); } }
| 3,235,540
|
private static QuantumStrategy getQuantization(QuantumDef qd, PixelsType type) { return new Quantization_8_16_bit(qd, type); }
|
private static QuantumStrategy getQuantization(QuantumDef qd, PixelsType type, IPixels iPixels) { return new Quantization_8_16_bit(qd, type); }
| 3,235,541
|
private static QuantumStrategy getQuantization(QuantumDef qd, PixelsType type) { return new Quantization_8_16_bit(qd, type); }
|
private static QuantumStrategy getQuantization(QuantumDef qd, PixelsType type) { return new Quantization_8_16_bit(qd, type, iPixels); }
| 3,235,542
|
public Node literal_concat(ISourcePosition position, Node head, Object tail) { ListNode list; if (head == null) { list = new DStrNode(position); } else if (head instanceof EvStrNode) { list = new DStrNode(position).add(head); } else { list = (ListNode) head; } if (tail instanceof String) { tail = new StrNode(position, (String)tail); } list.add((Node)tail); return list; }
|
public Node literal_concat(ISourcePosition position, Node head, Object tail) { ListNode list; if (head == null) { list = new DStrNode(position); } else if (head instanceof EvStrNode) { list = new DStrNode(position).add(head); } else { list = (ListNode) head; } if (tail instanceof String) { tail = new StrNode(position, (String)tail); } list.add((Node)tail); return list; }
| 3,235,543
|
public Node literal_concat(ISourcePosition position, Node head, Object tail) { ListNode list; if (head == null) { list = new DStrNode(position); } else if (head instanceof EvStrNode) { list = new DStrNode(position).add(head); } else { list = (ListNode) head; } if (tail instanceof String) { tail = new StrNode(position, (String)tail); } list.add((Node)tail); return list; }
|
public Node literal_concat(ISourcePosition position, Node head, Object tail) { ListNode list; if (head == null) { list = new DStrNode(position); } else if (head instanceof EvStrNode) { list = new DStrNode(position).add(head); } else { list = (ListNode) head; } if (tail instanceof String) { tail = new StrNode(position, (String)tail); } list.add((Node)tail); return list; }
| 3,235,544
|
public Node literal_concat(ISourcePosition position, Node head, Object tail) { ListNode list; if (head == null) { list = new DStrNode(position); } else if (head instanceof EvStrNode) { list = new DStrNode(position).add(head); } else { list = (ListNode) head; } if (tail instanceof String) { tail = new StrNode(position, (String)tail); } list.add((Node)tail); return list; }
|
public Node literal_concat(ISourcePosition position, Node head, Object tail) { ListNode list; if (head == null) { list = new DStrNode(position); } else if (head instanceof EvStrNode) { list = new DStrNode(position).add(head); } else { list = (ListNode) head; } if (tail instanceof String) { tail = new StrNode(position, (String)tail); } list.add((Node)tail); return list; }
| 3,235,545
|
public Node literal_concat(ISourcePosition position, Node head, Object tail) { ListNode list; if (head == null) { list = new DStrNode(position); } else if (head instanceof EvStrNode) { list = new DStrNode(position).add(head); } else { list = (ListNode) head; } if (tail instanceof String) { tail = new StrNode(position, (String)tail); } list.add((Node)tail); return list; }
|
public Node literal_concat(ISourcePosition position, Node head, Object tail) { ListNode list; if (head == null) { list = new DStrNode(position); } else if (head instanceof EvStrNode) { list = new DStrNode(position).add(head); } else { list = (ListNode) head; } if (tail instanceof String) { tail = new StrNode(position, (String)tail); } return list; }
| 3,235,546
|
public Node literal_concat(ISourcePosition position, Node head, Object tail) { ListNode list; if (head == null) { list = new DStrNode(position); } else if (head instanceof EvStrNode) { list = new DStrNode(position).add(head); } else { list = (ListNode) head; } if (tail instanceof String) { tail = new StrNode(position, (String)tail); } list.add((Node)tail); return list; }
|
public Node literal_concat(ISourcePosition position, Node head, Object tail) { ListNode list; if (head == null) { list = new DStrNode(position); } else if (head instanceof EvStrNode) { list = new DStrNode(position).add(head); } else { list = (ListNode) head; } if (tail instanceof String) { tail = new StrNode(position, (String)tail); } list.add((Node)tail); if (head instanceof EvStrNode) { head = new DStrNode(position).add(head); } if (tail instanceof StrNode) { if (head instanceof StrNode) { head = new StrNode(union(head, (Node) tail), ((StrNode) head).getValue() + ((StrNode) tail).getValue()); } else { ((ListNode) head).add((Node) tail); } } else if (tail instanceof DStrNode) { assert head instanceof ListNode; return list_concat((ListNode) head, tail); } else if (tail instanceof EvStrNode) { if (head instanceof StrNode) { head = new DStrNode(head.getPosition()).add(head); } ((DStrNode) head).add(tail); } return head; }
| 3,235,547
|
public BPalette(BrowserTopModel parent, String name) { backingModel = parent; final BPalette refCopy = this; this.paletteName = name; titleBar = new TitleBar(name); iconBar = new IconBar(measuredWidth); addChild(titleBar); titleBar.addChild(iconBar); // cheap way to get the whole thing to move iconBar.setOffset(0,titleBar.getHeight()); // sets the bounds setBounds(0,0,measuredWidth,titleBar.getHeight()+iconBar.getHeight()); }
|
public BPalette(BrowserTopModel parent, String name) { backingModel = parent; final BPalette refCopy = this; this.paletteName = name; titleBar = new TitleBar(name); iconBar = new IconBar(measuredWidth); addChild(titleBar); titleBar.addChild(iconBar); // cheap way to get the whole thing to move iconBar.setOffset(0,titleBar.getHeight()); // sets the bounds }
| 3,235,548
|
public BIcon(String text, boolean sticky) { this.sticky = sticky; init(); presentationNode = new PText(text); // TODO set font addChild(presentationNode); placeNode(presentationNode); }
|
public BIcon(Image imageIcon, String tooltipText, boolean sticky) { this.sticky = sticky; init(); presentationNode = new PText(text); // TODO set font addChild(presentationNode); placeNode(presentationNode); }
| 3,235,549
|
public BIcon(String text, boolean sticky) { this.sticky = sticky; init(); presentationNode = new PText(text); // TODO set font addChild(presentationNode); placeNode(presentationNode); }
|
public BIcon(String text, boolean sticky) { this.sticky = sticky; init(); presentationNode = new PImage(imageIcon,true); // TODO set font addChild(presentationNode); placeNode(presentationNode); }
| 3,235,550
|
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } ThreadContext tc = getCurrentContext(); RubyArray backtrace = (RubyArray) excp.callMethod(tc, "backtrace"); PrintStream errorStream = getErrorStream(); if (backtrace.isNil()) { if (tc.getSourceFile() != null) { errorStream.print(tc.getPosition()); } else { errorStream.print(tc.getSourceLine()); } } else if (backtrace.getLength() == 0) { printErrorPos(errorStream); } else { IRubyObject mesg = backtrace.first(IRubyObject.NULL_ARRAY); if (mesg.isNil()) { printErrorPos(errorStream); } else { errorStream.print(mesg); } } RubyClass type = excp.getMetaClass(); String info = excp.toString(); if (type == getClass("RuntimeError") && (info == null || info.length() == 0)) { errorStream.print(": unhandled exception\n"); } else { String path = type.getName(); if (info.length() == 0) { errorStream.print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } errorStream.print(": " + info); if (path != null) { errorStream.print(" (" + path + ")\n"); } if (tail != null) { errorStream.print(tail + '\n'); } } } if (!backtrace.isNil()) { excp.printBacktrace(errorStream); } }
|
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } ThreadContext tc = getCurrentContext(); IRubyObject backtrace = excp.callMethod(tc, "backtrace"); PrintStream errorStream = getErrorStream(); if (backtrace.isNil()) { if (tc.getSourceFile() != null) { errorStream.print(tc.getPosition()); } else { errorStream.print(tc.getSourceLine()); } } else if (backtrace.getLength() == 0) { printErrorPos(errorStream); } else { IRubyObject mesg = backtrace.first(IRubyObject.NULL_ARRAY); if (mesg.isNil()) { printErrorPos(errorStream); } else { errorStream.print(mesg); } } RubyClass type = excp.getMetaClass(); String info = excp.toString(); if (type == getClass("RuntimeError") && (info == null || info.length() == 0)) { errorStream.print(": unhandled exception\n"); } else { String path = type.getName(); if (info.length() == 0) { errorStream.print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } errorStream.print(": " + info); if (path != null) { errorStream.print(" (" + path + ")\n"); } if (tail != null) { errorStream.print(tail + '\n'); } } } if (!backtrace.isNil()) { excp.printBacktrace(errorStream); } }
| 3,235,552
|
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } ThreadContext tc = getCurrentContext(); RubyArray backtrace = (RubyArray) excp.callMethod(tc, "backtrace"); PrintStream errorStream = getErrorStream(); if (backtrace.isNil()) { if (tc.getSourceFile() != null) { errorStream.print(tc.getPosition()); } else { errorStream.print(tc.getSourceLine()); } } else if (backtrace.getLength() == 0) { printErrorPos(errorStream); } else { IRubyObject mesg = backtrace.first(IRubyObject.NULL_ARRAY); if (mesg.isNil()) { printErrorPos(errorStream); } else { errorStream.print(mesg); } } RubyClass type = excp.getMetaClass(); String info = excp.toString(); if (type == getClass("RuntimeError") && (info == null || info.length() == 0)) { errorStream.print(": unhandled exception\n"); } else { String path = type.getName(); if (info.length() == 0) { errorStream.print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } errorStream.print(": " + info); if (path != null) { errorStream.print(" (" + path + ")\n"); } if (tail != null) { errorStream.print(tail + '\n'); } } } if (!backtrace.isNil()) { excp.printBacktrace(errorStream); } }
|
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } ThreadContext tc = getCurrentContext(); RubyArray backtrace = (RubyArray) excp.callMethod(tc, "backtrace"); PrintStream errorStream = getErrorStream(); if (backtrace.isNil() || !(backtrace instanceof RubyArray)) { if (tc.getSourceFile() != null) { errorStream.print(tc.getPosition()); } else { errorStream.print(tc.getSourceLine()); } } else if (backtrace.getLength() == 0) { printErrorPos(errorStream); } else { IRubyObject mesg = backtrace.first(IRubyObject.NULL_ARRAY); if (mesg.isNil()) { printErrorPos(errorStream); } else { errorStream.print(mesg); } } RubyClass type = excp.getMetaClass(); String info = excp.toString(); if (type == getClass("RuntimeError") && (info == null || info.length() == 0)) { errorStream.print(": unhandled exception\n"); } else { String path = type.getName(); if (info.length() == 0) { errorStream.print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } errorStream.print(": " + info); if (path != null) { errorStream.print(" (" + path + ")\n"); } if (tail != null) { errorStream.print(tail + '\n'); } } } if (!backtrace.isNil()) { excp.printBacktrace(errorStream); } }
| 3,235,553
|
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } ThreadContext tc = getCurrentContext(); RubyArray backtrace = (RubyArray) excp.callMethod(tc, "backtrace"); PrintStream errorStream = getErrorStream(); if (backtrace.isNil()) { if (tc.getSourceFile() != null) { errorStream.print(tc.getPosition()); } else { errorStream.print(tc.getSourceLine()); } } else if (backtrace.getLength() == 0) { printErrorPos(errorStream); } else { IRubyObject mesg = backtrace.first(IRubyObject.NULL_ARRAY); if (mesg.isNil()) { printErrorPos(errorStream); } else { errorStream.print(mesg); } } RubyClass type = excp.getMetaClass(); String info = excp.toString(); if (type == getClass("RuntimeError") && (info == null || info.length() == 0)) { errorStream.print(": unhandled exception\n"); } else { String path = type.getName(); if (info.length() == 0) { errorStream.print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } errorStream.print(": " + info); if (path != null) { errorStream.print(" (" + path + ")\n"); } if (tail != null) { errorStream.print(tail + '\n'); } } } if (!backtrace.isNil()) { excp.printBacktrace(errorStream); } }
|
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } ThreadContext tc = getCurrentContext(); RubyArray backtrace = (RubyArray) excp.callMethod(tc, "backtrace"); PrintStream errorStream = getErrorStream(); if (backtrace.isNil()) { if (tc.getSourceFile() != null) { errorStream.print(tc.getPosition()); } else { errorStream.print(tc.getSourceLine()); } } else if (((RubyArray) backtrace).getLength() == 0) { printErrorPos(errorStream); } else { IRubyObject mesg = backtrace.first(IRubyObject.NULL_ARRAY); if (mesg.isNil()) { printErrorPos(errorStream); } else { errorStream.print(mesg); } } RubyClass type = excp.getMetaClass(); String info = excp.toString(); if (type == getClass("RuntimeError") && (info == null || info.length() == 0)) { errorStream.print(": unhandled exception\n"); } else { String path = type.getName(); if (info.length() == 0) { errorStream.print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } errorStream.print(": " + info); if (path != null) { errorStream.print(" (" + path + ")\n"); } if (tail != null) { errorStream.print(tail + '\n'); } } } if (!backtrace.isNil()) { excp.printBacktrace(errorStream); } }
| 3,235,554
|
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } ThreadContext tc = getCurrentContext(); RubyArray backtrace = (RubyArray) excp.callMethod(tc, "backtrace"); PrintStream errorStream = getErrorStream(); if (backtrace.isNil()) { if (tc.getSourceFile() != null) { errorStream.print(tc.getPosition()); } else { errorStream.print(tc.getSourceLine()); } } else if (backtrace.getLength() == 0) { printErrorPos(errorStream); } else { IRubyObject mesg = backtrace.first(IRubyObject.NULL_ARRAY); if (mesg.isNil()) { printErrorPos(errorStream); } else { errorStream.print(mesg); } } RubyClass type = excp.getMetaClass(); String info = excp.toString(); if (type == getClass("RuntimeError") && (info == null || info.length() == 0)) { errorStream.print(": unhandled exception\n"); } else { String path = type.getName(); if (info.length() == 0) { errorStream.print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } errorStream.print(": " + info); if (path != null) { errorStream.print(" (" + path + ")\n"); } if (tail != null) { errorStream.print(tail + '\n'); } } } if (!backtrace.isNil()) { excp.printBacktrace(errorStream); } }
|
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } ThreadContext tc = getCurrentContext(); RubyArray backtrace = (RubyArray) excp.callMethod(tc, "backtrace"); PrintStream errorStream = getErrorStream(); if (backtrace.isNil()) { if (tc.getSourceFile() != null) { errorStream.print(tc.getPosition()); } else { errorStream.print(tc.getSourceLine()); } } else if (backtrace.getLength() == 0) { printErrorPos(errorStream); } else { IRubyObject mesg = ((RubyArray) backtrace).first(IRubyObject.NULL_ARRAY); if (mesg.isNil()) { printErrorPos(errorStream); } else { errorStream.print(mesg); } } RubyClass type = excp.getMetaClass(); String info = excp.toString(); if (type == getClass("RuntimeError") && (info == null || info.length() == 0)) { errorStream.print(": unhandled exception\n"); } else { String path = type.getName(); if (info.length() == 0) { errorStream.print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } errorStream.print(": " + info); if (path != null) { errorStream.print(" (" + path + ")\n"); } if (tail != null) { errorStream.print(tail + '\n'); } } } if (!backtrace.isNil()) { excp.printBacktrace(errorStream); } }
| 3,235,555
|
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } ThreadContext tc = getCurrentContext(); RubyArray backtrace = (RubyArray) excp.callMethod(tc, "backtrace"); PrintStream errorStream = getErrorStream(); if (backtrace.isNil()) { if (tc.getSourceFile() != null) { errorStream.print(tc.getPosition()); } else { errorStream.print(tc.getSourceLine()); } } else if (backtrace.getLength() == 0) { printErrorPos(errorStream); } else { IRubyObject mesg = backtrace.first(IRubyObject.NULL_ARRAY); if (mesg.isNil()) { printErrorPos(errorStream); } else { errorStream.print(mesg); } } RubyClass type = excp.getMetaClass(); String info = excp.toString(); if (type == getClass("RuntimeError") && (info == null || info.length() == 0)) { errorStream.print(": unhandled exception\n"); } else { String path = type.getName(); if (info.length() == 0) { errorStream.print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } errorStream.print(": " + info); if (path != null) { errorStream.print(" (" + path + ")\n"); } if (tail != null) { errorStream.print(tail + '\n'); } } } if (!backtrace.isNil()) { excp.printBacktrace(errorStream); } }
|
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } ThreadContext tc = getCurrentContext(); RubyArray backtrace = (RubyArray) excp.callMethod(tc, "backtrace"); PrintStream errorStream = getErrorStream(); if (backtrace.isNil()) { if (tc.getSourceFile() != null) { errorStream.print(tc.getPosition()); } else { errorStream.print(tc.getSourceLine()); } } else if (backtrace.getLength() == 0) { printErrorPos(errorStream); } else { IRubyObject mesg = backtrace.first(IRubyObject.NULL_ARRAY); if (mesg.isNil()) { printErrorPos(errorStream); } else { errorStream.print(mesg); } } RubyClass type = excp.getMetaClass(); String info = excp.toString(); if (type == getClass("RuntimeError") && (info == null || info.length() == 0)) { errorStream.print(": unhandled exception\n"); } else { String path = type.getName(); if (info.length() == 0) { errorStream.print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } errorStream.print(": " + info); if (path != null) { errorStream.print(" (" + path + ")\n"); } if (tail != null) { errorStream.print(tail + '\n'); } } } if (!backtrace.isNil()) { excp.printBacktrace(errorStream); } }
| 3,235,556
|
public void actionPerformed(ActionEvent e) { Object src = e.getSource(); if (target != null) { if (src == view.properties) control.showProperties(target); else if (src == view.view && target instanceof ImageSummary) control.viewImage(((ImageSummary) target)); else if (src == view.view && target instanceof CategoryGroupData) control.viewCategoryGroup(((CategoryGroupData) target)); else if (src == view.view && target instanceof CategorySummary) control.viewCategory(((CategorySummary) target)); else if (src == view.annotate && target instanceof ImageSummary) control.annotateImage(((ImageSummary) target)); else if (src == view.refresh) control.refresh(target); } view.setVisible(false); }
|
public void actionPerformed(ActionEvent e) { Object src = e.getSource(); if (target != null) { if (src == view.properties) control.showProperties(target); else if (src == view.view && target instanceof ImageSummary) control.viewImage(((ImageSummary) target)); else if (src == view.view && target instanceof CategoryGroupData) control.viewCategoryGroup(((CategoryGroupData) target)); else if (src == view.view && target instanceof CategorySummary) control.viewCategory(((CategorySummary) target)); else if (src == view.annotate && target instanceof ImageSummary) control.annotateImage(((ImageSummary) target)); else if (src == view.refresh) control.refresh(target); } else if (target == null && src == view.refresh) control.refresh(DataManagerCtrl.CLASSIFIER); view.setVisible(false); }
| 3,235,557
|
void zoomImage() { if (model.getRenderedImage() == null) return; model.createDisplayedImage(); BufferedImage img = model.getDisplayedImage(); setComponentsSize(img.getWidth(), img.getHeight()); JViewport currentView = this.getViewport(); int h = img.getHeight(); int w = img.getWidth(); int viewportW = currentView.getWidth(); int viewportH = currentView.getHeight(); int x = w/2-viewportW/2; if (x < 0) x = 0; int y = h/2-viewportH/2; if (y < 0) y = 0; currentView.setViewPosition(new Point(x, y)); browserCanvas.repaint(); }
|
void zoomImage() { if (model.getRenderedImage() == null) return; model.createDisplayedImage(); BufferedImage img = model.getDisplayedImage(); setComponentsSize(img.getWidth(), img.getHeight()); JViewport currentView = getViewport(); int h = img.getHeight(); int w = img.getWidth(); int viewportW = currentView.getWidth(); int viewportH = currentView.getHeight(); int x = w/2-viewportW/2; if (x < 0) x = 0; int y = h/2-viewportH/2; if (y < 0) y = 0; currentView.setViewPosition(new Point(x, y)); browserCanvas.repaint(); }
| 3,235,558
|
void initialize() { controller.initialize(view); model.getParentModel().addPropertyChangeListener( TreeViewer.THUMBNAIL_LOADED_PROPERTY, controller); view.initialize(controller, model); }
|
void initialize() { controller.initialize(view); model.getParentModel().addPropertyChangeListener( TreeViewer.THUMBNAIL_LOADED_PROPERTY, controller); view.initialize(controller, model); }
| 3,235,559
|
public String toString(){ return "LogicalChannel"+(attributeId==null ? ":Hash"+this.hashCode() : ":"+attributeId); }
|
public String toString(){ return "LogicalChannel"+(attributeId==null ? ":Hash_"+this.hashCode() : ":Id_"+attributeId); }
| 3,235,560
|
private void setTBSize(int w) { Dimension d = toolBar.getSize(); int dw = d.width; if (w-dw > 0) toolBar.add(Box.createRigidArea(new Dimension(w-d.width, 1))); }
|
private void setTBSize(int w) { Dimension d = toolBar.getSize(); int dw = d.width; if (w-dw > 0) toolBar.add(Box.createRigidArea(new Dimension(w-d.width, 1))); }
| 3,235,561
|
public void visit(ImageNode node) { long id = ((ImageData) node.getHierarchyObject()).getId(); Iterator i = nodes.iterator(); DataObject object; while (i.hasNext()) { object = (DataObject) i.next(); if (object instanceof ImageData) { if (object.getId() == id) { node.setHierarchyObject(object); node.setNodeDecoration(); node.repaint(); } } } }
|
public void visit(ImageNode node) { long id = ((ImageData) node.getHierarchyObject()).getId(); Iterator i = nodes.iterator(); Object object; while (i.hasNext()) { object = (DataObject) i.next(); if (object instanceof ImageData) { if (object.getId() == id) { node.setHierarchyObject(object); node.setNodeDecoration(); node.repaint(); } } } }
| 3,235,562
|
public void visit(ImageNode node) { long id = ((ImageData) node.getHierarchyObject()).getId(); Iterator i = nodes.iterator(); DataObject object; while (i.hasNext()) { object = (DataObject) i.next(); if (object instanceof ImageData) { if (object.getId() == id) { node.setHierarchyObject(object); node.setNodeDecoration(); node.repaint(); } } } }
|
public void visit(ImageNode node) { long id = ((ImageData) node.getHierarchyObject()).getId(); Iterator i = nodes.iterator(); DataObject object; while (i.hasNext()) { object = i.next(); if (object instanceof ImageData) { if (object.getId() == id) { node.setHierarchyObject(object); node.setNodeDecoration(); node.repaint(); } } } }
| 3,235,563
|
public void visit(ImageNode node) { long id = ((ImageData) node.getHierarchyObject()).getId(); Iterator i = nodes.iterator(); DataObject object; while (i.hasNext()) { object = (DataObject) i.next(); if (object instanceof ImageData) { if (object.getId() == id) { node.setHierarchyObject(object); node.setNodeDecoration(); node.repaint(); } } } }
|
public void visit(ImageNode node) { long id = ((ImageData) node.getHierarchyObject()).getId(); Iterator i = nodes.iterator(); DataObject object; while (i.hasNext()) { object = (DataObject) i.next(); if (object instanceof ImageData) { if (((ImageData) object).getId() == id) { node.setHierarchyObject(object); node.setNodeDecoration(); node.repaint(); } } } }
| 3,235,564
|
public void visit(ImageNode node) { long id = ((ImageData) node.getHierarchyObject()).getId(); Iterator i = nodes.iterator(); DataObject object; while (i.hasNext()) { object = (DataObject) i.next(); if (object instanceof ImageData) { if (object.getId() == id) { node.setHierarchyObject(object); node.setNodeDecoration(); node.repaint(); } } } }
|
public void visit(ImageNode node) { long id = ((ImageData) node.getHierarchyObject()).getId(); Iterator i = nodes.iterator(); DataObject object; while (i.hasNext()) { object = (DataObject) i.next(); if (object instanceof ImageData) { if (object.getId() == id) { node.setHierarchyObject(object); node.setNodeDecoration(); } } } }
| 3,235,565
|
public void execute() throws BuildException { if (branchCoverageRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchCoverageRate); } if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } Iterator i = regexes.iterator(); while (i.hasNext()) { getJava().createArg().setValue("--ignore"); getJava().createArg().setValue(i.next().toString()); } if (lineCoverageRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineCoverageRate); } if (getJava().executeJava() != 0) { throw new BuildException(); } }
|
public void execute() throws BuildException { if (branchCoverageRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchCoverageRate); } if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } Iterator i = regexes.iterator(); while (i.hasNext()) { getJava().createArg().setValue("--ignore"); getJava().createArg().setValue(i.next().toString()); } if (lineCoverageRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineCoverageRate); } if (getJava().executeJava() != 0) { throw new BuildException(); } }
| 3,235,567
|
public void execute() throws BuildException { if (branchCoverageRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchCoverageRate); } if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } Iterator i = regexes.iterator(); while (i.hasNext()) { getJava().createArg().setValue("--ignore"); getJava().createArg().setValue(i.next().toString()); } if (lineCoverageRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineCoverageRate); } if (getJava().executeJava() != 0) { throw new BuildException(); } }
|
public void execute() throws BuildException { if (branchCoverageRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchCoverageRate); } if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } Iterator i = regexes.iterator(); while (i.hasNext()) { getJava().createArg().setValue("--ignore"); getJava().createArg().setValue(i.next().toString()); } if (lineCoverageRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineCoverageRate); } if (getJava().executeJava() != 0) { throw new BuildException(); } }
| 3,235,568
|
public void execute() throws BuildException { if (branchCoverageRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchCoverageRate); } if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } Iterator i = regexes.iterator(); while (i.hasNext()) { getJava().createArg().setValue("--ignore"); getJava().createArg().setValue(i.next().toString()); } if (lineCoverageRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineCoverageRate); } if (getJava().executeJava() != 0) { throw new BuildException(); } }
|
public void execute() throws BuildException { if (branchCoverageRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchCoverageRate); } if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } Iterator i = regexes.iterator(); while (i.hasNext()) { getJava().createArg().setValue("--ignore"); getJava().createArg().setValue(i.next().toString()); } if (lineCoverageRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineCoverageRate); } if (getJava().executeJava() != 0) { throw new BuildException(); } }
| 3,235,569
|
public void execute() throws BuildException { if (branchCoverageRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchCoverageRate); } if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } Iterator i = regexes.iterator(); while (i.hasNext()) { getJava().createArg().setValue("--ignore"); getJava().createArg().setValue(i.next().toString()); } if (lineCoverageRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineCoverageRate); } if (getJava().executeJava() != 0) { throw new BuildException(); } }
|
public void execute() throws BuildException { if (branchCoverageRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchCoverageRate); } if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } Iterator i = regexes.iterator(); while (i.hasNext()) { getJava().createArg().setValue("--ignore"); getJava().createArg().setValue(i.next().toString()); } if (lineCoverageRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineCoverageRate); } if (getJava().executeJava() != 0) { throw new BuildException(); } }
| 3,235,570
|
public void execute() throws BuildException { if (branchCoverageRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchCoverageRate); } if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } Iterator i = regexes.iterator(); while (i.hasNext()) { getJava().createArg().setValue("--ignore"); getJava().createArg().setValue(i.next().toString()); } if (lineCoverageRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineCoverageRate); } if (getJava().executeJava() != 0) { throw new BuildException(); } }
|
public void execute() throws BuildException { if (branchCoverageRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchCoverageRate); } if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } Iterator i = regexes.iterator(); while (i.hasNext()) { getJava().createArg().setValue("--ignore"); getJava().createArg().setValue(i.next().toString()); } if (lineCoverageRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineCoverageRate); } if (getJava().executeJava() != 0) { throw new BuildException(); } }
| 3,235,571
|
public RubyObject call0(RubyObject recv, RubyId id, RubyObject[] args, Node body, boolean noSuper) { // ... getRuby().getRubyFrame().push(); // HACK +++ getRuby().getIter().push(RubyIter.ITER_NOT); // HACK --- getRuby().getRubyFrame().setLastFunc(id); getRuby().getRubyFrame().setLastClass(noSuper ? null : this); getRuby().getRubyFrame().setSelf(recv); getRuby().getRubyFrame().setArgs(new ShiftableList(args)); RubyObject result = getRuby().getNil(); if (body instanceof CallableNode) { result = ((CallableNode)body).call(getRuby(), recv, id, args, noSuper); } else { System.out.println("{BUG] Not implemented yet (method call): " + id.toName() + ", node_type:" + body.getType()); } /*switch (body.nd_type()) { case NODE_ZSUPER: case NODE_ATTRSET: case NODE_IVAR: { result = body.interpreter.eval(recv, body); break; } case NODE_SCOPE: { NODE savedCref = null; // VALUE[] localVars = null; ShiftableList argsList = new ShiftableList(args); ShiftableList localVarsList = null; getRuby().getRubyScope().push(); if (body.nd_rval() != null) { savedCref = getRuby().getRubyCRef(); getRuby().setRubyCRef((NODE)body.nd_rval()); getRuby().getRubyFrame().setCbase(body.nd_rval()); } if (body.nd_tbl() != null) { // ? +++ List tmpList = Collections.nCopies(body.nd_tbl()[0].intValue() + 1, getRuby().getNil()); // ? --- localVarsList = new ShiftableList(new ArrayList(tmpList)); localVarsList.set(0, body); localVarsList.shift(1); getRuby().getRubyScope().setLocalTbl(body.nd_tbl()); getRuby().getRubyScope().setLocalVars(localVarsList.getList()); } else { localVarsList = getRuby().getRubyScope().getLocalVars(); getRuby().getRubyScope().setLocalVars(null); getRuby().getRubyScope().setLocalTbl(null); } body = body.nd_next(); RubyVarmap.push(getRuby()); // PUSH_TAG(PROT_FUNC); try { NODE node = null; int i; if (body.nd_type() == NODE_ARGS) { node = body; body = null; } else if (body.nd_type() == NODE_BLOCK) { node = body.nd_head(); body = body.nd_next(); } if (node != null) { if (node.nd_type() != NODE_ARGS) { // rb_bug("no argument-node"); } i = node.nd_cnt(); if (i > (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + i + ")"); } if (node.nd_rest() == -1) { int opt = i; NODE optnode = node.nd_opt(); while (optnode != null) { opt++; optnode = optnode.nd_next(); } if (opt < (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + opt + ")"); } getRuby().getRubyFrame().setArgs(localVarsList != null ? localVarsList.getList(2) : null); } if (localVarsList != null) { if (i > 0) { localVarsList.shift(2); for (int j = 0; j < i; j++ ) { localVarsList.set(j, argsList.get(j)); } localVarsList.shiftLeft(2); } argsList.shift(i); if (node.nd_opt() != null) { NODE opt = node.nd_opt(); while (opt != null && argsList.size() != 0) { interpreter.assign(recv, opt.nd_head(), (RubyObject)argsList.get(0), true); argsList.shift(1); opt = opt.nd_next(); } interpreter.eval(recv, opt); } if (node.nd_rest() >= 0) { RubyArray array = null; if (argsList.size() > 0) { array = RubyArray.m_newArray(getRuby(), argsList); } else { array = RubyArray.m_newArray(getRuby(), 0); } localVarsList.set(node.nd_rest(), array); } } } result = interpreter.eval(recv, body); } catch (ReturnException rExcptn) { } RubyVarmap.pop(getRuby()); getRuby().getRubyScope().pop(); getRuby().setRubyCRef(savedCref); break; } default: { System.out.println("Not implemented yet (method call): " + id.toName() + ", node_type:" + body.nd_type()); } } */ getRuby().getRubyFrame().pop(); getRuby().getIter().pop(); return result ; }
|
public RubyObject call0(RubyObject recv, RubyId id, RubyObject[] args, Node body, boolean noSuper) { // ... getRuby().getRubyFrame().push(); // HACK +++ getRuby().getIter().push(RubyIter.ITER_NOT); // HACK --- getRuby().getRubyFrame().setLastFunc(id); getRuby().getRubyFrame().setLastClass(noSuper ? null : this); getRuby().getRubyFrame().setSelf(recv); getRuby().getRubyFrame().setArgs(new RubyPointer(args)); RubyObject result = getRuby().getNil(); if (body instanceof CallableNode) { result = ((CallableNode)body).call(getRuby(), recv, id, args, noSuper); } else { System.out.println("{BUG] Not implemented yet (method call): " + id.toName() + ", node_type:" + body.getType()); } /*switch (body.nd_type()) { case NODE_ZSUPER: case NODE_ATTRSET: case NODE_IVAR: { result = body.interpreter.eval(recv, body); break; } case NODE_SCOPE: { NODE savedCref = null; // VALUE[] localVars = null; ShiftableList argsList = new ShiftableList(args); ShiftableList localVarsList = null; getRuby().getRubyScope().push(); if (body.nd_rval() != null) { savedCref = getRuby().getRubyCRef(); getRuby().setRubyCRef((NODE)body.nd_rval()); getRuby().getRubyFrame().setCbase(body.nd_rval()); } if (body.nd_tbl() != null) { // ? +++ List tmpList = Collections.nCopies(body.nd_tbl()[0].intValue() + 1, getRuby().getNil()); // ? --- localVarsList = new ShiftableList(new ArrayList(tmpList)); localVarsList.set(0, body); localVarsList.shift(1); getRuby().getRubyScope().setLocalTbl(body.nd_tbl()); getRuby().getRubyScope().setLocalVars(localVarsList.getList()); } else { localVarsList = getRuby().getRubyScope().getLocalVars(); getRuby().getRubyScope().setLocalVars(null); getRuby().getRubyScope().setLocalTbl(null); } body = body.nd_next(); RubyVarmap.push(getRuby()); // PUSH_TAG(PROT_FUNC); try { NODE node = null; int i; if (body.nd_type() == NODE_ARGS) { node = body; body = null; } else if (body.nd_type() == NODE_BLOCK) { node = body.nd_head(); body = body.nd_next(); } if (node != null) { if (node.nd_type() != NODE_ARGS) { // rb_bug("no argument-node"); } i = node.nd_cnt(); if (i > (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + i + ")"); } if (node.nd_rest() == -1) { int opt = i; NODE optnode = node.nd_opt(); while (optnode != null) { opt++; optnode = optnode.nd_next(); } if (opt < (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + opt + ")"); } getRuby().getRubyFrame().setArgs(localVarsList != null ? localVarsList.getList(2) : null); } if (localVarsList != null) { if (i > 0) { localVarsList.shift(2); for (int j = 0; j < i; j++ ) { localVarsList.set(j, argsList.get(j)); } localVarsList.shiftLeft(2); } argsList.shift(i); if (node.nd_opt() != null) { NODE opt = node.nd_opt(); while (opt != null && argsList.size() != 0) { interpreter.assign(recv, opt.nd_head(), (RubyObject)argsList.get(0), true); argsList.shift(1); opt = opt.nd_next(); } interpreter.eval(recv, opt); } if (node.nd_rest() >= 0) { RubyArray array = null; if (argsList.size() > 0) { array = RubyArray.m_newArray(getRuby(), argsList); } else { array = RubyArray.m_newArray(getRuby(), 0); } localVarsList.set(node.nd_rest(), array); } } } result = interpreter.eval(recv, body); } catch (ReturnException rExcptn) { } RubyVarmap.pop(getRuby()); getRuby().getRubyScope().pop(); getRuby().setRubyCRef(savedCref); break; } default: { System.out.println("Not implemented yet (method call): " + id.toName() + ", node_type:" + body.nd_type()); } } */ getRuby().getRubyFrame().pop(); getRuby().getIter().pop(); return result ; }
| 3,235,573
|
public double getMax() { return max; }
|
public double getMax() { return max; }
| 3,235,574
|
public double getMean() { return mean; }
|
public double getMean() { return mean; }
| 3,235,575
|
public double getMin() { return min; }
|
public double getMin() { return min; }
| 3,235,576
|
public double getStandardDeviation() { return standardDeviation; }
|
public double getStandardDeviation() { return standardDeviation; }
| 3,235,577
|
private void formatUsersList(String[] owners) { // remove all users from list before adding new listModel.removeAllElements(); // add each user to list Timestamp date; DateFormat df = DateFormat.getDateInstance(); AnnotationData data; List list; for (int i = 0; i < owners.length; i++) { list = getOwnerAnnotation(i); data = ((AnnotationData) list.get(0)); date = data.getLastModified(); if (date == null) date = new Timestamp((new java.util.Date()).getTime()); listModel.addElement(owners[i]+" ("+df.format(date)+")"); } }
|
private void formatUsersList(String[] owners) { // remove all users from list before adding new listModel.removeAllElements(); // add each user to list Timestamp date; DateFormat df = DateFormat.getDateInstance(); AnnotationData data; List list; for (int i = 0; i < owners.length; i++) { list = getOwnerAnnotation(i); data = ((AnnotationData) list.get(0)); date = data.getLastModified(); if (date == null) date = new Timestamp((new java.util.Date()).getTime()); listModel.addElement(owners[i]+" ("+df.format(date)+")"); } }
| 3,235,578
|
void showAnnotations() { deleteBox.setSelected(false); ExperimenterData userDetails = model.getUserDetails(); if (userDetails == null) return; Map annotations = model.getAnnotations(); String[] owners = new String[annotations.size()]; Iterator i = annotations.keySet().iterator(); Long id; int index = 0; ownersMap = new HashMap(); List list; ExperimenterData data; while (i.hasNext()) { id = (Long) i.next(); list = (List) annotations.get(id); data = ((AnnotationData) list.get(0)).getOwner(); if (userDetails.getId() == id.intValue()) userIndex = index; String n = "Name not available"; //TODO: REMOVE ASAP try { n = data.getLastName(); } catch (Exception e) {} owners[index] = n; ownersMap.put(new Integer(index), id); index++; } //No annotation for the current user, so allow creation. if (userIndex != -1) annotatedByList.setSelectedIndex(userIndex); setComponentsEnabled(true); formatUsersList(owners); annotatedByList.clearSelection(); //annotatedByList.setSelectedIndex(userIndex); showSingleAnnotation(); }
|
void showAnnotations() { deleteBox.setSelected(false); ExperimenterData userDetails = model.getUserDetails(); if (userDetails == null) return; Map annotations = model.getAnnotations(); String[] owners = new String[annotations.size()]; Iterator i = annotations.keySet().iterator(); Long id; int index = 0; ownersMap = new HashMap(); List list; ExperimenterData data; while (i.hasNext()) { id = (Long) i.next(); list = (List) annotations.get(id); data = ((AnnotationData) list.get(0)).getOwner(); if (userDetails.getId() == id.intValue()) userIndex = index; String n = "Name not available"; //TODO: REMOVE ASAP try { n = data.getLastName(); } catch (Exception e) {} owners[index] = n; ownersMap.put(new Integer(index), id); index++; } //No annotation for the current user, so allow creation. setComponentsEnabled(true); formatUsersList(owners); annotatedByList.clearSelection(); //annotatedByList.setSelectedIndex(userIndex); showSingleAnnotation(); }
| 3,235,579
|
void showAnnotations() { deleteBox.setSelected(false); ExperimenterData userDetails = model.getUserDetails(); if (userDetails == null) return; Map annotations = model.getAnnotations(); String[] owners = new String[annotations.size()]; Iterator i = annotations.keySet().iterator(); Long id; int index = 0; ownersMap = new HashMap(); List list; ExperimenterData data; while (i.hasNext()) { id = (Long) i.next(); list = (List) annotations.get(id); data = ((AnnotationData) list.get(0)).getOwner(); if (userDetails.getId() == id.intValue()) userIndex = index; String n = "Name not available"; //TODO: REMOVE ASAP try { n = data.getLastName(); } catch (Exception e) {} owners[index] = n; ownersMap.put(new Integer(index), id); index++; } //No annotation for the current user, so allow creation. if (userIndex != -1) annotatedByList.setSelectedIndex(userIndex); setComponentsEnabled(true); formatUsersList(owners); annotatedByList.clearSelection(); //annotatedByList.setSelectedIndex(userIndex); showSingleAnnotation(); }
|
void showAnnotations() { deleteBox.setSelected(false); ExperimenterData userDetails = model.getUserDetails(); if (userDetails == null) return; Map annotations = model.getAnnotations(); String[] owners = new String[annotations.size()]; Iterator i = annotations.keySet().iterator(); Long id; int index = 0; ownersMap = new HashMap(); List list; ExperimenterData data; while (i.hasNext()) { id = (Long) i.next(); list = (List) annotations.get(id); data = ((AnnotationData) list.get(0)).getOwner(); if (userDetails.getId() == id.intValue()) userIndex = index; String n = "Name not available"; //TODO: REMOVE ASAP try { n = data.getLastName(); } catch (Exception e) {} owners[index] = n; ownersMap.put(new Integer(index), id); index++; } //No annotation for the current user, so allow creation. if (userIndex != -1) annotatedByList.setSelectedIndex(userIndex); setComponentsEnabled(true); formatUsersList(owners); if (userIndex != -1) annotatedByList.setSelectedIndex(userIndex); //annotatedByList.setSelectedIndex(userIndex); showSingleAnnotation(); }
| 3,235,580
|
IObject findIObject(IObject o) throws DSOutOfServiceException, DSAccessException { try { IQuery service = getIQueryService(); return service.find(o.getClass(), o.getId().longValue()); } catch (Exception e) { handleException(e, "Cannot retrieve the requested object with "+ "object ID: "+o.getId()); } return null; }
|
IObject findIObject(IObject o) throws DSOutOfServiceException, DSAccessException { try { IQuery service = getIQueryService(); return service.find(o.getClass(), o.getId().longValue()); } catch (Exception e) { handleException(e, "Cannot retrieve the requested object with "+ "object ID: "+o.getId()); } return null; }
| 3,235,581
|
IObject findLink(IObject parent, IObject child) throws DSOutOfServiceException, DSAccessException { try { String table = getTableForLink(parent.getClass()); if (table == null) return null; String sql = "select link from "+table+" as link where " + "link.parent.id = :parentID and link.child.id = :childID"; IQuery service = getIQueryService(); Parameters param = new Parameters(); param.addLong("parentID", parent.getId()); param.addLong("childID", child.getId()); return service.findByQuery(sql, param); } catch (Exception e) { handleException(e, "Cannot retrieve the requested link for "+ "parent ID: "+parent.getId()+" and child ID: "+child.getId()); } return null; }
|
IObject findLink(IObject parent, IObject child) throws DSOutOfServiceException, DSAccessException { try { String table = getTableForLink(parent.getClass()); if (table == null) return null; String sql = "select link from "+table+" as link where " + "link.parent.id = :parentID and link.child.id = :childID"; IQuery service = getIQueryService(); Parameters param = new Parameters(); param.addLong("parentID", parent.getId()); param.addLong("childID", child.getId()); return service.findByQuery(sql, param); } catch (Exception e) { handleException(e, "Cannot retrieve the requested link for "+ "parent ID: "+parent.getId()+" and child " + "ID: "+child.getId()); } return null; }
| 3,235,582
|
List findLinks(IObject parent, List children) throws DSOutOfServiceException, DSAccessException { try { String table = getTableForLink(parent.getClass()); if (table == null) return null; String sql = "select link from "+table+" as link where " + "link.parent.id = :parentID and link.child.id in " + "(:childIDs)"; IQuery service = getIQueryService(); Parameters param = new Parameters(); param.addLong("parentID", parent.getId()); param.addList("childIDs", children); return service.findAllByQuery(sql, param); } catch (Exception e) { handleException(e, "Cannot retrieve the requested link for "+ "parent ID: "+parent.getId()); } return null; }
|
List findLinks(IObject parent, List children) throws DSOutOfServiceException, DSAccessException { try { String table = getTableForLink(parent.getClass()); if (table == null) return null; String sql = "select link from "+table+" as link where " + "link.parent.id = :parentID and link.child.id in " + "(:childIDs)"; IQuery service = getIQueryService(); Parameters param = new Parameters(); param.addLong("parentID", parent.getId()); param.addList("childIDs", children); return service.findAllByQuery(sql, param); } catch (Exception e) { handleException(e, "Cannot retrieve the requested link for "+ "parent ID: "+parent.getId()); } return null; }
| 3,235,583
|
private ExperimenterData getUserDetails(String name) throws DSOutOfServiceException { try { IPojos service = getIPojosService(); Set set = new HashSet(1); set.add(name); Map m = PojoMapper.asDataObjects(service.getUserDetails(set, (new PojoOptions()).map())); ExperimenterData data = (ExperimenterData) m.get(name); if (data == null) { throw new DSOutOfServiceException("Cannot retrieve user's " + "data"); } return data; } catch (Exception e) { e.printStackTrace(); throw new DSOutOfServiceException("Cannot retrieve user's " + "data", e); } }
|
private ExperimenterData getUserDetails(String name) throws DSOutOfServiceException { try { IPojos service = getIPojosService(); Set set = new HashSet(1); set.add(name); Map m = PojoMapper.asDataObjects(service.getUserDetails(set, (new PojoOptions()).map())); ExperimenterData data = (ExperimenterData) m.get(name); if (data == null) { throw new DSOutOfServiceException("Cannot retrieve user's " + "data"); } return data; } catch (Exception e) { throw new DSOutOfServiceException("Cannot retrieve user's " + "data", e); } }
| 3,235,584
|
private void checkRoomsForTimeout() { int delay = 60000; // delay for 5 sec. int period = 30000; // repeat every sec. Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { for (ChatRoom chatRoom : getChatContainer().getStaleChatRooms()) { // Turn tab gray int index = getChatContainer().indexOfComponent(chatRoom); SparkTab tab = getChatContainer().getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); Font oldFont = titleLabel.getFont(); Font newFont = new Font(oldFont.getFontName(), Font.BOLD, oldFont.getSize()); titleLabel.setFont(newFont); titleLabel.setForeground(Color.gray); titleLabel.validate(); titleLabel.repaint(); } } }, delay, period); }
|
private void checkRoomsForTimeout() { int delay = 60000; // delay for 5 sec. int period = 30000; // repeat every sec. Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { for (ChatRoom chatRoom : getChatContainer().getStaleChatRooms()) { // Turn tab gray int index = getChatContainer().indexOfComponent(chatRoom); SparkTab tab = getChatContainer().getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); Font oldFont = titleLabel.getFont(); Font newFont = new Font(oldFont.getFontName(), Font.BOLD, oldFont.getSize()); titleLabel.setFont(newFont); titleLabel.setForeground(Color.gray); titleLabel.validate(); titleLabel.repaint(); } } }, delay, period); }
| 3,235,585
|
public void testSaveSimpleObject() throws Exception { Pixels p = ObjectFactory.createPixelGraph(null); p = (Pixels) iUpdate.saveAndReturnObject(p); flush(); List logs = CurrentDetails.getCreationEvent().collectFromLogs(null); assertTrue(logs.size() > 0); Pixels check = (Pixels) iQuery.queryUnique( "select p from Pixels p " + " left outer join fetch p.acquisitionContext " + " left outer join fetch p.channels " + " where p.id = ?",new Object[]{p.getId()}); assertTrue("channel ids differ",equalCollections(p.getChannels(),check.getChannels())); assertTrue("acq ctx differ", p.getAcquisitionContext().getId().equals( check.getAcquisitionContext().getId())); }
|
public void testSaveSimpleObject() throws Exception { Pixels p = ObjectFactory.createPixelGraph(null); p = (Pixels) iUpdate.saveAndReturnObject(p); flush(); List logs = CurrentDetails.getCreationEvent().collectLogs(null); assertTrue(logs.size() > 0); Pixels check = (Pixels) iQuery.queryUnique( "select p from Pixels p " + " left outer join fetch p.acquisitionContext " + " left outer join fetch p.channels " + " where p.id = ?",new Object[]{p.getId()}); assertTrue("channel ids differ",equalCollections(p.getChannels(),check.getChannels())); assertTrue("acq ctx differ", p.getAcquisitionContext().getId().equals( check.getAcquisitionContext().getId())); }
| 3,235,586
|
public void actionPerformed(ActionEvent e) { ChatRoom chatRoom = (ChatRoom)getComponentInTab(tab); if (chatRoom != null) { for (ChatRoom cRoom : getChatRooms()) { if (chatRoom != cRoom) { closeTab(cRoom); } } } }
|
public void actionPerformed(ActionEvent e) { ChatRoom chatRoom = (ChatRoom)getComponentInTab(tab); if (chatRoom != null) { for (ChatRoom cRoom : getChatRooms()) { if (chatRoom != cRoom) { closeTab(cRoom); } } } }
| 3,235,589
|
public void actionPerformed(ActionEvent e) { for (ChatRoom rooms : getStaleChatRooms()) { closeTab(rooms); } }
|
public void actionPerformed(ActionEvent e) { for (ChatRoom rooms : getStaleChatRooms()) { closeTab(rooms); } }
| 3,235,591
|
public void run() { final Iterator iter = new HashSet(chatRoomListeners).iterator(); while (iter.hasNext()) { ((ChatRoomListener)iter.next()).userHasLeft(room, userid); } }
|
public void run() { final Iterator iter = new HashSet(chatRoomListeners).iterator(); while (iter.hasNext()) { ((ChatRoomListener)iter.next()).userHasJoined(room, userid); } }
| 3,235,592
|
public void run() { try { final int index = indexOfComponent(room); if (index != -1) { room.increaseUnreadMessageCount(); int unreadMessageCount = room.getUnreadMessageCount(); String appendedMessage = ""; if (unreadMessageCount > 1) { appendedMessage = " (" + unreadMessageCount + ")"; } SparkTab tab = getTabAt(index); tab.getTitleLabel().setText(room.getTabTitle() + appendedMessage); // Check notifications. if (room instanceof ChatRoomImpl) { checkNotificationPreferences(room); } makeTabRed(room); } boolean invokeFlash = SettingsManager.getLocalPreferences().isChatRoomNotificationsOn() || !(room instanceof GroupChatRoom); if (!chatFrame.isFocused() && invokeFlash) { SparkManager.getAlertManager().flashWindow(chatFrame); } } catch (Exception ex) { Log.error("Issue in ChatRooms with tab location.", ex); } }
|
public void run() { try { final int index = indexOfComponent(room); if (index != -1) { room.increaseUnreadMessageCount(); int unreadMessageCount = room.getUnreadMessageCount(); String appendedMessage = ""; if (unreadMessageCount > 1) { appendedMessage = " (" + unreadMessageCount + ")"; } SparkTab tab = getTabAt(index); tab.getTitleLabel().setText(room.getTabTitle() + appendedMessage); // Check notifications. if (room instanceof ChatRoomImpl) { checkNotificationPreferences(room); } makeTabRed(room); } boolean invokeFlash = SettingsManager.getLocalPreferences().isChatRoomNotificationsOn() || !(room instanceof GroupChatRoom); if (!chatFrame.isFocused() && invokeFlash) { SparkManager.getAlertManager().flashWindow(chatFrame); } } catch (Exception ex) { Log.error("Issue in ChatRooms with tab location.", ex); } }
| 3,235,594
|
public void run() { try { int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); useTabDefault(room); tab.getTitleLabel().setText(room.getTabTitle()); room.clearUnreadMessageCount(); } } catch (Exception ex) { Log.error("Could not stop flashing for " + room + " because " + ex.getMessage(), ex); } SparkManager.getAlertManager().stopFlashing(chatFrame); }
|
public void run() { try { int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); useTabDefault(room); tab.getTitleLabel().setText(room.getTabTitle()); room.clearUnreadMessageCount(); } } catch (Exception ex) { Log.error("Could not stop flashing for " + room + " because " + ex.getMessage(), ex); } SparkManager.getAlertManager().stopFlashing(chatFrame); }
| 3,235,595
|
public void run() { try { int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); useTabDefault(room); tab.getTitleLabel().setText(room.getTabTitle()); room.clearUnreadMessageCount(); } } catch (Exception ex) { Log.error("Could not stop flashing for " + room + " because " + ex.getMessage(), ex); } SparkManager.getAlertManager().stopFlashing(chatFrame); }
|
public void run() { try { int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); useTabDefault(room); tab.getTitleLabel().setText(room.getTabTitle()); room.clearUnreadMessageCount(); } } catch (Exception ex) { Log.error("Issue in ChatRooms with tab location.", ex); } SparkManager.getAlertManager().stopFlashing(chatFrame); }
| 3,235,596
|
public void run() { try { int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); useTabDefault(room); tab.getTitleLabel().setText(room.getTabTitle()); room.clearUnreadMessageCount(); } } catch (Exception ex) { Log.error("Could not stop flashing for " + room + " because " + ex.getMessage(), ex); } SparkManager.getAlertManager().stopFlashing(chatFrame); }
|
public void run() { try { int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); useTabDefault(room); tab.getTitleLabel().setText(room.getTabTitle()); room.clearUnreadMessageCount(); } } catch (Exception ex) { Log.error("Could not stop flashing for " + room + " because " + ex.getMessage(), ex); } }
| 3,235,597
|
static public Object parseQuotedString(ParseTool in) throws ParseException, IOException { int quoteChar = in.getChar(); boolean isMacro = false; if ((quoteChar != '\'') && (quoteChar != '\"')) { return null; // undefined quote char } StringBuffer str = new StringBuffer(96); QuotedStringBuilder qString = new QuotedStringBuilder(); int c = in.nextChar(); while ((c != quoteChar) && (c != in.EOF)) { if (c == '$') { Object child = parseVariable(in); // may return a string c = in.getChar(); if (child instanceof String) { str.append(child); } else { qString.addElement(str.toString()); qString.addElement(child); str.setLength(0); } } else { str.append((char) c); c = in.nextChar(); } } if (str.length() != 0) { qString.addElement(str.toString()); } str = null; if (c == quoteChar) { in.nextChar(); } else { throw new ParseException(in, "Expected closing quote: " + (char) quoteChar); } if ((qString.size() == 1) && !(qString.elementAt(0) instanceof Builder)) { // XXX: #use directive fails without this, because it needs to // access target and source during the parse phase, before the // build has been completed. return qString.elementAt(0); } else { return qString; } }
|
static public Object parseQuotedString(ParseTool in) throws ParseException, IOException { int quoteChar = in.getChar(); boolean isMacro = false; if ((quoteChar != '\'') && (quoteChar != '\"')) { return null; // undefined quote char } StringBuffer str = new StringBuffer(96); QuotedStringBuilder qString = new QuotedStringBuilder(); int c = in.nextChar(); while ((c != quoteChar) && (c != in.EOF)) { if ((c == '$') && !in.isEscaped()) { Object child = parseVariable(in); // may return a string c = in.getChar(); if (child instanceof String) { str.append(child); } else { qString.addElement(str.toString()); qString.addElement(child); str.setLength(0); } } else { str.append((char) c); c = in.nextChar(); } } if (str.length() != 0) { qString.addElement(str.toString()); } str = null; if (c == quoteChar) { in.nextChar(); } else { throw new ParseException(in, "Expected closing quote: " + (char) quoteChar); } if ((qString.size() == 1) && !(qString.elementAt(0) instanceof Builder)) { // XXX: #use directive fails without this, because it needs to // access target and source during the parse phase, before the // build has been completed. return qString.elementAt(0); } else { return qString; } }
| 3,235,599
|
ParseTool(String name, Reader inputStream) { _escaped = false; _name = name; LineNumberReader in = new LineNumberReader(inputStream); _cur = _last = _len = _pos = EOF; _buf = ""; // must be non-null or we will abort before we start _in = in; for (int i = 0; i < MAX_MARKS; i++) { _marks[i] = new Mark(); } read(); // get it started (read the extra newline) }
|
ParseTool(String name, Reader inputStream) { _escaped = false; _name = name; LineNumberReader in = new LineNumberReader(inputStream); _cur = _last = _len = _pos = EOF; _buf = ""; // must be non-null or we will abort before we start _in = in; for (int i = 0; i < MAX_MARKS; i++) { _marks[i] = new Mark(); } read(); // get it started (read the extra newline) }
| 3,235,600
|
public final void parseUntil(StringBuffer buf, String marker) throws ParseException { if (marker == null) { return; } if (marker.length() < 1) { return; } char start = marker.charAt(0); int mark = DUMMY_MARK; buf.setLength(0); LOOKING: while(_cur != EOF) { if (_cur == start) { mark = mark(); try { for (int i = 0; i < marker.length(); i++) { if (_cur != marker.charAt(i)) { rewind(mark); buf.append((char) _cur); read(); continue LOOKING; } read(); } buf.append(marker); return; } finally { clearMark(mark); } } buf.append((char) _cur); read(); } clearMark(mark); throw new ParseException(this,"Expected " + marker + " but reached end of file"); }
|
public final void parseUntil(StringBuffer buf, String marker) throws ParseException { if (marker == null) { return; } if (marker.length() < 1) { return; } char start = marker.charAt(0); int mark = DUMMY_MARK; buf.setLength(0); LOOKING: while(_cur != EOF) { if (_cur == start) { mark = mark(); try { for (int i = 0; i < marker.length(); i++) { if (_cur != marker.charAt(i)) { rewind(mark); buf.append((char) _cur); read(); continue LOOKING; } read(); } buf.append(marker); return; } finally { clearMark(mark); } } buf.append((char) _cur); read(); } clearMark(mark); throw new ParseException(this,"Expected " + marker + " but reached end of file"); }
| 3,235,601
|
public final void parseUntil(StringBuffer buf, String marker) throws ParseException { if (marker == null) { return; } if (marker.length() < 1) { return; } char start = marker.charAt(0); int mark = DUMMY_MARK; buf.setLength(0); LOOKING: while(_cur != EOF) { if (_cur == start) { mark = mark(); try { for (int i = 0; i < marker.length(); i++) { if (_cur != marker.charAt(i)) { rewind(mark); buf.append((char) _cur); read(); continue LOOKING; } read(); } buf.append(marker); return; } finally { clearMark(mark); } } buf.append((char) _cur); read(); } clearMark(mark); throw new ParseException(this,"Expected " + marker + " but reached end of file"); }
|
public final void parseUntil(StringBuffer buf, String marker) throws ParseException { if (marker == null) { return; } if (marker.length() < 1) { return; } char start = marker.charAt(0); int mark = DUMMY_MARK; buf.setLength(0); LOOKING: while(_cur != EOF) { if (_cur == start) { mark = mark(); try { for (int i = 0; i < marker.length(); i++) { if (_cur != marker.charAt(i)) { rewind(mark); buf.append((char) _cur); read(); continue LOOKING; } read(); } buf.append(marker); return; } finally { clearMark(mark); } } buf.append((char) _cur); read(); } clearMark(mark); throw new ParseException(this,"Expected " + marker + " but reached end of file"); }
| 3,235,602
|
public final void parseUntil(StringBuffer buf, String marker) throws ParseException { if (marker == null) { return; } if (marker.length() < 1) { return; } char start = marker.charAt(0); int mark = DUMMY_MARK; buf.setLength(0); LOOKING: while(_cur != EOF) { if (_cur == start) { mark = mark(); try { for (int i = 0; i < marker.length(); i++) { if (_cur != marker.charAt(i)) { rewind(mark); buf.append((char) _cur); read(); continue LOOKING; } read(); } buf.append(marker); return; } finally { clearMark(mark); } } buf.append((char) _cur); read(); } clearMark(mark); throw new ParseException(this,"Expected " + marker + " but reached end of file"); }
|
public final void parseUntil(StringBuffer buf, String marker) throws ParseException { if (marker == null) { return; } if (marker.length() < 1) { return; } char start = marker.charAt(0); int mark = DUMMY_MARK; buf.setLength(0); LOOKING: while(_cur != EOF) { if (_cur == start) { mark = mark(); try { for (int i = 0; i < marker.length(); i++) { if (_cur != marker.charAt(i)) { rewind(mark); buf.append((char) _cur); read(); continue LOOKING; } read(); } buf.append(marker); return; } finally { clearMark(mark); } } buf.append((char) _cur); read(); } clearMark(mark); throw new ParseException(this,"Expected " + marker + " but reached end of file"); }
| 3,235,603
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.