bugged stringlengths 6 599k | fixed stringlengths 10 599k | __index_level_0__ int64 0 1.13M |
|---|---|---|
public SoftReferenceObjectPool(PoolableObjectFactory factory) { _pool = new ArrayList(); _factory = factory; } | public SoftReferenceObjectPool() { _pool = new ArrayList(); _factory = factory; } | 1,125,363 |
public SoftReferenceObjectPool(PoolableObjectFactory factory) { _pool = new ArrayList(); _factory = factory; } | public SoftReferenceObjectPool(PoolableObjectFactory factory) { _pool = new ArrayList(); _factory = null; } | 1,125,364 |
int getNumActive() throws UnsupportedOperationException; | int getNumActive(Object key) throws UnsupportedOperationException; | 1,125,365 |
int getNumIdle() throws UnsupportedOperationException; | int getNumIdle(Object key) throws UnsupportedOperationException; | 1,125,366 |
public static ObjectPool adapt(final KeyedObjectPool keyedPool) throws IllegalArgumentException { return adapt(keyedPool, new Object()); } | public static ObjectPool adapt(final KeyedObjectPool keyedPool) throws IllegalArgumentException { return adapt(keyedPool, new Object()); } | 1,125,367 |
public static TimerTask checkMinIdle(final KeyedObjectPool keyedPool, final Object key, final int minIdle, final long period) throws IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { ... | public static TimerTask checkMinIdle(final KeyedObjectPool keyedPool, final Object key, final int minIdle, final long period) throws IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { ... | 1,125,368 |
public static TimerTask checkMinIdle(final KeyedObjectPool keyedPool, final Object key, final int minIdle, final long period) throws IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { ... | public static TimerTask checkMinIdle(final KeyedObjectPool keyedPool, final Object key, final int minIdle, final long period) throws IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { ... | 1,125,369 |
public static TimerTask checkMinIdle(final KeyedObjectPool keyedPool, final Object key, final int minIdle, final long period) throws IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { ... | public static TimerTask checkMinIdle(final KeyedObjectPool keyedPool, final Object key, final int minIdle, final long period) throws IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { ... | 1,125,370 |
public GenericKeyedObjectPool(KeyedPoolableObjectFactory factory) { this(factory,DEFAULT_MAX_ACTIVE,DEFAULT_WHEN_EXHAUSTED_ACTION,DEFAULT_MAX_WAIT,DEFAULT_MAX_IDLE,DEFAULT_TEST_ON_BORROW,DEFAULT_TEST_ON_RETURN,DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,DEFAULT_NUM_TESTS_PER_EVICTION_RUN,DEFAULT_MIN_EVICTABLE_... | public GenericKeyedObjectPool(KeyedPoolableObjectFactory factory) { this(factory,DEFAULT_MAX_ACTIVE,DEFAULT_WHEN_EXHAUSTED_ACTION,DEFAULT_MAX_WAIT,DEFAULT_MAX_IDLE,DEFAULT_TEST_ON_BORROW,DEFAULT_TEST_ON_RETURN,DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,DEFAULT_NUM_TESTS_PER_EVICTION_RUN,DEFAULT_MIN_EVICTABLE_... | 1,125,371 |
public GenericObjectPool(PoolableObjectFactory factory) { this(factory,DEFAULT_MAX_ACTIVE,DEFAULT_WHEN_EXHAUSTED_ACTION,DEFAULT_MAX_WAIT,DEFAULT_MAX_IDLE,DEFAULT_MIN_IDLE,DEFAULT_TEST_ON_BORROW,DEFAULT_TEST_ON_RETURN,DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,DEFAULT_NUM_TESTS_PER_EVICTION_RUN,DEFAULT_MIN_EVI... | public GenericObjectPool(PoolableObjectFactory factory) { this(factory,DEFAULT_MAX_ACTIVE,DEFAULT_WHEN_EXHAUSTED_ACTION,DEFAULT_MAX_WAIT,DEFAULT_MAX_IDLE,DEFAULT_MIN_IDLE,DEFAULT_TEST_ON_BORROW,DEFAULT_TEST_ON_RETURN,DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,DEFAULT_NUM_TESTS_PER_EVICTION_RUN,DEFAULT_MIN_EVI... | 1,125,372 |
public static KeyedObjectPool checkedPool(final KeyedObjectPool keyedPool, final Class type) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (type == null) { throw new IllegalArgumentException("type must not be null."); ... | public static KeyedObjectPool checkedPool(final KeyedObjectPool keyedPool, final Class type) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (type == null) { throw new IllegalArgumentException("type must not be null."); ... | 1,125,373 |
public static KeyedObjectPool checkedPool(final KeyedObjectPool keyedPool, final Class type) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (type == null) { throw new IllegalArgumentException("type must not be null."); ... | public static KeyedObjectPool checkedPool(final KeyedObjectPool keyedPool, final Class type) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (type == null) { throw new IllegalArgumentException("type must not be null."); ... | 1,125,374 |
public static KeyedObjectPool erodingPool(final KeyedObjectPool keyedPool) { return erodingPool(keyedPool, 1f); } | public static KeyedObjectPool erodingPool(final KeyedObjectPool keyedPool) { return erodingPool(keyedPool, 1f); } | 1,125,375 |
public static void prefill(final KeyedObjectPool keyedPool, final Object key, final int count) throws Exception, IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { throw new IllegalArg... | public static void prefill(final KeyedObjectPool keyedPool, final Object key, final int count) throws Exception, IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { throw new IllegalArg... | 1,125,376 |
public static void prefill(final KeyedObjectPool keyedPool, final Object key, final int count) throws Exception, IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { throw new IllegalArg... | public static void prefill(final KeyedObjectPool keyedPool, final Object key, final int count) throws Exception, IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { throw new IllegalArg... | 1,125,377 |
public static KeyedObjectPool synchronizedPool(final KeyedObjectPool keyedPool) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } assert !(keyedPool instanceof GenericKeyedObjectPool) : "GenericKeyedObjectPool is already th... | public static KeyedObjectPool synchronizedPool(final KeyedObjectPool keyedPool) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } assert !(keyedPool instanceof GenericKeyedObjectPool) : "GenericKeyedObjectPool is already th... | 1,125,378 |
public static KeyedObjectPool synchronizedPool(final KeyedObjectPool keyedPool) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } assert !(keyedPool instanceof GenericKeyedObjectPool) : "GenericKeyedObjectPool is already th... | public static KeyedObjectPool synchronizedPool(final KeyedObjectPool keyedPool) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } assert !(keyedPool instanceof GenericKeyedObjectPool) : "GenericKeyedObjectPool is already th... | 1,125,379 |
public static KeyedPoolableObjectFactory synchronizedPoolableFactory(final KeyedPoolableObjectFactory keyedFactory) { return new SynchronizedKeyedPoolableObjectFactory(keyedFactory); } | public static KeyedPoolableObjectFactory synchronizedPoolableFactory(final KeyedPoolableObjectFactory keyedFactory) { return new SynchronizedKeyedPoolableObjectFactory(keyedFactory); } | 1,125,380 |
public StackKeyedObjectPool(KeyedPoolableObjectFactory factory, int max) { this(factory,max,DEFAULT_INIT_SLEEPING_CAPACITY); } | public StackKeyedObjectPool(KeyedPoolableObjectFactory factory, int max) { this(factory,max,DEFAULT_INIT_SLEEPING_CAPACITY); } | 1,125,382 |
public int getNumActive(Object key) { try { return ((Integer)_activeCount.get(key)).intValue(); } catch(NoSuchElementException e) { return 0; } catch(NullPointerException e) { return 0; } } | public int getNumActive(Object key) { try { return ((Integer)_activeCount.get(key)).intValue(); } catch(NoSuchElementException e) { return 0; } catch(NullPointerException e) { return 0; } } | 1,125,383 |
public synchronized int getNumIdle(Object key) { try { return((Stack)(_pools.get(key))).size(); } catch(Exception e) { return 0; } } | public synchronized int getNumIdle(Object key) { try { return((Stack)(_pools.get(key))).size(); } catch(Exception e) { return 0; } } | 1,125,384 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | public Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { p... | 1,125,385 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | 1,125,386 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | 1,125,387 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | 1,125,388 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | 1,125,389 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | 1,125,390 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | 1,125,391 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | 1,125,392 |
public Object borrowObject() throws Exception { long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; synchronized(this) { assertOpen(); // if there are any sleeping, just grab on... | public Object borrowObject() throws Exception { long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; synchronized(this) { assertOpen(); // if there are any sleeping, just grab on... | 1,125,394 |
public abstract Object makeObject(); | public abstract Object makeObject() throws Exception; | 1,125,395 |
public StackObjectPool(PoolableObjectFactory factory) { this(factory,DEFAULT_MAX_SLEEPING,DEFAULT_INIT_SLEEPING_CAPACITY); } | public StackObjectPool(PoolableObjectFactory factory) { this(factory,DEFAULT_MAX_SLEEPING,DEFAULT_INIT_SLEEPING_CAPACITY); } | 1,125,397 |
public MethodCall(final String name, final Object param) { this(name, Collections.singletonList(param)); } | public MethodCall(final String name, final Object param) { this(name, Collections.singletonList(param)); } | 1,125,398 |
public TestObjectPoolFactory(final String name) { super(name); } | protected TestObjectPoolFactory(final String name) { super(name); } | 1,125,399 |
protected ObjectPoolFactory makeFactory(PoolableObjectFactory objectFactory) throws UnsupportedOperationException { throw new UnsupportedOperationException("Subclass needs to override makeFactory method."); } | protected ObjectPoolFactory makeFactory(PoolableObjectFactory objectFactory) throws UnsupportedOperationException { throw new UnsupportedOperationException("Subclass needs to override makeFactory method."); } | 1,125,400 |
public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(_maxIdle > 0 && (_pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(obj)))) { try { _factory.passivateObject(obj); } catch(Exception e) { ; // i... | public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(_maxIdle > 0 && (_pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(obj)))) { try { _factory.passivateObject(obj); } catch(Exception e) { ; // i... | 1,125,401 |
public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(_maxIdle > 0 && (_pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(obj)))) { try { _factory.passivateObject(obj); } catch(Exception e) { ; // i... | public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(_maxIdle > 0 && (_pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(obj)))) { try { _factory.passivateObject(obj); } catch(Exception e) { ; // i... | 1,125,402 |
public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(_maxIdle > 0 && (_pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(obj)))) { try { _factory.passivateObject(obj); } catch(Exception e) { ; // i... | public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(_maxIdle > 0 && (_pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(obj)))) { try { _factory.passivateObject(obj); } catch(Exception e) { ; // i... | 1,125,403 |
public synchronized int getNumIdle(Object key) { try { return((LinkedList)(_poolMap.get(key))).size(); } catch(Exception e) { return 0; } } | public synchronized int getNumIdle(Object key) { try { return((LinkedList)(_poolMap.get(key))).size(); } catch(Exception e) { return 0; } } | 1,125,404 |
public synchronized int getNumActive(Object key) { return getActiveCount(key); } | public synchronized int getNumActive(Object key) { return getActiveCount(key); } | 1,125,405 |
public synchronized Object borrowObject(Object key) throws Exception { long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new C... | public synchronized Object borrowObject(Object key) throws Exception { long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new C... | 1,125,407 |
public int getNumActive() throws UnsupportedOperationException { return -1; } | public int getNumActive(Object key) throws UnsupportedOperationException { return -1; } | 1,125,408 |
public int getNumIdle() throws UnsupportedOperationException { return -1; } | public int getNumIdle(Object key) throws UnsupportedOperationException { return -1; } | 1,125,409 |
public void activateObject(Object obj) { } | public void activateObject(Object obj) throws Exception { } | 1,125,410 |
public void destroyObject(Object obj) { } | public void destroyObject(Object obj) throws Exception { } | 1,125,411 |
public void passivateObject(Object obj) { } | public void passivateObject(Object obj) throws Exception { } | 1,125,412 |
protected TestObjectPoolFactory(final String name) { super(name); } | public TestObjectPoolFactory(final String name) { super(name); } | 1,125,413 |
public void returnObject(Object obj) throws Exception { assertOpen(); boolean success = true; if(_testOnReturn && !(_factory.validateObject(obj))) { success = false; } else { try { _factory.passivateObject(obj); } catch(Exception e) { ... | public void returnObject(Object obj) throws Exception { assertOpen(); boolean success = true; if(_testOnReturn && !(_factory.validateObject(obj))) { success = false; } else { try { _factory.passivateObject(obj); } catch(Exception e) { ... | 1,125,414 |
public boolean validateObject(Object key, Object obj) { return true; } | public boolean validateObject(Object key, Object obj) { return valid; } | 1,125,415 |
IdentityKey(final int ident) { this.ident = ident; } | IdentityKey(final int ident) { this.ident = ident; } | 1,125,416 |
public ObjectPool createPool() { return new GenericObjectPool(_factory,_maxActive,_whenExhaustedAction,_maxWait,_maxIdle,_minIdle,_testOnBorrow,_testOnReturn,_timeBetweenEvictionRunsMillis,_numTestsPerEvictionRun,_minEvictableIdleTimeMillis,_testWhileIdle); } | public ObjectPool createPool() { return new GenericObjectPool(_factory,_maxActive,_whenExhaustedAction,_maxWait,_maxIdle,_minIdle,_testOnBorrow,_testOnReturn,_timeBetweenEvictionRunsMillis,_numTestsPerEvictionRun,_minEvictableIdleTimeMillis,_testWhileIdle,_softMinEvictableIdleTimeMillis); } | 1,125,417 |
protected TestKeyedObjectPoolFactory(final String name) { super(name); } | public TestKeyedObjectPoolFactory(final String name) { super(name); } | 1,125,418 |
private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (Directed... | private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (Directed... | 1,125,419 |
private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (Directed... | private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (Directed... | 1,125,420 |
private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (Directed... | private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (Directed... | 1,125,421 |
private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (Directed... | private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (Directed... | 1,125,422 |
private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (Directed... | private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (Directed... | 1,125,425 |
private void executeMethod( boolean optimize ) throws FoundNoEdgeException { DirectedSparseEdge edge = null; Object[] outEdges = null; if ( _nextVertex.containsUserDatumKey( BACK_KEY ) && _history. size() >= 3 ) { Float probability = (Float)_nextVertex.getUserDatum( BACK_KEY ); int index = _radomGenerato... | private void executeMethod( boolean optimize ) throws FoundNoEdgeException { DirectedSparseEdge edge = null; Object[] outEdges = null; if ( _nextVertex.containsUserDatumKey( BACK_KEY ) && _history. size() >= 3 ) { Float probability = (Float)_nextVertex.getUserDatum( BACK_KEY ); int index = _radomGenerato... | 1,125,426 |
private void invokeMethod( String method ) throws GoBackToPreviousVertexException { Class cls = _object.getClass(); try { if ( method.compareTo( "" ) != 0 ) { Method meth = cls.getMethod( method, null ); meth.invoke( _object, null ); } } catch( NoSuchMethodException e ) { _logger.error( e ); _lo... | private void invokeMethod( String method ) throws GoBackToPreviousVertexException { Class cls = _object.getClass(); try { if ( method.compareTo( "" ) != 0 ) { Method meth = cls.getMethod( method, null ); meth.invoke( _object, null ); } } catch( NoSuchMethodException e ) { _logger.error( e ); _lo... | 1,125,427 |
PropertyTabSheet(final Panel panel, final boolean styleProperties) { super(styleProperties ? "Styles" : "Properties"); final GridBox gb = initGridBox(); gb.setPosition(GAP, GAP); final Divider div = new Divider(); div.setX(GAP); div.setHeight(6); final Label lbl = ne... | PropertyTabSheet(final Panel panel, final boolean styleProperties) { super(styleProperties ? "Styles" : "Properties"); final GridBox gb = initGridBox(); gb.setPosition(GAP, GAP); final Divider div = new Divider(); div.setX(GAP); div.setHeight(6); final Label lbl = ne... | 1,125,428 |
public void itemChange(ItemChangeEvent ev) { if (ev.getType() == ItemChangeEvent.Type.ADD && panel.getChildren().size() == 1) { gb.getRows().clear(); Component comp = panel.getChildren().get(0); for (Property prop : ... | public void itemChange(ItemChangeEvent ev) { if (ev.getType() == ItemChangeEvent.Type.ADD && panel.getChildren().size() == 1) { gb.getRows().clear(); Component comp = panel.getChildren().get(0); for (Property prop : ... | 1,125,430 |
public synchronized void returnObject(Object obj) throws Exception { assertOpen(); boolean success = true; if(!(_factory.validateObject(obj))) { success = false; } else { try { _factory.passivateObject(obj); } catch(Exception e) { ... | public synchronized void returnObject(Object obj) throws Exception { assertOpen(); boolean success = true; if(!(_factory.validateObject(obj))) { success = false; } else { try { _factory.passivateObject(obj); } catch(Exception e) { ... | 1,125,434 |
public void run() { CursorableLinkedList.Cursor objcursor = null; CursorableLinkedList.Cursor keycursor = null; Object key = null; while(!_cancelled) { long sleeptime = 0L; synchronized(GenericKeyedObjectPool.this) { sl... | public void run() { CursorableLinkedList.Cursor objcursor = null; CursorableLinkedList.Cursor keycursor = null; Object key = null; while(!_cancelled) { long sleeptime = 0L; synchronized(GenericKeyedObjectPool.this) { sl... | 1,125,435 |
public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _f... | public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _f... | 1,125,436 |
public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _f... | public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _f... | 1,125,437 |
public abstract Object makeObject(Object key); | public abstract Object makeObject(Object key) throws Exception; | 1,125,438 |
public void returnObject(Object key, Object obj) throws Exception { // grab the pool (list) of objects associated with the given key CursorableLinkedList pool = null; synchronized(this) { pool = (CursorableLinkedList)(_poolMap.get(key)); // if it doesn't exist, create it ... | public void returnObject(Object key, Object obj) throws Exception { // grab the pool (list) of objects associated with the given key CursorableLinkedList pool = null; synchronized(this) { pool = (CursorableLinkedList)(_poolMap.get(key)); // if it doesn't exist, create it ... | 1,125,439 |
public void returnObject(Object obj) throws Exception { assertOpen(); boolean success = true; if(null != _factory) { if(!(_factory.validateObject(obj))) { success = false; } else { try { _factory.passivateObject(obj); ... | public void returnObject(Object obj) throws Exception { assertOpen(); boolean success = true; if(null != _factory) { if(!(_factory.validateObject(obj))) { success = false; } else { try { _factory.passivateObject(obj); ... | 1,125,440 |
public static void main(String[] args) { if ( args.length < 2 ) { System.out.println( "Too few arguments" ); displayHelpMessage(); return; } try { _mtb = new ModelBasedTesting( args[ 0 ] ); _mtb.generateJavaCode_XDE( args[ 1 ] ); } catch ( RuntimeException e ) { System.out.println( e.getMessage() )... | public static void main(String[] args) { if ( args.length < 2 ) { System.out.println( "Too few arguments" ); displayHelpMessage(); return; } try { _mtb = new ModelBasedTesting( args[ 0 ] ); _mtb.generateJavaCode_XDE( args[ 1 ] ); } catch ( RuntimeException e ) { e.printStackTrace(); } } | 1,125,442 |
public ModelBasedTesting( String graphmlFileName_ ) { _graphmlFileName = graphmlFileName_; _object = null; _logger = org.apache.log4j.Logger.getLogger( ModelBasedTesting.class ); PropertyConfigurator.configure("log4j.properties"); readFiles(); } | public ModelBasedTesting( String graphmlFileName_, Object object_ ) { _graphmlFileName = graphmlFileName_; _object = null; _logger = org.apache.log4j.Logger.getLogger( ModelBasedTesting.class ); PropertyConfigurator.configure("log4j.properties"); readFiles(); } | 1,125,443 |
public ModelBasedTesting( String graphmlFileName_ ) { _graphmlFileName = graphmlFileName_; _object = null; _logger = org.apache.log4j.Logger.getLogger( ModelBasedTesting.class ); PropertyConfigurator.configure("log4j.properties"); readFiles(); } | public ModelBasedTesting( String graphmlFileName_ ) { _graphmlFileName = graphmlFileName_; _object = object_; _logger = org.apache.log4j.Logger.getLogger( ModelBasedTesting.class ); PropertyConfigurator.configure("log4j.properties"); readFiles(); } | 1,125,444 |
public ModelBasedTesting( String graphmlFileName_ ) { _graphmlFileName = graphmlFileName_; _object = null; _logger = org.apache.log4j.Logger.getLogger( ModelBasedTesting.class ); PropertyConfigurator.configure("log4j.properties"); readFiles(); } | public ModelBasedTesting( String graphmlFileName_ ) { _graphmlFileName = graphmlFileName_; _object = null; _logger = org.apache.log4j.Logger.getLogger( ModelBasedTesting.class ); readFiles(); } | 1,125,445 |
public void activateObject(Object key, Object obj) { } | public void activateObject(Object key, Object obj) throws Exception { } | 1,125,446 |
public void destroyObject(Object key, Object obj) { } | public void destroyObject(Object key, Object obj) throws Exception { } | 1,125,447 |
public void passivateObject(Object key, Object obj) { } | public void passivateObject(Object key, Object obj) throws Exception { } | 1,125,448 |
public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _f... | public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _f... | 1,125,449 |
public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _f... | public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _f... | 1,125,450 |
public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _f... | public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _f... | 1,125,451 |
public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _f... | public synchronized void returnObject(Object obj) throws Exception { _numActive--; if(null == _factory || _factory.validateObject(obj)) { if(null != _factory) { try { _factory.passivateObject(obj); } catch(Exception e) { _f... | 1,125,452 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { ... | 1,125,454 |
public synchronized void evict() throws Exception { assertOpen(); if(!_pool.isEmpty()) { if(null == _evictionCursor) { _evictionCursor = (_pool.cursor(_pool.size())); } else if(!_evictionCursor.hasPrevious()) { _evictionCursor.close(); ... | public synchronized void evict() throws Exception { assertOpen(); if(!_pool.isEmpty()) { if(null == _evictionCursor) { _evictionCursor = (_pool.cursor(_pool.size())); } else if(!_evictionCursor.hasPrevious()) { _evictionCursor.close(); ... | 1,125,455 |
public TestKeyedObjectPoolFactory(final String name) { super(name); } | protected TestKeyedObjectPoolFactory(final String name) { super(name); } | 1,125,456 |
protected KeyedObjectPoolFactory makeFactory(KeyedPoolableObjectFactory objectFactory) throws UnsupportedOperationException{ throw new UnsupportedOperationException("Subclass needs to override makeFactory method."); } | protected KeyedObjectPoolFactory makeFactory(KeyedPoolableObjectFactory objectFactory) throws UnsupportedOperationException{ throw new UnsupportedOperationException("Subclass needs to override makeFactory method."); } | 1,125,457 |
public StackKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory) { this(factory,StackKeyedObjectPool.DEFAULT_MAX_SLEEPING,StackKeyedObjectPool.DEFAULT_INIT_SLEEPING_CAPACITY); } | public StackKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory) { this(factory,StackKeyedObjectPool.DEFAULT_MAX_SLEEPING,StackKeyedObjectPool.DEFAULT_INIT_SLEEPING_CAPACITY); } | 1,125,458 |
public GenericObjectPool() { this(null,DEFAULT_MAX_ACTIVE,DEFAULT_WHEN_EXHAUSTED_ACTION,DEFAULT_MAX_WAIT,DEFAULT_MAX_IDLE,DEFAULT_TEST_ON_BORROW,DEFAULT_TEST_ON_RETURN,DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,DEFAULT_NUM_TESTS_PER_EVICTION_RUN,DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,DEFAULT_TEST_WHILE_IDLE);... | public GenericObjectPool() { this(null,DEFAULT_MAX_ACTIVE,DEFAULT_WHEN_EXHAUSTED_ACTION,DEFAULT_MAX_WAIT,DEFAULT_MAX_IDLE,DEFAULT_MIN_IDLE,DEFAULT_TEST_ON_BORROW,DEFAULT_TEST_ON_RETURN,DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,DEFAULT_NUM_TESTS_PER_EVICTION_RUN,DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,DEFAULT_... | 1,125,459 |
public synchronized void evict() throws Exception { Object key = null; if (_recentlyEvictedKeys == null) { _recentlyEvictedKeys = new HashSet(_poolMap.size()); } Set remainingKeys = new HashSet(_poolMap.keySet()); remainingKeys.removeAll(_recentlyEvictedKeys); It... | public synchronized void evict() throws Exception { Object key = null; if (_recentlyEvictedKeys == null) { _recentlyEvictedKeys = new HashSet(_poolMap.size()); } Set remainingKeys = new HashSet(_poolMap.keySet()); remainingKeys.removeAll(_recentlyEvictedKeys); It... | 1,125,462 |
public synchronized Object borrowObject(Object key) throws Exception { long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new C... | public synchronized Object borrowObject(Object key) throws Exception { long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new C... | 1,125,463 |
protected synchronized void startEvictor(long delay) { if(null != _evictor) { _evictor.cancel(); _evictor = null; } if(delay > 0) { _evictor = new Evictor(delay); Thread t = new Thread(_evictor); t.setDaemon(true); t.start(); ... | protected synchronized void startEvictor(long delay) { if(null != _evictor) { _evictor.cancel(); _evictor = null; } if(delay > 0) { _evictor = new Evictor(delay); Thread t = new Thread(_evictor); t.setDaemon(true); t.start(); ... | 1,125,465 |
public void addObject() throws Exception { Object obj = _factory.makeObject(); synchronized(this) { _numActive++; // A little slimy - must do this because returnObject decrements it. this.returnObject(obj); } } | public void addObject() throws Exception { Object obj = _factory.makeObject(); synchronized(this) { _numActive++; // A little slimy - must do this because returnObject decrements it. this.returnObject(obj); } } | 1,125,466 |
public void returnObject(Object obj) throws Exception { assertOpen(); boolean success = true; if(_testOnReturn && !(_factory.validateObject(obj))) { success = false; } else { try { _factory.passivateObject(obj); } catch(Exception e) { ... | public void returnObject(Object obj) throws Exception { assertOpen(); boolean success = true; if(_testOnReturn && !(_factory.validateObject(obj))) { success = false; } else { try { _factory.passivateObject(obj); } catch(Exception e) { ... | 1,125,467 |
public int size() { if (prune) { synchronized (getObjectPool().getPool()) { final Iterator iter = super.listIterator(); while (iter.hasNext()) { final EvictorReference ref = (EvictorReference)iter.next(); if (ref != null && ref.ge... | public int size() { if (prune) { synchronized (getObjectPool().getPool()) { final Iterator iter = super.listIterator(); while (iter.hasNext()) { final EvictorReference ref = (EvictorReference)iter.next(); if (ref != null && ref.ge... | 1,125,468 |
private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants( new or... | private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); Document doc = parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants(... | 1,125,470 |
private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants( new or... | private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = doc.getDescendants( new org... | 1,125,471 |
private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants( new or... | private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants( new or... | 1,125,472 |
private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants( new or... | private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants( new or... | 1,125,473 |
public synchronized Object borrowObject(Object key) throws Exception { long starttime = System.currentTimeMillis(); for(;;) { CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); ... | public synchronized Object borrowObject(Object key) throws Exception { long starttime = System.currentTimeMillis(); for(;;) { CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); ... | 1,125,474 |
public Object makeObject() { counter++; return String.valueOf(counter); } | public Object makeObject() { counter++; return new String(String.valueOf(counter)); } | 1,125,475 |
public void testOutOfMemory() throws Exception { pool = new SoftReferenceObjectPool(new SmallPoolableObjectFactory()); Object obj = pool.borrowObject(); assertEquals("1", obj); pool.returnObject(obj); obj = null; assertEquals(1, pool.getNumIdle()); try { ... | public void testOutOfMemory() throws Exception { pool = new SoftReferenceObjectPool(new SmallPoolableObjectFactory()); Object obj = pool.borrowObject(); assertEquals("1", obj); pool.returnObject(obj); obj = null; assertEquals(1, pool.getNumIdle()); try { ... | 1,125,476 |
public void testOutOfMemory() throws Exception { pool = new SoftReferenceObjectPool(new SmallPoolableObjectFactory()); Object obj = pool.borrowObject(); assertEquals("1", obj); pool.returnObject(obj); obj = null; assertEquals(1, pool.getNumIdle()); try { ... | public void testOutOfMemory() throws Exception { pool = new SoftReferenceObjectPool(new SmallPoolableObjectFactory()); Object obj = pool.borrowObject(); assertEquals("1", obj); pool.returnObject(obj); obj = null; assertEquals(1, pool.getNumIdle()); try { ... | 1,125,477 |
public void testOutOfMemory1000() throws Exception { pool = new SoftReferenceObjectPool(new SmallPoolableObjectFactory()); for (int i = 0 ; i < 1000 ; i++) { pool.addObject(); } Object obj = pool.borrowObject(); assertEquals("1000", obj); pool.returnObject(obj); ... | public void testOutOfMemory1000() throws Exception { pool = new SoftReferenceObjectPool(new SmallPoolableObjectFactory()); for (int i = 0 ; i < 1000 ; i++) { pool.addObject(); } Object obj = pool.borrowObject(); assertEquals("1000", obj); pool.returnObject(obj); ... | 1,125,478 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.