rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
return new InternalReplace(parentClassName, interfaceNames, mi); | return new InternalReplace( parentClassName, (String[]) interfaceNames.toArray(new String[interfaceNames.size()]), mi ); | public static Object writeReplace(Object enhanced) throws ObjectStreamException { MethodInterceptor mi = Enhancer.getMethodInterceptor(enhanced); String parentClassName = enhanced.getClass().getSuperclass().getName(); Class interfaces[] = enhanced.getClass().getInterfaces(); ... |
throw new GLException(message); | runExit(); | private void checkExtension(GL gl, String extensionName) { if (!gl.isExtensionAvailable(extensionName)) { String message = "Unable to initialize " + extensionName + " OpenGL extension"; JOptionPane.showMessageDialog(null, message, "Unavailable extension", JOptionPane.ERROR_MESSAGE); throw new GLE... |
if ((k == (char) 27) || (k == 'q')) { quit = true; return; } | private void dispatchKey(char k) { setFlag(k, !getFlag(k)); if ((k == (char) 27) || (k == 'q')) { quit = true; return; } switch (k) { case 27: case 'q': quit = true; break; case 'w': water.enableWireframe(getFlag('w')); break; ... | |
quit = true; | runExit(); | private void dispatchKey(char k) { setFlag(k, !getFlag(k)); if ((k == (char) 27) || (k == 'q')) { quit = true; return; } switch (k) { case 27: case 'q': quit = true; break; case 'w': water.enableWireframe(getFlag('w')); break; ... |
if (water == null) { return; } if (quit) { return; } | public void display(GLDrawable drawable) { if (water == null) { return; } if (quit) { return; } if (!firstRender) { if (++frameCount == 30) { timer.stop(); System.err.println("Frames per second: " + (30.0f / timer.getDurationAsSeconds())); timer.rese... | |
if (drawing) { canvas.getSize(dim); water.addDroplet(new Water.Droplet( 2 * (mousePosX / (float) dim.width - 0.5f), -2 * (mousePosY / (float) dim.height - 0.5f), 0.08f)); } water.tick(); | public void display(GLDrawable drawable) { if (water == null) { return; } if (quit) { return; } if (!firstRender) { if (++frameCount == 30) { timer.stop(); System.err.println("Frames per second: " + (30.0f / timer.getDurationAsSeconds())); timer.rese... | |
quit = true; | public void init(GLDrawable drawable) { GL gl = drawable.getGL(); try { checkExtension(gl, "GL_ARB_multitexture"); checkExtension(gl, "GL_NV_vertex_program"); checkExtension(gl, "GL_NV_texture_shader"); checkExtension(gl, "GL_NV_register_combiners"); checkExtension(gl, "GL_ARB_pbuffer"); checkExtension(gl... | |
quit = true; | runExit(); | public void run(String[] args) { canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas.addGLEventListener(new Listener()); canvas.setNoAutoRedrawMode(true); Frame frame = new Frame("Procedural Texture Waves"); frame.setLayout(new BorderLayout()); canvas.setSize(512, 51... |
try { water = new Water(); water.initialize("demos/data/images/nvfixed.tga", "demos/data/images/nvspin.tga", "demos/data/images/droplet.tga", "demos/data/cubemaps/CloudyHills_{0}.tga", canvas); } catch (GLException e) { JOptionPane.showMessageDialog(null, e.toString(), "Unavailable extension", JOptionPane.ERROR_MESSAGE... | water = new Water(); water.initialize("demos/data/images/nvfixed.tga", "demos/data/images/nvspin.tga", "demos/data/images/droplet.tga", "demos/data/cubemaps/CloudyHills_{0}.tga", canvas); animator.start(); | public void run(String[] args) { canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas.addGLEventListener(new Listener()); canvas.setNoAutoRedrawMode(true); Frame frame = new Frame("Procedural Texture Waves"); frame.setLayout(new BorderLayout()); canvas.setSize(512, 51... |
+ (parentPopUpStringForAll() == null ? pickerName + ".parentChanged();" : "") | + (parentPopUpStringForAll() == null ? pickerName + ".parentChanged("+childToSelect+");" : "") | public String hiddenFormElementStrings() { StringBuffer returnString; returnString = new StringBuffer(500); returnString.append("\n<script language=\"JavaScript\">"); returnString.append("\nvar " + pickerName +" = new ERXJSPopupRelationshipPicker(" + objectsArrayName + "," ... |
public PopulateDb(String assemblyIdPrefix, String exptId, String trialId) | public PopulateDb(String assemblyType, String exptId, String trialId) | public PopulateDb(String assemblyIdPrefix, String exptId, String trialId) throws SQLException, IOException { dbp = DBProperties.readQueryFile(DATABASE, QUERY_FILE); dbp.setDebug(true); String database = dbp.getProperty("database"); String username = dbp.getProperty("username");... |
setAssemblyId(assemblyIdPrefix, exptId, trialId); | setAssemblyId(assemblyType, exptId, trialId); | public PopulateDb(String assemblyIdPrefix, String exptId, String trialId) throws SQLException, IOException { dbp = DBProperties.readQueryFile(DATABASE, QUERY_FILE); dbp.setDebug(true); String database = dbp.getProperty("database"); String username = dbp.getProperty("username");... |
substitutions.put(":assembly_type", assemblyType); | private void setAssemblyId(String assemblyIdPrefix, String exptId, String trialId) throws SQLException { substitutions.put(":assembly_id_pattern", assemblyIdPrefix + "____"); DecimalFormat assemblyIdFormat = new DecimalFormat(assemblyIdPrefix + "0000"); ResultSet rs = ... | |
NSTimestamp.IntRef days=new NSTimestamp.IntRef(); now.gregorianUnitsSinceTimestamp( null, null, days, null, null, null, dateFromQueryMin); int d=days.value; | int d = (int)ERXTimestampUtility.differenceByDay(now, dateFromQueryMin); | public Object date() { int found=0; NSTimestamp dateFromQueryMin=(NSTimestamp)displayGroup.queryMin().valueForKey(key); if (dateFromQueryMin!=null) { NSTimestamp now=new NSTimestamp(); NSTimestamp.IntRef days=new NSTimestamp.IntRef(); now.gregorianUnitsSinceTime... |
_actionUrl = context.componentActionURL(); | _actionUrl = AjaxUtils.ajaxComponentActionUrl(context); | public void appendToResponse(WOResponse response, WOContext context) { _actionUrl = context.componentActionURL(); if (hasBinding("id")) { _id = (String) valueForBinding("id"); } else { _id = safeElementID(); } _sortOrderKeyName = safeElementID(); super.appendToResponse(response, context... |
DynamicElementsPatches.cleanupXHTML = ERXValueUtilities.booleanValueWithDefault(System.getProperty("er.extensions.ERXPatcher.cleanupXHTML"), false); | public static synchronized void installPatches() { ERXPatcher.setClassForName(DynamicElementsPatches.SubmitButton.class, "WOSubmitButton"); ERXPatcher.setClassForName(DynamicElementsPatches.ResetButton.class, "WOResetButton"); ERXPatcher.setClassForName(DynamicElementsPatches.TextField.class, "... | |
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.generic"); | createLogger(); | public CSMARTFrame(String title, CSMARTGraph graph) { super(title); log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.generic"); // this.title = Util.getNamedFrame().addFrame(title, this); // guarantee unique name, this may change title NamedFrame.getNamedFrame().addFrame(title, this); ... |
log = CSMART.createLogger(this.getClass().getName()); this.component = component; job = PrinterJob.getPrinterJob(); if (job == null) { if(log.isErrorEnabled()) { log.error("Couldn't find a printer!"); } } else { java.awt.Toolkit tk = java.awt.Toolkit.getDefaultToolkit(); scale = 72.0/tk.getScreenResolution(); job.setJo... | log = CSMART.createLogger(this.getClass().getName()); this.component = component; job = PrinterJob.getPrinterJob(); if (job == null) { if(log.isErrorEnabled()) { log.error("Couldn't find a printer!"); } } else { java.awt.Toolkit tk = java.awt.Toolkit.getDefaultToolkit(); scale = 72.0/tk.getScreenResolution(); job.setJo... | public ComponentPrinter(JComponent component, String jobName) { log = CSMART.createLogger(this.getClass().getName()); this.component = component; job = PrinterJob.getPrinterJob(); if (job == null) { if(log.isErrorEnabled()) { log.error("Couldn't find a printer!"); } } else { java.awt.... |
} | public ComponentPrinter(JComponent component, String jobName) { log = CSMART.createLogger(this.getClass().getName()); this.component = component; job = PrinterJob.getPrinterJob(); if (job == null) { if(log.isErrorEnabled()) { log.error("Couldn't find a printer!"); } } else { java.awt.... | |
if (job == null) return; try { job.print(); } catch (PrinterException e) { if(log.isErrorEnabled()) { log.error("Print job failed: ", e); } } | if (job == null) return; try { job.print(); } catch (PrinterException e) { if(log.isErrorEnabled()) { log.error("Print job failed: ", e); } | public void printPages() { if (job == null) return; try { job.print(); } catch (PrinterException e) { if(log.isErrorEnabled()) { log.error("Print job failed: ", e); } } } |
} | public void printPages() { if (job == null) return; try { job.print(); } catch (PrinterException e) { if(log.isErrorEnabled()) { log.error("Print job failed: ", e); } } } | |
else if (is_suffix && c == syms.getPercent()) | else if (c == syms.getPercent()) | private final int scanFix (String pattern, int index, StringBuffer buf, String patChars, DecimalFormatSymbols syms, boolean is_suffix) { int len = pattern.length(); buf.setLength(0); boolean multiplierSet = false; while (index < len) { char c = pattern.charAt(index); if (c == '\'' && i... |
else if (is_suffix && c == syms.getPerMill()) | else if (c == syms.getPerMill()) | private final int scanFix (String pattern, int index, StringBuffer buf, String patChars, DecimalFormatSymbols syms, boolean is_suffix) { int len = pattern.length(); buf.setLength(0); boolean multiplierSet = false; while (index < len) { char c = pattern.charAt(index); if (c == '\'' && i... |
if (wavail > 0) | if (wavail <= 0) | public int read(char buf[], int offset, int length) throws IOException { synchronized (lock) { if (in == null) throw new IOException("Stream closed"); int wavail = wcount - wpos; if (wavail > 0) { if (length > wavail) length = wavail; System.arraycopy(work, wpos, buf, offset, length); w... |
if (length > wavail) length = wavail; System.arraycopy(work, wpos, buf, offset, length); wpos += length; return length; | if (! refill ()) return -1; wavail = wcount - wpos; | public int read(char buf[], int offset, int length) throws IOException { synchronized (lock) { if (in == null) throw new IOException("Stream closed"); int wavail = wcount - wpos; if (wavail > 0) { if (length > wavail) length = wavail; System.arraycopy(work, wpos, buf, offset, length); w... |
else { if (length == 0) return 0; for (;;) { in.mark(1); int b = in.read(); if (b < 0) return -1; in.reset(); converter.setInput(in.buf, in.pos, in.count); int count = converter.read (buf, offset, length); in.skip(converter.inpos - in.pos); if (count > 0) return count; } } | if (length > wavail) length = wavail; System.arraycopy(work, wpos, buf, offset, length); wpos += length; return length; | public int read(char buf[], int offset, int length) throws IOException { synchronized (lock) { if (in == null) throw new IOException("Stream closed"); int wavail = wcount - wpos; if (wavail > 0) { if (length > wavail) length = wavail; System.arraycopy(work, wpos, buf, offset, length); w... |
if (work == null) { work = new char[100]; wpos = 0; wcount = 0; } for (;;) { if (in.available() <= 0) return false; in.mark(1); int b = in.read(); if (b < 0) return true; in.reset(); converter.setInput(in.buf, in.pos, in.count); wpos = 0; wcount = converter.read(work, 0, work.length); in.skip(converter.inpos - in.pos);... | return in.available () > 0; | public boolean ready() throws IOException { synchronized (lock) { if (in == null) throw new IOException("Stream closed"); if (wpos < wcount) return true; if (work == null) { work = new char[100]; wpos = 0; wcount = 0; } for (;;) { if (in.available() <= 0) return false; in.... |
System.out.println("Before"); filter.Update(); System.out.println("After"); | public static void main( String argv[] ) { System.out.println("VoronoiSegmentationImageFilter Example"); itkImageFileReaderUC2_Pointer readerInput = itkImageFileReaderUC2.itkImageFileReaderUC2_New(); itkImageFileReaderUC2_Pointer readerPrior = itkImageFileReaderUC2.itkImageFileReaderUC2_New(... | |
NSMutableDictionary options = AjaxOption.createAjaxOptionsDictionary(ajaxOptionsArray, component); | NSMutableDictionary options = AjaxOption.createAjaxOptionsDictionary(ajaxOptionsArray, component, associations()); | public NSDictionary createAjaxOptions(WOComponent component) { NSMutableArray ajaxOptionsArray = new NSMutableArray(); ajaxOptionsArray.addObject(new AjaxOption("frequency", AjaxOption.NUMBER)); ajaxOptionsArray.addObject(new AjaxOption("decay", AjaxOption.NUMBER)); ajaxOptionsArray.addO... |
String name = sc.getSocietyName(); String newName = societyNames.generateName(name); if (!newName.equals(name)) sc.setName(newName); | protected void addSociety(SocietyComponent sc) { String name = sc.getSocietyName(); String newName = societyNames.generateName(name); if (!newName.equals(name)) sc.setName(newName); // add society as sibling of experiment DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode)(getSelect... | |
String newName = generateExperimentName(experiment.getExperimentName()); | String newName = generateExperimentName(experiment.getExperimentName(), false); if (newName == null) return null; | protected Experiment copyExperiment(Experiment experiment) { String newName = generateExperimentName(experiment.getExperimentName()); final Experiment experimentCopy = (Experiment)experiment.copy(newName); // save copy in database GUIUtils.timeConsumingTaskStart(organizer); try { new Thread("Dupli... |
String newName = generateRecipeName(recipe.getRecipeName()); | String newName = generateRecipeName(recipe.getRecipeName(), false); if (newName == null) return null; | protected RecipeComponent copyRecipe(RecipeComponent recipe) { String newName = generateRecipeName(recipe.getRecipeName()); final RecipeComponent recipeCopy = (RecipeComponent)recipe.copy(newName); GUIUtils.timeConsumingTaskStart(organizer); try { new Thread("DuplicateRecipe") { public void ru... |
String newName = generateSocietyName(society.getSocietyName()); | String newName = generateSocietyName(society.getSocietyName(), false); if (newName == null) return null; | protected SocietyComponent copySociety(SocietyComponent society) { String newName = generateSocietyName(society.getSocietyName()); final SocietyComponent societyCopy = (SocietyComponent)society.copy(newName); // save society copy GUIUtils.timeConsumingTaskStart(organizer); try { new Thread("... |
String name = "Experiment for " + society.getSocietyName(); return new Experiment(experimentNames.generateName(name), | String name = generateExperimentName("Experiment for " + society.getSocietyName(), false); if (name == null) return null; return new Experiment(name, | private Experiment createExperiment(SocietyComponent society) { String name = "Experiment for " + society.getSocietyName(); return new Experiment(experimentNames.generateName(name), society, new RecipeComponent[0]); } |
protected String generateRecipeName(String name) { return recipeNames.generateName(name); | protected String generateRecipeName(String name, boolean allowExistingName) { return recipeNames.generateUniqueName(name, allowExistingName); | protected String generateRecipeName(String name) { return recipeNames.generateName(name); } |
protected String getUniqueExperimentName(String originalName, boolean allowExistingName) { return experimentNames.getUniqueName("Experiment", originalName, allowExistingName, "isExperimentNameInDatabase"); | public String getUniqueExperimentName(String originalName, boolean allowExistingName) { return experimentNames.getUniqueName(originalName, allowExistingName); | protected String getUniqueExperimentName(String originalName, boolean allowExistingName) { return experimentNames.getUniqueName("Experiment", originalName, allowExistingName, "isExperimentNameInDatabase"); } |
return folderNames.getUniqueName("Folder", originalName, allowExistingName, null); | return folderNames.getUniqueName(originalName, allowExistingName); | private String getUniqueFolderName(String originalName, boolean allowExistingName) { return folderNames.getUniqueName("Folder", originalName, allowExistingName, null); } |
return recipeNames.getUniqueName("Recipe", originalName, allowExistingName, "isRecipeNameInDatabase"); | return recipeNames.getUniqueName(originalName, allowExistingName); | protected String getUniqueRecipeName(String originalName, boolean allowExistingName) { return recipeNames.getUniqueName("Recipe", originalName, allowExistingName, "isRecipeNameInDatabase"); } |
return societyNames.getUniqueName("Society", originalName, allowExistingName, "isSocietyNameInDatabase"); | return societyNames.getUniqueName(originalName, allowExistingName); | protected String getUniqueSocietyName(String originalName, boolean allowExistingName) { return societyNames.getUniqueName("Society", originalName, allowExistingName, "isSocietyNameInDatabase"); } |
protected boolean isUniqueSocietyName(String originalName) { return societyNames.isUniqueName(originalName, "isSocietyNameInDatabase"); | protected boolean isUniqueSocietyName(String name) { return societyNames.isUniqueName(name); | protected boolean isUniqueSocietyName(String originalName) { return societyNames.isUniqueName(originalName, "isSocietyNameInDatabase"); } |
String name = recipeNames.generateName(item.name); while (true) { name = (String) JOptionPane.showInputDialog(this, "Enter Recipe Name", "Name Recipe", JOptionPane.QUESTION_MESSAGE, null, null, name); if (name == null) return; if (!recipeNames.contains(name)) break; int ok = JOptionPane.showConfirmDialog(this, "Use an ... | String name = generateRecipeName(item.name, false); if (name == null) return; | protected void newRecipe() { Object[] values = recipeNameClassItems; Object answer = JOptionPane.showInputDialog(this, "Select Recipe Type", "Select Recipe", JOptionPane.QUESTION_MESSAGE, null, values, "Empty Recipe"); if (answer instanceof NameClassItem) { NameClassItem it... |
experimentName = getUniqueExperimentName(experimentNames.generateName(experimentName), false); | experimentName = generateExperimentName(experimentName, false); | protected void selectExperimentFromDatabase() { boolean haveCMTAssembly = false; Map experimentNamesMap = ExperimentDB.getExperimentNames(); Set keys = experimentNamesMap.keySet(); JComboBox cb = new JComboBox(keys.toArray(new String[keys.size()])); cb.setEditable(false); JPanel panel = new JPanel()... |
recipeName = getUniqueRecipeName(recipeNames.generateName(recipeName), false); | recipeName = generateRecipeName(recipeName, false); | protected void selectRecipeFromDatabase() { Map recipeNamesHT = helper.getRecipeNamesFromDatabase(); Set dbRecipeNames = recipeNamesHT.keySet(); if (dbRecipeNames.isEmpty()) { JOptionPane.showMessageDialog(this, "There are no recipes in the database", ... |
addExperimentToWorkspace(experiment, | if (experiment == null) return; addExperimentAndComponentsToWorkspace(experiment, | protected void startConsole() { DefaultMutableTreeNode node = getSelectedNode(); Object o = node.getUserObject(); Experiment experiment = null; if (o instanceof SocietyComponent) { experiment = createExperiment((SocietyComponent)o); addExperimentToWorkspace(experiment, (D... |
addExperimentAndComponentsToWorkspace(experiment, | if (experiment != null) addExperimentAndComponentsToWorkspace(experiment, | protected void startExperimentBuilder() { Experiment experiment = null; DefaultMutableTreeNode node = getSelectedNode(); Object o = node.getUserObject(); if (o instanceof SocietyComponent) { experiment = createExperiment((SocietyComponent)o); addExperimentAndComponentsToWorkspace(experiment, ... |
GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); | GLCanvas canvas = new GLCanvas(); | public static void main(String[] args) { Frame frame = new Frame("HandleBox Test"); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); frame.setLayout(new BorderLayout()); GLCanvas canvas = GLDrawableFactory.getFa... |
private static final ResourceBundle partialGetBundle (String baseName, Locale locale) | partialGetBundle (String baseName, Locale locale, boolean langStop) | private static final ResourceBundle partialGetBundle (String baseName, Locale locale) { ResourceBundle rb; String bundleName = (baseName + "_" + locale.getLanguage() + "_" + locale.getCountry() + "_" + locale.getVariant()); String stopHere = (baseName + "_" + loca... |
String bundleName = (baseName + "_" + locale.getLanguage() + "_" + locale.getCountry() + "_" + locale.getVariant()); | String bundleName = baseName + "_" + locale; Object obj = resource_cache.get(bundleName); if (obj != null) return (ResourceBundle) obj; | private static final ResourceBundle partialGetBundle (String baseName, Locale locale) { ResourceBundle rb; String bundleName = (baseName + "_" + locale.getLanguage() + "_" + locale.getCountry() + "_" + locale.getVariant()); String stopHere = (baseName + "_" + loca... |
+ "_" + locale.getLanguage()); | + (langStop ? ("_" + locale.getLanguage()) : "")); | private static final ResourceBundle partialGetBundle (String baseName, Locale locale) { ResourceBundle rb; String bundleName = (baseName + "_" + locale.getLanguage() + "_" + locale.getCountry() + "_" + locale.getVariant()); String stopHere = (baseName + "_" + loca... |
if (rb != null) resource_cache.put(bundleName, rb); | private static final ResourceBundle partialGetBundle (String baseName, Locale locale) { ResourceBundle rb; String bundleName = (baseName + "_" + locale.getLanguage() + "_" + locale.getCountry() + "_" + locale.getVariant()); String stopHere = (baseName + "_" + loca... | |
return (ResourceBundle) rbc.newInstance(); | r = (ResourceBundle) rbc.newInstance(); | private static final ResourceBundle trySomeGetBundle (String bundleName, String stopHere) { Class rbc; while (true) { try { rbc = Class.forName(bundleName); try { return (ResourceBundle) rbc.newInstance(); } catch (IllegalAccessException ex) { // Fall through } ... |
return null; | if (r != null) { if (result == null) result = r; if (needs_parent != null) { needs_parent.setParent(r); } needs_parent = r; } | private static final ResourceBundle trySomeGetBundle (String bundleName, String stopHere) { Class rbc; while (true) { try { rbc = Class.forName(bundleName); try { return (ResourceBundle) rbc.newInstance(); } catch (IllegalAccessException ex) { // Fall through } ... |
if (bundleName.compareTo(stopHere) == 0) return null; else { int last = bundleName.lastIndexOf('_'); | } if (bundleName.equals(stopHere)) return result; else { int last = bundleName.lastIndexOf('_'); | private static final ResourceBundle trySomeGetBundle (String bundleName, String stopHere) { Class rbc; while (true) { try { rbc = Class.forName(bundleName); try { return (ResourceBundle) rbc.newInstance(); } catch (IllegalAccessException ex) { // Fall through } ... |
if (last == -1) return null; bundleName = bundleName.substring(0, last); } | if (last == -1) return result; bundleName = bundleName.substring(0, last); | private static final ResourceBundle trySomeGetBundle (String bundleName, String stopHere) { Class rbc; while (true) { try { rbc = Class.forName(bundleName); try { return (ResourceBundle) rbc.newInstance(); } catch (IllegalAccessException ex) { // Fall through } ... |
populateAgent(data, isAdded); | populateAgent(data, true); | private boolean populate(ComponentData data, float insertionOrder, String assemblyId) throws SQLException { boolean result = false; ComponentData parent = data.getParent(); String id = getComponentAlibId(data); boolean isAdded = false; addComponentDataSubstitutions(data); substitutions.put(":ass... |
substitutions.put(":attribute_type:", sqlQuote((propSubtype == null) ? "String" : propSubtype)); | if(propSubtype == null && log.isWarnEnabled()) { log.warn("PropSubtype is NULL for: " + propName + "(type)" + propType); } | private void setPropertyInfo(String pgName, String propName, String propType, String propSubtype) throws SQLException { if(log.isDebugEnabled()) { log.debug("setPropertyInfo("+pgName+", "+propName+", "+ propType+", "+propSubtype+")"); } Statement stmt = dbCon... |
log.debug("att_lib: " + substitutions.get(":attribute_lib_id:")); log.debug("pg_name: " + substitutions.get(":pg_name:")); log.debug("att_name: " + substitutions.get(":attribute_name:")); log.debug("att_type: " + substitutions.get(":attribute_type:")); log.debug("agg_type: " + substitutions.get(":aggregate_type:")); | log.debug("attribute_type: " + substitutions.get(":attribute_type:")); | private void setPropertyInfo(String pgName, String propName, String propType, String propSubtype) throws SQLException { if(log.isDebugEnabled()) { log.debug("setPropertyInfo("+pgName+", "+propName+", "+ propType+", "+propSubtype+")"); } Statement stmt = dbCon... |
m_manager.put(Selector.ROLE+"Selector",actionSelector); | m_manager.put(Action.ROLE+"Selector",actionSelector); | public void build(final Configuration configuration) throws ConfigurationException { // components final Configuration components = configuration.getChild("components"); // mount final Configuration[] mountChildren = configuration.getChildren("mount"); m_mountNodes = new MountNode... |
clearArtifactAttempts(); | protected void clearIvyAttempts() { _ivyattempts.clear(); } | |
Message.verbose("dependency "+dd+" has changed: deleting old artifacts"); | Message.verbose(dd+" has changed: deleting old artifacts"); | public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data) throws ParseException { clearIvyAttempts(); boolean downloaded = false; boolean searched = false; Date cachedPublicationDate = null; ModuleRevisionId mrid = dd.getDependencyRevisionId(); // ... |
Message.verbose("dependency "+dd+" is changing, but has not changed: will trust cached artifacts if any"); | Message.verbose(dd+" is changing, but has not changed: will trust cached artifacts if any"); | public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data) throws ParseException { clearIvyAttempts(); boolean downloaded = false; boolean searched = false; Date cachedPublicationDate = null; ModuleRevisionId mrid = dd.getDependencyRevisionId(); // ... |
public VfsResource(String vfsURI, FileSystemManager fsManager) { | public VfsResource(String vfsURI, FileSystemManager fsManager) throws IOException { | public VfsResource(String vfsURI, FileSystemManager fsManager) { _isAvailable = false; _resourceImpl = null; try { _resourceImpl = fsManager.resolveFile(vfsURI); _content = _resourceImpl.getContent(); _isAvailable = _content != null; } catch (FileSystemException e) { Message.verbose(e.getLo... |
_content = _resourceImpl.getContent(); | } catch (FileSystemException e) { Message.verbose(e.getLocalizedMessage()); throw new IOException(e.getLocalizedMessage()); } try { _content = _resourceImpl.getContent(); | public VfsResource(String vfsURI, FileSystemManager fsManager) { _isAvailable = false; _resourceImpl = null; try { _resourceImpl = fsManager.resolveFile(vfsURI); _content = _resourceImpl.getContent(); _isAvailable = _content != null; } catch (FileSystemException e) { Message.verbose(e.getLo... |
return new VfsResource(cloneName, _resourceImpl.getFileSystem().getFileSystemManager()); | try { return new VfsResource(cloneName, _resourceImpl.getFileSystem().getFileSystemManager()); } catch (IOException e) { throw new RuntimeException(e); } | public Resource clone(String cloneName) { return new VfsResource(cloneName, _resourceImpl.getFileSystem().getFileSystemManager()); } |
System.out.println("Normalizing: " + vfsURI); | private String normalize(String vfsURI) { if (vfsURI.startsWith("file:////")) { System.out.println("Normalizing: " + vfsURI); vfsURI = vfsURI.replaceFirst("////", "///"); System.out.println("Normalized to: " + vfsURI); } return vfsURI; } | |
System.out.println("Normalized to: " + vfsURI); | private String normalize(String vfsURI) { if (vfsURI.startsWith("file:////")) { System.out.println("Normalizing: " + vfsURI); vfsURI = vfsURI.replaceFirst("////", "///"); System.out.println("Normalized to: " + vfsURI); } return vfsURI; } | |
Field suid = cl.getDeclaredField("serialVersionUID"); suid.setAccessible(true); | final Field suid = cl.getDeclaredField("serialVersionUID"); AccessController.doPrivileged(new PrivilegedAction() { public Object run() { suid.setAccessible(true); return null; } }); | private long getClassUID(Class cl) { try { // Use getDeclaredField rather than getField, since serialVersionUID // may not be public AND we only want the serialVersionUID of this // class, not a superclass or interface. Field suid = cl.getDeclaredField("serialVersionUID"); suid.setAccessible(true); int modif... |
cacheMethods(); | void setClass(Class cl, ObjectStreamClass superClass) throws InvalidClassException { this.clazz = cl; long class_uid = getClassUID(cl); if (uid == 0) uid = class_uid; else { // Check that the actual UID of the resolved class matches the UID from // the stream. if (uid != class_uid) { ... | |
Field serialPersistentFields = | final Field serialPersistentFields = | private void setFields(Class cl) { if (!isSerializable() || isExternalizable()) { fields = NO_FIELDS; return; } try { Field serialPersistentFields = cl.getDeclaredField("serialPersistentFields"); serialPersistentFields.setAccessible(true); int modifiers = serialPersistentFields.getModifiers();... |
serialPersistentFields.setAccessible(true); | AccessController.doPrivileged(new PrivilegedAction() { public Object run() { serialPersistentFields.setAccessible(true); return null; } }); | private void setFields(Class cl) { if (!isSerializable() || isExternalizable()) { fields = NO_FIELDS; return; } try { Field serialPersistentFields = cl.getDeclaredField("serialPersistentFields"); serialPersistentFields.setAccessible(true); int modifiers = serialPersistentFields.getModifiers();... |
Field f = all_fields[from]; fields[to] = new ObjectStreamField(f.getName(), f.getType()); | final Field f = all_fields[from]; AccessController.doPrivileged(new PrivilegedAction() { public Object run() { f.setAccessible(true); return null; } }); fields[to] = new ObjectStreamField(all_fields[from]); | private void setFields(Class cl) { if (!isSerializable() || isExternalizable()) { fields = NO_FIELDS; return; } try { Field serialPersistentFields = cl.getDeclaredField("serialPersistentFields"); serialPersistentFields.setAccessible(true); int modifiers = serialPersistentFields.getModifiers();... |
for (int i = 1; i < fields.length; i++) { if(fields[i - 1].getName().equals(fields[i].getName())) throw new InternalError("Duplicate field " + fields[i].getName() + " in class " + cl.getName()); } | private void setFields(Class cl) { if (!isSerializable() || isExternalizable()) { fields = NO_FIELDS; return; } try { Field serialPersistentFields = cl.getDeclaredField("serialPersistentFields"); serialPersistentFields.setAccessible(true); int modifiers = serialPersistentFields.getModifiers();... | |
double result = bb.getDouble ((position () >> 3) + offset); | double result = bb.getDouble ((position () << 3) + offset); | public double get () { double result = bb.getDouble ((position () >> 3) + offset); position (position () + 1); return result; } |
bb.putDouble ((position () >> 3) + offset, value); | bb.putDouble ((position () << 3) + offset, value); position (position () + 1); | public DoubleBuffer put (double value) { bb.putDouble ((position () >> 3) + offset, value); return this; } |
log("Loading " + url, Project.MSG_VERBOSE); | Message.verbose("Loading " + url); | private void loadDefaultProperties() { Property prop = new Property() { public void execute() throws BuildException { URL url = Ivy.class.getResource("ivy.properties"); // this is copy of loadURL code from ant Property task (not available in 1.5.1) Pro... |
log("Loading " + url, Project.MSG_VERBOSE); | Message.verbose("Loading " + url); | public void execute() throws BuildException { URL url = Ivy.class.getResource("ivy.properties"); // this is copy of loadURL code from ant Property task (not available in 1.5.1) Properties props = new Properties(); log("Loading " + url, Project.MSG... |
Message.init(new AntMessageImpl(getProject())); | Message.init(new AntMessageImpl(this)); | protected void ensureMessageInitialised() { if (!Message.isInitialised()) { Message.init(new AntMessageImpl(getProject())); getProject().addBuildListener(new BuildListener() { public void buildFinished(BuildEvent event) { Message.uninit(); ... |
Message.uninit(); | protected void ensureMessageInitialised() { if (!Message.isInitialised()) { Message.init(new AntMessageImpl(getProject())); getProject().addBuildListener(new BuildListener() { public void buildFinished(BuildEvent event) { Message.uninit(); ... | |
return _impl; | return IvyContext.getContext().getMessageImpl(); | public static MessageImpl getImpl() { return _impl; } |
_impl = impl; | IvyContext.getContext().setMessageImpl(impl); | public static void setImpl(MessageImpl impl) { _impl = impl; } |
int off = 0; int openParenOffset, tmpMonth; while ((openParenOffset = string.indexOf('(', off)) >= 0) | int parenNesting = 0; int len = string.length(); for (int i = 0; i < len; i++) | public static long parse(String string) { // Initialize date/time fields before parsing begins. int year = -1; int month = -1; int day = -1; int hour = -1; int minute = -1; int second = -1; int timezone = 0; boolean localTimezone = true; // Trim out any nested stuff in parentheses now t... |
buf.append(string.substring(off, openParenOffset)); off = skipParens(string, openParenOffset); | char ch = string.charAt(i); if (ch >= 'a' && ch <= 'z') ch -= 'a' - 'A'; if (ch == '(') parenNesting++; else if (parenNesting == 0) buf.append(ch); else if (ch == ')') parenNesting--; | public static long parse(String string) { // Initialize date/time fields before parsing begins. int year = -1; int month = -1; int day = -1; int hour = -1; int minute = -1; int second = -1; int timezone = 0; boolean localTimezone = true; // Trim out any nested stuff in parentheses now t... |
buf.append(string.substring(off)); | int tmpMonth; | public static long parse(String string) { // Initialize date/time fields before parsing begins. int year = -1; int month = -1; int day = -1; int hour = -1; int minute = -1; int second = -1; int timezone = 0; boolean localTimezone = true; // Trim out any nested stuff in parentheses now t... |
StringTokenizer strtok = new StringTokenizer(buf.toString().toUpperCase(), " \t\n\r,"); | StringTokenizer strtok = new StringTokenizer(buf.toString(), " \t\n\r,"); | public static long parse(String string) { // Initialize date/time fields before parsing begins. int year = -1; int month = -1; int day = -1; int hour = -1; int minute = -1; int second = -1; int timezone = 0; boolean localTimezone = true; // Trim out any nested stuff in parentheses now t... |
int colon = tok.indexOf(':'); int slash = tok.indexOf('/'); int hyphen = tok.indexOf('-'); int punctOffset = tok.length(); if (colon >= 0) punctOffset = Math.min(punctOffset, colon); if (slash >= 0) punctOffset = Math.min(punctOffset, slash); if (hyphen >= 0) punctOffset = Math.min(punctOffset, hyphen); if (punctOf... | int punctOffset = tok.length(); int num = 0; int punct; for (int i = 0; ; i++) { if (i >= punctOffset) { punct = -1; break; } else { punct = tok.charAt(i); if (punct >= '0' && punct <= '9') { if (num > 999999999) throw new IllegalArgumentException(tok); num = 10 * num + (punct - '0'); } else { punctOffset = i; break;... | public static long parse(String string) { // Initialize date/time fields before parsing begins. int year = -1; int month = -1; int day = -1; int hour = -1; int minute = -1; int second = -1; int timezone = 0; boolean localTimezone = true; // Trim out any nested stuff in parentheses now t... |
else if (punctOffset > 0 && punctOffset == slash) | else if ((num >= 70 && (punct == ' ' || punct == ',' || punct == '/' || punct < 0)) || (num < 70 && day >= 0 && month >= 0 && year < 0)) { if (num >= 100) year = num; else { int curYear = 1900 + new Date().getYear(); int firstYear = curYear - 80; year = firstYear / 100 * 100 + num; int yx = year; if (year < firstYear) ... | public static long parse(String string) { // Initialize date/time fields before parsing begins. int year = -1; int month = -1; int day = -1; int hour = -1; int minute = -1; int second = -1; int timezone = 0; boolean localTimezone = true; // Trim out any nested stuff in parentheses now t... |
if (punctOffset < 0 || punctOffset + 1 >= tok.length()) | if (punct < 0 || punctOffset + 1 >= tok.length()) | public static long parse(String string) { // Initialize date/time fields before parsing begins. int year = -1; int month = -1; int day = -1; int hour = -1; int minute = -1; int second = -1; int timezone = 0; boolean localTimezone = true; // Trim out any nested stuff in parentheses now t... |
if (hour < 0) hour = 0; | public static long parse(String string) { // Initialize date/time fields before parsing begins. int year = -1; int month = -1; int day = -1; int hour = -1; int minute = -1; int second = -1; int timezone = 0; boolean localTimezone = true; // Trim out any nested stuff in parentheses now t... | |
if (year < 0 || month < 0 || day < 0 || hour < 0) | if (year < 0 || month < 0 || day < 0) | public static long parse(String string) { // Initialize date/time fields before parsing begins. int year = -1; int month = -1; int day = -1; int hour = -1; int minute = -1; int second = -1; int timezone = 0; boolean localTimezone = true; // Trim out any nested stuff in parentheses now t... |
return UTC(year, month, day, hour, minute, second) + (localTimezone ? new Date(year, month, day).getTimezoneOffset() * 60 * 1000: -timezone * 60 * 1000); | GregorianCalendar cal = new GregorianCalendar(year, month, day, hour, minute, second); if (!localTimezone) { cal.set(Calendar.ZONE_OFFSET, timezone * 60 * 1000); cal.set(Calendar.DST_OFFSET, 0); } return cal.getTimeInMillis(); | public static long parse(String string) { // Initialize date/time fields before parsing begins. int year = -1; int month = -1; int day = -1; int hour = -1; int minute = -1; int second = -1; int timezone = 0; boolean localTimezone = true; // Trim out any nested stuff in parentheses now t... |
ResolverTestHelper.assertOrganisationEntries(resolver, new String[] {"org1", "org2", "org6", "org9"}, orgs); | ResolverTestHelper.assertOrganisationEntries(resolver, new String[] {"org1", "org2", "org6", "org9", "orgfailure"}, orgs); | public void testListing() throws Exception { FileSystemResolver resolver = new FileSystemResolver(); resolver.setName("test"); resolver.setIvy(_ivy); assertEquals("test", resolver.getName()); resolver.addIvyPattern(IVY_PATTERN); resolver.addArtifactPattern("test/rep... |
NSNotificationCenter.defaultCenter().postNotification(new NSNotification(ApplicationDidCreateNotification, this)); | public ERXApplication() { super(); if (allFrameworks.size() > 0) { throw new RuntimeException("ERXExtensions have not been initialized. Please report the classpath and the rest of the bundles to the Wonder mailing list: " + "\nRemaining" + allFrameworks + "\n" + System.getProperty("java.clas... | |
runExit(); | quit = true; | public void init(GLDrawable drawable) { GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); float cc = 1.0f; gl.glClearColor(cc, cc, cc, 1); gl.glColor3f(1,1,1); gl.glEnable(GL.GL_DEPTH_TEST); try { initExtension(gl, "GL_ARB_vertex_program"); initExtension(gl, "GL... |
while (tokenizer.hasMoreTokens() && currentLength < l) { | while (tokenizer.hasMoreTokens() && currentLength < l && currentLength < value.length()) { | public String strippedValue() { String value=(String)valueForBinding("value"); StringTokenizer tokenizer = new StringTokenizer(value, "<", false); int token = value.charAt(0) == '<' ? 0 : 1; String nextPart = null; StringBuffer result = new StringBuffer(); int l=length(); ... |
public int getSoTimeout () throws SocketException | public synchronized int getSoTimeout () throws SocketException | public int getSoTimeout () throws SocketException { throw new InternalError("ServerSocket.getSoTimeout not implemented"); } |
throw new InternalError("ServerSocket.getSoTimeout not implemented"); | Object timeout = impl.getOption(SocketOptions.SO_TIMEOUT); if (timeout instanceof Integer) return ((Integer)timeout).intValue(); else return 0; | public int getSoTimeout () throws SocketException { throw new InternalError("ServerSocket.getSoTimeout not implemented"); } |
public void setSoTimeout (int timeout) throws SocketException | public synchronized void setSoTimeout (int timeout) throws SocketException | public void setSoTimeout (int timeout) throws SocketException { throw new InternalError("ServerSocket.setSoTimeout not implemented"); } |
throw new InternalError("ServerSocket.setSoTimeout not implemented"); | if (timeout < 0) throw new IllegalArgumentException("Invalid timeout: " + timeout); impl.setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout)); | public void setSoTimeout (int timeout) throws SocketException { throw new InternalError("ServerSocket.setSoTimeout not implemented"); } |
public static void setSocketFactory (SocketImplFactory fac) | public static synchronized void setSocketFactory (SocketImplFactory fac) | public static void setSocketFactory (SocketImplFactory fac) throws IOException { factory = fac; } |
return impl.toString(); | return "ServerSocket" + impl.toString(); | public String toString () { return impl.toString(); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.