rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
} catch(org.omg.CORBA.ORBPackage.InvalidName ine) { throw new org.omg.CORBA.ORBPackage.InvalidName(); | AllVTFactory vt = new AllVTFactory(); vt.register(orb); org.omg.CORBA.Object rootObj = orb.resolve_initial_references("NameService"); if (rootObj == null) { logger.info("Name service object is null!"); return; | public FissuresNamingServiceImpl (java.util.Properties props) throws org.omg.CORBA.ORBPackage.InvalidName{ this.props = props; String[] args = new String[0]; try { orb = (org.omg.CORBA_2_3.ORB)org.omg.CORBA.ORB.init(args, props); // register valuetype factories ... |
namingContext = NamingContextExtHelper.narrow(rootObj); logger.info("got Name context"); | public FissuresNamingServiceImpl (java.util.Properties props) throws org.omg.CORBA.ORBPackage.InvalidName{ this.props = props; String[] args = new String[0]; try { orb = (org.omg.CORBA_2_3.ORB)org.omg.CORBA.ORB.init(args, props); // register valuetype factories ... | |
public void rebind(String dns, String objectname, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, Exception { | public void rebind(String dns, String objectname, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName { | public void rebind(String dns, String objectname, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, Exception { logger.info("The CLASS Name is "+obj.getClass().getName()); Stri... |
if(subcounter != 0){ logger.info("resolving new naming context"); namingContextTemp = NamingContextExtHelper.narrow(namingContext.resolve(temp)); } if(ncName1[0].id.equals(interfacename)) ncName1[0].kind = "interface"; else if(ncName1[0].id.equals(objectname)) ncName1[0].kind = "object"; else ncName1[0].kind = "dns"; | public void rebind(String dns, String objectname, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, Exception { logger.info("The CLASS Name is "+obj.getClass().getName()); Stri... | |
} catch(Exception ex) { logger.info("This Exception must not occur"); ex.printStackTrace(); throw new Exception(); } | } catch (AlreadyBound e) { logger.error("Caught AlreadyBound, should not happen, ignoring...", e); } | public void rebind(String dns, String objectname, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, Exception { logger.info("The CLASS Name is "+obj.getClass().getName()); Stri... |
candidate.setAvailableRangeSet( availableRanges ); | try { candidate.setAvailableRangeSet( availableRanges ); } catch ( IllegalArgumentException exp ) { NLogger.error(NLoggerNames.Download_Engine, "Failed to parse X-Available-Ranges in " + candidate.getVendor() + " request: " + response.buildHTTPResponseString(), exp ); } | public void exchangeHTTPHandshake( SWDownloadSegment aSegment ) throws IOException, UnusableHostException, HTTPMessageException { NetworkManager networkMgr = NetworkManager.getInstance(); isDownloadSuccessful = false; segment = aSegment; long downloadOffset = segment.getTransfe... |
candidate.setAvailableRangeSet( new HTTPRangeSet( 0, downloadFile.getTotalDataSize() - 1) ); | try { candidate.setAvailableRangeSet( new HTTPRangeSet( 0, downloadFile.getTotalDataSize() - 1) ); } catch ( IllegalArgumentException exp ) { NLogger.error(NLoggerNames.Download_Engine, "Failed to parse X-Available-Ranges in " + candidate.getVendor() + " request: " + response.buildHTTPResponseString(), exp ); } | public void exchangeHTTPHandshake( SWDownloadSegment aSegment ) throws IOException, UnusableHostException, HTTPMessageException { NetworkManager networkMgr = NetworkManager.getInstance(); isDownloadSuccessful = false; segment = aSegment; long downloadOffset = segment.getTransfe... |
public void setValidValue(boolean val) { validValue = val; } | public void setValidValue(boolean val) { if(isConstant()) return; validValue = val; } | public void setValidValue(boolean val) { validValue = val; } |
return new Variable(name,value); | Variable var = new Variable(name,value); return var; | public Variable createVariable(String name, Object value) { return new Variable(name,value); } |
Writer w = new OutputStreamWriter(new FileOutputStream(new File(getRootDir(),"build.xml")),"UTF-8"); | Writer w = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(getRootDir(),"build.xml")),"UTF-8")); | public synchronized void save() throws IOException { Writer w = new OutputStreamWriter(new FileOutputStream(new File(getRootDir(),"build.xml")),"UTF-8"); w.write("<?xml version='1.0' encoding='UTF-8'?>\n"); createConfiguredStream().toXML(this,w); w.close(); } |
final String dateRange = ">=" + outputDate.format(m_start); | final String dateRange = ">=" + outputDate.format(safeStart); | public void execute() throws BuildException { File savedDir = m_dir; // may be altered in validate try { validate(); final Properties userList = new Properties(); loadUserlist(userList); for (Enumeration e = m_cvsUsers.elements(); e.hasMoreEl... |
disabled = req.getParameter("disable")!=null; | public synchronized void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { try { if(!Hudson.adminCheck(req,rsp)) return; int scmidx = Integer.parseInt(req.getParameter("scm")); scm = SCMManager.getSupportedSCMs()[s... | |
return true; | return !isDisabled(); | public boolean isBuildable() { return true; } |
getParent().getQueue().add(this); | if(!disabled) getParent().getQueue().add(this); | public void scheduleBuild() { getParent().getQueue().add(this); } |
if(!local.mkdirs()) | if(!local.mkdirs() && !local.exists()) | public void mkdirs() throws IOException { if(!local.mkdirs()) throw new IOException("Failed to mkdirs: "+local); } |
if(awtProblem) { rsp.sendRedirect2(req.getContextPath()+"/images/headless.png"); return; } | public void doGraph( StaplerRequest req, StaplerResponse rsp) throws IOException { try { if(req.checkIfModified(owner.getTimestamp(),rsp)) return; class BuildLabel implements Comparable<BuildLabel> { private final Build build; public BuildLab... | |
public ByteCopier(InputStream in, OutputStream out) { | public ByteCopier(String threadName, InputStream in, OutputStream out) { super(threadName); | public ByteCopier(InputStream in, OutputStream out) { this.in = in; this.out = out; } |
public Copier(InputStream in, OutputStream out) { | public Copier(String threadName, InputStream in, OutputStream out) { super(threadName); | public Copier(InputStream in, OutputStream out) { this.in = in; this.out = out; } |
if(!checkBits(bits[1],cal.get(Calendar.HOUR))) | if(!checkBits(bits[1],cal.get(Calendar.HOUR_OF_DAY))) | boolean check(Calendar cal) { if(!checkBits(bits[0],cal.get(Calendar.MINUTE))) return false; if(!checkBits(bits[1],cal.get(Calendar.HOUR))) return false; if(!checkBits(bits[2],cal.get(Calendar.DAY_OF_MONTH))) return false; if(!checkBits(bits[3],cal.get(Ca... |
public void addStyle(String name, Color foreground, Color background, boolean bold) | public void addStyle(String name, Color foreground) | public void addStyle(String name, Color foreground, Color background, boolean bold) { if (m_textPane == null) return; StyledDocument doc = m_textPane.getStyledDocument(); StyleContext context = StyleContext.getDefaultStyleContext(); Style def = conte... |
if (m_textPane == null) return; StyledDocument doc = m_textPane.getStyledDocument(); StyleContext context = StyleContext.getDefaultStyleContext(); Style def = context.getStyle(StyleContext.DEFAULT_STYLE); Style style = doc.addStyle(name, def); if (foreground != null) StyleConstants.setForeground(style, foreground); if ... | addStyle(name, foreground, null, false); | public void addStyle(String name, Color foreground, Color background, boolean bold) { if (m_textPane == null) return; StyledDocument doc = m_textPane.getStyledDocument(); StyleContext context = StyleContext.getDefaultStyleContext(); Style def = conte... |
if(printPartialEquations && deriv.hasEquation()) | if(((mode & PRINT_PARTIAL_EQNS)!=0) && deriv.hasEquation()) | public Object visit(ASTVarNode node, Object data) throws ParseException { Variable var = node.getVar(); if(var instanceof PartialDerivative) { PartialDerivative deriv = (PartialDerivative) var; if(printPartialEquations && deriv.hasEquation()) deriv.getEquation().jjtAccept(this,null); else sb.append(node... |
if(printVariableEquations && dvar.hasEquation()) | if(((mode & PRINT_VARIABLE_EQNS)!=0) && dvar.hasEquation()) | public Object visit(ASTVarNode node, Object data) throws ParseException { Variable var = node.getVar(); if(var instanceof PartialDerivative) { PartialDerivative deriv = (PartialDerivative) var; if(printPartialEquations && deriv.hasEquation()) deriv.getEquation().jjtAccept(this,null); else sb.append(node... |
public Object visit(ASTVarNode node, Object data) throws ParseException { sb.append(node.getName()); return data; } | public Object visit(ASTFunNode node, Object data) throws ParseException { if(!node.isOperator()) return visitFun(node); if(node instanceof PrintRulesI) { ((PrintRulesI) node).append(node,this); return null; } if(node.getOperator()==null) { throw new ParseException("Null operator in print for "+node); } if(specialRules.... | public Object visit(ASTVarNode node, Object data) throws ParseException { sb.append(node.getName()); return data; } |
public void fireUploadFileChanged(UploadState file) | private void fireUploadFileChanged(final int position) | public void fireUploadFileChanged(UploadState file) { synchronized (uploadStateList) { int position = uploadStateList.indexOf( file ); if ( position >= 0 ) { fireUploadFileChanged( position ); } } } |
synchronized (uploadStateList) | AsynchronousDispatcher.invokeLater( new Runnable() | public void fireUploadFileChanged(UploadState file) { synchronized (uploadStateList) { int position = uploadStateList.indexOf( file ); if ( position >= 0 ) { fireUploadFileChanged( position ); } } } |
int position = uploadStateList.indexOf( file ); if ( position >= 0 ) | public void run() | public void fireUploadFileChanged(UploadState file) { synchronized (uploadStateList) { int position = uploadStateList.indexOf( file ); if ( position >= 0 ) { fireUploadFileChanged( position ); } } } |
fireUploadFileChanged( position ); | Object[] listeners = listenerList.toArray(); UploadFilesChangeListener listener; for (int i = listeners.length - 1; i >= 0; i--) { listener = (UploadFilesChangeListener) listeners[i]; listener.uploadFileChanged( position ); } | public void fireUploadFileChanged(UploadState file) { synchronized (uploadStateList) { int position = uploadStateList.indexOf( file ); if ( position >= 0 ) { fireUploadFileChanged( position ); } } } |
} | } ); | public void fireUploadFileChanged(UploadState file) { synchronized (uploadStateList) { int position = uploadStateList.indexOf( file ); if ( position >= 0 ) { fireUploadFileChanged( position ); } } } |
int r = new Proc(new String[]{"ln","-s",getRootDir().getPath(),"../lastSuccessful"}, | int r = new Proc(new String[]{ "ln","-s","builds/"+getId(),"../lastSuccessful"}, | public void run() { run(new Runner() { public Result run(BuildListener listener) throws IOException { if(!project.checkout(Build.this,listener)) return Result.FAILURE; if(!project.getScm().calcChangeLog(Build.this,new File(getRootDir(),"changelog.xm... |
int r = new Proc(new String[]{"ln","-s",getRootDir().getPath(),"../lastSuccessful"}, | int r = new Proc(new String[]{ "ln","-s","builds/"+getId(),"../lastSuccessful"}, | public Result run(BuildListener listener) throws IOException { if(!project.checkout(Build.this,listener)) return Result.FAILURE; if(!project.getScm().calcChangeLog(Build.this,new File(getRootDir(),"changelog.xml"),listener)) return Result.F... |
if(path==null) path = EnvVars.masterEnvVars.get("PATH"); | public void buildEnvVars(Map<String,String> env) { String path = env.get("PATH"); if(path==null) path = getBinDir().getPath(); else path = getBinDir().getPath()+File.pathSeparator+path; env.put("PATH",path); env.put("JAVA_HOME",javaHome); } | |
public XJep newInstance(SymbolTable st) | public XJep newInstance() | public XJep newInstance(SymbolTable st) { XJep newJep = new XJep(this); newJep.symTab = st; return newJep; } |
newJep.symTab = st; | public XJep newInstance(SymbolTable st) { XJep newJep = new XJep(this); newJep.symTab = st; return newJep; } | |
public ASTVarNode buildVariableNode(Variable var) throws ParseException | public ASTVarNode buildVariableNode(ASTVarNode node) throws ParseException | public ASTVarNode buildVariableNode(Variable var) throws ParseException { ASTVarNode node = new ASTVarNode(ParserTreeConstants.JJTVARNODE); node.setVar(var); return node; } |
ASTVarNode node = new ASTVarNode(ParserTreeConstants.JJTVARNODE); node.setVar(var); return node; | return buildVariableNode(node.getVar()); | public ASTVarNode buildVariableNode(Variable var) throws ParseException { ASTVarNode node = new ASTVarNode(ParserTreeConstants.JJTVARNODE); node.setVar(var); return node; } |
public Node rewrite(Node node,XJep xjep,RewriteRuleI rules[],boolean simplify) throws ParseException,IllegalArgumentException | public Node rewrite(Node node,XJep xjep,RewriteRuleI inrules[],boolean simplify) throws ParseException,IllegalArgumentException | public Node rewrite(Node node,XJep xjep,RewriteRuleI rules[],boolean simplify) throws ParseException,IllegalArgumentException { xj = xjep; nf = xjep.getNodeFactory(); opSet = xjep.getOperatorSet(); tu = xjep.getTreeUtils(); this.rules = rules; this.simp = simplify; if(this.rules.length==0) return node; if (node =... |
nf = xjep.getNodeFactory(); opSet = xjep.getOperatorSet(); tu = xjep.getTreeUtils(); this.rules = rules; | this.rules = inrules; | public Node rewrite(Node node,XJep xjep,RewriteRuleI rules[],boolean simplify) throws ParseException,IllegalArgumentException { xj = xjep; nf = xjep.getNodeFactory(); opSet = xjep.getOperatorSet(); tu = xjep.getTreeUtils(); this.rules = rules; this.simp = simplify; if(this.rules.length==0) return node; if (node =... |
tunLoss = cToF(tunLossF); | tunLoss = tunLossF * 1.8; | public void calcMashSchedule() { // Method to run through the mash table and calculate values double strikeTemp = 0; double targetTemp = 0; double endTemp = 0; double waterAddedQTS = 0; double waterEquiv = 0; double mr = mashRatio; double currentTemp = grainTempF; double displTemp = 0; double tunLoss = tun... |
return fToC(tunLossF); | return ( tunLossF / 1.8 ); | public double getTunLoss() { if (tempUnits.equals("F")) return tunLossF; else return fToC(tunLossF); } |
tunLossF = cToF(t); | tunLossF = t * 1.8; | public void setTunLoss(double t){ if (tempUnits.equals("F")) tunLossF = t; else tunLossF = cToF(t); calcMashSchedule(); } |
sb.append(SBStringUtils.xmlElement("VOLUME", getMashTotalVol(), 4)); | public String toXml() { StringBuffer sb = new StringBuffer(); sb.append(" <MASH>\n"); for (int i = 0; i < steps.size(); i++) { MashStep st = (MashStep) steps.get(i); sb.append(" <ITEM>\n"); sb.append(" <TYPE>" + st.type + "</TYPE>\n"); sb.append(" <TEMP>" + st.startTemp + "</TEMP>\n"); if ... | |
mashModel.setData(myRecipe.getMash()); tblMash.updateUI(); | public void displayMash() { if (myRecipe != null) { recipeNameLabel.setText(myRecipe.getName()); mashModel.setData(myRecipe.getMash()); tblMash.updateUI(); volUnitsComboModel.addOrInsert(myRecipe.mash.getMashVolUnits()); // temp units: if (myRecipe.mash.getMashTempUnits().equals("F")) tempFrb.setSel... | |
tblMash.setAutoCreateColumnsFromModel(false); tblMash.getTableHeader().setReorderingAllowed(false); | private void initGUI() { try { GridBagLayout thisLayout = new GridBagLayout(); thisLayout.columnWeights = new double[] {0.1, 0.1, 0.1}; thisLayout.columnWidths = new int[] {7, 7, 7}; thisLayout.rowWeights = new double[] {0.1, 0.8, 0.1, 0.1, 0.1, 0.1}; thisLayout.rowHeights = new int[] {7, 7, 7, 7, 7, 7}; ... | |
grainTempF = cToF(t); | grainTempF = BrewCalcs.cToF(t); | public void setGrainTemp(double t){ if (tempUnits.equals("F")) grainTempF = t; else grainTempF = cToF(t); calcMashSchedule(); } |
return fToC(grainTempF); | return BrewCalcs.fToC(grainTempF); | public double getGrainTemp() { if (tempUnits.equals("F")) return grainTempF; else return fToC(grainTempF); } |
public String getVolAbrv(String unit) { return getAbrvFromUnit(getTypeFromUnit(unit), unit); | public static String getVolAbrv(String unit) { Quantity q = new Quantity(); q.setUnits(unit); return q.abrv; | public String getVolAbrv(String unit) { return getAbrvFromUnit(getTypeFromUnit(unit), unit); } |
public Dimensions calcDim(Dimensions l,Dimensions r) { if(l.equals(Dimensions.ONE) && r.equals(Dimensions.ONE)) return Dimensions.ONE; if(l.is0D() ) return r; if(r.is0D() ) return l; if(l.is1D() && r.is1D() ) return null; if(l.is2D() && r.is1D() ) | public Dimensions calcDim(Dimensions l,Dimensions r) { int lrank = l.rank(); int rrank = r.rank(); switch(lrank) | public Dimensions calcDim(Dimensions l,Dimensions r) { if(l.equals(Dimensions.ONE) && r.equals(Dimensions.ONE)) return Dimensions.ONE; if(l.is0D() ) return r; // scalar mult on left if(r.is0D() ) return l; // scalar mult on right if(l.is1D() && r.is1D() ) return null; // error for vector * vector if(l.is2D() && r... |
if(l.getLastDim() == r.getFirstDim()) return Dimensions.valueOf(l.getFirstDim()); else return null; | case 0: return r; case 1: switch(rrank) { case 0: return l; case 1: return Dimensions.valueOf(l.getFirstDim(),r.getFirstDim()); case 2: if(l.getLastDim() == r.getFirstDim()) return Dimensions.valueOf(r.getLastDim()); else return null; default: } break; case 2: switch(rrank) { case 0: return l; case 1: if(l.getLastDim(... | public Dimensions calcDim(Dimensions l,Dimensions r) { if(l.equals(Dimensions.ONE) && r.equals(Dimensions.ONE)) return Dimensions.ONE; if(l.is0D() ) return r; // scalar mult on left if(r.is0D() ) return l; // scalar mult on right if(l.is1D() && r.is1D() ) return null; // error for vector * vector if(l.is2D() && r... |
if(l.is1D() && r.is2D() ) { if(l.getLastDim() == r.getFirstDim()) return Dimensions.valueOf(r.getLastDim()); else return null; } if(l.is2D() && r.is2D() ) { if(l.getLastDim() == r.getFirstDim()) return Dimensions.valueOf(l.getFirstDim(),r.getLastDim()); else return null; } if(l.getLastDim() == r.getFirstDim()) { int di... | return null; | public Dimensions calcDim(Dimensions l,Dimensions r) { if(l.equals(Dimensions.ONE) && r.equals(Dimensions.ONE)) return Dimensions.ONE; if(l.is0D() ) return r; // scalar mult on left if(r.is0D() ) return l; // scalar mult on right if(l.is1D() && r.is1D() ) return null; // error for vector * vector if(l.is2D() && r... |
if(res instanceof MVector && param1 instanceof Matrix && param2 instanceof MVector) return calcValue((MVector) res,(Matrix) param1,(MVector) param2); else if(res instanceof MVector && param1 instanceof MVector && param2 instanceof Matrix) return calcValue((MVector) res,(MVector) param1,(Matrix) param2); else if(res i... | if(param1 instanceof Scaler) { if(param2 instanceof Scaler) { res.setEle(0,super.mul(param1.getEle(0),param2.getEle(0))); } else if(param2 instanceof MVector) { for(int i=0;i<param2.getDim().getFirstDim();++i) res.setEle(i,super.mul(param1.getEle(0),param2.getEle(i))); } else if(param2 instanceof Matrix) { Matrix r = ... | public MatrixValueI calcValue(MatrixValueI res,MatrixValueI param1,MatrixValueI param2) throws ParseException { if(res instanceof MVector && param1 instanceof Matrix && param2 instanceof MVector) return calcValue((MVector) res,(Matrix) param1,(MVector) param2); else if(res instanceof MVector && param1 instanceof M... |
Object val = super.mul(param1,param2); res.setEle(0,val); return res; | if(param2 instanceof Scaler) { for(int i=0;i<param2.getDim().numEles();++i) res.setEle(i,super.mul(param1.getEle(i),param2.getEle(0))); } else throw new ParseException("Sorry I don't know how to multiply a tensor by a vector"); | public MatrixValueI calcValue(MatrixValueI res,MatrixValueI param1,MatrixValueI param2) throws ParseException { if(res instanceof MVector && param1 instanceof Matrix && param2 instanceof MVector) return calcValue((MVector) res,(Matrix) param1,(MVector) param2); else if(res instanceof MVector && param1 instanceof M... |
return res; | public MatrixValueI calcValue(MatrixValueI res,MatrixValueI param1,MatrixValueI param2) throws ParseException { if(res instanceof MVector && param1 instanceof Matrix && param2 instanceof MVector) return calcValue((MVector) res,(Matrix) param1,(MVector) param2); else if(res instanceof MVector && param1 instanceof M... | |
if(param1 instanceof Matrix && param2 instanceof MVector) return mul((Matrix) param1,(MVector) param2); else if(param1 instanceof MVector && param2 instanceof Matrix) return mul((MVector) param1,(Matrix) param2); else if(param1 instanceof Matrix && param2 instanceof Matrix) return mul((Matrix) param1,(Matrix) param2)... | if(param1 instanceof MatrixValueI && param2 instanceof MatrixValueI) { return mul((MatrixValueI) param1,(MatrixValueI) param2); } else if(param1 instanceof MatrixValueI) { MatrixValueI l = (MatrixValueI) param1; MatrixValueI res = Tensor.getInstance(l.getDim()); for(int i=0;i<res.getNumEles();++i) res.setEle(i,super.mu... | public Object mul(Object param1, Object param2) throws ParseException { // TODO tensor mult? if(param1 instanceof Matrix && param2 instanceof MVector) return mul((Matrix) param1,(MVector) param2); else if(param1 instanceof MVector && param2 instanceof Matrix) return mul((MVector) param1,(Matrix) param2); e... |
public void setEle(int i,int j,Object value) | public void setEle(int n,Object value) | public void setEle(int i,int j,Object value) { data[i][j] = value; } |
int i = n / cols; int j = n % cols; | public void setEle(int i,int j,Object value) { data[i][j] = value; } | |
public Matrix(int rows,int cols) { this.rows = rows; this.cols = cols; data = new Object[rows][cols]; dims = Dimensions.valueOf(rows,cols); } | private Matrix() {} | public Matrix(int rows,int cols) { this.rows = rows; this.cols = cols; data = new Object[rows][cols]; dims = Dimensions.valueOf(rows,cols); } |
if (param instanceof Number) | if (param instanceof Complex) { return ((Complex)param).asinh(); } else if (param instanceof Number) | public Object asinh(Object param) throws ParseException { if (param instanceof Number) { Complex temp = new Complex(((Number)param).doubleValue(),0.0); return temp.asinh(); } else if (param instanceof Complex) { return ((Complex)param).asinh(); } throw new ParseException("Invalid parameter type"); } |
else if (param instanceof Complex) { return ((Complex)param).asinh(); } | public Object asinh(Object param) throws ParseException { if (param instanceof Number) { Complex temp = new Complex(((Number)param).doubleValue(),0.0); return temp.asinh(); } else if (param instanceof Complex) { return ((Complex)param).asinh(); } throw new ParseException("Invalid parameter type"); } | |
if (!child.delete()) throw new IOException("Unable to delete " + child.getPath()); | deleteFile(child); | public static void deleteContentsRecursive(File file) throws IOException { File[] files = file.listFiles(); if(files==null) return; // the directory didn't exist in the first place for (File child : files) { if (child.isDirectory()) deleteContentsRecursi... |
if(!dir.delete()) throw new IOException("Unable to delete "+dir); | deleteFile(dir); | public static void deleteRecursive(File dir) throws IOException { deleteContentsRecursive(dir); if(!dir.delete()) throw new IOException("Unable to delete "+dir); } |
while(r!=null && r.getResult()!=Result.FAILURE) | while(r!=null && (r.isBuilding() || r.getResult()!=Result.FAILURE)) | public synchronized RunT getLastFailedBuild() { RunT r = getLastBuild(); while(r!=null && r.getResult()!=Result.FAILURE) r=r.getPreviousBuild(); return r; } |
while(r!=null && (r.getResult()==null || r.getResult().isWorseThan(Result.SUCCESS))) | while(r!=null && (r.isBuilding() || r.getResult().isWorseThan(Result.SUCCESS))) | public synchronized RunT getLastStableBuild() { RunT r = getLastBuild(); while(r!=null && (r.getResult()==null || r.getResult().isWorseThan(Result.SUCCESS))) r=r.getPreviousBuild(); return r; } |
while(r!=null && (r.getResult()==null || r.getResult().isWorseThan(Result.UNSTABLE))) | while(r!=null && (r.isBuilding() || r.getResult().isWorseThan(Result.UNSTABLE))) | public synchronized RunT getLastSuccessfulBuild() { RunT r = getLastBuild(); while(r!=null && (r.getResult()==null || r.getResult().isWorseThan(Result.UNSTABLE))) r=r.getPreviousBuild(); return r; } |
req.setAttribute("it",it); | static void forwardToRss( Object it, String title, StaplerRequest req, HttpServletResponse rsp, Collection<? extends Run> runs) throws IOException, ServletException { GregorianCalendar threshold = new GregorianCalendar(); threshold.add(Calendar.DAY_OF_YEAR,-7); int count=0; for (Iterator... | |
req.getServletContext().getRequestDispatcher("/WEB-INF/rss.jsp").forward(req,rsp); | req.getView(it,"/hudson/rss.jelly").forward(req,rsp); | static void forwardToRss( Object it, String title, StaplerRequest req, HttpServletResponse rsp, Collection<? extends Run> runs) throws IOException, ServletException { GregorianCalendar threshold = new GregorianCalendar(); threshold.add(Calendar.DAY_OF_YEAR,-7); int count=0; for (Iterator... |
throw new NotFound("No sites in the database of code " + site_code + " for given station ids"); | throw new NotFound("No sites in the database of code '" + site_code + "' for given station ids"); | public int[] getDBIds(int[] possibleStaDbIds, String site_code) throws SQLException, NotFound { List ids = new ArrayList(); for(int i = 0; i < possibleStaDbIds.length; i++) { getDBIdsForStaAndCode.setInt(1, possibleStaDbIds[i]); getDBIdsForStaAndCode.setString(2, site_... |
public JDBCStation(Connection conn) throws SQLException { this(conn, new JDBCLocation(conn), new JDBCNetwork(conn), new JDBCTime(conn)); | public JDBCStation() throws SQLException { this(ConnMgr.createConnection()); | public JDBCStation(Connection conn) throws SQLException { this(conn, new JDBCLocation(conn), new JDBCNetwork(conn), new JDBCTime(conn)); } |
public int put(Station sta) throws SQLException { int dbid; try { dbid = getDBId(sta.get_id()); getIfNameExists.setInt(1, dbid); ResultSet rs = getIfNameExists.executeQuery(); if(!rs.next()) { int index = insertOnlyStation(sta, updateSta, 1, netTable, locTable, time); updateSta.setInt(index, dbid); updateSta.executeU... | public int put(ChannelId id) throws SQLException { int netDbId = netTable.put(id.network_id); int dbId = seq.next(); putChanIdBits.setInt(1, dbId); putChanIdBits.setInt(2, netDbId); putChanIdBits.setString(3, id.station_code); putChanIdBits.executeUpdate(); return dbId; | public int put(Station sta) throws SQLException { int dbid; try { dbid = getDBId(sta.get_id()); // No NotFound exception, so already added the id // now check if the attrs are added getIfNameExists.setInt(1, dbid); ResultSet rs = getIfNameExists.e... |
rules[0] = localJep.differentiate((Node) fun.getTopNode(),"x"); | rules[0] = localJep.differentiate(fun.getTopNode(),"x"); | public MacroFunctionDiffRules(DJep djep,MacroFunction fun) throws ParseException { //super(dv); name = fun.getName(); pfmc = fun; XSymbolTable localSymTab = (XSymbolTable) ((XSymbolTable) djep.getSymbolTable()).newInstance(); //new SymbolTable(); localSymTab.copyConstants(djep.getSymbolTable()); D... |
public XJep newInstance(SymbolTable st) | public XJep newInstance() | public XJep newInstance(SymbolTable st) { DJep newJep = new DJep(this); newJep.symTab = st; return newJep; } |
newJep.symTab = st; | public XJep newInstance(SymbolTable st) { DJep newJep = new DJep(this); newJep.symTab = st; return newJep; } | |
try { SwarmingManager.getInstance().addMagmaToDownload( file ); } catch (IOException exp) { NLogger.error(NLoggerNames.MAGMA, exp.getMessage(), exp); GUIUtils.showErrorMessage( Localizer.getString( "NewDownload_FailedToParseMagmaMessage" ), Localizer.getString( "NewDownload_FailedToParseMagmaTitle" ) ); } | InternalFileHandler.magmaReadout( file ); | private void createNewMagmaDownload() { String magmaFileName = magmaTF.getText().trim(); if (magmaFileName.length() == 0) { return; } File file = new File(magmaFileName); if (!file.exists()) { return; } try { S... |
try { Reader reader = new BufferedReader(new FileReader(file)); RSSParser parser = new RSSParser(reader); parser.start(); List magnetList = parser.getMagnets(); Iterator iter = magnetList.iterator(); while (iter.hasNext()) { String magnet = (String) iter.next(); URI uri = new URI( magnet, true ); SwarmingManager swar... | InternalFileHandler.rssReadout( file ); | private void createNewRSSDownload() { String rssFileName = rssTF.getText().trim(); if (rssFileName.length() == 0) { return; } File file = new File(rssFileName); if (!file.exists()) { return; } try { Reader read... |
MagnetData magnetData = MagnetData.parseFromURI(uri); URN urn = MagnetData.lookupSHA1URN(magnetData); SwarmingManager swarmingMgr = SwarmingManager.getInstance(); if ( !swarmingMgr.isURNDownloaded( urn ) ) { swarmingMgr.addFileToDownload( uri ); } | downloadUri( uri ); | public static void magmaReadout( File file ) { try { BufferedInputStream inStream = new BufferedInputStream( new FileInputStream( file ) ); MagmaParser parser = new MagmaParser( inStream ); parser.start(); List magnetList = parser.getMagnets(); It... |
SwarmingManager swarmingMgr = SwarmingManager.getInstance(); MagnetData magnetData = MagnetData.parseFromURI( uri ); URN urn = MagnetData.lookupSHA1URN(magnetData); if ( !swarmingMgr.isURNDownloaded( urn ) ) { swarmingMgr.addFileToDownload( uri ); } | downloadUri( uri ); | public static void rssReadout( File file ) { if (!file.exists()) { return; } try { Reader reader = new BufferedReader(new FileReader(file)); RSSParser parser = new RSSParser(reader); parser.start(); List magnetList = pa... |
if(ch=='<') buf.append("<"); else if(ch=='&') buf.append("&"); else if(ch==' ') buf.append(" "); else | public String getMsgEscaped() { StringBuffer buf = new StringBuffer(); for( int i=0; i<msg.length(); i++ ) { char ch = msg.charAt(i); if(ch=='\n') buf.append("<br>"); else buf.append(ch); } return buf.toString(); } | |
public ChangeLogSet parse(File changelogFile) throws IOException, SAXException { | public ChangeLogSet parse(Build build, File changelogFile) throws IOException, SAXException { | public ChangeLogSet parse(File changelogFile) throws IOException, SAXException { return ChangeLogSet.EMPTY; } |
public abstract ChangeLogSet parse(File changelogFile) throws IOException, SAXException; | public abstract ChangeLogSet parse(Build build, File changelogFile) throws IOException, SAXException; | public abstract ChangeLogSet parse(File changelogFile) throws IOException, SAXException; |
return sub(zeroPoly,(FreeGroupElement) a); | return sub(zeroPoly,a); | public Number getInverse(Number a) { return sub(zeroPoly,(FreeGroupElement) a); } |
PlasticTheme myCurrentTheme = PlasticLookAndFeel.getMyCurrentTheme(); | PlasticTheme myCurrentTheme = PlasticLookAndFeel.getPlasticTheme(); | public static ThemeInfo getCurrentTheme( String lafClassName ) { if ( Options.PLASTICXP_NAME.equals( lafClassName ) ) { PlasticTheme myCurrentTheme = PlasticLookAndFeel.getMyCurrentTheme(); if ( myCurrentTheme == null ) { return null; } ... |
plasticThemes = new ThemeInfo[18]; plasticThemes[0] = new ThemeInfo( "BrownSugar", classPrefix + "BrownSugar" ); plasticThemes[1] = new ThemeInfo( "DarkStar", classPrefix + "DarkStar" ); plasticThemes[2] = new ThemeInfo( "DesertBlue", classPrefix + "DesertBlue" ); if ( !LookUtils.IS_LAF_WINDOWS_XP_ENABLED && LookUtils.... | plasticThemes = new ThemeInfo[ themeNames.length ]; String displayName; String name; for ( int i = 0; i < themeNames.length; i++ ) | private static void initPlasticThemes() { if ( plasticThemes == null ) { String classPrefix = "com.jgoodies.looks.plastic.theme."; plasticThemes = new ThemeInfo[18]; plasticThemes[0] = new ThemeInfo( "BrownSugar", classPrefix + "BrownSugar" ); plasticThem... |
plasticThemes[3] = new ThemeInfo( "DesertBluer (default)", classPrefix + "DesertBluer" ); | displayName = name = themeNames[i]; if ( defaultName.endsWith( name ) ) { displayName = name + " (default)"; } plasticThemes[i] = new ThemeInfo( displayName, classPrefix + name ); | private static void initPlasticThemes() { if ( plasticThemes == null ) { String classPrefix = "com.jgoodies.looks.plastic.theme."; plasticThemes = new ThemeInfo[18]; plasticThemes[0] = new ThemeInfo( "BrownSugar", classPrefix + "BrownSugar" ); plasticThem... |
else { plasticThemes[3] = new ThemeInfo( "DesertBluer", classPrefix + "DesertBluer" ); } plasticThemes[4] = new ThemeInfo( "DesertGreen", classPrefix + "DesertGreen" ); plasticThemes[5] = new ThemeInfo( "DesertRed", classPrefix + "DesertRed" ); plasticThemes[6] = new ThemeInfo( "DesertYellow", classPrefix + "DesertYell... | private static void initPlasticThemes() { if ( plasticThemes == null ) { String classPrefix = "com.jgoodies.looks.plastic.theme."; plasticThemes = new ThemeInfo[18]; plasticThemes[0] = new ThemeInfo( "BrownSugar", classPrefix + "BrownSugar" ); plasticThem... | |
PlasticLookAndFeel.setMyCurrentTheme( (PlasticTheme)theme ); | PlasticLookAndFeel.setPlasticTheme( (PlasticTheme)theme ); | public static void setCurrentTheme( String lafClassName, Object theme ) { if ( lafClassName.equals( Options.PLASTICXP_NAME ) ) { PlasticLookAndFeel.setMyCurrentTheme( (PlasticTheme)theme ); try { // after setting the theme we must reset the PlasticLAF... |
if (param instanceof Number) { return new Double(Math.sin(((Number)param).doubleValue())); } else if (param instanceof Complex) { | if (param instanceof Complex) { | public Object sin(Object param) throws ParseException { if (param instanceof Number) { return new Double(Math.sin(((Number)param).doubleValue())); } else if (param instanceof Complex) { return ((Complex)param).sin(); } throw new ParseException("Invalid parameter type"); } |
else if (param instanceof Number) { return new Double(Math.sin(((Number)param).doubleValue())); } | public Object sin(Object param) throws ParseException { if (param instanceof Number) { return new Double(Math.sin(((Number)param).doubleValue())); } else if (param instanceof Complex) { return ((Complex)param).sin(); } throw new ParseException("Invalid parameter type"); } | |
invokeEventMethod(iter.next(), bindMethodName, ref); | Object instance = iter.next(); invokeEventMethod(instance, bindMethodName, ref); | public void addedService(ServiceReference ref, Object service) { if (doneBound && multiple) { for (Iterator iter = instances.iterator(); iter.hasNext();) { invokeEventMethod(iter.next(), bindMethodName, ref); } } else if (bound != null && !multiple) { Se... |
ungetService(bound); | ungetService(instance, bound); | public void addedService(ServiceReference ref, Object service) { if (doneBound && multiple) { for (Iterator iter = instances.iterator(); iter.hasNext();) { invokeEventMethod(iter.next(), bindMethodName, ref); } } else if (bound != null && !multiple) { Se... |
registerDuplexRef(bound, instance); | public void bind(Object instance) { instances.add(instance); doneBound = true; if (multiple) { ServiceReference[] serviceReferences = getServiceReferences(); if (serviceReferences != null) { for (int i = 0; i < serviceReferences.length; i++) { ... | |
Bundle bundle = ref.getBundle(); Class serviceClass = null; try { serviceClass = bundle.loadClass(getInterfaceName()); } catch (ClassNotFoundException e) { Activator.log.error("Declarative Services could not load class", e); return; } | private void invokeEventMethod(Object instance, String methodName, ServiceReference ref) { if (methodName == null) { return; } Class instanceClass = instance.getClass(); Method method = null; Bundle bundle = ref.getBundle(); // the bundle where the service is... | |
} else if (parms[0].isAssignableFrom(serviceClass)) { Object service = getService(ref); | } else if (parms[0].getName().equals(getInterfaceName())) { Object service = getService(instance, ref); | private void invokeEventMethod(Object instance, String methodName, ServiceReference ref) { if (methodName == null) { return; } Class instanceClass = instance.getClass(); Method method = null; Bundle bundle = ref.getBundle(); // the bundle where the service is... |
invokeEventMethod(iter.next(), unbindMethodName, ref); | Object instance = iter.next(); invokeEventMethod(instance, unbindMethodName, ref); ungetService(instance, ref); | public void removingService(ServiceReference ref, Object service) { if (!isSatisfied(1)) { // Will be unsatisfied by this remove. overrideUnsatisfied = true; config.referenceUnsatisfied(); overrideUnsatisfied = false; } else { // Will continue to be satisfied. ... |
ungetService(ref); | public void removingService(ServiceReference ref, Object service) { if (!isSatisfied(1)) { // Will be unsatisfied by this remove. overrideUnsatisfied = true; config.referenceUnsatisfied(); overrideUnsatisfied = false; } else { // Will continue to be satisfied. ... | |
ungetService(serviceReferences[i]); unregisterDuplexRef(serviceReferences[i]); | ungetService(instance, serviceReferences[i]); | public void unbind(Object instance) { instances.remove(instance); if (!doneBound) return; doneBound = false; if (multiple) { ServiceReference[] serviceReferences = getServiceReferences(); if (serviceReferences != null) { for (int i = servic... |
ungetService(bound); unregisterDuplexRef(bound); | ungetService(instance, bound); | public void unbind(Object instance) { instances.remove(instance); if (!doneBound) return; doneBound = false; if (multiple) { ServiceReference[] serviceReferences = getServiceReferences(); if (serviceReferences != null) { for (int i = servic... |
void ungetService(ServiceReference ref) { | void ungetService(Object bindObject, ServiceReference ref) { | void ungetService(ServiceReference ref) { synchronized (tracking) { objects.remove(ref); context.ungetService(ref); } } |
objects.remove(ref); | Object removeObject = objects.remove(ref); | void ungetService(ServiceReference ref) { synchronized (tracking) { objects.remove(ref); context.ungetService(ref); } } |
ArrayList<DuplexReference> duplexRefList = (ArrayList) ref .getProperty(org.bamja.core.impl.Constants.DUPLEX_REFERENCES); if (removeObject != null && duplexRefList != null && removeObject instanceof DuplexFactoryComponent) { ((DuplexFactoryComponent) removeObject) .ungetInstance(bindObject); } | void ungetService(ServiceReference ref) { synchronized (tracking) { objects.remove(ref); context.ungetService(ref); } } | |
Options opts = new Options("mash"); | Options opts = r.opts; | public Mash(Recipe r){ Options opts = new Options("mash"); mashRatio = opts.getDProperty("optMashRatio"); mashRatioU = opts.getProperty("optMashRatioU");; tempUnits = opts.getProperty("optMashTempU"); volUnits = opts.getProperty("optMashVolU"); grainTempF = opts.getDProperty("optGrainTemp"); boilTempF = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.