rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
String u = (String) cmbMaltUnitsModel.getSelectedItem(); int i = maltTable.getSelectedRow(); | String u = (String) cmbHopsUnitsModel.getSelectedItem(); int i = hopsTable.getSelectedRow(); | public void actionPerformed(ActionEvent evt) { String u = (String) cmbMaltUnitsModel.getSelectedItem(); int i = maltTable.getSelectedRow(); if (myRecipe != null && i != -1) { Fermentable f2 = myRecipe.getFermentable(i); if (f2 != null){ // this converts the cost and amount: f2.convert... |
Fermentable f2 = myRecipe.getFermentable(i); if (f2 != null){ f2.convertTo(u); myRecipe.calcMaltTotals(); displayRecipe(); } | Hop h = myRecipe.getHop(i); h.convertTo(u); myRecipe.calcHopsTotals(); displayRecipe(); | public void actionPerformed(ActionEvent evt) { String u = (String) cmbMaltUnitsModel.getSelectedItem(); int i = maltTable.getSelectedRow(); if (myRecipe != null && i != -1) { Fermentable f2 = myRecipe.getFermentable(i); if (f2 != null){ // this converts the cost and amount: f2.convert... |
myRecipe.setPostBoil(Double.parseDouble(postBoilText.getText() .toString())); | String q = (String) cmbSizeUnits.getSelectedItem(); if (myRecipe != null && q != myRecipe.getVolUnits()) { myRecipe.setVolUnits(q); | public void actionPerformed(ActionEvent evt) { myRecipe.setPostBoil(Double.parseDouble(postBoilText.getText() .toString())); displayRecipe(); } |
displayRecipe(); | displayRecipe(); } | public void actionPerformed(ActionEvent evt) { myRecipe.setPostBoil(Double.parseDouble(postBoilText.getText() .toString())); displayRecipe(); } |
Yeast y = (Yeast) cmbYeastModel.getSelectedItem(); if (myRecipe != null && y != myRecipe.getYeastObj()) { myRecipe.setYeast(y); } String st = SBStringUtils.multiLineToolTip(40, y .getDescription()); cmbYeast.setToolTipText(st); | recipeSettingsActionPerformed(evt); | public void actionPerformed(ActionEvent evt) { Yeast y = (Yeast) cmbYeastModel.getSelectedItem(); if (myRecipe != null && y != myRecipe.getYeastObj()) { myRecipe.setYeast(y); } String st = SBStringUtils.multiLineToolTip(40, y .getDescription()); cmbYeast.setToolTipText(st); } |
String q = (String) cmbSizeUnits.getSelectedItem(); if (myRecipe != null && q != myRecipe.getVolUnits()) { myRecipe.setVolUnits(q); displayRecipe(); } | recipeSettingsActionPerformed(evt); | public void actionPerformed(ActionEvent evt) { String q = (String) cmbSizeUnits.getSelectedItem(); if (myRecipe != null && q != myRecipe.getVolUnits()) { // also sets postboil units: myRecipe.setVolUnits(q); displayRecipe(); } } |
txtPreBoil.setValue(new Double(myRecipe.getPreBoilVol(myRecipe.getVolUnits()))); | preBoilText.setValue(new Double(myRecipe.getPreBoilVol(myRecipe.getVolUnits()))); | public void displayRecipe() { if (myRecipe == null) return; txtName.setText(myRecipe.getName()); brewerNameText.setText(myRecipe.getBrewer()); txtPreBoil.setValue(new Double(myRecipe.getPreBoilVol(myRecipe.getVolUnits()))); lblSizeUnits.setText(myRecipe.getVolUnits()); postBoilText.setValue(new Double(myRecipe... |
dilutionPanel.displayDilution(); | public void displayRecipe() { if (myRecipe == null) return; txtName.setText(myRecipe.getName()); brewerNameText.setText(myRecipe.getBrewer()); txtPreBoil.setValue(new Double(myRecipe.getPreBoilVol(myRecipe.getVolUnits()))); lblSizeUnits.setText(myRecipe.getVolUnits()); postBoilText.setValue(new Double(myRecipe... | |
txtPreBoil = new JFormattedTextField(); pnlDetails.add(txtPreBoil, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0, | preBoilText = new JFormattedTextField(); pnlDetails.add(preBoilText, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0, | private void initGUI() { try { // restore the saved size and location: this.setSize(preferences.getIProperty("winWidth"), preferences.getIProperty("winHeight")); this.setLocation(preferences.getIProperty("winX"), preferences.getIProperty("winY")); imgURL = getClass().getClassLoader().getResource("ca... |
txtPreBoil.setText("Pre Boil"); txtPreBoil.setPreferredSize(new java.awt.Dimension(37, 20)); | preBoilText.setText("Pre Boil"); preBoilText.setPreferredSize(new java.awt.Dimension(37, 20)); | private void initGUI() { try { // restore the saved size and location: this.setSize(preferences.getIProperty("winWidth"), preferences.getIProperty("winHeight")); this.setLocation(preferences.getIProperty("winX"), preferences.getIProperty("winY")); imgURL = getClass().getClassLoader().getResource("ca... |
System.out.println("jButton2.actionPerformed, event=" + evt); | FindDialog fd = new FindDialog(owner); fd.setModal(true); fd.setVisible(true); | private void initGUI() { try { // restore the saved size and location: this.setSize(preferences.getIProperty("winWidth"), preferences.getIProperty("winHeight")); this.setLocation(preferences.getIProperty("winX"), preferences.getIProperty("winY")); imgURL = getClass().getClassLoader().getResource("ca... |
saveAsHTML(file, "ca/strangebrew/data/recipeToHtml.xslt", null); | saveAsHTML(file, "recipeToHtml.xslt", null); | private void initGUI() { try { // restore the saved size and location: this.setSize(preferences.getIProperty("winWidth"), preferences.getIProperty("winHeight")); this.setLocation(preferences.getIProperty("winX"), preferences.getIProperty("winY")); imgURL = getClass().getClassLoader().getResource("ca... |
myRecipe.setEfficiency(Double.parseDouble(spnEffic.getValue() | myRecipe.setEstOg(Double.parseDouble(spnOG.getValue() | public void stateChanged(ChangeEvent evt) { myRecipe.setEfficiency(Double.parseDouble(spnEffic.getValue() .toString())); displayRecipe(); } |
myRecipe.setAttenuation(Double.parseDouble(spnAtten.getValue() | myRecipe.setEstFg(Double.parseDouble(spnFG.getValue() | public void stateChanged(ChangeEvent evt) { myRecipe.setAttenuation(Double.parseDouble(spnAtten.getValue() .toString())); displayRecipe(); } |
System.out.println("jButton2.actionPerformed, event=" + evt); | String u = (String) maltTotalUnitsComboModel.getSelectedItem(); if (myRecipe != null) { myRecipe.setMaltUnits(u); displayRecipe(); } | public void actionPerformed(ActionEvent evt) { System.out.println("jButton2.actionPerformed, event=" + evt); //TODO add your code for jButton2.actionPerformed } |
String u = (String) maltTotalUnitsComboModel.getSelectedItem(); if (myRecipe != null) { myRecipe.setMaltUnits(u); displayRecipe(); | if (myRecipe != null) { int i = maltTable.getSelectedRow(); myRecipe.delMalt(i); maltTable.updateUI(); displayRecipe(); } | public void actionPerformed(ActionEvent evt) { String u = (String) maltTotalUnitsComboModel.getSelectedItem(); if (myRecipe != null) { myRecipe.setMaltUnits(u); displayRecipe(); } } |
} | public void actionPerformed(ActionEvent evt) { String u = (String) maltTotalUnitsComboModel.getSelectedItem(); if (myRecipe != null) { myRecipe.setMaltUnits(u); displayRecipe(); } } | |
if (myRecipe != null) { Fermentable f = new Fermentable(myRecipe.getMaltUnits()); myRecipe.addMalt(f); maltTable.updateUI(); displayRecipe(); } | String u = (String) hopsTotalUnitsComboModel.getSelectedItem(); if (myRecipe != null) { myRecipe.setHopsUnits(u); displayRecipe(); | public void actionPerformed(ActionEvent evt) { if (myRecipe != null) { Fermentable f = new Fermentable(myRecipe.getMaltUnits()); myRecipe.addMalt(f); maltTable.updateUI(); displayRecipe(); } } |
String u = (String) hopsTotalUnitsComboModel.getSelectedItem(); if (myRecipe != null) { myRecipe.setHopsUnits(u); displayRecipe(); | if (myRecipe != null) { Hop h = new Hop(myRecipe.getHopUnits()); myRecipe.addHop(h); hopsTable.updateUI(); displayRecipe(); } | public void actionPerformed(ActionEvent evt) { String u = (String) hopsTotalUnitsComboModel.getSelectedItem(); if (myRecipe != null) { myRecipe.setHopsUnits(u); displayRecipe(); } } |
if (myRecipe != null) { Hop h = new Hop(myRecipe.getHopUnits()); myRecipe.addHop(h); hopsTable.updateUI(); displayRecipe(); | myRecipe = new Recipe(); myRecipe.setVersion(version); currentFile = null; attachRecipeData(); displayRecipe(); | public void actionPerformed(ActionEvent evt) { if (myRecipe != null) { Hop h = new Hop(myRecipe.getHopUnits()); myRecipe.addHop(h); hopsTable.updateUI(); displayRecipe(); } } |
} } | } | public void actionPerformed(ActionEvent evt) { if (myRecipe != null) { Hop h = new Hop(myRecipe.getHopUnits()); myRecipe.addHop(h); hopsTable.updateUI(); displayRecipe(); } } |
if (myRecipe != null) { int i = hopsTable.getSelectedRow(); myRecipe.delHop(i); hopsTable.updateUI(); displayRecipe(); } | String[] ext = {"xml", "qbrew", "rec"}; String desc = "StrangBrew and importable formats"; sbFileFilter openFileFilter = new sbFileFilter(ext, desc); fileChooser.setFileFilter(openFileFilter); int returnVal = fileChooser.showOpenDialog(jMenuBar1); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fileCho... | public void actionPerformed(ActionEvent evt) { if (myRecipe != null) { int i = hopsTable.getSelectedRow(); myRecipe.delHop(i); hopsTable.updateUI(); displayRecipe(); } } |
if (oi.getFileType().equals("beerxml")){ JOptionPane.showMessageDialog( null, "The file you've opened is in BeerXML format. It may contain \n" + "several recipes. Only the first recipe is opened. Use the Find \n" + "dialog to open other recipes in a BeerXML file.", "BeerXML!", JOptionPane.INFORMATION_MESSAGE); } my... | public void actionPerformed(ActionEvent evt) { if (myRecipe != null) { int i = hopsTable.getSelectedRow(); myRecipe.delHop(i); hopsTable.updateUI(); displayRecipe(); } } | |
myRecipe = new Recipe(); myRecipe.setVersion(version); currentFile = null; attachRecipeData(); displayRecipe(); | FindDialog fd = new FindDialog(owner); fd.setModal(true); fd.setVisible(true); | public void actionPerformed(ActionEvent evt) { // This is just a test right now to see that // stuff is changed. myRecipe = new Recipe(); myRecipe.setVersion(version); currentFile = null; attachRecipeData(); displayRecipe(); } |
String[] ext = {"xml", "qbrew", "rec"}; String desc = "StrangBrew and importable formats"; sbFileFilter openFileFilter = new sbFileFilter(ext, desc); fileChooser.setFileFilter(openFileFilter); int returnVal = fileChooser.showOpenDialog(jMenuBar1); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fileCho... | saveFile(evt); | public void actionPerformed(ActionEvent evt) { // Show open dialog; this method does // not return until the dialog is closed String[] ext = {"xml", "qbrew", "rec"}; String desc = "StrangBrew and importable formats"; sbFileFilter openFileFilter = new sbFileFilter(ext, desc); ... |
} | public void actionPerformed(ActionEvent evt) { // Show open dialog; this method does // not return until the dialog is closed String[] ext = {"xml", "qbrew", "rec"}; String desc = "StrangBrew and importable formats"; sbFileFilter openFileFilter = new sbFileFilter(ext, desc); ... | |
FindDialog fd = new FindDialog(owner); fd.setVisible(true); | saveAs(); | public void actionPerformed(ActionEvent evt) { // open the find dialog FindDialog fd = new FindDialog(owner); fd.setVisible(true); } |
saveFile(evt); | String[] ext = {"html", "htm"}; sbFileFilter saveFileFilter = new sbFileFilter(ext, "HTML"); fileChooser.setFileFilter(saveFileFilter); fileChooser.setSelectedFile(new File(myRecipe.getName() + ".html")); int returnVal = fileChooser.showSaveDialog(jMenuBar1); if (returnVal == JFileChooser.APPROVE_OPTION) { File file =... | public void actionPerformed(ActionEvent evt) { saveFile(evt); } |
saveAs(); } | String[] ext = {"txt"}; sbFileFilter saveFileFilter = new sbFileFilter(ext, "Text"); fileChooser.setFileFilter(saveFileFilter); fileChooser.setSelectedFile(new File(myRecipe.getName() + ".txt")); int returnVal = fileChooser.showSaveDialog(jMenuBar1); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fileChoos... | public void actionPerformed(ActionEvent evt) { saveAs(); } |
String[] ext = {"html", "htm"}; sbFileFilter saveFileFilter = new sbFileFilter(ext, "HTML"); fileChooser.setFileFilter(saveFileFilter); fileChooser.setSelectedFile(new File(myRecipe.getName() + ".html")); int returnVal = fileChooser.showSaveDialog(jMenuBar1); if (returnVal == JFileChooser.APPROVE_OPTION) { File file =... | Clipboard clipboard = getToolkit ().getSystemClipboard (); StringSelection s = new StringSelection(myRecipe.toText()); clipboard.setContents(s, s); } | public void actionPerformed(ActionEvent evt) { // Show save dialog; this method does // not return until the dialog is closed String[] ext = {"html", "htm"}; sbFileFilter saveFileFilter = new sbFileFilter(ext, "HTML"); fileChooser.setFileFilter(saveFileFilter); f... |
String[] ext = {"txt"}; sbFileFilter saveFileFilter = new sbFileFilter(ext, "Text"); fileChooser.setFileFilter(saveFileFilter); fileChooser.setSelectedFile(new File(myRecipe.getName() + ".txt")); int returnVal = fileChooser.showSaveDialog(jMenuBar1); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fileChoos... | PrintDialog pd = new PrintDialog(owner); pd.setModal(true); pd.setVisible(true); } | public void actionPerformed(ActionEvent evt) { // Show save dialog; this method does // not return until the dialog is closed String[] ext = {"txt"}; sbFileFilter saveFileFilter = new sbFileFilter(ext, "Text"); fileChooser.setFileFilter(saveFileFilter); fileChoose... |
Clipboard clipboard = getToolkit ().getSystemClipboard (); StringSelection s = new StringSelection(myRecipe.toText()); clipboard.setContents(s, s); | processWindowEvent(new WindowEvent(owner,WindowEvent.WINDOW_CLOSING)); System.exit(0); | public void actionPerformed(ActionEvent evt) { // Copy current recipe to clipboard Clipboard clipboard = getToolkit ().getSystemClipboard (); StringSelection s = new StringSelection(myRecipe.toText()); clipboard.setContents(s, s); } |
PrintDialog pd = new PrintDialog(owner); pd.setModal(true); pd.setVisible(true); | PreferencesDialog d = new PreferencesDialog(owner, preferences); d.setVisible(true); | public void actionPerformed(ActionEvent evt) { PrintDialog pd = new PrintDialog(owner); pd.setModal(true); pd.setVisible(true); } |
processWindowEvent(new WindowEvent(owner,WindowEvent.WINDOW_CLOSING)); System.exit(0); | ScaleRecipeDialog scaleRecipe = new ScaleRecipeDialog(owner); scaleRecipe.setModal(true); scaleRecipe.setVisible(true); | public void actionPerformed(ActionEvent evt) { // exit program processWindowEvent(new WindowEvent(owner,WindowEvent.WINDOW_CLOSING)); System.exit(0); } |
PreferencesDialog d = new PreferencesDialog(owner, preferences); d.setVisible(true); | MaltPercentDialog maltPercent = new MaltPercentDialog(owner); maltPercent.setModal(true); maltPercent.setVisible(true); | public void actionPerformed(ActionEvent evt) { PreferencesDialog d = new PreferencesDialog(owner, preferences); d.setVisible(true); } |
ScaleRecipeDialog scaleRecipe = new ScaleRecipeDialog(owner); scaleRecipe.setModal(true); scaleRecipe.setVisible(true); | String urlString = "file: Debug.print(urlString); AbstractLogger logger = new SystemLogger(); BrowserLauncher launcher; try { launcher = new BrowserLauncher(logger); BrowserLauncherRunner runner = new BrowserLauncherRunner( launcher, urlString, null); Thread launcherThread = new Thread(runner); launcherThread.start(); ... | public void actionPerformed(ActionEvent evt) { ScaleRecipeDialog scaleRecipe = new ScaleRecipeDialog(owner); scaleRecipe.setModal(true); scaleRecipe.setVisible(true); } |
URL xsltUrl = getClass().getClassLoader().getResource(xslt); File xsltFile = new File(xsltUrl.getFile()); | String path = appRoot + slash + "src" + slash + "ca" + slash + "strangebrew" + slash + "data" + slash; File xsltFile = new File(path + xslt); | public void saveAsHTML(File f, String xslt, String options) throws Exception { // save file as xml, then transform it to html File tmp = new File("tmp.xml"); FileWriter out = new FileWriter(tmp); out.write(myRecipe.toXML(options)); out.close(); // find the xslt stylesheet in the classpath URL xsltUrl = getCla... |
for (String name : chartGen.getTestNames()) { testCaseNames.put( name.replace('/','_'), name ); } | TrendReport(Project project, String configName, HudsonChartGenerator chartGen) { this.project = project; this.configName = configName; this.chartGen = chartGen; } | |
public TestCaseGraph getTestCaseGraph(String name) { return new TestCaseGraph(this,name); | public TestCaseGraph getTestCaseGraph(String safeName) { return new TestCaseGraph(this,testCaseNames.get(safeName)); | public TestCaseGraph getTestCaseGraph(String name) { return new TestCaseGraph(this,name); } |
public Collection<String> getTestCaseNames() throws IOException { return chartGen.getTestNames(); | public Map<String,String> getTestCaseNames() throws IOException { return testCaseNames; | public Collection<String> getTestCaseNames() throws IOException { return chartGen.getTestNames(); } |
if(slaves==null) slaves = new ArrayList<Slave>(); | public Hudson(File root, ServletContext context) throws IOException { this.root = root; if(theInstance!=null) throw new IllegalStateException("second instance"); theInstance = this; // load plugins. pluginManager = new PluginManager(context); load(); updat... | |
slaves.clear(); | List<Slave> newSlaves = new ArrayList<Slave>(); | public synchronized void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { try { if(!Hudson.adminCheck(req,rsp)) return; req.setCharacterEncoding("UTF-8"); useSecurity = req.getParameter("use_security")!=null; ... |
slaves.add(new Slave(names[i],descriptions[i],cmds[i],rfs[i],new File(lfs[i]),n, Mode.valueOf(mode[i]))); | newSlaves.add(new Slave(names[i],descriptions[i],cmds[i],rfs[i],new File(lfs[i]),n, Mode.valueOf(mode[i]))); | public synchronized void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { try { if(!Hudson.adminCheck(req,rsp)) return; req.setCharacterEncoding("UTF-8"); useSecurity = req.getParameter("use_security")!=null; ... |
this.slaves = newSlaves; | public synchronized void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { try { if(!Hudson.adminCheck(req,rsp)) return; req.setCharacterEncoding("UTF-8"); useSecurity = req.getParameter("use_security")!=null; ... | |
public synchronized List<Slave> getSlaves() { if(slaves ==null) slaves = new ArrayList<Slave>(); return new ArrayList<Slave>(slaves); | public List<Slave> getSlaves() { return Collections.unmodifiableList(slaves); | public synchronized List<Slave> getSlaves() { if(slaves ==null) slaves = new ArrayList<Slave>(); return new ArrayList<Slave>(slaves); } |
public StreamTaskListener(OutputStream out) { this(new PrintStream(out)); | public StreamTaskListener(PrintStream out) { this.out = out; | public StreamTaskListener(OutputStream out) { this(new PrintStream(out)); } |
.booleanValue() ); } else if ( qName.equals( "is-searchlist-visible" ) ) { dGui.setSearchListVisible( Boolean.valueOf( text.toString() ) .booleanValue() ); } else if ( qName.equals( "is-searchfilterpanel-visible" ) ) { dGui.setSearchFilterPanelVisible( Boolean.valueOf( text.toString() ) | public void endElement( String uri, String localName, String qName ) throws SAXException { if ( qName.equals( "look-and-feel-class" ) ) { dGui.setLookAndFeelClass( text.toString() ); } else if ( qName.equals( "is-toolbar-visible" ) ) { dGui.setToolb... | |
} catch( RuntimeException e ) { e.printStackTrace(listener.error(e.getMessage())); return true; | public boolean calcChangeLog( Build build, File changelogFile, BuildListener listener ) { if(build.getPreviousBuild()==null) { // nothing to compare against try { FileWriter w = new FileWriter(changelogFile); w.write("<changelog/>"); w.close(... | |
searchContainer = QueryManager.getInstance().getSearchContainer(); | public CloseSearchAction() { super( Localizer.getString( "CloseSearch" ), GUIRegistry.getInstance().getPlafIconPack().getIcon("Search.Close"), Localizer.getString( "TTTCloseSearch" ), null, KeyStroke.getKeyStroke( KeyEvent.VK_DELETE, 0 ) ); ... | |
searchContainer.removeSearch( displayedDataModel.getSearch() ); setDisplayedSearch( null ); | closeSearch( displayedDataModel.getSearch() ); | public void actionPerformed( ActionEvent e ) { if ( displayedDataModel != null ) { searchContainer.removeSearch( displayedDataModel.getSearch() ); setDisplayedSearch( null ); } } |
else return nf.buildConstantNode(tu.getPositiveInfinity()); | return nf.buildConstantNode(tu.getPositiveInfinity()); | public Node simplifyAdd(Node lhs,Node rhs) throws ParseException { if(tu.isInfinity(lhs)) { // Inf + Inf -> NaN TODO not correct for signed infinity if(tu.isInfinity(rhs)) return nf.buildConstantNode(tu.getNAN()); else // Inf + x -> Inf return nf.buildConstantNode(tu.getPositiveInfinity()); } if(tu.isInfinity... |
else return nf.buildConstantNode(tu.getPositiveInfinity()); | return nf.buildConstantNode(tu.getPositiveInfinity()); | public Node simplifyDivide(Node child1,Node child2) throws ParseException { if(tu.isZero(child2)) { if(tu.isZero(child1)) // 0/0 -> NaN return nf.buildConstantNode(tu.getNAN()); else // x/0 -> Inf return nf.buildConstantNode(tu.getPositiveInfinity()); } if(tu.isZero(child1)) { // 0/x -> 0 return ... |
else return nf.buildConstantNode(tu.getZERO()); | return nf.buildConstantNode(tu.getZERO()); | public Node simplifyMultiply(Node child1,Node child2) throws ParseException { if(tu.isZero(child1)) { // 0*Inf -> NaN if(tu.isInfinity(child2)) return nf.buildConstantNode(tu.getNAN()); else // 0*x -> 0 return nf.buildConstantNode(tu.getZERO()); } if(tu.isZero(child2)) { // Inf*0 -> NaN if(tu.isInfinity(chil... |
else return nf.buildConstantNode(tu.getZERO()); | return nf.buildConstantNode(tu.getZERO()); | public Node simplifyPower(Node child1,Node child2) throws ParseException { if(tu.isZero(child1)) { if(tu.isZero(child2)) // 0^0 -> NaN return nf.buildConstantNode(tu.getNAN()); else // 0^x -> 0 return nf.buildConstantNode(tu.getZERO()); } if(tu.isZero(child2)) // x^0 -> 1 return nf.buildConstantNode(tu... |
else return nf.buildConstantNode(tu.getPositiveInfinity()); | return nf.buildConstantNode(tu.getPositiveInfinity()); | public Node simplifySubtract(Node lhs,Node rhs) throws ParseException { if(tu.isInfinity(lhs)) { // Inf + Inf -> NaN TODO not correct for signed infinity if(tu.isInfinity(rhs)) return nf.buildConstantNode(tu.getNAN()); else // Inf + x -> Inf return nf.buildConstantNode(tu.getPositiveInfinity()); } if(tu.isInf... |
XOperator op2 = (XOperator) rootOp; | XOperator op2 = rootOp; | public Node simplifyTripple(XOperator op,Node lhs,Node rhs) throws ParseException { XOperator rootOp; if(op.isComposite()) rootOp = (XOperator) op.getRootOp(); else rootOp = op; if(op.isCommutative() && tu.isConstant(rhs)) { return simplifyBuiltOperatorNode(op,rhs,lhs); } if(tu.isConstant(lhs) && tu.... |
else lhsRoot = (XOperator) lhsOp; | else lhsRoot = lhsOp; | public Node simplifyTripple(XOperator op,Node lhs,Node rhs) throws ParseException { XOperator rootOp; if(op.isComposite()) rootOp = (XOperator) op.getRootOp(); else rootOp = op; if(op.isCommutative() && tu.isConstant(rhs)) { return simplifyBuiltOperatorNode(op,rhs,lhs); } if(tu.isConstant(lhs) && tu.... |
else | Node children[] = acceptChildrenAsArray(node,data); boolean allConst=true; for(int i=0;i<nchild;++i) | public Object visit(ASTFunNode node, Object data) throws ParseException { int nchild = node.jjtGetNumChildren(); if(node.isOperator()) { XOperator op= (XOperator) node.getOperator(); if( (op.isBinary() && nchild !=2) || (op.isUnary() && nchild !=1)) throw new ParseException("Wrong number of children for "... |
Node children[] = acceptChildrenAsArray(node,data); boolean allConst=true; for(int i=0;i<nchild;++i) { if(!tu.isConstant(children[i])) allConst=false; if(tu.isNaN(children[i])) return nf.buildConstantNode(tu.getNAN()); } if(allConst) return nf.buildConstantNode(node.getPFMC(),children); | if(!tu.isConstant(children[i])) allConst=false; if(tu.isNaN(children[i])) return nf.buildConstantNode(tu.getNAN()); } if(allConst) return nf.buildConstantNode(node.getPFMC(),children); return TreeUtils.copyChildrenIfNeeded(node,children); | public Object visit(ASTFunNode node, Object data) throws ParseException { int nchild = node.jjtGetNumChildren(); if(node.isOperator()) { XOperator op= (XOperator) node.getOperator(); if( (op.isBinary() && nchild !=2) || (op.isUnary() && nchild !=1)) throw new ParseException("Wrong number of children for "... |
return TreeUtils.copyChildrenIfNeeded(node,children); } | public Object visit(ASTFunNode node, Object data) throws ParseException { int nchild = node.jjtGetNumChildren(); if(node.isOperator()) { XOperator op= (XOperator) node.getOperator(); if( (op.isBinary() && nchild !=2) || (op.isUnary() && nchild !=1)) throw new ParseException("Wrong number of children for "... | |
sfile.getFileName(), sfile.getNetworkCreateTime().longValue(), sfile.getAltLocContainer().getAltLocForQueryResponseRecord() ); | sfile.getFileName(), networkCreateTime.longValue(), altLocContainer.getAltLocForQueryResponseRecord() ); | private void sendFileListing(HTTPRequest httpRequest, Connection connection) throws IOException { GnutellaOutputStream outStream = connection.getOutputStream(); if ( !ServiceManager.sCfg.mShareBrowseDir ) { HTTPHeaderGroup headers = HTTPHeaderGroup.createDefaultResp... |
else if ( length > MessagePrefs.MaxLength.get().byteValue() ) | else if ( length > MessagePrefs.MaxLength.get().intValue() ) | public static MsgHeader createMsgHeader( byte[] inbuf, int offset) throws InvalidMessageException { if( (inbuf.length - offset) < DATA_LENGTH ) { throw new InvalidMessageException( "The byte array Length is less then " + "the message header lenght " ); ... |
NLogger.warn( NLoggerNames.IncomingMessages, "Body too big. Header: " + | NLogger.warn( NLoggerNames.IncomingMessages, "Body too big("+length+"). Header: " + | public static MsgHeader createMsgHeader( byte[] inbuf, int offset) throws InvalidMessageException { if( (inbuf.length - offset) < DATA_LENGTH ) { throw new InvalidMessageException( "The byte array Length is less then " + "the message header lenght " ); ... |
return o.getNumber(); | n = Math.max(n,o.getNumber()); | public int getUpstreamRelationship(Project that) { FingerprintAction f = getAction(FingerprintAction.class); if(f==null) return -1; // look for fingerprints that point to the given project as the source, and merge them all for (Fingerprint e : f.getFingerprints().values()) { ... |
return -1; | return n; | public int getUpstreamRelationship(Project that) { FingerprintAction f = getAction(FingerprintAction.class); if(f==null) return -1; // look for fingerprints that point to the given project as the source, and merge them all for (Fingerprint e : f.getFingerprints().values()) { ... |
if ( incompleteFile != null ) | if ( incompleteManagedFile != null ) | public XJBSWDownloadFile createXJBSWDownloadFile() throws JAXBException { ObjectFactory objFactory = new ObjectFactory(); XJBSWDownloadFile xjbFile = objFactory.createXJBSWDownloadFile(); xjbFile.setLocalFileName( destinationFile.getName() ); // in case incomplete file failed t... |
xjbFile.setIncompleteFileName( incompleteFile.getAbsolutePath() ); | xjbFile.setIncompleteFileName( incompleteManagedFile.getAbsolutePath() ); | public XJBSWDownloadFile createXJBSWDownloadFile() throws JAXBException { ObjectFactory objFactory = new ObjectFactory(); XJBSWDownloadFile xjbFile = objFactory.createXJBSWDownloadFile(); xjbFile.setLocalFileName( destinationFile.getName() ); // in case incomplete file failed t... |
if ( incompleteFile != null ) | if ( incompleteManagedFile != null ) | private void downloadStopNotify( ) { // Ignore nested calls. if( transferStopTime == 0 ) { transferStopTime = System.currentTimeMillis(); if ( status == STATUS_FILE_DOWNLOADING ) {// only update if the status is currently switched from downloading to stopped.... |
return FileManager.getInstance().getReadWriteManagedFile(incompleteFile); | return incompleteManagedFile; | public ManagedFile getIncompleteDownloadFile() throws ManagedFileException, FileHandlingException { initIncompleteFile(); return FileManager.getInstance().getReadWriteManagedFile(incompleteFile); } |
FileUtils.copyFile(incompleteFile, previewFile, previewLength); | FileUtils.copyFile(incompleteManagedFile.getFile(), previewFile, previewLength); | public File getPreviewFile() { if ( isFileCompletedOrMoved() ) { return destinationFile; } if ( !memoryFile.isFileBeginningAvailable() ) { return null; } long previewLength = memoryFile.getFileBeginningScopeLength(); ... |
private void initIncompleteFile() throws FileHandlingException | private void initIncompleteFile() throws FileHandlingException, ManagedFileException | private void initIncompleteFile() throws FileHandlingException { if ( incompleteFile != null ) { return; } File destFile = getDestinationFile(); try { incompleteFile = createIncompleteFile( destFile ); } catch ( FileHandlingExc... |
if ( incompleteFile != null ) | if ( incompleteManagedFile != null ) | private void initIncompleteFile() throws FileHandlingException { if ( incompleteFile != null ) { return; } File destFile = getDestinationFile(); try { incompleteFile = createIncompleteFile( destFile ); } catch ( FileHandlingExc... |
incompleteFile = createIncompleteFile( destFile ); | incompleteManagedFile = FileManager.getInstance().getReadWriteManagedFile( createIncompleteFile( destFile ) ); | private void initIncompleteFile() throws FileHandlingException { if ( incompleteFile != null ) { return; } File destFile = getDestinationFile(); try { incompleteFile = createIncompleteFile( destFile ); } catch ( FileHandlingExc... |
"Renaming final segment from " + incompleteFile.getAbsolutePath() | "Renaming final segment from " + getIncompleteDownloadFile().getAbsolutePath() | public synchronized void moveToDestinationFile() { if ( isFileCompletedMoved() ) {// somebody else did it already before me... return; } // this is an assertion... go crazy if fails... if ( memoryFile.getMissingLength() > 0 && status == STATUS_FILE_COMPLETED) ... |
FileUtils.renameFile( incompleteFile, destFile ); | getIncompleteDownloadFile().renameFile(destFile); | public synchronized void moveToDestinationFile() { if ( isFileCompletedMoved() ) {// somebody else did it already before me... return; } // this is an assertion... go crazy if fails... if ( memoryFile.getMissingLength() > 0 && status == STATUS_FILE_COMPLETED) ... |
+ incompleteFile.getAbsolutePath() + " to " + destFile.getAbsolutePath() | + incompleteManagedFile.getAbsolutePath() + " to " + destFile.getAbsolutePath() | public synchronized void moveToDestinationFile() { if ( isFileCompletedMoved() ) {// somebody else did it already before me... return; } // this is an assertion... go crazy if fails... if ( memoryFile.getMissingLength() > 0 && status == STATUS_FILE_COMPLETED) ... |
else if ( exp.getCause() instanceof FileHandlingException ) { NLogger.warn(NLoggerNames.Download_File, "Failed renaming from " + incompleteManagedFile.getAbsolutePath() + " to " + destFile.getAbsolutePath() + ".", exp ); NLogger.error(NLoggerNames.Download_File, exp, exp); } | public synchronized void moveToDestinationFile() { if ( isFileCompletedMoved() ) {// somebody else did it already before me... return; } // this is an assertion... go crazy if fails... if ( memoryFile.getMissingLength() > 0 && status == STATUS_FILE_COMPLETED) ... | |
if ( incompleteFile != null && incompleteFile.exists() ) | if ( incompleteManagedFile != null ) | public void removeIncompleteDownloadFile() { if ( isFileCompletedOrMoved() ) { return; } if ( status != STATUS_FILE_STOPPED ) { NLogger.error( NLoggerNames.Download_File, "Can't clean temp files of not stopped download file."); re... |
FileUtils.deleteFile( incompleteFile ); | try { incompleteManagedFile.deleteFile(); } catch ( ManagedFileException exp ) { NLogger.error(NLoggerNames.Download_File, exp, exp); } | public void removeIncompleteDownloadFile() { if ( isFileCompletedOrMoved() ) { return; } if ( status != STATUS_FILE_STOPPED ) { NLogger.error( NLoggerNames.Download_File, "Can't clean temp files of not stopped download file."); re... |
throws FileHandlingException | throws FileHandlingException, ManagedFileException | public void setDestinationFile( File aDestinationFile, boolean rename ) throws FileHandlingException { if ( aDestinationFile.compareTo( destinationFile ) == 0 ) { return; } if ( rename ) { // first check if download mgr has any running download with... |
if ( incompleteFile.exists() ) { FileUtils.renameFile( incompleteFile, newIncompleteFile ); } incompleteFile = newIncompleteFile; | incompleteManagedFile.renameFile( newIncompleteFile ); | public void setDestinationFile( File aDestinationFile, boolean rename ) throws FileHandlingException { if ( aDestinationFile.compareTo( destinationFile ) == 0 ) { return; } if ( rename ) { // first check if download mgr has any running download with... |
assert dataBuffer != null : "Data buffer already released."; | public void releaseDataBuffer() { dataBuffer.release(); dataBuffer = null; } | |
public PartialDerivative findDerivative(String name,DJep jep) | public PartialDerivative findDerivative(String dname,DJep jep) | public PartialDerivative findDerivative(String name,DJep jep) throws ParseException { return root.findDerivative(this,name,jep); } |
return root.findDerivative(this,name,jep); | return root.findDerivative(this,dname,jep); | public PartialDerivative findDerivative(String name,DJep jep) throws ParseException { return root.findDerivative(this,name,jep); } |
return false; | public boolean perform(Build build, BuildListener listener) { Project proj = build.getProject(); File script=null; try { try { script = File.createTempFile("hudson","sh"); Writer w = new FileWriter(script); w.write(command); ... | |
name = getUniqueName(name); | public void addSeismogram(LocalSeismogramImpl seis, AuditInfo[] audit) { seismogramNameCache = null; // Note this does not set the xlink, as the seis has not been saved anywhere yet. Document doc = config.getOwnerDocument(); Element localSeismogram = doc.createEleme... | |
localSeismogram.appendChild(seismogramAttr); | public void addSeismogram(LocalSeismogramImpl seis, AuditInfo[] audit) { seismogramNameCache = null; // Note this does not set the xlink, as the seis has not been saved anywhere yet. Document doc = config.getOwnerDocument(); Element localSeismogram = doc.createEleme... | |
localSeismogram.appendChild(propertyElement); | localSeismogram.appendChild(seismogramAttr); | public void addSeismogram(LocalSeismogramImpl seis, AuditInfo[] audit) { seismogramNameCache = null; // Note this does not set the xlink, as the seis has not been saved anywhere yet. Document doc = config.getOwnerDocument(); Element localSeismogram = doc.createEleme... |
localSeismogram.appendChild(seismogramAttr); Element data = doc.createElement("data"); data.setAttributeNS(xlinkNS, "xlink:type", "simple"); data.setAttributeNS(xlinkNS, "xlink:href", seisStr); data.setAttribute("seisType", "sac"); name = getUniqueName(name); | public void addSeismogramRef(LocalSeismogramImpl seis, URL seisURL, String name, Property[] props, ParameterRef[] parm_ids, AuditInfo[] audit) { seismogramNameCache = null; S... | |
localSeismogram.appendChild(propertyElement); | localSeismogram.appendChild(seismogramAttr); Element data = doc.createElement("data"); data.setAttributeNS(xlinkNS, "xlink:type", "simple"); data.setAttributeNS(xlinkNS, "xlink:href", seisStr); data.setAttribute("seisType", "sac"); | public void addSeismogramRef(LocalSeismogramImpl seis, URL seisURL, String name, Property[] props, ParameterRef[] parm_ids, AuditInfo[] audit) { seismogramNameCache = null; S... |
if(counter == 0) return name; | public String getUniqueName(String name) { String[] nameList = getSeismogramNames(); int counter = 0; for(int i = 0; i < nameList.length; i++) { if(nameList[i].equals(name)) counter++; } return name+"_"+counter; } | |
return this.add((Polynomial) node); | return this.sub((Polynomial) node); | public PNodeI sub(PNodeI node) throws ParseException { if(node instanceof Polynomial) return this.add((Polynomial) node); MutiablePolynomial mp = this.toMutiablePolynomial(); mp.add(node.negate()); return mp.toPNode(); } |
public UserRole findUserRoleByNaturalId(User user, Service service, String serviceExtension) { return (UserRole) findUnique(USER_ROLE_QUERY, user, service, serviceExtension); | public UserRole findUserRoleByNaturalId(UserGroup userGroup, Service service, String serviceExtension) { return (UserRole) findUnique(USER_ROLE_QUERY, userGroup, service, serviceExtension); | public UserRole findUserRoleByNaturalId(User user, Service service, String serviceExtension) { return (UserRole) findUnique(USER_ROLE_QUERY, user, service, serviceExtension); } |
addToErrorList("No expression entered"); | final public ASTStart Start() throws ParseException { /*@bgen(jjtree) Start */ ASTStart jjtn000 = new ASTStart(JJTSTART); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { if (jj_2_1(1)) { Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 0: jj_consume_toke... | |
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_10() { if (jj_3R_20()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(ASSIGN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_3R_9()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return f... | |
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_11() { if (jj_3R_21()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | |
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_12() { if (jj_scan_token(MUL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | |
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_13() { if (jj_scan_token(DOT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | |
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_14() { if (jj_scan_token(CROSS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | |
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_15() { if (jj_scan_token(DIV)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.