rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public void tearDown() { v1=v2=v3=null; | public void tearDown() throws Exception { super.tearDown(); v1=v2=v3=null; | public void tearDown() { v1=v2=v3=null; } |
System.err.println("Warning: Number format error in property" | log.warn("Warning: Number format error in property: " | public static int getIntProperty(String property) { if (properties == null) { loadProperties(); } String stringValue = properties.getProperty(property); int intValue = 0; if (stringValue != null) { try { intV... |
InputStream is = ConfigurationManager.class.getResourceAsStream( "/dspace.cfg"); properties = new Properties(); properties.load(is); | String configProperty = System.getProperty("dspace.configuration"); if (configProperty != null) { is = new FileInputStream(configProperty); } else { is = ConfigurationManager.class.getResourceAsStream( "/dspace.cfg"); } if (is==null) { log.fatal("Cannot find dspace.cfg"); System.exit(1); } else { properties = new P... | private static void loadProperties() { if (properties != null) return; try { InputStream is = ConfigurationManager.class.getResourceAsStream( "/dspace.cfg"); properties = new Properties(); properties.load(is); } catch (IOExcep... |
System.err.println("Can't load configuration: " + e); e.printStackTrace(); | log.fatal("Can't load configuration", e); | private static void loadProperties() { if (properties != null) return; try { InputStream is = ConfigurationManager.class.getResourceAsStream( "/dspace.cfg"); properties = new Properties(); properties.load(is); } catch (IOExcep... |
public void doUnlock(String url, String path, String id, boolean force) throws SVNException { | public void doUnlock(String path, String id, boolean force) throws SVNException { | public void doUnlock(String url, String path, String id, boolean force) throws SVNException { if (id == null) { SVNLock lock = doGetLock(path); if (lock != null) { id = lock.getID(); } if (id == null) { throw new SVNException("reposit... |
public DAVStatus request(String method, String path, Map header, StringBuffer reqBody, DefaultHandler handler, int[] okCodes) throws SVNException { DAVStatus status = sendRequest(method, path, initHeader(0, null, header), reqBody, okCodes); | public DAVStatus request(String method, String path, Map header, InputStream body, DefaultHandler handler, int[] okCodes) throws SVNException { DAVStatus status = sendRequest(method, path, initHeader(0, null, header), body); assertOk(status, okCodes); | public DAVStatus request(String method, String path, Map header, StringBuffer reqBody, DefaultHandler handler, int[] okCodes) throws SVNException { DAVStatus status = sendRequest(method, path, initHeader(0, null, header), reqBody, okCodes); if (status != null && status.getResponseCode() == 204) { ... |
info.baseline = baselineProperties.getOriginalURL(); | public static DAVBaselineInfo getBaselineInfo(DAVConnection connection, DAVRepository repos, String path, long revision, boolean includeType, boolean includeRevision, DAVBaselineInfo info) throws SVNException { DAVElement[] properties = includeRevision ? DAVEl... | |
if (getCommandLine().hasArgument(SVNArgument.RECURSIVE)) { | if (getCommandLine().hasArgument(SVNArgument.REVISION)) { | public final void run(final PrintStream out, PrintStream err) throws SVNException { final boolean recursive = getCommandLine().hasArgument(SVNArgument.RECURSIVE); SVNRevision revision = SVNRevision.UNDEFINED; if (getCommandLine().hasArgument(SVNArgument.RECURSIVE)) { revision = SVNRe... |
wcClient.doInfo(myBaseFile, revision, recursive, this); | SVNRevision peg = getCommandLine().getPathPegRevision(i); wcClient.doInfo(myBaseFile, peg, revision, recursive, this); | public final void run(final PrintStream out, PrintStream err) throws SVNException { final boolean recursive = getCommandLine().hasArgument(SVNArgument.RECURSIVE); SVNRevision revision = SVNRevision.UNDEFINED; if (getCommandLine().hasArgument(SVNArgument.RECURSIVE)) { revision = SVNRe... |
public String getURL() { | public SVNURL getURL() { | public String getURL() { return myURL; } |
public String getRepositoryRootURL() { | public SVNURL getRepositoryRootURL() { | public String getRepositoryRootURL() { return myRepositoryRootURL; } |
public String getCopyFromURL() { | public SVNURL getCopyFromURL() { | public String getCopyFromURL() { return myCopyFromURL; } |
if ("".equals(str)) { return 1; } | protected static int getLinesCount(String str) { int count = 0; for(StringTokenizer lines = new StringTokenizer(str, "\n"); lines.hasMoreTokens();) { lines.nextToken(); count++; } return count; } | |
if (qualifier.length() == 0) { return error(request, labels.getString(clazz + ".qualempty")); } | private boolean sanityCheck(HttpServletRequest request, ResourceBundle labels) { String element = request.getParameter("element"); if (element.length() == 0) { return error(request, labels.getString(clazz + ".elemempty")); } for (int ii = 0; ii < element.l... | |
if (log.isDebugEnabled()) { log.debug(LogManager.getHeader( (Context) request.getAttribute("dspace.context"), "view_jsp", jsp)); } | public static void showJSP(HttpServletRequest request, HttpServletResponse response, String jsp ) throws ServletException, IOException { // For the moment, a simple forward request.getRequestDispatcher(jsp).forward(request, response); } | |
ci.prev = this; | public void append(Clumplet c) { ClumpletImpl ci = (ClumpletImpl)c; if (this.type == ci.type) { this.content = ci.content; this.stringContent = ((StringClumplet)ci).stringContent; } else if (next == null) { next = ci; } else { nex... | |
newClumplet.next.prev = newClumplet; | ClumpletImpl cloneClumplet() { ClumpletImpl newClumplet = new StringClumplet(type, stringContent); if (next != null) { newClumplet.next = next.cloneClumplet(); } return newClumplet; } | |
newClumplet.next.prev = newClumplet; | ClumpletImpl cloneClumplet() { ClumpletImpl newClumplet = new ClumpletImpl(type, content); if (next != null) { newClumplet.next = next.cloneClumplet(); } return newClumplet; } | |
if (log != null) log.info("testStartXATrans"); | if (log != null) log.info("test2PCXATrans"); | public void test2PCXATrans() throws Exception { if (log != null) log.info("testStartXATrans"); FBManagedConnectionFactory mcf = initMcf(); ManagedConnection mc = mcf.createManagedConnection(null, null); FBManagedConnection fbmc = (FBManagedConnection)mc; XAResource xa = mc... |
xa.end(xid, XAResource.TMNOFLAGS); | xa.end(xid, XAResource.TMSUCCESS); | public void test2PCXATrans() throws Exception { if (log != null) log.info("testStartXATrans"); FBManagedConnectionFactory mcf = initMcf(); ManagedConnection mc = mcf.createManagedConnection(null, null); FBManagedConnection fbmc = (FBManagedConnection)mc; XAResource xa = mc... |
xa1.end(xid1, XAResource.TMNOFLAGS); | xa1.end(xid1, XAResource.TMSUCCESS); | public void testDo2XATrans() throws Exception { if (log != null) log.info("testDo2XATrans"); FBManagedConnectionFactory mcf = initMcf(); ManagedConnection mc1 = mcf.createManagedConnection(null, null); FBManagedConnection fbmc1 = (FBManagedConnection)mc1; XAResource xa1 = ... |
xa2.end(xid2, XAResource.TMNOFLAGS); | xa2.end(xid2, XAResource.TMSUCCESS); | public void testDo2XATrans() throws Exception { if (log != null) log.info("testDo2XATrans"); FBManagedConnectionFactory mcf = initMcf(); ManagedConnection mc1 = mcf.createManagedConnection(null, null); FBManagedConnection fbmc1 = (FBManagedConnection)mc1; XAResource xa1 = ... |
if (log != null) log.info("testStartXATrans"); | if (log != null) log.info("testRollback2PCXATrans"); | public void testRollback2PCXATrans() throws Exception { if (log != null) log.info("testStartXATrans"); FBManagedConnectionFactory mcf = initMcf(); ManagedConnection mc = mcf.createManagedConnection(null, null); FBManagedConnection fbmc = (FBManagedConnection)mc; XAResource... |
xa.end(xid, XAResource.TMNOFLAGS); | xa.end(xid, XAResource.TMSUCCESS); | public void testRollback2PCXATrans() throws Exception { if (log != null) log.info("testStartXATrans"); FBManagedConnectionFactory mcf = initMcf(); ManagedConnection mc = mcf.createManagedConnection(null, null); FBManagedConnection fbmc = (FBManagedConnection)mc; XAResource... |
if (log != null) log.info("testStartXATrans"); | if (log != null) log.info("testRollbackXATrans"); | public void testRollbackXATrans() throws Exception { if (log != null) log.info("testStartXATrans"); FBManagedConnectionFactory mcf = initMcf(); ManagedConnection mc = mcf.createManagedConnection(null, null); FBManagedConnection fbmc = (FBManagedConnection)mc; XAResource xa... |
xa.end(xid, XAResource.TMNOFLAGS); | xa.end(xid, XAResource.TMSUCCESS); | public void testRollbackXATrans() throws Exception { if (log != null) log.info("testStartXATrans"); FBManagedConnectionFactory mcf = initMcf(); ManagedConnection mc = mcf.createManagedConnection(null, null); FBManagedConnection fbmc = (FBManagedConnection)mc; XAResource xa... |
xa.end(xid, XAResource.TMNOFLAGS); | xa.end(xid, XAResource.TMSUCCESS); | public void testStartXATrans() throws Exception { if (log != null) log.info("testStartXATrans"); FBManagedConnectionFactory mcf = initMcf(); ManagedConnection mc = mcf.createManagedConnection(null, null); FBManagedConnection fbmc = (FBManagedConnection)mc; XAResource xa = ... |
cri.setProperty(GDS.isc_dpb_user_name, "SYSDBA"); cri.setProperty(GDS.isc_dpb_password, "masterkey"); | public FBManagedConnectionFactory initMcf() { FBManagedConnectionFactory mcf = new FBManagedConnectionFactory(); mcf.setDatabase(dbName); FBConnectionRequestInfo cri = new FBConnectionRequestInfo(); cri.setProperty(GDS.isc_dpb_num_buffers, new byte[] {90}); cri.setProperty(GDS.isc... | |
Log.debug(LOG, "Loading profile-data.dtd as a resource"); | LOG.debug("Loading profile-data.dtd as a resource"); | public Reader openStream(String publicID, String systemID) throws MalformedURLException, FileNotFoundException, IOException { if ( systemID != null && systemID.endsWith("profile-data.dtd") ) { Log.debug(LOG, "Loading profile-data.dtd as a resource"); return new InputStreamReader(getClass().getC... |
this.reader = (new LineNumberReader(reader)); | this.reader = new LineNumberReader(reader); | public ProphitParserLoader(Reader reader) { // we need to convert this to zip format at some point soon... this.reader = (new LineNumberReader(reader)); // not sure if we want to do this. this.parser = this; // we are our own parser. (and we are also a loader) this.solver = null; // we don't need this, as our sol... |
LOG.info("Finished Measurements."); | LOG.debug("Finished Measurements."); | private CallGraph makeNewCallGraph(IXMLElement callgraph) throws XMLException { Vector vMeasurements = callgraph.getChildrenNamed(XMLConstants.MEASUREMENT); Vector vInvocations = callgraph.getChildrenNamed(XMLConstants.INVOCATION); RCC[] rccArray = new RCC[vMeasurements.size()+1]; processMeasurements( vMeasur... |
LOG.info("Finished Invocations. " + calls.length); LOG.info("ACTUAL ITEMS: " + (vInvocations.size())); | Log.debug(LOG, "Finished Invocations. numCalls = ", calls.length); Log.debug(LOG, "ACTUAL ITEMS: ", vInvocations.size()); | private CallGraph makeNewCallGraph(IXMLElement callgraph) throws XMLException { Vector vMeasurements = callgraph.getChildrenNamed(XMLConstants.MEASUREMENT); Vector vInvocations = callgraph.getChildrenNamed(XMLConstants.INVOCATION); RCC[] rccArray = new RCC[vMeasurements.size()+1]; processMeasurements( vMeasur... |
LOG.info("ProphitParserLoader completed successfully"); | LOG.debug("ProphitParserLoader completed successfully"); | private CallGraph makeNewCallGraph(IXMLElement callgraph) throws XMLException { Vector vMeasurements = callgraph.getChildrenNamed(XMLConstants.MEASUREMENT); Vector vInvocations = callgraph.getChildrenNamed(XMLConstants.INVOCATION); RCC[] rccArray = new RCC[vMeasurements.size()+1]; processMeasurements( vMeasur... |
LOG.info( "New CallID : " + cid.toString()); | Log.debug(LOG, "New CallID : ", cid.toString()); | private CallID makeNewCallID(IXMLElement invocation, RCC[] rccArray, int key) throws XMLException { /*try { XMLWriter writer = new XMLWriter(System.out); System.out.println("WRITING: key = " + String.valueOf(key)); writer.write(invocation); } catch (Exception x) { System.out.println(x.getMessage()); ... |
Integer.parseInt(measurement.getAttribute(XMLConstants.NUMCALLS)), Long.parseLong(measurement.getAttribute(XMLConstants.TIME)), -1, Integer.parseInt(measurement.getAttribute(XMLConstants.ID))); | Integer.parseInt(measurement.getAttribute(XMLConstants.NUMCALLS)), Long.parseLong(measurement.getAttribute(XMLConstants.TIME)), Integer.parseInt(measurement.getAttribute(XMLConstants.ID))); | private RCC makeNewRCC(IXMLElement measurement) throws XMLException { StackTrace st = makeNewStackTrace(measurement.getFirstChildNamed(XMLConstants.STACKTRACE)); long t = Long.parseLong(measurement.getAttribute(XMLConstants.TIME)); RCC rcc = new RCC(st, Integer.parseInt(measurement.getAttribute(XMLConstant... |
if (t < 0) System.out.println("NEGATIVE time: " + rcc.toString()); return ( rcc ); | if ( t < 0 ) LOG.warn("NEGATIVE time: " + rcc.toString()); return rcc; | private RCC makeNewRCC(IXMLElement measurement) throws XMLException { StackTrace st = makeNewStackTrace(measurement.getFirstChildNamed(XMLConstants.STACKTRACE)); long t = Long.parseLong(measurement.getAttribute(XMLConstants.TIME)); RCC rcc = new RCC(st, Integer.parseInt(measurement.getAttribute(XMLConstant... |
LOG.info("callkey is : " + callkey); | Log.debug(LOG, "callkey is : ", callkey); | private void processInvocations( Vector invocations, RCC[] rccArray, CallID[] calls, double[] callFractions ) throws XMLException { CallID c; double fraction; IXMLElement invocation; int callkey = rccArray.length; for (int i = 0; i < invocations.size(); i++) { invocation = (IXMLElement)invocations.elementAt(i)... |
LOG.info("r.getKey() = " + r.getKey() + " and rccArray.length = " + rccArray.length); | Log.debug(LOG, "r.getKey() = ", r.getKey(), " and rccArray.length = ", rccArray.length); | private void processMeasurements( Vector measurements, RCC[] rccArray ) throws XMLException { RCC r; IXMLElement measurement; for (int i = 0; i < measurements.size(); i++) { measurement = (IXMLElement)measurements.elementAt(i); r = makeNewRCC(measurement); if (r.getKey() < 0 || r.getKey() > rccArray.length) ... |
} catch (ParseException p) { System.out.println(p.getMessage()); | } catch (ParseException p) { throw new RuntimeException(p.toString()); | public synchronized CallGraph solve() { if (!parsed) { try { this.parse(); } catch (ParseException p) { System.out.println(p.getMessage()); } } return ( this.callgraph ); } |
String firstline = ((LineNumberReader)this.reader).readLine().trim(); | String firstline = reader.readLine(); | private void verifyFile() throws ParseException, IOException { /* might call a DTD validator here, or just check for the * existence of a few elements from the xml file that we are expecting. */ String match = new String(XMLConstants.FILEMATCH); String firstline = ((LineNumberReader)this.reader).readLine().tr... |
if ( !(firstline.startsWith(match))) | if ( firstline == null || !(firstline.trim().startsWith(match))) | private void verifyFile() throws ParseException, IOException { /* might call a DTD validator here, or just check for the * existence of a few elements from the xml file that we are expecting. */ String match = new String(XMLConstants.FILEMATCH); String firstline = ((LineNumberReader)this.reader).readLine().tr... |
throw new ParseException("File Type does not match"); | throw new ParseException("Not an XML file. Should start with " + XMLConstants.FILEMATCH); | private void verifyFile() throws ParseException, IOException { /* might call a DTD validator here, or just check for the * existence of a few elements from the xml file that we are expecting. */ String match = new String(XMLConstants.FILEMATCH); String firstline = ((LineNumberReader)this.reader).readLine().tr... |
if ( args.length < 1 ) { System.err.println("Usage : java orbit.parsers.Loader <file> [ <depth> ]"); System.err.println(" depth : depth of the CallGraph to print. Default is '6'"); System.exit(1); } | public static void main(String[] args) throws Exception { File profileFile = new File(args[0]); int depth = 6; if ( args.length > 1 ) { depth = Integer.parseInt(args[1]); } long startTime = System.currentTimeMillis(); System.out.println("Parsing " + profileFile); Loader loader = LoaderFactory.instance().... | |
public CallGraph(CallID[] callIDs, double[] callFractions) | public CallGraph(List callIDs, double[] callFractions) | public CallGraph(CallID[] callIDs, double[] callFractions) { if ( callIDs.length == 0 ) throw new IllegalArgumentException("Must be at least 1 callID"); if ( callIDs.length != callFractions.length ) throw new IllegalArgumentException("Length of callIDs and callFractions arrays should be the same"); // Compute t... |
if ( callIDs.length == 0 ) throw new IllegalArgumentException("Must be at least 1 callID"); if ( callIDs.length != callFractions.length ) throw new IllegalArgumentException("Length of callIDs and callFractions arrays should be the same"); ArrayList rootIDs = new ArrayList(); for ( int i = 0; i < callIDs.length; ++i ... | this((CallID[])callIDs.toArray(new CallID[0]), callFractions); | public CallGraph(CallID[] callIDs, double[] callFractions) { if ( callIDs.length == 0 ) throw new IllegalArgumentException("Must be at least 1 callID"); if ( callIDs.length != callFractions.length ) throw new IllegalArgumentException("Length of callIDs and callFractions arrays should be the same"); // Compute t... |
if(m_upProcessingThread == null) { | m_upLatch.unlock(); if(upProcessingThread == null) { | synchronized void resume() { if(m_upProcessingThread == null) { startProcessingThread(); } m_upLatch.unlock(); m_upProcessingThread.interrupt(); } |
m_upLatch.unlock(); m_upProcessingThread.interrupt(); | synchronized void resume() { if(m_upProcessingThread == null) { startProcessingThread(); } m_upLatch.unlock(); m_upProcessingThread.interrupt(); } | |
m_upProcessingThread=new Thread(new Runnable() { | upProcessingThread=new Thread(new Runnable() { | private void startProcessingThread() { m_upProcessingThread=new Thread(new Runnable() { public void run() { Event event=null; while(Thread.currentThread() == m_upProcessingThread) { try { event=(Eve... |
while(Thread.currentThread() == m_upProcessingThread) { | while(upProcessingThread != null) { | private void startProcessingThread() { m_upProcessingThread=new Thread(new Runnable() { public void run() { Event event=null; while(Thread.currentThread() == m_upProcessingThread) { try { event=(Eve... |
event=(Event)m_upQueue.take(); | event=(Event)upQueue.remove(); | private void startProcessingThread() { m_upProcessingThread=new Thread(new Runnable() { public void run() { Event event=null; while(Thread.currentThread() == m_upProcessingThread) { try { event=(Eve... |
catch(InterruptedException ex) { | catch(QueueClosedException ex1) { break; } catch(InterruptedException ex2) { | private void startProcessingThread() { m_upProcessingThread=new Thread(new Runnable() { public void run() { Event event=null; while(Thread.currentThread() == m_upProcessingThread) { try { event=(Eve... |
Thread.interrupted(); | private void startProcessingThread() { m_upProcessingThread=new Thread(new Runnable() { public void run() { Event event=null; while(Thread.currentThread() == m_upProcessingThread) { try { event=(Eve... | |
m_upProcessingThread.setName("MessageDispatcher up processing thread"); m_upProcessingThread.setDaemon(true); m_upProcessingThread.start(); | upProcessingThread.setName("MessageDispatcher up processing thread"); upProcessingThread.setDaemon(true); upProcessingThread.start(); | private void startProcessingThread() { m_upProcessingThread=new Thread(new Runnable() { public void run() { Event event=null; while(Thread.currentThread() == m_upProcessingThread) { try { event=(Eve... |
while(Thread.currentThread() == m_upProcessingThread) { | while(upProcessingThread != null) { | public void run() { Event event=null; while(Thread.currentThread() == m_upProcessingThread) { try { event=(Event)m_upQueue.take(); m_upLatch.passThrough(); handle... |
event=(Event)m_upQueue.take(); | event=(Event)upQueue.remove(); | public void run() { Event event=null; while(Thread.currentThread() == m_upProcessingThread) { try { event=(Event)m_upQueue.take(); m_upLatch.passThrough(); handle... |
catch(InterruptedException ex) { | catch(QueueClosedException ex1) { break; } catch(InterruptedException ex2) { | public void run() { Event event=null; while(Thread.currentThread() == m_upProcessingThread) { try { event=(Event)m_upQueue.take(); m_upLatch.passThrough(); handle... |
Thread.interrupted(); | public void run() { Event event=null; while(Thread.currentThread() == m_upProcessingThread) { try { event=(Event)m_upQueue.take(); m_upLatch.passThrough(); handle... | |
if(m_upProcessingThread != null) { Thread t=m_upProcessingThread; m_upProcessingThread=null; | if(upProcessingThread != null) { Thread t=upProcessingThread; upProcessingThread=null; | synchronized void suspend() { m_upLatch.lock(); if(m_upProcessingThread != null) { Thread t=m_upProcessingThread; m_upProcessingThread=null; t.interrupt(); } } |
m_upQueue.put(evt); | upQueue.add(evt); | public void up(Event evt) { try { m_upQueue.put(evt); } catch(InterruptedException ex) { //this is ok } } |
catch(InterruptedException ex) { | catch(QueueClosedException ex) { | public void up(Event evt) { try { m_upQueue.put(evt); } catch(InterruptedException ex) { //this is ok } } |
if(down_handler == null) { if(observer != null) { if(observer.down(evt, down_queue.size()) == false) { return; } } int type=evt.getType(); if(type == Event.ACK || type == Event.START || type == Event.STOP) { if(handleSpecialDownEvent(evt) == false) return; } down(evt); return; } try { down_queue.add(evt); } catch(Excep... | if (down_handler == null) { if (observer != null) { if (observer.down(evt, down_queue.size()) == false) { return; } } int type = evt.getType(); if (type == Event.ACK || type == Event.START || type == Event.STOP) { if (handleSpecialDownEvent(evt) == false) { return; } } down(evt); return; } try { down_queue.add(evt); } ... | protected void receiveDownEvent(Event evt) { if(down_handler == null) { if(observer != null) { // call debugger hook (if installed) if(observer.down(evt, down_queue.size()) == false) { // false means discard event return; ... |
if(up_handler == null) { if(observer != null) { if(observer.up(evt, up_queue.size()) == false) { return; } } up(evt); return; } try { up_queue.add(evt); } catch(Exception e) { if(log.isWarnEnabled()) log.warn("exception: " + e); } } | if (up_handler == null) { if (observer != null) { if (observer.up(evt, up_queue.size()) == false) { return; } } up(evt); return; } try { up_queue.add(evt); } catch (Exception e) { if (log.isWarnEnabled()) { log.warn("exception: " + e); } } } | protected void receiveUpEvent(Event evt) { if(up_handler == null) { if(observer != null) { // call debugger hook (if installed) if(observer.up(evt, up_queue.size()) == false) { // false means discard event return; } ... |
public void sendRequest(long id, List dest_mbrs, Message msg, RspCollector coll) { Header hdr; if(transport == null) { if(log.isWarnEnabled()) log.warn("transport is not available !"); return; } hdr = new Header(Header.REQ, id, (coll != null), name); hdr.dest_mbrs=dest_mbrs; if (coll != null) { if(deadlock_det... | public void sendRequest(long id, Message msg, RspCollector coll) throws Exception { sendRequest(id, null, msg, coll); | public void sendRequest(long id, List dest_mbrs, Message msg, RspCollector coll) { Header hdr; if(transport == null) { if(log.isWarnEnabled()) log.warn("transport is not available !"); return; } // i. Create the request correlator header and add it to the // ... |
boolean commit = false; | public int[] executeBatch() throws SQLException { if (closed) throw new FBSQLException("Statement is closed"); if (statementListener.getConnection().getAutoCommit()) addWarning(new SQLWarning("Batch updates should be run " + "with auto-commit disabled.", "1000")); ... | |
commit = true; | success = true; | public int[] executeBatch() throws SQLException { if (closed) throw new FBSQLException("Statement is closed"); if (statementListener.getConnection().getAutoCommit()) addWarning(new SQLWarning("Batch updates should be run " + "with auto-commit disabled.", "1000")); ... |
notifyStatementCompleted(); | notifyStatementCompleted(success); | public int[] executeBatch() throws SQLException { if (closed) throw new FBSQLException("Statement is closed"); if (statementListener.getConnection().getAutoCommit()) addWarning(new SQLWarning("Batch updates should be run " + "with auto-commit disabled.", "1000")); ... |
this.completed = true; statementListener.statementCompleted(this); | notifyStatementCompleted(true); | protected void notifyStatementCompleted() throws SQLException { this.completed = true; statementListener.statementCompleted(this); } |
public static boolean createSymlink(File src, File linkFile) throws IOException { | public static boolean createSymlink(File link, File linkName) throws IOException { | public static boolean createSymlink(File src, File linkFile) throws IOException { if (isWindows) { return false; } if (src.exists() || isSymlink(src)) { throw new IOException("can't create symlink '" + src.getAbsolutePath() + "' : file already exists."); } St... |
if (src.exists() || isSymlink(src)) { throw new IOException("can't create symlink '" + src.getAbsolutePath() + "' : file already exists."); | if (link.exists() || isSymlink(link)) { throw new IOException("can't create symlink '" + link.getAbsolutePath() + "' : file already exists."); | public static boolean createSymlink(File src, File linkFile) throws IOException { if (isWindows) { return false; } if (src.exists() || isSymlink(src)) { throw new IOException("can't create symlink '" + src.getAbsolutePath() + "' : file already exists."); } St... |
String linkTarget = readSingleLine(linkFile); | String linkTarget = readSingleLine(linkName); | public static boolean createSymlink(File src, File linkFile) throws IOException { if (isWindows) { return false; } if (src.exists() || isSymlink(src)) { throw new IOException("can't create symlink '" + src.getAbsolutePath() + "' : file already exists."); } St... |
Runtime.getRuntime().exec("ln -s '" + linkTarget + "' '" + src.getAbsolutePath() + "'"); return isSymlink(src); | Runtime.getRuntime().exec("ln -s '" + linkTarget + "' '" + link.getAbsolutePath() + "'"); return isSymlink(link); | public static boolean createSymlink(File src, File linkFile) throws IOException { if (isWindows) { return false; } if (src.exists() || isSymlink(src)) { throw new IOException("can't create symlink '" + src.getAbsolutePath() + "' : file already exists."); } St... |
Address src; | public void run() { short version; boolean is_message_list, multicast; byte flags; ExposedByteArrayInputStream in_stream=null; ExposedBufferedInputStream buf_in_stream=null; DataInputStream ... | |
src=msg.getSrc(); if(loopback && multicast && src != null && local_addr.equals(src)) { continue; } thread_pool.execute(new IncomingMessage(msg)); | submitToThreadPool(msg, multicast); | public void run() { short version; boolean is_message_list, multicast; byte flags; ExposedByteArrayInputStream in_stream=null; ExposedBufferedInputStream buf_in_stream=null; DataInputStream ... |
src=msg.getSrc(); if(loopback && multicast && src != null && local_addr.equals(src)) { ; } else thread_pool.execute(new IncomingMessage(msg)); | submitToThreadPool(msg, multicast); | public void run() { short version; boolean is_message_list, multicast; byte flags; ExposedByteArrayInputStream in_stream=null; ExposedBufferedInputStream buf_in_stream=null; DataInputStream ... |
num_oob_msgs_received=num_incoming_msgs_received=0; | public void resetStats() { num_msgs_sent=num_msgs_received=num_bytes_sent=num_bytes_received=0; } | |
log.debug("FLUSH block at " + localAddress + " for " + timeout); | if (log.isDebugEnabled()) log.debug("FLUSH block at " + localAddress + " for " + timeout); | public void down(Event evt) { switch (evt.getType()) { case Event.MSG: synchronized (blockMutex) { while (isFlushRunning()) { log.debug("FLUSH block at " + localAddress + " for " + timeout); try { blockMutex.wait(timeout); if (isFlushRunning()) { log.warn("Forcing FLUSH unblock ... |
log.debug("FLUSH_COMPLETED from " + address + ",completed " | if(log.isDebugEnabled()) log.debug("FLUSH_COMPLETED from " + address + ",completed " | private void onFlushCompleted(Address address) { boolean flushCompleted = false; synchronized (sharedLock) { flushCompletedSet.add(address); flushCompleted = flushCompletedSet.containsAll(flushMembers); } log.debug("FLUSH_COMPLETED from " + address + ",completed " + flushCompleted + ",flushCompleted " + ... |
passDown(new Event(Event.SUSPEND_OK)); log.debug("All FLUSH_COMPLETED received at " + localAddress | passDown(new Event(Event.SUSPEND_OK)); if(log.isDebugEnabled()) log.debug("All FLUSH_COMPLETED received at " + localAddress | private void onFlushCompleted(Address address) { boolean flushCompleted = false; synchronized (sharedLock) { flushCompletedSet.add(address); flushCompleted = flushCompletedSet.containsAll(flushMembers); } log.debug("FLUSH_COMPLETED from " + address + ",completed " + flushCompleted + ",flushCompleted " + ... |
log.debug("FLUSH_OK from " + address + ",completed " + flushOkCompleted | if(log.isDebugEnabled()) log.debug("FLUSH_OK from " + address + ",completed " + flushOkCompleted | private void onFlushOk(Address address, long viewID) { boolean flushOkCompleted = false; Message m = null; synchronized (sharedLock) { flushOkSet.add(address); flushOkCompleted = flushOkSet.containsAll(flushMembers); if(flushOkCompleted) { m = new Message(flushCaller,localAddress, null); } } log.debu... |
log.debug(localAddress + " sent FLUSH_COMPLETED message to " +flushCaller); | if(log.isDebugEnabled()) log.debug(localAddress + " sent FLUSH_COMPLETED message to " +flushCaller); | private void onFlushOk(Address address, long viewID) { boolean flushOkCompleted = false; Message m = null; synchronized (sharedLock) { flushOkSet.add(address); flushOkCompleted = flushOkSet.containsAll(flushMembers); if(flushOkCompleted) { m = new Message(flushCaller,localAddress, null); } } log.debu... |
log.debug("Received RESUME at " + localAddress | if(log.isDebugEnabled()) log.debug("Received RESUME at " + localAddress | private void onResume() { Message msg = new Message(null, localAddress, null); msg.putHeader(getName(), new FlushHeader(FlushHeader.STOP_FLUSH)); passDown(new Event(Event.MSG, msg)); log.debug("Received RESUME at " + localAddress + ", sent STOP_FLUSH to all"); } |
log.debug("Received STOP_FLUSH at " + localAddress); | if(log.isDebugEnabled()) log.debug("Received STOP_FLUSH at " + localAddress); | private void onStopFlush() { log.debug("Received STOP_FLUSH at " + localAddress); synchronized (blockMutex) { isBlockState = false; blockMutex.notifyAll(); } synchronized (sharedLock) { flushCompletedSet.clear(); flushOkSet.clear(); flushMembers.clear(); flushCaller=null; } } |
log.debug(localAddress + " sent FLUSH_COMPLETED message to " | if(log.isDebugEnabled()) log.debug(localAddress + " sent FLUSH_COMPLETED message to " | private void onSuspect(Address address) { boolean flushOkCompleted = false; Message m = null; long viewID = 0; synchronized (sharedLock) { suspected.add(address); flushMembers.removeAll(suspected); viewID = currentViewId(); flushOkCompleted = flushOkSet.size() > 0 && flushOkSet.containsAll(flushMembers... |
log.debug("Suspect is " + address + ",completed " + flushOkCompleted | if(log.isDebugEnabled()) log.debug("Suspect is " + address + ",completed " + flushOkCompleted | private void onSuspect(Address address) { boolean flushOkCompleted = false; Message m = null; long viewID = 0; synchronized (sharedLock) { suspected.add(address); flushMembers.removeAll(suspected); viewID = currentViewId(); flushOkCompleted = flushOkSet.size() > 0 && flushOkSet.containsAll(flushMembers... |
log.debug("Received SUSPEND at " + localAddress | if(log.isDebugEnabled()) log.debug("Received SUSPEND at " + localAddress | private void onSuspend(View view) { Message msg = null; Collection participantsInFlush=null; synchronized(sharedLock) { //initiate FLUSH only on group members that we need to flush if (view != null) { participantsInFlush = new ArrayList(view.getMembers()); participantsInFlush.retainAll(currentView.getMem... |
log.debug("Coordinator left, " + localAddress | if(log.isDebugEnabled()) log.debug("Coordinator left, " + localAddress | private void onViewChange(View view) { Vector members = view.getMembers(); //Am I the only member? If yes, unblock me so I can send messages if((members!= null && members.size()==1)&& localAddress.equals(members.get(0))) { isBlockState=false; } synchronized (sharedLock) { suspected.retainAll(view.getMembers(... |
log.debug("Installing view at " + localAddress + " view is " + currentView); | if(log.isDebugEnabled()) log.debug("Installing view at " + localAddress + " view is " + currentView); | private void onViewChange(View view) { Vector members = view.getMembers(); //Am I the only member? If yes, unblock me so I can send messages if((members!= null && members.size()==1)&& localAddress.equals(members.get(0))) { isBlockState=false; } synchronized (sharedLock) { suspected.retainAll(view.getMembers(... |
log.debug(localAddress | if(log.isDebugEnabled()) log.debug(localAddress | public void up(Event evt) { Message msg = null; switch (evt.getType()) { case Event.MSG: msg = (Message) evt.getArg(); FlushHeader fh = (FlushHeader) msg.removeHeader(getName()); if (fh != null) { if (fh.type == FlushHeader.START_FLUSH) { passUp(new Event(Event.BLOCK)); onStartFlush(msg.getS... |
Base.LogThis("Details-Dialog ID: "+parentTable.getSelectedRow(), true); | new Logger("Details-Dialog ID: "+parentTable.getSelectedRow(), true); | public void mousePressed(MouseEvent event) { if (event.getClickCount() == 2) { Details det = null; if (parentTable.getName().equals("userevents")) { det = new DetailsUser(Start.getMe(), parentTable.getSelectedRow(), se); } else { det = new DetailsMain(Start.getMe(), parentTable.getSelectedRow(), se);... |
public DetailsUser(JFrame parent, int tmp_id, ShowEvents se) { | public DetailsUser(MWnd parent, int tmp_id, ShowEvents se) { | public DetailsUser(JFrame parent, int tmp_id, ShowEvents se) { super(parent, tmp_id, se); owner = se; id = tmp_id; } |
this.parent = parent; | public DetailsUser(JFrame parent, int tmp_id, ShowEvents se) { super(parent, tmp_id, se); owner = se; id = tmp_id; } | |
private synchronized FBConnectionPoolDataSource getPool() { | private synchronized AbstractFBConnectionPoolDataSource getPool() { | private synchronized FBConnectionPoolDataSource getPool() { if (pool == null) pool = new FBConnectionPoolDataSource(); return pool; } |
pool = new FBConnectionPoolDataSource(); | pool = FBPooledDataSourceFactory.createFBConnectionPoolDataSource(); | private synchronized FBConnectionPoolDataSource getPool() { if (pool == null) pool = new FBConnectionPoolDataSource(); return pool; } |
return getIntProperty(BLOB_BUFFER_PROPERTY); | if (getProperty(BLOB_BUFFER_PROPERTY) != null) return getIntProperty(BLOB_BUFFER_PROPERTY); else return FBConnectionDefaults.DEFAULT_BLOB_BUFFER_SIZE; | public int getBlobBufferSize() { return getIntProperty(BLOB_BUFFER_PROPERTY); } |
public synchronized PooledConnection getPooledConnection() throws SQLException | protected synchronized PooledObject getPooledConnection( PooledConnectionQueue queue) throws SQLException | public synchronized PooledConnection getPooledConnection() throws SQLException { return (PooledConnection)getPooledConnection( getQueue(EMPTY_USER_PASSWORD)); } |
return (PooledConnection)getPooledConnection( getQueue(EMPTY_USER_PASSWORD)); | PingablePooledConnection connection = (PingablePooledConnection)super.getPooledConnection(queue); connection.addConnectionEventListener(this); return connection; | public synchronized PooledConnection getPooledConnection() throws SQLException { return (PooledConnection)getPooledConnection( getQueue(EMPTY_USER_PASSWORD)); } |
return getIntProperty(SOCKET_BUFFER_PROPERTY); | if (getProperty(SOCKET_BUFFER_PROPERTY) != null) return getIntProperty(SOCKET_BUFFER_PROPERTY); else return FBConnectionDefaults.DEFAULT_SOCKET_BUFFER_SIZE; | public int getSocketBufferSize() { return getIntProperty(SOCKET_BUFFER_PROPERTY); } |
void setAsciiStream(InputStream in) throws SQLException { | void setAsciiStream(InputStream in, int length) throws SQLException { | void setAsciiStream(InputStream in) throws SQLException { if (in == null) { setNull(true); return; } setBinaryStream(in); } |
setBinaryStream(in); | setBinaryStream(in, length); | void setAsciiStream(InputStream in) throws SQLException { if (in == null) { setNull(true); return; } setBinaryStream(in); } |
void setBinaryStream(InputStream in) throws SQLException { | void setBinaryStream(InputStream in, int length) throws SQLException { | void setBinaryStream(InputStream in) throws SQLException { if (in == null) { setNull(true); return; } try { ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] buff = new byte[4096]; int counter = 0; while ((counter = in.read(buff)) != -1) out.write(buff, 0, counter); setString(new Stri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.