rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public DrawableSeismogram(JComponent parent, DataSetSeismogram seis, Color color){ this(parent, seis, color, seis.toString()); | public DrawableSeismogram(JComponent parent, DataSetSeismogram seis){ this(parent, seis, Color.blue); | public DrawableSeismogram(JComponent parent, DataSetSeismogram seis, Color color){ this(parent, seis, color, seis.toString()); } |
jobNames.add(job.getName()); owner.save(); | if(job!=null) { jobNames.add(job.getName()); owner.save(); } | public Job doCreateJob(StaplerRequest req, StaplerResponse rsp) throws IOException { Job job = owner.doCreateJob(req, rsp); jobNames.add(job.getName()); owner.save(); return job; } |
rsp.sendRedirect(path); | rsp.sendRedirect(URLEncoder.encode(path,"UTF-8")); | protected final void serveFile(StaplerRequest req, StaplerResponse rsp, File root, String icon, boolean serveDirIndex) throws IOException, ServletException { if(req.getQueryString()!=null) { String path = req.getParameter("path"); if(path!=null) { rsp.sendRedirect(path); ... |
rsp.sendRedirect(req.getRequestURL().append('/').toString()); | rsp.sendRedirect2(req.getRequestURL().append('/').toString()); | protected final void serveFile(StaplerRequest req, StaplerResponse rsp, File root, String icon, boolean serveDirIndex) throws IOException, ServletException { if(req.getQueryString()!=null) { String path = req.getParameter("path"); if(path!=null) { rsp.sendRedirect(path); ... |
h2.setCost(h.getCostPerU()); | private void addListeners(){ txtName.addActionListener(this); txtName.addFocusListener(this); brewerNameText.addFocusListener(this); brewerNameText.addActionListener(this); txtDate.addFocusListener(this); txtDate.addActionListener(this); txtPreBoil.addFocusListener(this); txtPreBoil.addActionListener(this); b... | |
h2.setCost(h.getCostPerU()); | public void actionPerformed(ActionEvent evt) { Hop h = (Hop) cmbHopsModel.getSelectedItem(); int i = hopsTable.getSelectedRow(); if (myRecipe != null && i != -1) { Hop h2 = myRecipe.getHop(i); h2.setAlpha(h.getAlpha()); h2.setDescription(h.getDescription()); } } | |
if (oi.getFileType().equals("")){ JOptionPane.showMessageDialog( null, "The file you've tried to open isn't a recognized format. \n" + "You can open: \n" + "StrangeBrew 1.x and Java files (.xml)\n" + "QBrew files (.qbrew)\n" + "BeerXML files (.xml)\n" + "Promash files (.rec)", "Unrecognized Format!", JOptionPane.INFOR... | private void initGUI() { try { this.setSize(600, 532); this.addWindowListener(new WindowAdapter() { public void windowClosed(WindowEvent evt) { System.exit(1); } }); { pnlMain = new JPanel(); GridBagLayout jPanel2Layout = new GridBagLayout(); jPanel2Layout.columnWeights = new double[]{0.1};... | |
exitMenuItem.setText("Exit"); | exitMenuItem.setText("Exit"); final JFrame owner = this; | private void initGUI() { try { this.setSize(600, 532); this.addWindowListener(new WindowAdapter() { public void windowClosed(WindowEvent evt) { System.exit(1); } }); { pnlMain = new JPanel(); GridBagLayout jPanel2Layout = new GridBagLayout(); jPanel2Layout.columnWeights = new double[]{0.1};... |
processWindowEvent(new WindowEvent(owner,WindowEvent.WINDOW_CLOSING)); | private void initGUI() { try { this.setSize(600, 532); this.addWindowListener(new WindowAdapter() { public void windowClosed(WindowEvent evt) { System.exit(1); } }); { pnlMain = new JPanel(); GridBagLayout jPanel2Layout = new GridBagLayout(); jPanel2Layout.columnWeights = new double[]{0.1};... | |
if (oi.getFileType().equals("")){ JOptionPane.showMessageDialog( null, "The file you've tried to open isn't a recognized format. \n" + "You can open: \n" + "StrangeBrew 1.x and Java files (.xml)\n" + "QBrew files (.qbrew)\n" + "BeerXML files (.xml)\n" + "Promash files (.rec)", "Unrecognized Format!", JOptionPane.INFOR... | 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); ... | |
processWindowEvent(new WindowEvent(owner,WindowEvent.WINDOW_CLOSING)); | public void actionPerformed(ActionEvent evt) { // exit program System.exit(0); } | |
return "alreadyTagged.jsp"; | return "alreadyTagged.jelly"; | private synchronized String chooseAction() { if(tagName!=null) return "alreadyTagged.jsp"; if(workerThread!=null) return "inProgress.jsp"; return "tagForm.jsp"; } |
return "inProgress.jsp"; return "tagForm.jsp"; | return "inProgress.jelly"; return "tagForm.jelly"; | private synchronized String chooseAction() { if(tagName!=null) return "alreadyTagged.jsp"; if(workerThread!=null) return "inProgress.jsp"; return "tagForm.jsp"; } |
public int writeRelationships(Collection tables, boolean includeImplied, LineWriter out) throws IOException { | public WriteStats writeRelationships(Table table, boolean includeImplied, boolean twoDegreesOfSeparation, LineWriter out) throws IOException { Set tablesWritten = new HashSet(); WriteStats stats = new WriteStats(); boolean[] wroteImplied = new boolean[1]; | public int writeRelationships(Collection tables, boolean includeImplied, LineWriter out) throws IOException { DotTableFormatter formatter = new DotTableFormatter(); int numWritten = 0; writeDotHeader(includeImplied ? "allRelationshipsGraph" : "realRelationshipsGraph", out); Iterator iter... |
int numWritten = 0; writeDotHeader(includeImplied ? "allRelationshipsGraph" : "realRelationshipsGraph", out); | public int writeRelationships(Collection tables, boolean includeImplied, LineWriter out) throws IOException { DotTableFormatter formatter = new DotTableFormatter(); int numWritten = 0; writeDotHeader(includeImplied ? "allRelationshipsGraph" : "realRelationshipsGraph", out); Iterator iter... | |
Iterator iter = tables.iterator(); | writeDotHeader(includeImplied ? "impliedTwoDegreesRelationshipsGraph" : (twoDegreesOfSeparation ? "twoDegreesRelationshipsGraph" : "oneDegreeRelationshipsGraph"), out); | public int writeRelationships(Collection tables, boolean includeImplied, LineWriter out) throws IOException { DotTableFormatter formatter = new DotTableFormatter(); int numWritten = 0; writeDotHeader(includeImplied ? "allRelationshipsGraph" : "realRelationshipsGraph", out); Iterator iter... |
Table table = (Table)iter.next(); if (!table.isOrphan(includeImplied)) { formatter.writeNode(table, "tables/", true, false, false, out); ++numWritten; | Table relatedTable = (Table)iter.next(); if (!tablesWritten.add(relatedTable)) continue; formatter.writeNode(relatedTable, "", true, false, false, out); stats.wroteTable(relatedTable); relationships.addAll(formatter.getRelationships(relatedTable, table, includeImplied)); } if (twoDegreesOfSeparation) { iter = relate... | public int writeRelationships(Collection tables, boolean includeImplied, LineWriter out) throws IOException { DotTableFormatter formatter = new DotTableFormatter(); int numWritten = 0; writeDotHeader(includeImplied ? "allRelationshipsGraph" : "realRelationshipsGraph", out); Iterator iter... |
Set relationships = new TreeSet(); iter = tables.iterator(); while (iter.hasNext()) relationships.addAll(formatter.getRelationships((Table)iter.next(), includeImplied)); iter = relationships.iterator(); | iter = new TreeSet(relationships).iterator(); | public int writeRelationships(Collection tables, boolean includeImplied, LineWriter out) throws IOException { DotTableFormatter formatter = new DotTableFormatter(); int numWritten = 0; writeDotHeader(includeImplied ? "allRelationshipsGraph" : "realRelationshipsGraph", out); Iterator iter... |
return numWritten; | stats.setWroteImplied(wroteImplied[0]); return stats; | public int writeRelationships(Collection tables, boolean includeImplied, LineWriter out) throws IOException { DotTableFormatter formatter = new DotTableFormatter(); int numWritten = 0; writeDotHeader(includeImplied ? "allRelationshipsGraph" : "realRelationshipsGraph", out); Iterator iter... |
else if (qName.equalsIgnoreCase("NAME") && currentList.equalsIgnoreCase("DETAILS")) { r.setName(buffer); buffer=""; } | public void endElement(String namespaceURI, String sName, // simple name String qName // qualified name ) throws SAXException { if (importType == "STRANGEBREW") { if (qName.equalsIgnoreCase("ITEM") && currentList.equalsIgnoreCase("FERMENTABLES")) { r.addMalt(m); m = null; } else if (qName.equalsIgnore... | |
r.setName(s); | buffer = buffer + s; | void sbCharacters(String s){ if (currentList.equals("FERMENTABLES")) { if (currentElement.equalsIgnoreCase("MALT")) { m.setName(s); } else if (currentElement.equalsIgnoreCase("AMOUNT")) { m.setAmount(Double.parseDouble(s)); } else if (currentElement.equalsIgnoreCase("POINTS")) { m.setPppg(Double.parseD... |
String cmd = DESCRIPTOR.getSvnExe()+" info "+subject; | String cmd = DESCRIPTOR.getSvnExe()+" info --xml "+subject; | public static SvnInfo parse(String subject, Map env, FilePath workspace, TaskListener listener) throws IOException { String cmd = DESCRIPTOR.getSvnExe()+" info "+subject; listener.getLogger().println("$ "+cmd); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ... |
BufferedReader br = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(baos.toByteArray()))); String line; while((line=br.readLine())!=null) { if(line.startsWith("Revision:")) { info.revision = Integer.parseInt( line.substring("Revision: ".length()).trim()); } if(line.startsWith("URL:")) { info.url = lin... | Digester digester = new Digester(); digester.push(info); digester.addBeanPropertySetter("info/entry/url"); digester.addSetProperties("info/entry","revision","revision"); try { digester.parse(new ByteArrayInputStream(baos.toByteArray())); } catch (SAXException e) { listener.getLogger().write(baos.toByteArray()); e.pr... | public static SvnInfo parse(String subject, Map env, FilePath workspace, TaskListener listener) throws IOException { String cmd = DESCRIPTOR.getSvnExe()+" info "+subject; listener.getLogger().println("$ "+cmd); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ... |
throw new IOException("no revision in the svn info output"); | throw new IOException("No revision in the svn info output"); | public static SvnInfo parse(String subject, Map env, FilePath workspace, TaskListener listener) throws IOException { String cmd = DESCRIPTOR.getSvnExe()+" info "+subject; listener.getLogger().println("$ "+cmd); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ... |
public SeismogramIterator(String name, LocalSeismogramImpl[] seismograms, MicroSecondTimeRange timeRange){ this.name = name; if(seismograms.length > 0){ LocalSeismogramImpl[] seis = this.seismograms = DisplayUtils.sortByDate(seismograms); MicroSecondDate startTime = seis[0].getBeginTime(); MicroSecondDate endTime = sei... | public SeismogramIterator(String name, LocalSeismogramImpl[] seismograms){ this(name, seismograms, DisplayUtils.getFullTime(seismograms)); | public SeismogramIterator(String name, LocalSeismogramImpl[] seismograms, MicroSecondTimeRange timeRange){ this.name = name; if(seismograms.length > 0){ LocalSeismogramImpl[] seis = this.seismograms = DisplayUtils.sortByDate(seismogr... |
System.out.println(this + " getting value at"); | public QuantityImpl getValueAt(int position){ try{ System.out.println(this + " getting value at"); Object[] seisAndPoint = getSeisAtWithInternal(position); LocalSeismogramImpl seis = (LocalSeismogramImpl)seisAndPoint[0]; Integer point = (Integer)seisAndPoint[1]; ... | |
} catch (Exception e) { e.printStackTrace(); System.err.println( "Native SQLite not found, falling back to Nested SQLite"); } | } catch (Exception e) { } | public Conn(String url, String filename) throws SQLException { // TODO: library variable to explicitly control load type // attempt to use the Native library first try { Class nativedb = Class.forName("org.sqlite.NativeDB"); if (((Boolean)nativedb.getDeclaredMethod("load",... |
R first = m.get(m.firstKey()); | private R update(TreeMap<Integer, R> m, Integer key, R value) { R r = m.put(key, value); SortedMap<Integer,R> head = m.headMap(key); if(!head.isEmpty()) { R prev = m.get(head.lastKey()); value.nextBuild = prev.nextBuild; value.previousBuild = prev; if... | |
UnitImpl realWorldUnit = ur.getUnit(); float sensitivity = 1.0f; if(realWorldUnit.equals(UnitImpl.COUNT)){ | UnitRangeImpl out = ur; if(ur.getUnit().isConvertableTo(UnitImpl.COUNT)){ | public static UnitRangeImpl getRealWorldUnitRange(UnitRangeImpl ur, DataSetSeismogram seismo) { UnitImpl realWorldUnit = ur.getUnit(); // this is the constant to divide by to get real worl units (not counts) float sensitivity = 1.0f; if(realWorldUnit.equals(UnitImpl.COUNT)){ O... |
realWorldUnit = (UnitImpl)response.stages[0].input_units; sensitivity = response.the_sensitivity.sensitivity_factor; | UnitImpl realWorldUnit = (UnitImpl)response.stages[0].input_units; float sensitivity = response.the_sensitivity.sensitivity_factor; out = new UnitRangeImpl(ur.getMinValue()/sensitivity, ur.getMaxValue()/sensitivity, realWorldUnit); | public static UnitRangeImpl getRealWorldUnitRange(UnitRangeImpl ur, DataSetSeismogram seismo) { UnitImpl realWorldUnit = ur.getUnit(); // this is the constant to divide by to get real worl units (not counts) float sensitivity = 1.0f; if(realWorldUnit.equals(UnitImpl.COUNT)){ O... |
UnitRangeImpl out = new UnitRangeImpl(ur.getMinValue()/sensitivity, ur.getMaxValue()/sensitivity, realWorldUnit); | public static UnitRangeImpl getRealWorldUnitRange(UnitRangeImpl ur, DataSetSeismogram seismo) { UnitImpl realWorldUnit = ur.getUnit(); // this is the constant to divide by to get real worl units (not counts) float sensitivity = 1.0f; if(realWorldUnit.equals(UnitImpl.COUNT)){ O... | |
final void powN(int n){ | final void powN(short n){ | final void powN(int n){ double r = stack[--sp]; switch(n){ case 0: r = 1.0; break; case 1: break; case 2: r *= r; break; case 3: r *= r*r; break; case 4: r *= r*r*r; break; case 5: r *= r*r*r*r; break; default: r = Math.pow(r,n); break; } stack[sp++] = r; } |
r = Math.pow(r,n); break; | { short bitMask = n; double evenPower = r; double result; if ( (bitMask & 1) != 0 ) result = r; else result = 1; bitMask >>>= 1; while ( bitMask != 0 ) { evenPower *= evenPower; if ( (bitMask & 1) != 0 ) result *= evenPower; bitMask >>>= 1; } r = result; } | final void powN(int n){ double r = stack[--sp]; switch(n){ case 0: r = 1.0; break; case 1: break; case 2: r *= r; break; case 3: r *= r*r; break; case 4: r *= r*r*r; break; case 5: r *= r*r*r*r; break; default: r = Math.pow(r,n); break; } stack[sp++] = r; } |
case FUN2: binaryFunction(aux1); break; case FUN3: trianaryFunction(aux1); break; case FUN4: quarteraryFunction(aux1); break; case POWN: scalerStore.powN(aux1); break; case RECIP: scalerStore.recroprical(); break; | public final double evaluate(RpCommandList comList) { scalerStore.reset(); // Now actually process the commands int num = comList.getNumCommands(); for(short commandNum=0;commandNum<num;++commandNum) { RpCommand command = comList.commands[commandNum]; short aux1 = command.aux1; switch(command.command) { ... | |
case ATAN2: return "atan2"; case IF: return "if"; | public String getFunction(short ref) { switch(ref) { case SIN: return "sin"; case COS: return "cos"; case TAN: return "tan"; case ASIN: return "asin"; case ACOS: return "acos"; case ATAN: return "atan"; case SINH: return "sinh"; case COSH: return "cosh"; case TANH: return "tanh"; case ASINH: retu... | |
for(int i=0;i<param2.getDim().numEles();++i) | for(int i=0;i<param1.getDim().numEles();++i) | public MatrixValueI calcValue(MatrixValueI res,MatrixValueI param1,MatrixValueI param2) throws ParseException { if(param1 instanceof Scaler) { if(param2 instanceof Scaler) { // Scaler * Scaler -> Scaler res.setEle(0,super.mul(param1.getEle(0),param2.getEle(0))); } else if(param2 instanceof MVector) { ... |
if (param instanceof Number) | if (param instanceof Complex) { return ((Complex)param).acosh(); } else if (param instanceof Number) | public Object acosh(Object param) throws ParseException { if (param instanceof Number) { Complex temp = new Complex(((Number)param).doubleValue(),0.0); return temp.acosh(); } else if (param instanceof Complex) { return ((Complex)param).acosh(); } throw new ParseException("Invalid parameter type"); } |
else if (param instanceof Complex) { return ((Complex)param).acosh(); } | public Object acosh(Object param) throws ParseException { if (param instanceof Number) { Complex temp = new Complex(((Number)param).doubleValue(),0.0); return temp.acosh(); } else if (param instanceof Complex) { return ((Complex)param).acosh(); } throw new ParseException("Invalid parameter type"); } | |
int i = n / rows; int j = n % rows; | int i = n / cols; int j = n % cols; | public Object getEle(int n) { int i = n / rows; int j = n % rows; return data[i][j]; } |
int i = n / rows; int j = n % rows; | int i = n / cols; int j = n % cols; | public void setEle(int n,Object value) { int i = n / rows; int j = n % rows; data[i][j] = value; } |
JSpinner maltSpin = new JSpinner(); maltColumn.setCellEditor(new SpinnerEditor()); | SpinnerNumberModel spnMaltAmntModel = new SpinnerNumberModel(1.00,0.00,9999.00,0.25 ); maltColumn.setCellEditor(new SpinnerEditor(spnMaltAmntModel)); | private void initGUI() { try { this.setSize(520, 532); this.addWindowListener(new WindowAdapter() { public void windowClosed(WindowEvent evt) { System.exit(1); } }); { pnlMain = new JPanel(); GridBagLayout jPanel2Layout = new GridBagLayout(); jPanel2Layout.columnWeights = new double[]{0.1};... |
BorderLayout tblHopsLayout = new BorderLayout(); tblHops.setLayout(tblHopsLayout); | private void initGUI() { try { this.setSize(520, 532); this.addWindowListener(new WindowAdapter() { public void windowClosed(WindowEvent evt) { System.exit(1); } }); { pnlMain = new JPanel(); GridBagLayout jPanel2Layout = new GridBagLayout(); jPanel2Layout.columnWeights = new double[]{0.1};... | |
if(r!=0) | if(r!=0) { listener.getLogger().write(baos.toByteArray()); | public static SvnInfo parse(String subject, Map env, FilePath workspace, TaskListener listener) throws IOException { String cmd = DESCRIPTOR.getSvnExe()+" info "+subject; listener.getLogger().println("$ "+cmd); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ... |
} | public static SvnInfo parse(String subject, Map env, FilePath workspace, TaskListener listener) throws IOException { String cmd = DESCRIPTOR.getSvnExe()+" info "+subject; listener.getLogger().println("$ "+cmd); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ... | |
Map env = createEnvVarMap(); | Map env = createEnvVarMap(false); | private Map<String,SvnInfo> buildRevisionMap(FilePath workspace, TaskListener listener) throws IOException { PrintStream logger = listener.getLogger(); Map<String/*module name*/,SvnInfo> revisions = new HashMap<String,SvnInfo>(); Map env = createEnvVarMap(); // invoke the "svn info" ... |
Map env = createEnvVarMap(); | Map env = createEnvVarMap(true); | private boolean calcChangeLog(Build build, File changelogFile, Launcher launcher, BuildListener listener) throws IOException { if(build.getPreviousBuild()==null) { // nothing to compare against return createEmptyChangeLog(changelogFile, listener, "log"); } PrintStream logg... |
Map env = createEnvVarMap(); | Map env = createEnvVarMap(false); | public boolean pollChanges(Project project, Launcher launcher, FilePath workspace, TaskListener listener) throws IOException { // current workspace revision Map<String,SvnInfo> wsRev = buildRevisionMap(workspace,listener); Map env = createEnvVarMap(); // check the corresponding remote re... |
colourPanel.setBackground(Recipe.calcRGB(1, myRecipe.getSrm(), | colourPanel.setBackground(Recipe.calcRGB(1, colour, | 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... |
colourPanel.setBackground(Recipe.calcRGB(2, myRecipe.getSrm(), | colourPanel.setBackground(Recipe.calcRGB(2, colour, | 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... |
exploreFileBtn.setIcon( iconPack.getIcon("Download.Overview.Explore") ); | if ( exploreFileBtn != null ) { exploreFileBtn.setIcon( iconPack.getIcon("Download.Overview.Explore") ); } | private void setupIcons() { IconPack iconPack = GUIRegistry.getInstance().getPlafIconPack(); defProgressIcon = iconPack.getIcon( "Download.Overview.Progress" ); twinkleProgressIcon = iconPack.getIcon( "Download.Overview.ProgressAni" ); progressIconLabel.setIcon( defPro... |
return success(); | return error(); | public Event nonUnique(RequestContext context) { IdentityForm form = doGetForm(context); //TODO non unique identity return success(); } |
symTab = null; | public EvaluatorVisitor() { debug = false; errorList = null; stack = new Stack(); } | |
public Object getValue(Node topNode, Vector errorList_in, SymbolTable symTab_in) throws Exception { | public Object getValue(Node topNode, Vector errorList_in, SymbolTable symTab_in) throws Exception { if (topNode == null) { throw new IllegalArgumentException( "topNode parameter is null"); } if (symTab_in == null) { throw new IllegalArgumentException( "symTab_in parameter is null"); } | public Object getValue(Node topNode, Vector errorList_in, SymbolTable symTab_in) throws Exception { errorList = errorList_in; symTab = symTab_in; if (topNode == null) { throw new Exception( "EvaluatorVisitor.getValue(): topNode parameter is null"); } errorFlag = false; // evaluate by letti... |
if (topNode == null) { throw new Exception( "EvaluatorVisitor.getValue(): topNode parameter is null"); } | errorFlag = false; | public Object getValue(Node topNode, Vector errorList_in, SymbolTable symTab_in) throws Exception { errorList = errorList_in; symTab = symTab_in; if (topNode == null) { throw new Exception( "EvaluatorVisitor.getValue(): topNode parameter is null"); } errorFlag = false; // evaluate by letti... |
errorFlag = false; | public Object getValue(Node topNode, Vector errorList_in, SymbolTable symTab_in) throws Exception { errorList = errorList_in; symTab = symTab_in; if (topNode == null) { throw new Exception( "EvaluatorVisitor.getValue(): topNode parameter is null"); } errorFlag = false; // evaluate by letti... | |
public QueryResponseMsg( MsgHeader header, byte[] aBody ) throws InvalidMessageException | public QueryResponseMsg( MsgHeader header, GUID clientID, DestAddress aHostAddress, int speed, QueryResponseRecord records[] ) | public QueryResponseMsg( MsgHeader header, byte[] aBody ) throws InvalidMessageException { super( header ); getHeader().setPayloadType(MsgHeader.QUERY_HIT_PAYLOAD); body = aBody; header.setDataLength( body.length ); // validate port int port = IOUtil.unsigned... |
body = aBody; header.setDataLength( body.length ); | remoteClientID = clientID; destAddress = aHostAddress; remoteHostSpeed = speed; this.records = records; | public QueryResponseMsg( MsgHeader header, byte[] aBody ) throws InvalidMessageException { super( header ); getHeader().setPayloadType(MsgHeader.QUERY_HIT_PAYLOAD); body = aBody; header.setDataLength( body.length ); // validate port int port = IOUtil.unsigned... |
int port = IOUtil.unsignedShort2Int( IOUtil.deserializeShortLE( body, 1 ) ); destAddress = new DefaultDestAddress( getHostIP(), port ); if ( !destAddress.isValidAddress() ) | pushProxyAddresses = HostManager.getInstance(). getNetworkHostsContainer().getPushProxies(); boolean isPushNeeded; if ( NetworkManager.getInstance().hasConnectedIncoming() ) | public QueryResponseMsg( MsgHeader header, byte[] aBody ) throws InvalidMessageException { super( header ); getHeader().setPayloadType(MsgHeader.QUERY_HIT_PAYLOAD); body = aBody; header.setDataLength( body.length ); // validate port int port = IOUtil.unsigned... |
throw new InvalidMessageException( "Invalid address: " + destAddress ); | isPushNeeded = false; pushNeededFlag = QHD_FALSE_FLAG; | public QueryResponseMsg( MsgHeader header, byte[] aBody ) throws InvalidMessageException { super( header ); getHeader().setPayloadType(MsgHeader.QUERY_HIT_PAYLOAD); body = aBody; header.setDataLength( body.length ); // validate port int port = IOUtil.unsigned... |
isParsed = false; | else { isPushNeeded = true; pushNeededFlag = QHD_TRUE_FLAG; } boolean isServerBusy = UploadManager.getInstance().isHostBusy(); try { buildBody( isPushNeeded, isServerBusy ); } catch (IOException e) { NLogger.error(NLoggerNames.MESSAGE_ENCODE_DECODE, e, e); } getHeader().setDataLength( body.length ); isParsed = true; | public QueryResponseMsg( MsgHeader header, byte[] aBody ) throws InvalidMessageException { super( header ); getHeader().setPayloadType(MsgHeader.QUERY_HIT_PAYLOAD); body = aBody; header.setDataLength( body.length ); // validate port int port = IOUtil.unsigned... |
public boolean mkdirs() { return local.mkdirs(); | public void mkdirs() throws IOException { if(!local.mkdirs()) throw new IOException("Failed to mkdirs: "+local); | public boolean mkdirs() { return local.mkdirs(); } |
if ((param1 instanceof Complex) && (param2 instanceof Complex)) | Object res=null; switch(id) | public void run(Stack inStack) throws ParseException { checkStack(inStack);// check the stack Object param2 = inStack.pop(); Object param1 = inStack.pop(); if ((param1 instanceof Complex) && (param2 instanceof Complex)) { int r; switch (id) { case NE: r = ((Complex)param1).equals((Complex)pa... |
int r; switch (id) { case NE: r = ((Complex)param1).equals((Complex)param2,tolerance) ? 0 : 1; break; case EQ: r = ((Complex)param1).equals((Complex)param2,tolerance) ? 1 : 0; break; default: throw new ParseException("Relational operator type error"); } inStack.push(new Double(r)); | case LT: res = lt(param1,param2); break; case GT: res = gt(param1,param2); break; case LE: res = le(param1,param2); break; case GE: res = ge(param1,param2); break; case NE: res = ne(param1,param2); break; case EQ: res = eq(param1,param2); break; | public void run(Stack inStack) throws ParseException { checkStack(inStack);// check the stack Object param2 = inStack.pop(); Object param1 = inStack.pop(); if ((param1 instanceof Complex) && (param2 instanceof Complex)) { int r; switch (id) { case NE: r = ((Complex)param1).equals((Complex)pa... |
else if ((param1 instanceof Number) && (param2 instanceof Number)) { double x = ((Number)param1).doubleValue(); double y = ((Number)param2).doubleValue(); int r; switch (id) { case LT: r = (x<y) ? 1 : 0; break; case GT: r = (x>y) ? 1 : 0; break; case LE: r = (x<=y) ? 1 : 0; break; case GE: r = (x>=y) ? 1 : 0; break; c... | inStack.push(res); | public void run(Stack inStack) throws ParseException { checkStack(inStack);// check the stack Object param2 = inStack.pop(); Object param1 = inStack.pop(); if ((param1 instanceof Complex) && (param2 instanceof Complex)) { int r; switch (id) { case NE: r = ((Complex)param1).equals((Complex)pa... |
public synchronized SeismogramIterator getIterator(MicroSecondTimeRange timeRange){ if(softIterator != null){ SeismogramIterator it = (SeismogramIterator)softIterator.get(); if(!changed && it != null){ if(it.getTimeRange().equals(timeRange)){ return it; }else if(timeRange != null){ it.setTimeRange(timeRange); return i... | public synchronized SeismogramIterator getIterator(){ return getIterator(DisplayUtils.getFullTime(getSeismograms())); | public synchronized SeismogramIterator getIterator(MicroSecondTimeRange timeRange){ //logger.debug("Getting Iterator"); if(softIterator != null){ SeismogramIterator it = (SeismogramIterator)softIterator.get(); if(!changed && it != null){ if(it.getTimeRange().equals... |
return new Double(SBStringUtils.df1.format(data .getMaltAmountAs(row, data.getMaltUnits(row)))); | return SBStringUtils.df1.format(data .getMaltAmountAs(row, data.getMaltUnits(row))); | public Object getValueAt(int row, int col) { // Fermentable m = (Fermentable) data.get(row); try { switch (col) { case 0 : return data.getMaltName(row); case 1 : return new Double(SBStringUtils.df1.format(data .getMaltAmountAs(row, data.getMaltUnits(row)))); case 2 : return data.getMaltU... |
return new Double(SBStringUtils.df3.format(data.getMaltPppg(row))); | return SBStringUtils.df3.format(data.getMaltPppg(row)); | public Object getValueAt(int row, int col) { // Fermentable m = (Fermentable) data.get(row); try { switch (col) { case 0 : return data.getMaltName(row); case 1 : return new Double(SBStringUtils.df1.format(data .getMaltAmountAs(row, data.getMaltUnits(row)))); case 2 : return data.getMaltU... |
return new Double(SBStringUtils.df0.format(data.getMaltLov(row))); | return SBStringUtils.df0.format(data.getMaltLov(row)); | public Object getValueAt(int row, int col) { // Fermentable m = (Fermentable) data.get(row); try { switch (col) { case 0 : return data.getMaltName(row); case 1 : return new Double(SBStringUtils.df1.format(data .getMaltAmountAs(row, data.getMaltUnits(row)))); case 2 : return data.getMaltU... |
QueryResponseRecord rec; ArrayList newHitList = new ArrayList( ); int recordCount = msg.getRecordCount(); for (int i = 0; i < recordCount; i++) { rec = msg.getMsgRecord(i); | QueryResponseRecord[] records = msg.getMsgRecords(); ArrayList<RemoteFile> newHitList = new ArrayList<RemoteFile>( records.length ); for (int i = 0; i < records.length; i++) { | public void processResponse( QueryResponseMsg msg ) { SwarmingManager swarmingMgr = SwarmingManager.getInstance(); long speed = msg.getRemoteHostSpeed(); GUID rcID = msg.getRemoteClientID(); DestAddress address = msg.getDestAddress(); QueryHitHost qhHost = new QueryHitH... |
snoopDownloadCandidates( swarmingMgr, qhHost, rec ); | snoopDownloadCandidates( swarmingMgr, qhHost, records[i] ); | public void processResponse( QueryResponseMsg msg ) { SwarmingManager swarmingMgr = SwarmingManager.getInstance(); long speed = msg.getRemoteHostSpeed(); GUID rcID = msg.getRemoteClientID(); DestAddress address = msg.getDestAddress(); QueryHitHost qhHost = new QueryHitH... |
monitorPassiveSearch( qhHost, rec, newHitList ); | monitorPassiveSearch( qhHost, records[i], newHitList ); | public void processResponse( QueryResponseMsg msg ) { SwarmingManager swarmingMgr = SwarmingManager.getInstance(); long speed = msg.getRemoteHostSpeed(); GUID rcID = msg.getRemoteClientID(); DestAddress address = msg.getDestAddress(); QueryHitHost qhHost = new QueryHitH... |
if (param1 instanceof Number) | if (param1 instanceof Complex) | public Object mul(Object param1, Object param2) throws ParseException { if (param1 instanceof Number) { if (param2 instanceof Number) return mul((Number)param1, (Number)param2); else if (param2 instanceof Complex) return mul((Complex)param2, (Number)param1); else if (param2 instanceof Vector) return ... |
if (param2 instanceof Number) return mul((Number)param1, (Number)param2); else if (param2 instanceof Complex) return mul((Complex)param2, (Number)param1); else if (param2 instanceof Vector) return mul((Vector)param2, (Number)param1); } else if (param1 instanceof Complex) { if (param2 instanceof Number) | if (param2 instanceof Complex) return mul((Complex)param1, (Complex)param2); else if (param2 instanceof Number) | public Object mul(Object param1, Object param2) throws ParseException { if (param1 instanceof Number) { if (param2 instanceof Number) return mul((Number)param1, (Number)param2); else if (param2 instanceof Complex) return mul((Complex)param2, (Number)param1); else if (param2 instanceof Vector) return ... |
else if (param2 instanceof Complex) return mul((Complex)param1, (Complex)param2); | public Object mul(Object param1, Object param2) throws ParseException { if (param1 instanceof Number) { if (param2 instanceof Number) return mul((Number)param1, (Number)param2); else if (param2 instanceof Complex) return mul((Complex)param2, (Number)param1); else if (param2 instanceof Vector) return ... | |
if (param2 instanceof Number) | if (param2 instanceof Complex) return mul((Vector)param1, (Complex)param2); else if (param2 instanceof Number) | public Object mul(Object param1, Object param2) throws ParseException { if (param1 instanceof Number) { if (param2 instanceof Number) return mul((Number)param1, (Number)param2); else if (param2 instanceof Complex) return mul((Complex)param2, (Number)param1); else if (param2 instanceof Vector) return ... |
else if (param2 instanceof Complex) return mul((Vector)param1, (Complex)param2); | public Object mul(Object param1, Object param2) throws ParseException { if (param1 instanceof Number) { if (param2 instanceof Number) return mul((Number)param1, (Number)param2); else if (param2 instanceof Complex) return mul((Complex)param2, (Number)param1); else if (param2 instanceof Vector) return ... | |
public SWDownloadCandidate(DestAddress address, URI downloadUri, SWDownloadFile file) throws URIException | public SWDownloadCandidate( RemoteFile remoteFile, SWDownloadFile aDownloadFile ) | public SWDownloadCandidate(DestAddress address, URI downloadUri, SWDownloadFile file) throws URIException { availableScopeList = null; downloadFile = file; fileName = URLUtil.getPathQueryFromUri( downloadUri ); this.downloadURI = downloadUri; resourceURN = URLUti... |
downloadFile = file; fileName = URLUtil.getPathQueryFromUri( downloadUri ); this.downloadURI = downloadUri; resourceURN = URLUtil.getQueryURN( downloadUri ); guid = null; vendor = null; isPushNeeded = false; isChatSupported = true; hostAddress = address; | downloadFile = aDownloadFile; fileIndex = remoteFile.getFileIndex(); fileName = remoteFile.getFilename(); resourceURN = remoteFile.getURN(); guid = remoteFile.getRemoteClientID(); QueryHitHost qhHost = remoteFile.getQueryHitHost(); vendor = qhHost.getVendor(); isPushNeeded = qhHost.isPushNeeded(); hostAddress = remoteF... | public SWDownloadCandidate(DestAddress address, URI downloadUri, SWDownloadFile file) throws URIException { availableScopeList = null; downloadFile = file; fileName = URLUtil.getPathQueryFromUri( downloadUri ); this.downloadURI = downloadUri; resourceURN = URLUti... |
Object getService() { | Object getService(Object bindObject) { | Object getService() { synchronized (tracking) { if (tracking.isEmpty()) { return null; } return getService((ServiceReference) tracking.get(0)); } } |
return getService((ServiceReference) tracking.get(0)); | return getService(bindObject, (ServiceReference) tracking.get(0)); | Object getService() { synchronized (tracking) { if (tracking.isEmpty()) { return null; } return getService((ServiceReference) tracking.get(0)); } } |
if (cached != null) { objects.put(ref, cached); | } else { Object tmp = ref.getProperty(Constants.SERVICE_RANKING); int refInt = (tmp instanceof Integer) ? ((Integer) tmp) .intValue() : 0; Long refId = (Long) ref.getProperty(Constants.SERVICE_ID); int i = 0; for (int n = tracking.size(); i < n; i++) { ServiceReference challenger = (ServiceReference) tracking .get(i)... | private void includeService(ServiceReference ref, Object cached) { synchronized (tracking) { if (tracking.isEmpty()) { tracking.add(0, ref); if (cached != null) { objects.put(ref, cached); } return; } ... |
return; | tracking.add(i, ref); | private void includeService(ServiceReference ref, Object cached) { synchronized (tracking) { if (tracking.isEmpty()) { tracking.add(0, ref); if (cached != null) { objects.put(ref, cached); } return; } ... |
Object tmp = ref.getProperty(Constants.SERVICE_RANKING); int refInt = (tmp instanceof Integer) ? ((Integer) tmp).intValue() : 0; Long refId = (Long) ref.getProperty(Constants.SERVICE_ID); int i = 0; for (int n = tracking.size(); i < n; i++) { ServiceReference challenger = (ServiceReference) tracking .get(i); tmp = cha... | if (cached != null) { objects.put(ref, cached); | private void includeService(ServiceReference ref, Object cached) { synchronized (tracking) { if (tracking.isEmpty()) { tracking.add(0, ref); if (cached != null) { objects.put(ref, cached); } return; } ... |
tracking.add(i, ref); objects.put(ref, cached); | private void includeService(ServiceReference ref, Object cached) { synchronized (tracking) { if (tracking.isEmpty()) { tracking.add(0, ref); if (cached != null) { objects.put(ref, cached); } return; } ... | |
.getProperty(org.bamja.core.impl.Constants.DUPLEX_REFERENCE); | .getProperty(org.bamja.core.impl.Constants.DUPLEX_REFERENCES); | public void serviceChanged(ServiceEvent event) { ServiceReference ref = event.getServiceReference(); ArrayList<DuplexReference> duplexRefList = (ArrayList) ref .getProperty(org.bamja.core.impl.Constants.DUPLEX_REFERENCE); if (duplexRefList != null) { Class implClass = ... |
ArrayList<String> classes = new ArrayList<String>(); | if (implClass == null) return; ArrayList<String> allClassnames = new ArrayList<String>(); | public void serviceChanged(ServiceEvent event) { ServiceReference ref = event.getServiceReference(); ArrayList<DuplexReference> duplexRefList = (ArrayList) ref .getProperty(org.bamja.core.impl.Constants.DUPLEX_REFERENCE); if (duplexRefList != null) { Class implClass = ... |
classes.add(superClass.getName()); } for (Class c : implClass.getInterfaces()) { classes.add(c.getName()); | allClassnames.add(superClass.getName()); scanInterfaces(superClass, allClassnames); | public void serviceChanged(ServiceEvent event) { ServiceReference ref = event.getServiceReference(); ArrayList<DuplexReference> duplexRefList = (ArrayList) ref .getProperty(org.bamja.core.impl.Constants.DUPLEX_REFERENCE); if (duplexRefList != null) { Class implClass = ... |
if (!classes.contains(duplexRef.getInterfaceName()) | if (!allClassnames.contains(duplexRef.getInterfaceName()) | public void serviceChanged(ServiceEvent event) { ServiceReference ref = event.getServiceReference(); ArrayList<DuplexReference> duplexRefList = (ArrayList) ref .getProperty(org.bamja.core.impl.Constants.DUPLEX_REFERENCE); if (duplexRefList != null) { Class implClass = ... |
for (Project p : blockedProjects) { | Iterator<Project> itr = blockedProjects.iterator(); while(itr.hasNext()) { Project p = itr.next(); | private synchronized void maintain() { for (Project p : blockedProjects) { Build lastBuild = p.getLastBuild(); if (lastBuild == null || !lastBuild.isBuilding()) { // ready to be executed blockedProjects.remove(p); buildables.add(p); ... |
blockedProjects.remove(p); | itr.remove(); | private synchronized void maintain() { for (Project p : blockedProjects) { Build lastBuild = p.getLastBuild(); if (lastBuild == null || !lastBuild.isBuilding()) { // ready to be executed blockedProjects.remove(p); buildables.add(p); ... |
queue.remove(top); blockedProjects.add(top.project); | private synchronized void maintain() { for (Project p : blockedProjects) { Build lastBuild = p.getLastBuild(); if (lastBuild == null || !lastBuild.isBuilding()) { // ready to be executed blockedProjects.remove(p); buildables.add(p); ... | |
LargeText text = new LargeText(getLogFile(),completed); | File logFile = getLogFile(); if(!logFile.exists()) { rsp.addHeader("X-Text-Size","0"); rsp.addHeader("X-More-Data","true"); return; } LargeText text = new LargeText(logFile,completed); | public void doProgressiveLog( StaplerRequest req, StaplerResponse rsp) throws IOException { rsp.setContentType("text/plain"); rsp.setCharacterEncoding("UTF-8"); rsp.setStatus(HttpServletResponse.SC_OK); boolean completed = !isBuilding(); LargeText text = new LargeText(getLogFile()... |
this.bc = bc; | Activator.bc = bc; | public void start(BundleContext bc) throws Exception { this.bc = bc; log = new LogRef(bc); SCR.init(bc); } |
r.put(p,getDownstreamRelationship(p)); | if(p.isFingerprintConfigured()) r.put(p,getDownstreamRelationship(p)); | public Map<Project,RangeSet> getDownstreamBuilds() { Map<Project,RangeSet> r = new HashMap<Project,RangeSet>(); for (Project p : getParent().getDownstreamProjects()) { r.put(p,getDownstreamRelationship(p)); } return r; } |
res.setDim(Dimensions.ONE); | res.setDim(calcDim(name,pfmc,arguments)); | public ASTFunNode buildFunctionNode(String name,PostfixMathCommandI pfmc,Node[] arguments) throws ParseException { ASTMFunNode res = new ASTMFunNode(ParserTreeConstants.JJTFUNNODE); res.setFunction(name,pfmc); copyChildren(res,arguments); // TODO whats the dim? res.setDim(Dimensions.ONE); return res; } |
public void shaleTime(double shift, double scale, DataSetSeismogram[] seismos){ this.shift += shift * this.scale; this.scale *= scale; time = time.shale(shift, scale); for(int i = 0; i < seismos.length; i++){ seismoTimes.put(seismos[i], time); } fireTimeEvent(); | public void shaleTime(double shift, double scale){ shaleTime(shift, scale, getSeismograms()); | public void shaleTime(double shift, double scale, DataSetSeismogram[] seismos){ this.shift += shift * this.scale; this.scale *= scale; time = time.shale(shift, scale); for(int i = 0; i < seismos.length; i++){ seismoTimes.put(seismos[i], time); } fireTimeEvent(); } |
while(r!=null && r.getResult()!=null && (r.isBuilding() || r.getResult().isWorseThan(Result.UNSTABLE))) | while(r!=null && r.getResult()==null && (r.isBuilding() || r.getResult().isWorseThan(Result.UNSTABLE))) | public synchronized RunT getLastSuccessfulBuild() { RunT r = getLastBuild(); // temporary hack till we figure out what's causing this bug while(r!=null && r.getResult()!=null && (r.isBuilding() || r.getResult().isWorseThan(Result.UNSTABLE))) r=r.getPreviousBuild(); return r; ... |
MicroSecondDate now = new MicroSecondDate(); | MicroSecondDate now = new MicroSecondDate().add(offset); | public void startTimer() { if (timer == null) { timer = new javax.swing.Timer((int)update.convertTo(UnitImpl.MILLISECOND).value, new ActionListener() { public void actionPerformed(ActionEvent e) { if (beginTime != null && speed != 0) { MicroSecondDate now = new MicroSecondDate(); Tim... |
timeInterval = timeInterval.add(offset); | public void startTimer() { if (timer == null) { timer = new javax.swing.Timer((int)update.convertTo(UnitImpl.MILLISECOND).value, new ActionListener() { public void actionPerformed(ActionEvent e) { if (beginTime != null && speed != 0) { MicroSecondDate now = new MicroSecondDate(); Tim... | |
MicroSecondDate now = new MicroSecondDate(); | MicroSecondDate now = new MicroSecondDate().add(offset); | public void actionPerformed(ActionEvent e) { if (beginTime != null && speed != 0) { MicroSecondDate now = new MicroSecondDate(); TimeInterval timeInterval = new TimeInterval(lastDate, now); timeInterval = timeInterval.add(offset); width = (TimeInterval)timeInterval.multiplyBy(speed);... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.