rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
TreeMap map = new TreeMap();
final Map map = new TreeMap();
public synchronized void clearOldest() { // build sorted map of idle objects TreeMap map = new TreeMap(); for (Iterator keyiter = _poolMap.keySet().iterator(); keyiter.hasNext();) { Object key = keyiter.next(); LinkedList list = (LinkedList) _poolMap.get(key); for (Iterator it = list.iterator(); it.hasNext();) { // each item into the map uses the objectimestamppair object // as the key. It then gets sorted based on the timstamp field // each value in the map is the parent list it belongs in. ObjectTimestampPair pair = (ObjectTimestampPair) it.next(); map.put(pair, key); } } // Now iterate created map and kill the first 15% plus one to account for zero Set setPairKeys = map.entrySet(); int itemsToRemove = ((int) (map.size() * 0.15)) + 1; Iterator iter = setPairKeys.iterator(); while (iter.hasNext() && itemsToRemove > 0) { Map.Entry entry = (Map.Entry) iter.next(); // kind of backwards on naming. In the map, each key is the objecttimestamppair // because it has the ordering with the timestamp value. Each value that the // key references is the key of the list it belongs to. Object key = entry.getValue(); ObjectTimestampPair pairTimeStamp = (ObjectTimestampPair) entry.getKey(); LinkedList list = (LinkedList) _poolMap.get(key); list.remove(pairTimeStamp); try { _factory.destroyObject(key, pairTimeStamp.value); } catch (Exception e) { // ignore error, keep destroying the rest } // if that was the last object for that key, drop that pool if (list.isEmpty()) { _poolMap.remove(key); } _totalIdle--; itemsToRemove--; } notifyAll(); }
50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/dca25ff99b1206e30015dfa1823600ce9b50b958/GenericKeyedObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
Object key = keyiter.next(); LinkedList list = (LinkedList) _poolMap.get(key);
final Object key = keyiter.next(); final LinkedList list = ((ObjectQueue)_poolMap.get(key)).queue;
public synchronized void clearOldest() { // build sorted map of idle objects TreeMap map = new TreeMap(); for (Iterator keyiter = _poolMap.keySet().iterator(); keyiter.hasNext();) { Object key = keyiter.next(); LinkedList list = (LinkedList) _poolMap.get(key); for (Iterator it = list.iterator(); it.hasNext();) { // each item into the map uses the objectimestamppair object // as the key. It then gets sorted based on the timstamp field // each value in the map is the parent list it belongs in. ObjectTimestampPair pair = (ObjectTimestampPair) it.next(); map.put(pair, key); } } // Now iterate created map and kill the first 15% plus one to account for zero Set setPairKeys = map.entrySet(); int itemsToRemove = ((int) (map.size() * 0.15)) + 1; Iterator iter = setPairKeys.iterator(); while (iter.hasNext() && itemsToRemove > 0) { Map.Entry entry = (Map.Entry) iter.next(); // kind of backwards on naming. In the map, each key is the objecttimestamppair // because it has the ordering with the timestamp value. Each value that the // key references is the key of the list it belongs to. Object key = entry.getValue(); ObjectTimestampPair pairTimeStamp = (ObjectTimestampPair) entry.getKey(); LinkedList list = (LinkedList) _poolMap.get(key); list.remove(pairTimeStamp); try { _factory.destroyObject(key, pairTimeStamp.value); } catch (Exception e) { // ignore error, keep destroying the rest } // if that was the last object for that key, drop that pool if (list.isEmpty()) { _poolMap.remove(key); } _totalIdle--; itemsToRemove--; } notifyAll(); }
50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/dca25ff99b1206e30015dfa1823600ce9b50b958/GenericKeyedObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
ObjectTimestampPair pair = (ObjectTimestampPair) it.next(); map.put(pair, key);
map.put(it.next(), key);
public synchronized void clearOldest() { // build sorted map of idle objects TreeMap map = new TreeMap(); for (Iterator keyiter = _poolMap.keySet().iterator(); keyiter.hasNext();) { Object key = keyiter.next(); LinkedList list = (LinkedList) _poolMap.get(key); for (Iterator it = list.iterator(); it.hasNext();) { // each item into the map uses the objectimestamppair object // as the key. It then gets sorted based on the timstamp field // each value in the map is the parent list it belongs in. ObjectTimestampPair pair = (ObjectTimestampPair) it.next(); map.put(pair, key); } } // Now iterate created map and kill the first 15% plus one to account for zero Set setPairKeys = map.entrySet(); int itemsToRemove = ((int) (map.size() * 0.15)) + 1; Iterator iter = setPairKeys.iterator(); while (iter.hasNext() && itemsToRemove > 0) { Map.Entry entry = (Map.Entry) iter.next(); // kind of backwards on naming. In the map, each key is the objecttimestamppair // because it has the ordering with the timestamp value. Each value that the // key references is the key of the list it belongs to. Object key = entry.getValue(); ObjectTimestampPair pairTimeStamp = (ObjectTimestampPair) entry.getKey(); LinkedList list = (LinkedList) _poolMap.get(key); list.remove(pairTimeStamp); try { _factory.destroyObject(key, pairTimeStamp.value); } catch (Exception e) { // ignore error, keep destroying the rest } // if that was the last object for that key, drop that pool if (list.isEmpty()) { _poolMap.remove(key); } _totalIdle--; itemsToRemove--; } notifyAll(); }
50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/dca25ff99b1206e30015dfa1823600ce9b50b958/GenericKeyedObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
LinkedList list = (LinkedList) _poolMap.get(key);
final LinkedList list = ((ObjectQueue)(_poolMap.get(key))).queue;
public synchronized void clearOldest() { // build sorted map of idle objects TreeMap map = new TreeMap(); for (Iterator keyiter = _poolMap.keySet().iterator(); keyiter.hasNext();) { Object key = keyiter.next(); LinkedList list = (LinkedList) _poolMap.get(key); for (Iterator it = list.iterator(); it.hasNext();) { // each item into the map uses the objectimestamppair object // as the key. It then gets sorted based on the timstamp field // each value in the map is the parent list it belongs in. ObjectTimestampPair pair = (ObjectTimestampPair) it.next(); map.put(pair, key); } } // Now iterate created map and kill the first 15% plus one to account for zero Set setPairKeys = map.entrySet(); int itemsToRemove = ((int) (map.size() * 0.15)) + 1; Iterator iter = setPairKeys.iterator(); while (iter.hasNext() && itemsToRemove > 0) { Map.Entry entry = (Map.Entry) iter.next(); // kind of backwards on naming. In the map, each key is the objecttimestamppair // because it has the ordering with the timestamp value. Each value that the // key references is the key of the list it belongs to. Object key = entry.getValue(); ObjectTimestampPair pairTimeStamp = (ObjectTimestampPair) entry.getKey(); LinkedList list = (LinkedList) _poolMap.get(key); list.remove(pairTimeStamp); try { _factory.destroyObject(key, pairTimeStamp.value); } catch (Exception e) { // ignore error, keep destroying the rest } // if that was the last object for that key, drop that pool if (list.isEmpty()) { _poolMap.remove(key); } _totalIdle--; itemsToRemove--; } notifyAll(); }
50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/dca25ff99b1206e30015dfa1823600ce9b50b958/GenericKeyedObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
final LinkedList list = (LinkedList)_poolMap.get(key);
final LinkedList list = ((ObjectQueue)_poolMap.get(key)).queue;
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); Iterator keyIter = remainingKeys.iterator(); ListIterator objIter = null; for(int i=0,m=getNumTests();i<m;i++) { if(_poolMap.size() > 0) { // Find next idle object pool key to work on if (key == null) { if (!keyIter.hasNext()) { _recentlyEvictedKeys.clear(); remainingKeys = new HashSet(_poolMap.keySet()); keyIter = remainingKeys.iterator(); } if (!keyIter.hasNext()) { // done, there are no keyed pools return; } key = keyIter.next(); } // if we don't have a keyed object pool iterator if (objIter == null) { final LinkedList list = (LinkedList)_poolMap.get(key); if (_evictLastIndex < 0 || _evictLastIndex > list.size()) { _evictLastIndex = list.size(); } objIter = list.listIterator(_evictLastIndex); } // if the _evictionCursor has a previous object, then test it if(objIter.hasPrevious()) { ObjectTimestampPair pair = (ObjectTimestampPair)(objIter.previous()); boolean removeObject=false; if(_minEvictableIdleTimeMillis > 0 && System.currentTimeMillis() - pair.tstamp > _minEvictableIdleTimeMillis) { removeObject=true; } if(_testWhileIdle && removeObject == false) { boolean active = false; try { _factory.activateObject(key,pair.value); active = true; } catch(Exception e) { removeObject=true; } if(active) { if(!_factory.validateObject(key,pair.value)) { removeObject=true; } else { try { _factory.passivateObject(key,pair.value); } catch(Exception e) { removeObject=true; } } } } if(removeObject) { try { objIter.remove(); _totalIdle--; _factory.destroyObject(key,pair.value); // Do not remove the key from the _poolList or _poolmap, even if the list // stored in the _poolMap for this key is empty when the // {@link #getMinIdle <code>minIdle</code>} is > 0. // // Otherwise if it was the last object for that key, drop that pool if ((_minIdle == 0) && (((LinkedList)(_poolMap.get(key))).isEmpty())) { _poolMap.remove(key); } } catch(Exception e) { ; // ignored } } } else { // else done evicting keyed pool _recentlyEvictedKeys.add(key); _evictLastIndex = -1; objIter = null; } } } }
50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/dca25ff99b1206e30015dfa1823600ce9b50b958/GenericKeyedObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
if ((_minIdle == 0) && (((LinkedList)(_poolMap.get(key))).isEmpty())) {
if ((_minIdle == 0) && (((ObjectQueue)(_poolMap.get(key))).queue.isEmpty())) {
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); Iterator keyIter = remainingKeys.iterator(); ListIterator objIter = null; for(int i=0,m=getNumTests();i<m;i++) { if(_poolMap.size() > 0) { // Find next idle object pool key to work on if (key == null) { if (!keyIter.hasNext()) { _recentlyEvictedKeys.clear(); remainingKeys = new HashSet(_poolMap.keySet()); keyIter = remainingKeys.iterator(); } if (!keyIter.hasNext()) { // done, there are no keyed pools return; } key = keyIter.next(); } // if we don't have a keyed object pool iterator if (objIter == null) { final LinkedList list = (LinkedList)_poolMap.get(key); if (_evictLastIndex < 0 || _evictLastIndex > list.size()) { _evictLastIndex = list.size(); } objIter = list.listIterator(_evictLastIndex); } // if the _evictionCursor has a previous object, then test it if(objIter.hasPrevious()) { ObjectTimestampPair pair = (ObjectTimestampPair)(objIter.previous()); boolean removeObject=false; if(_minEvictableIdleTimeMillis > 0 && System.currentTimeMillis() - pair.tstamp > _minEvictableIdleTimeMillis) { removeObject=true; } if(_testWhileIdle && removeObject == false) { boolean active = false; try { _factory.activateObject(key,pair.value); active = true; } catch(Exception e) { removeObject=true; } if(active) { if(!_factory.validateObject(key,pair.value)) { removeObject=true; } else { try { _factory.passivateObject(key,pair.value); } catch(Exception e) { removeObject=true; } } } } if(removeObject) { try { objIter.remove(); _totalIdle--; _factory.destroyObject(key,pair.value); // Do not remove the key from the _poolList or _poolmap, even if the list // stored in the _poolMap for this key is empty when the // {@link #getMinIdle <code>minIdle</code>} is > 0. // // Otherwise if it was the last object for that key, drop that pool if ((_minIdle == 0) && (((LinkedList)(_poolMap.get(key))).isEmpty())) { _poolMap.remove(key); } } catch(Exception e) { ; // ignored } } } else { // else done evicting keyed pool _recentlyEvictedKeys.add(key); _evictLastIndex = -1; objIter = null; } } } }
50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/dca25ff99b1206e30015dfa1823600ce9b50b958/GenericKeyedObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
decrementActiveCount(key);
ObjectQueue pool = (ObjectQueue) (_poolMap.get(key)); if(null == pool) { pool = new ObjectQueue(); _poolMap.put(key, pool); } pool.decrementActiveCount();
public synchronized void invalidateObject(Object key, Object obj) throws Exception { try { _factory.destroyObject(key, obj); } catch (Exception e) { // swallowed } finally { decrementActiveCount(key); notifyAll(); // _totalActive has changed } }
50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/dca25ff99b1206e30015dfa1823600ce9b50b958/GenericKeyedObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
LinkedList pool = (LinkedList)(_poolMap.get(key));
ObjectQueue pool = (ObjectQueue)(_poolMap.get(key));
public synchronized void preparePool(Object key, boolean populateImmediately) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if (null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } if (populateImmediately) { try { // Create the pooled objects ensureMinIdle(key); } catch (Exception e) { //Do nothing } } }
50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/dca25ff99b1206e30015dfa1823600ce9b50b958/GenericKeyedObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
pool = new LinkedList();
pool = new ObjectQueue();
public synchronized void preparePool(Object key, boolean populateImmediately) { LinkedList pool = (LinkedList)(_poolMap.get(key)); if (null == pool) { pool = new LinkedList(); _poolMap.put(key,pool); } if (populateImmediately) { try { // Create the pooled objects ensureMinIdle(key); } catch (Exception e) { //Do nothing } } }
50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/dca25ff99b1206e30015dfa1823600ce9b50b958/GenericKeyedObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
LinkedList pool = (LinkedList) (_poolMap.get(key));
ObjectQueue pool = (ObjectQueue) (_poolMap.get(key));
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } decrementActiveCount(key); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/dca25ff99b1206e30015dfa1823600ce9b50b958/GenericKeyedObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
pool = new LinkedList();
pool = new ObjectQueue();
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } decrementActiveCount(key); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/dca25ff99b1206e30015dfa1823600ce9b50b958/GenericKeyedObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
decrementActiveCount(key);
pool.decrementActiveCount();
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } decrementActiveCount(key); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/dca25ff99b1206e30015dfa1823600ce9b50b958/GenericKeyedObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) {
if(_maxIdle >= 0 && (pool.queue.size() >= _maxIdle)) {
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } decrementActiveCount(key); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/dca25ff99b1206e30015dfa1823600ce9b50b958/GenericKeyedObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
pool.addLast(new ObjectTimestampPair(obj));
pool.queue.addLast(new ObjectTimestampPair(obj));
public synchronized void returnObject(Object key, Object obj) throws Exception { // if we need to validate this object, do so boolean success = true; // whether or not this object passed validation if(_testOnReturn && !_factory.validateObject(key, obj)) { success = false; try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if (isClosed()) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored } return; } boolean shouldDestroy = false; // grab the pool (list) of objects associated with the given key LinkedList pool = (LinkedList) (_poolMap.get(key)); // if it doesn't exist, create it if(null == pool) { pool = new LinkedList(); _poolMap.put(key, pool); } decrementActiveCount(key); // if there's no space in the pool, flag the object for destruction // else if we passivated succesfully, return it to the pool if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) { shouldDestroy = true; } else if(success) { pool.addLast(new ObjectTimestampPair(obj)); _totalIdle++; } notifyAll(); if(shouldDestroy) { try { _factory.destroyObject(key, obj); } catch(Exception e) { // ignored? } } }
50977 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50977/dca25ff99b1206e30015dfa1823600ce9b50b958/GenericKeyedObjectPool.java/buggy/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
return javaVersion.startsWith("1.5") || javaVersion.startsWith("1.6");
return TestNG.JDK_ANNOTATION_TYPE.equals(javaVersion) || javaVersion.startsWith("1.5") || javaVersion.startsWith("1.6");
private boolean isJDK15(String javaVersion) { return javaVersion.startsWith("1.5") || javaVersion.startsWith("1.6"); }
53349 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53349/d40d1cb62b9fe19b5aa4eaab262d9c354adf8af8/TestNGLaunchConfigurationDelegate.java/buggy/src/main/org/testng/eclipse/launch/TestNGLaunchConfigurationDelegate.java
public OutputMonitor (AbstractUIProcessHandler handler, InputStream is, boolean stderr)
public OutputMonitor( AbstractUIProcessHandler handler, InputStream is, boolean stderr)
public OutputMonitor (AbstractUIProcessHandler handler, InputStream is, boolean stderr) { this.stderr = stderr; this.reader = new BufferedReader (new InputStreamReader (is)); this.handler = handler; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
this.reader = new BufferedReader (new InputStreamReader (is));
this.reader = new BufferedReader(new InputStreamReader(is));
public OutputMonitor (AbstractUIProcessHandler handler, InputStream is, boolean stderr) { this.stderr = stderr; this.reader = new BufferedReader (new InputStreamReader (is)); this.handler = handler; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public void doStop ()
public void doStop()
public void doStop () { synchronized (this.stop) { this.stop = new Boolean (true); } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
this.stop = new Boolean (true);
this.stop = new Boolean(true);
public void doStop () { synchronized (this.stop) { this.stop = new Boolean (true); } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public void run ()
public void run()
public void run () { try { String line; while ((line = reader.readLine()) != null) { this.handler.logOutput(line, stderr); synchronized (this.stop) { if (stop.booleanValue()) return; } } } catch (IOException ioe) { this.handler.logOutput (ioe.toString (), true); } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public void run () { try { String line; while ((line = reader.readLine()) != null) { this.handler.logOutput(line, stderr); synchronized (this.stop) { if (stop.booleanValue()) return; } } } catch (IOException ioe) { this.handler.logOutput (ioe.toString (), true); } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
catch (IOException ioe) { this.handler.logOutput (ioe.toString (), true); }
public void run () { try { String line; while ((line = reader.readLine()) != null) { this.handler.logOutput(line, stderr); synchronized (this.stop) { if (stop.booleanValue()) return; } } } catch (IOException ioe) { this.handler.logOutput (ioe.toString (), true); } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public ExecutableFile (String fn, List args)
public ExecutableFile(String fn, List args)
public ExecutableFile (String fn, List args) { this.filename = fn; this.arguments = args; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
this.arguments = args;
this.arguments = args;
public ExecutableFile (String fn, List args) { this.filename = fn; this.arguments = args; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs)
public boolean run( AbstractUIProcessHandler handler, VariableSubstitutor vs)
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
String params[] = new String[this.arguments.size()+1];
String params[] = new String[this.arguments.size() + 1];
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); )
for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext();)
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
params[i++] = vs.substitute ((String)arg_it.next(), "plain");
params[i++] = vs.substitute((String) arg_it.next(), "plain");
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon);
Process p = Runtime.getRuntime().exec(params); OutputMonitor stdoutMon = new OutputMonitor(this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor(this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread(stdoutMon); Thread stderrThread = new Thread(stderrMon);
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
int exitStatus = p.waitFor ();
int exitStatus = p.waitFor();
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO)
if (this .handler .askQuestion( "process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO)
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
} catch (InterruptedException ie)
} catch (InterruptedException ie)
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
p.destroy (); this.handler.emitError ("process interrupted", ie.toString ());
p.destroy(); this.handler.emitError("process interrupted", ie.toString());
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
} catch (IOException ioe)
} catch (IOException ioe)
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { this.handler = handler; String params[] = new String[this.arguments.size()+1]; params[0] = vs.substitute(this.filename, "plain"); int i = 1; for (Iterator arg_it = this.arguments.iterator(); arg_it.hasNext(); ) { params[i++] = vs.substitute ((String)arg_it.next(), "plain"); } try { Process p = Runtime.getRuntime().exec (params); OutputMonitor stdoutMon = new OutputMonitor (this.handler, p.getInputStream(), false); OutputMonitor stderrMon = new OutputMonitor (this.handler, p.getErrorStream(), true); Thread stdoutThread = new Thread (stdoutMon); Thread stderrThread = new Thread (stderrMon); stdoutThread.setDaemon(true); stderrThread.setDaemon(true); stdoutThread.start(); stderrThread.start(); try { int exitStatus = p.waitFor (); stopMonitor(stdoutMon, stdoutThread); stopMonitor(stderrMon, stderrThread); if (exitStatus != 0) { if (this.handler.askQuestion("process execution failed", "Continue anyway?", AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_NO) { return false; } } } catch (InterruptedException ie) { p.destroy (); this.handler.emitError ("process interrupted", ie.toString ()); return false; } } catch (IOException ioe) { this.handler.emitError("I/O error", ioe.toString()); return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
private void stopMonitor (OutputMonitor m, Thread t)
private void stopMonitor(OutputMonitor m, Thread t)
private void stopMonitor (OutputMonitor m, Thread t) { // taken from com.izforge.izpack.util.FileExecutor m.doStop(); long softTimeout = 500; try { t.join(softTimeout); } catch (InterruptedException e) {} if (t.isAlive() == false) return; t.interrupt(); long hardTimeout = 500; try { t.join(hardTimeout); } catch (InterruptedException e) {} }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
catch (InterruptedException e) {}
private void stopMonitor (OutputMonitor m, Thread t) { // taken from com.izforge.izpack.util.FileExecutor m.doStop(); long softTimeout = 500; try { t.join(softTimeout); } catch (InterruptedException e) {} if (t.isAlive() == false) return; t.interrupt(); long hardTimeout = 500; try { t.join(hardTimeout); } catch (InterruptedException e) {} }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
catch (InterruptedException e) {}
private void stopMonitor (OutputMonitor m, Thread t) { // taken from com.izforge.izpack.util.FileExecutor m.doStop(); long softTimeout = 500; try { t.join(softTimeout); } catch (InterruptedException e) {} if (t.isAlive() == false) return; t.interrupt(); long hardTimeout = 500; try { t.join(hardTimeout); } catch (InterruptedException e) {} }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs);
public boolean run( AbstractUIProcessHandler handler, VariableSubstitutor vs);
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs);
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public ProcessingJob (String name, List processables)
public ProcessingJob(String name, List processables)
public ProcessingJob (String name, List processables) { this.name = name; this.processables = processables; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs)
public boolean run( AbstractUIProcessHandler handler, VariableSubstitutor vs)
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { for (Iterator pr_it = this.processables.iterator(); pr_it.hasNext(); ) { Processable pr = (Processable)pr_it.next(); if (! pr.run (handler, vs)) return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
for (Iterator pr_it = this.processables.iterator(); pr_it.hasNext(); )
for (Iterator pr_it = this.processables.iterator(); pr_it.hasNext();)
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { for (Iterator pr_it = this.processables.iterator(); pr_it.hasNext(); ) { Processable pr = (Processable)pr_it.next(); if (! pr.run (handler, vs)) return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
Processable pr = (Processable)pr_it.next(); if (! pr.run (handler, vs)) return false;
Processable pr = (Processable) pr_it.next(); if (!pr.run(handler, vs)) return false;
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { for (Iterator pr_it = this.processables.iterator(); pr_it.hasNext(); ) { Processable pr = (Processable)pr_it.next(); if (! pr.run (handler, vs)) return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public boolean run (AbstractUIProcessHandler handler, VariableSubstitutor vs) { for (Iterator pr_it = this.processables.iterator(); pr_it.hasNext(); ) { Processable pr = (Processable)pr_it.next(); if (! pr.run (handler, vs)) return false; } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public ProcessPanelWorker(AutomatedInstallData idata, AbstractUIProcessHandler handler)
public ProcessPanelWorker( AutomatedInstallData idata, AbstractUIProcessHandler handler)
public ProcessPanelWorker(AutomatedInstallData idata, AbstractUIProcessHandler handler) throws IOException { this.idata = idata; this.handler = handler; this.vs = new VariableSubstitutor(idata.getVariableValueMap()); if (! readSpec ()) throw new IOException ("Error reading processing specification"); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
if (! readSpec ()) throw new IOException ("Error reading processing specification");
if (!readSpec()) throw new IOException("Error reading processing specification");
public ProcessPanelWorker(AutomatedInstallData idata, AbstractUIProcessHandler handler) throws IOException { this.idata = idata; this.handler = handler; this.vs = new VariableSubstitutor(idata.getVariableValueMap()); if (! readSpec ()) throw new IOException ("Error reading processing specification"); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
private boolean readSpec ()
private boolean readSpec()
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace();
InputStream input; try { input = ResourceManager.getInstance().getInputStream(SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace();
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
}
}
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ());
StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setValidator(new NonValidator()); try { parser.setReader(new StdXMLReader(input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println("Error parsing XML specification for processing."); System.err.println(e.toString());
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
}
}
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
if (! this.spec.hasChildren ())
if (!this.spec.hasChildren())
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); )
for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); )
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
XMLElement job_el = (XMLElement)job_it.next ();
XMLElement job_el = (XMLElement) job_it.next();
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
List constraints = OsConstraint.getOsList (job_el);
List constraints = OsConstraint.getOsList(job_el);
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
List ef_list = new ArrayList ();
List ef_list = new ArrayList();
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); )
for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator(); ef_it.hasNext(); )
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
XMLElement ef = (XMLElement)ef_it.next();
XMLElement ef = (XMLElement) ef_it.next();
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
System.err.println ("missing \"name\" attribute for <executefile>");
System.err.println("missing \"name\" attribute for <executefile>");
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();)
List args = new ArrayList(); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext(); )
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
XMLElement arg_el = (XMLElement)arg_it.next();
XMLElement arg_el = (XMLElement) arg_it.next();
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
args.add (arg_val);
args.add(arg_val);
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
ef_list.add (new ExecutableFile (ef_name, args));
ef_list.add(new ExecutableFile(ef_name, args));
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
this.jobs.add (new ProcessingJob (job_name, ef_list));
this.jobs.add(new ProcessingJob(job_name, ef_list));
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
private boolean readSpec () { InputStream input; try { input = ResourceManager.getInstance().getInputStream (SPEC_RESOURCE_NAME); } catch (Exception e) { e.printStackTrace(); return false; } StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); try { parser.setReader (new StdXMLReader (input)); this.spec = (XMLElement) parser.parse(); } catch (Exception e) { System.err.println ("Error parsing XML specification for processing."); System.err.println (e.toString ()); return false; } if (! this.spec.hasChildren ()) return false; for (Iterator job_it = this.spec.getChildrenNamed("job").iterator(); job_it.hasNext(); ) { XMLElement job_el = (XMLElement)job_it.next (); // first check OS constraints - skip jobs not suited for this OS List constraints = OsConstraint.getOsList (job_el); if (OsConstraint.oneMatchesCurrentSystem(constraints)) { List ef_list = new ArrayList (); String job_name = job_el.getAttribute("name", ""); for (Iterator ef_it = job_el.getChildrenNamed("executefile").iterator (); ef_it.hasNext(); ) { XMLElement ef = (XMLElement)ef_it.next(); String ef_name = ef.getAttribute("name"); if ((ef_name == null) || (ef_name.length() == 0)) { System.err.println ("missing \"name\" attribute for <executefile>"); return false; } List args = new ArrayList (); for (Iterator arg_it = ef.getChildrenNamed("arg").iterator(); arg_it.hasNext();) { XMLElement arg_el = (XMLElement)arg_it.next(); String arg_val = arg_el.getContent(); args.add (arg_val); } ef_list.add (new ExecutableFile (ef_name, args)); } this.jobs.add (new ProcessingJob (job_name, ef_list)); } } return true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public void run ()
public void run()
public void run () { this.handler.startProcessing (this.jobs.size()); for (Iterator job_it = this.jobs.iterator(); job_it.hasNext(); ) { ProcessingJob pj = (ProcessingJob)job_it.next(); this.handler.startProcess (pj.name); boolean result = pj.run (this.handler, this.vs); this.handler.finishProcess (); if (! result) break; } this.handler.finishProcessing(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
this.handler.startProcessing (this.jobs.size()); for (Iterator job_it = this.jobs.iterator(); job_it.hasNext(); )
this.handler.startProcessing(this.jobs.size()); for (Iterator job_it = this.jobs.iterator(); job_it.hasNext();)
public void run () { this.handler.startProcessing (this.jobs.size()); for (Iterator job_it = this.jobs.iterator(); job_it.hasNext(); ) { ProcessingJob pj = (ProcessingJob)job_it.next(); this.handler.startProcess (pj.name); boolean result = pj.run (this.handler, this.vs); this.handler.finishProcess (); if (! result) break; } this.handler.finishProcessing(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
ProcessingJob pj = (ProcessingJob)job_it.next(); this.handler.startProcess (pj.name); boolean result = pj.run (this.handler, this.vs); this.handler.finishProcess (); if (! result)
ProcessingJob pj = (ProcessingJob) job_it.next(); this.handler.startProcess(pj.name); boolean result = pj.run(this.handler, this.vs); this.handler.finishProcess(); if (!result)
public void run () { this.handler.startProcessing (this.jobs.size()); for (Iterator job_it = this.jobs.iterator(); job_it.hasNext(); ) { ProcessingJob pj = (ProcessingJob)job_it.next(); this.handler.startProcess (pj.name); boolean result = pj.run (this.handler, this.vs); this.handler.finishProcess (); if (! result) break; } this.handler.finishProcessing(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public void run () { this.handler.startProcessing (this.jobs.size()); for (Iterator job_it = this.jobs.iterator(); job_it.hasNext(); ) { ProcessingJob pj = (ProcessingJob)job_it.next(); this.handler.startProcess (pj.name); boolean result = pj.run (this.handler, this.vs); this.handler.finishProcess (); if (! result) break; } this.handler.finishProcessing(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
public void startThread ()
public void startThread()
public void startThread () { this.processingThread = new Thread (this, "processing thread"); //will call this.run() this.processingThread.start(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
this.processingThread = new Thread (this, "processing thread");
this.processingThread = new Thread(this, "processing thread");
public void startThread () { this.processingThread = new Thread (this, "processing thread"); //will call this.run() this.processingThread.start(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ProcessPanelWorker.java/clean/src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
return iUpdate.saveAndReturnObject( obj ); }
return iUpdate.saveAndReturnObject( obj ); }
public <T extends IObject> T updateObject(T obj) { return iUpdate.saveAndReturnObject( obj ); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e17e319299999d5f384efd834d4873a29017e572/AdminImpl.java/buggy/components/server/src/ome/logic/AdminImpl.java
public IObject updateObject(IObject obj) { update.flush(); return null; }
public <T extends IObject> T updateObject(T obj) { iUpdate.deleteObject( obj ); return null; }
public IObject updateObject(IObject obj) { update.flush(); return null; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e17e319299999d5f384efd834d4873a29017e572/AdminImpl.java/buggy/components/server/src/ome/logic/AdminImpl.java
iUpdate.deleteObject( obj ); return null; }
return iUpdate.saveAndReturnObject( obj ); }
public <T extends IObject> T updateObject(T obj) { iUpdate.deleteObject( obj ); return null; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e17e319299999d5f384efd834d4873a29017e572/AdminImpl.java/buggy/components/server/src/ome/logic/AdminImpl.java
Experimenter userProxy( Long userId );
Experimenter userProxy( String omeName );
Experimenter userProxy( Long userId );
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e17e319299999d5f384efd834d4873a29017e572/LocalAdmin.java/buggy/components/server/src/ome/api/local/LocalAdmin.java
} if (!haveSpec) { return;
public UserInputPanel (InstallerFrame parent, InstallData installData) { super (parent, installData); instanceNumber = instanceCount++; this.parent = parent; // ---------------------------------------------------- // ---------------------------------------------------- layout = new TwoColumnLayout (10, 5, 30, 25, TwoColumnLayout.LEFT); setLayout (layout); // ---------------------------------------------------- // get a locale database // ---------------------------------------------------- ResourceManager resources = new ResourceManager (installData); try { langpack = new LocaleDatabase (resources.getInputStream (SPEC_FILE_NAME)); } catch (Throwable exception) {} // ---------------------------------------------------- // read the specifications // ---------------------------------------------------- try { readSpec (); } catch (Throwable exception) { // log the problem exception.printStackTrace (); } // ---------------------------------------------------- // process all field nodes. Each field node is analyzed // for its type, then an appropriate memeber function // is called that will create the appropriate UI elements. // ---------------------------------------------------- Vector fields = spec.getChildrenNamed (FIELD_NODE_ID); for (int i = 0; i < fields.size (); i++) { XMLElement field = (XMLElement)fields.elementAt (i); String attribute = field.getAttribute (TYPE); if (attribute != null) { if (attribute.equals (RULE_FIELD)) { addRuleField (field); } else if (attribute.equals (TEXT_FIELD)) { addTextField (field); } else if (attribute.equals (COMBO_FIELD)) { addComboBox (field); } else if (attribute.equals (RADIO_FIELD)) { addRadioButton (field); } else if (attribute.equals (SPACE_FIELD)) { addSpace (field); } else if (attribute.equals (DIVIDER_FIELD)) { addDivider (field); } else if (attribute.equals (CHECK_FIELD)) { addCheckBox (field); } else if (attribute.equals (STATIC_TEXT)) { addText (field); } else if (attribute.equals (TITLE_FIELD)) { addTitle (field); } } } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/1fae5b3202246a4fc63ac844b9947307ecbc3e33/UserInputPanel.java/clean/src/lib/com/izforge/izpack/panels/UserInputPanel.java
public ZipOutputStream addPack(int packNumber, String name, boolean required,
public ZipOutputStream addPack(int packNumber, String name, String targetOs, boolean required,
public ZipOutputStream addPack(int packNumber, String name, boolean required, String description) throws Exception { sendMsg("Adding pack #" + packNumber + " : " + name + " ..."); // Adds it in the packs array Pack pack = new Pack(name, description, required); packs.add(packNumber, pack); // Returns the suiting output stream String entryName = "packs/pack" + packNumber; ZipEntry entry = new ZipEntry(entryName); outJar.putNextEntry(entry); return outJar; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/c3234416ca8408295e1d45c60daee2efe9c3f5db/StdPackager.java/buggy/src/lib/com/izforge/izpack/compiler/StdPackager.java
Pack pack = new Pack(name, description, required);
Pack pack = new Pack(name, description, targetOs, required);
public ZipOutputStream addPack(int packNumber, String name, boolean required, String description) throws Exception { sendMsg("Adding pack #" + packNumber + " : " + name + " ..."); // Adds it in the packs array Pack pack = new Pack(name, description, required); packs.add(packNumber, pack); // Returns the suiting output stream String entryName = "packs/pack" + packNumber; ZipEntry entry = new ZipEntry(entryName); outJar.putNextEntry(entry); return outJar; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/c3234416ca8408295e1d45c60daee2efe9c3f5db/StdPackager.java/buggy/src/lib/com/izforge/izpack/compiler/StdPackager.java
manager.add(new Separator()); manager.add(new ExpandAllAction());
else { manager.add(new OpenTestAction(fTestRunnerPart, testInfo.m_testName)); manager.add(new Separator()); manager.add(new ExpandAllAction()); }
public void menuAboutToShow(IMenuManager manager) { if(fTree.getSelectionCount() > 0) { TreeItem treeItem = fTree.getSelection()[0]; RunInfo testInfo = (RunInfo) treeItem.getData("runinfo"); if(RunInfo.RESULT_TYPE == testInfo.m_type) { manager.add(new OpenTestAction(fTestRunnerPart, testInfo.m_className, testInfo.m_methodName)); } manager.add(new Separator()); manager.add(new ExpandAllAction()); } }
53349 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53349/939c2626f5ef7c6550d3a506ac6dd14b7667f498/TestHierarchyTab.java/clean/src/main/org/testng/eclipse/ui/TestHierarchyTab.java
files.add (fileName);
files.add (0, fileName);
private void createShortcuts () { ShortcutData data; for (int i = 0; i < shortcuts.size (); i++) { data = (ShortcutData)shortcuts.elementAt (i); try { groupName = groupName + data.subgroup; shortcut.setLinkName (data.name); shortcut.setLinkType (data.type); shortcut.setArguments (data.commandLine); shortcut.setDescription (data.description); shortcut.setIconLocation (data.iconFile, data.iconIndex); shortcut.setShowCommand (data.initialState); shortcut.setTargetPath (data.target); shortcut.setWorkingDirectory (data.workingDirectory); if (data.addToGroup) { shortcut.setProgramGroup (groupName); } else { shortcut.setProgramGroup (""); } try { // ---------------------------------------------- // save the shortcut only if it is either not on // the desktop or if it is on the desktop and // the user has signalled that it is ok to place // shortcuts on the desktop. // ---------------------------------------------- if ( (data.type != Shortcut.DESKTOP) || ((data.type == Shortcut.DESKTOP) && allowDesktopShortcut.isSelected ()) ) { // save the shortcut shortcut.save (); // add the file and directory name to the file list String fileName = shortcut.getFileName (); String directoryName = shortcut.getDirectoryCreated (); files.add (fileName); if (!(directoryName == null)) { files.add (directoryName); } } } catch (Exception exception) { } } catch (Throwable exception) { continue; } } parent.unlockNextButton(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6f40ecd5b1867dc144086f0070c210d4c6e581ec/ShortcutPanel.java/buggy/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
if (uninstallInfo != null) { String uninstallerName = uninstallInfo.getAttribute("name"); if (uninstallerName != null && uninstallerName.endsWith(".jar") && uninstallerName.length() > ".jar".length()) info.setUninstallerName(uninstallerName); }
protected void addInfo(XMLElement data) throws Exception { notifyCompilerListener("addInfo", CompilerListener.BEGIN, data); // Initialisation XMLElement root = requireChildNamed(data, "info"); Info info = new Info(); String temp = null; info.setAppName(requireContent(requireChildNamed(root, "appname"))); info.setAppVersion(requireContent(requireChildNamed(root, "appversion"))); // We get the installation subpath XMLElement subpath = root.getFirstChildNamed("appsubpath"); if(subpath != null) { info.setInstallationSubPath(requireContent(subpath)); } // validate and insert app URL final XMLElement URLElem = root.getFirstChildNamed("url"); if(URLElem != null) { URL appURL = requireURLContent(URLElem); info.setAppURL(appURL.toString()); } // We get the authors list XMLElement authors = root.getFirstChildNamed("authors"); if (authors != null) { Iterator iter = authors.getChildrenNamed("author").iterator(); while (iter.hasNext()) { XMLElement author = (XMLElement) iter.next(); String name = requireAttribute(author, "name"); String email = requireAttribute(author, "email"); info.addAuthor(new Info.Author(name, email)); } } // We get the java version required XMLElement javaVersion = root.getFirstChildNamed("javaversion"); if (javaVersion != null) info.setJavaVersion(requireContent(javaVersion)); // validate and insert (and require if -web kind) web dir XMLElement webDirURL = root.getFirstChildNamed("webdir"); if (webDirURL != null) info.setWebDirURL(requireURLContent(webDirURL).toString()); if (kind != null) { if (kind.equalsIgnoreCase(WEB) && webDirURL == null) { parseError(root, "<webdir> required when \"WEB\" installer requested"); } else if (kind.equalsIgnoreCase(STANDARD) && webDirURL != null) { // Need a Warning? parseWarn(webDirURL, "Not creating web installer."); info.setWebDirURL(null); } } // Add the uninstaller as a resource if specified XMLElement uninstallInfo = root.getFirstChildNamed("uninstaller"); if (validateYesNoAttribute(uninstallInfo, "write", YES)) { URL url = findIzPackResource("lib/uninstaller.jar", "Uninstaller", root); packager.addResource("IzPack.uninstaller", url); } packager.setInfo(info); notifyCompilerListener("addInfo", CompilerListener.END, data); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/8aebd7714f8652f6ea31909daab468093dce5a9c/Compiler.java/buggy/src/lib/com/izforge/izpack/compiler/Compiler.java
private RenderingEngine() { cmdProcessor = new AsyncProcessor(); //Integer size = (Integer) registry.lookup(LookupNames.RE_STACK_BUF_SZ), // blockSize = (Integer) registry.lookup( // LookupNames.RE_STACK_BLOCK_SZ); //int sz = size.intValue(), block = blockSize.intValue(); //block = (0 < block ? block : 4096); //if (0 < sz) // stackBuffer = new AsyncByteBuffer(sz*1024*1024, block, // cmdProcessor); //else //stackBuffer = new AsyncByteBuffer(1, 1); //Won't be used b/c we first check if we can cache a stack. }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingEngine.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingEngine.java
{
{
public void eventFired(AgentEvent e) { //TODO: put event on the queue and remove the following. if (e instanceof LoadImage) handleLoadImage((LoadImage) e); else if (e instanceof RenderImage) handleRenderImage((RenderImage) e); else if (e instanceof RenderingPropChange) handleRenderingPropChange((RenderingPropChange) e); else if (e instanceof RenderImage3D) handleRenderImage3D((RenderImage3D) e); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingEngine.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingEngine.java
hanldeException("Can't load image metadata. Image id: "+ request.getImageID(), mdse);
handleException("Can't load image metadata. Image id: "+ request.getImageID(), mdse);
private void handleLoadImage(LoadImage request) { try { rndManager = RenderingManager.makeNew(this, request.getImageID(), request.getPixelsID()); RenderingControlProxy proxy = rndManager.createRenderingControlProxy(); ImageLoaded response = new ImageLoaded(request, proxy); EventBus eventBus = registry.getEventBus(); eventBus.post(response); //TODO: this has to be run w/in Swing thread. } catch (MetadataSourceException mdse) { hanldeException("Can't load image metadata. Image id: "+ request.getImageID(), mdse); } catch (DataSourceException dse) { hanldeException("Can't load image metadata. Image id: "+ request.getImageID(), dse); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingEngine.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingEngine.java
hanldeException("Can't load image metadata. Image id: "+
handleException("Can't load image metadata. Image id: "+
private void handleLoadImage(LoadImage request) { try { rndManager = RenderingManager.makeNew(this, request.getImageID(), request.getPixelsID()); RenderingControlProxy proxy = rndManager.createRenderingControlProxy(); ImageLoaded response = new ImageLoaded(request, proxy); EventBus eventBus = registry.getEventBus(); eventBus.post(response); //TODO: this has to be run w/in Swing thread. } catch (MetadataSourceException mdse) { hanldeException("Can't load image metadata. Image id: "+ request.getImageID(), mdse); } catch (DataSourceException dse) { hanldeException("Can't load image metadata. Image id: "+ request.getImageID(), dse); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingEngine.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingEngine.java
private void handleLoadImage(LoadImage request) { try { rndManager = RenderingManager.makeNew(this, request.getImageID(), request.getPixelsID()); RenderingControlProxy proxy = rndManager.createRenderingControlProxy(); ImageLoaded response = new ImageLoaded(request, proxy); EventBus eventBus = registry.getEventBus(); eventBus.post(response); //TODO: this has to be run w/in Swing thread. } catch (MetadataSourceException mdse) { hanldeException("Can't load image metadata. Image id: "+ request.getImageID(), mdse); } catch (DataSourceException dse) { hanldeException("Can't load image metadata. Image id: "+ request.getImageID(), dse); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingEngine.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingEngine.java
hanldeException("Can't load pixels data. Pixels id: "+
handleException("Can't load pixels data. Pixels id: "+
private void handleRenderImage(RenderImage request) { if (rndManager == null) return; //TODO: if null, log? try { PlaneDef pd = request.getPlaneDef(); BufferedImage img = rndManager.renderPlane(pd); ImageRendered response = new ImageRendered(request, img); EventBus eventBus = registry.getEventBus(); eventBus.post(response); //TODO: this has to be run w/in Swing thread. } catch (DataSourceException dse) { hanldeException("Can't load pixels data. Pixels id: "+ request.getPixelsID(), dse); } catch (QuantizationException qee) { //TODO: need to post an event to update the GUI. hanldeException("Can't map the wavelength " +qee.getWavelength(), qee); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingEngine.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingEngine.java
hanldeException("Can't map the wavelength "
handleException("Can't map the wavelength "
private void handleRenderImage(RenderImage request) { if (rndManager == null) return; //TODO: if null, log? try { PlaneDef pd = request.getPlaneDef(); BufferedImage img = rndManager.renderPlane(pd); ImageRendered response = new ImageRendered(request, img); EventBus eventBus = registry.getEventBus(); eventBus.post(response); //TODO: this has to be run w/in Swing thread. } catch (DataSourceException dse) { hanldeException("Can't load pixels data. Pixels id: "+ request.getPixelsID(), dse); } catch (QuantizationException qee) { //TODO: need to post an event to update the GUI. hanldeException("Can't map the wavelength " +qee.getWavelength(), qee); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingEngine.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingEngine.java
hanldeException("Can't load pixels data. Pixels id: "+
handleException("Can't load pixels data. Pixels id: "+
private void handleRenderImage3D(RenderImage3D request) { if (rndManager == null) return; //TODO: if null, log? try { PlaneDef xyPD = request.getXYPlaneDef(), xzPD = request.getXZPlaneDef(), zyPD = request.getZYPlaneDef(); BufferedImage xyPlane = null, xzPlane, zyPlane; if (xyPD != null) xyPlane = rndManager.renderPlane(xyPD); xzPlane = rndManager.renderPlane(xzPD); zyPlane = rndManager.renderPlane(zyPD); Image3DRendered response = new Image3DRendered(request, xyPlane, xzPlane, zyPlane); EventBus eventBus = registry.getEventBus(); eventBus.post(response); //TODO: this has to be run w/in Swing thread. } catch (DataSourceException dse) { hanldeException("Can't load pixels data. Pixels id: "+ request.getPixelsID(), dse); } catch (QuantizationException qee) { //TODO: need to post an event to update the GUI. hanldeException("Can't map the wavelength " +qee.getWavelength(), qee); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingEngine.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingEngine.java
hanldeException("Can't map the wavelength "
handleException("Can't map the wavelength "
private void handleRenderImage3D(RenderImage3D request) { if (rndManager == null) return; //TODO: if null, log? try { PlaneDef xyPD = request.getXYPlaneDef(), xzPD = request.getXZPlaneDef(), zyPD = request.getZYPlaneDef(); BufferedImage xyPlane = null, xzPlane, zyPlane; if (xyPD != null) xyPlane = rndManager.renderPlane(xyPD); xzPlane = rndManager.renderPlane(xzPD); zyPlane = rndManager.renderPlane(zyPD); Image3DRendered response = new Image3DRendered(request, xyPlane, xzPlane, zyPlane); EventBus eventBus = registry.getEventBus(); eventBus.post(response); //TODO: this has to be run w/in Swing thread. } catch (DataSourceException dse) { hanldeException("Can't load pixels data. Pixels id: "+ request.getPixelsID(), dse); } catch (QuantizationException qee) { //TODO: need to post an event to update the GUI. hanldeException("Can't map the wavelength " +qee.getWavelength(), qee); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5b83ecccd54946c2125525e83cea40c4c4dd36/RenderingEngine.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/RenderingEngine.java
data = (OMEData) factory.ctx.getBean("data");
data = (OMEData) factory.getContext().getBean("data");
protected void setUp() throws Exception { data = (OMEData) factory.ctx.getBean("data"); iPojos = factory.getPojosService(); iQuery = factory.getQueryService(); iUpdate = factory.getUpdateService(); try { iQuery.get(Experimenter.class,0l); } catch (Throwable t){ // TODO no, no, really. This is ok. (And temporary) } iQuery.get(Experimenter.class,0l); // if this one fails, skip rest. }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fedea4d767665ead1b1757f0eb894336b27a8d87/PojosServiceTest.java/clean/components/shoola-adapter/test/ome/adapters/pojos/itests/PojosServiceTest.java
String jar = dest + File.separator + "uninstaller.jar";
String jar = dest + File.separator + idata.info.getUninstallerName();
private void putUninstaller() throws Exception { // get the uninstaller base, returning if not found so that // idata.uninstallOutJar remains null InputStream [] in = new InputStream[2]; in[0] = Unpacker.class.getResourceAsStream("/res/IzPack.uninstaller"); if (in[0] == null) return; // The uninstaller extension is facultative; it will be exist only // if a native library was marked for uninstallation. in[1] = Unpacker.class.getResourceAsStream("/res/IzPack.uninstaller-ext"); // Me make the .uninstaller directory String dest = IoHelper.translatePath("$INSTALL_PATH", vs) + File.separator + "Uninstaller"; String jar = dest + File.separator + "uninstaller.jar"; File pathMaker = new File(dest); pathMaker.mkdirs(); // We log the uninstaller deletion information udata.setUninstallerJarFilename(jar); udata.setUninstallerPath(dest); // We open our final jar file FileOutputStream out = new FileOutputStream(jar); ZipOutputStream outJar = new ZipOutputStream(out); idata.uninstallOutJar = outJar; outJar.setLevel(9); udata.addFile(jar); // We copy the uninstallers HashSet doubles = new HashSet(); for( int i = 0; i < in.length; ++i ) { if( in[i] == null ) continue; ZipInputStream inRes = new ZipInputStream(in[i]); ZipEntry zentry = inRes.getNextEntry(); while (zentry != null) { // Puts a new entry, but not twice like META-INF if( ! doubles.contains(zentry.getName())) { doubles.add(zentry.getName()); outJar.putNextEntry(new ZipEntry(zentry.getName())); // Byte to byte copy int unc = inRes.read(); while (unc != -1) { outJar.write(unc); unc = inRes.read(); } // Next one please inRes.closeEntry(); outJar.closeEntry(); } zentry = inRes.getNextEntry(); } inRes.close(); } // We put the langpack InputStream in2 = Unpacker.class.getResourceAsStream("/langpacks/" + idata.localeISO3 + ".xml"); outJar.putNextEntry(new ZipEntry("langpack.xml")); int read = in2.read(); while (read != -1) { outJar.write(read); read = in2.read(); } outJar.closeEntry(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/8aebd7714f8652f6ea31909daab468093dce5a9c/Unpacker.java/buggy/src/lib/com/izforge/izpack/installer/Unpacker.java
return executable.toString();
return executable;
private static String javaCommand() { // This was stolen (and specialized from much more modular code) from the // jakarta ant classes Os & JavaEnvUtils. Also see the following // org.apache.tools.ant.taskdefs.Java // org.apache.tools.ant.taskdefs.Execute // org.apache.tools.ant.taskdefs.condition.Os // org.apache.tools.ant.util.CommandlineJava // org.apache.tools.ant.util.JavaEnvUtils // org.apache.tools.ant.util.FileUtils // TODO: I didn't copy nearly all of their conditions String executable = addExtension("java"); String dir = new File(JAVA_HOME + "/bin").getAbsolutePath(); File jExecutable = new File(dir, executable); // Unfortunately on Windows java.home doesn't always refer // to the correct location, so we need to fall back to // assuming java is somewhere on the PATH. if (!jExecutable.exists()) return executable.toString(); return jExecutable.getAbsolutePath(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/08ecc635ba8049aeb419722893f373a4a7f99a77/SelfModifier.java/buggy/src/lib/com/izforge/izpack/uninstaller/SelfModifier.java
flush();
public void testSaveSimpleObject() throws Exception { Pixels p = ObjectFactory.createPixelGraph(null); p = (Pixels) iUpdate.saveAndReturnObject(p); flush(); List logs = securitySystem.getCurrentEvent().collectLogs(null); assertTrue(logs.size() > 0); Pixels check = (Pixels) iQuery.findByQuery( "select p from Pixels p " + " left outer join fetch p.acquisitionContext " + " left outer join fetch p.channels " + " where p.id = :id",new Parameters().addId(p.getId())); assertTrue("channel ids differ",equalCollections(p.getChannels(),check.getChannels())); assertTrue("acq ctx differ", p.getAcquisitionContext().getId().equals( check.getAcquisitionContext().getId())); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/UpdateTest.java/buggy/components/server/test/ome/server/itests/update/UpdateTest.java