rem
stringlengths
1
53.3k
add
stringlengths
0
80.5k
context
stringlengths
6
326k
meta
stringlengths
141
403
input_ids
list
attention_mask
list
labels
list
private static String findHandlerParamName(InstructionHandle startOfHandler) { if (startOfHandler.getInstruction() instanceof StoreInstruction && startOfHandler.getNext() != null) { int slot = ((StoreInstruction)startOfHandler.getInstruction()).getIndex(); //System.out.println("got store: " + startOfHandler.getInstruction() + ", " + index); InstructionTargeter[] targeters = startOfHandler.getNext().getTargeters(); for (int i=targeters.length-1; i >= 0; i--) { if (targeters[i] instanceof LocalVariableTag) { LocalVariableTag t = (LocalVariableTag)targeters[i]; if (t.getSlot() == slot) { return t.getName(); } //System.out.println("tag: " + targeters[i]); } } } return "<missing>"; }
7955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7955/09c733e92c2c46d4d7878949da645923a87d6a25/BcelShadow.java/buggy/org.aspectj/modules/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 11365, 270, 395, 2126, 780, 4720, 1503, 24635, 12, 11983, 1144, 80, 27893, 951, 1503, 15329, 9506, 202, 430, 12, 1937, 951, 1503, 18, 588, 11983, 1435, 1336, 792, 2257, 11983, 10, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 11365, 270, 395, 2126, 780, 4720, 1503, 24635, 12, 11983, 1144, 80, 27893, 951, 1503, 15329, 9506, 202, 430, 12, 1937, 951, 1503, 18, 588, 11983, 1435, 1336, 792, 2257, 11983, 10, 10...
if(cp1.equals("freenet-cvs-snapshot.jar")) {
if(cp1 == null) { Logger.error(this, "wrapper.java.classpath.1 = null - maybe wrapper.conf is broken?"); System.err.println("wrapper.java.classpath.1 = null - maybe wrapper.conf is broken?"); } else if(cp1.equals("freenet-cvs-snapshot.jar")) {
private synchronized void innerUpdate(){ Logger.minor(this, "Update() called"); if((result == null) || hasBeenBlown) { Logger.minor(this, "Returning: result="+result+", isAutoUpdateAllowed="+isAutoUpdateAllowed+", hasBeenBlown="+hasBeenBlown); return; } this.revocationDNFCounter = 0; this.finalCheck = true; System.err.println("Searching for revocation key"); this.queueFetchRevocation(100); while(revocationDNFCounter < NodeUpdater.REVOCATION_DNF_MIN) { System.err.println("Revocation counter: "+revocationDNFCounter); if(this.hasBeenBlown) { Logger.error(this, "The revocation key has been found on the network : blocking auto-update"); return; } try { wait(100*1000); } catch (InterruptedException e) { // Ignore } } System.err.println("Update in progress"); Logger.normal(this, "Update in progress"); try{ ArrayBucket bucket = (ArrayBucket) result.asBucket(); byte[] data = bucket.toByteArray(); File fRunning = new File("freenet-cvs-snapshot.jar"); File fNew = new File("freenet-cvs-snapshot.jar.new"); boolean nastyRestart = false; if((File.separatorChar == '\\') || (System.getProperty("os.name").toLowerCase().startsWith("win"))){ nastyRestart = true; Properties p = WrapperManager.getProperties(); String cp1 = p.getProperty("wrapper.java.classpath.1"); if(cp1.equals("freenet-cvs-snapshot.jar")) { // Cool! } else if(cp1.equals("freenet-cvs-snapshot.jar.new")) { // Swapped; we are running .new File tmp = fRunning; fRunning = fNew; fNew = tmp; } else { cp1 = p.getProperty("wrapper.java.classpath.2"); if(cp1.equals("freenet-cvs-snapshot.jar")) { // Cool! } else if(cp1.equals("freenet-cvs-snapshot.jar.new")) { // Swapped; we are running .new File tmp = fRunning; fRunning = fNew; fNew = tmp; } else { Logger.error(this, "Cannot restart on Windows due to non-standard config file!"); System.err.println("Cannot restart on Windows due to non-standard config file!"); return; } } } fNew.delete(); FileOutputStream fos = new FileOutputStream(fNew); fos.write(data); fos.flush(); fos.close(); System.out.println("################## File written! "+cg.getURI().getSuggestedEdition()+ " " +fNew.getAbsolutePath()); if(!nastyRestart) { // Easy way. if(!fNew.renameTo(fRunning)) { fRunning.delete(); if(!fNew.renameTo(fRunning)) { System.err.println("ERROR renaming the file!"); return; } } } else { // Hard way. if(!WrapperManager.isControlledByNativeWrapper()) { Logger.error(this, "Cannot update because not running under wrapper"); System.err.println("Cannot update because not running under wrapper"); return; } try { File oldConfig = new File("wrapper.conf"); File newConfig = new File("wrapper.conf.new"); FileInputStream fis = new FileInputStream(oldConfig); BufferedInputStream bis = new BufferedInputStream(fis); InputStreamReader isr = new InputStreamReader(bis); BufferedReader br = new BufferedReader(isr); fos = new FileOutputStream(newConfig); OutputStreamWriter osw = new OutputStreamWriter(fos); BufferedWriter bw = new BufferedWriter(osw); String line; boolean succeeded = false; boolean stillSucceeded = false; while((line = br.readLine()) != null) { if(line.equals("wrapper.java.classpath.1="+fRunning.getName())) { bw.write("wrapper.java.classpath.1="+fNew.getName()+"\r\n"); succeeded = true; } else if(line.equals("wrapper.java.classpath.2="+fRunning.getName())) { bw.write("wrapper.java.classpath.2="+fNew.getName()+"\r\n"); succeeded = true; } else { if(line.equals("wrapper.restart.reload_configuration=TRUE")) stillSucceeded = true; bw.write(line+"\r\n"); } } bw.close(); br.close(); if(!succeeded) { System.err.println("Not able to update because of non-standard config"); Logger.error(this, "Not able to update because of non-standard config"); return; } if(!stillSucceeded) { System.err.println("Not able to update because of non-standard or old config, add a line saying \"wrapper.restart.reload_configuration=TRUE\""); Logger.error(this, "Not able to update because of non-standard or old config, add a line saying \"wrapper.restart.reload_configuration=TRUE\""); return; } if(!newConfig.renameTo(oldConfig)) { oldConfig.delete(); if(!newConfig.renameTo(oldConfig)) { System.err.println("Failed to rename over old config: update failed."); Logger.error(this, "Failed to rename over old config: update failed."); return; } } // New config installed. } catch (IOException e) { Logger.error(this, "Not able to update because of I/O error: "+e, e); System.err.println("Not able to update because of I/O error: "+e); } } if(node.getNodeStarter()!=null) { System.err.println("Restarting because of update"); node.getNodeStarter().restart(); } else{ System.out.println("New version has been downloaded: please restart your node!"); node.exit(); } System.err.println("WTF? Restart returned!?"); }catch(Exception e){ Logger.error(this, "Error while updating the node : "+e); System.out.println("Exception : "+e); e.printStackTrace(); } }
51738 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51738/17eda3dc2d286f95d7c885a9ded50aff97effd4d/NodeUpdater.java/clean/src/freenet/node/updater/NodeUpdater.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 3852, 918, 3443, 1891, 1435, 95, 202, 202, 3328, 18, 17364, 12, 2211, 16, 315, 1891, 1435, 2566, 8863, 202, 202, 430, 12443, 2088, 422, 446, 13, 747, 711, 25931, 38, 821, 82,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 3852, 918, 3443, 1891, 1435, 95, 202, 202, 3328, 18, 17364, 12, 2211, 16, 315, 1891, 1435, 2566, 8863, 202, 202, 430, 12443, 2088, 422, 446, 13, 747, 711, 25931, 38, 821, 82,...
ListView.this.removeAll();
ListView.this.modelChanged();
public final Link moveUpLink(final String id, final ListItem item) { return new Link(id) { /** * @see wicket.Component#onBeginRequest() */ protected void onBeginRequest() { setAutoEnable(false); if (getList().indexOf(item.getModelObject()) == 0) { setEnabled(false); } } /** * @see wicket.markup.html.link.Link#onClick() */ public void onClick() { final int index = getList().indexOf(item.getModelObject()); if (index != -1) { // Swap items and invalidate listView Collections.swap(getList(), index, index - 1); // Make sure you re-render the list properly ListView.this.removeAll(); } } }; }
46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/d81e777f0c9302d0261fd8dea419064cf94550a3/ListView.java/clean/wicket/src/java/wicket/markup/html/list/ListView.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 4048, 3635, 1211, 2098, 12, 6385, 514, 612, 16, 727, 987, 1180, 761, 13, 202, 95, 202, 202, 2463, 394, 4048, 12, 350, 13, 202, 202, 95, 1082, 202, 26873, 9506, 380, 632...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 4048, 3635, 1211, 2098, 12, 6385, 514, 612, 16, 727, 987, 1180, 761, 13, 202, 95, 202, 202, 2463, 394, 4048, 12, 350, 13, 202, 202, 95, 1082, 202, 26873, 9506, 380, 632...
private List getClassesAssociatedWithShift(InfoShift thisInfoShift, List currentEnrolment, ISuportePersistente sp) {
private List getClassesAssociatedWithShift( InfoShift thisInfoShift, List currentEnrolment, ISuportePersistente sp) {
private List getClassesAssociatedWithShift(InfoShift thisInfoShift, List currentEnrolment, ISuportePersistente sp) { ITurmaTurnoPersistente shiftClassDAO = sp.getITurmaTurnoPersistente(); Iterator iter = currentEnrolment.iterator(); ITurno shift = null; while (iter.hasNext()) { shift = (ITurno) iter.next(); if (shift.getIdInternal().equals(thisInfoShift.getIdInternal())) { break; } continue; } if (shift != null) { List classes; try { classes = shiftClassDAO.readClassesWithShift(shift); } catch (ExcepcaoPersistencia e) { e.printStackTrace(); return null; } //Return a list of InfoClass objects ShiftClassTransformer shiftClassTransformer = new ShiftClassTransformer(); return (List) CollectionUtils.collect(classes, shiftClassTransformer); } return null; }
2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/f368973d1d54943fb2876dc13ab860fc6735ae4a/ReadStudentShiftEnrolment.java/clean/src/ServidorAplicacao/Servico/student/ReadStudentShiftEnrolment.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 987, 30561, 19233, 1190, 10544, 12, 966, 10544, 333, 966, 10544, 16, 987, 783, 664, 922, 475, 16, 467, 3088, 499, 73, 11906, 73, 1694, 13, 288, 202, 202, 1285, 295, 2540, 158...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 987, 30561, 19233, 1190, 10544, 12, 966, 10544, 333, 966, 10544, 16, 987, 783, 664, 922, 475, 16, 467, 3088, 499, 73, 11906, 73, 1694, 13, 288, 202, 202, 1285, 295, 2540, 158...
if(!window.getShell().isVisible())
if (!window.getShell().isVisible())
void openFloatingWindow() { //Do we already have one? if(floatingWindow != null) return; //Don't bother if there is nothing showing yet if(!window.getShell().isVisible()) return; floatingWindow = new ProgressFloatingWindow(window, imageCanvas); WorkbenchJob floatingJob = new WorkbenchJob(ProgressMessages.getString("AnimationItem.openFloatingWindowJob")) { //$NON-NLS-1$ /* * (non-Javadoc) * * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor) */ public IStatus runInUIThread(IProgressMonitor monitor) { synchronized (windowLock) { if (floatingWindow == null) return Status.CANCEL_STATUS; else { //Do not bother if the control is disposed if(getControl().isDisposed()){ floatingWindow = null; return Status.CANCEL_STATUS; } else{ floatingWindow.open(); return Status.OK_STATUS; } } } } }; floatingJob.setSystem(true); floatingJob.schedule(500); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/a23a2f7d8af51ae4aaa0ae21daaa81f092725969/AnimationItem.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 6459, 1696, 28344, 3829, 1435, 288, 202, 202, 759, 3244, 732, 1818, 1240, 1245, 35, 202, 202, 430, 12, 5659, 310, 3829, 480, 446, 13, 1082, 202, 2463, 31, 9506, 202, 759, 22293, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 6459, 1696, 28344, 3829, 1435, 288, 202, 202, 759, 3244, 732, 1818, 1240, 1245, 35, 202, 202, 430, 12, 5659, 310, 3829, 480, 446, 13, 1082, 202, 2463, 31, 9506, 202, 759, 22293, 14...
try
try
public boolean isBookmarkable() { try { if (getClass().getConstructor(new Class[] { PageParameters.class } ) != null) { return true; } } catch (Exception ignore) { try { if (getClass().getConstructor(new Class[] { }) != null) { return true; } } catch (Exception ignore2) { } } return false; }
46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/7586285941bbc1589400e1b0cdff5122172ce04f/Page.java/clean/wicket/src/java/wicket/Page.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 353, 22966, 429, 1435, 225, 202, 95, 202, 202, 698, 3196, 202, 95, 1082, 202, 430, 261, 588, 797, 7675, 588, 6293, 12, 2704, 1659, 8526, 288, 3460, 2402, 18, 1106, 289, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 353, 22966, 429, 1435, 225, 202, 95, 202, 202, 698, 3196, 202, 95, 1082, 202, 430, 261, 588, 797, 7675, 588, 6293, 12, 2704, 1659, 8526, 288, 3460, 2402, 18, 1106, 289, ...
CacheManager.getCache("userame2roster").put(username, roster);
CacheManager.getCache("username2roster").put(username, roster);
public CachedRoster getRoster() throws UnauthorizedException { CachedRoster roster = null; if (CacheManager.getCache("username2roster").get(username) != null) { // Check for a cached roster: roster = (CachedRoster)CacheManager.getCache("username2roster").get(username); } else { // Not in cache so load a new one: roster = new CachedRosterImpl(username); CacheManager.getCache("userame2roster").put(username, roster); } return roster; }
6161 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6161/ef1c16186f572d235c6b63555553adee89b46c3b/UserImpl.java/clean/src/java/org/jivesoftware/messenger/user/spi/UserImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 15771, 54, 29811, 4170, 29811, 1435, 1216, 24830, 288, 3639, 15771, 54, 29811, 721, 8190, 273, 446, 31, 3639, 309, 261, 27706, 18, 588, 1649, 2932, 5053, 22, 303, 8190, 20387, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 15771, 54, 29811, 4170, 29811, 1435, 1216, 24830, 288, 3639, 15771, 54, 29811, 721, 8190, 273, 446, 31, 3639, 309, 261, 27706, 18, 588, 1649, 2932, 5053, 22, 303, 8190, 20387, 588, ...
Document dc=null; javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setIgnoringElementContentWhitespace(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); if(inStream!=null) dc = db.parse(inStream); else if(inString!=null) dc = db.parse(new org.xml.sax.InputSource(new StringReader(inString))); else { throw new Exception("No input given"); } NodeList nl = dc.getElementsByTagName( "NETWORK" ); if(nl.getLength()==0) { throw new BIFFormatException( "NETWORK tag not found" ); } NodeList templist = ((Element)nl.item(0)).getElementsByTagName( "NAME" ); graphName = templist.item(0).getFirstChild().getNodeValue(); nl = dc.getElementsByTagName("VARIABLE"); for(int i=0; i<nl.getLength(); i++) { templist = ((Element)nl.item(i)).getElementsByTagName("NAME"); if(templist.getLength()>1) throw new BIFFormatException("More than one name tags found for variable no. "+(i+1)); String nodename = ((org.w3c.dom.Node)templist.item(0)).getFirstChild().getNodeValue(); GraphNode n = new GraphNode( nodename, nodename, GraphNode.NORMAL ); m_nodes.addElement(n); templist = ((Element)nl.item(i)).getElementsByTagName("PROPERTY"); for(int j=0; j<templist.getLength(); j++) { if( ((org.w3c.dom.Node)templist.item(j)).getFirstChild().getNodeValue().startsWith("position") ) { String xy = templist.item(j).getFirstChild().getNodeValue(); n.x = Integer.parseInt( xy.substring(xy.indexOf('(')+1, xy.indexOf(',')).trim() ); n.y = Integer.parseInt( xy.substring(xy.indexOf(',')+1, xy.indexOf(')')).trim() ); break; } } templist = ((Element)nl.item(i)).getElementsByTagName("OUTCOME"); n.outcomes = new String[templist.getLength()]; for(int j=0; j<templist.getLength(); j++) { n.outcomes[j] = templist.item(j).getFirstChild().getNodeValue(); } } nl = dc.getElementsByTagName("DEFINITION"); for(int i=0; i<nl.getLength(); i++) { templist = ((Element)nl.item(i)).getElementsByTagName("FOR"); String nid = templist.item(0).getFirstChild().getNodeValue(); GraphNode n = (GraphNode)m_nodes.elementAt(0); for(int j=1; j<m_nodes.size() && !n.ID.equals(nid); j++) n = (GraphNode)m_nodes.elementAt(j); templist = ((Element)nl.item(i)).getElementsByTagName("GIVEN"); int parntOutcomes = 1; for(int j=0; j<templist.getLength(); j++) { nid = templist.item(j).getFirstChild().getNodeValue(); GraphNode n2 = (GraphNode)m_nodes.elementAt(0); for(int k=1; k<m_nodes.size() && !n2.ID.equals(nid); k++) n2 = (GraphNode)m_nodes.elementAt(k); m_edges.addElement( new GraphEdge(m_nodes.indexOf(n2), m_nodes.indexOf(n), 1) ); parntOutcomes *= n2.outcomes.length; } templist = ((Element)nl.item(i)).getElementsByTagName("TABLE"); if(templist.getLength()>1) throw new BIFFormatException("More than one Probability Table for "+n.ID); String probs = templist.item(0).getFirstChild().getNodeValue(); StringTokenizer tk = new StringTokenizer(probs, " \n\t"); if(parntOutcomes*n.outcomes.length > tk.countTokens()) throw new BIFFormatException("Probability Table for "+n.ID+" contains more values than it should"); else if(parntOutcomes*n.outcomes.length < tk.countTokens()) throw new BIFFormatException("Probability Table for "+n.ID+" contains less values than it should"); else { n.probs = new double[parntOutcomes][n.outcomes.length]; for(int r=0; r<parntOutcomes; r++) for(int c=0; c<n.outcomes.length; c++) try { n.probs[r][c] = Double.parseDouble( tk.nextToken() ); } catch(NumberFormatException ne) { throw ne; } } } int tmpEdges[], noOfEdgesOfNode[]=new int[m_nodes.size()], noOfPrntsOfNode[]=new int[m_nodes.size()]; for(int i=0; i<m_edges.size(); i++) { GraphEdge e = (GraphEdge)m_edges.elementAt(i); noOfEdgesOfNode[e.src]++; noOfPrntsOfNode[e.dest]++; } for(int i=0; i<m_edges.size(); i++) { GraphEdge e = (GraphEdge)m_edges.elementAt(i); GraphNode n = (GraphNode)m_nodes.elementAt(e.src); GraphNode n2 = (GraphNode)m_nodes.elementAt(e.dest); if(n.edges==null) { n.edges = new int[noOfEdgesOfNode[e.src]][2]; for(int k=0; k<n.edges.length; k++) n.edges[k][0]=-1; } if(n2.prnts==null) { n2.prnts = new int[noOfPrntsOfNode[e.dest]]; for(int k=0; k<n2.prnts.length; k++) n2.prnts[k]=-1; } int k=0; while(n.edges[k][0]!=-1) k++; n.edges[k][0] = e.dest; n.edges[k][1] = e.type; k=0; while(n2.prnts[k]!=-1) k++; n2.prnts[k] = e.src; } return graphName; }
Document dc=null; javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setIgnoringElementContentWhitespace(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); if(inStream!=null) dc = db.parse(inStream); else if(inString!=null) dc = db.parse(new org.xml.sax.InputSource(new StringReader(inString))); else { throw new Exception("No input given"); } NodeList nl = dc.getElementsByTagName( "NETWORK" ); if(nl.getLength()==0) { throw new BIFFormatException( "NETWORK tag not found" ); } NodeList templist = ((Element)nl.item(0)).getElementsByTagName( "NAME" ); graphName = templist.item(0).getFirstChild().getNodeValue(); nl = dc.getElementsByTagName("VARIABLE"); for(int i=0; i<nl.getLength(); i++) { templist = ((Element)nl.item(i)).getElementsByTagName("NAME"); if(templist.getLength()>1) throw new BIFFormatException("More than one name tags found for "+ "variable no. "+(i+1)); String nodename = ((org.w3c.dom.Node)templist.item(0)).getFirstChild().getNodeValue(); GraphNode n = new GraphNode( nodename, nodename, GraphNode.NORMAL ); m_nodes.addElement(n); templist = ((Element)nl.item(i)).getElementsByTagName("PROPERTY"); for(int j=0; j<templist.getLength(); j++) { if( ((org.w3c.dom.Node)templist.item(j)).getFirstChild() .getNodeValue().startsWith("position") ) { String xy = templist.item(j).getFirstChild().getNodeValue(); n.x = Integer.parseInt( xy.substring(xy.indexOf('(')+ 1, xy.indexOf(',')).trim() ); n.y = Integer.parseInt( xy.substring(xy.indexOf(',')+ 1, xy.indexOf(')')).trim() ); break; } } templist = ((Element)nl.item(i)).getElementsByTagName("OUTCOME"); n.outcomes = new String[templist.getLength()]; for(int j=0; j<templist.getLength(); j++) { n.outcomes[j] = templist.item(j).getFirstChild().getNodeValue(); } } nl = dc.getElementsByTagName("DEFINITION"); for(int i=0; i<nl.getLength(); i++) { templist = ((Element)nl.item(i)).getElementsByTagName("FOR"); String nid = templist.item(0).getFirstChild().getNodeValue(); GraphNode n = (GraphNode)m_nodes.elementAt(0); for(int j=1; j<m_nodes.size() && !n.ID.equals(nid); j++) n = (GraphNode)m_nodes.elementAt(j); templist = ((Element)nl.item(i)).getElementsByTagName("GIVEN"); int parntOutcomes = 1; for(int j=0; j<templist.getLength(); j++) { nid = templist.item(j).getFirstChild().getNodeValue(); GraphNode n2 = (GraphNode)m_nodes.elementAt(0); for(int k=1; k<m_nodes.size() && !n2.ID.equals(nid); k++) n2 = (GraphNode)m_nodes.elementAt(k); m_edges.addElement( new GraphEdge(m_nodes.indexOf(n2), m_nodes.indexOf(n), 1) ); parntOutcomes *= n2.outcomes.length; } templist = ((Element)nl.item(i)).getElementsByTagName("TABLE"); if(templist.getLength()>1) throw new BIFFormatException("More than one Probability Table for "+ n.ID); String probs = templist.item(0).getFirstChild().getNodeValue(); StringTokenizer tk = new StringTokenizer(probs, " \n\t"); if(parntOutcomes*n.outcomes.length > tk.countTokens()) throw new BIFFormatException("Probability Table for "+n.ID+ " contains more values than it should"); else if(parntOutcomes*n.outcomes.length < tk.countTokens()) throw new BIFFormatException("Probability Table for "+n.ID+ " contains less values than it should"); else { n.probs = new double[parntOutcomes][n.outcomes.length]; for(int r=0; r<parntOutcomes; r++) for(int c=0; c<n.outcomes.length; c++) try { n.probs[r][c] = Double.parseDouble( tk.nextToken() ); } catch(NumberFormatException ne) { throw ne; } } } int tmpEdges[], noOfEdgesOfNode[]=new int[m_nodes.size()]; int noOfPrntsOfNode[]=new int[m_nodes.size()]; for(int i=0; i<m_edges.size(); i++) { GraphEdge e = (GraphEdge)m_edges.elementAt(i); noOfEdgesOfNode[e.src]++; noOfPrntsOfNode[e.dest]++; } for(int i=0; i<m_edges.size(); i++) { GraphEdge e = (GraphEdge)m_edges.elementAt(i); GraphNode n = (GraphNode)m_nodes.elementAt(e.src); GraphNode n2 = (GraphNode)m_nodes.elementAt(e.dest); if(n.edges==null) { n.edges = new int[noOfEdgesOfNode[e.src]][2]; for(int k=0; k<n.edges.length; k++) n.edges[k][0]=-1; } if(n2.prnts==null) { n2.prnts = new int[noOfPrntsOfNode[e.dest]]; for(int k=0; k<n2.prnts.length; k++) n2.prnts[k]=-1; } int k=0; while(n.edges[k][0]!=-1) k++; n.edges[k][0] = e.dest; n.edges[k][1] = e.type; k=0; while(n2.prnts[k]!=-1) k++; n2.prnts[k] = e.src; } return graphName; }
public String parse() throws Exception { Document dc=null; javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setIgnoringElementContentWhitespace(true); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); if(inStream!=null) dc = db.parse(inStream); else if(inString!=null) dc = db.parse(new org.xml.sax.InputSource(new StringReader(inString))); else { throw new Exception("No input given"); } NodeList nl = dc.getElementsByTagName( "NETWORK" ); if(nl.getLength()==0) { throw new BIFFormatException( "NETWORK tag not found" ); } NodeList templist = ((Element)nl.item(0)).getElementsByTagName( "NAME" ); //take only the first network node graphName = templist.item(0).getFirstChild().getNodeValue(); //System.out.println("The name of the network is "+templist.item(0).getFirstChild().getNodeValue()); //Get all the variables nl = dc.getElementsByTagName("VARIABLE"); for(int i=0; i<nl.getLength(); i++) { templist = ((Element)nl.item(i)).getElementsByTagName("NAME"); if(templist.getLength()>1) throw new BIFFormatException("More than one name tags found for variable no. "+(i+1)); String nodename = ((org.w3c.dom.Node)templist.item(0)).getFirstChild().getNodeValue(); GraphNode n = new GraphNode( nodename, nodename, GraphNode.NORMAL ); m_nodes.addElement(n); //getting nodes position templist = ((Element)nl.item(i)).getElementsByTagName("PROPERTY"); for(int j=0; j<templist.getLength(); j++) { if( ((org.w3c.dom.Node)templist.item(j)).getFirstChild().getNodeValue().startsWith("position") ) { String xy = templist.item(j).getFirstChild().getNodeValue(); //System.out.println("x: "+xy.substring(xy.indexOf('(')+1, xy.indexOf(','))+" y: "+ // xy.substring(xy.indexOf(',')+1, xy.indexOf(')')) ); n.x = Integer.parseInt( xy.substring(xy.indexOf('(')+1, xy.indexOf(',')).trim() ); n.y = Integer.parseInt( xy.substring(xy.indexOf(',')+1, xy.indexOf(')')).trim() ); break; } } //getting all the outcomes of the node templist = ((Element)nl.item(i)).getElementsByTagName("OUTCOME"); n.outcomes = new String[templist.getLength()]; for(int j=0; j<templist.getLength(); j++) { n.outcomes[j] = templist.item(j).getFirstChild().getNodeValue(); //System.out.println("Outcome["+j+"]: "+n.outcomes[j]); } } //end for (for variables) //Get all the edges and probability tables by getting all the definitions nl = dc.getElementsByTagName("DEFINITION"); for(int i=0; i<nl.getLength(); i++) { templist = ((Element)nl.item(i)).getElementsByTagName("FOR"); //the Label of the node the edges are coming into String nid = templist.item(0).getFirstChild().getNodeValue(); //getting the GraphNode object with the above label GraphNode n = (GraphNode)m_nodes.elementAt(0); for(int j=1; j<m_nodes.size() && !n.ID.equals(nid); j++) n = (GraphNode)m_nodes.elementAt(j); templist = ((Element)nl.item(i)).getElementsByTagName("GIVEN"); int parntOutcomes = 1; //for creating the probability table later on for(int j=0; j<templist.getLength(); j++) { //creating all the edges coming into the node nid = templist.item(j).getFirstChild().getNodeValue(); GraphNode n2 = (GraphNode)m_nodes.elementAt(0); for(int k=1; k<m_nodes.size() && !n2.ID.equals(nid); k++) n2 = (GraphNode)m_nodes.elementAt(k); m_edges.addElement( new GraphEdge(m_nodes.indexOf(n2), m_nodes.indexOf(n), 1) ); parntOutcomes *= n2.outcomes.length; } //creating the probability table for the node templist = ((Element)nl.item(i)).getElementsByTagName("TABLE"); if(templist.getLength()>1) throw new BIFFormatException("More than one Probability Table for "+n.ID); String probs = templist.item(0).getFirstChild().getNodeValue(); StringTokenizer tk = new StringTokenizer(probs, " \n\t"); if(parntOutcomes*n.outcomes.length > tk.countTokens()) throw new BIFFormatException("Probability Table for "+n.ID+" contains more values than it should"); else if(parntOutcomes*n.outcomes.length < tk.countTokens()) throw new BIFFormatException("Probability Table for "+n.ID+" contains less values than it should"); else { n.probs = new double[parntOutcomes][n.outcomes.length]; for(int r=0; r<parntOutcomes; r++) //row for(int c=0; c<n.outcomes.length; c++) //column try { n.probs[r][c] = Double.parseDouble( tk.nextToken() ); } catch(NumberFormatException ne) { throw ne; } } // end of creating probability table } //endfor (for edges) //int tmpMatrix[][] = new int[m_nodes.size()][m_nodes.size()]; //for(int i=0; i<m_edges.size(); i++) // tmpMatrix[((GraphEdge)m_edges.elementAt(i)).src] // [((GraphEdge)m_edges.elementAt(i)).dest] = ((GraphEdge)m_edges.elementAt(i)).type; //for(int i=0; i<m_nodes.size(); i++) { // GraphNode n = (GraphNode)m_nodes.elementAt(i); // n.edges = tmpMatrix[i]; //} //Adding parents, and those edges to a node which are coming out from it int tmpEdges[], noOfEdgesOfNode[]=new int[m_nodes.size()], noOfPrntsOfNode[]=new int[m_nodes.size()]; for(int i=0; i<m_edges.size(); i++) { GraphEdge e = (GraphEdge)m_edges.elementAt(i); noOfEdgesOfNode[e.src]++; noOfPrntsOfNode[e.dest]++; } for(int i=0; i<m_edges.size(); i++) { GraphEdge e = (GraphEdge)m_edges.elementAt(i); GraphNode n = (GraphNode)m_nodes.elementAt(e.src); GraphNode n2 = (GraphNode)m_nodes.elementAt(e.dest); if(n.edges==null) { n.edges = new int[noOfEdgesOfNode[e.src]][2]; for(int k=0; k<n.edges.length; k++) n.edges[k][0]=-1; } if(n2.prnts==null) { n2.prnts = new int[noOfPrntsOfNode[e.dest]]; for(int k=0; k<n2.prnts.length; k++) n2.prnts[k]=-1; } int k=0; while(n.edges[k][0]!=-1) k++; n.edges[k][0] = e.dest; n.edges[k][1] = e.type; k=0; while(n2.prnts[k]!=-1) k++; n2.prnts[k] = e.src; } //processGraph(); //setAppropriateSize(); return graphName; } //end readBIF
48918 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48918/1f04dd1626c73f5731a052f6b5b839612d380140/BIFParser.java/buggy/weka/gui/graphvisualizer/BIFParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 1109, 1435, 1216, 1185, 288, 202, 2519, 6744, 33, 2011, 31, 202, 28384, 18, 2902, 18, 11104, 18, 2519, 20692, 1319, 74, 273, 6863, 18, 2902, 18, 11104, 18, 2519, 20692, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 1109, 1435, 1216, 1185, 288, 202, 2519, 6744, 33, 2011, 31, 202, 28384, 18, 2902, 18, 11104, 18, 2519, 20692, 1319, 74, 273, 6863, 18, 2902, 18, 11104, 18, 2519, 20692, 18, 2...
String password = (String) attrs.get(A_zimbraDataSourcePassword); if (password != null) { attrs.put(A_zimbraDataSourcePassword, DataSource.encryptData(ds.getId(), password)); }
public void modifyDataSource(Account account, String dataSourceId, Map<String, Object> attrs) throws ServiceException { removeAttrIgnoreCase("objectclass", attrs); LdapEntry ldapEntry = (LdapEntry) (account instanceof LdapEntry ? account : getAccountById(account.getId())); if (ldapEntry == null) throw AccountServiceException.NO_SUCH_ACCOUNT(account.getName()); LdapDataSource ds = (LdapDataSource) getDataSourceById(ldapEntry, dataSourceId, null); if (ds == null) throw AccountServiceException.NO_SUCH_DATA_SOURCE(dataSourceId); attrs.remove(A_zimbraDataSourceId); String name = (String) attrs.get(A_zimbraDataSourceName); boolean newName = (name != null && !name.equals(ds.getName())); if (newName) attrs.remove(A_zimbraDataSourceName); modifyAttrs(ds, attrs, true); if (newName) { DirContext ctxt = null; try { ctxt = LdapUtil.getDirContext(true); String newDn = getDataSourceDn(ldapEntry, name); ctxt.rename(ds.getDN(), newDn); } catch (NamingException e) { throw ServiceException.FAILURE("unable to rename datasource: "+newName, e); } finally { LdapUtil.closeContext(ctxt); } } }
6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/01cfcca8b3ad754de0eeb861719b528ba81b5e95/LdapProvisioning.java/buggy/ZimbraServer/src/java/com/zimbra/cs/account/ldap/LdapProvisioning.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 514, 2201, 273, 261, 780, 13, 3422, 18, 588, 12, 37, 67, 94, 381, 15397, 8597, 3913, 1769, 309, 261, 3664, 480, 446, 13, 288, 3422, 18, 458, 12, 37, 67, 94, 381, 15397, 8597, 3913, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 514, 2201, 273, 261, 780, 13, 3422, 18, 588, 12, 37, 67, 94, 381, 15397, 8597, 3913, 1769, 309, 261, 3664, 480, 446, 13, 288, 3422, 18, 458, 12, 37, 67, 94, 381, 15397, 8597, 3913, ...
BugzillaTask task = (BugzillaTask) connector.createTaskFromExistingKey(repository, "57", null);
BugzillaTask task = (BugzillaTask) connector.createTaskFromExistingKey(repository, "57");
public void testProperEncodingUponPost() throws MalformedURLException, IOException, BugzillaException, PossibleBugzillaFailureException, GeneralSecurityException, CoreException { init222(); repository.setCharacterEncoding("UTF-8"); BugzillaTask task = (BugzillaTask) connector.createTaskFromExistingKey(repository, "57", null); assertNotNull(task); assertTrue(task.getSummary().equals("\u05D0")); String priority = null; if (task.getPriority().equals("P1")) { priority = "P2"; task.getTaskData().setAttributeValue(BugzillaReportElement.PRIORITY.getKeyString(), priority); } else { priority = "P1"; task.getTaskData().setAttributeValue(BugzillaReportElement.PRIORITY.getKeyString(), priority); } BugzillaReportSubmitForm bugzillaReportSubmitForm; bugzillaReportSubmitForm = makeExistingBugPost(task.getTaskData()); bugzillaReportSubmitForm.submitReportToRepository(connector.getClientManager().getClient(repository)); taskList.deleteTask(task); task = (BugzillaTask) connector.createTaskFromExistingKey(repository, "57", null); assertNotNull(task); assertTrue(task.getSummary().equals("\u05D0")); }
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/764175789411dbaaee6f125d60c412b846d9a649/EncodingTest.java/clean/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 626, 457, 4705, 57, 500, 3349, 1435, 1216, 20710, 16, 1860, 16, 16907, 15990, 503, 16, 25433, 19865, 15990, 14389, 16, 9544, 24918, 16, 30015, 288, 202, 202, 2738, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 626, 457, 4705, 57, 500, 3349, 1435, 1216, 20710, 16, 1860, 16, 16907, 15990, 503, 16, 25433, 19865, 15990, 14389, 16, 9544, 24918, 16, 30015, 288, 202, 202, 2738, 28...
ERXValidation.setPushChangesDefault(ERXUtilities.booleanValueWithDefault(System.getProperties().getProperty("er.extensions.ERXValidationShouldPushChangesToObject"), ERXValidation.DO_NOT_PUSH_INCORRECT_VALUE_ON_EO));
ERXValidation.setPushChangesDefault(ERXValueUtilities.booleanValueWithDefault(System.getProperties().getProperty("er.extensions.ERXValidationShouldPushChangesToObject"), ERXValidation.DO_NOT_PUSH_INCORRECT_VALUE_ON_EO));
public void configureFactory() { // CHECKME: This might be better configured in a static init block of ERXValidationFactory. ERXValidation.setPushChangesDefault(ERXUtilities.booleanValueWithDefault(System.getProperties().getProperty("er.extensions.ERXValidationShouldPushChangesToObject"), ERXValidation.DO_NOT_PUSH_INCORRECT_VALUE_ON_EO)); if (WOApplication.application()!=null && WOApplication.application().isCachingEnabled()) { NSNotificationCenter center = NSNotificationCenter.defaultCenter(); center.addObserver(this, new NSSelector("resetTemplateCache", ERXConstant.NotificationClassArray), ERXLocalizer.LocalizationDidResetNotification, null); } }
17168 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17168/030cb3f23617518601f8abfb46f84c89445f1881/ERXValidationFactory.java/buggy/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXValidationFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 5068, 1733, 1435, 288, 3639, 368, 14565, 958, 30, 1220, 4825, 506, 7844, 4351, 316, 279, 760, 1208, 1203, 434, 4232, 60, 4354, 1733, 18, 7734, 4232, 60, 4354, 18, 542, 7621, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 5068, 1733, 1435, 288, 3639, 368, 14565, 958, 30, 1220, 4825, 506, 7844, 4351, 316, 279, 760, 1208, 1203, 434, 4232, 60, 4354, 1733, 18, 7734, 4232, 60, 4354, 18, 542, 7621, ...
private String getVersionFromPluginConfig( String groupId, String artifactId, MavenProject project )
private String getVersionFromPluginConfig( String groupId, String artifactId, MavenProject project, boolean resolveAsReportPlugin )
private String getVersionFromPluginConfig( String groupId, String artifactId, MavenProject project ) { String version = null; for ( Iterator it = project.getBuildPlugins().iterator(); it.hasNext(); ) { Plugin plugin = (Plugin) it.next(); if ( groupId.equals( plugin.getGroupId() ) && artifactId.equals( plugin.getArtifactId() ) ) { version = plugin.getVersion(); break; } } // won't this overwrite the above loop if it exists in both places (unlikely, I know)?? // maybe that's the idea...? if ( project.getReportPlugins() != null ) { for ( Iterator it = project.getReportPlugins().iterator(); it.hasNext(); ) { ReportPlugin reportPlugin = (ReportPlugin) it.next(); if ( groupId.equals( reportPlugin.getGroupId() ) && artifactId.equals( reportPlugin.getArtifactId() ) ) { version = reportPlugin.getVersion(); break; } } } return version; }
1315 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1315/701ef520a30c7b30dcdf2e4a4f06548cc06fbf0b/DefaultPluginVersionManager.java/buggy/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 514, 8343, 1265, 3773, 809, 12, 514, 6612, 16, 514, 25496, 16, 17176, 4109, 1984, 16, 1250, 2245, 1463, 4820, 3773, 262, 565, 288, 3639, 514, 1177, 273, 446, 31, 3639, 364, 261, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 514, 8343, 1265, 3773, 809, 12, 514, 6612, 16, 514, 25496, 16, 17176, 4109, 1984, 16, 1250, 2245, 1463, 4820, 3773, 262, 565, 288, 3639, 514, 1177, 273, 446, 31, 3639, 364, 261, 4...
String xformed = sourceText; if (entry.getPlugins() != null) { RollerContext rctx = RollerContext.getRollerContext();
if (Utilities.isNotEmpty(sourceText)) {
public int doStartTag() throws JspException { Roller roller = RollerFactory.getRoller(); WeblogEntryData entry = (WeblogEntryData)RequestUtils.lookup(pageContext, name, property, scope); String sourceText = entry.getSummary(); if (sourceText == null || (singleEntry && entry.getText() != null)) { sourceText = entry.getText(); } String xformed = sourceText; if (entry.getPlugins() != null) { RollerContext rctx = RollerContext.getRollerContext(); try { PagePluginManager ppmgr = roller.getPagePluginManager(); Map plugins = ppmgr.createAndInitPagePlugins( entry.getWebsite(), rctx.getServletContext(), rctx.getAbsoluteContextUrl(), new VelocityContext()); xformed = ppmgr.applyPagePlugins(entry, plugins, sourceText, true); } catch (Exception e) { mLogger.error(e); } } if (stripHtml) { // don't escape ampersands xformed = Utilities.escapeHTML( Utilities.removeHTML(xformed), false ); } if (maxLength != -1) { xformed = Utilities.truncateNicely(xformed, maxLength, maxLength, "..."); } // somehow things (&#8220) are getting double-escaped // but I cannot seem to track it down xformed = Utilities.stringReplace(xformed, "&amp#", "&#"); try { pageContext.getOut().println(xformed); } catch (IOException e) { throw new JspException("ERROR applying plugin to entry", e); } return TagSupport.SKIP_BODY; }
46431 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46431/5d5ba23a7caaf40776fab62aea568c50610bea78/ShowEntryTextTag.java/buggy/src/org/roller/presentation/weblog/tags/ShowEntryTextTag.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 741, 30512, 1435, 1216, 27485, 288, 3639, 11714, 749, 10643, 749, 273, 11714, 749, 1733, 18, 588, 4984, 749, 5621, 3639, 2999, 1330, 1622, 751, 1241, 273, 5411, 261, 4079, 1330, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 741, 30512, 1435, 1216, 27485, 288, 3639, 11714, 749, 10643, 749, 273, 11714, 749, 1733, 18, 588, 4984, 749, 5621, 3639, 2999, 1330, 1622, 751, 1241, 273, 5411, 261, 4079, 1330, ...
}
public void whenGreater(byte c, Runnable action) throws InterruptedException { synchronized (lock_) { while (!(value_ > c)) lock_.wait(); if (action != null) action.run(); } }
4082 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4082/a6a25004fd5e24a1bc5f053aa539d01dc2553fbf/WaitableByte.java/buggy/src/java/org/logicalcobwebs/concurrent/WaitableByte.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1347, 20937, 12, 7229, 276, 16, 10254, 1301, 13, 1216, 7558, 288, 565, 3852, 261, 739, 67, 13, 288, 1377, 1323, 16051, 12, 1132, 67, 405, 276, 3719, 2176, 27799, 7048, 5621, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1347, 20937, 12, 7229, 276, 16, 10254, 1301, 13, 1216, 7558, 288, 565, 3852, 261, 739, 67, 13, 288, 1377, 1323, 16051, 12, 1132, 67, 405, 276, 3719, 2176, 27799, 7048, 5621, ...
expectedValue = new Double(value); expectedError = Math.abs(error); setHasExpectations(); }
expectedValue = new Double(value); expectedError = Math.abs(error); setHasExpectations(); }
public void setExpected( double value, double error ) { expectedValue = new Double(value); expectedError = Math.abs(error); setHasExpectations(); }
2796 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2796/a917aff361c58c31c5dce12a5e8052df6803dbe1/ExpectationDoubleValue.java/buggy/jmock/core/src/org/jmock/expectation/ExpectationDoubleValue.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 444, 6861, 12, 1645, 460, 16, 1645, 555, 262, 288, 202, 202, 3825, 620, 273, 394, 3698, 12, 1132, 1769, 202, 202, 3825, 668, 273, 2361, 18, 5113, 12, 1636, 1769, 202, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 444, 6861, 12, 1645, 460, 16, 1645, 555, 262, 288, 202, 202, 3825, 620, 273, 394, 3698, 12, 1132, 1769, 202, 202, 3825, 668, 273, 2361, 18, 5113, 12, 1636, 1769, 202, 2...
ULocale.getDefault( ),
rtc.getULocale( ),
public final Size compute( IDisplayServer xs, Chart cm, SeriesDefinition[] seda, RunTimeContext rtc ) throws ChartException { // THREE CASES: // 1. ALL SERIES IN ONE ARRAYLIST // 2. ONE SERIES PER ARRAYLIST // 3. ALL OTHERS final Legend lg = cm.getLegend( ); if ( !lg.isSetOrientation( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.legend.orientation.horzvert", //$NON-NLS-1$ ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } if ( !lg.isSetDirection( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.legend.direction.tblr", //$NON-NLS-1$ ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } // INITIALIZATION OF VARS USED IN FOLLOWING LOOPS final Orientation orientation = lg.getOrientation( ); final Direction direction = lg.getDirection( ); final double maxWrappingSize = lg.getWrappingSize( ); Label la = LabelImpl.create( ); la.setCaption( TextImpl.copyInstance( lg.getText( ) ) ); ClientArea ca = lg.getClientArea( ); LineAttributes lia = ca.getOutline( ); double dSeparatorThickness = lia.getThickness( ); double dWidth = 0, dHeight = 0; la.getCaption( ).setValue( "X" ); //$NON-NLS-1$ final ITextMetrics itm = xs.getTextMetrics( la ); double dItemHeight = itm.getFullHeight( ); Series se; ArrayList al; double dScale = xs.getDpiResolution( ) / 72d; Insets insCA = ca.getInsets( ).scaledInstance( dScale ); final boolean bPaletteByCategory = ( cm.getLegend( ) .getItemType( ) .getValue( ) == LegendItemType.CATEGORIES ); Series seBase; final List legendItems = new ArrayList( ); // Get maximum block width/height available Block bl = cm.getBlock( ); Bounds boFull = bl.getBounds( ).scaledInstance( dScale ); Insets ins = bl.getInsets( ).scaledInstance( dScale ); Insets lgIns = lg.getInsets( ).scaledInstance( dScale ); double dAvailableWidth = boFull.getWidth( ) - ins.getLeft( ) - ins.getRight( ) - lgIns.getLeft( ) - lgIns.getRight( ); double dAvailableHeight = boFull.getHeight( ) - ins.getTop( ) - ins.getBottom( ) - lgIns.getTop( ) - lgIns.getBottom( ) - cm.getTitle( ) .getBounds( ) .scaledInstance( dScale ) .getHeight( ); // Calculate if minSlice applicable. boolean bMinSliceDefined = false; String sMinSliceLabel = null; boolean bMinSliceApplied = false; int[] filteredMinSliceEntry = null; if ( cm instanceof ChartWithoutAxes ) { bMinSliceDefined = ( (ChartWithoutAxes) cm ).isSetMinSlice( ); sMinSliceLabel = ( (ChartWithoutAxes) cm ).getMinSliceLabel( ); if ( sMinSliceLabel == null || sMinSliceLabel.length( ) == 0 ) { sMinSliceLabel = IConstants.UNDEFINED_STRING; } else { sMinSliceLabel = rtc.externalizedMessage( sMinSliceLabel ); } } // calculate if need an extra legend item when minSlice defined. if ( bMinSliceDefined && bPaletteByCategory && cm instanceof ChartWithoutAxes ) { Map renders = rtc.getSeriesRenderers( ); if ( renders != null && !( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS SeriesDefinition sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); SeriesDefinition[] sdOrtho = (SeriesDefinition[]) sdBase.getSeriesDefinitions( ) .toArray( new SeriesDefinition[0] ); DataSetIterator dsiOrtho = null; BaseRenderer br; boolean started = false; ENTRANCE: for ( int i = 0; i < sdOrtho.length; i++ ) { Series[] alRuntimeSeries = (Series[]) sdOrtho[i].getRunTimeSeries( ) .toArray( new Series[0] ); for ( int j = 0; j < alRuntimeSeries.length; j++ ) { try { dsiOrtho = new DataSetIterator( alRuntimeSeries[j].getDataSet( ) ); LegendItemRenderingHints lirh = (LegendItemRenderingHints) renders.get( alRuntimeSeries[j] ); if ( lirh == null ) { filteredMinSliceEntry = null; break ENTRANCE; } br = lirh.getRenderer( ); // ask each render for filtered min slice info int[] fsa = br.getFilteredMinSliceEntry( dsiOrtho ); if ( fsa != null && fsa.length > 0 ) { bMinSliceApplied = true; } if ( !started ) { started = true; filteredMinSliceEntry = fsa; } else { // get duplicate indices for all renderers filteredMinSliceEntry = getDuplicateIndices( fsa, filteredMinSliceEntry ); if ( filteredMinSliceEntry == null || filteredMinSliceEntry.length == 0 ) { filteredMinSliceEntry = null; break ENTRANCE; } } } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } } } // assign a zero-length array for successive convenience if ( filteredMinSliceEntry == null ) { filteredMinSliceEntry = new int[0]; } } } // COMPUTATIONS HERE MUST BE IN SYNC WITH THE ACTUAL RENDERER if ( orientation.getValue( ) == Orientation.VERTICAL ) { double dW, dMaxW = 0; double dRealHeight = 0, dExtraWidth = 0, dDeltaHeight; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { return SizeImpl.create( 0, 0 ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { return SizeImpl.create( 0, 0 ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); } // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } FormatSpecifier fs = null; if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int pos = -1; while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); pos++; // filter the not-used legend. if ( bMinSliceApplied && Arrays.binarySearch( filteredMinSliceEntry, pos ) >= 0 ) { continue; } String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, ULocale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dWidth + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dWidth = dFWidth; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dWidth = Math.max( dFWidth, dWidth ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), pos ) ); } // compute the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dWidth + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dWidth = dFWidth; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dWidth = Math.max( dFWidth, dWidth ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_MINSLICE_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dsiBase.size( ) ) ); } dWidth += insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + insCA.getRight( ) + dExtraWidth; dHeight = Math.max( dRealHeight, dHeight ); } else if ( direction.getValue( ) == Direction.TOP_BOTTOM ) { // (VERTICAL => TB) dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, ULocale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dW = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); double dExtraHeight = 0; String extraText = null; dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, ULocale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dW = Math.max( dW, itm.getFullWidth( ) ); dExtraHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dDeltaHeight += dExtraHeight + 2; } } if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = dW; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dMaxW = Math.max( dW, dMaxW ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dW, dFHeight, la.getCaption( ).getValue( ), dExtraHeight, extraText ) ); } // SETUP HORIZONTAL SEPARATOR SPACING if ( j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dHeight += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( dExtraWidth, dHeight - dSeparatorThickness / 2 ), dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2, 0, null, 0, null ) ); } } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING + MAX // ITEM WIDTH + RIGHT INSETS dWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + dMaxW + insCA.getRight( ) + dExtraWidth; dHeight = Math.max( dRealHeight, dHeight ); } else if ( direction.getValue( ) == Direction.LEFT_RIGHT ) { // (VERTICAL => LR) dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, ULocale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dW = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); double dExtraHeight = 0; String extraText = null; dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, ULocale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dW = Math.max( dW, itm.getFullWidth( ) ); dExtraHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dDeltaHeight += itm.getFullHeight( ) + 2; } } if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = dW; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dMaxW = Math.max( dW, dMaxW ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dW, dFHeight, la.getCaption( ).getValue( ), dExtraHeight, extraText ) ); } dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = 0; // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dExtraWidth += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( dExtraWidth - dSeparatorThickness / 2, 0 ), 0, dRealHeight, null, 0, null ) ); } } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING + // MAX ITEM WIDTH + RIGHT INSETS dWidth += dExtraWidth; dHeight = Math.max( dRealHeight, dHeight ); } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.direction", //$NON-NLS-1$ new Object[]{ direction.getName( ) }, ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } } else if ( orientation.getValue( ) == Orientation.HORIZONTAL ) { double dH, dMaxH = 0; double dRealWidth = 0, dExtraHeight = 0, dDeltaWidth; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.base.axis.no.series.definitions", //$NON-NLS-1$ ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.base.axis.no.series.definitions", //$NON-NLS-1$ ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); } // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } FormatSpecifier fs = null; if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int pos = -1; while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); pos++; // filter the not-used legend. if ( bMinSliceApplied && Arrays.binarySearch( filteredMinSliceEntry, pos ) >= 0 ) { continue; } String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, ULocale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); dDeltaWidth = insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dHeight = dFHeight; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dHeight = Math.max( dFHeight, dHeight ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), pos ) ); } // compute the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); dDeltaWidth = insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dHeight = dFHeight; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dHeight = Math.max( dFHeight, dHeight ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_MINSLICE_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dsiBase.size( ) ) ); } dHeight += dExtraHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dWidth = Math.max( dWidth, dRealWidth ); } else if ( direction.getValue( ) == Direction.TOP_BOTTOM ) { // (HORIZONTAL => TB) dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { dWidth = 0; al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, ULocale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dH = itm.getFullHeight( ); double dFHeight = dH; double dFWidth = itm.getFullWidth( ); double dEHeight = 0; String extraText = null; dDeltaWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dFWidth + insCA.getRight( ) + dHorizontalSpacing; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, ULocale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dEHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dH += dEHeight + 2; dDeltaWidth = Math.max( dDeltaWidth, itm.getFullWidth( ) ); } } if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = dH; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dMaxH = Math.max( dH, dMaxH ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dEHeight, extraText ) ); } dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = 0; // SETUP HORIZONTAL SEPARATOR SPACING if ( j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dHeight += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( 0, dExtraHeight - dSeparatorThickness / 2 ), dRealWidth, 0, null, 0, null ) ); } } dHeight += dExtraHeight; dWidth = Math.max( dRealWidth, dWidth ); } else if ( direction.getValue( ) == Direction.LEFT_RIGHT ) { // (HORIZONTAL => LR) dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, ULocale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dH = itm.getFullHeight( ); double dFHeight = dH; double dFWidth = itm.getFullWidth( ); double dEHeight = 0; String extraText = null; dDeltaWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dFWidth + insCA.getRight( ) + dHorizontalSpacing; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, ULocale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dEHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dH += dEHeight + 2; dDeltaWidth = Math.max( dDeltaWidth, itm.getFullWidth( ) ); } } if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = dH; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dMaxH = Math.max( dH, dMaxH ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dEHeight, extraText ) ); } // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dWidth += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( dWidth - dSeparatorThickness / 2, dExtraHeight ), 0, dMaxH, null, 0, null ) ); } } dHeight += insCA.getTop( ) + dVerticalSpacing + insCA.getBottom( ) + dMaxH + dExtraHeight; dWidth = Math.max( dRealWidth, dWidth ); } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.direction", //$NON-NLS-1$ new Object[]{ direction }, ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.orientation", //$NON-NLS-1$ new Object[]{ orientation }, ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } // consider legend title size. Label lgTitle = lg.getTitle( ); Size titleSize = null; if ( lgTitle != null && lgTitle.isSetVisible( ) && lgTitle.isVisible( ) ) { lgTitle = LabelImpl.copyInstance( lgTitle ); // handle external resource string final String sPreviousValue = lgTitle.getCaption( ).getValue( ); lgTitle.getCaption( ) .setValue( rtc.externalizedMessage( sPreviousValue ) ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, lgTitle, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } int iTitlePos = lg.getTitlePosition( ).getValue( ); // swap left/right if ( rtc.isRightToLeft( ) ) { if ( iTitlePos == Position.LEFT ) { iTitlePos = Position.RIGHT; } else if ( iTitlePos == Position.RIGHT ) { iTitlePos = Position.LEFT; } } switch ( iTitlePos ) { case Position.ABOVE : case Position.BELOW : dHeight += bb.getHeight( ); dWidth = Math.max( dWidth, bb.getWidth( ) ); break; case Position.LEFT : case Position.RIGHT : dWidth += bb.getWidth( ); dHeight = Math.max( dHeight, bb.getHeight( ) ); break; } titleSize = SizeImpl.create( bb.getWidth( ), bb.getHeight( ) ); } itm.dispose( ); // DISPOSE RESOURCE AFTER USE if ( rtc != null ) { LegendItemHints[] liha = (LegendItemHints[]) legendItems.toArray( new LegendItemHints[0] ); // update context hints here. LegendLayoutHints lilh = new LegendLayoutHints( SizeImpl.create( dWidth, dHeight ), titleSize, bMinSliceApplied, sMinSliceLabel, liha ); rtc.setLegendLayoutHints( lilh ); } sz = SizeImpl.create( dWidth, dHeight ); return sz; }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/d71bbfd6958ff36a12a84c2ff6150547978c3d30/LegendBuilder.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/LegendBuilder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 6321, 3671, 12, 1599, 291, 1601, 2081, 9280, 16, 14804, 5003, 16, 1082, 202, 6485, 1852, 8526, 24336, 69, 16, 1939, 950, 1042, 436, 5111, 262, 1216, 14804, 503, 202, 95, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 6321, 3671, 12, 1599, 291, 1601, 2081, 9280, 16, 14804, 5003, 16, 1082, 202, 6485, 1852, 8526, 24336, 69, 16, 1939, 950, 1042, 436, 5111, 262, 1216, 14804, 503, 202, 95, ...
if (o instanceof FontDefinition) return (FontDefinition) o;
if (o instanceof FontDefinition) { return (FontDefinition) o; }
protected FontDefinition getSelectedFontDefinition() { Object o = ((IStructuredSelection) tree.getViewer().getSelection()) .getFirstElement(); if (o instanceof FontDefinition) return (FontDefinition) o; return null; }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/ColorsAndFontsPreferencePage.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 10063, 1852, 16625, 5711, 1852, 1435, 288, 3639, 1033, 320, 273, 14015, 45, 30733, 6233, 13, 2151, 18, 588, 18415, 7675, 588, 6233, 10756, 7734, 263, 588, 3759, 1046, 5621, 3639, 309,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 10063, 1852, 16625, 5711, 1852, 1435, 288, 3639, 1033, 320, 273, 14015, 45, 30733, 6233, 13, 2151, 18, 588, 18415, 7675, 588, 6233, 10756, 7734, 263, 588, 3759, 1046, 5621, 3639, 309,...
else if (MatrixFunctionConstants.DELETE_SCAFFOLDING.equals(function)) { Scaffolding scaffolding = getMatrixManager().getScaffolding(id); if (!scaffolding.isPublished() && scaffolding.getOwner().equals(agent)) return new Boolean(true); }
public Boolean isAuthorized(AuthorizationFacade facade, Agent agent, String function, Id id) { logger.debug("isAuthorized?(...) invoked in MatrixAuthorizer"); if (MatrixFunctionConstants.EVALUATE_MATRIX.equals(function) || MatrixFunctionConstants.REVIEW_MATRIX.equals(function)) { return new Boolean(facade.isAuthorized(function,id)); } //else if (MatrixFunctionConstants.REVIEW_MATRIX.equals(function)) { // if (!agent.getId().equals(getMatrixManager().getMatrix(id).getOwner().getId())) return new Boolean(false); //} else if (ContentHostingService.EVENT_RESOURCE_READ.equals(function)) { return isFileAuth(facade, agent, id); } else if (function.equals(MatrixFunctionConstants.CREATE_SCAFFOLDING)) { return new Boolean(facade.isAuthorized(agent,function,id)); } return null; //don't care }
48996 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48996/3671c9c924808f9e4cb3bec224aaa280bdaf8f13/MatrixAuthorizer.java/buggy/matrix/api-impl/src/java/org/theospi/portfolio/matrix/MatrixAuthorizer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 469, 309, 261, 4635, 2083, 2918, 18, 6460, 67, 8754, 2246, 11846, 1360, 18, 14963, 12, 915, 3719, 288, 2850, 14847, 310, 20992, 310, 273, 2108, 1942, 1318, 7675, 588, 1541, 14847, 310, 12, 350...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 469, 309, 261, 4635, 2083, 2918, 18, 6460, 67, 8754, 2246, 11846, 1360, 18, 14963, 12, 915, 3719, 288, 2850, 14847, 310, 20992, 310, 273, 2108, 1942, 1318, 7675, 588, 1541, 14847, 310, 12, 350...
initOther();
initOther();
public void init() throws ServletException { initActions(); initInternal(); initDebug(); initApplication(); try { initMapping(); } catch (IOException e) { throw new UnavailableException (internal.getMessage("configIO", config)); } initUpload(); initDataSources(); initOther(); initServlet(); }
54704 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54704/893cf1f05ff2aed2f868307f45763b5b3bc5a257/ActionServlet.java/clean/src/share/org/apache/struts/action/ActionServlet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1208, 1435, 1216, 16517, 288, 3639, 1208, 6100, 5621, 202, 2738, 3061, 5621, 202, 2738, 2829, 5621, 202, 2738, 3208, 5621, 202, 698, 288, 202, 565, 1208, 3233, 5621, 202, 97, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1208, 1435, 1216, 16517, 288, 3639, 1208, 6100, 5621, 202, 2738, 3061, 5621, 202, 2738, 2829, 5621, 202, 2738, 3208, 5621, 202, 698, 288, 202, 565, 1208, 3233, 5621, 202, 97, 1...
if (!s3.equals("Bar::pong();Foo::pong();FooBar::ping();")) throw new RuntimeException(" bad FooBar::pong" );
if (!s3.equals("Bar::pong();Foo::pong();director_protected_FooBar::ping();")) throw new RuntimeException(" bad director_protected_FooBar::pong" );
public static void main(String argv[]) { Bar b = new Bar(); Foo f = b.create(); FooBar fb = new FooBar(); FooBar2 fb2 = new FooBar2(); { String s = fb.used(); if (!s.equals("Foo::pang();Bar::pong();Foo::pong();FooBar::ping();")) throw new RuntimeException( "bad FooBar::used" ); } { String s = fb2.used(); if (!s.equals("FooBar2::pang();Bar::pong();Foo::pong();FooBar2::ping();")) throw new RuntimeException( "bad FooBar2::used" ); } { String s = b.pong(); if (!s.equals("Bar::pong();Foo::pong();Bar::ping();")) throw new RuntimeException( "bad Bar::pong" ); } { String s = f.pong(); if (!s.equals("Bar::pong();Foo::pong();Bar::ping();")) throw new RuntimeException(" bad Foo::pong" ); } { String s3 = fb.pong(); if (!s3.equals("Bar::pong();Foo::pong();FooBar::ping();")) throw new RuntimeException(" bad FooBar::pong" ); } try { Method method = b.getClass().getDeclaredMethod("ping", (java.lang.Class[])null); if ( !Modifier.isProtected(method.getModifiers()) ) throw new RuntimeException("Bar::ping should be protected" ); method = f.getClass().getDeclaredMethod("ping", (java.lang.Class[])null); if ( !Modifier.isProtected(method.getModifiers()) ) throw new RuntimeException("Foo::ping should be protected" ); } catch (NoSuchMethodException n) { throw new RuntimeException("NoSuchmethodException caught. Test failed."); } catch (SecurityException s) { throw new RuntimeException("SecurityException caught. Test failed."); } }
3989 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3989/dadc8efd140010cc81fb5e0bc4a201f23a565f4f/director_protected_runme.java/buggy/Examples/test-suite/java/director_protected_runme.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 918, 2774, 12, 780, 5261, 63, 5717, 288, 565, 16654, 324, 273, 394, 16654, 5621, 565, 23077, 284, 273, 324, 18, 2640, 5621, 565, 23077, 5190, 12754, 273, 394, 23077, 5190, 5621...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 918, 2774, 12, 780, 5261, 63, 5717, 288, 565, 16654, 324, 273, 394, 16654, 5621, 565, 23077, 284, 273, 324, 18, 2640, 5621, 565, 23077, 5190, 12754, 273, 394, 23077, 5190, 5621...
}
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition doesn't reposition the view; it // positions the port, in view coordinates. JViewport port = (JViewport) parent; Component view = port.getView(); if (view == null) return; // These dimensions and positions are in *view space*. Do not mix // variables in here from port space (eg. parent.getBounds()). This // function should be entirely in view space, because the methods on // the viewport require inputs in view space. Rectangle portBounds = port.getViewRect(); Dimension viewPref = view.getPreferredSize(); Dimension viewMinimum = view.getMinimumSize(); Point portLowerRight = new Point(portBounds.x + portBounds.width, portBounds.y + portBounds.height); // vertical implementation of the above rules if ((! (view instanceof Scrollable) && viewPref.height < portBounds.height || (view instanceof Scrollable && ((Scrollable) view).getScrollableTracksViewportHeight()))) viewPref.height = portBounds.height; if (portBounds.height >= viewMinimum.height) portBounds.y = 0; else { int overextension = portLowerRight.y - viewPref.height; if (overextension > 0) portBounds.y -= overextension; } // horizontal implementation of the above rules if ((! (view instanceof Scrollable) && viewPref.width < portBounds.width || (view instanceof Scrollable && ((Scrollable) view).getScrollableTracksViewportWidth()))) viewPref.width = portBounds.width; if (portBounds.width >= viewMinimum.width) portBounds.x = 0; else { int overextension = portLowerRight.x - viewPref.width; if (overextension > 0) portBounds.x -= overextension; } port.setViewPosition(portBounds.getLocation()); port.setViewSize(viewPref); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7cc107e01ff95c250142dda3e246542e1b0c0794/ViewportLayout.java/buggy/core/src/classpath/javax/javax/swing/ViewportLayout.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 3511, 2170, 12, 2170, 982, 13, 282, 288, 565, 368, 1021, 4031, 358, 10634, 333, 445, 353, 23772, 358, 2305, 326, 1257, 565, 368, 434, 2590, 518, 4097, 16, 471, 7155, 603, 326...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 3511, 2170, 12, 2170, 982, 13, 282, 288, 565, 368, 1021, 4031, 358, 10634, 333, 445, 353, 23772, 358, 2305, 326, 1257, 565, 368, 434, 2590, 518, 4097, 16, 471, 7155, 603, 326...
if( change.getBeforeRevision() != null && change.getAfterRevision() != null )
try
public static boolean isRenameChange( Change change ) { boolean isRenamed = false; if( change.getBeforeRevision() != null && change.getAfterRevision() != null ) { String prevFile = change.getBeforeRevision().getFile().getPath(); String newFile = change.getAfterRevision().getFile().getPath(); isRenamed = !prevFile.equals( newFile ); } return isRenamed; }
12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/a558a95d21f6822e8ced3848f710a3cda3220d8f/VcsUtil.java/buggy/openapi/src/com/intellij/vcsUtil/VcsUtil.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 1250, 353, 16019, 3043, 12, 7576, 2549, 262, 225, 288, 565, 1250, 353, 16290, 2808, 273, 629, 31, 565, 775, 565, 288, 1377, 514, 2807, 812, 273, 2549, 18, 588, 4649, 7939, 76...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 1250, 353, 16019, 3043, 12, 7576, 2549, 262, 225, 288, 565, 1250, 353, 16290, 2808, 273, 629, 31, 565, 775, 565, 288, 1377, 514, 2807, 812, 273, 2549, 18, 588, 4649, 7939, 76...
endptsvc.removeTransport(udpendpoint);
public void stop(BundleContext context) throws Exception { udptrans.stop(); endptsvc.removeTransport(udpendpoint); }
9764 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9764/a11f52a3fa5884979f3166f3be1214e2b400ae2c/UDPActivator.java/buggy/jadabs/bundles/jxme-osgi/udp/src/ch/ethz/jadabs/jxme/udp/UDPActivator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 2132, 12, 3405, 1042, 819, 13, 1216, 1185, 565, 288, 3639, 16673, 2338, 18, 5681, 5621, 5397, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 2132, 12, 3405, 1042, 819, 13, 1216, 1185, 565, 288, 3639, 16673, 2338, 18, 5681, 5621, 5397, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Debug.err("Invalid Call type in CSV file!");
Debug.err("Invalid Call type in CSV entry!");
public Call parseCallJFritzCSV(String line){ String[] field = line.split(PATTERN_CSV); Call call; CallType calltype; Date calldate; PhoneNumber number; //check if line has correct amount of entries if(field.length < 12){ Debug.err("Invalid CSV format!"); //$NON-NLS-1$ return null; } //Strip those damn quotes for(int i=0; i < 12; i++) field[i] = field[i].substring(1, field[i].length()-1); //Call type //Perhaps it would be nice to standardize the calltype and export strings if(field[0].equals("Incoming")){ //$NON-NLS-1$ calltype = new CallType("call_in"); //$NON-NLS-1$ }else if(field[0].equals("Missed")){ //$NON-NLS-1$ calltype = new CallType("call_in_failed"); //$NON-NLS-1$ }else if(field[0].equals("Outgoing")){ //$NON-NLS-1$ calltype = new CallType("call_out"); //$NON-NLS-1$ }else{ Debug.err("Invalid Call type in CSV file!"); //$NON-NLS-1$ return null; } //Call date and time if(field[1] != null && field[2] != null){ try{ calldate = new SimpleDateFormat("dd.MM.yy HH:mm").parse(field[1]+" "+field[2]); //$NON-NLS-1$, //$NON-NLS-2$ }catch(ParseException e){ Debug.err("Invalid date format in csv file!"); //$NON-NLS-1$ return null; } }else{ Debug.err("Invalid CSV file!"); //$NON-NLS-1$ return null; } //change the port to fit the jfritz naming convention if (field[5].equals("FON1")) { field[5] = "0"; } else if (field[5].equals("FON2")) { field[5] = "1"; } else if (field[5].equals("FON3")) { field[5] = "2"; } else if (field[5].equals("Durchwahl")){ field[5] = "3"; } else if (field[5].equals("ISDN")) { field[5] = "4"; } else if (field[5].equals("DATA")){ field[5] = "36"; } //Parse the SIP Provider and save it correctly if (field[4].startsWith("Internet: ")) { Enumeration en = jfritz.getSIPProviderTableModel() .getProviderList().elements(); while (en.hasMoreElements()) { SipProvider sipProvider = (SipProvider) en .nextElement(); if (sipProvider.getNumber().equals(field[4].substring(10))) { field[4] = "SIP" + sipProvider.getProviderID(); break; } } } //Phone number if(!field[3].equals("")){ number = new PhoneNumber(field[3]); number.setCallByCall(field[10]); }else number = null; //now make the call object //TODO: change the order of the Call constructor to fit //the oder of the csv export function or vice versa!!! call = new Call(jfritz, calltype, calldate, number, field[5], field[4], Integer.parseInt(field[6])); //TODO: perhaps split export function into two functions //exportCallListCSV() and exportPhoneBookCSV() //the few entries in the current export format are not complete //enough to reconstruct the phonebook correctly call.setComment(field[11]); return call; }
7476 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7476/efc10eff4f580600e71f153200460e15abe9b81b/CallerList.java/clean/jfritz/src/de/moonflower/jfritz/callerlist/CallerList.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 225, 1071, 3049, 1109, 1477, 46, 42, 583, 94, 16570, 12, 780, 980, 15329, 202, 565, 514, 8526, 652, 273, 980, 18, 4939, 12, 10831, 67, 16570, 1769, 202, 565, 3049, 745, 31, 202, 565, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 225, 1071, 3049, 1109, 1477, 46, 42, 583, 94, 16570, 12, 780, 980, 15329, 202, 565, 514, 8526, 652, 273, 980, 18, 4939, 12, 10831, 67, 16570, 1769, 202, 565, 3049, 745, 31, 202, 565, ...
public FileSystemExportOperation(IResource res, List resources, String destinationPath, IOverwriteQuery overwriteImplementor) { this(res,destinationPath,overwriteImplementor);
public FileSystemExportOperation(List resources,String destinationPath,IOverwriteQuery overwriteImplementor) { super(); Iterator elementsEnum = resources.iterator(); while (elementsEnum.hasNext()) { IResource currentResource = (IResource) elementsEnum.next(); if (isDescendent(resources, currentResource)) elementsEnum.remove(); }
public FileSystemExportOperation(IResource res, List resources, String destinationPath, IOverwriteQuery overwriteImplementor) { this(res,destinationPath,overwriteImplementor); resourcesToExport = resources;}
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e68f728f4696bb9355c9a366a597a391926142a9/FileSystemExportOperation.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/wizards/datatransfer/FileSystemExportOperation.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 10931, 6144, 2988, 12, 45, 1420, 400, 16, 987, 2703, 16, 514, 30617, 16, 1665, 502, 2626, 1138, 6156, 5726, 280, 13, 288, 202, 2211, 12, 455, 16, 10590, 743, 16, 19274, 5726, 280, 1769...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 10931, 6144, 2988, 12, 45, 1420, 400, 16, 987, 2703, 16, 514, 30617, 16, 1665, 502, 2626, 1138, 6156, 5726, 280, 13, 288, 202, 2211, 12, 455, 16, 10590, 743, 16, 19274, 5726, 280, 1769...
timedWrite(nr, data);
getApi().write(nr*blockSize, data, 0, blockSize);
public void writeBlock(long nr, byte[] data, boolean forceWrite) throws IOException { if(isReadOnly()) throw new ReadOnlyFileSystemException("Filesystem is mounted read-only!"); Block block; Integer key=new Integer((int)nr); //check if the block is in the cache synchronized(blockCache) { if(blockCache.containsKey(key)) { block = (Block)blockCache.get(key); //update the data in the cache block.setData(data); if(forceWrite || SYNC_WRITE) { //write the block to disk //api.write(nr*blockSize, data, 0, blockSize); timedWrite(nr, data); block.setDirty(false); log.debug("writing block "+nr+" to disk"); } else block.setDirty(true); } else { //If the block was not in the cache, I see no reason to put it //in the cache when it is written. //It is simply written to disk. //api.write(nr*blockSize, data, 0, blockSize); timedWrite(nr, data); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f03619e78366bc28dfe50fc7787472318ca41010/Ext2FileSystem.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1045, 1768, 12, 5748, 9884, 16, 1160, 8526, 501, 16, 1250, 2944, 3067, 13, 1216, 1860, 288, 202, 202, 430, 12, 291, 12066, 10756, 1082, 202, 12849, 394, 20617, 11785, 503, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1045, 1768, 12, 5748, 9884, 16, 1160, 8526, 501, 16, 1250, 2944, 3067, 13, 1216, 1860, 288, 202, 202, 430, 12, 291, 12066, 10756, 1082, 202, 12849, 394, 20617, 11785, 503, ...
AST tmp1653_AST_in = (AST)_t;
AST tmp1652_AST_in = (AST)_t;
public final void selectstatea(AST _t) throws RecognitionException { AST selectstatea_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1314 = _t; AST tmp1633_AST_in = (AST)_t; match(_t,SELECT); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ALL: { AST tmp1634_AST_in = (AST)_t; match(_t,ALL); _t = _t.getNextSibling(); break; } case DISTINCT: { AST tmp1635_AST_in = (AST)_t; match(_t,DISTINCT); _t = _t.getNextSibling(); break; } case STAR: case Sql_select_what: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case STAR: { AST tmp1636_AST_in = (AST)_t; match(_t,STAR); _t = _t.getNextSibling(); break; } case Sql_select_what: { AST __t1317 = _t; AST tmp1637_AST_in = (AST)_t; match(_t,Sql_select_what); _t = _t.getFirstChild(); { boolean synPredMatched1320 = false; if (_t==null) _t=ASTNULL; if (((_t.getType()==LEFTPAREN))) { AST __t1320 = _t; synPredMatched1320 = true; inputState.guessing++; try { { AST tmp1638_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); } } catch (RecognitionException pe) { synPredMatched1320 = false; } _t = __t1320;inputState.guessing--; } if ( synPredMatched1320 ) { AST tmp1639_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); sqlexpression(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case Format_phrase: { formatphrase(_t); _t = _retTree; break; } case RIGHTPAREN: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp1640_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case Format_phrase: { formatphrase(_t); _t = _retTree; break; } case 3: case COMMA: { break; } default: { throw new NoViableAltException(_t); } } } } else if ((_tokenSet_28.member(_t.getType()))) { sqlexpression(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case Format_phrase: { formatphrase(_t); _t = _retTree; break; } case 3: case COMMA: { break; } default: { throw new NoViableAltException(_t); } } } } else { throw new NoViableAltException(_t); } } { _loop1326: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp1641_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); sqlexpression(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case Format_phrase: { formatphrase(_t); _t = _retTree; break; } case 3: case COMMA: { break; } default: { throw new NoViableAltException(_t); } } } } else { break _loop1326; } } while (true); } _t = __t1317; _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case INTO: { AST __t1328 = _t; AST tmp1642_AST_in = (AST)_t; match(_t,INTO); _t = _t.getFirstChild(); fld(_t,CQ.UPDATING); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case INDICATOR: case Field_ref: { fetch_indicator(_t); _t = _retTree; break; } case 3: case COMMA: { break; } default: { throw new NoViableAltException(_t); } } } { _loop1332: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp1643_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); fld(_t,CQ.UPDATING); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case INDICATOR: case Field_ref: { fetch_indicator(_t); _t = _retTree; break; } case 3: case COMMA: { break; } default: { throw new NoViableAltException(_t); } } } } else { break _loop1332; } } while (true); } _t = __t1328; _t = _t.getNextSibling(); break; } case FROM: { break; } default: { throw new NoViableAltException(_t); } } } AST __t1333 = _t; AST tmp1644_AST_in = (AST)_t; match(_t,FROM); _t = _t.getFirstChild(); select_from_spec(_t); _t = _retTree; { _loop1335: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp1645_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); select_from_spec(_t); _t = _retTree; } else { break _loop1335; } } while (true); } _t = __t1333; _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case GROUP: { AST __t1337 = _t; AST tmp1646_AST_in = (AST)_t; match(_t,GROUP); _t = _t.getFirstChild(); AST tmp1647_AST_in = (AST)_t; match(_t,BY); _t = _t.getNextSibling(); expression(_t); _t = _retTree; { _loop1339: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp1648_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); expression(_t); _t = _retTree; } else { break _loop1339; } } while (true); } _t = __t1337; _t = _t.getNextSibling(); break; } case 3: case BY: case HAVING: case ORDER: case UNION: case WITH: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case HAVING: { AST __t1341 = _t; AST tmp1649_AST_in = (AST)_t; match(_t,HAVING); _t = _t.getFirstChild(); sqlexpression(_t); _t = _retTree; _t = __t1341; _t = _t.getNextSibling(); break; } case 3: case BY: case ORDER: case UNION: case WITH: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ORDER: { AST __t1343 = _t; AST tmp1650_AST_in = (AST)_t; match(_t,ORDER); _t = _t.getFirstChild(); AST tmp1651_AST_in = (AST)_t; match(_t,BY); _t = _t.getNextSibling(); select_order_expr(_t); _t = _retTree; _t = __t1343; _t = _t.getNextSibling(); break; } case BY: { AST __t1344 = _t; AST tmp1652_AST_in = (AST)_t; match(_t,BY); _t = _t.getFirstChild(); select_order_expr(_t); _t = _retTree; _t = __t1344; _t = _t.getNextSibling(); break; } case 3: case UNION: case WITH: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; if (((_t.getType()==3||_t.getType()==UNION||_t.getType()==WITH))&&(_t != null)) { { boolean synPredMatched1349 = false; if (_t==null) _t=ASTNULL; if ((((_t.getType()==WITH))&&(_t != null))) { AST __t1349 = _t; synPredMatched1349 = true; inputState.guessing++; try { { AST __t1348 = _t; AST tmp1653_AST_in = (AST)_t; match(_t,WITH); _t = _t.getFirstChild(); AST tmp1654_AST_in = (AST)_t; match(_t,CHECK); _t = _t.getNextSibling(); AST tmp1655_AST_in = (AST)_t; match(_t,OPTION); _t = _t.getNextSibling(); _t = __t1348; _t = _t.getNextSibling(); } } catch (RecognitionException pe) { synPredMatched1349 = false; } _t = __t1349;inputState.guessing--; } if ( synPredMatched1349 ) { AST __t1350 = _t; AST tmp1656_AST_in = (AST)_t; match(_t,WITH); _t = _t.getFirstChild(); AST tmp1657_AST_in = (AST)_t; match(_t,CHECK); _t = _t.getNextSibling(); AST tmp1658_AST_in = (AST)_t; match(_t,OPTION); _t = _t.getNextSibling(); _t = __t1350; _t = _t.getNextSibling(); } else if ((_t.getType()==3||_t.getType()==UNION||_t.getType()==WITH)) { } else { throw new NoViableAltException(_t); } } } else if ((_t.getType()==3||_t.getType()==UNION||_t.getType()==WITH)) { } else { throw new NoViableAltException(_t); } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case WITH: { framephrase(_t); _t = _retTree; break; } case 3: case UNION: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case UNION: { AST __t1353 = _t; AST tmp1659_AST_in = (AST)_t; match(_t,UNION); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ALL: { AST tmp1660_AST_in = (AST)_t; match(_t,ALL); _t = _t.getNextSibling(); break; } case SELECT: { break; } default: { throw new NoViableAltException(_t); } } } selectstatea(_t); _t = _retTree; _t = __t1353; _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1314; _t = _t.getNextSibling(); _retTree = _t; }
13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/041a16c78289f1c3ae5e575d3edc5e893a658e50/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 2027, 2019, 69, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 2027, 2019, 69, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, 13, 692, 446, 294, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 2027, 2019, 69, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 2027, 2019, 69, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, 13, 692, 446, 294, ...
DataTransferMessages.getString("WizardExternalProjectImportPage.title"));
DataTransferMessages.getString("WizardExternalProjectImportPage.title"));
public WizardExternalProjectImportPage() { super("wizardExternalProjectPage"); //$NON-NLS-1$ setPageComplete(false); customLocationFieldValue = ""; //$NON-NLS-1$ setTitle( DataTransferMessages.getString("WizardExternalProjectImportPage.title")); //$NON-NLS-1$ setDescription( DataTransferMessages.getString("WizardExternalProjectImportPage.description")); //$NON-NLS-1$ }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/80cfecc0fb5392981e25acee0f567feb8ed55185/WizardExternalProjectImportPage.java/buggy/bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/wizards/datatransfer/WizardExternalProjectImportPage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 678, 13412, 6841, 4109, 5010, 1964, 1435, 288, 202, 202, 9565, 2932, 31837, 6841, 4109, 1964, 8863, 4329, 3993, 17, 5106, 17, 21, 8, 202, 202, 542, 1964, 6322, 12, 5743, 1769, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 678, 13412, 6841, 4109, 5010, 1964, 1435, 288, 202, 202, 9565, 2932, 31837, 6841, 4109, 1964, 8863, 4329, 3993, 17, 5106, 17, 21, 8, 202, 202, 542, 1964, 6322, 12, 5743, 1769, ...
}
}
public void actionPerformed(ActionEvent e) { setReferenceLabel(live.getNextReference()); setRecognitionLabel(""); }
8321 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8321/3bbf7a5fa2a8501dc1786a735b5f9a59166d83df/LiveFrame.java/buggy/sphinx4/tests/live/LiveFrame.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 26100, 12, 1803, 1133, 425, 13, 288, 7734, 31098, 2224, 12, 16472, 18, 588, 2134, 2404, 10663, 7734, 444, 5650, 7909, 2224, 2932, 8863, 5411, 289, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 26100, 12, 1803, 1133, 425, 13, 288, 7734, 31098, 2224, 12, 16472, 18, 588, 2134, 2404, 10663, 7734, 444, 5650, 7909, 2224, 2932, 8863, 5411, 289, 2, -100, -100, -100, -100, -...
addCaption("Specializes:",4,0,0);
addCaption("Generalizations:",4,0,0);
public PropPanelClass() { super("Class",_classIcon, 3); Class mclass = MClass.class; // // this will cause the components on this page to be notified // anytime a stereotype, namespace, operation, etc // has its name changed or is removed anywhere in the model Class[] namesToWatch = { MStereotype.class,MNamespace.class,MOperation.class, MParameter.class,MAttribute.class,MAssociation.class,MClassifier.class }; setNameEventListening(namesToWatch); addCaption("Name:",1,0,0); addField(nameField,1,0,0); addCaption("Stereotype:",2,0,0); addField(new UMLComboBoxNavigator(this,"NavStereo",stereotypeBox),2,0,0); addCaption("Namespace:",3,0,0); addLinkField(namespaceScroll,3,0,0); addCaption("Specializes:",4,0,0); addField(extendsScroll,4,0,0); addCaption("Modifiers:",5,0,1); _modifiersPanel.add(new UMLCheckBox(localize("active"),this,new UMLReflectionBooleanProperty("isActive",mclass,"isActive","setActive"))); addField(_modifiersPanel,5,0,0); addCaption("Associations:",0,1,0); addField(connectScroll,0,1,0.5); addCaption("Implements:",1,1,0); addField(implementsScroll,1,1,0.3); addCaption("Generalizes:",2,1,0); addField(derivedScroll,2,1,0.2); addCaption("Operations:",0,2,0.4); addField(opsScroll,0,2,0.4); addCaption("Attributes:",1,2,0.4); addField(attrScroll,1,2,0.4); addCaption("Owned Elements:",2,2,0.2); addField(innerScroll,2,2,0.2); new PropPanelButton(this,buttonPanel,_navUpIcon,localize("Go up"),"navigateNamespace",null); new PropPanelButton(this,buttonPanel,_navBackIcon,localize("Go back"),"navigateBackAction","isNavigateBackEnabled"); new PropPanelButton(this,buttonPanel,_navForwardIcon,localize("Go forward"),"navigateForwardAction","isNavigateForwardEnabled"); new PropPanelButton(this,buttonPanel,_addAttrIcon,localize("Add attribute"),"addAttribute",null); new PropPanelButton(this,buttonPanel,_addOpIcon,localize("Add operation"),"addOperation",null); //does this make sense?? new PropPanelButton(this,buttonPanel,_addAssocIcon,localize("Add association"),"addAssociation",null); //new PropPanelButton(this,buttonPanel,_generalizationIcon,localize("Add generalization"),"addGeneralization",null); //new PropPanelButton(this,buttonPanel,_realizationIcon,localize("Add realization"),"addRealization",null); //does this make sense?? new PropPanelButton(this,buttonPanel,_classIcon,localize("New class"),"newClass",null); new PropPanelButton(this,buttonPanel,_innerClassIcon,localize("Add inner class"),"addInnerClass",null); new PropPanelButton(this,buttonPanel,_deleteIcon,localize("Delete class"),"removeElement",null); }
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/b1159742eccea41c68a4ec7e51ad98b0263f3bda/PropPanelClass.java/buggy/src_new/org/argouml/uml/ui/foundation/core/PropPanelClass.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 10484, 5537, 797, 1435, 288, 565, 2240, 2932, 797, 3113, 67, 1106, 5554, 16, 890, 1769, 565, 1659, 312, 1106, 273, 490, 797, 18, 1106, 31, 565, 368, 565, 368, 282, 333, 903, 4620,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 10484, 5537, 797, 1435, 288, 565, 2240, 2932, 797, 3113, 67, 1106, 5554, 16, 890, 1769, 565, 1659, 312, 1106, 273, 490, 797, 18, 1106, 31, 565, 368, 565, 368, 282, 333, 903, 4620,...
if (isIE()) { return new String[][]{{"Normal", "Normal"}, {"Heading 1", "Heading 1"}, {"Heading 2", "Heading 2"}, {"Heading 3", "Heading 3"}, {"Heading 4", "Heading 4"}, {"Heading 5", "Heading 5"}, {"Heading 6", "Heading 6"}}; } else { return new String[][]{{"Normal", "P"}, {"Heading 1", "H1"}, {"Heading 2", "H2"}, {"Heading 3", "H3"}, {"Heading 4", "H4"}, {"Heading 5", "H5"}, {"Heading 6", "H6"}}; }
return new String[][]{{"Normal", "<P>"}, {"Heading 1", "<H1>"}, {"Heading 2", "<H2>"}, {"Heading 3", "<H3>"}, {"Heading 4", "<H4>"}, {"Heading 5", "<H5>"}, {"Heading 6", "<H6>"}, {"Preformatted", "<PRE>"}, {"Address", "<ADDRESS>"}};
public static String[][] getSupportedFormats() { if (isIE()) { return new String[][]{{"Normal", "Normal"}, {"Heading 1", "Heading 1"}, {"Heading 2", "Heading 2"}, {"Heading 3", "Heading 3"}, {"Heading 4", "Heading 4"}, {"Heading 5", "Heading 5"}, {"Heading 6", "Heading 6"}}; } else { return new String[][]{{"Normal", "P"}, {"Heading 1", "H1"}, {"Heading 2", "H2"}, {"Heading 3", "H3"}, {"Heading 4", "H4"}, {"Heading 5", "H5"}, {"Heading 6", "H6"}}; } }
54224 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54224/d26c0e4b39fd5efd731ce1b7849b211076c89d97/EditorUtils.java/buggy/src/com/jpavel/gwt/wysiwyg/client/EditorUtils.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 514, 63, 6362, 65, 25008, 8976, 1435, 288, 202, 202, 430, 261, 291, 8732, 10756, 288, 1082, 202, 2463, 394, 514, 63, 6362, 7073, 16711, 5506, 3113, 315, 5506, 6, 5779, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 514, 63, 6362, 65, 25008, 8976, 1435, 288, 202, 202, 430, 261, 291, 8732, 10756, 288, 1082, 202, 2463, 394, 514, 63, 6362, 7073, 16711, 5506, 3113, 315, 5506, 6, 5779, 12...
if(adv.target.channame.equals(m.channame)) {
if (adv.target.channame.equals(m.channame)) {
public void processPrivateMessage(Message m) { if(m.modCommand.equals("adv")) { Iterator it = adventures.iterator(); while(it.hasNext()) { Adventure adv = (Adventure) it.next(); if(adv.target.channame.equals(m.channame)) { //this channel has a running adventure //first we check for "save" and "restore" commands, because they are going to be treated specially if(m.modTrailing.startsWith("save")) { //look for the int argument String intArg = m.modTrailing.replaceAll("save", ""); intArg = intArg.trim(); try { adv.saveSlot = Integer.parseInt(intArg); if(adv.saveSlot>10 || adv.saveSlot<1) { m.createReply("Please choose a slot between 1 and 10.").send(); adv.saveSlot = 0; return; } } catch(NumberFormatException nfe) { m.createReply("Invalid syntax for save command. Try \"save <int>\" " + "where int is between 1 and 10.").send(); return; } //got this far, everything must be valid adv.input.addLast("save"); return; } if(m.modTrailing.startsWith("restore")) { //look for the int argument String intArg = m.modTrailing.replaceAll("restore", ""); intArg = intArg.trim(); if(intArg.length()==0) {//oh-ho, no int argument given, so lets use the default slot if(adv.loadSlot>=1 && adv.loadSlot<=10) adv.input.addLast("restore"); else m.createReply("There doesn't seem to be a default restore point. ").send(); return; } try { adv.loadSlot = Integer.parseInt(intArg); if(adv.loadSlot>10 || adv.loadSlot<1) { m.createReply("Please choose a slot between 1 and 10.").send(); adv.loadSlot = 0; return; } } catch(NumberFormatException nfe) { m.createReply("Invalid syntax for restore command. Try \"restore <int>\" " + "where int is between 1 and 10.").send(); return; } //got this far, everything must be valid adv.input.addLast("restore"); return; } adv.input.addLast(m.modTrailing.trim()); return; } } } else if(m.modCommand.equals("startadv")) { Iterator it = adventures.iterator(); while(it.hasNext()) { Adventure adv = (Adventure) it.next(); if(adv.target.channame.equals(m.channame)) { m.createReply("Umm, we seem to be already playing an Adventure game in here.").send(); return; //this channel already has a running adventure } } File gameImage; String intArg = m.modTrailing.replaceAll("startadv", ""); intArg = intArg.trim(); try { int zmNum = Integer.parseInt(intArg); gameImage = getZMFile(zmNum); if(gameImage == null) { m.createReply("That's not a valid game number!").send(); listFiles(m); return; } } catch(NumberFormatException nfe) { m.createReply("Invalid syntax for startadv command. Try \"startadv <int>\" " + "where int is the number of an adventure game:").send(); listFiles(m); return; } Adventure adv = new Adventure(); adv.target = m; adv.input = new LinkedList(); adv.playing = true; adv.zgameTh = new Thread(adv); adv.gameName = gameImage.getName().replaceAll("\\.z3", "").replaceAll("\\.z5", ""); adv.gameImage = gameImage; adventures.add(adv); adv.zgameTh.start(); } else if(m.modCommand.equals("stopadv")) { Iterator it = adventures.iterator(); while(it.hasNext()) { Adventure adv = (Adventure) it.next(); if(adv.target.channame.equals(m.channame)) { //this channel has a running adventure adventures.remove(adv); adv.playing=false; adv.running = false; m.createReply("Game stopped!").send(); return; } } } else if(m.modCommand.equals("lsgames")) { listFiles(m); } else if(m.modCommand.equals("lssaves")) { Iterator it = adventures.iterator(); while(it.hasNext()) { Adventure adv = (Adventure) it.next(); if(adv.target.channame.equals(m.channame)) { listSaves(m, adv); return; } } m.createReply("Not playing a game, not going to list all possible save files.").send(); } }
47073 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47073/51a359526ddf154c11219d8fd2e2deb0f1d3cc7a/Adventure.java/buggy/src/goat/module/Adventure.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1207, 6014, 1079, 12, 1079, 312, 13, 288, 3639, 309, 12, 81, 18, 1711, 2189, 18, 14963, 2932, 28107, 6, 3719, 288, 5411, 4498, 518, 273, 1261, 616, 1823, 18, 9838, 5621, 5411...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1207, 6014, 1079, 12, 1079, 312, 13, 288, 3639, 309, 12, 81, 18, 1711, 2189, 18, 14963, 2932, 28107, 6, 3719, 288, 5411, 4498, 518, 273, 1261, 616, 1823, 18, 9838, 5621, 5411...
FieldDeclaration fieldDeclaration = (FieldDeclaration) astStack[astPtr - i];
FieldDeclaration fieldDeclaration = (FieldDeclaration) this.astStack[this.astPtr - i];
protected void consumeFieldDeclaration() { // See consumeLocalVariableDeclarationDefaultModifier() in case of change: duplicated code // FieldDeclaration ::= Modifiersopt Type VariableDeclarators ';' /* astStack : expressionStack: Expression Expression ...... Expression identifierStack : type identifier identifier ...... identifier intStack : typeDim dim dim dim ==> astStack : FieldDeclaration FieldDeclaration ...... FieldDeclaration expressionStack : identifierStack : intStack : */ int variableDeclaratorsCounter = astLengthStack[astLengthPtr]; for (int i = variableDeclaratorsCounter - 1; i >= 0; i--) { FieldDeclaration fieldDeclaration = (FieldDeclaration) astStack[astPtr - i]; fieldDeclaration.declarationSourceEnd = endStatementPosition; fieldDeclaration.declarationEnd = endStatementPosition; // semi-colon included } updateSourceDeclarationParts(variableDeclaratorsCounter); int endPos = flushCommentsDefinedPriorTo(endStatementPosition); if (endPos != endStatementPosition) { for (int i = 0; i < variableDeclaratorsCounter; i++) { FieldDeclaration fieldDeclaration = (FieldDeclaration) astStack[astPtr - i]; fieldDeclaration.declarationSourceEnd = endPos; } } // update the astStack, astPtr and astLengthStack int startIndex = astPtr - variablesCounter[nestedType] + 1; System.arraycopy( astStack, startIndex, astStack, startIndex - 1, variableDeclaratorsCounter); astPtr--; // remove the type reference astLengthStack[--astLengthPtr] = variableDeclaratorsCounter; // recovery if (currentElement != null) { lastCheckPoint = endPos + 1; if (currentElement.parent != null && currentElement instanceof RecoveredField){ if (!(currentElement instanceof RecoveredInitializer)) { currentElement = currentElement.parent; } } restartRecovery = true; } variablesCounter[nestedType] = 0;}
10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/72d09911302484497c2776b017dc226fd10250ec/Parser.java/clean/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4750, 918, 7865, 974, 6094, 1435, 288, 202, 759, 2164, 7865, 2042, 26547, 1868, 9829, 1435, 316, 648, 434, 2549, 30, 16975, 981, 202, 759, 2286, 6094, 493, 33, 3431, 3383, 3838, 1412, 7110, 34...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4750, 918, 7865, 974, 6094, 1435, 288, 202, 759, 2164, 7865, 2042, 26547, 1868, 9829, 1435, 316, 648, 434, 2549, 30, 16975, 981, 202, 759, 2286, 6094, 493, 33, 3431, 3383, 3838, 1412, 7110, 34...
IMylarElement node = MylarPlugin.getContextManager().getElement("doesn't exist");
IMylarElement node = ContextCorePlugin.getContextManager().getElement("doesn't exist");
public void testPredictedInterest() { IMylarElement node = MylarPlugin.getContextManager().getElement("doesn't exist"); assertFalse(node.getInterest().isInteresting()); assertFalse(node.getInterest().isPropagated()); }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/b23efbfef800ff6f85224f036d6a11e9fab7acba/ContextManagerTest.java/buggy/org.eclipse.mylyn.java.tests/src/org/eclipse/mylyn/java/tests/ContextManagerTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 21362, 329, 29281, 1435, 288, 202, 202, 3445, 93, 7901, 1046, 756, 273, 8005, 7901, 3773, 18, 29120, 1318, 7675, 21336, 2932, 20657, 82, 1404, 1005, 8863, 202, 202, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 21362, 329, 29281, 1435, 288, 202, 202, 3445, 93, 7901, 1046, 756, 273, 8005, 7901, 3773, 18, 29120, 1318, 7675, 21336, 2932, 20657, 82, 1404, 1005, 8863, 202, 202, 1...
{ FontMetrics metrics = getFontMetrics(getFont()); txtWidth = MAX_LETTER.length()*metrics.charWidth('m'); }
{ FontMetrics metrics = getFontMetrics(getFont()); txtWidth = MAX_LETTER.length()*metrics.charWidth('m'); }
private void initTxtWidth() { FontMetrics metrics = getFontMetrics(getFont()); txtWidth = MAX_LETTER.length()*metrics.charWidth('m'); }
55636 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55636/c61e383c3ea1df4e7b870a5e40d70e12c9ce01f4/ZoomBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/transform/zooming/ZoomBar.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1208, 21811, 2384, 1435, 202, 95, 202, 202, 5711, 5653, 4309, 273, 18776, 5653, 12, 588, 5711, 10663, 202, 202, 5830, 2384, 273, 4552, 67, 26379, 18, 2469, 1435, 14, 9597,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1208, 21811, 2384, 1435, 202, 95, 202, 202, 5711, 5653, 4309, 273, 18776, 5653, 12, 588, 5711, 10663, 202, 202, 5830, 2384, 273, 4552, 67, 26379, 18, 2469, 1435, 14, 9597,...
addSelectionButtons(composite);
listViewer.setLabelProvider(labelProvider); listViewer.setContentProvider(contentProvider); listViewer.getControl().setFont(font);
protected Control createDialogArea(Composite parent) { // page group Composite composite = (Composite)super.createDialogArea(parent); Font font = parent.getFont(); composite.setFont(font); createMessageArea(composite); listViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER); GridData data = new GridData(GridData.FILL_BOTH); data.heightHint = SIZING_SELECTION_WIDGET_HEIGHT; data.widthHint = SIZING_SELECTION_WIDGET_WIDTH; listViewer.getTable().setLayoutData(data); listViewer.setLabelProvider(labelProvider); listViewer.setContentProvider(contentProvider); listViewer.getControl().setFont(font); addSelectionButtons(composite); initializeViewer(); // initialize page if (!getInitialElementSelections().isEmpty()) checkInitialSelections(); return composite;}
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/ae5fb304a3c625bec2a4a9b282bc061b8111fa1c/ListSelectionDialog.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/ListSelectionDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4750, 8888, 752, 6353, 5484, 12, 9400, 982, 13, 288, 202, 759, 1363, 1041, 202, 9400, 9635, 273, 261, 9400, 13, 9565, 18, 2640, 6353, 5484, 12, 2938, 1769, 202, 202, 5711, 3512, 273, 982, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4750, 8888, 752, 6353, 5484, 12, 9400, 982, 13, 288, 202, 759, 1363, 1041, 202, 9400, 9635, 273, 261, 9400, 13, 9565, 18, 2640, 6353, 5484, 12, 2938, 1769, 202, 202, 5711, 3512, 273, 982, 18...
listeners.removeElement(listener);
listeners.remove(listener);
void removeListener(DNSListener listener) { listeners.removeElement(listener); }
2281 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2281/3fae35de8c4ce868da36396d46828869c5809036/JmDNS.java/clean/jmdns/src/javax/jmdns/JmDNS.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 18873, 12, 11602, 2223, 2991, 13, 288, 3639, 4679, 18, 4479, 12, 12757, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 18873, 12, 11602, 2223, 2991, 13, 288, 3639, 4679, 18, 4479, 12, 12757, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if(A_OpenCms.isLogging() && I_CmsLogChannels.C_PREPROCESSOR_IS_LOGGING && C_DEBUG) {
if(A_OpenCms.isLogging(I_CmsLogChannels.C_OPENCMS_DEBUG) && I_CmsLogChannels.C_LOGGING && (DEBUG > 0)) {
public byte[] getContent(CmsObject cms, String templateFile, String elementName, Hashtable parameters) throws CmsException { if(A_OpenCms.isLogging() && I_CmsLogChannels.C_PREPROCESSOR_IS_LOGGING && C_DEBUG) { A_OpenCms.log(C_OPENCMS_DEBUG, "[CmsDumpTemplate] Now dumping contents of file " + templateFile); } I_CmsSession session = cms.getRequestContext().getSession(true); CmsXmlWpTemplateFile templateDocument = new CmsXmlWpTemplateFile(cms, templateFile); CmsXmlLanguageFile lang = templateDocument.getLanguageFile(); // get the right folder String currentFolder = (String)parameters.get("folder"); if((currentFolder != null) && (!"".equals(currentFolder)) && folderExists(cms, currentFolder)) { session.putValue(C_PARA_FILELIST, currentFolder); }else { currentFolder = (String)session.getValue(C_PARA_FILELIST); if((currentFolder == null) || (!folderExists(cms, currentFolder))) { currentFolder = cms.rootFolder().getAbsolutePath(); session.putValue(C_PARA_FILELIST, currentFolder); } } String mode = (String)parameters.get("mode"); // if the parameter mode=listonly is set, only the list will be shown boolean listonly = "listonly".equals(mode); // if the parameter mode=projectview is set, all changed files in that project will be shown boolean projectView = "projectview".equals(mode); boolean noKontext = "false".equals(parameters.get("kontext")); // the flaturl to use for changing folders String flaturl = (String) parameters.get("flaturl"); // get the checksum String checksum = (String)parameters.get("check"); boolean newTreePlease = true; long check = -1; try { check = Long.parseLong(checksum); if(check == cms.getFileSystemFolderChanges()) { newTreePlease = false; } }catch(Exception e) { } check = cms.getFileSystemFolderChanges(); // get the currentFolder Id int currentFolderId = (cms.readFolder(currentFolder)).getResourceId(); // start creating content StringBuffer content = new StringBuffer(2048); content.append("<html> \n<head> \n<script language=JavaScript>\n"); content.append("function initialize() {\n"); if(listonly) { content.append("top.openfolderMethod='openthisfolderflat';\n"); } else { content.append("top.openfolderMethod='openthisfolder';\n"); } if(projectView) { content.append("top.projectView=true;\n"); } else { content.append("top.projectView=false;\n"); } // show kontext if(noKontext) { content.append("top.showKon=false;\n"); } else { content.append("top.showKon=true;\n"); } // the flaturl if(flaturl != null) { content.append("top.flaturl='"); content.append(flaturl); content.append("';\n"); } else if (!listonly){ content.append("top.flaturl='';\n"); } // the help_url content.append("top.help_url='ExplorerAnsicht/index.html';\n"); // the project content.append("top.setProject("); content.append(cms.getRequestContext().currentProject().getId()); content.append(");\n"); // the onlineProject content.append("top.setOnlineProject("); content.append(cms.onlineProject().getId()); content.append(");\n"); // set the checksum for the tree content.append("top.setChecksum("); content.append(check); content.append(");\n"); // set the writeAccess for the current Folder CmsFolder test = cms.readFolder(currentFolder); boolean writeAccess = test.getProjectId() == cms.getRequestContext().currentProject().getId(); content.append("top.enableNewButton("); content.append(writeAccess); content.append(");\n"); // the folder content.append("top.setDirectory("); content.append(currentFolderId); content.append(",\""); content.append(currentFolder); content.append("\");\n"); content.append("top.rD();\n\n"); // now look which filelist colums we want to show int filelist = getDefaultPreferences(cms); boolean showTitle = (filelist & C_FILELIST_TITLE) > 0; boolean showDateChanged = (filelist & C_FILELIST_CHANGED) > 0; boolean showOwner = (filelist & C_FILELIST_OWNER) > 0; boolean showGroup = (filelist & C_FILELIST_GROUP) > 0; boolean showSize = (filelist & C_FILELIST_SIZE) > 0; // now get the entries for the filelist Vector resources = getRessources(cms, currentFolder, parameters); // if a folder contains to much entrys we split them to pages of C_ENTRYS_PER_PAGE // but only in the explorer view int startat = 0; int stopat = resources.size(); int selectedPage = 1; int numberOfPages = 0; int maxEntrys = C_ENTRYS_PER_PAGE; // later this comes from the usersettings if(!(listonly || projectView)){ String selPage = (String)parameters.get("selPage"); if(selPage == null || "".equals(selPage)){ selPage = (String)session.getValue(C_SESSION_CURRENT_PAGE); } if(selPage != null && !"".equals(selPage)){ try{ selectedPage = Integer.parseInt(selPage); session.putValue(C_SESSION_CURRENT_PAGE, selPage); }catch(Exception e){ } } if(stopat > maxEntrys){ // we have to splitt numberOfPages = (stopat / maxEntrys) +1; if(selectedPage > numberOfPages){ // the user has changed the folder and then selected a page for the old folder selectedPage =1; } startat = (selectedPage -1) * maxEntrys; if((startat + maxEntrys) < stopat){ stopat = startat + maxEntrys; } } } for(int i = startat;i < stopat;i++) { CmsResource res = (CmsResource)resources.elementAt(i); content.append("top.aF("); // the name content.append("\""); content.append(res.getName()); content.append("\","); // the path if(projectView){ content.append("\""); content.append(res.getPath()); content.append("\","); }else{ //is taken from top.setDirectory content.append("\"\","); } // the title if(showTitle){ String title = ""; try { title = cms.readProperty(res.getAbsolutePath(), C_PROPERTY_TITLE); }catch(CmsException e) { } if(title == null) { title = ""; } content.append("\""); if (title != null) content.append(Encoder.escapeHtml(title)); content.append("\","); }else{ content.append("\"\","); } // the type content.append(res.getType()); content.append(","); // date of last change if(showDateChanged){ content.append("\""); content.append(Utils.getNiceDate(res.getDateLastModified())); content.append("\","); }else{ content.append("\"\","); } // unused field, was intended for the user who changed the resource last content.append("\"\","); // date // unused field, was intended for: content.append("\"" + Utils.getNiceDate(res.getDateCreated()) + "\","); content.append("\"\","); // size if(res.isFolder() || (!showSize)) { content.append("\"\","); }else { content.append( res.getLength()); content.append(","); } // state content.append(res.getState()); content.append(","); // project content.append(res.getProjectId()); content.append(","); // owner if(showOwner){ content.append("\""); content.append(cms.readUser(res.getOwnerId()).getName()); content.append("\","); }else{ content.append("\"\","); } // group if(showGroup){ content.append("\""); content.append(cms.readGroup(res).getName()); content.append("\","); }else{ content.append("\"\","); } // accessFlags content.append(res.getAccessFlags()); content.append(","); // locked by if(res.isLockedBy() == C_UNKNOWN_ID) { content.append("\"\","); }else { content.append("\""); content.append(cms.lockedBy(res).getName()); content.append("\","); } // locked in project int lockedInProject = res.getLockedInProject(); String lockedInProjectName = ""; try { lockedInProjectName = cms.readProject(lockedInProject).getName(); } catch(CmsException exc) { // ignore the exception - this is an old project so ignore it } content.append("\""); content.append(lockedInProjectName); content.append("\","); content.append(lockedInProject); content.append(");\n"); } // now the tree, only if changed if(newTreePlease && (!listonly)) { content.append("\n top.rT();\n"); Vector tree = cms.getFolderTree(); int startAt = 1; int parentId; boolean grey = false; int onlineProjectId = cms.onlineProject().getId(); if(onlineProjectId == cms.getRequestContext().currentProject().getId()) { // all easy: we are in the onlineProject CmsFolder rootFolder = (CmsFolder)tree.elementAt(0); content.append("top.aC("); content.append(rootFolder.getResourceId()); content.append(", "); content.append("\""); content.append(lang.getDataValue("title.rootfolder")); content.append("\", "); content.append(rootFolder.getParentId()); content.append(", false);\n"); for(int i = startAt;i < tree.size();i++) { CmsFolder folder = (CmsFolder)tree.elementAt(i); content.append("top.aC("); // id content.append(folder.getResourceId()); content.append(", "); // name content.append("\""); content.append(folder.getName()); content.append("\", "); // parentId content.append(folder.getParentId()); content.append(", false);\n"); } }else { // offline Project Hashtable idMixer = new Hashtable(); CmsFolder rootFolder = (CmsFolder)tree.elementAt(0); String folderToIgnore = null; if(rootFolder.getProjectId() != onlineProjectId) { startAt = 2; grey = false; idMixer.put(new Integer(((CmsFolder)tree.elementAt(1)).getResourceId()), new Integer(rootFolder.getResourceId())); }else { grey = true; } content.append("top.aC("); content.append(rootFolder.getResourceId()); content.append(", "); content.append("\""); content.append(lang.getDataValue("title.rootfolder")); content.append("\", "); content.append(rootFolder.getParentId()); content.append(", "); content.append(grey); content.append(");\n"); for(int i = startAt;i < tree.size();i++) { CmsFolder folder = (CmsFolder)tree.elementAt(i); if((folder.getState() == C_STATE_DELETED) || (folder.getAbsolutePath().equals(folderToIgnore))) { // if the folder is deleted - ignore it and the following online res folderToIgnore = folder.getAbsolutePath(); }else { if(folder.getProjectId() != onlineProjectId) { grey = false; parentId = folder.getParentId(); try { // the next res is the same res in the online-project: ignore it! if(folder.getAbsolutePath().equals(((CmsFolder)tree.elementAt(i + 1)).getAbsolutePath())) { i++; idMixer.put(new Integer(((CmsFolder)tree.elementAt(i)).getResourceId()), new Integer(folder.getResourceId())); } }catch(IndexOutOfBoundsException exc) { // ignore the exception, this was the last resource } }else { grey = true; parentId = folder.getParentId(); if(idMixer.containsKey(new Integer(parentId))) { parentId = ((Integer)idMixer.get(new Integer(parentId))).intValue(); } } content.append("top.aC("); // id content.append(folder.getResourceId()); content.append(", "); // name content.append("\""); content.append(folder.getName()); content.append("\", "); // parentId content.append(parentId); content.append(", "); content.append(grey); content.append(");\n"); } } } } if(listonly || projectView) { // only show the filelist content.append(" top.dUL(document); \n"); } else { // update all frames content.append(" top.dU(document,"); content.append(numberOfPages); content.append(","); content.append(selectedPage); content.append("); \n"); } content.append("}\n"); content.append("</script>\n</head> \n<BODY onLoad=\"initialize()\"></BODY> \n</html>\n"); return (content.toString()).getBytes(); }
8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/aa9d52067fda6d55b58eb0d47e9459447b3623c4/CmsNewExplorerFileList.java/clean/src/com/opencms/workplace/CmsNewExplorerFileList.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1160, 8526, 5154, 12, 4747, 921, 6166, 16, 514, 28215, 16, 514, 14453, 16, 5411, 18559, 1472, 13, 1216, 11228, 288, 3639, 309, 12, 37, 67, 3678, 4747, 18, 291, 7735, 12, 45, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1160, 8526, 5154, 12, 4747, 921, 6166, 16, 514, 28215, 16, 514, 14453, 16, 5411, 18559, 1472, 13, 1216, 11228, 288, 3639, 309, 12, 37, 67, 3678, 4747, 18, 291, 7735, 12, 45, 67, ...
return InspectionGadgetsBundle.message("introduce.variable.quickfix"); }
return InspectionGadgetsBundle.message( "introduce.variable.quickfix"); }
public String getName() { return InspectionGadgetsBundle.message("introduce.variable.quickfix"); }
17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/21a46a46462520a9626bc29f241895715b49b6cb/NestedMethodCallInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/style/NestedMethodCallInspection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 1723, 1435, 288, 1377, 327, 22085, 7017, 43, 361, 14665, 3405, 18, 2150, 2932, 23342, 2544, 311, 18, 6105, 18, 19525, 904, 8863, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 1723, 1435, 288, 1377, 327, 22085, 7017, 43, 361, 14665, 3405, 18, 2150, 2932, 23342, 2544, 311, 18, 6105, 18, 19525, 904, 8863, 565, 289, 2, -100, -100, -100, -100, -100, -100...
boolean ignore = false;
public void parseContents(Parser parser) { boolean ignore = false; _test = parser.parseExpression(this, "test", null); if (_test instanceof ElementAvailableCall) { ElementAvailableCall call = (ElementAvailableCall)_test; ignore = !call.getResult(); } if (!ignore) { parseChildren(parser); } // make sure required attribute(s) have been set if (_test.isDummy()) { reportError(this, parser, ErrorMsg.NREQATTR_ERR, "test"); return; } }
46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/f2b35c498dc058f4df47d5aadce27a5bdaf41711/When.java/clean/src/org/apache/xalan/xsltc/compiler/When.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1109, 6323, 12, 2678, 2082, 13, 288, 202, 6494, 2305, 273, 629, 31, 202, 67, 3813, 273, 2082, 18, 2670, 2300, 12, 2211, 16, 315, 3813, 3113, 446, 1769, 202, 430, 261, 67, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1109, 6323, 12, 2678, 2082, 13, 288, 202, 6494, 2305, 273, 629, 31, 202, 67, 3813, 273, 2082, 18, 2670, 2300, 12, 2211, 16, 315, 3813, 3113, 446, 1769, 202, 430, 261, 67, 3...
public TA_RetCode LINEARREG_ANGLE( int startIdx, int endIdx, double inReal[], int optInTimePeriod, MInteger outBegIdx, MInteger outNbElement, double outReal[] ){ int outIdx; int today, lookbackTotal; double SumX, SumXY, SumY, SumXSqr, Divisor; double m; int i; double tempValue1; if( startIdx < 0 ) return TA_RetCode. TA_OUT_OF_RANGE_START_INDEX; if( (endIdx < 0) || (endIdx < startIdx)) return TA_RetCode. TA_OUT_OF_RANGE_END_INDEX; if( (int)optInTimePeriod == ( Integer.MIN_VALUE ) ) optInTimePeriod = 14; else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) return TA_RetCode. TA_BAD_PARAM; lookbackTotal = LINEARREG_ANGLE_Lookback ( optInTimePeriod ); if( startIdx < lookbackTotal ) startIdx = lookbackTotal; if( startIdx > endIdx ) { outBegIdx.value = 0 ; outNbElement.value = 0 ; return TA_RetCode. TA_SUCCESS; } outIdx = 0; today = startIdx; SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; Divisor = SumX * SumX - optInTimePeriod * SumXSqr; while( today <= endIdx ) { SumXY = 0; SumY = 0; for( i = optInTimePeriod; i-- != 0; ) { SumY += tempValue1 = inReal[today - i]; SumXY += (double)i * tempValue1; } m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; outReal[outIdx++] = m * ( 180.0 / 3.14159265358979323846 ); today++; } outBegIdx.value = startIdx; outNbElement.value = outIdx; return TA_RetCode. TA_SUCCESS;}
51465 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51465/1a230e9b7099cbd2b7e9eb1294130ca009bfedf4/Core.java/buggy/trunk/ta-lib/java/src/TA/Lib/Core.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1071, 399, 37, 67, 7055, 1085, 14340, 985, 5937, 67, 30978, 12, 509, 27108, 16, 509, 679, 4223, 16, 1645, 316, 6955, 63, 6487, 509, 2153, 382, 26540, 16, 490, 4522, 596, 24059, 4223, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1071, 399, 37, 67, 7055, 1085, 14340, 985, 5937, 67, 30978, 12, 509, 27108, 16, 509, 679, 4223, 16, 1645, 316, 6955, 63, 6487, 509, 2153, 382, 26540, 16, 490, 4522, 596, 24059, 4223, 16...
cp.setTodir(resourcesDir());
cp.setTodir(resourcesDir());
protected void copyResources() throws BuildException { WOCompCopy cp = new WOCompCopy(); initChildTask(cp); cp.setTodir(resourcesDir()); Enumeration en = resources.elements(); while (en.hasMoreElements()) { cp.addFileset((FileSet) en.nextElement()); } cp.execute(); }
47899 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47899/7b1e6bd24bddb0e25f90ed9c6bf17515b70036f1/WOFramework.java/buggy/src/java/org/objectstyle/woproject/WOFramework.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1610, 3805, 1435, 1216, 18463, 288, 3639, 678, 51, 2945, 2951, 3283, 273, 394, 678, 51, 2945, 2951, 5621, 3639, 1208, 1763, 2174, 12, 4057, 1769, 3639, 3283, 18, 542, 56, 369, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1610, 3805, 1435, 1216, 18463, 288, 3639, 678, 51, 2945, 2951, 3283, 273, 394, 678, 51, 2945, 2951, 5621, 3639, 1208, 1763, 2174, 12, 4057, 1769, 3639, 3283, 18, 542, 56, 369, ...
protected void doInsertAndPaste( TableRow copiedRow, RowOperationParameters parameters ) throws SemanticException { if ( !canInsertAndPaste( copiedRow, parameters ) ) throw new SemanticError( adapter .getElementHandle( ).getElement( ), new String[]{adapter .getElementHandle( ).getName( )}, SemanticError.DESIGN_EXCEPTION_ROW_INSERTANDPASTE_FORBIDDEN ); int destIndex = parameters.getDestIndex( ); SlotHandle slotHandle = getSlotHandle( parameters ); ActivityStack stack = adapter.getModule( ).getActivityStack( ); try { stack.startTrans( ); adapter.getModule( ).getModuleHandle( ).rename( copiedRow.getHandle( slotHandle.getModule( ) ) ); slotHandle.paste( copiedRow.getHandle( slotHandle.getModule( ) ), destIndex + 1 ); } catch ( SemanticException e ) { stack.rollback( ); throw e; } stack.commit( ); }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/d0b211d1c96899ceb2ce8bb7ecac8544be9e6caf/RowBandInsertAndPasteAction.java/clean/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/RowBandInsertAndPasteAction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 741, 4600, 1876, 52, 14725, 12, 3555, 1999, 9268, 1999, 16, 1082, 202, 1999, 2988, 2402, 1472, 262, 1216, 24747, 503, 202, 95, 9506, 202, 430, 261, 401, 4169, 4600, 1876, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 741, 4600, 1876, 52, 14725, 12, 3555, 1999, 9268, 1999, 16, 1082, 202, 1999, 2988, 2402, 1472, 262, 1216, 24747, 503, 202, 95, 9506, 202, 430, 261, 401, 4169, 4600, 1876, ...
ArrayDesignService ads = ( ArrayDesignService ) ctx.getBean( "arrayDesignService" );
public void testAddPermissionsInterceptor() throws Exception { ArrayDesign ad = ArrayDesign.Factory.newInstance(); ad.setName( "fooblyDoobly" ); ArrayDesignService ads = ( ArrayDesignService ) ctx.getBean( "arrayDesignService" ); ad = ( ArrayDesign ) this.getPersisterHelper().persist( ad ); if ( basicAclExtendedDao.getAcls( new NamedEntityObjectIdentity( ad ) ) == null ) { ads.remove( ad ); fail( "Failed to create ACL for " + ad ); } ads.remove( ad ); // make sure it got deleted. if ( basicAclExtendedDao.getAcls( new NamedEntityObjectIdentity( ad ) ) != null ) { fail( "Failed to delete ACL for " + ad ); } }
4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/8a872b057c3bec9c65d52b77ffaf9f1802bebe19/PersistAclInterceptorTest.java/clean/test/edu/columbia/gemma/security/interceptor/PersistAclInterceptorTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 986, 6521, 10281, 1435, 1216, 1185, 288, 3639, 1510, 15478, 1261, 273, 1510, 15478, 18, 1733, 18, 2704, 1442, 5621, 3639, 1261, 18, 542, 461, 12, 315, 617, 947, 715, 3244...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 986, 6521, 10281, 1435, 1216, 1185, 288, 3639, 1510, 15478, 1261, 273, 1510, 15478, 18, 1733, 18, 2704, 1442, 5621, 3639, 1261, 18, 542, 461, 12, 315, 617, 947, 715, 3244...
ret = localgen.generateLocal(returnType); units.insertAfter( Jimple.v().newReturnStmt(ret), last );
if(returnType instanceof VoidType) { units.insertAfter( Jimple.v().newReturnVoidStmt(), last ); } else { ret = localgen.generateLocal(returnType); units.insertAfter( Jimple.v().newReturnStmt(ret), last ); }
public static Stmt restructureReturn(SootMethod method) { if(returns.containsKey(method)) return ((Stmt) returns.get(method)); Body b = method.getActiveBody(); LocalGenerator localgen = new LocalGenerator(b); Stmt endnop = Jimple.v().newNopStmt(); Chain units = b.getUnits(); // want a patching chain here, to make sure // gotos are rewired to go to the inserted nop Stmt last = (Stmt) units.getLast(); Local ret = null; if( last instanceof ReturnStmt ) { ReturnStmt lastRet = (ReturnStmt) last; Value op = lastRet.getOp(); if (op instanceof Local) // return(<local>) ret = (Local) op; // remember this local else if (op instanceof Constant) // return(<constant>) { // change to ret := <constant>; return(ret); Type returnType = method.getReturnType(); ret = localgen.generateLocal(returnType); units.insertBefore(Jimple.v().newAssignStmt(ret,op),lastRet); lastRet.setOp(ret); } else throw new CodeGenException( "Expecting return of <local> or <constant>"); } else if( last instanceof ReturnVoidStmt ) { // do nothing } else { Type returnType = method.getReturnType(); ret = localgen.generateLocal(returnType); units.insertAfter( Jimple.v().newReturnStmt(ret), last ); } // now the last stmt should always be return ret; or return; if( units.getLast() instanceof ReturnStmt ) { ReturnStmt lastRet = (ReturnStmt) units.getLast(); if( lastRet.getOp() != ret ) throw new CodeGenException("Expecting last stmt to Return ret"); } else if ( !(units.getLast() instanceof ReturnVoidStmt ) ) { throw new CodeGenException( "Last stmt should be ReturnStmt or ReturnVoidStmt"); } // insert the nop just before the return stmt units.insertBefore( endnop, units.getLast() ); resetTrapsEnd(b,(Stmt) units.getLast(),endnop); // Look for returns in the middle of the method Iterator it = units.snapshotIterator(); while( it.hasNext() ) { Stmt u = (Stmt) it.next(); if( u == units.getLast() ) continue; if( u instanceof ReturnStmt ) { ReturnStmt ur = (ReturnStmt) u; units.insertBefore( Jimple.v().newAssignStmt( ret, ur.getOp() ), ur ); } if( u instanceof ReturnVoidStmt || u instanceof ReturnStmt) { Stmt gotoStmt = Jimple.v().newGotoStmt(endnop); units.swapWith( u, gotoStmt ); for( Iterator trIt = b.getTraps().iterator(); trIt.hasNext(); ) { final Trap tr = (Trap) trIt.next(); for( Iterator boxIt = tr.getUnitBoxes().iterator(); boxIt.hasNext(); ) { final UnitBox box = (UnitBox) boxIt.next(); if( box.getUnit() == u ) box.setUnit( gotoStmt ); } // each box in trap } // each trap } // if return stmt } // each stmt in body returns.put(method,endnop); return(endnop); }
236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/e03b46bcbbcb7cc7a5024eafc6638f1818ab1046/Restructure.java/clean/aop/abc/src/abc/soot/util/Restructure.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 13751, 400, 13583, 990, 12, 55, 1632, 1305, 707, 13, 288, 565, 309, 12, 6154, 18, 12298, 653, 12, 2039, 3719, 327, 14015, 8952, 13, 1135, 18, 588, 12, 2039, 10019, 565, 5652,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 13751, 400, 13583, 990, 12, 55, 1632, 1305, 707, 13, 288, 565, 309, 12, 6154, 18, 12298, 653, 12, 2039, 3719, 327, 14015, 8952, 13, 1135, 18, 588, 12, 2039, 10019, 565, 5652,...
table.addKeyListener( new KeyAdapter( ) {
if ( modifier instanceof ITableAreaModifier ) { table.addKeyListener( new KeyAdapter( ) {
private void createTableViewer( int tableStyle ) { Table table = new Table( this, tableStyle | SWT.FULL_SELECTION | SWT.BORDER ); table.setLayoutData( new GridData( GridData.FILL_BOTH ) ); tableViewer = new TableViewer( table ); table.addKeyListener( new KeyAdapter( ) { /** * @see org.eclipse.swt.events.KeyAdapter#keyReleased(org.eclipse.swt.events.KeyEvent) */ public void keyReleased( KeyEvent e ) { if ( e.keyCode == SWT.DEL && e.stateMask == 0 && !getSelection( ).isEmpty( ) && modifier.removeItem( getSelection( ).toArray( ) ) ) { tableViewer.refresh( ); updateButtons( ); } } } ); }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/9def0d3f4770404bae8ad9c41d93b5cca9b94576/TableArea.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/swt/custom/TableArea.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 19565, 18415, 12, 509, 1014, 2885, 262, 202, 95, 202, 202, 1388, 1014, 273, 394, 3555, 12, 333, 16, 1014, 2885, 9506, 202, 96, 348, 8588, 18, 18111, 67, 1090, 15445, 950...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 19565, 18415, 12, 509, 1014, 2885, 262, 202, 95, 202, 202, 1388, 1014, 273, 394, 3555, 12, 333, 16, 1014, 2885, 9506, 202, 96, 348, 8588, 18, 18111, 67, 1090, 15445, 950...
final ISelection selection = event.getContext(); getExecutor().execute(new DsfRunnable() { public void run() { if (selection instanceof IStructuredSelection) { fRootVMC = new RootVMC<Object>( DebugViewSelectionRootLayoutNode.this, ((IStructuredSelection)selection).getFirstElement() ); } else { fRootVMC = new RootVMC<Object>( DebugViewSelectionRootLayoutNode.this, null ); } } });
fSelection = event.getContext();
public void debugContextChanged(DebugContextEvent event) { final ISelection selection = event.getContext(); getExecutor().execute(new DsfRunnable() { public void run() { if (selection instanceof IStructuredSelection) { fRootVMC = new RootVMC<Object>( DebugViewSelectionRootLayoutNode.this, ((IStructuredSelection)selection).getFirstElement() ); } else { fRootVMC = new RootVMC<Object>( DebugViewSelectionRootLayoutNode.this, null ); } } }); }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/b191075ec4d85f4cc588e7556be42d8f15e4745e/DebugViewSelectionRootLayoutNode.java/buggy/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/DebugViewSelectionRootLayoutNode.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1198, 1042, 5033, 12, 2829, 1042, 1133, 871, 13, 288, 3639, 727, 467, 6233, 4421, 273, 871, 18, 29120, 5621, 3639, 336, 6325, 7675, 8837, 12, 2704, 463, 21668, 20013, 1435, 288...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1198, 1042, 5033, 12, 2829, 1042, 1133, 871, 13, 288, 3639, 727, 467, 6233, 4421, 273, 871, 18, 29120, 5621, 3639, 336, 6325, 7675, 8837, 12, 2704, 463, 21668, 20013, 1435, 288...
monitor.worked(50);
public void execute(IProgressMonitor monitor) { monitor.beginTask(IDEWorkbenchMessages .getString("CopyProjectOperation.progressTitle"), 100); //$NON-NLS-1$ try { if (monitor.isCanceled()) throw new OperationCanceledException(); //Get a copy of the current description and modify it IProjectDescription newDescription = createProjectDescription( project, projectName, newLocation); monitor.worked(50); project.copy(newDescription, IResource.SHALLOW | IResource.FORCE, monitor); monitor.worked(50); } catch (CoreException e) { recordError(e); // log error } finally { monitor.done(); } }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/8e5d4e26e2c93db2873936f61c11fbd08120d40b/CopyProjectOperation.java/clean/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyProjectOperation.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 1836, 12, 45, 5491, 7187, 6438, 13, 288, 7734, 6438, 18, 10086, 2174, 12, 10385, 2421, 22144, 5058, 13491, 263, 588, 780, 2932, 2951, 4109, 2988, 18, 8298, 4247, 6, 3631, 2130...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 1836, 12, 45, 5491, 7187, 6438, 13, 288, 7734, 6438, 18, 10086, 2174, 12, 10385, 2421, 22144, 5058, 13491, 263, 588, 780, 2932, 2951, 4109, 2988, 18, 8298, 4247, 6, 3631, 2130...
throws PeerUnavailableException { if (addressFactory == null) { addressFactory = (AddressFactory)createSipFactory("javax.sip.address.AddressFactoryImpl"); } return addressFactory; }
throws PeerUnavailableException { if (addressFactory == null) { addressFactory = (AddressFactory) createSipFactory("javax.sip.address.AddressFactoryImpl"); } return addressFactory; }
public AddressFactory createAddressFactory() throws PeerUnavailableException { if (addressFactory == null) { addressFactory = (AddressFactory)createSipFactory("javax.sip.address.AddressFactoryImpl"); } return addressFactory; }
7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/d3bce65e49e71ee7df15bd72fd338535d4501bc1/SipFactory.java/buggy/trunk/src/javax/sip/SipFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 5267, 1733, 752, 1887, 1733, 1435, 21821, 1216, 10669, 15357, 288, 3639, 309, 261, 2867, 1733, 422, 446, 13, 288, 5411, 1758, 1733, 273, 261, 1887, 1733, 13, 2640, 17550, 1733, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 5267, 1733, 752, 1887, 1733, 1435, 21821, 1216, 10669, 15357, 288, 3639, 309, 261, 2867, 1733, 422, 446, 13, 288, 5411, 1758, 1733, 273, 261, 1887, 1733, 13, 2640, 17550, 1733, 2932, ...
dataSource.setPooling(value); }
dataSource.setPooling(value); }
public void setPooling(boolean value) { dataSource.setPooling(value); }
6960 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6960/400d6261413dfc9cd6c3c5e0013eac1d364a3c5d/AppServerXADataSource.java/clean/src/pool/org/firebirdsql/pool/sun/AppServerXADataSource.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 444, 2864, 310, 12, 6494, 460, 13, 288, 3639, 10233, 18, 542, 2864, 310, 12, 1132, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 444, 2864, 310, 12, 6494, 460, 13, 288, 3639, 10233, 18, 542, 2864, 310, 12, 1132, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
throw new TypeError( getRuntime(),
throw getRuntime().newTypeError(
public RubyFixnum op_cmp(IRubyObject obj) { if (this == obj) { return RubyFixnum.newFixnum(getRuntime(), 0); } if (!(obj instanceof RubyModule)) { throw new TypeError( getRuntime(), "<=> requires Class or Module (" + getMetaClass().getName() + " given)"); } return RubyFixnum.newFixnum(getRuntime(), op_le(obj).isTrue() ? -1 : 1); }
45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyModule.java/clean/src/org/jruby/RubyModule.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19817, 8585, 2107, 1061, 67, 9625, 12, 7937, 10340, 921, 1081, 13, 288, 3639, 309, 261, 2211, 422, 1081, 13, 288, 5411, 327, 19817, 8585, 2107, 18, 2704, 8585, 2107, 12, 588, 5576, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19817, 8585, 2107, 1061, 67, 9625, 12, 7937, 10340, 921, 1081, 13, 288, 3639, 309, 261, 2211, 422, 1081, 13, 288, 5411, 327, 19817, 8585, 2107, 18, 2704, 8585, 2107, 12, 588, 5576, ...
if (config == null) config = new JPanel();
if (config == null) config = new JPanel(); tab.remove(1);
public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox)e.getSource(); String selected = (String)cb.getSelectedItem(); module = (PluggableImport)modules.get(selected); dialog.getContentPane().remove(0); JComponent chooser = module.getChooser(imp); if (chooser == null) chooser = new JPanel(); dialog.getContentPane().add(chooser, 0); JComponent config = module.getConfigPanel(); if (config == null) config = new JPanel(); tab.add(config, selected, 1); tab.validate(); dialog.validate(); }
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/e0f226d23e29e6a9d82ad28949104bd97cff717c/Import.java/clean/src_new/org/argouml/uml/reveng/Import.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 918, 26100, 12, 1803, 1133, 425, 13, 288, 9506, 202, 46, 22199, 2875, 273, 261, 46, 22199, 13, 73, 18, 588, 1830, 5621, 9506, 202, 780, 3170, 273, 261, 780, 13, 7358, 18, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 918, 26100, 12, 1803, 1133, 425, 13, 288, 9506, 202, 46, 22199, 2875, 273, 261, 46, 22199, 13, 73, 18, 588, 1830, 5621, 9506, 202, 780, 3170, 273, 261, 780, 13, 7358, 18, 5...
RubyClass newClass = new RubyClass(getRuby(), getRuby().getClasses().getClassClass(), superClass);
RubyClass newClass = new RubyClass(getRuby(), superClass);
public RubyClass newIncludeClass(RubyModule superClass) { RubyClass newClass = new RubyClass(getRuby(), getRuby().getClasses().getClassClass(), superClass); newClass.setIncluded(true); newClass.setInstanceVariables(getInstanceVariables()); newClass.setMethods(getMethods()); if (isIncluded()) { newClass.setRubyClass(getRubyClass()); } else { newClass.setRubyClass(this); } return newClass; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/03950522a75c28f406bd4cb011cb1916a662366d/RubyModule.java/clean/org/jruby/RubyModule.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19817, 797, 394, 8752, 797, 12, 54, 10340, 3120, 18846, 13, 288, 3639, 19817, 797, 394, 797, 273, 394, 19817, 797, 12, 588, 54, 10340, 9334, 18846, 1769, 3639, 394, 797, 18, 542, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19817, 797, 394, 8752, 797, 12, 54, 10340, 3120, 18846, 13, 288, 3639, 19817, 797, 394, 797, 273, 394, 19817, 797, 12, 588, 54, 10340, 9334, 18846, 1769, 3639, 394, 797, 18, 542, ...
log("alt 3");
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { // Lets validate the session, e.g has the user logged in to Janus? if (super.checkSession(req,res) == false) return ; HttpSession session = req.getSession(true); // Lets get the standard parameters and validate them Properties params = super.getSessionParameters(req) ; if (super.checkParameters(req, res, params) == false) return ; // Lets get the user object imcode.server.User user = super.getUserObj(req,res) ; if(user == null) return ; int testMetaId = Integer.parseInt( params.getProperty("META_ID") ); if ( !isUserAuthorized( req, res, testMetaId, user ) ) { return; } // Lets get serverinformation String host = req.getHeader("Host") ; String imcServer = Utility.getDomainPref("userserver",host) ; String ChatPoolServer = Utility.getDomainPref("chat_server",host) ; RmiConf rmi = new RmiConf(user) ; String loginType = (req.getParameter("login_type")==null) ? "" : (req.getParameter("login_type")) ; //**** sets up the different loginpages **** String userIdStr = user.getString("user_id"); int userIdInt = Integer.parseInt(userIdStr); //lets get the authorization types for this chat String[] roles = rmi.execSqlProcedure(ChatPoolServer, "GetChatAuthorizeRoles '"+testMetaId+"'"); //ok lets setup the booleans for the loginpage boolean loggedOnOk = false; boolean aliasBol = false; boolean imCmsRegBol = false; boolean selfRegBol = false; //sets up the booleans Vector rolV = super.convert2Vector(roles); aliasBol = rolV.contains("1"); imCmsRegBol = rolV.contains("3"); if (imCmsRegBol) { selfRegBol = rolV.contains("2"); } //ok lets se if the user realy has loged in or if its a "User" if(userIdInt != 98)//obs 2 = Conferense users { loggedOnOk = true; } log("loggedOnOk = "+loggedOnOk); log("aliasBol ="+aliasBol); log("imCmsRegBol ="+imCmsRegBol); log("selfRegBol ="+selfRegBol); if (aliasBol && !imCmsRegBol) {//only alias login log("alt 1"); LOGIN_HTML = "CLogin1.htm"; }else if ( !aliasBol && imCmsRegBol ) {//only registred imcms users if(loggedOnOk) {//ok the user has loged in so lets fill in he's name log("alt 2"); LOGIN_HTML = "CLogin2.htm"; }else { log("alt 3"); LOGIN_HTML = "CLogin3.htm"; } } else { if (loggedOnOk) { log("alt 5"); LOGIN_HTML = "CLogin5.htm" ; }else { log("alt 4"); LOGIN_HTML = "CLogin4.htm" ; } } log("TEMLPLATE = "+LOGIN_HTML); log("selfRegBol = "+selfRegBol);// LOGIN_HTML = "CLogin3.htm"; String selfRegLink = ""; if(selfRegBol) { if (!loggedOnOk) { selfRegLink="<a href=\"#SERVLET_URL#ChatLogin?login_type=ADD_USER\">Registrera dig!</a>"; } } //log("\n\n\n"+user+"\n\n\n"); //obs mstefixas senare vilken mal som ska visas //*** end different login pages **** // ******** ADD USER PAGE ********* // Lets generate the adduser page if(loginType.equalsIgnoreCase("ADD_USER")) { //String htmlPage = rmi.getLoginPage(imcServer) ; // Lets build the Responsepage to the loginpage VariableManager vm = new VariableManager() ; Vector userInfoV = new Vector(20) ; // a vector, bigger than the amount fields vm = this.addUserInfo(vm,userInfoV) ; vm.addProperty("SERVLET_URL", MetaInfo.getServletPath(req)) ; sendHtml(req,res,vm, ADD_USER_TEMPLATE) ; return ; }//end ADD USER PAGE // ********** LOGIN PAGE ********* // Lets build the Responsepage to the loginpage VariableManager vm = new VariableManager() ; Html htm = new Html(); //check which chat we wants to logg in to String chatId = params.getProperty("META_ID"); //get chatname String chatName = rmi.execSqlProcedureStr(ChatPoolServer, "GetChatName " + chatId); session.putValue("chat_name",chatName); Vector roomsV = new Vector() ; /* //lgg in rumslistan if ( session.getValue("roomList")==null ) { //Get the rooms for the intended chat String[] roomIds = rmi.execSqlProcedure(ChatPoolServer, "GetRoomIds " + chatId ); for(int i = 0;i<roomIds.length;i++) { String roomName = rmi.execSqlProcedureStr(ChatPoolServer, "GetRoomName " + roomIds[i] ); // log("RumId: " + roomIds[i] + " Rum: " + roomName); roomsV.add(roomIds[i]); roomsV.add(roomName); } session.putValue("roomList", roomsV); } else { log("session not empty"); //we just created a chat and it already exists a roomList in the session roomsV = (Vector)session.getValue("roomList"); }*/ //Get the rooms for the intended chat String[] roomIds = rmi.execSqlProcedure(ChatPoolServer, "GetRoomIds " + chatId ); for(int i = 0;i<roomIds.length;i++) { String roomName = rmi.execSqlProcedureStr(ChatPoolServer, "GetRoomName " + roomIds[i] ); roomsV.add(roomIds[i]); roomsV.add(roomName); } session.putValue("roomList", roomsV); for(int i=0;i<roomsV.size();i++) { //log("Rooms: " + roomsV.get(i)); } //get the users username String userName = user.getString("login_name"); vm.addProperty("CHAT_SELFREG_LINK", selfRegLink ); vm.addProperty("userName",userName); vm.addProperty("chatName",chatName); vm.addProperty("rooms", htm.createHtmlCode("ID_OPTION","", roomsV) ) ; vm.addProperty("SERVLET_URL", MetaInfo.getServletPath(req)) ; vm.addProperty( "#IMAGE_URL#", this.getExternalImageFolder( req ) ); sendHtml(req,res,vm, LOGIN_HTML) ; return ; } // End doGet
8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/3c17a49ca3a95afede3efc18fd3261e54133d8c5/ChatLogin.java/clean/servlets/chat/ChatLogin.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 23611, 12, 2940, 18572, 1111, 16, 12446, 400, 13, 202, 15069, 16517, 16, 1860, 202, 95, 202, 202, 759, 511, 2413, 1954, 326, 1339, 16, 425, 18, 75, 711, 326, 729, 7545, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 23611, 12, 2940, 18572, 1111, 16, 12446, 400, 13, 202, 15069, 16517, 16, 1860, 202, 95, 202, 202, 759, 511, 2413, 1954, 326, 1339, 16, 425, 18, 75, 711, 326, 729, 7545, ...
if (file != null) {
if (file != null && file.isValid()) {
public void refresh(final boolean asynchronous) { if (!asynchronous) { ApplicationManager.getApplication().assertWriteAccessAllowed(); } final ModalityState modalityState = EventQueue.isDispatchThread() ? ModalityState.current() : ModalityState.NON_MMODAL; final Runnable endTask = new Runnable() { public void run() { getManager().getRefreshIndicator().stop(); getManager().afterRefreshFinish(asynchronous, modalityState); } }; final Runnable runnable = new Runnable() { public void run() { getManager().beforeRefreshStart(asynchronous, modalityState, null); final ProgressIndicator indicator = getManager().getRefreshIndicator(); indicator.start(); indicator.setText(VfsBundle.message("file.synchronize.progress")); storeRefreshStatusToFiles(); refreshFSRoots(); WatchRequest[] requests; synchronized (LOCK) { requests = normalizeRootsForRefresh(); } for (final WatchRequest request : requests) { String runPath = request.getRootPath(); final VirtualFileImpl rootFile = (VirtualFileImpl)_findFileByPath(runPath, false); if (rootFile != null) { final PhysicalFile file = rootFile.getPhysicalFile(); final boolean recursively = request.isToWatchRecursively(); if (!file.exists()) { final Runnable action = new Runnable() { public void run() { if (!rootFile.isValid()) return; boolean isDirectory = rootFile.isDirectory(); fireBeforeFileDeletion(null, rootFile); synchronized (LOCK) { final VirtualFileImpl parent = rootFile.getParent(); if (parent != null) parent.removeChild(rootFile); } fireFileDeleted(null, rootFile, rootFile.getName(), isDirectory, null); } }; getManager().addEventToFireByRefresh(action, asynchronous, modalityState); } else { refresh(rootFile, recursively, false, modalityState, asynchronous, true); } } else { final String fileSystemPath = request.getFileSystemRootPath(); checkFileCreated(fileSystemPath, runPath, asynchronous, modalityState); } } final Set<Map.Entry<String, VirtualFileImpl>> entries = new HashSet<Map.Entry<String, VirtualFileImpl>>(myUnaccountedFiles.entrySet()); for (final Map.Entry<String,VirtualFileImpl> entry : entries) { final VirtualFileImpl file = entry.getValue(); if (file != null) { if (!file.getPhysicalFile().exists()) { final Runnable action = new Runnable() { public void run() { if (!file.isValid()) return; boolean isDirectory = file.isDirectory(); fireBeforeFileDeletion(null, file); synchronized (LOCK) { myUnaccountedFiles.put(entry.getKey(), null); } fireFileDeleted(null, file, file.getName(), isDirectory, null); } }; getManager().addEventToFireByRefresh(action, asynchronous, modalityState); } else { refresh(file, true, false, modalityState, asynchronous, false); } } else { final String vfsPath = entry.getKey(); final String fsPath = vfsPath.replace('/', File.separatorChar); checkFileCreated(fsPath, vfsPath, asynchronous, modalityState); } } FileWatcher.resyncedManually(); } }; if (asynchronous) { getSynchronizeExecutor().submit(new Runnable() { public void run() { LOG.info("Executing request:" + this); runnable.run(); endTask.run(); } }); } else { runnable.run(); endTask.run(); } }
17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/e280afd2cfdb95d8f73b05aee521223fa8ede616/LocalFileSystemImpl.java/clean/source/com/intellij/openapi/vfs/impl/local/LocalFileSystemImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 4460, 12, 6385, 1250, 9007, 13, 288, 565, 309, 16051, 345, 7121, 13, 288, 1377, 4257, 1318, 18, 588, 3208, 7675, 11231, 3067, 1862, 5042, 5621, 565, 289, 565, 727, 3431, 7919, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 4460, 12, 6385, 1250, 9007, 13, 288, 565, 309, 16051, 345, 7121, 13, 288, 1377, 4257, 1318, 18, 588, 3208, 7675, 11231, 3067, 1862, 5042, 5621, 565, 289, 565, 727, 3431, 7919, ...
private List readConfigurationFile(String filename) throws IOException, MalformedPatternException { Perl5Compiler compiler=new Perl5Compiler(); List rules=new ArrayList(); try { LOG.info("loading " + filename); // borrowed heavily from code in NutchConf.java Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder() .parse(filename); Element root = doc.getDocumentElement(); if (!"regex-normalize".equals(root.getTagName())) LOG.severe("bad conf file: top-level element not <regex-normalize>"); NodeList regexes = root.getChildNodes(); for (int i = 0; i < regexes.getLength(); i++) { Node regexNode = regexes.item(i); if (!(regexNode instanceof Element)) continue; Element regex = (Element)regexNode; if (!"regex".equals(regex.getTagName())) LOG.warning("bad conf file: element not <regex>"); NodeList fields = regex.getChildNodes(); String patternValue = null; String subValue = null; for (int j = 0; j < fields.getLength(); j++) { Node fieldNode = fields.item(j); if (!(fieldNode instanceof Element)) continue; Element field = (Element)fieldNode; if ("pattern".equals(field.getTagName()) && field.hasChildNodes()) patternValue = ((Text)field.getFirstChild()).getData(); if ("substitution".equals(field.getTagName()) && field.hasChildNodes()) subValue = ((Text)field.getFirstChild()).getData(); if (!field.hasChildNodes()) subValue = ""; } if (patternValue != null && subValue != null) { Rule rule=new Rule(); rule.pattern=(Perl5Pattern) compiler.compile(patternValue); rule.substitution=subValue; rules.add(rule); } } } catch (Exception e) { LOG.severe("error parsing " + filename +" conf file: " + e); } return rules; }
50818 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50818/25437bc825d50715dcc9a289a1b4c8fbbc6aced1/RegexUrlNormalizer.java/clean/src/java/org/apache/nutch/net/RegexUrlNormalizer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 987, 855, 1750, 812, 12, 780, 1544, 13, 565, 1216, 1860, 16, 13311, 3234, 503, 288, 565, 5722, 80, 25, 9213, 5274, 33, 2704, 5722, 80, 25, 9213, 5621, 565, 987, 2931, 33, 2704, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 987, 855, 1750, 812, 12, 780, 1544, 13, 565, 1216, 1860, 16, 13311, 3234, 503, 288, 565, 5722, 80, 25, 9213, 5274, 33, 2704, 5722, 80, 25, 9213, 5621, 565, 987, 2931, 33, 2704, ...
infoStudentTestQuestion.getQuestion()));
infoStudentTestQuestion.getQuestion(),""));
protected Object getObjectToCompare() { List infoStudentTestQuestionList = new ArrayList(); try { ISuportePersistente sp = SuportePersistenteOJB.getInstance(); sp.iniciarTransaccao(); IStudentTestQuestion studentTestQuestion = new StudentTestQuestion(new Integer(25)); studentTestQuestion = (IStudentTestQuestion) sp .getIPersistentStudentTestQuestion() .readByOId( studentTestQuestion, false); sp.confirmarTransaccao(); InfoStudentTestQuestion infoStudentTestQuestion = Cloner.copyIStudentTestQuestion2InfoStudentTestQuestion( studentTestQuestion); ParseQuestion parse = new ParseQuestion(); try { infoStudentTestQuestion.setQuestion( parse.parseQuestion( infoStudentTestQuestion.getQuestion().getXmlFile(), infoStudentTestQuestion.getQuestion())); infoStudentTestQuestion = parse.getOptionsShuffle(infoStudentTestQuestion); } catch (Exception e) { fail("exception: Parse "); } infoStudentTestQuestionList.add(infoStudentTestQuestion); } catch (ExcepcaoPersistencia e) { fail("exception: ExcepcaoPersistencia "); } return infoStudentTestQuestionList; }
2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/71ad8641421109d1acda07062444d43efccf3e86/ReadStudentTestTest.java/clean/src_tests/ServidorAplicacao/Servicos/student/ReadStudentTestTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 1033, 6455, 774, 8583, 1435, 288, 202, 202, 682, 1123, 19943, 319, 4709, 11665, 682, 273, 394, 2407, 5621, 202, 202, 698, 288, 1082, 202, 45, 3088, 499, 73, 11906, 73, 1694, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 1033, 6455, 774, 8583, 1435, 288, 202, 202, 682, 1123, 19943, 319, 4709, 11665, 682, 273, 394, 2407, 5621, 202, 202, 698, 288, 1082, 202, 45, 3088, 499, 73, 11906, 73, 1694, ...
generateGlueCodeForNative ( int compiledMethodId, VM_Method method ) {
static VM_MachineCode generateGlueCodeForNative (VM_CompiledMethod cm) { int compiledMethodId = cm.getId(); VM_Method method = cm.getMethod();
generateGlueCodeForNative ( int compiledMethodId, VM_Method method ) { VM_Assembler asm = new VM_Assembler(0); int frameSize = VM_Compiler.getFrameSize(method); VM_Class klass = method.getDeclaringClass(); /* initialization */ { if (VM.VerifyAssertions) VM.assert(T3 <= LAST_VOLATILE_GPR); // need 4 gp temps if (VM.VerifyAssertions) VM.assert(F3 <= LAST_VOLATILE_FPR); // need 4 fp temps if (VM.VerifyAssertions) VM.assert(S0 < SP && SP <= LAST_SCRATCH_GPR); // need 2 scratch } VM_Address bootRecordAddress = VM_Magic.objectAsAddress(VM_BootRecord.the_boot_record); int lockoutLockOffset = VM_Entrypoints.lockoutProcessorField.getOffset(); VM_Address lockoutLockAddress = bootRecordAddress.add(lockoutLockOffset); int sysTOCOffset = VM_Entrypoints.sysTOCField.getOffset(); int sysYieldIPOffset = VM_Entrypoints.sysVirtualProcessorYieldIPField.getOffset(); VM_Address gCFlagAddress = VM_Magic.objectAsAddress(VM_BootRecord.the_boot_record).add(VM_Entrypoints.globalGCInProgressFlagField.getOffset()); int nativeIP = method.getNativeIP(); int nativeTOC = method.getNativeTOC(); // NOTE: this must be done before the condition VM_Thread.hasNativeStackFrame() become true // so that the first Java to C transition will be allowed to resize the stack // (currently, this is true when the JNIRefsTop index has been incremented from 0) asm.emitNativeStackOverflowCheck(frameSize + 14); // add at least 14 for C frame (header + spill) int numValues = method.getParameterWords(); // number of arguments for this method int parameterAreaSize = (numValues) * 4; asm.emitMFLR(0); // save return address in caller frame asm.emitST(0, STACKFRAME_NEXT_INSTRUCTION_OFFSET, FP); // this was set up the first time by DynamicBridgeTo() asm.emitSTU (FP, -frameSize, FP); // get transition frame on stack asm.emitST (JTOC, frameSize - JNI_JTOC_OFFSET, FP); // save RVM JTOC in frame asm.emitST (PROCESSOR_REGISTER, frameSize - JNI_PR_OFFSET, FP); // save PR in frame // store method ID for JNI frame, occupies AIX saved CR slot, which we don't use // hardcoded in the glue routine asm.emitLVAL (S0, compiledMethodId); asm.emitST (S0, STACKFRAME_METHOD_ID_OFFSET, FP); // establish SP -> VM_Thread, S0 -> threads JNIEnv structure asm.emitL(SP, VM_Entrypoints.activeThreadField.getOffset(), PROCESSOR_REGISTER); asm.emitL(S0, VM_Entrypoints.jniEnvField.getOffset(), SP); // save the TI & PR registers in the JNIEnvironment object for possible calls back into Java asm.emitST(TI, VM_Entrypoints.JNIEnvSavedTIField.getOffset(), S0); asm.emitST(PROCESSOR_REGISTER, VM_Entrypoints.JNIEnvSavedPRField.getOffset(), S0); // save current frame pointer in JNIEnv, JNITopJavaFP, which will be the frame // to start scanning this stack during GC, if top of stack is still executing in C asm.emitST(FP, VM_Entrypoints.JNITopJavaFPField.getOffset(), S0); // save the RVM nonvolatile registers, to be scanned by GC stack mapper // remember to skip past the saved JTOC and SP by starting with offset=-12 // for (int i = LAST_NONVOLATILE_GPR, offset = JNI_RVM_NONVOLATILE_OFFSET; i >= FIRST_NONVOLATILE_GPR; --i, offset+=4) { asm.emitST (i, frameSize - offset, FP); } // clear the GC flag on entry to native code asm.emitCAL(PROCESSOR_REGISTER,0,0); // use PR as scratch asm.emitST(PROCESSOR_REGISTER, frameSize-JNI_GC_FLAG_OFFSET, FP); // generate the code to map the parameters to AIX convention and add the // second parameter 2 (either the "this" ptr or class if a static method). // The JNI Function ptr first parameter is set before making the call. // Opens a new frame in the JNIRefs table to register the references // Assumes S0 set to JNIEnv, kills TI, SP & PROCESSOR_REGISTER // On return, S0 is still valid. // storeParametersForAIX(asm, frameSize, method, klass); // Get address of out_of_line prolog into SP, before setting TOC reg. asm.emitL (SP, VM_Entrypoints.invokeNativeFunctionInstructionsField.getOffset(), JTOC); asm.emitMTLR(SP); // set the TOC and IP for branch to out_of_line code asm.emitLVAL (JTOC, nativeTOC); // load TOC for native function into TOC reg asm.emitLVAL (TI, nativeIP); // load TI with address of native code // go to part of prologue that is in the boot image. It will change the Processor // status to "in_native" and transfer to the native code. On return it will // change the state back to "in_java" (waiting if blocked). // // The native address entrypoint is in register TI // The native TOC has been loaded into the TOC register // S0 still points to threads JNIEnvironment // asm.emitBLRL (); // restore PR, saved in this glue frame before the call. If GC occurred, this saved // VM_Processor reference was relocated while scanning this stack. If while in native, // the thread became "stuck" and was moved to a Native Processor, then this saved // PR was reset to point to that native processor // asm.emitL (PROCESSOR_REGISTER, frameSize - JNI_PR_OFFSET, FP); // at this point, test if in blue processor: if yes, return to // Java caller; by picking up at "check if GC..." below // if not, must transfer to blue processor by using // become RVM thread. asm.emitL (S0, VM_Entrypoints.processorModeField.getOffset(), PROCESSOR_REGISTER); // get processorMode asm.emitCMPI (S0, VM_Processor.RVM) ; // are we still on blue processor asm.emitBEQ (+8); // br if equal; i.e., still on blue processor asm.emitL(T0, VM_Entrypoints.activeThreadField.getOffset(), PROCESSOR_REGISTER); // get activeThread from Processor asm.emitL(S0, VM_Entrypoints.jniEnvField.getOffset(), T0); // get JNIEnvironment from activeThread asm.emitL (TI, VM_Entrypoints.JNIEnvSavedTIField.getOffset(), S0); // and restore TI from JNIEnvironment // restore RVM JTOC asm.emitL (JTOC, frameSize - 4, FP); // Branch to becomeRVMThread: we will yield and get rescheduled to execute // on a regular VM_Processor for Java code asm.emitL (S0, VM_Entrypoints.becomeRVMThreadMethod.getOffset(), JTOC); asm.emitMTLR(S0); asm.emitBLRL (); // At this point, we have resumed execution in the regular Java VM_Processor // so the PR contains the correct values for this VM_Processor. TI is also correct // branch to here if on blue processor // // check if GC has occurred, If GC did not occur, then // VM NON_VOLATILE regs were restored by AIX and are valid. If GC did occur // objects referenced by these restored regs may have moved, in this case we // restore the nonvolatile registers from our savearea, // where any object references would have been relocated during GC. // use T2 as scratch (not needed any more on return from call) // asm.emitL(T2, frameSize - JNI_GC_FLAG_OFFSET, FP); asm.emitCMPI(T2,0); asm.emitBEQ(16); // NOTE: count of 16 takes branch around the next 15 instructions (register loads) for (int i = LAST_NONVOLATILE_GPR, offset = JNI_RVM_NONVOLATILE_OFFSET; i >= FIRST_NONVOLATILE_GPR; --i, offset+=4) { asm.emitL (i, frameSize - offset, FP); } // BEQ(16) branch reaches here (next emitted instruction) if taken asm.emitL(S0, VM_Entrypoints.activeThreadField.getOffset(), PROCESSOR_REGISTER); // S0 holds thread pointer // reset threads processor affinity if it was previously zero, before the call. // ...again, rethink if the setting & resetting of processor affinity is still necessary // asm.emitL(T2, frameSize - JNI_AFFINITY_OFFSET, FP); // saved affinity in glue frame asm.emitCMPI(T2,0); asm.emitBNE(2); asm.emitST(T2, VM_Entrypoints.processorAffinityField.getOffset(), S0); // store 0 into affinity field // reestablish S0 to hold jniEnv pointer asm.emitL(S0, VM_Entrypoints.jniEnvField.getOffset(), S0); // pop jrefs frame off the JNIRefs stack, "reopen" the previous top jref frame // use SP as scratch before it's restored, also use T2, T3 for scratch which are no longer needed asm.emitL (SP, VM_Entrypoints.JNIRefsField.getOffset(), S0); // load base of JNIRefs array asm.emitL (T2, VM_Entrypoints.JNIRefsSavedFPField.getOffset(), S0); // get saved offset for JNIRefs frame ptr previously pushed onto JNIRefs array asm.emitCAL(T3, -4, T2); // compute offset for new TOP asm.emitST (T3, VM_Entrypoints.JNIRefsTopField.getOffset(), S0); // store new offset for TOP into JNIEnv asm.emitLX (T2, SP, T2); // retrieve the previous frame ptr asm.emitST (T2, VM_Entrypoints.JNIRefsSavedFPField.getOffset(), S0); // store new offset for JNIRefs frame ptr into JNIEnv // Restore the return value R3-R4 saved in the glue frame spill area before the migration asm.emitL (T0, AIX_FRAME_HEADER_SIZE, FP); asm.emitL (T1, AIX_FRAME_HEADER_SIZE+4, FP); // if the the return type is a reference, the native C is returning a jref // which is a byte offset from the beginning of the threads JNIRefs stack/array // of the corresponding ref. In this case, emit code to replace the returned // offset (in R3) with the ref from the JNIRefs array VM_Type returnType = method.getReturnType(); if ( returnType.isReferenceType() ) { // use returned offset to load ref from JNIRefs into R3 asm.emitLX (3, SP, 3); // SP is still the base of the JNIRefs array } // reload TI ref saved in JNIEnv asm.emitL (TI, VM_Entrypoints.JNIEnvSavedTIField.getOffset(), S0); // pop the glue stack frame, restore the Java caller frame asm.emitCAL (FP, +frameSize, FP); // remove linkage area // C return value is already where caller expected it (R3, R4 or F0) // and SP is a scratch register, so we actually don't have to // restore it and/or pop arguments off it. // So, just restore the return address to the link register. asm.emitL(0, STACKFRAME_NEXT_INSTRUCTION_OFFSET, FP); asm.emitMTLR(0); // restore return address // CHECK EXCEPTION AND BRANCH TO ATHROW CODE OR RETURN NORMALLY asm.emitL (T2, VM_Entrypoints.JNIPendingExceptionField.getOffset(), S0); // get pending exception from JNIEnv asm.emitCAL (T3, 0, 0); // get a null value to compare asm.emitST (T3, VM_Entrypoints.JNIPendingExceptionField.getOffset(), S0); // clear the current pending exception asm.emitCMP (T2, T3); // check for pending exception on return from native asm.emitBNE(+2); // if pending exception, handle it asm.emitBLR(); // if no pending exception, proceed to return to caller // An exception is pending, deliver the exception to the caller as if executing an athrow in the caller // at the location of the call to the native method asm.emitLtoc(T3, VM_Entrypoints.athrowMethod.getOffset()); asm.emitMTCTR(T3); // point LR to the exception delivery code asm.emitCAL (T0, 0, T2); // copy the saved exception to T0 asm.emitBCTR(); // then branch to the exception delivery code, does not return return asm.makeMachineCode(); } // generateGlueCodeForNative // Map the arguments from RVM convention to AIX convention, // and replace all references with indexes into JNIRefs array. // Assumption on entry: // -TI, PROCESSOR_REGISTER and SP are available for use as scratch register // -the frame has been created, FP points to the new callee frame // Also update the JNIRefs arra private static void storeParametersForAIX(VM_Assembler asm, int frameSize, VM_Method method, VM_Class klass) { int nextAIXArgReg, nextAIXArgFloatReg, nextVMArgReg, nextVMArgFloatReg; // offset to the spill area in the callee (AIX frame): // skip past the 2 arguments to be added in front: JNIenv and class or object pointer int spillOffsetAIX = AIX_FRAME_HEADER_SIZE + 8; // offset to the spill area in the caller (RVM frame), relative to the callee's FP int spillOffsetVM = frameSize + STACKFRAME_HEADER_SIZE; VM_Type[] types = method.getParameterTypes(); // does NOT include implicit this or class ptr int numArguments = types.length; // number of arguments for this method // Set up the Reference table for GC // PR <- JREFS array base asm.emitL(PROCESSOR_REGISTER, VM_Entrypoints.JNIRefsField.getOffset(), S0); // TI <- JREFS current top asm.emitL(TI, VM_Entrypoints.JNIRefsTopField.getOffset(), S0); // JREFS offset for current TOP asm.emitA(TI, PROCESSOR_REGISTER, TI); // convert into address // TODO - count number of refs // TODO - emit overflow check for JNIRefs array // start a new JNIRefs frame on each transition from Java to native C // push current SavedFP ptr onto top of JNIRefs stack (use available SP reg as a temp) // and make current TOP the new savedFP // asm.emitL ( SP, VM_Entrypoints.JNIRefsSavedFPField.getOffset(), S0); asm.emitSTU ( SP, 4, TI ); // push prev frame ptr onto JNIRefs array asm.emitSF ( SP, PROCESSOR_REGISTER, TI); // compute offset for new TOP asm.emitST ( SP, VM_Entrypoints.JNIRefsSavedFPField.getOffset(), S0); // save new TOP as new frame ptr in JNIEnv // for static methods: caller has placed args in r3,r4,... // for non-static methods:"this" ptr is in r3, and args start in r4,r5,... // // for static methods: for nonstatic methods: // Java caller AIX callee Java caller AIX callee // ----------- ---------- ----------- ---------- // spill = arg11 -> new spill spill = arg11 -> new spill // spill = arg10 -> new spill spill = arg10 -> new spill // spill = arg9 -> new spill // R12 = arg9 -> new spill // R11 = arg8 -> new spill R12 = arg8 -> new spill // R10 = arg7 -> new spill R11 = arg7 -> new spill // R9 = arg6 -> new spill R10 = arg6 -> new spill // // R8 = arg5 -> R10 R9 = arg5 -> R10 // R7 = arg4 -> R9 R8 = arg4 -> R9 // R6 = arg3 -> R8 R7 = arg3 -> R8 // R5 = arg2 -> R7 R6 = arg2 -> R7 // R4 = arg1 -> R6 R5 = arg1 -> R6 // R3 = arg0 -> R5 R4 = arg0 -> R5 // R4 = class R3 = this -> R4 // R3 = JNIenv R3 = JNIenv // // if the number of args in GPR does not exceed R11, then we can use R12 as scratch // to move the args // if the number of args in GPR exceed R12, then we need to save R12 first to make // room for a scratch register // if the number of args in FPR does not exceed F12, then we can use F13 as scratch nextAIXArgFloatReg = FIRST_AIX_VOLATILE_FPR; nextVMArgFloatReg = FIRST_VOLATILE_FPR; nextAIXArgReg = FIRST_AIX_VOLATILE_GPR + 2; // 1st reg = JNIEnv, 2nd reg = class if ( method.isStatic() ) { nextVMArgReg = FIRST_VOLATILE_GPR; } else { nextVMArgReg = FIRST_VOLATILE_GPR+1; // 1st reg = this, to be processed separately } // The loop below assumes the following relationship: if (VM.VerifyAssertions) VM.assert(FIRST_AIX_VOLATILE_FPR==FIRST_VOLATILE_FPR); if (VM.VerifyAssertions) VM.assert(LAST_AIX_VOLATILE_FPR<=LAST_VOLATILE_FPR); if (VM.VerifyAssertions) VM.assert(FIRST_AIX_VOLATILE_GPR==FIRST_VOLATILE_GPR); if (VM.VerifyAssertions) VM.assert(LAST_AIX_VOLATILE_GPR<=LAST_VOLATILE_GPR); // create one VM_Assembler object for each argument // This is needed for the following reason: // -2 new arguments are added in front for native methods, so the normal arguments // need to be shifted down in addition to being moved // -to avoid overwriting each other, the arguments must be copied in reverse order // -the analysis for mapping however must be done in forward order // -the moving/mapping for each argument may involve a sequence of 1-3 instructions // which must be kept in the normal order // To solve this problem, the instructions for each argument is generated in its // own VM_Assembler in the forward pass, then in the reverse pass, each VM_Assembler // emist the instruction sequence and copies it into the main VM_Assembler VM_Assembler[] asmForArgs = new VM_Assembler[numArguments]; for (int arg = 0; arg < numArguments; arg++) { boolean mustSaveFloatToSpill; asmForArgs[arg] = new VM_Assembler(0); VM_Assembler asmArg = asmForArgs[arg]; // For 32-bit float arguments // if (types[arg].isFloatType()) { // Side effect of float arguments on the GPR's // (1a) reserve one GPR for each float if it is available if (nextAIXArgReg<=LAST_AIX_VOLATILE_GPR) { nextAIXArgReg++; mustSaveFloatToSpill = false; } // (1b) if GPR has spilled, store the float argument in the callee spill area // regardless of whether the FPR has spilled or not else { mustSaveFloatToSpill = true; } // Check if the args need to be moved // (2a) leave those in FPR[1:13] as is unless the GPR has spilled if (nextVMArgFloatReg<=LAST_AIX_VOLATILE_FPR) { if (mustSaveFloatToSpill) asmArg.emitSTFS(nextVMArgFloatReg, spillOffsetAIX, FP); spillOffsetAIX+=4; nextAIXArgFloatReg++; nextVMArgFloatReg++; } // (2b) run out of FPR in AIX, but still have 2 more FPR in VM, // so FPR[14:15] goes to the callee spill area else if (nextVMArgFloatReg<=LAST_VOLATILE_FPR) { asmArg.emitSTFS(nextVMArgFloatReg, spillOffsetAIX, FP); nextVMArgFloatReg++; spillOffsetAIX+=4; } // (2c) run out of FPR in VM, now get the remaining args from the caller spill area // and move them into the callee spill area else { asmArg.emitLFS(0, spillOffsetVM, FP); asmArg.emitSTFS(0, spillOffsetAIX, FP); spillOffsetVM+=4; spillOffsetAIX+=4; } } // For 64-bit float arguments // else if (types[arg].isDoubleType()) { // Side effect of float arguments on the GPR's // (1a) reserve two GPR's for double if (nextAIXArgReg<=LAST_AIX_VOLATILE_GPR-1) { nextAIXArgReg+=2; mustSaveFloatToSpill = false; } // if only one GPR is left, reserve it anyway although it won't be used else { if (nextAIXArgReg<=LAST_AIX_VOLATILE_GPR) nextAIXArgReg++; mustSaveFloatToSpill = true; } // Check if the args need to be moved // (2a) leave those in FPR[1:13] as is unless the GPR has spilled if (nextVMArgFloatReg<=LAST_AIX_VOLATILE_FPR) { if (mustSaveFloatToSpill) asmArg.emitSTFD(nextVMArgFloatReg, spillOffsetAIX, FP); spillOffsetAIX+=8; nextAIXArgFloatReg++; nextVMArgFloatReg++; } // (2b) run out of FPR in AIX, but still have 2 more FPR in VM, // so FPR[14:15] goes to the callee spill area else if (nextVMArgFloatReg<=LAST_VOLATILE_FPR) { asmArg.emitSTFD(nextVMArgFloatReg, spillOffsetAIX, FP); nextVMArgFloatReg++; spillOffsetAIX+=8; } // (2c) run out of FPR in VM, now get the remaining args from the caller spill area // and move them into the callee spill area else { asmArg.emitLFD(0, spillOffsetVM, FP); asmArg.emitSTFD(0, spillOffsetAIX, FP); spillOffsetVM+=8; spillOffsetAIX+=8; } } // For 64-bit int arguments // else if (types[arg].isLongType()) { // (1a) fit in AIX register, move the pair if (nextAIXArgReg<=LAST_AIX_VOLATILE_GPR-1) { asmArg.emitCAU(nextAIXArgReg+1, nextVMArgReg+1, 0); // move lo-word first asmArg.emitCAU(nextAIXArgReg, nextVMArgReg, 0); // so it doesn't overwritten nextAIXArgReg+=2; nextVMArgReg+=2; spillOffsetAIX+=8; } // (1b) fit in VM register but straddle across AIX register/spill else if (nextAIXArgReg==LAST_AIX_VOLATILE_GPR && nextVMArgReg<=LAST_VOLATILE_GPR-1) { spillOffsetAIX+=4; asmArg.emitST(nextVMArgReg+1, spillOffsetAIX, FP); // move lo-word first spillOffsetAIX+=4; // so it doesn't overwritten asmArg.emitCAU(nextAIXArgReg, nextVMArgReg, 0); nextAIXArgReg+=2; nextVMArgReg+=2; } // (1c) fit in VM register, spill in AIX without straddling register/spill else if (nextAIXArgReg>LAST_AIX_VOLATILE_GPR && nextVMArgReg<=LAST_VOLATILE_GPR-1) { asmArg.emitST(nextVMArgReg++, spillOffsetAIX, FP); spillOffsetAIX+=4; asmArg.emitST(nextVMArgReg++, spillOffsetAIX, FP); spillOffsetAIX+=4; } // (1d) split across VM/spill, spill in AIX else if (nextVMArgReg==LAST_VOLATILE_GPR) { asmArg.emitST(nextVMArgReg++, spillOffsetAIX, FP); spillOffsetAIX+=4; asmArg.emitL(0, spillOffsetVM, FP); asmArg.emitST(0, spillOffsetAIX, FP); spillOffsetAIX+=4; spillOffsetVM+=4; } // (1e) spill both in VM and AIX else { asmArg.emitLFD(0, spillOffsetVM, FP); asmArg.emitSTFD(0, spillOffsetAIX, FP); spillOffsetAIX+=8; spillOffsetVM+=8; } } // For reference type, replace with handlers before passing to AIX // else if (types[arg].isReferenceType() ) { // (1a) fit in AIX register, move the register if (nextAIXArgReg<=LAST_AIX_VOLATILE_GPR) { asmArg.emitSTU(nextVMArgReg++, 4, TI ); // append ref to end of JNIRefs array asmArg.emitSF(nextAIXArgReg++, PROCESSOR_REGISTER, TI ); // pass offset in bytes of jref spillOffsetAIX+=4; } // (1b) spill AIX register, but still fit in VM register else if (nextVMArgReg<=LAST_VOLATILE_GPR) { asmArg.emitSTU(nextVMArgReg++, 4, TI ); // append ref to end of JNIRefs array asmArg.emitSF(0, PROCESSOR_REGISTER, TI ); // compute offset in bytes for jref asmArg.emitST(0, spillOffsetAIX, FP); // spill into AIX frame spillOffsetAIX+=4; } // (1c) spill VM register else { asmArg.emitL(0, spillOffsetVM, FP); // retrieve arg from VM spill area asmArg.emitSTU(0, 4, TI ); // append ref to end of JNIRefs array asmArg.emitSF(0, PROCESSOR_REGISTER, TI ); // compute offset in bytes for jref asmArg.emitST(0, spillOffsetAIX, FP); // spill into AIX frame spillOffsetVM+=4; spillOffsetAIX+=4; } } // For all other types: int, short, char, byte, boolean else { // (1a) fit in AIX register, move the register if (nextAIXArgReg<=LAST_AIX_VOLATILE_GPR) { asmArg.emitCAU(nextAIXArgReg++, nextVMArgReg++, 0); spillOffsetAIX+=4; } // (1b) spill AIX register, but still fit in VM register else if (nextVMArgReg<=LAST_VOLATILE_GPR) { asmArg.emitST(nextVMArgReg++, spillOffsetAIX, FP); spillOffsetAIX+=4; } // (1c) spill VM register else { asmArg.emitL(0,spillOffsetVM, FP); // retrieve arg from VM spill area asmArg.emitST(0, spillOffsetAIX, FP); spillOffsetVM+=4; spillOffsetAIX+=4; } } } // Append the code sequences for parameter mapping // to the current machine code in reverse order // so that the move does not overwrite the parameters for (int arg = numArguments-1; arg >= 0; arg--) { VM_MachineCode codeForArg = asmForArgs[arg].makeMachineCode(); asm.appendInstructions(codeForArg.getInstructions()); } // Now add the 2 new JNI parameters: JNI environment and Class or "this" object // if static method, append ref for class, else append ref for "this" // and pass offset in JNIRefs array in r4 (as second arg to called native code) if ( method.isStatic() ) { klass.getClassForType(); // ensure the Java class object is created // JTOC saved above in JNIEnv is still valid, used by following emitLtoc asm.emitLtoc( 4, klass.getTibOffset() ); // r4 <- class TIB ptr from jtoc asm.emitL ( 4, 0, 4 ); // r4 <- first TIB entry == -> class object asm.emitL ( 4, VM_Entrypoints.classForTypeField.getOffset(), 4 ); // r4 <- java Class for this VM_Class asm.emitSTU ( 4, 4, TI ); // append class ptr to end of JNIRefs array asm.emitSF( 4, PROCESSOR_REGISTER, TI ); // pass offset in bytes } else { asm.emitSTU ( 3, 4, TI ); // append this ptr to end of JNIRefs array asm.emitSF( 4, PROCESSOR_REGISTER, TI ); // pass offset in bytes } // store the new JNIRefs array TOP back into JNIEnv asm.emitSF(TI, PROCESSOR_REGISTER, TI ); // compute offset for the current TOP asm.emitST(TI, VM_Entrypoints.JNIRefsTopField.getOffset(), S0); } // end storeParametersforAIX
49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/8eccd357cbc5e56039b677c6615fa81668c2b790/VM_JNICompiler.java/buggy/rvm/src/vm/arch/powerPC/jni/VM_JNICompiler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 2103, 21308, 344, 1085, 1290, 9220, 261, 509, 7743, 30793, 16, 8251, 67, 1305, 707, 262, 377, 288, 1377, 8251, 67, 1463, 5747, 749, 20415, 202, 33, 394, 8251, 67, 1463, 5747, 749, 12, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 2103, 21308, 344, 1085, 1290, 9220, 261, 509, 7743, 30793, 16, 8251, 67, 1305, 707, 262, 377, 288, 1377, 8251, 67, 1463, 5747, 749, 20415, 202, 33, 394, 8251, 67, 1463, 5747, 749, 12, 2...
if (getTimeLeft() > 0) return;
long left = getTimeLeft(); if (left > 0) { if (_log.shouldLog(Log.DEBUG)) _log.debug("Inactivity timeout reached, but there is time left (" + left + ")"); SimpleTimer.getInstance().addEvent(ActivityTimer.this, left); return; }
public void timeReached() { // uh, nothing more to do... if (!_connected) return; // we got rescheduled already if (getTimeLeft() > 0) return; // these are either going to time out or cause further rescheduling if (getUnackedPacketsSent() > 0) return; // wtf, this shouldn't have been scheduled if (_options.getInactivityTimeout() <= 0) return; // if one of us can't talk... if ( (_closeSentOn > 0) || (_closeReceivedOn > 0) ) return; // bugger it, might as well do the hard work now switch (_options.getInactivityAction()) { case ConnectionOptions.INACTIVITY_ACTION_SEND: if (_log.shouldLog(Log.WARN)) _log.warn("Sending some data due to inactivity"); _receiver.send(null, 0, 0, true); break; case ConnectionOptions.INACTIVITY_ACTION_NOOP: if (_log.shouldLog(Log.WARN)) _log.warn("Inactivity timer expired, but we aint doin' shit"); break; case ConnectionOptions.INACTIVITY_ACTION_DISCONNECT: // fall through default: if (_log.shouldLog(Log.WARN)) _log.warn("Closing connection due to inactivity"); if (_log.shouldLog(Log.DEBUG)) { StringBuffer buf = new StringBuffer(128); buf.append("last sent was: ").append(_context.clock().now() - _lastSendTime); buf.append("ms ago, last received was: ").append(_context.clock().now()-_lastReceivedOn); buf.append("ms ago, inactivity timeout is: ").append(_options.getInactivityTimeout()); _log.debug(buf.toString()); } disconnect(true); break; } }
27493 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27493/b9b59ff95fa26f930c7e03f11cb8de9d2416888f/Connection.java/buggy/apps/streaming/java/src/net/i2p/client/streaming/Connection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 813, 23646, 1435, 288, 5411, 368, 582, 76, 16, 5083, 1898, 358, 741, 2777, 5411, 309, 16051, 67, 8537, 13, 327, 31, 5411, 368, 732, 2363, 400, 2847, 72, 1818, 5411, 1525, 200...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 813, 23646, 1435, 288, 5411, 368, 582, 76, 16, 5083, 1898, 358, 741, 2777, 5411, 309, 16051, 67, 8537, 13, 327, 31, 5411, 368, 732, 2363, 400, 2847, 72, 1818, 5411, 1525, 200...
else if (tag.endIndex > lineStart) break;
private void setLineProperties(HTMLStateBuilder stateBuilder, HTMLStyleBuilder styleBuilder) { long prep = System.currentTimeMillis(); int lines = _text.getLineCount(); _text.setLineAlignment(0, lines, SWT.LEFT); _text.setLineBackground(0, lines, null); _text.setLineBullet(0, lines, null); _text.setLineIndent(0, lines, 0); _text.setLineJustify(0, lines, false); // this is only an estimate used for indentation, so the fact that it doesn't // actually take into account the actual fonts used can probably be overlooked int charWidth = -1; GC gc = new GC(_text); FontMetrics metrics = gc.getFontMetrics(); charWidth = metrics.getAverageCharWidth(); gc.dispose(); long bulletTime = 0; long indentTime = 0; long alignmentTime = 0; int alignmentMods = 0; int prevAlignment = -1; int sequentialAligned = 0; ArrayList lineTags = new ArrayList(16); HTMLTag stateTags[] = (HTMLTag[])stateBuilder.getTags().toArray(new HTMLTag[0]); int stateTagCount = stateTags.length; int bodySize = _text.getCharCount(); Map bulletLists = new HashMap(); long times[] = new long[lines]; long timesOff[] = new long[lines]; long timesGetTags[] = new long[lines]; long timesFindAlign[] = new long[lines]; long timesFindList[] = new long[lines]; long timesPrepare[] = new long[lines]; long endPrep = System.currentTimeMillis(); for (int line = 0; line < lines; line++) { times[line] = System.currentTimeMillis(); int lineStart = _text.getOffsetAtLine(line); int lineEnd = -1; if (line + 1 == lines) lineEnd = bodySize; else lineEnd = _text.getOffsetAtLine(line+1)-1; timesOff[line] = System.currentTimeMillis(); int alignment = SWT.LEFT; // now get the tags applicable to [lineStart,lineEnd] for (int i = 0; i < stateTagCount; i++) { HTMLTag tag = stateTags[i]; if ( ( (tag.startIndex <= lineStart) && (tag.endIndex > lineStart) ) || ( (tag.startIndex >= lineStart) && (tag.startIndex < lineEnd) ) ) lineTags.add(tag); else if (tag.endIndex > lineStart) break; // the stateTags are ordered with earliest end first } //ArrayList tags = getTags(stateBuilder, styleBuilder, lineStart, lineEnd); timesGetTags[line] = System.currentTimeMillis(); if (HTMLStyleBuilder.containsTag(lineTags, "pre")) { // if they have pre, do no formatting } else { // look for alignment attributes for (int i = 0; i < lineTags.size(); i++) { HTMLTag tag = (HTMLTag)lineTags.get(i); String align = tag.getAttribValue("align"); if (align != null) { if ("left".equalsIgnoreCase(align)) alignment = SWT.LEFT; else if ("center".equalsIgnoreCase(align)) alignment = SWT.CENTER; else if ("right".equalsIgnoreCase(align)) alignment = SWT.RIGHT; else continue; break; // left|center|right } } // look for center tags if (HTMLStyleBuilder.containsTag(lineTags, "center")) alignment = SWT.CENTER; } timesFindAlign[line] = System.currentTimeMillis(); boolean bulletOrdered = false; int olLevel = 0; int ulLevel = 0; Bullet bullet = null; boolean liFound = false; int indentLevel = 0; // look for li tags, and indent $x times the nesting layer for (int i = 0; i < lineTags.size(); i++) { HTMLTag tag = (HTMLTag)lineTags.get(i); if ("li".equals(tag.name)) { indentLevel++; // we only want to put a bullet point on the first line of // a potentially multiline list item if (!tag.wasConsumed()) { liFound = true; tag.consume(); } } else if ("ol".equals(tag.name) && liFound) { if ( (olLevel == 0) && (ulLevel == 0) ) { bulletOrdered = true; bullet = (Bullet)bulletLists.get(tag); if (bullet == null) { StyleRange bulletRange = new StyleRange(); bulletRange.metrics = new GlyphMetrics(0, 0, 0); bullet = new Bullet(ST.BULLET_NUMBER | ST.BULLET_TEXT, bulletRange); bullet.text = ")"; bulletLists.put(tag, bullet); } } olLevel++; } else if ("ul".equals(tag.name) && liFound) { if ( (olLevel == 0) && (ulLevel == 0) ) { bulletOrdered = false; bullet = (Bullet)bulletLists.get(tag); if (bullet == null) { StyleRange bulletRange = new StyleRange(); bulletRange.metrics = new GlyphMetrics(0, 0, 0); bullet = new Bullet(ST.BULLET_DOT, bulletRange); bulletLists.put(tag, bullet); } } ulLevel++; } } timesFindList[line] = System.currentTimeMillis(); //if (indentLevel > 0) // System.out.println("indent level: " + indentLevel + " bullet: " + bullet + " ulLevel: " + ulLevel + " olLevel: " + olLevel); boolean quoteFound = false; // look for <quote> tags, and indent $x times the nesting layer for (int i = 0; i < lineTags.size(); i++) { HTMLTag tag = (HTMLTag)lineTags.get(i); if ("quote".equals(tag.name)) { indentLevel++; quoteFound = true; } } // look for <dd/dt> tags, and indent $x times the nesting layer if (HTMLStyleBuilder.containsTag(lineTags, "dd")) indentLevel += 2; if (HTMLStyleBuilder.containsTag(lineTags, "dt")) indentLevel++; //System.out.println("line " + line + " [" + lineStart + ":" + lineEnd + "]: quote? " + quoteFound + " tags: " + tags // + " (align: " + (alignment==SWT.LEFT ? "left" : alignment == SWT.CENTER ? "center" : "right") // + " indent: " + indentLevel + ")"); timesPrepare[line] = System.currentTimeMillis(); // we could optimize the line settings to deal with sequential lines w/ == settings, // but its not worth it atm long t1 = System.currentTimeMillis(); if (alignment != SWT.LEFT) _text.setLineAlignment(line, 1, alignment); long t2 = System.currentTimeMillis(); alignmentTime += (t2-t1); if (prevAlignment != alignment) { prevAlignment = alignment; //sequentialAligned = 0; } else { sequentialAligned++; } if (bullet != null) { bullet.style.metrics.width = indentLevel * 4 * charWidth; _text.setLineBullet(line, 1, bullet); long t3 = System.currentTimeMillis(); bulletTime += (t3-t2); } else if (indentLevel > 0) { _text.setLineIndent(line, 1, indentLevel * 4 * charWidth); long t3 = System.currentTimeMillis(); indentTime += (t3-t2); } lineTags.clear(); } long timesOffTot = 0; long timesGetTagsTot = 0; long timesFindAlignTot = 0; long timesFindListTot = 0; for (int i = 0; i < lines; i++) { timesOffTot += timesOff[i]-times[i]; timesGetTagsTot += timesGetTags[i]-timesOff[i]; timesFindAlignTot += timesFindAlign[i]-timesGetTags[i]; timesFindListTot += timesFindList[i]-timesFindAlign[i]; } _browser.getUI().debugMessage("line style: alignment: " + alignmentTime + ", bullets: " + bulletTime + " indent: " + indentTime //+ " sequential: " + sequentialAligned + " prep: " + (endPrep-prep) + " timesOff: " + timesOffTot + " timesGetTags: " + timesGetTagsTot + " timesAlign: " + timesFindAlignTot + " timesList: " + timesFindListTot); }
27487 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27487/281f1c0a5ecfc19549dcda4f0ead5322d1211e77/PageRenderer.java/clean/src/syndie/gui/PageRenderer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 26482, 2297, 12, 4870, 1119, 1263, 919, 1263, 16, 3982, 2885, 1263, 2154, 1263, 13, 288, 3639, 1525, 13237, 273, 2332, 18, 2972, 28512, 5621, 3639, 509, 2362, 273, 389, 955, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 26482, 2297, 12, 4870, 1119, 1263, 919, 1263, 16, 3982, 2885, 1263, 2154, 1263, 13, 288, 3639, 1525, 13237, 273, 2332, 18, 2972, 28512, 5621, 3639, 509, 2362, 273, 389, 955, 18...
}
}
private Class attemptCorePluginClassLoad(String pluginClassName) { try { return application.getClassLoader().loadClass(pluginClassName); } catch (ClassNotFoundException e) { LOG.warn("[GrailsPluginManager] Core plugin ["+pluginClassName+"] not found, resuming load without.."); if(LOG.isDebugEnabled()) LOG.debug(e.getMessage(),e); } return null; }
26970 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/26970/9a48c67ca976a6eec32ecffd53cc3161656dc01a/DefaultGrailsPluginManager.java/buggy/src/commons/org/codehaus/groovy/grails/plugins/DefaultGrailsPluginManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 1659, 4395, 4670, 3773, 797, 2563, 12, 780, 1909, 3834, 13, 288, 202, 202, 698, 288, 1082, 202, 2463, 2521, 18, 588, 7805, 7675, 945, 797, 12, 4094, 3834, 1769, 202, 202, 97,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 1659, 4395, 4670, 3773, 797, 2563, 12, 780, 1909, 3834, 13, 288, 202, 202, 698, 288, 1082, 202, 2463, 2521, 18, 588, 7805, 7675, 945, 797, 12, 4094, 3834, 1769, 202, 202, 97,...
} else if (StyleHandle.PAGE_BREAK_AFTER_PROP.equals(property)) {
} else if ( StyleHandle.PAGE_BREAK_AFTER_PROP.equals( property ) ) {
public static IChoiceSet getDEChoiceSet(String property) { String unitKey = DesignChoiceConstants.CHOICE_UNITS; if (AttributeConstant.BACKGROUND_COLOR.equals(property)) { unitKey = IColorConstants.COLORS_CHOICE_SET; } else if (AttributeConstant.FONT_COLOR.equals(property)) { unitKey = IColorConstants.COLORS_CHOICE_SET; } else if (AttributeConstant.FONT_SIZE.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_FONT_SIZE; } else if (AttributeConstant.FONT_FAMILY.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_FONT_FAMILY; } else if (AttributeConstant.TEXT_FORMAT.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_TEXT_CONTENT_TYPE; } else if (AttributeConstant.BORDER_STYLE.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_LINE_STYLE; } else if (AttributeConstant.BORDER_WIDTH.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_LINE_WIDTH; } else if (SortKey.DIRECTION_MEMBER.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_SORT_DIRECTION; } else if (FilterCondition.OPERATOR_MEMBER.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_FILTER_OPERATOR; } else if (StyleHandle.VERTICAL_ALIGN_PROP.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_VERTICAL_ALIGN; } else if (StyleHandle.TEXT_ALIGN_PROP.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_TEXT_ALIGN; } else if (MasterPageHandle.ORIENTATION_PROP.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_PAGE_ORIENTATION; } else if (MasterPageHandle.TYPE_PROP.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_PAGE_SIZE; } else if (GroupHandle.INTERVAL_PROP.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_INTERVAL; } else if (StyleHandle.PAGE_BREAK_BEFORE_PROP.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_PAGE_BREAK; } else if (StyleHandle.PAGE_BREAK_AFTER_PROP.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_PAGE_BREAK; } else if (StyleHandle.PAGE_BREAK_INSIDE_PROP.equals(property)) { unitKey = DesignChoiceConstants.CHOICE_PAGE_BREAK_INSIDE; } return DesignEngine.getMetaDataDictionary().getChoiceSet(unitKey); }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/7ca10c49a247dfe395b2e0483af9946ea07fe89b/ChoiceSetFactory.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/views/attributes/providers/ChoiceSetFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 467, 10538, 694, 336, 1639, 10538, 694, 12, 780, 1272, 13, 288, 202, 202, 780, 2836, 653, 273, 29703, 10538, 2918, 18, 22213, 11774, 67, 24325, 31, 202, 202, 430, 261, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 467, 10538, 694, 336, 1639, 10538, 694, 12, 780, 1272, 13, 288, 202, 202, 780, 2836, 653, 273, 29703, 10538, 2918, 18, 22213, 11774, 67, 24325, 31, 202, 202, 430, 261, 14...
_debugger = new DebuggerSupport(this);
public BpelProcess( QName pid, DeploymentUnit du, OProcess oprocess, Map<OPartnerLink, Endpoint> myRoleEndpointNames, Map<OPartnerLink, Endpoint> initialPartners, BpelEventListener debugger, ExpressionLanguageRuntimeRegistry expLangRuntimeRegistry, List<MessageExchangeInterceptor> localMexInterceptors) { _pid = pid; _du = du; _replacementMap = new ReplacementMapImpl(oprocess); _oprocess = oprocess; _expLangRuntimeRegistry = expLangRuntimeRegistry; _mexInterceptors.addAll(localMexInterceptors); for (OPartnerLink pl : _oprocess.getAllPartnerLinks()) { if (pl.hasMyRole()) { Endpoint endpoint = myRoleEndpointNames.get(pl); if (endpoint == null) throw new NullPointerException("No service name for plink " + pl); PartnerLinkMyRoleImpl myRole = new PartnerLinkMyRoleImpl(pl,endpoint); _myRoles.put(pl, myRole); _endpointToMyRoleMap.put(endpoint, myRole); } if (pl.hasPartnerRole()) { PartnerLinkPartnerRoleImpl partnerRole = new PartnerLinkPartnerRoleImpl(pl, initialPartners.get(pl)); _partnerRoles.put(pl, partnerRole); } } _debugger = new DebuggerSupport(this); }
47044 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47044/8459226dd803e774f89b60f6dc45cb11f5e355ea/BpelProcess.java/buggy/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 605, 84, 292, 2227, 12, 5411, 16723, 4231, 16, 2398, 8587, 2802, 9978, 16, 5411, 531, 2227, 320, 2567, 16, 2398, 1635, 32, 51, 1988, 1224, 2098, 16, 6961, 34, 3399, 2996, 3293, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 605, 84, 292, 2227, 12, 5411, 16723, 4231, 16, 2398, 8587, 2802, 9978, 16, 5411, 531, 2227, 320, 2567, 16, 2398, 1635, 32, 51, 1988, 1224, 2098, 16, 6961, 34, 3399, 2996, 3293, 15...
public void save(String id, Image image, boolean last) throws FormatException, IOException { if (image == null) { throw new FormatException("Image is null"); } BufferedImage img = null; if (cm != null) img = ImageTools.makeBuffered(image, cm); else img = ImageTools.makeBuffered(image); byte[][] byteData = ImageTools.getBytes(img); if (!id.equals(currentId)) { planesWritten = 0; currentId = id; bytesPerPixel = byteData.length; file = new File(id); raFile = new RandomAccessFile(file, "rw"); DataTools.writeString(raFile, "RIFF"); // signature saveFileSize = raFile.getFilePointer(); // Bytes 4 thru 7 contain the length of the file. This length does // not include bytes 0 thru 7. DataTools.writeInt(raFile, 0, true); // for now write 0 for size DataTools.writeString(raFile, "AVI "); // RIFF type // Write the first LIST chunk, which contains // information on data decoding DataTools.writeString(raFile, "LIST"); // CHUNK signature // Write the length of the LIST CHUNK not including the first 8 bytes // with LIST and size. Note that the end of the LIST CHUNK is followed // by JUNK. saveLIST1Size = raFile.getFilePointer(); DataTools.writeInt(raFile, (bytesPerPixel == 1) ? 1240 : 216, true); DataTools.writeString(raFile, "hdrl"); // CHUNK type DataTools.writeString(raFile, "avih"); // Write the avih sub-CHUNK // Write the length of the avih sub-CHUNK (38H) not including the // the first 8 bytes for avihSignature and the length DataTools.writeInt(raFile, 0x38, true); // dwMicroSecPerFrame - Write the microseconds per frame microSecPerFrame = (int) (1.0 / fps * 1.0e6); DataTools.writeInt(raFile, microSecPerFrame, true); // Write the maximum data rate of the file in bytes per second DataTools.writeInt(raFile, 0, true); // dwMaxBytesPerSec DataTools.writeInt(raFile, 0, true); // dwReserved1 - set to 0 // dwFlags - just set the bit for AVIF_HASINDEX DataTools.writeInt(raFile, 0x10, true); // 10H AVIF_HASINDEX: The AVI file has an idx1 chunk containing // an index at the end of the file. For good performance, all // AVI files should contain an index. // 20H AVIF_MUSTUSEINDEX: Index CHUNK, rather than the physical // ordering of the chunks in the file, must be used to determine the // order of the frames. // 100H AVIF_ISINTERLEAVED: Indicates that the AVI file is interleaved. // This is used to read data from a CD-ROM more efficiently. // 800H AVIF_TRUSTCKTYPE: USE CKType to find key frames // 10000H AVIF_WASCAPTUREFILE: The AVI file is used for capturing // real-time video. Applications should warn the user before // writing over a file with this fla set because the user // probably defragmented this file. // 20000H AVIF_COPYRIGHTED: The AVI file contains copyrighted data // and software. When, this flag is used, software should not // permit the data to be duplicated. tDim = 1; zDim = 1; yDim = img.getHeight(); xDim = img.getWidth(); xPad = 0; xMod = xDim % 4; if (xMod != 0) { xPad = 4 - xMod; xDim += xPad; } frameOffset = raFile.getFilePointer(); // dwTotalFrames - total frame number DataTools.writeInt(raFile, zDim * tDim, true); // dwInitialFrames -Initial frame for interleaved files. // Noninterleaved files should specify 0. DataTools.writeInt(raFile, 0, true); // dwStreams - number of streams in the file - here 1 video and // zero audio. DataTools.writeInt(raFile, 1, true); // dwSuggestedBufferSize - Suggested buffer size for reading the file. // Generally, this size should be large enough to contain the largest // chunk in the file. DataTools.writeInt(raFile, 0, true); // dwWidth - image width in pixels DataTools.writeInt(raFile, xDim - xPad, true); DataTools.writeInt(raFile, yDim, true); // dwHeight - height in pixels // dwReserved[4] - Microsoft says to set the following 4 values to 0. DataTools.writeInt(raFile, 0, true); DataTools.writeInt(raFile, 0, true); DataTools.writeInt(raFile, 0, true); DataTools.writeInt(raFile, 0, true); // Write the Stream line header CHUNK DataTools.writeString(raFile, "LIST"); // Write the size of the first LIST subCHUNK not including the first 8 // bytes with LIST and size. Note that saveLIST1subSize = saveLIST1Size + // 76, and that the length written to saveLIST1subSize is 76 less than // the length written to saveLIST1Size. The end of the first LIST // subCHUNK is followed by JUNK. saveLIST1subSize = raFile.getFilePointer(); DataTools.writeInt(raFile, (bytesPerPixel == 1) ? 1164 : 140 , true); DataTools.writeString(raFile, "strl"); // Write the chunk type DataTools.writeString(raFile, "strh"); // Write the strh sub-CHUNK DataTools.writeInt(raFile, 56, true); // Write length of strh sub-CHUNK // fccType - Write the type of data stream - here vids for video stream DataTools.writeString(raFile, "vids"); // Write DIB for Microsoft Device Independent Bitmap. // Note: Unfortunately, at least 3 other four character codes are // sometimes used for uncompressed AVI videos: 'RGB ', 'RAW ', 0x00000000 DataTools.writeString(raFile, "DIB "); DataTools.writeInt(raFile, 0, true); // dwFlags // 0x00000001 AVISF_DISABLED The stram data should be rendered only when // explicitly enabled. // 0x00010000 AVISF_VIDEO_PALCHANGES Indicates that a palette change is // included in the AVI file. This flag warns the playback software that // it will need to animate the palette. // dwPriority - priority of a stream type. For example, in a file with // multiple audio streams, the one with the highest priority might be the // default one. DataTools.writeInt(raFile, 0, true); // dwInitialFrames - Specifies how far audio data is skewed ahead of // video frames in interleaved files. Typically, this is about 0.75 // seconds. In interleaved files specify the number of frames in the file // prior to the initial frame of the AVI sequence. // Noninterleaved files should use zero. DataTools.writeInt(raFile, 0, true); // rate/scale = samples/second DataTools.writeInt(raFile, 1, true); // dwScale // dwRate - frame rate for video streams DataTools.writeInt(raFile, fps, true); // dwStart - this field is usually set to zero DataTools.writeInt(raFile, 0, true); // dwLength - playing time of AVI file as defined by scale and rate // Set equal to the number of frames frameOffset2 = raFile.getFilePointer(); DataTools.writeInt(raFile, tDim * zDim, true); // dwSuggestedBufferSize - Suggested buffer size for reading the stream. // Typically, this contains a value corresponding to the largest chunk // in a stream. DataTools.writeInt(raFile, 0, true); // dwQuality - encoding quality given by an integer between 0 and 10,000. // If set to -1, drivers use the default quality value. DataTools.writeInt(raFile, -1, true); // dwSampleSize # // 0 if the video frames may or may not vary in size // If 0, each sample of data(such as a video frame) must be in a separate // chunk. If nonzero, then multiple samples of data can be grouped into // a single chunk within the file. DataTools.writeInt(raFile, 0, true); // rcFrame - Specifies the destination rectangle for a text or video // stream within the movie rectangle specified by the dwWidth and // dwHeight members of the AVI main header structure. The rcFrame member // is typically used in support of multiple video streams. Set this // rectangle to the coordinates corresponding to the movie rectangle to // update the whole movie rectangle. Units for this member are pixels. // The upper-left corner of the destination rectangle is relative to the // upper-left corner of the movie rectangle. DataTools.writeShort(raFile, (short) 0, true); // left DataTools.writeShort(raFile, (short) 0, true); // top DataTools.writeShort(raFile, (short) 0, true); // right DataTools.writeShort(raFile, (short) 0, true); // bottom // Write the size of the stream format CHUNK not including the first 8 // bytes for strf and the size. Note that the end of the stream format // CHUNK is followed by strn. DataTools.writeString(raFile, "strf"); // Write the stream format chunk savestrfSize = raFile.getFilePointer(); // write the strf CHUNK size DataTools.writeInt(raFile, (bytesPerPixel == 1) ? 1068 : 44, true); // Applications should use this size to determine which BITMAPINFO header // structure is being used. This size includes this biSize field. // biSize- Write header size of BITMAPINFO header structure DataTools.writeInt(raFile, 40, true); // biWidth - image width in pixels DataTools.writeInt(raFile, xDim - xPad, true); // biHeight - image height in pixels. If height is positive, the bitmap // is a bottom up DIB and its origin is in the lower left corner. If // height is negative, the bitmap is a top-down DIB and its origin is the // upper left corner. This negative sign feature is supported by the // Windows Media Player, but it is not supported by PowerPoint. DataTools.writeInt(raFile, yDim, true); // biPlanes - number of color planes in which the data is stored // This must be set to 1. DataTools.writeShort(raFile, 1, true); int bitsPerPixel = (bytesPerPixel == 3) ? 24 : 8; // biBitCount - number of bits per pixel # // 0L for BI_RGB, uncompressed data as bitmap DataTools.writeShort(raFile, (short) bitsPerPixel, true); //writeInt(bytesPerPixel * xDim * yDim * zDim * tDim); // biSizeImage # DataTools.writeInt(raFile, 0, true); // biSizeImage # DataTools.writeInt(raFile, 0, true); // biCompression - compression type // biXPelsPerMeter - horizontal resolution in pixels DataTools.writeInt(raFile, 0, true); // biYPelsPerMeter - vertical resolution in pixels per meter DataTools.writeInt(raFile, 0, true); if (bitsPerPixel == 8) DataTools.writeInt(raFile, 256, true); // biClrUsed else DataTools.writeInt(raFile, 0, true); // biClrUsed // biClrImportant - specifies that the first x colors of the color table // are important to the DIB. If the rest of the colors are not available, // the image still retains its meaning in an acceptable manner. When this // field is set to zero, all the colors are important, or, rather, their // relative importance has not been computed. DataTools.writeInt(raFile, 0, true); // Write the LUTa.getExtents()[1] color table entries here. They are // written: blue byte, green byte, red byte, 0 byte if (bytesPerPixel == 1) { byte[] lutWrite = new byte[4 * 256]; for (int i=0; i<256; i++) { lutWrite[4*i] = (byte) i; // blue lutWrite[4*i+1] = (byte) i; // green lutWrite[4*i+2] = (byte) i; // red lutWrite[4*i+3] = 0; } raFile.write(lutWrite); } savestrnPos = raFile.getFilePointer(); raFile.seek(savestrfSize); DataTools.writeInt(raFile, (int) (savestrnPos - (savestrfSize + 4)), true); raFile.seek(savestrnPos); // Use strn to provide zero terminated text string describing the stream DataTools.writeString(raFile, "strn"); DataTools.writeInt(raFile, 16, true); // Write length of strn sub-CHUNK text = new byte[16]; text[0] = 70; // F text[1] = 105; // i text[2] = 108; // l text[3] = 101; // e text[4] = 65; // A text[5] = 118; // v text[6] = 105; // i text[7] = 32; // space text[8] = 119; // w text[9] = 114; // r text[10] = 105; // i text[11] = 116; // t text[12] = 101; // e text[13] = 32; // space text[14] = 32; // space text[15] = 0; // termination byte raFile.write(text); saveJUNKsignature = raFile.getFilePointer(); raFile.seek(saveLIST1Size); DataTools.writeInt(raFile, (int) (saveJUNKsignature - (saveLIST1Size + 4)), true); raFile.seek(saveLIST1subSize); DataTools.writeInt(raFile, (int) (saveJUNKsignature - (saveLIST1subSize + 4)), true); raFile.seek(saveJUNKsignature); // write a JUNK CHUNK for padding DataTools.writeString(raFile, "JUNK"); paddingBytes = (int) (4084 - (saveJUNKsignature + 8)); DataTools.writeInt(raFile, paddingBytes, true); for (int i=0; i<paddingBytes/2; i++) { DataTools.writeShort(raFile, (short) 0, true); } // Write the second LIST chunk, which contains the actual data DataTools.writeString(raFile, "LIST"); // Write the length of the LIST CHUNK not including the first 8 bytes // with LIST and size. The end of the second LIST CHUNK is followed by // idx1. saveLIST2Size = raFile.getFilePointer(); DataTools.writeInt(raFile, 0, true); // For now write 0 savemovi = raFile.getFilePointer(); DataTools.writeString(raFile, "movi"); // Write CHUNK type 'movi' savedbLength = new Vector(); savedcLength = new long[tDim * zDim]; dcLength = new int[tDim * zDim]; dataSignature = new byte[4]; dataSignature[0] = 48; // 0 dataSignature[1] = 48; // 0 dataSignature[2] = 100; // d dataSignature[3] = 98; // b } // Write the data. Each 3-byte triplet in the bitmap array represents the // relative intensities of blue, green, and red, respectively, for a pixel. // The color bytes are in reverse order from the Windows convention. int width = xDim - xPad; int height = byteData[0].length / width; raFile.write(dataSignature); savedbLength.add(new Long(raFile.getFilePointer())); // Write the data length DataTools.writeInt(raFile, bytesPerPixel * xDim * yDim, true); byte[] buf = new byte[byteData.length * byteData[0].length + height*xPad*byteData.length]; int offset = 0; int next = 0; for (int i=(height-1); i>=0; i--) { for (int j=0; j<width; j++) { offset = i*width + j; for (int k=(byteData.length - 1); k>=0; k--) { buf[next] = byteData[k][offset]; next++; } } next += xPad * byteData.length; } raFile.write(buf); buf = null; planesWritten++; if (last) { // Write the idx1 CHUNK // Write the 'idx1' signature idx1Pos = raFile.getFilePointer(); raFile.seek(saveLIST2Size); DataTools.writeInt(raFile, (int)(idx1Pos - (saveLIST2Size + 4)), true); raFile.seek(idx1Pos); DataTools.writeString(raFile, "idx1"); saveidx1Length = raFile.getFilePointer(); // Write the length of the idx1 CHUNK not including the idx1 signature DataTools.writeInt(raFile, 4 + (planesWritten*16), true); for (z=0; z<planesWritten; z++) { // In the ckid field write the 4 character code to identify the chunk // 00db or 00dc raFile.write(dataSignature); // Write the flags - select AVIIF_KEYFRAME if (z == 0) DataTools.writeInt(raFile, 0x10, true); else DataTools.writeInt(raFile, 0x00, true); // AVIIF_KEYFRAME 0x00000010L // The flag indicates key frames in the video sequence. // Key frames do not need previous video information to be // decompressed. // AVIIF_NOTIME 0x00000100L The CHUNK does not influence video timing // (for example a palette change CHUNK). // AVIIF_LIST 0x00000001L Marks a LIST CHUNK. // AVIIF_TWOCC 2L // AVIIF_COMPUSE 0x0FFF0000L These bits are for compressor use. DataTools.writeInt(raFile, (int) (((Long) savedbLength.get(z)).longValue() - 4 - savemovi), true); // Write the offset (relative to the 'movi' field) to the relevant // CHUNK. Write the length of the relevant CHUNK. Note that this length // is also written at savedbLength DataTools.writeInt(raFile, bytesPerPixel*xDim*yDim, true); } endPos = raFile.getFilePointer(); raFile.seek(saveFileSize); DataTools.writeInt(raFile, (int)(endPos - (saveFileSize+4)), true); raFile.seek(saveidx1Length); DataTools.writeInt(raFile, (int) (endPos - (saveidx1Length + 4)), true); // write the total number of planes raFile.seek(frameOffset); DataTools.writeInt(raFile, planesWritten, true); raFile.seek(frameOffset2); DataTools.writeInt(raFile, planesWritten, true); raFile.close(); } }
46826 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46826/f8fea5aec2de454fd84e68759019ac47d99be52a/AVIWriter.java/clean/loci/formats/AVIWriter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1923, 12, 780, 612, 16, 3421, 1316, 16, 1250, 1142, 13, 565, 1216, 4077, 503, 16, 1860, 225, 288, 565, 309, 261, 2730, 422, 446, 13, 288, 1377, 604, 394, 4077, 503, 2932, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1923, 12, 780, 612, 16, 3421, 1316, 16, 1250, 1142, 13, 565, 1216, 4077, 503, 16, 1860, 225, 288, 565, 309, 261, 2730, 422, 446, 13, 288, 1377, 604, 394, 4077, 503, 2932, 2...
while (parentNode != null && !blockParents.contains(parentNode.getClass())) {
while (parentNode != null && !blockParents.contains(parentNode.getClass())) {
private Node getFirstParentBlock(Node node) { Node parentNode = node.jjtGetParent(); Node lastNode = node; while (parentNode != null && !blockParents.contains(parentNode.getClass())) { lastNode = parentNode; parentNode = parentNode.jjtGetParent(); } if (parentNode != null && parentNode.getClass().equals(ASTIfStatement.class)) { parentNode = lastNode; } else if (parentNode != null && parentNode.getClass().equals(ASTSwitchStatement.class)) { parentNode = getSwitchParent(parentNode, lastNode); } return parentNode; }
41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/da69fd3a0e6cb8c85ce82eff2706d24ecc7b1810/ConsecutiveLiteralAppends.java/clean/pmd/src/net/sourceforge/pmd/rules/strings/ConsecutiveLiteralAppends.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 2029, 7521, 3054, 1768, 12, 907, 756, 13, 288, 202, 202, 907, 7234, 273, 756, 18, 78, 78, 88, 967, 3054, 5621, 202, 202, 907, 1142, 907, 273, 756, 31, 202, 202, 17523, 261,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 2029, 7521, 3054, 1768, 12, 907, 756, 13, 288, 202, 202, 907, 7234, 273, 756, 18, 78, 78, 88, 967, 3054, 5621, 202, 202, 907, 1142, 907, 273, 756, 31, 202, 202, 17523, 261,...
in.mark(fileLength);
pos = in.getFilePointer();
protected void initMetadata() { Hashtable ifd = ifds[0]; long data = 0; int idata = 0; double ddata = 0; short sdata = 0; try { // -- Parse standard metadata -- // determine byte order boolean little = TiffTools.isLittleEndian(ifd); in = new DataInputStream( new BufferedInputStream(new FileInputStream(currentId), 4096)); put("NewSubfileType", ifd, TiffTools.NEW_SUBFILE_TYPE); put("ImageWidth", ifd, TiffTools.IMAGE_WIDTH); put("ImageLength", ifd, TiffTools.IMAGE_LENGTH); put("BitsPerSample", ifd, TiffTools.BITS_PER_SAMPLE); int comp = TiffTools.getIFDIntValue(ifd, TiffTools.COMPRESSION, false, TiffTools.UNCOMPRESSED); String compression; switch (comp) { case 1: compression = "None"; break; case 2: compression = "CCITT Group 3 1-Dimensional Modified Huffman"; break; case 3: compression = "CCITT T.4 bilevel encoding"; break; case 4: compression = "CCITT T.6 bilevel encoding"; break; case 5: compression = "LZW"; break; case 6: compression = "JPEG"; break; case 32773: compression = "PackBits"; break; default: compression = "None"; } put("Compression", compression); int photo = TiffTools.getIFDIntValue(ifd, TiffTools.PHOTOMETRIC_INTERPRETATION, true, -1); String photoInterp; switch (photo) { case 0: photoInterp = "WhiteIsZero"; break; case 1: photoInterp = "BlackIsZero"; break; case 2: photoInterp = "RGB"; break; case 3: photoInterp = "Palette"; break; case 4: photoInterp = "Transparency Mask"; break; default: photoInterp = "unknown"; break; } put("PhotometricInterpretation", photoInterp); putInt("StripOffsets", ifd, TiffTools.STRIP_OFFSETS); putInt("SamplesPerPixel", ifd, TiffTools.SAMPLES_PER_PIXEL); putInt("StripByteCounts", ifd, TiffTools.STRIP_BYTE_COUNTS); putInt("ColorMap", ifd, TiffTools.COLOR_MAP); int planar = TiffTools.getIFDIntValue(ifd, TiffTools.PLANAR_CONFIGURATION); String planarConfig; switch (planar) { case 1: planarConfig = "Chunky"; break; case 2: planarConfig = "Planar"; break; default: planarConfig = "Chunky"; } put("PlanarConfiguration", planarConfig); int predict = TiffTools.getIFDIntValue(ifd, TiffTools.PREDICTOR); String predictor; switch (predict) { case 1: predictor = "No prediction scheme"; break; case 2: predictor = "Horizontal differencing"; break; default: predictor = "No prediction scheme"; } put("Predictor", predictor); // get Zeiss LSM-specific data // grab the TIF_CZ_LSMINFO structure, 512 bytes long short[] cz = TiffTools.getIFDShortArray(ifd, ZEISS_ID, true); int p = 0; // pointer to next byte in the structure put("MagicNumber", DataTools.bytesToLong(cz, p, 4, little)); p += 4; put("StructureSize", DataTools.bytesToInt(cz, p, little)); p += 4; put("DimensionX", DataTools.bytesToInt(cz, p, little)); p += 4; put("DimensionY", DataTools.bytesToInt(cz, p, little)); p += 4; put("DimensionZ", DataTools.bytesToInt(cz, p, little)); p += 4; int dimensionChannels = DataTools.bytesToInt(cz, p, little); put("DimensionChannels", dimensionChannels); p += 4; put("DimensionTime", DataTools.bytesToInt(cz, p, little)); p += 4; idata = DataTools.bytesToInt(cz, p, little); String type; switch (idata) { case 1: type = "8 bit unsigned integer"; break; case 2: type = "12 bit unsigned integer"; break; case 5: type = "32 bit float"; break; case 0: type = "varying data types"; break; default: type = "8 bit unsigned integer"; break; } put("DataType", type); p += 4; put("ThumbnailX", DataTools.bytesToInt(cz, p, little)); p += 4; put("ThumbnailY", DataTools.bytesToInt(cz, p, little)); p += 4; put("VoxelSizeX", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; put("VoxelSizeY", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; put("VoxelSizeZ", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8 + 24; // skip over the next 24 bytes idata = DataTools.bytesToInt(cz, p, 2, little); switch (idata) { case 0: type = "x-y-z scan"; break; case 1: type = "z scan (x-z plane)"; break; case 2: type = "line scan"; break; case 3: type = "time series x-y"; break; case 4: type = "time series x-z"; break; case 5: type = "time series 'Mean of ROIs'"; break; case 6: type = "time series x-y-z"; break; case 7: type = "spline scan"; break; case 8: type = "spline scan x-z"; break; case 9: type = "time series spline plane x-z"; break; case 10: type = "point mode"; break; default: type = "x-y-z scan"; } put("ScanType", type); p += 2; idata = DataTools.bytesToInt(cz, p, 2, little); switch (idata) { case 0: type = "no spectral scan"; break; case 1: type = "acquired with spectral scan"; break; default: type = "no spectral scan"; } put("SpectralScan", type); p += 2; data = DataTools.bytesToLong(cz, p, 4, little); switch ((int) data) { case 0: type = "original scan data"; break; case 1: type = "calculated data"; break; case 2: type = "animation"; break; default: type = "original scan data"; } put("DataType2", type); p += 4; in.mark(fileLength); // the following 4 are file offsets data = DataTools.bytesToLong(cz, p, 4, little); parseOverlays(data, "OffsetVectorOverlay", little); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); parseSubBlocks(data, "OffsetInputLut", little); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); parseSubBlocks(data, "OffsetOutputLut", little); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); // seek to this offset and read in the structure there // first we have to make sure that the structure actually exists if (data != 0) { long fp = fileLength - in.available(); in.mark(fileLength); if (fp < data) { in.skipBytes((int) (in.available() - fileLength + data)); } else { /* debug */ throw new FormatException("invalid seek"); } int blockSize = DataTools.read4SignedBytes(in, little); int numColors = DataTools.read4SignedBytes(in, little); int numNames = DataTools.read4SignedBytes(in, little); idata = DataTools.read4SignedBytes(in, little); long offset = data + idata; // will seek to this later idata = DataTools.read4SignedBytes(in, little); long offsetNames = data + idata; // will seek to this // read in the intensity value for each color in.skipBytes(idata - 16); for (int i=0; i<numColors; i++) { data = DataTools.read4UnsignedBytes(in, little); put("Intensity" + i, data); } // read in the channel names in.reset(); in.mark(fileLength); in.skipBytes((int) offsetNames); for (int i=0; i<numNames; i++) { // we want to read until we find a null char String name = ""; char[] current = new char[1]; current[0] = in.readChar(); while (current[0] != 0) { name.concat(new String(current)); current[0] = in.readChar(); } put("ChannelName" + i, name); } in.reset(); in.mark(fileLength); } p += 4; put("TimeInterval", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; // the following 8 are file offsets data = DataTools.bytesToLong(cz, p, 4, little); if (data != 0) { //in.mark((int) (dimensionChannels*4 + data + 1)); in.skipBytes((int) data); for (int i=0; i<dimensionChannels; i++) { data = DataTools.read4UnsignedBytes(in, little); put("OffsetChannelDataTypes" + i, data); } in.reset(); } p += 4; put("OffsetScanInformation", DataTools.bytesToLong(cz, p, 4, little)); p += 4; put("OffsetKsData", DataTools.bytesToLong(cz, p, 4, little)); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); if (data != 0) { //in.mark((int) (9 + data + 100*8)); in.mark(fileLength); in.skipBytes((int) data); in.skipBytes(4); int numStamps = DataTools.read4SignedBytes(in, little); for (int i=0; i<numStamps; i++) { ddata = DataTools.readDouble(in, little); put("TimeStamp" + i, ddata); } in.reset(); } p += 4; data = DataTools.bytesToLong(cz, p, 4, little); if (data != 0) { //in.mark(10); in.mark(fileLength); long numBytes = DataTools.read4UnsignedBytes(in, little); int numEvents = DataTools.read4SignedBytes(in, little); in.reset(); //in.mark((int) (data + 8 + numEvents*numBytes + 1)); in.mark(fileLength); in.skipBytes((int) data); in.skipBytes(8); for (int i=0; i<numEvents; i++) { in.skipBytes(4); ddata = DataTools.readDouble(in, little); put("Time" + i, ddata); data = DataTools.read4UnsignedBytes(in, little); put("EventType" + i, data); byte[] descr = new byte[(int) (numBytes - 16)]; in.read(descr); put("Description" + i, new String(descr)); } in.reset(); } p += 4; data = DataTools.bytesToLong(cz, p, 4, little); parseOverlays(data, "OffsetRoi", little); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); parseOverlays(data, "OffsetBleachRoi", little); p += 4; put("OffsetNextRecording", DataTools.bytesToLong(cz, p, 4, little)); p += 4; put("DisplayAspectX", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; put("DisplayAspectY", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; put("DisplayAspectZ", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; put("DisplayAspectTime", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; // the following 4 are file offsets data = DataTools.bytesToLong(cz, p, 4, little); parseOverlays(data, "OffsetMeanOfRoisOverlay", little); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); parseOverlays(data, "OffsetTopoIsolineOverlay", little); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); parseOverlays(data, "OffsetTopoProfileOverlay", little); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); parseOverlays(data, "OffsetLinescanOverlay", little); p += 4; put("ToolbarFlags", DataTools.bytesToLong(cz, p, 4, little)); // the following 2 are file offsets put("OffsetChannelWavelength", DataTools.bytesToLong(cz, p, 4, little)); p += 4; put("OffsetChannelFactors", DataTools.bytesToLong(cz, p, 4, little)); p += 4; put("ObjectiveSphereCorrection", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; // the following is a file offset put("OffsetUnmixParameters", DataTools.bytesToLong(cz, p, 4, little)); p += 4; // -- Parse OME-XML metadata -- short[] omeData = TiffTools.getIFDShortArray(ifd, ZEISS_ID, true); int magicNum = DataTools.bytesToInt(omeData, 0, little);// int photoInterp2 = TiffTools.getIFDIntValue(ifd,// TiffTools.PHOTOMETRIC_INTERPRETATION, true, 0);// String photo2;// switch (photoInterp2) {// case 0: photo2 = "monochrome"; break;// case 1: photo2 = "monochrome"; break;// case 2: photo2 = "RGB"; break;// case 3: photo2 = "monochrome"; break;// case 4: photo2 = "RGB"; break;// default: photo2 = "monochrome";// }// OMETools.setAttribute(ome,// "ChannelInfo", "PhotometricInterpretation", photo2); int imageWidth = DataTools.bytesToInt(omeData, 8, little); int imageLength = DataTools.bytesToInt(omeData, 12, little); int zSize = DataTools.bytesToInt(omeData, 16, little); int cSize = DataTools.bytesToInt(omeData, 20, little); int tSize = DataTools.bytesToInt(omeData, 24, little); int pixel = DataTools.bytesToInt(omeData, 28, little); String pixelType; switch (pixel) { case 1: pixelType = "Uint8"; break; case 2: pixelType = "Uint16"; break; case 5: pixelType = "float"; break; default: pixelType = "Uint8"; } short scanType = DataTools.bytesToShort(omeData, 88, little); String dimOrder; switch ((int) scanType) { case 0: dimOrder = "XYZCT"; break; case 1: dimOrder = "XYZCT"; break; case 3: dimOrder = "XYTCZ"; break; case 4: dimOrder = "XYZTC"; break; case 5: dimOrder = "XYTCZ"; break; case 6: dimOrder = "XYZTC"; break; case 7: dimOrder = "XYCTZ"; break; case 8: dimOrder = "XYCZT"; break; case 9: dimOrder = "XYTCZ"; break; default: dimOrder = "XYZCT"; } OMETools.setPixels(ome, new Integer(imageWidth), // SizeX new Integer(imageLength), // SizeY new Integer(zSize), // SizeZ new Integer(cSize), // SizeC new Integer(tSize), // SizeT pixelType, // PixelType null, // BigEndian dimOrder); // DimensionOrder in.reset(); in.mark(fileLength); } catch (FormatException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
49800 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49800/a4d6fe10f79636baabec0b085328df83170bca33/ZeissLSMReader.java/buggy/loci/formats/ZeissLSMReader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 1208, 2277, 1435, 288, 565, 18559, 309, 72, 273, 309, 2377, 63, 20, 15533, 565, 1525, 501, 273, 374, 31, 565, 509, 612, 396, 273, 374, 31, 565, 1645, 302, 892, 273, 374, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 1208, 2277, 1435, 288, 565, 18559, 309, 72, 273, 309, 2377, 63, 20, 15533, 565, 1525, 501, 273, 374, 31, 565, 509, 612, 396, 273, 374, 31, 565, 1645, 302, 892, 273, 374, 31...
" " protected Object a;
" " protected Object a;
public void testClassReplacement() { boolean formatAccordingToStyle = options.isToReformatAccordingToStyle(); options.setToReformatAccordingToStyle(true); String s1 = "class A { public void b() {} }"; String s2 = "class 'a { 'Other* }"; String s3 = "class $a$New { Logger LOG; $Other$ }"; String expectedResult = " class ANew {\n" + " Logger LOG;\n\n" + " public void b() {\n" + " }\n" + " }"; String actualResult; actualResult = replacer.testReplace(s1,s2,s3,options); assertEquals( "Basic class replacement", expectedResult, actualResult ); String s4 = "class A { class C {} public void b() {} int f; }"; String s5 = "class 'a { 'Other* }"; String s6 = "class $a$ { Logger LOG; $Other$ }"; String expectedResult2 = " class A {\n" + " Logger LOG;\n\n" + " class C {\n" + " }\n\n" + " public void b() {\n" + " }\n\n" + " int f;\n" + " }"; actualResult = replacer.testReplace(s4,s5,s6,options); assertEquals( "Order of members in class replacement", expectedResult2, actualResult ); String s7 = "class A extends B { int c; void b() {} { a = 1; } }"; String s8 = "class 'A extends B { 'Other* }"; String s9 = "class $A$ extends B2 { $Other$ }"; String expectedResult3 = " class A extends B2 {\n" + " int c;\n\n" + " void b() {\n" + " }\n\n" + " {\n" + " a = 1;\n" + " }\n" + " }"; actualResult = replacer.testReplace(s7,s8,s9,options); assertEquals("Unsupported pattern exception",actualResult,expectedResult3); options.setToReformatAccordingToStyle(formatAccordingToStyle); String s10 = "/** @example */\n" + "class A {\n" + " class C {}\n" + " public void b() {}\n" + " int f;\n" + "}"; String s11 = "class 'a { 'Other* }"; String s12 = "public class $a$ {\n" + " $Other$\n" + "}"; String expectedResult4 = "/** @example */\n" + " public class A {\n" + " class C {}\n" + " public void b() {}\n" + " int f;\n" + " }"; actualResult = replacer.testReplace(s10,s11,s12,options); assertEquals("Make class public",actualResult,expectedResult4); String s13 = "class CustomThread extends Thread {\n" + "public CustomThread(InputStream in, OutputStream out, boolean closeOutOnExit) {\n" + " super(CustomThreadGroup.getThreadGroup(), \"CustomThread\");\n" + " setDaemon(true);\n" + " if (in instanceof BufferedInputStream) {\n" + " bis = (BufferedInputStream)in;\n" + " } else {\n" + " bis = new BufferedInputStream(in);\n" + " }\n" + " this.out = out;\n" + " this.closeOutOnExit = closeOutOnExit;\n" + "}\n" + "}"; String s14 = "class 'Class extends Thread {\n" + " 'Class('ParameterType* 'ParameterName*) {\n" + "\t super (CustomThreadGroup.getThreadGroup(), 'superarg* );\n" + " 'Statement*;\n" + " }\n" + "}"; String s15 = "class $Class$ extends CustomThread {\n" + " $Class$($ParameterType$ $ParameterName$) {\n" + "\t super($superarg$);\n" + " $Statement$;\n" + " }\n" + "}"; String expectedResult5 = " class CustomThread extends CustomThread {\n" + " CustomThread(InputStream in, OutputStream out,boolean closeOutOnExit ) {\n" + " super(\"CustomThread\");\n" + " setDaemon(true);\n" + " if (in instanceof BufferedInputStream) {\n" + " bis = (BufferedInputStream)in;\n" + " } else {\n" + " bis = new BufferedInputStream(in);\n" + " }\n" + " this.out = out;\n" + " this.closeOutOnExit = closeOutOnExit;\n" + " }\n" + " }"; actualResult = replacer.testReplace(s13,s14,s15,options); assertEquals("Constructor replacement",expectedResult5,actualResult); String s16 = "public class A {}\n" + "final class B {}"; String s17 = "class 'A { 'Other* }"; String s17_2 = "class 'A { private Log log = LogFactory.createLog(); 'Other* }"; String s18 = "class $A$ { private Log log = LogFactory.createLog(); $Other$ }"; String s18_2 = "class $A$ { $Other$ }"; actualResult = replacer.testReplace(s16,s17,s18,options); String expectedResult6 = "public class A { private Log log = LogFactory.createLog(); }\n" + "final class B { private Log log = LogFactory.createLog(); }"; assertEquals("Modifier list for class",expectedResult6,actualResult); actualResult = replacer.testReplace(actualResult,s17_2,s18_2,options); String expectedResult7 = "public class A { }\n" + "final class B { }"; assertEquals("Removing field",expectedResult7,actualResult); String s19 = "public class A extends Object implements Cloneable {}\n"; String s20 = "class 'A { 'Other* }"; String s21 = "class $A$ { private Log log = LogFactory.createLog(); $Other$ }"; actualResult = replacer.testReplace(s19,s20,s21,options); String expectedResult8 = "public class A extends Object implements Cloneable { private Log log = LogFactory.createLog(); }\n"; assertEquals("Extends / implements list for class",expectedResult8,actualResult); String s22 = "public class A<T> { int Afield; }\n"; String s23 = "class 'A { 'Other* }"; String s24 = "class $A$ { private Log log = LogFactory.createLog(); $Other$ }"; actualResult = replacer.testReplace(s22,s23,s24,options); String expectedResult9 = "public class A<T> { private Log log = LogFactory.createLog(); int Afield; }\n"; assertEquals("Type parameters for the class",expectedResult9,actualResult); String s25 = "class A {\n" + " // comment before\n" + " protected short a; // comment after\n" + "}"; String s26 = "short a;"; String s27 = "Object a;"; String expectedResult10 = "class A {\n" + " // comment before\n" + " protected Object a;// comment after\n" + "}"; actualResult = replacer.testReplace(s25,s26,s27,options); assertEquals( "Replacing dcl with saving access modifiers", expectedResult10, actualResult ); String s28 = "aaa"; String s29 = "class 'Class {\n" + " 'Class('ParameterType 'ParameterName) {\n" + " 'Class('ParameterName);\n" + " }\n" + "}"; String s30 = "class $Class$ {\n" + " $Class$($ParameterType$ $ParameterName$) {\n" + " this($ParameterName$);\n" + " }\n" + "}"; String expectedResult11 = "aaa"; actualResult = replacer.testReplace(s28,s29,s30,options); assertEquals( "Complex class replacement", expectedResult11, actualResult ); String s31 = "class A {\n" + " int a; // comment\n" + " char b;\n" + " int c; // comment2\n" + "}"; String s32 = "'Type 'Variable = 'Value?; //'Comment"; String s33 = "/**$Comment$*/\n" + "$Type$ $Variable$ = $Value$;"; String expectedResult12 = "class A {\n" + " /** comment*/\n" + " int a ;\n" + " char b;\n" + " /** comment2*/\n" + " int c ;\n" + "}"; actualResult = replacer.testReplace(s31,s32,s33,options); assertEquals( "Replacing comments with javadoc for fields", expectedResult12, actualResult ); String s34 = "/**\n" + " * This interface stores XXX\n" + " * <p/>\n" + " */\n" + "public interface X {\n" + " public static final String HEADER = Headers.HEADER;\n" + "\n" + "}"; String s35 = "public interface 'MessageInterface {\n" + " public static final String 'X = 'VALUE;\n" + " 'blah*" + "}"; String s36 = "public interface $MessageInterface$ {\n" + " public static final String HEADER = $VALUE$;\n" + " $blah$\n" + "}"; String expectedResult13 = "/**\n" + " * This interface stores XXX\n" + " * <p/>\n" + " */\n" + "public interface X {\n" + " public static final String HEADER = Headers.HEADER;\n" + "\n" + "}"; actualResult = replacer.testReplace(s34,s35,s36,options, true); assertEquals( "Replacing interface with interface, saving comments properly", expectedResult13, actualResult ); }
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/9c2e64e4fd3d0bb80e77f27e3910e8d2ced2234e/StructuralReplaceTest.java/clean/plugins/structuralsearch/testSource/com/intellij/structuralsearch/StructuralReplaceTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1842, 797, 15201, 1435, 288, 565, 1250, 740, 9988, 4643, 774, 2885, 273, 702, 18, 291, 774, 426, 2139, 9988, 4643, 774, 2885, 5621, 565, 702, 18, 542, 774, 426, 2139, 9988, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1842, 797, 15201, 1435, 288, 565, 1250, 740, 9988, 4643, 774, 2885, 273, 702, 18, 291, 774, 426, 2139, 9988, 4643, 774, 2885, 5621, 565, 702, 18, 542, 774, 426, 2139, 9988, 4...
e = new UnconditionalDerefFalsePositive( (UnconditionalDerefFalsePositive) super.clone());
e = (UnconditionalDerefFalsePositive) super.clone();
public Object clone() { UnconditionalDerefFalsePositive e = null; try { e = new UnconditionalDerefFalsePositive( (UnconditionalDerefFalsePositive) super.clone()); } catch (Exception ex) { ex.printStackTrace(); } e.x = x + 1; return e; }
7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/5ae74ccec509a14ff00b28e878cbb5864979edf3/UnconditionalDerefFalsePositive.java/buggy/findbugsTestCases/src/java/deref/UnconditionalDerefFalsePositive.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1033, 3236, 1435, 288, 202, 202, 984, 22019, 40, 822, 74, 8381, 14900, 425, 273, 446, 31, 202, 202, 698, 288, 1082, 202, 73, 273, 394, 1351, 22019, 40, 822, 74, 8381, 14900, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1033, 3236, 1435, 288, 202, 202, 984, 22019, 40, 822, 74, 8381, 14900, 425, 273, 446, 31, 202, 202, 698, 288, 1082, 202, 73, 273, 394, 1351, 22019, 40, 822, 74, 8381, 14900, ...
obj.functionName = "";
static void init(Context cx, Scriptable scope, boolean sealed) { BaseFunction obj = new BaseFunction(); obj.functionName = ""; obj.isPrototypePropertyImmune = true; obj.exportAsJSClass(MAX_PROTOTYPE_ID, scope, sealed); }
51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/bcf9f007878d03ecebb8f7a68970dc86c51376f1/BaseFunction.java/clean/js/rhino/src/org/mozilla/javascript/BaseFunction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 918, 1208, 12, 1042, 9494, 16, 22780, 2146, 16, 1250, 695, 18931, 13, 565, 288, 3639, 3360, 2083, 1081, 273, 394, 3360, 2083, 5621, 9079, 1081, 18, 291, 15846, 1396, 1170, 81, 7556, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 918, 1208, 12, 1042, 9494, 16, 22780, 2146, 16, 1250, 695, 18931, 13, 565, 288, 3639, 3360, 2083, 1081, 273, 394, 3360, 2083, 5621, 9079, 1081, 18, 291, 15846, 1396, 1170, 81, 7556, ...
Vector allEvents = new Vector(logList.size());
Vector<Vector> allEvents = new Vector<Vector>(logList.size());
public Vector generateRows(Object settings){ List<VirusLog> logList = (List<VirusLog>) settings; Vector allEvents = new Vector(logList.size()); Vector event; for( VirusLog log : logList ){ event = new Vector(7); event.add( log.getCreateDate() ); event.add( log.getAction() ); event.add( log.getClientAddr() + ":" + ((Integer)log.getClientPort()).toString() ); event.add( log.getTraffic() ); event.add( log.getReason() ); event.add( log.getDirection().getDirectionName() ); event.add( log.getServerAddr() + ":" + ((Integer)log.getServerPort()).toString() ); allEvents.add( event ); } return allEvents; }
49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/ff039aa0a88558bd57c3af5130d7d059b60c42c3/LogJPanel.java/clean/tran/virus/main/com/metavize/tran/virus/gui/LogJPanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 5589, 2103, 4300, 12, 921, 1947, 15329, 202, 565, 987, 32, 58, 481, 407, 1343, 34, 613, 682, 273, 261, 682, 32, 58, 481, 407, 1343, 23429, 1947, 31, 202, 565, 5589, 777, 378...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 5589, 2103, 4300, 12, 921, 1947, 15329, 202, 565, 987, 32, 58, 481, 407, 1343, 34, 613, 682, 273, 261, 682, 32, 58, 481, 407, 1343, 23429, 1947, 31, 202, 565, 5589, 777, 378...
private static byte longCmp(OPT_Instruction s) {
private static DefUseEffect longCmp(OPT_Instruction s) {
private static byte longCmp(OPT_Instruction s) { if (CF_LONG) { OPT_Operand op1 = Binary.getVal1(s); OPT_Operand op2 = Binary.getVal2(s); if (op1.similar(op2)) { // THE SAME OPERAND: op1 == op2 Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(0)); return MOVE_FOLDED; } if (op2.isLongConstant()) { if (op1.isLongConstant()) { // BOTH CONSTANTS: FOLD long val1 = op1.asLongConstant().value; long val2 = op2.asLongConstant().value; int result = (val1 > val2) ? 1 : ((val1 == val2) ? 0 : -1); Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(result)); return MOVE_FOLDED; } } } return UNCHANGED; }
4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/582eb14323a5e74a2c99b6035e34aa59e229d896/OPT_Simplifier.java/clean/rvm/src/com/ibm/jikesrvm/opt/OPT_Simplifier.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 760, 10922, 3727, 12477, 1525, 31832, 12, 15620, 67, 11983, 272, 13, 288, 282, 309, 261, 8955, 67, 14639, 13, 288, 1377, 16456, 67, 10265, 1061, 21, 273, 7896, 18, 588, 3053, 21, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 760, 10922, 3727, 12477, 1525, 31832, 12, 15620, 67, 11983, 272, 13, 288, 282, 309, 261, 8955, 67, 14639, 13, 288, 1377, 16456, 67, 10265, 1061, 21, 273, 7896, 18, 588, 3053, 21, ...
public boolean hasPermission( NextInterceptor next, Collection userGroupNames, Name userName, AuthenticationLevel authenticationLevel, Name entryName, String attrId, Object attrValue, Collection microOperations, Collection aciTuples, Attributes entry ) throws NamingException { if( entryName == null ) { throw new NullPointerException( "entryName" ); } Attributes userEntry = next.lookup( userName ); // Determine the scope of the requested operation. OperationScope scope; if( attrId == null ) { scope = OperationScope.ENTRY; } else if( attrValue == null ) { scope = OperationScope.ATTRIBUTE_TYPE; } else { scope = OperationScope.ATTRIBUTE_TYPE_AND_VALUE; } // Clone aciTuples in case it is unmodifiable. aciTuples = new ArrayList( aciTuples ); // Filter unrelated and invalid tuples for( int i = 0; i < filters.length; i++ ) { ACITupleFilter filter = filters[ i ]; aciTuples = filter.filter( aciTuples, scope, next, userGroupNames, userName, userEntry, authenticationLevel, entryName, attrId, attrValue, entry, microOperations ); } // Deny access if no tuples left. if( aciTuples.size() == 0 ) { return false; } // Grant access if and only if one or more tuples remain and // all grant access. Otherwise deny access. for( Iterator i = aciTuples.iterator(); i.hasNext(); ) { ACITuple tuple = ( ACITuple ) i.next(); if( !tuple.isGrant() ) { return false; } } return true; }
10677 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10677/b94e3a1b9e6127d9b400a876f96637dc4a790ad4/ACDFEngine.java/buggy/core/src/main/java/org/apache/ldap/server/authz/support/ACDFEngine.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 26097, 12, 5411, 4804, 10281, 1024, 16, 2398, 2200, 26205, 1557, 16, 1770, 12065, 16, 8665, 2355, 5107, 2355, 16, 5411, 1770, 1241, 461, 16, 514, 1604, 548, 16, 1033, 21676, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 26097, 12, 5411, 4804, 10281, 1024, 16, 2398, 2200, 26205, 1557, 16, 1770, 12065, 16, 8665, 2355, 5107, 2355, 16, 5411, 1770, 1241, 461, 16, 514, 1604, 548, 16, 1033, 21676, 1...
if(logMINOR) Logger.minor(this, "Sending PK: "+key+" "+key.writeAsField());
if(logMINOR) Logger.minor(this, "Sending PK: "+key+ ' ' +key.writeAsField());
public void run() { int status = RequestSender.NOT_FINISHED; RequestSender rs = null; try { if(logMINOR) Logger.minor(this, "Handling a request: "+uid); htl = source.decrementHTL(htl); Message accepted = DMT.createFNPAccepted(uid); source.send(accepted, null); Object o = node.makeRequestSender(key, htl, uid, source, closestLoc, resetClosestLoc, false, true, false); if(o instanceof KeyBlock) { KeyBlock block = (KeyBlock) o; Message df = createDataFound(block); source.send(df, null); if(key instanceof NodeSSK) { if(needsPubKey) { DSAPublicKey key = ((NodeSSK)block.getKey()).getPubKey(); Message pk = DMT.createFNPSSKPubKey(uid, key.asBytes()); if(logMINOR) Logger.minor(this, "Sending PK: "+key+" "+key.writeAsField()); source.send(pk, null); } status = RequestSender.SUCCESS; // for byte logging } if(block instanceof CHKBlock) { PartiallyReceivedBlock prb = new PartiallyReceivedBlock(Node.PACKETS_IN_BLOCK, Node.PACKET_SIZE, block.getRawData()); BlockTransmitter bt = new BlockTransmitter(node.usm, source, uid, prb, node.outputThrottle, this); if(bt.send()) status = RequestSender.SUCCESS; // for byte logging } return; } rs = (RequestSender) o; if(rs == null) { // ran out of htl? Message dnf = DMT.createFNPDataNotFound(uid); source.send(dnf, null); status = RequestSender.DATA_NOT_FOUND; // for byte logging return; } boolean shouldHaveStartedTransfer = false; while(true) { if(rs.waitUntilStatusChange()) { // Forward RejectedOverload Message msg = DMT.createFNPRejectedOverload(uid, false); source.sendAsync(msg, null, 0, null); } if(rs.transferStarted()) { // Is a CHK. Message df = DMT.createFNPCHKDataFound(uid, rs.getHeaders()); source.send(df, null); PartiallyReceivedBlock prb = rs.getPRB(); BlockTransmitter bt = new BlockTransmitter(node.usm, source, uid, prb, node.outputThrottle, this); if(!bt.send()){ finalTransferFailed = true; } return; } status = rs.getStatus(); if(status == RequestSender.NOT_FINISHED) continue; switch(status) { case RequestSender.NOT_FINISHED: case RequestSender.DATA_NOT_FOUND: Message dnf = DMT.createFNPDataNotFound(uid); source.send(dnf, this); return; case RequestSender.GENERATED_REJECTED_OVERLOAD: case RequestSender.TIMED_OUT: case RequestSender.INTERNAL_ERROR: // Locally generated. // Propagate back to source who needs to reduce send rate Message reject = DMT.createFNPRejectedOverload(uid, true); source.send(reject, this); return; case RequestSender.ROUTE_NOT_FOUND: // Tell source Message rnf = DMT.createFNPRouteNotFound(uid, rs.getHTL()); source.send(rnf, this); return; case RequestSender.SUCCESS: if(key instanceof NodeSSK) { Message df = DMT.createFNPSSKDataFound(uid, rs.getHeaders(), rs.getSSKData()); source.send(df, this); node.sentPayload(rs.getSSKData().length); if(needsPubKey) { Message pk = DMT.createFNPSSKPubKey(uid, ((NodeSSK)rs.getSSKBlock().getKey()).getPubKey().asBytes()); source.send(pk, this); } } else if(!rs.transferStarted()) { Logger.error(this, "Status is SUCCESS but we never started a transfer on "+uid); } return; case RequestSender.VERIFY_FAILURE: if(key instanceof NodeCHK) { if(shouldHaveStartedTransfer) throw new IllegalStateException("Got status code "+status+" but transfer not started"); shouldHaveStartedTransfer = true; continue; // should have started transfer } reject = DMT.createFNPRejectedOverload(uid, true); source.send(reject, this); return; case RequestSender.TRANSFER_FAILED: if(key instanceof NodeCHK) { if(shouldHaveStartedTransfer) throw new IllegalStateException("Got status code "+status+" but transfer not started"); shouldHaveStartedTransfer = true; continue; // should have started transfer } // Other side knows, right? return; default: throw new IllegalStateException("Unknown status code "+status); } } } catch (Throwable t) { Logger.error(this, "Caught "+t, t); } finally { node.unlockUID(uid); if((!finalTransferFailed) && rs != null && status != RequestSender.TIMED_OUT && status != RequestSender.GENERATED_REJECTED_OVERLOAD && status != RequestSender.INTERNAL_ERROR) { int sent = rs.getTotalSentBytes() + sentBytes; int rcvd = rs.getTotalReceivedBytes() + receivedBytes; if(key instanceof NodeSSK) { if(logMINOR) Logger.minor(this, "Remote SSK fetch cost "+sent+"/"+rcvd+" bytes ("+status+")"); node.remoteSskFetchBytesSentAverage.report(sent); node.remoteSskFetchBytesReceivedAverage.report(rcvd); } else { if(logMINOR) Logger.minor(this, "Remote CHK fetch cost "+sent+"/"+rcvd+" bytes ("+status+")"); node.remoteChkFetchBytesSentAverage.report(sent); node.remoteChkFetchBytesReceivedAverage.report(rcvd); } } } }
52909 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52909/62fd59041864b4ed1f43adc676de6bfb5ea977f3/RequestHandler.java/buggy/src/freenet/node/RequestHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1086, 1435, 288, 377, 202, 474, 1267, 273, 1567, 12021, 18, 4400, 67, 23259, 2056, 31, 377, 202, 691, 12021, 3597, 273, 446, 31, 3639, 775, 288, 3639, 309, 12, 1330, 6236, 91...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1086, 1435, 288, 377, 202, 474, 1267, 273, 1567, 12021, 18, 4400, 67, 23259, 2056, 31, 377, 202, 691, 12021, 3597, 273, 446, 31, 3639, 775, 288, 3639, 309, 12, 1330, 6236, 91...
super(position);
super(position, NodeTypes.RETRYNODE);
public RetryNode(ISourcePosition position) { super(position); }
46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/6e15491217631472c05c6928672f9c7064a978b3/RetryNode.java/buggy/src/org/jruby/ast/RetryNode.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 9954, 907, 12, 45, 1830, 2555, 1754, 13, 288, 3639, 2240, 12, 3276, 16, 2029, 2016, 18, 24240, 8744, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 9954, 907, 12, 45, 1830, 2555, 1754, 13, 288, 3639, 2240, 12, 3276, 16, 2029, 2016, 18, 24240, 8744, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
getClassFolder( ) + "/input/CreateDesignFromTemplateTest.xml", design.getFileName( ) );
getClassFolder( ) + "/input/CreateDesignFromTemplateTest.xml", design.getFileName( ) );
public void testCreateDesignFromTemplate( ) throws DesignFileException { DesignSession session = new DesignSession( null ); design = session.createDesignFromTemplate( getClassFolder( ) + "/input/CreateDesignFromTemplateTest.xml" ); //$NON-NLS-1$ Label label = (Label) design.findElement( "Label1" ); //$NON-NLS-1$ assertNotNull( label ); assertEquals( "Test", label.getProperty( design.getRoot( ), "text" ) ); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals( getClassFolder( ) + "/input/CreateDesignFromTemplateTest.xml", design.getFileName( ) );//$NON-NLS-1$ TextItem text = (TextItem) design.findElement( "NewText" ); //$NON-NLS-1$ assertEquals( "blue", text.getProperty( design.getRoot( ), "color" ) ); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals( "\"Arial\"", text.getProperty( design.getRoot( ), "fontFamily" ) ); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals( "white", text.getProperty( design.getRoot( ), "backgroundColor" ) ); //$NON-NLS-1$ //$NON-NLS-2$ assertEquals( "hello world", text.getProperty( design.getRoot( ), "content" ) ); //$NON-NLS-1$ //$NON-NLS-2$ List libs = design.getLibraries( ); assertEquals( 1, libs.size( ) ); Library lib = (Library)libs.get( 0 ); assertEquals( "LibraryForCreateDesignFromTemplateTest" , lib.getNamespace( ));//$NON-NLS-1$ }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/d3d717b342078d1f9dfce85bfecc1cb5d3ec367c/DesignSessionTest.java/clean/model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/core/DesignSessionTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 1684, 15478, 1265, 2283, 12, 262, 1216, 29703, 812, 503, 202, 95, 202, 202, 15478, 2157, 1339, 273, 394, 29703, 2157, 12, 446, 11272, 202, 202, 16934, 273, 1339, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 1684, 15478, 1265, 2283, 12, 262, 1216, 29703, 812, 503, 202, 95, 202, 202, 15478, 2157, 1339, 273, 394, 29703, 2157, 12, 446, 11272, 202, 202, 16934, 273, 1339, 18, ...
public Interpreter assertOutput(final String code, final String log, final String expect) throws Exception {
public Interpreter assertOutput(final Properties properties, final String code, final String log, final String expect) throws InterpreterException {
public Interpreter assertOutput(final String code, final String log, final String expect) throws Exception { return assertOutput(getProps(), code, log, expect); }
9123 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9123/5ec62392289f6f7c680c48091a0b363b00cee548/ExTeXLauncher.java/buggy/ExTeX/src/test/de/dante/test/ExTeXLauncher.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 5294, 11599, 1815, 1447, 12, 6385, 514, 981, 16, 727, 514, 613, 16, 5411, 727, 514, 4489, 13, 1216, 1185, 288, 3639, 327, 1815, 1447, 12, 588, 5047, 9334, 981, 16, 613, 16, 4489, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 5294, 11599, 1815, 1447, 12, 6385, 514, 981, 16, 727, 514, 613, 16, 5411, 727, 514, 4489, 13, 1216, 1185, 288, 3639, 327, 1815, 1447, 12, 588, 5047, 9334, 981, 16, 613, 16, 4489, ...
public Environment(ScriptableObject scope) { setParentScope(scope); Object ctor = ScriptRuntime.getTopLevelProp(scope, "Environment"); if (ctor != null && ctor instanceof Scriptable) { Scriptable s = (Scriptable) ctor; setPrototype((Scriptable) s.get("prototype", s)); }
public Environment() { if (thePrototypeInstance == null) thePrototypeInstance = this;
public Environment(ScriptableObject scope) { setParentScope(scope); Object ctor = ScriptRuntime.getTopLevelProp(scope, "Environment"); if (ctor != null && ctor instanceof Scriptable) { Scriptable s = (Scriptable) ctor; setPrototype((Scriptable) s.get("prototype", s)); } }
12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/69072d60f2dff69483df81af0b7c4377af80f832/Environment.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/Environment.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 7518, 12, 3651, 429, 921, 2146, 13, 288, 3639, 12548, 3876, 12, 4887, 1769, 3639, 1033, 15120, 273, 7739, 5576, 18, 588, 27046, 4658, 12, 4887, 16, 315, 5494, 8863, 3639, 309, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 7518, 12, 3651, 429, 921, 2146, 13, 288, 3639, 12548, 3876, 12, 4887, 1769, 3639, 1033, 15120, 273, 7739, 5576, 18, 588, 27046, 4658, 12, 4887, 16, 315, 5494, 8863, 3639, 309, 261, ...
typeValue.setText(IDEResourceInfoUtils.getTypeString(resource, getContentDescription(resource)));
typeValue.setText(IDEResourceInfoUtils.getTypeString(resource, getContentDescription(resource)));
private Composite createBasicInfoGroup(Composite parent, IResource resource) { Font font = parent.getFont(); Composite basicInfoComposite = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); layout.numColumns = 2; layout.marginWidth = 0; layout.marginHeight = 0; basicInfoComposite.setLayout(layout); GridData data = new GridData(); data.verticalAlignment = GridData.FILL; data.horizontalAlignment = GridData.FILL; basicInfoComposite.setLayoutData(data); basicInfoComposite.setFont(font); // The group for path Label pathLabel = new Label(basicInfoComposite, SWT.NONE); pathLabel.setText(PATH_TITLE); GridData gd = new GridData(); gd.verticalAlignment = SWT.TOP; pathLabel.setLayoutData(gd); pathLabel.setFont(font); // path value label Text pathValueText = new Text(basicInfoComposite, SWT.WRAP | SWT.READ_ONLY); String pathString = TextProcessor.process(resource.getFullPath().toString()); pathValueText.setText(pathString); gd = new GridData(); gd.widthHint = convertWidthInCharsToPixels(MAX_VALUE_WIDTH); gd.grabExcessHorizontalSpace = true; gd.horizontalAlignment = GridData.FILL; pathValueText.setLayoutData(gd); pathValueText.setFont(font); pathValueText.setBackground(pathValueText.getDisplay().getSystemColor( SWT.COLOR_WIDGET_BACKGROUND)); // The group for types Label typeTitle = new Label(basicInfoComposite, SWT.LEFT); typeTitle.setText(TYPE_TITLE); typeTitle.setFont(font); Text typeValue = new Text(basicInfoComposite, SWT.LEFT | SWT.READ_ONLY); typeValue.setText(IDEResourceInfoUtils.getTypeString(resource, getContentDescription(resource))); typeValue.setBackground(typeValue.getDisplay().getSystemColor( SWT.COLOR_WIDGET_BACKGROUND)); typeValue.setFont(font); // The group for location Label locationTitle = new Label(basicInfoComposite, SWT.LEFT); locationTitle.setText(LOCATION_TITLE); gd = new GridData(); gd.verticalAlignment = SWT.TOP; locationTitle.setLayoutData(gd); locationTitle.setFont(font); Text locationValue = new Text(basicInfoComposite, SWT.WRAP | SWT.READ_ONLY); String locationStr = TextProcessor.process(IDEResourceInfoUtils.getLocationText(resource)); locationValue.setText(locationStr); gd = new GridData(); gd.widthHint = convertWidthInCharsToPixels(MAX_VALUE_WIDTH); gd.grabExcessHorizontalSpace = true; gd.horizontalAlignment = GridData.FILL; locationValue.setLayoutData(gd); locationValue.setFont(font); locationValue.setBackground(locationValue.getDisplay().getSystemColor( SWT.COLOR_WIDGET_BACKGROUND)); if (isPathVariable(resource)) { Label resolvedLocationTitle = new Label(basicInfoComposite, SWT.LEFT); resolvedLocationTitle.setText(RESOLVED_LOCATION_TITLE); gd = new GridData(); gd.verticalAlignment = SWT.TOP; resolvedLocationTitle.setLayoutData(gd); resolvedLocationTitle.setFont(font); Text resolvedLocationValue = new Text(basicInfoComposite, SWT.WRAP | SWT.READ_ONLY); resolvedLocationValue.setText(IDEResourceInfoUtils.getResolvedLocationText(resource)); gd = new GridData(); gd.widthHint = convertWidthInCharsToPixels(MAX_VALUE_WIDTH); gd.grabExcessHorizontalSpace = true; gd.horizontalAlignment = GridData.FILL; resolvedLocationValue.setLayoutData(gd); resolvedLocationValue.setFont(font); resolvedLocationValue.setBackground(resolvedLocationValue .getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); } if (resource.getType() == IResource.FILE) { // The group for size Label sizeTitle = new Label(basicInfoComposite, SWT.LEFT); sizeTitle.setText(SIZE_TITLE); sizeTitle.setFont(font); Text sizeValue = new Text(basicInfoComposite, SWT.LEFT | SWT.READ_ONLY); sizeValue.setText(IDEResourceInfoUtils.getSizeString(resource)); gd = new GridData(); gd.widthHint = convertWidthInCharsToPixels(MAX_VALUE_WIDTH); gd.grabExcessHorizontalSpace = true; gd.horizontalAlignment = GridData.FILL; sizeValue.setLayoutData(gd); sizeValue.setFont(font); sizeValue.setBackground(sizeValue.getDisplay().getSystemColor( SWT.COLOR_WIDGET_BACKGROUND)); } return basicInfoComposite; }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/6abfa24dd969432c41f9405478a223bca63d29a5/ResourceInfoPage.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 14728, 752, 8252, 966, 1114, 12, 9400, 982, 16, 467, 1420, 1058, 13, 288, 202, 202, 5711, 3512, 273, 982, 18, 588, 5711, 5621, 202, 202, 9400, 5337, 966, 9400, 273, 394, 1472...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 14728, 752, 8252, 966, 1114, 12, 9400, 982, 16, 467, 1420, 1058, 13, 288, 202, 202, 5711, 3512, 273, 982, 18, 588, 5711, 5621, 202, 202, 9400, 5337, 966, 9400, 273, 394, 1472...
if (inputState.guessing==0) { astFactory.addASTChild(currentAST, returnAST); }
astFactory.addASTChild(currentAST, returnAST);
public final void relationalExpression() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST relationalExpression_AST = null; shiftExpression(); if (inputState.guessing==0) { astFactory.addASTChild(currentAST, returnAST); } { switch ( LA(1)) { case EOF: case RBRACK: case QUESTION: case LT: case COMMA: case GT: case RPAREN: case ASSIGN: case BAND: case RCURLY: case SEMI: case NLS: case LITERAL_default: case CLOSURE_OP: case LOR: case BOR: case COLON: case LITERAL_else: case LITERAL_in: case LITERAL_case: case PLUS_ASSIGN: case MINUS_ASSIGN: case STAR_ASSIGN: case DIV_ASSIGN: case MOD_ASSIGN: case SR_ASSIGN: case BSR_ASSIGN: case SL_ASSIGN: case BAND_ASSIGN: case BXOR_ASSIGN: case BOR_ASSIGN: case STAR_STAR_ASSIGN: case LAND: case BXOR: case REGEX_FIND: case REGEX_MATCH: case NOT_EQUAL: case EQUAL: case COMPARE_TO: case LE: case GE: { { switch ( LA(1)) { case LT: case GT: case LITERAL_in: case LE: case GE: { { switch ( LA(1)) { case LT: { AST tmp290_AST = null; if (inputState.guessing==0) { tmp290_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp290_AST); } match(LT); break; } case GT: { AST tmp291_AST = null; if (inputState.guessing==0) { tmp291_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp291_AST); } match(GT); break; } case LE: { AST tmp292_AST = null; if (inputState.guessing==0) { tmp292_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp292_AST); } match(LE); break; } case GE: { AST tmp293_AST = null; if (inputState.guessing==0) { tmp293_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp293_AST); } match(GE); break; } case LITERAL_in: { AST tmp294_AST = null; if (inputState.guessing==0) { tmp294_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp294_AST); } match(LITERAL_in); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } nls(); shiftExpression(); if (inputState.guessing==0) { astFactory.addASTChild(currentAST, returnAST); } break; } case EOF: case RBRACK: case QUESTION: case COMMA: case RPAREN: case ASSIGN: case BAND: case RCURLY: case SEMI: case NLS: case LITERAL_default: case CLOSURE_OP: case LOR: case BOR: case COLON: case LITERAL_else: case LITERAL_case: case PLUS_ASSIGN: case MINUS_ASSIGN: case STAR_ASSIGN: case DIV_ASSIGN: case MOD_ASSIGN: case SR_ASSIGN: case BSR_ASSIGN: case SL_ASSIGN: case BAND_ASSIGN: case BXOR_ASSIGN: case BOR_ASSIGN: case STAR_STAR_ASSIGN: case LAND: case BXOR: case REGEX_FIND: case REGEX_MATCH: case NOT_EQUAL: case EQUAL: case COMPARE_TO: { break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } break; } case LITERAL_instanceof: { AST tmp295_AST = null; if (inputState.guessing==0) { tmp295_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp295_AST); } match(LITERAL_instanceof); nls(); typeSpec(true); if (inputState.guessing==0) { astFactory.addASTChild(currentAST, returnAST); } break; } case LITERAL_as: { AST tmp296_AST = null; if (inputState.guessing==0) { tmp296_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp296_AST); } match(LITERAL_as); nls(); typeSpec(true); if (inputState.guessing==0) { astFactory.addASTChild(currentAST, returnAST); } break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } if ( inputState.guessing==0 ) { relationalExpression_AST = (AST)currentAST.root; } returnAST = relationalExpression_AST; }
6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/5c53aea8416ae7d318cf0157b4690ba71badb0f9/GroovyRecognizer.java/clean/src/main/org/codehaus/groovy/antlr/parser/GroovyRecognizer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 25302, 2300, 1435, 1216, 9539, 16, 3155, 1228, 503, 288, 9506, 202, 2463, 9053, 273, 446, 31, 202, 202, 9053, 4154, 783, 9053, 273, 394, 9183, 4154, 5621, 202, 202, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 25302, 2300, 1435, 1216, 9539, 16, 3155, 1228, 503, 288, 9506, 202, 2463, 9053, 273, 446, 31, 202, 202, 9053, 4154, 783, 9053, 273, 394, 9183, 4154, 5621, 202, 202, ...
if ( selectTag.isOptionSelected(getValue(), (this.selected != null)) ) {
String actualLabel = getBodyContentAsString(); if (actualLabel == null) { actualLabel = this.label; } Object actualValue; if (this.value == null) { actualValue = actualLabel; } else { actualValue = this.value; } getAttributes().put("value", format(actualValue)); if (selectTag.isOptionSelected(actualValue, (this.selected != null))) {
public int doEndInputTag() throws JspException { // Find our mandatory enclosing select tag InputSelectTag selectTag = getParentTag(InputSelectTag.class); if (selectTag == null) { throw new StripesJspException ("Option tags must always be contained inside a select tag."); } if ( selectTag.isOptionSelected(getValue(), (this.selected != null)) ) { getAttributes().put("selected", "selected"); } getAttributes().put("value", format(this.value)); try { String actualLabel = getBodyContentAsString(); if (actualLabel == null) { actualLabel = this.label; } writeOpenTag(getPageContext().getOut(), "option"); if (actualLabel != null) { getPageContext().getOut().write(actualLabel); } writeCloseTag(getPageContext().getOut(), "option"); // Clean out the attributes we modified getAttributes().remove("selected"); getAttributes().remove("value"); } catch (IOException ioe) { throw new JspException("IOException in InputOptionTag.doEndTag().", ioe); } return EVAL_PAGE; }
9306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9306/adb5f6ed14202d2f861b4fd74a545840516128fc/InputOptionTag.java/buggy/stripes/src/net/sourceforge/stripes/tag/InputOptionTag.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 741, 1638, 1210, 1805, 1435, 1216, 27485, 288, 3639, 368, 4163, 3134, 11791, 16307, 2027, 1047, 3639, 2741, 3391, 1805, 2027, 1805, 273, 5089, 1805, 12, 1210, 3391, 1805, 18, 110...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 741, 1638, 1210, 1805, 1435, 1216, 27485, 288, 3639, 368, 4163, 3134, 11791, 16307, 2027, 1047, 3639, 2741, 3391, 1805, 2027, 1805, 273, 5089, 1805, 12, 1210, 3391, 1805, 18, 110...
project.getLog().addLogger(logger);
project.getLog().add(logger);
public void testBuild() throws Exception { Date now = new Date(); MockModificationSet modSet = new MockModificationSet(); modSet.setTimeOfCheck(now); MockSchedule sched = new MockSchedule(); project.setSchedule(sched); project.setLabel("1.2.2"); project.setName("myproject"); project.setWasLastBuildSuccessful(false); File logDir = new File(TEST_DIR + File.separator + "test-results"); logDir.mkdir(); project.getLog().setDir(TEST_DIR + File.separator + "test-results"); project.setLogXmlEncoding("ISO-8859-1"); project.getLog().validate(); MergeLogger logger = new MergeLogger(); logger.setFile(TEST_DIR + File.separator + "_auxLog1.xml"); logger.validate(); project.getLog().addLogger(logger); logger = new MergeLogger(); logger.setDir(TEST_DIR + File.separator + "_auxLogs"); logger.validate(); project.getLog().addLogger(logger); project.setLabelIncrementer(new DefaultLabelIncrementer()); project.setModificationSet(modSet); project.setLastBuild(formatTime(now)); project.setLastSuccessfulBuild(formatTime(now)); writeFile(TEST_DIR + File.separator + "_auxLog1.xml", "<one/>"); File auxLogsDirectory = new File(TEST_DIR + File.separator + "_auxLogs"); auxLogsDirectory.mkdir(); writeFile(TEST_DIR + File.separator + "_auxLogs/_auxLog2.xml", "<testsuite><properties><property/></properties><testcase/></testsuite>"); writeFile(TEST_DIR + File.separator + "_auxLogs/_auxLog3.xml", "<testsuite/>"); final ArrayList resultEvents = new ArrayList(); project.addBuildResultListener(new BuildResultListener() { public void handleBuildResult(BuildResultEvent event) { resultEvents.add(event); } }); final ArrayList progressEvents = new ArrayList(); project.addBuildProgressListener(new BuildProgressListener() { public void handleBuildProgress(BuildProgressEvent event) { progressEvents.add(event); } }); project.start(); project.build(); project.stop(); filesToClear.add(project.getLog().getLastLogFile()); assertTrue(project.isLastBuildSuccessful()); String expected = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><cruisecontrol><modifications />" + "<info>" + "<property name=\"projectname\" value=\"myproject\" />" + "<property name=\"lastbuild\" value=\"" + DateUtil.getFormattedTime(now) + "\" />" + "<property name=\"lastsuccessfulbuild\" value=\"" + project.getLastSuccessfulBuild() + "\" />" + "<property name=\"builddate\" value=\"" + DateFormatFactory.getDateFormat().format(now) + "\" />" + "<property name=\"cctimestamp\" value=\"" + DateUtil.getFormattedTime(now) + "\" />" + "<property name=\"label\" value=\"1.2.2\" />" + "<property name=\"interval\" value=\"300\" />" + "<property name=\"lastbuildsuccessful\" value=\"false\" />" + "<property name=\"logdir\" value=\"" + logDir.getAbsolutePath() + "\" />" + "<property name=\"logfile\" value=\"" + "log" + DateUtil.getFormattedTime(now) + "L1.2.2.xml\" />" + "</info><build /><one /><testsuite><testcase /></testsuite><testsuite /></cruisecontrol>"; assertEquals(expected, Util.readFileToString(project.getLog().getLastLogFile())); assertEquals("Didn't increment the label", "1.2.3", project.getLabel().intern()); //look for sourcecontrol properties java.util.Map props = sched.getBuildProperties(); assertNotNull("Build properties were null.", props); assertEquals("Build property count.", 8, props.size()); assertTrue("filemodified not found.", props.containsKey("filemodified")); assertTrue("fileremoved not found.", props.containsKey("fileremoved")); assertEquals(project.getLastSuccessfulBuild(), props.get("cclastgoodbuildtimestamp")); assertEquals(project.getLastBuild(), props.get("cclastbuildtimestamp")); assertTrue("cvstimestamp not passed.", props.containsKey("cvstimestamp")); // check that the proper events were fired assertEquals("Should be exactly one build result event", 1, resultEvents.size()); BuildResultEvent resultEvent = (BuildResultEvent) resultEvents.get(0); assertTrue("Should be successful build result event", resultEvent.isBuildSuccessful()); assertTrue("Should have at least one of each project state except queued", progressEvents.size() >= 8); }
52149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52149/4d64e5a6de723c3645a177ceddfe78e5e389e230/ProjectTest.java/buggy/main/test/net/sourceforge/cruisecontrol/ProjectTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 3116, 1435, 1216, 1185, 288, 3639, 2167, 2037, 273, 394, 2167, 5621, 3639, 7867, 13467, 694, 681, 694, 273, 394, 7867, 13467, 694, 5621, 3639, 681, 694, 18, 542, 950, 951...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 3116, 1435, 1216, 1185, 288, 3639, 2167, 2037, 273, 394, 2167, 5621, 3639, 7867, 13467, 694, 681, 694, 273, 394, 7867, 13467, 694, 5621, 3639, 681, 694, 18, 542, 950, 951...
addByteCode(ByteCode.ALOAD_0); push(parmCount); classFile.add(ByteCode.PUTFIELD,
cfw.add(ByteCode.ALOAD_0); cfw.addPush(parmCount); cfw.add(ByteCode.PUTFIELD,
private void generateInit(Context cx, String superClassName) { String methodName = (inFunction) ? "<init>" : "initScript"; classFile.startMethod(methodName, "(Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/Context;)V", ClassFileWriter.ACC_PUBLIC); final byte ALOAD_SCOPE = ByteCode.ALOAD_1; final byte ALOAD_CONTEXT = ByteCode.ALOAD_2; if (inFunction) { addByteCode(ByteCode.ALOAD_0); addSpecialInvoke(superClassName, "<init>", "()V"); addByteCode(ByteCode.ALOAD_0); addByteCode(ALOAD_SCOPE); classFile.add(ByteCode.PUTFIELD, "org/mozilla/javascript/ScriptableObject", "parent", "Lorg/mozilla/javascript/Scriptable;"); /* * Generate code to initialize functionName field with the name * of the function. */ String name = fnCurrent.getFunctionName(); if (name.length() != 0) { addByteCode(ByteCode.ALOAD_0); classFile.addLoadConstant(name); classFile.add(ByteCode.PUTFIELD, "org/mozilla/javascript/NativeFunction", "functionName", "Ljava/lang/String;"); } } /* * Generate code to initialize argNames string array with the names * of the parameters and the vars. Initialize argCount * to the number of formal parameters. */ int N = scriptOrFn.getParamAndVarCount(); if (N != 0) { push(N); addByteCode(ByteCode.ANEWARRAY, "java/lang/String"); for (int i = 0; i != N; i++) { addByteCode(ByteCode.DUP); push(i); push(scriptOrFn.getParamOrVarName(i)); addByteCode(ByteCode.AASTORE); } addByteCode(ByteCode.ALOAD_0); addByteCode(ByteCode.SWAP); classFile.add(ByteCode.PUTFIELD, "org/mozilla/javascript/NativeFunction", "argNames", "[Ljava/lang/String;"); } int parmCount = scriptOrFn.getParamCount(); if (parmCount != 0) { if (!inFunction) Context.codeBug(); addByteCode(ByteCode.ALOAD_0); push(parmCount); classFile.add(ByteCode.PUTFIELD, "org/mozilla/javascript/NativeFunction", "argCount", "S"); } // Initialize NativeFunction.version with Context's version. if (cx.getLanguageVersion() != 0) { addByteCode(ByteCode.ALOAD_0); push(cx.getLanguageVersion()); classFile.add(ByteCode.PUTFIELD, "org/mozilla/javascript/NativeFunction", "version", "S"); } // precompile all regexp literals int regexpCount = scriptOrFn.getRegexpCount(); if (regexpCount != 0) { for (int i = 0; i != regexpCount; ++i) { String fieldName = getRegexpFieldName(i); short flags = ClassFileWriter.ACC_PRIVATE; if (inFunction) { flags |= ClassFileWriter.ACC_FINAL; } classFile.addField( fieldName, "Lorg/mozilla/javascript/regexp/NativeRegExp;", flags); addByteCode(ByteCode.ALOAD_0); // load 'this' addByteCode(ByteCode.NEW, "org/mozilla/javascript/regexp/NativeRegExp"); addByteCode(ByteCode.DUP); addByteCode(ALOAD_CONTEXT); addByteCode(ALOAD_SCOPE); push(scriptOrFn.getRegexpString(i)); String regexpFlags = scriptOrFn.getRegexpFlags(i); if (regexpFlags == null) { addByteCode(ByteCode.ACONST_NULL); } else { push(regexpFlags); } push(0); addSpecialInvoke("org/mozilla/javascript/regexp/NativeRegExp", "<init>", "(Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Ljava/lang/String;Ljava/lang/String;" +"Z" +")V"); classFile.add(ByteCode.PUTFIELD, generatedClassName, fieldName, "Lorg/mozilla/javascript/regexp/NativeRegExp;"); } } classFile.addField(MAIN_SCRIPT_FIELD, mainCodegen.generatedClassSignature, (short)0); // For top level script or function init scriptMaster to self if (isMainCodegen) { addByteCode(ByteCode.ALOAD_0); addByteCode(ByteCode.DUP); classFile.add(ByteCode.PUTFIELD, generatedClassName, MAIN_SCRIPT_FIELD, mainCodegen.generatedClassSignature); } addByteCode(ByteCode.RETURN); // 3 = this + scope + context classFile.stopMethod((short)3, null); // Add static method to return encoded source tree for decompilation // which will be called from OptFunction/OptScrript.getSourcesTree // via reflection. See NativeFunction.getSourcesTree for documentation. // Note that nested function decompilation currently depends on the // elements of the fns array being defined in source order. // (per function/script, starting from 0.) // Change Parser if changing ordering. if (mainCodegen.encodedSource != null) { // Override NativeFunction.getEncodedSourceg() with // public String getEncodedSource() // { // return main_class.getEncodedSourceImpl(START, END); // } short flags = ClassFileWriter.ACC_PUBLIC | ClassFileWriter.ACC_STATIC; String getSourceMethodStr = "getEncodedSourceImpl"; String mainImplSig = "(II)Ljava/lang/String;"; classFile.startMethod("getEncodedSource", "()Ljava/lang/Object;", ClassFileWriter.ACC_PUBLIC); push(scriptOrFn.getEncodedSourceStart()); push(scriptOrFn.getEncodedSourceEnd()); classFile.addInvoke(ByteCode.INVOKESTATIC, mainCodegen.generatedClassName, getSourceMethodStr, mainImplSig); addByteCode(ByteCode.ARETURN); // 1: this and no argument or locals classFile.stopMethod((short)1, null); if (isMainCodegen) { // generate // public static String getEncodedSourceImpl(int start, int end) // { // return ENCODED.substring(start, end); // } classFile.startMethod(getSourceMethodStr, mainImplSig, (short)flags); push(encodedSource); addByteCode(ByteCode.ILOAD_0); addByteCode(ByteCode.ILOAD_1); classFile.addInvoke(ByteCode.INVOKEVIRTUAL, "java/lang/String", "substring", "(II)Ljava/lang/String;"); addByteCode(ByteCode.ARETURN); classFile.stopMethod((short)2, null); } } }
19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/64dc04549cad044865eae2e65e775ddc0f292717/Codegen.java/clean/src/org/mozilla/javascript/optimizer/Codegen.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2103, 2570, 12, 1042, 9494, 16, 514, 2240, 3834, 13, 565, 288, 3639, 514, 4918, 273, 261, 267, 2083, 13, 692, 3532, 2738, 2984, 294, 225, 315, 2738, 3651, 14432, 3639, 29728, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2103, 2570, 12, 1042, 9494, 16, 514, 2240, 3834, 13, 565, 288, 3639, 514, 4918, 273, 261, 267, 2083, 13, 692, 3532, 2738, 2984, 294, 225, 315, 2738, 3651, 14432, 3639, 29728, ...
abstract void loadExtension( IExtension extension ) throws ExtensionException, MetaDataException;
abstract protected void loadExtension( IExtension extension );
abstract void loadExtension( IExtension extension ) throws ExtensionException, MetaDataException;
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/bc16d8233369aff58ae9f680efbda6db87bd45f8/ExtensionLoader.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/metadata/ExtensionLoader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 17801, 918, 1262, 3625, 12, 467, 3625, 2710, 262, 1082, 202, 15069, 10021, 503, 16, 6565, 22480, 31, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 17801, 918, 1262, 3625, 12, 467, 3625, 2710, 262, 1082, 202, 15069, 10021, 503, 16, 6565, 22480, 31, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
push(0.0); dstore(lVar.getJRegister());
cfw.addPush(0.0); cfw.addDStore(lVar.getJRegister());
private void generatePrologue(Context cx, int directParameterCount) { if (inFunction && !itsUseDynamicScope && directParameterCount == -1) { // Unless we're either using dynamic scope or we're in a // direct call, use the enclosing scope of the function as our // variable object. aload(funObjLocal); classFile.addInvoke(ByteCode.INVOKEINTERFACE, "org/mozilla/javascript/Scriptable", "getParentScope", "()Lorg/mozilla/javascript/Scriptable;"); astore(variableObjectLocal); } if (directParameterCount > 0) { for (int i = 0; i < (3 * directParameterCount); i++) reserveWordLocal(i + 4); // reserve 'args' } // reserve 'args[]' argsLocal = reserveWordLocal(directParameterCount <= 0 ? 4 : (3 * directParameterCount) + 4); // These locals are to be pre-allocated since they need function scope. // They are primarily used by the exception handling mechanism int localCount = scriptOrFn.getLocalCount(); if (localCount != 0) { itsLocalAllocationBase = (short)(argsLocal + 1); for (int i = 0; i < localCount; i++) { reserveWordLocal(itsLocalAllocationBase + i); } } if (inFunction && fnCurrent.getCheckThis()) { // Nested functions must check their 'this' value to // insure it is not an activation object: // see 10.1.6 Activation Object aload(thisObjLocal); addScriptRuntimeInvoke("getThis", "(Lorg/mozilla/javascript/Scriptable;" +")Lorg/mozilla/javascript/Scriptable;"); astore(thisObjLocal); } hasVarsInRegs = inFunction && !fnCurrent.requiresActivation(); if (hasVarsInRegs) { // No need to create activation. Pad arguments if need be. int parmCount = scriptOrFn.getParamCount(); if (inFunction && parmCount > 0 && directParameterCount < 0) { // Set up args array // check length of arguments, pad if need be aload(argsLocal); addByteCode(ByteCode.ARRAYLENGTH); push(parmCount); int label = acquireLabel(); addByteCode(ByteCode.IF_ICMPGE, label); aload(argsLocal); push(parmCount); addScriptRuntimeInvoke("padArguments", "([Ljava/lang/Object;I" +")[Ljava/lang/Object;"); astore(argsLocal); markLabel(label); } // REMIND - only need to initialize the vars that don't get a value // before the next call and are used in the function short firstUndefVar = -1; for (int i = 0; i < fnCurrent.getVarCount(); i++) { OptLocalVariable lVar = fnCurrent.getVar(i); if (lVar.isNumber()) { lVar.assignJRegister(getNewWordPairLocal()); push(0.0); dstore(lVar.getJRegister()); } else if (lVar.isParameter()) { if (directParameterCount < 0) { lVar.assignJRegister(getNewWordLocal()); aload(argsLocal); push(i); addByteCode(ByteCode.AALOAD); astore(lVar.getJRegister()); } } else { lVar.assignJRegister(getNewWordLocal()); if (firstUndefVar == -1) { pushUndefined(); firstUndefVar = lVar.getJRegister(); } else { aload(firstUndefVar); } astore(lVar.getJRegister()); } lVar.setStartPC(classFile.getCurrentCodeOffset()); } // Indicate that we should generate debug information for // the variable table. (If we're generating debug info at // all.) debugVars = fnCurrent.getVarsArray(); // Skip creating activation object. return; } if (directParameterCount > 0) { // We're going to create an activation object, so we // need to get an args array with all the arguments in it. aload(argsLocal); push(directParameterCount); addOptRuntimeInvoke("padStart", "([Ljava/lang/Object;I)[Ljava/lang/Object;"); astore(argsLocal); for (int i=0; i < directParameterCount; i++) { aload(argsLocal); push(i); // "3" is 1 for Object parm and 2 for double parm, and // "4" is to account for the context, etc. parms aload((short) (3*i+4)); addByteCode(ByteCode.AASTORE); } } String debugVariableName; if (inFunction) { aload(contextLocal); aload(variableObjectLocal); aload(funObjLocal); aload(thisObjLocal); aload(argsLocal); addScriptRuntimeInvoke("initVarObj", "(Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/NativeFunction;" +"Lorg/mozilla/javascript/Scriptable;" +"[Ljava/lang/Object;" +")Lorg/mozilla/javascript/Scriptable;"); debugVariableName = "activation"; } else { aload(contextLocal); aload(variableObjectLocal); aload(funObjLocal); aload(thisObjLocal); push(0); addScriptRuntimeInvoke("initScript", "(Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/NativeFunction;" +"Lorg/mozilla/javascript/Scriptable;" +"Z" +")Lorg/mozilla/javascript/Scriptable;"); debugVariableName = "global"; } astore(variableObjectLocal); int functionCount = scriptOrFn.getFunctionCount(); for (int i = 0; i != functionCount; i++) { OptFunctionNode fn = (OptFunctionNode)scriptOrFn.getFunctionNode(i); if (fn.getFunctionType() == FunctionNode.FUNCTION_STATEMENT) { visitFunction(fn, FunctionNode.FUNCTION_STATEMENT); } } // default is to generate debug info if (!cx.isGeneratingDebugChanged() || cx.isGeneratingDebug()) { OptLocalVariable lv = new OptLocalVariable(debugVariableName, false); lv.assignJRegister(variableObjectLocal); lv.setStartPC(classFile.getCurrentCodeOffset()); debugVars = new OptLocalVariable[1]; debugVars[0] = lv; } if (!inFunction) { // OPT: use dataflow to prove that this assignment is dead scriptResultLocal = getNewWordLocal(); pushUndefined(); astore(scriptResultLocal); } if (inFunction) { if (fnCurrent.itsContainsCalls0) { itsZeroArgArray = getNewWordLocal(); classFile.add(ByteCode.GETSTATIC, "org/mozilla/javascript/ScriptRuntime", "emptyArgs", "[Ljava/lang/Object;"); astore(itsZeroArgArray); } if (fnCurrent.itsContainsCalls1) { itsOneArgArray = getNewWordLocal(); push(1); addByteCode(ByteCode.ANEWARRAY, "java/lang/Object"); astore(itsOneArgArray); } } }
51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/bd2594e6ebd6d8099b587934641c8f7650d87761/Codegen.java/clean/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2103, 626, 1330, 344, 12, 1042, 9494, 16, 509, 2657, 1662, 1380, 13, 565, 288, 3639, 309, 261, 267, 2083, 597, 401, 1282, 3727, 9791, 3876, 597, 5411, 2657, 1662, 1380, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2103, 626, 1330, 344, 12, 1042, 9494, 16, 509, 2657, 1662, 1380, 13, 565, 288, 3639, 309, 261, 267, 2083, 597, 401, 1282, 3727, 9791, 3876, 597, 5411, 2657, 1662, 1380, 422, ...
public Collection getIdsByKey(String key) throws PersistenceException {
public Collection getIdsByKey(String key, Object userId) throws PersistenceException {
public Collection getIdsByKey(String key) throws PersistenceException { Collection ids = new ArrayList(); for (Iterator iterator = tasks.values().iterator(); iterator.hasNext();) { WorkInfo workInfo = (WorkInfo) iterator.next(); if (key.equals(workInfo.getKey())) { ids.add(new Long(workInfo.getId())); } } return ids; }
12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/605257ff3ba09e9e445ba5e061d415d393d83c76/VMWorkerPersistence.java/clean/modules/timer/src/java/org/apache/geronimo/timer/vm/VMWorkerPersistence.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2200, 2634, 87, 14560, 12, 780, 498, 16, 1033, 6249, 13, 1216, 13381, 503, 288, 3639, 2200, 3258, 273, 394, 2407, 5621, 3639, 364, 261, 3198, 2775, 273, 4592, 18, 2372, 7675, 9838, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2200, 2634, 87, 14560, 12, 780, 498, 16, 1033, 6249, 13, 1216, 13381, 503, 288, 3639, 2200, 3258, 273, 394, 2407, 5621, 3639, 364, 261, 3198, 2775, 273, 4592, 18, 2372, 7675, 9838, ...
public RubyObject execute(RubyObject recv, RubyObject args[], Ruby ruby) { return recv.m_to_s(); }
public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { return ruby.getNil(); }
public RubyObject execute(RubyObject recv, RubyObject args[], Ruby ruby) { return recv.m_to_s(); }
49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RBKernel.java/clean/org/jruby/core/RBKernel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1171, 1071, 19817, 921, 1836, 12, 54, 10340, 921, 10665, 16, 19817, 921, 833, 63, 6487, 19817, 22155, 13, 288, 10792, 327, 10665, 18, 81, 67, 869, 67, 87, 5621, 7734, 289, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1171, 1071, 19817, 921, 1836, 12, 54, 10340, 921, 10665, 16, 19817, 921, 833, 63, 6487, 19817, 22155, 13, 288, 10792, 327, 10665, 18, 81, 67, 869, 67, 87, 5621, 7734, 289, 2, -100, -100, -10...
List messages, Locale locale, ClassLoader loader) {
List messages, Locale locale, ClassLoader loader, boolean value2InlineConstant) {
public static Boolean doRealCompare(Object value1, Object value2, String operator, String type, String format, List messages, Locale locale, ClassLoader loader) { boolean verboseOn = Debug.verboseOn(); if (verboseOn) Debug.logVerbose("Comparing value1: \"" + value1 + "\" " + operator + " value2:\"" + value2 + "\"", module); try { if (!"PlainString".equals(type)) { Class clz = ObjectType.loadClass(type, loader); type = clz.getName(); } } catch (ClassNotFoundException e) { Debug.logWarning("The specified type [" + type + "] is not a valid class or a known special type, may see more errors later because of this: " + e.getMessage(), module); } // some default behavior for null values, results in a bit cleaner operation if ("is-null".equals(operator) && value1 == null) { return Boolean.TRUE; } else if ("is-not-null".equals(operator) && value1 == null) { return Boolean.FALSE; } else if ("is-empty".equals(operator) && value1 == null) { return Boolean.TRUE; } else if ("is-not-empty".equals(operator) && value1 == null) { return Boolean.FALSE; } else if ("contains".equals(operator) && value1 == null) { return Boolean.FALSE; } int result = 0; Object convertedValue2 = null; if (value2 != null) { try { convertedValue2 = ObjectType.simpleTypeConvert(value2, type, format, locale); } catch (GeneralException e) { Debug.logError(e, module); messages.add("Could not convert value2 for comparison: " + e.getMessage()); return null; } } // have converted value 2, now before converting value 1 see if it is a Collection and we are doing a contains comparison if ("contains".equals(operator) && value1 instanceof Collection) { Collection col1 = (Collection) value1; if (col1.contains(convertedValue2)) { return Boolean.TRUE; } else { return Boolean.FALSE; } } Object convertedValue1 = null; try { convertedValue1 = ObjectType.simpleTypeConvert(value1, type, format, locale); } catch (GeneralException e) { Debug.logError(e, module); messages.add("Could not convert value1 for comparison: " + e.getMessage()); return null; } // handle null values... if (convertedValue1 == null || convertedValue2 == null) { if ("equals".equals(operator)) { if (convertedValue1 == null && convertedValue2 == null) { return Boolean.TRUE; } else { return Boolean.FALSE; } } else if ("not-equals".equals(operator)) { if (convertedValue1 == null && convertedValue2 == null) { return Boolean.FALSE; } else { return Boolean.TRUE; } } else if ("is-not-empty".equals(operator) || "is-empty".equals(operator)) { // do nothing, handled later... } else { if (convertedValue1 == null) { messages.add("Left value is null, cannot complete compare for the operator " + operator); return null; } if (convertedValue2 == null) { messages.add("Right value is null, cannot complete compare for the operator " + operator); return null; } } } if ("contains".equals(operator)) { if ("java.lang.String".equals(type) || "PlainString".equals(type)) { String str1 = (String) convertedValue1; String str2 = (String) convertedValue2; if (str1.indexOf(str2) < 0) { return Boolean.FALSE; } else { return Boolean.TRUE; } } else { messages.add("Error in XML file: cannot do a contains compare between a String and a non-String type"); return null; } } else if ("is-empty".equals(operator)) { if (convertedValue1 == null) return Boolean.TRUE; if (convertedValue1 instanceof String && ((String) convertedValue1).length() == 0) return Boolean.TRUE; if (convertedValue1 instanceof List && ((List) convertedValue1).size() == 0) return Boolean.TRUE; if (convertedValue1 instanceof Map && ((Map) convertedValue1).size() == 0) return Boolean.TRUE; return Boolean.FALSE; } else if ("is-not-empty".equals(operator)) { if (convertedValue1 == null) return Boolean.FALSE; if (convertedValue1 instanceof String && ((String) convertedValue1).length() == 0) return Boolean.FALSE; if (convertedValue1 instanceof List && ((List) convertedValue1).size() == 0) return Boolean.FALSE; if (convertedValue1 instanceof Map && ((Map) convertedValue1).size() == 0) return Boolean.FALSE; return Boolean.TRUE; } if ("java.lang.String".equals(type) || "PlainString".equals(type)) { String str1 = (String) convertedValue1; String str2 = (String) convertedValue2; if (str1.length() == 0 || str2.length() == 0) { if ("equals".equals(operator)) { if (str1.length() == 0 && str2.length() == 0) { return Boolean.TRUE; } else { return Boolean.FALSE; } } else if ("not-equals".equals(operator)) { if (str1.length() == 0 && str2.length() == 0) { return Boolean.FALSE; } else { return Boolean.TRUE; } } else { messages.add("ERROR: Could not do a compare between strings with one empty string for the operator " + operator); return null; } } result = str1.compareTo(str2); } else if ("java.lang.Double".equals(type) || "java.lang.Float".equals(type) || "java.lang.Long".equals(type) || "java.lang.Integer".equals(type) || "java.math.BigDecimal".equals(type)) { Number tempNum = (Number) convertedValue1; double value1Double = tempNum.doubleValue(); tempNum = (Number) convertedValue2; double value2Double = tempNum.doubleValue(); if (value1Double < value2Double) result = -1; else if (value1Double > value2Double) result = 1; else result = 0; } else if ("java.sql.Date".equals(type)) { java.sql.Date value1Date = (java.sql.Date) convertedValue1; java.sql.Date value2Date = (java.sql.Date) convertedValue2; result = value1Date.compareTo(value2Date); } else if ("java.sql.Time".equals(type)) { java.sql.Time value1Time = (java.sql.Time) convertedValue1; java.sql.Time value2Time = (java.sql.Time) convertedValue2; result = value1Time.compareTo(value2Time); } else if ("java.sql.Timestamp".equals(type)) { java.sql.Timestamp value1Timestamp = (java.sql.Timestamp) convertedValue1; java.sql.Timestamp value2Timestamp = (java.sql.Timestamp) convertedValue2; result = value1Timestamp.compareTo(value2Timestamp); } else if ("java.lang.Boolean".equals(type)) { Boolean value1Boolean = (Boolean) convertedValue1; Boolean value2Boolean = (Boolean) convertedValue2; if ("equals".equals(operator)) { if ((value1Boolean.booleanValue() && value2Boolean.booleanValue()) || (!value1Boolean.booleanValue() && !value2Boolean.booleanValue())) result = 0; else result = 1; } else if ("not-equals".equals(operator)) { if ((!value1Boolean.booleanValue() && value2Boolean.booleanValue()) || (value1Boolean.booleanValue() && !value2Boolean.booleanValue())) result = 0; else result = 1; } else { messages.add("Can only compare Booleans using the operators 'equals' or 'not-equals'"); return null; } } else if ("java.lang.Object".equals(type)) { if (convertedValue1.equals(convertedValue2)) { result = 0; } else { result = 1; } } else { messages.add("Type \"" + type + "\" specified for compare not supported."); return null; } if (verboseOn) Debug.logVerbose("Got Compare result: " + result + ", operator: " + operator, module); if ("less".equals(operator)) { if (result >= 0) return Boolean.FALSE; } else if ("greater".equals(operator)) { if (result <= 0) return Boolean.FALSE; } else if ("less-equals".equals(operator)) { if (result > 0) return Boolean.FALSE; } else if ("greater-equals".equals(operator)) { if (result < 0) return Boolean.FALSE; } else if ("equals".equals(operator)) { if (result != 0) return Boolean.FALSE; } else if ("not-equals".equals(operator)) { if (result == 0) return Boolean.FALSE; } else { messages.add("Specified compare operator \"" + operator + "\" not known."); return null; } if (verboseOn) Debug.logVerbose("Returning true", module); return Boolean.TRUE; }
22229 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/22229/e26b55d54d7a57a8ef76f8d2f993761d0dced9de/ObjectType.java/buggy/framework/base/src/base/org/ofbiz/base/util/ObjectType.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 3411, 741, 6955, 8583, 12, 921, 460, 21, 16, 1033, 460, 22, 16, 514, 3726, 16, 514, 618, 16, 514, 740, 16, 3639, 987, 2743, 16, 6458, 2573, 16, 9403, 4088, 16, 1250, 460, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 3411, 741, 6955, 8583, 12, 921, 460, 21, 16, 1033, 460, 22, 16, 514, 3726, 16, 514, 618, 16, 514, 740, 16, 3639, 987, 2743, 16, 6458, 2573, 16, 9403, 4088, 16, 1250, 460, ...
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
public Object invoke(Object proxy, Method method, Object[] nargs) throws Throwable {
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.getName().equals("toString") && method.getParameterTypes().length == 0) { return proxy.getClass().getName(); } else if (method.getName().equals("hashCode") && method.getParameterTypes().length == 0) { return new Integer(proxy.getClass().hashCode()); } else if (method.getName().equals("equals") && method.getParameterTypes().length == 1 && method.getParameterTypes()[0].equals(Object.class)) { return Boolean.valueOf(proxy == args[0]); } int length = args == null ? 0 : args.length; IRubyObject[] rubyArgs = new IRubyObject[length + 2]; rubyArgs[0] = JavaObject.wrap(recv.getRuntime(), proxy); rubyArgs[1] = new JavaMethod(recv.getRuntime(), method); for (int i = 0; i < length; i++) { rubyArgs[i + 2] = JavaObject.wrap(recv.getRuntime(), args[i]); } return JavaUtil.convertArgument(proc.call(rubyArgs), method.getReturnType()); }
50993 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50993/ca6b16e996ea9af83ce593594b9c69b9364a9924/Java.java/clean/src/org/jruby/javasupport/Java.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 1033, 4356, 12, 921, 2889, 16, 2985, 707, 16, 1033, 8526, 14440, 13, 1216, 4206, 288, 7734, 309, 261, 2039, 18, 17994, 7675, 14963, 2932, 10492, 7923, 597, 707, 18, 588, 1662, 2016...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 1033, 4356, 12, 921, 2889, 16, 2985, 707, 16, 1033, 8526, 14440, 13, 1216, 4206, 288, 7734, 309, 261, 2039, 18, 17994, 7675, 14963, 2932, 10492, 7923, 597, 707, 18, 588, 1662, 2016...
public void mT16() throws RecognitionException { int T16_StartIndex = input.index(); try { int type = T16; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; if ( backtracking>0 && alreadyParsedRule(input, 2) ) { return ; } // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:7:7: ( 'package' ) // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:7:7: 'package' { match("package"); if (failed) return ; } if ( token==null ) {emit(type,line,charPosition,channel,start,getCharIndex()-1);} } finally { if ( backtracking>0 ) { memoize(input, 2, T16_StartIndex); } } }
5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/297a1e0ef2967d8b4f7be9c022102a5a56e97489/RuleParserLexer.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 21115, 2313, 1435, 1216, 9539, 288, 3639, 509, 399, 2313, 67, 16792, 273, 810, 18, 1615, 5621, 3639, 775, 288, 5411, 509, 618, 273, 399, 2313, 31, 5411, 509, 787, 273, 23577, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 21115, 2313, 1435, 1216, 9539, 288, 3639, 509, 399, 2313, 67, 16792, 273, 810, 18, 1615, 5621, 3639, 775, 288, 5411, 509, 618, 273, 399, 2313, 31, 5411, 509, 787, 273, 23577, ...
prepareOdiResources( );
openDataSource( ); if ( dataSet != null ) { dataSet.beforeOpen(); } odiQuery = createOdiQuery( ); populateOdiQuery( ); prepareOdiQuery( );
public void execute( IQueryResults outerResults, Scriptable scope ) throws DataException { assert scope != null; this.scope = scope; // Create the data set runtime // Since data set runtime contains the execution result, a new data set // runtime is needed for each execute dataSet = newDataSetRuntime(); // Set up the Javascript "row" object; this is needed before executeOdiQuery // since filtering may need the object rowObject = new JSRowObject( dataSet ); scope.put( "row", scope, rowObject ); // Create, populate and prepare Odi query prepareOdiResources( ); // Execute the query odiResult = executeOdiQuery( outerResults ); // Bind the row object to the odi result set rowObject.setResultSet( odiResult, false ); // Set the Javascript "rows" object and bind it to our result rowsObject = new JSRows( outerResults, rowObject ); scope.put( "rows", scope, rowsObject ); // Add computed column data setComputedColumns(); // Calculate aggregate values aggregates = new AggregateCalculator( aggrTable, odiResult ); // Set up the internal JS _aggr_value object and bind it to the aggregate calc engine Scriptable aggrObj = aggregates.getJSAggrValueObject(); scope.put( ExpressionCompiler.AGGR_VALUE, scope, aggrObj ); Context cx = Context.enter(); try { // Calculate aggregate values aggregates.calculate(cx, scope); } finally { Context.exit(); } }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/2f61d4272942a42ba51f11ad11533f9d36a9ca7d/PreparedQuery.java/buggy/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedQuery.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 918, 1836, 12, 467, 1138, 3447, 6390, 3447, 16, 22780, 2146, 262, 1216, 1910, 503, 202, 202, 95, 1082, 202, 11231, 2146, 480, 446, 31, 1082, 202, 2211, 18, 4887, 273, 2146, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 918, 1836, 12, 467, 1138, 3447, 6390, 3447, 16, 22780, 2146, 262, 1216, 1910, 503, 202, 202, 95, 1082, 202, 11231, 2146, 480, 446, 31, 1082, 202, 2211, 18, 4887, 273, 2146, 3...
StringBuffer excludesStr = new StringBuffer(); if ( StringUtils.isNotEmpty( excludes ) ) { excludesStr.append( excludes ); } String[] defaultExcludes = FileUtils.getDefaultExcludes(); for ( int i = 0; i < defaultExcludes.length; i++ ) { if ( excludesStr.length() > 0 ) { excludesStr.append( "," ); } excludesStr.append( defaultExcludes[i] ); } getLog().debug( "Excluded files: '" + excludesStr + "'" ); return FileUtils.getFiles( dir, includes, excludesStr.toString() );
return files;
private List getFilesToProcess( String includes, String excludes ) throws IOException { File dir = new File( getProject().getBuild().getSourceDirectory() ); if ( !dir.exists() ) { return Collections.EMPTY_LIST; } StringBuffer excludesStr = new StringBuffer(); if ( StringUtils.isNotEmpty( excludes ) ) { excludesStr.append( excludes ); } String[] defaultExcludes = FileUtils.getDefaultExcludes(); for ( int i = 0; i < defaultExcludes.length; i++ ) { if ( excludesStr.length() > 0 ) { excludesStr.append( "," ); } excludesStr.append( defaultExcludes[i] ); } getLog().debug( "Excluded files: '" + excludesStr + "'" ); return FileUtils.getFiles( dir, includes, excludesStr.toString() ); }
7444 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7444/2346ac034fd6f2e14ae929780c728f7cca494e99/PmdReport.java/clean/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReport.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 987, 18262, 30004, 12, 514, 6104, 16, 514, 13644, 262, 3639, 1216, 1860, 565, 288, 3639, 1387, 1577, 273, 394, 1387, 12, 11080, 7675, 588, 3116, 7675, 588, 1830, 2853, 1435, 11272, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 987, 18262, 30004, 12, 514, 6104, 16, 514, 13644, 262, 3639, 1216, 1860, 565, 288, 3639, 1387, 1577, 273, 394, 1387, 12, 11080, 7675, 588, 3116, 7675, 588, 1830, 2853, 1435, 11272, ...
public void visitLDIV(LDIV obj) { consumeStack(obj); pushValue(typeRepository.getLongType()); }
public void visitLDIV(LDIV obj) { consumeStack(obj); pushValue(typeRepository.getLongType()); }
public void visitLDIV(LDIV obj) { consumeStack(obj); pushValue(typeRepository.getLongType()); }
10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/1d541964940eaa91b52b21469dc5b763fef1d8d1/BetterTypeFrameModelingVisitor.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/ba/BetterTypeFrameModelingVisitor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3757, 48, 31901, 12, 48, 31901, 1081, 13, 6862, 202, 95, 7865, 2624, 12, 2603, 1769, 1817, 620, 12, 723, 3305, 18, 588, 3708, 559, 10663, 289, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3757, 48, 31901, 12, 48, 31901, 1081, 13, 6862, 202, 95, 7865, 2624, 12, 2603, 1769, 1817, 620, 12, 723, 3305, 18, 588, 3708, 559, 10663, 289, 2, -100, -100, -100, -100, ...
long elevenHours = 11 * 60 * ONE_MINUTE; long oneHourFiftyNineMinutes = (60+59) * ONE_MINUTE; long twelveHours = 12 * 60 * ONE_MINUTE;
long oneHour = 60 * ONE_MINUTE; long elevenHours = 11 * oneHour; long oneHourFiftyNineMinutes = 2 * oneHour - ONE_MINUTE; long twelveHours = 12 * oneHour;
public void testGetTimeToNextBuild() { long fiveSeconds = 5 * 1000; long elevenHours = 11 * 60 * ONE_MINUTE; long oneHourFiftyNineMinutes = (60+59) * ONE_MINUTE; long twelveHours = 12 * 60 * ONE_MINUTE; long twentyFourHours = 2 * twelveHours; // time till next time build > build interval assertEquals(fiveSeconds, _schedule.getTimeToNextBuild(_cal.getTime(),fiveSeconds)); // time till next time build < build interval assertEquals(oneHourFiftyNineMinutes, _schedule.getTimeToNextBuild(_cal.getTime(),elevenHours)); // next build would be in pause interval assertEquals(twelveHours-ONE_MINUTE, _schedule.getTimeToNextBuild(_cal3.getTime(),elevenHours)); // time till next time build is tomorrow assertEquals(twentyFourHours-ONE_MINUTE, _schedule.getTimeToNextBuild(_cal3.getTime(),twentyFourHours*2)); }
55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/9f08d83bbae3b97d9a03d0db93a1f6330d743248/ScheduleTest.java/clean/main/test/net/sourceforge/cruisecontrol/ScheduleTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 967, 950, 774, 2134, 3116, 1435, 288, 377, 202, 5748, 23714, 6762, 273, 1381, 380, 4336, 31, 377, 202, 5748, 5043, 3995, 14910, 273, 4648, 380, 4752, 380, 15623, 67, 3009...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 967, 950, 774, 2134, 3116, 1435, 288, 377, 202, 5748, 23714, 6762, 273, 1381, 380, 4336, 31, 377, 202, 5748, 5043, 3995, 14910, 273, 4648, 380, 4752, 380, 15623, 67, 3009...
return new InsertBelowGroupAction( selection, Messages.getString( "InsertGroupActionFactory.label.insertGroup" ) );
return new InsertBelowGroupAction( selection, Messages .getString( "InsertGroupActionFactory.label.insertGroup" ) );
public static Action createInsertGroupAction( int slotID, List selection ) { if ( slotID == TableHandle.HEADER_SLOT || slotID == ListHandle.HEADER_SLOT ) { return new InsertAboveGroupAction( selection, Messages.getString( "InsertGroupActionFactory.label.insertGroup" ) ); //$NON-NLS-1$ } else if ( slotID == TableHandle.DETAIL_SLOT || slotID == ListHandle.DETAIL_SLOT ) { return new InsertBelowGroupAction( selection, Messages.getString( "InsertGroupActionFactory.label.insertGroup" ) ); //$NON-NLS-1$ } else { return new InsertBelowGroupAction( selection, Messages.getString( "InsertGroupActionFactory.label.insertGroup" ) ); //$NON-NLS-1$ } }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/f20dffa9abb940a955b0a18cf6914d4f48216b6c/InsertGroupActionFactory.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/editors/schematic/actions/InsertGroupActionFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 4382, 752, 4600, 1114, 1803, 12, 509, 4694, 734, 16, 987, 4421, 262, 202, 95, 202, 202, 430, 261, 4694, 734, 422, 3555, 3259, 18, 7557, 67, 55, 1502, 56, 9506, 202, 200...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 4382, 752, 4600, 1114, 1803, 12, 509, 4694, 734, 16, 987, 4421, 262, 202, 95, 202, 202, 430, 261, 4694, 734, 422, 3555, 3259, 18, 7557, 67, 55, 1502, 56, 9506, 202, 200...
doc1.getDocument(); doc2.getDocument(); doc3.getDocument(); doc4.getDocument();
doc1.getLength(); doc2.getLength(); doc3.getLength(); doc4.getLength();
public void testNumListeners(){ OpenDefinitionsDocument doc1 = _model.newFile(); OpenDefinitionsDocument doc2 = _model.newFile(); OpenDefinitionsDocument doc3 = _model.newFile(); OpenDefinitionsDocument doc4 = _model.newFile(); OpenDefinitionsDocument doc5 = _model.newFile(); int numDocListeners = doc1.getDocument().getDocumentListeners().length; int numUndoListeners = doc1.getDocument().getUndoableEditListeners().length; doc1.getDocument(); doc2.getDocument(); doc3.getDocument(); doc4.getDocument(); // this will kick document one out of the cache doc5.getDocument(); // this will reconstruct document 1 doc1.getDocument(); assertEquals("the number of document listeners is the same after reconstruction", numDocListeners, doc1.getDocument().getDocumentListeners().length); assertEquals("the number of undoableEditListeners is the same after reconstruction", numUndoListeners, doc1.getDocument().getUndoableEditListeners().length); }
11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/0ad47f4e9ecbbfc43121de14376bb3d222538453/DocumentCacheTest.java/clean/drjava/src/edu/rice/cs/drjava/model/cache/DocumentCacheTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1842, 2578, 5583, 1435, 95, 282, 3502, 7130, 2519, 997, 21, 273, 389, 2284, 18, 2704, 812, 5621, 282, 3502, 7130, 2519, 997, 22, 273, 389, 2284, 18, 2704, 812, 5621, 282, 350...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1842, 2578, 5583, 1435, 95, 282, 3502, 7130, 2519, 997, 21, 273, 389, 2284, 18, 2704, 812, 5621, 282, 3502, 7130, 2519, 997, 22, 273, 389, 2284, 18, 2704, 812, 5621, 282, 350...
LoggingSystem.getLogger(ReaderOOGL.class).log(Level.FINER,"Read "+numV+" vertices and "+numF+" faces");
LoggingSystem.getLogger(ReaderOOGL.class).log(Level.INFO,"Read "+numV+" vertices and "+numF+" faces");
private SceneGraphComponent loadOneLevel(StreamTokenizer st, int bracketDepth) { SceneGraphComponent current= null; //int bc = 0; //int oc =0; //int mode = 0; String name = "noName"; LoggingSystem.getLogger(ReaderOOGL.class).log(Level.FINER,"start."); try { st.nextToken(); if (st.ttype =='}') { return null; } if (st.ttype =='{') { SceneGraphComponent contents = loadOneLevel(st, bracketDepth+1); st.nextToken(); if (st.ttype != '}') { LoggingSystem.getLogger(ReaderOOGL.class).log(Level.FINER,"Unmatched left bracket at "+st.lineno()); return contents; } //else st.nextToken(); return contents; } if (bracketDepth > 0) { if (st.ttype == StreamTokenizer.TT_WORD && !isOOGLKeyword(st.sval)) { name = st.sval; st.nextToken(); } if (st.ttype == '=') { st.nextToken(); } else if (st.ttype == '<') { // read from file ReaderOOGL or = new ReaderOOGL(); st.nextToken(); Input in = input.getRelativeInput(st.sval); return or.read(in); } } //LoggingSystem.getLogger().log(Level.FINER,"next"); if (st.ttype ==StreamTokenizer.TT_WORD) { double[][] verts = null, vc = null, fc = null, vn = null, tc = null; if ( st.sval.indexOf("OFF") != -1) { boolean hasTC = st.sval.indexOf("ST") >= 0; boolean hasVC = st.sval.indexOf("C") >= 0; boolean hasVN = st.sval.indexOf("N") >= 0; int[][] indices = null; current =SceneGraphUtility.createFullSceneGraphComponent("OFF-node"); //LoggingSystem.getLogger().log(Level.FINER,"found object!"); int numV, numE, numF; int vLength = (st.sval.indexOf("4") != -1) ? 4 : 3; st.nextToken(); numV = Integer.parseInt(st.sval); st.nextToken(); numF = Integer.parseInt(st.sval); st.nextToken(); numE = Integer.parseInt(st.sval); verts = new double[numV][vLength]; indices = new int[numF][]; if (hasTC) tc = new double[numV][2]; if (hasVC) vc = new double[numV][4]; if (hasVN) vn = new double[numV][3]; for (int i=0; i<numV; ++i) { for (int j = 0; j<vLength; ++j) { st.nextToken(); //LoggingSystem.getLogger().log(Level.FINER,"Token is "+st.sval); verts[i][j] = Double.parseDouble(st.sval); } if (hasVN) for (int j = 0; j<3; ++j) { st.nextToken(); //LoggingSystem.getLogger().log(Level.FINER,"Token is "+st.sval); vn[i][j] = Double.parseDouble(st.sval); } if (hasVC) for (int j = 0; j<4; ++j) { st.nextToken(); //LoggingSystem.getLogger().log(Level.FINER,"Token is "+st.sval); vc[i][j] = Double.parseDouble(st.sval); } if (hasTC) for (int j = 0; j<2; ++j) { st.nextToken(); //LoggingSystem.getLogger().log(Level.FINER,"Token is "+st.sval); tc[i][j] = Double.parseDouble(st.sval); } } for (int i =0; i< numF; ++i) { st.nextToken(); int size = Integer.parseInt(st.sval); indices[i] = new int[size]; for (int j = 0; j<size; ++j) { st.nextToken(); //LoggingSystem.getLogger().log(Level.FINER,"Token is "+st.sval); indices[i][j] = Integer.parseInt(st.sval); } st.eolIsSignificant(true); st.nextToken(); if (st.ttype != StreamTokenizer.TT_EOL && st.ttype != StreamTokenizer.TT_EOF) { //has a color if (fc == null) fc = new double[numF][4]; //int colComps = Integer.parseInt(st.sval); for (int j = 0; j<4; ++j) { if (st.ttype == StreamTokenizer.TT_EOL || st.ttype == StreamTokenizer.TT_EOF) break; fc[i][j] = Double.parseDouble(st.sval); //LoggingSystem.getLogger().log(Level.FINER,"Token is "+st.sval); st.nextToken(); } // read the rest of the line if it hasnt' been read while (st.ttype != StreamTokenizer.TT_EOL && st.ttype != StreamTokenizer.TT_EOF) st.nextToken(); } st.eolIsSignificant(false); } LoggingSystem.getLogger(ReaderOOGL.class).log(Level.FINER,"Read "+numV+" vertices and "+numF+" faces"); IndexedFaceSetFactory ifsf = new IndexedFaceSetFactory(); ifsf.setVertexCount(verts.length); ifsf.setFaceCount(indices.length); ifsf.setVertexCoordinates(verts); ifsf.setFaceIndices(indices); if (vn != null) ifsf.setVertexNormals(vn); else ifsf.setGenerateVertexNormals(true); if (vc != null)ifsf.setVertexColors(vc); if (tc != null)ifsf.setVertexTextureCoordinates(tc); if (fc != null)ifsf.setFaceColors(fc); ifsf.setGenerateEdgesFromFaces(true); ifsf.setGenerateFaceNormals(true); ifsf.update(); IndexedFaceSet ifs = ifsf.getIndexedFaceSet();// IndexedFaceSetUtility.createIndexedFaceSetFrom(indices, verts, vn, vc, tc, null, fc); ifs.setName("OFF Geometry");// //GeometryUtility.calculateAndSetFaceNormals(ifs);// ifs.buildEdgesFromFaces(); current.setGeometry(ifs); } else if ( st.sval.indexOf("MESH") != -1) { current =SceneGraphUtility.createFullSceneGraphComponent("MESH-node"); boolean closedU = st.sval.indexOf("u") >= 0; boolean closedV = st.sval.indexOf("v") >= 0; boolean hasTC = st.sval.indexOf("ST") >= 0; boolean hasVC = st.sval.indexOf("C") >= 0; boolean hasVN = st.sval.indexOf("N") >= 0; int vLength = (st.sval.indexOf("4") != -1) ? 4 : 3; //LoggingSystem.getLogger().log(Level.FINER,"found object!"); st.nextToken(); int u = Integer.parseInt(st.sval); st.nextToken(); int v = Integer.parseInt(st.sval); int n = u*v; verts = new double[n][vLength]; if (hasTC) tc = new double[n][2]; if (hasVC) vc = new double[n][4]; if (hasVN) vn = new double[n][3]; for (int i = 0; i<n; ++i) { for (int j = 0; j<vLength; ++j) { st.nextToken(); //LoggingSystem.getLogger().log(Level.FINER,"Token is "+st.sval); verts[i][j] = Double.parseDouble(st.sval); } if (hasVN) for (int j = 0; j<3; ++j) { st.nextToken(); //LoggingSystem.getLogger().log(Level.FINER,"Token is "+st.sval); vn[i][j] = Double.parseDouble(st.sval); } if (hasVC) for (int j = 0; j<4; ++j) { st.nextToken(); //LoggingSystem.getLogger().log(Level.FINER,"Token is "+st.sval); vc[i][j] = Double.parseDouble(st.sval); } if (hasTC) for (int j = 0; j<2; ++j) { st.nextToken(); //LoggingSystem.getLogger().log(Level.FINER,"Token is "+st.sval); tc[i][j] = Double.parseDouble(st.sval); } } LoggingSystem.getLogger(ReaderOOGL.class).log(Level.FINER,"Read "+n+" vertices"); QuadMeshFactory qmf = new QuadMeshFactory();//u,v, closedU, closedV); qmf.setULineCount(u); qmf.setVLineCount(v); qmf.setClosedInUDirection(closedU); qmf.setClosedInVDirection(closedV); qmf.setVertexCoordinates(verts); if (hasVN) qmf.setVertexNormals(vn); else qmf.setGenerateVertexNormals(true); if (hasVC) qmf.setVertexColors(vc); if (hasTC) qmf.setVertexTextureCoordinates(tc); qmf.setGenerateEdgesFromFaces(true); qmf.setGenerateFaceNormals(true);// qms.setName("MESH Geometry");// IndexedFaceSetUtility.setIndexedFaceSetFrom(qms, null, verts, vn, vc, tc, null, fc);// //qms.setVertexAttributes(Attribute.COORDINATES, StorageModel.DOUBLE_ARRAY.array(vLength).createReadOnly(verts));// qms.buildEdgesFromFaces(); //GeometryUtility.calculateAndSetNormals(qms); qmf.update(); IndexedFaceSet mesh = qmf.getIndexedFaceSet(); mesh.setName("OOGL MESH"); current.setGeometry(mesh); } else if ( st.sval.indexOf("VECT") != -1) { current =SceneGraphUtility.createFullSceneGraphComponent("VECT-node"); //LoggingSystem.getLogger().log(Level.FINER,"found object!"); st.nextToken(); int numCurves = Integer.parseInt(st.sval); st.nextToken(); int totalVerts = Integer.parseInt(st.sval); int[] sizes = new int[numCurves]; int[] colors = new int[numCurves]; boolean[] closed = new boolean[numCurves]; int vLength = 3; int[][] indices = new int[numCurves][]; int vertCount = 0; for (int i = 0; i<numCurves; ++i) { st.nextToken(); int realCount = 0; //LoggingSystem.getLogger().log(Level.FINER,"Token is "+st.sval); int val = Integer.parseInt(st.sval); if (val < 0) { val = sizes[i] = -val; realCount = sizes[i] + 1; closed[i] = true; } else { sizes[i] = val; closed[i] = false; realCount = sizes[i]; } indices[i] = new int[realCount]; for (int j =0; j< val; ++j) { indices[i][j] = vertCount+j; } if (closed[i]) indices[i][val] = vertCount; vertCount += val; } int totalColors = 0; for (int i = 0; i<numCurves; ++i) { st.nextToken(); //LoggingSystem.getLogger().log(Level.FINER,"Token is "+st.sval); colors[i] = Integer.parseInt(st.sval); totalColors += colors[i]; } verts = new double[totalVerts][vLength]; vc = new double[totalVerts][4]; for (int i = 0; i<totalVerts; ++i) { for (int j = 0; j<vLength; ++j) { st.nextToken(); //LoggingSystem.getLogger().log(Level.FINER,"Token is "+st.sval); verts[i][j] = Double.parseDouble(st.sval); } } // parse the colors now int vertC = 0; for (int i = 0; i<numCurves; ++i) { int j; for (j = 0; j<colors[i]; ++j) { for (int k = 0; k<4; ++k) { st.nextToken(); vc[vertC][k] = Double.parseDouble(st.sval); } vertC++; } for ( ; j< sizes[i]; ++j) { for (int k = 0; k<4; ++k) { vc[vertC][k] = vc[vertC-1][k]; } vertC++; } } LoggingSystem.getLogger(ReaderOOGL.class).log(Level.FINER,"Read "+numCurves+" curves and "+totalVerts+ " vertices"); IndexedLineSet ils = new IndexedLineSet(totalVerts); ils.setName("VECT Geometry"); ils.setVertexAttributes(Attribute.COORDINATES, StorageModel.DOUBLE_ARRAY.array(vLength).createReadOnly(verts)); ils.setVertexAttributes(Attribute.COLORS, StorageModel.DOUBLE_ARRAY.array(4).createReadOnly(vc)); ils.setEdgeCountAndAttributes(Attribute.INDICES, StorageModel.INT_ARRAY.array().createReadOnly(indices)); current.setGeometry(ils); } else if ( st.sval.indexOf("SPHERE") != -1) { double[] x = new double[4]; for (int i = 0; i<4; ++i) { st.nextToken(); x[i] = Double.parseDouble(st.sval); } current = Primitives.sphere(x[0], x[1], x[2], x[3]); current.setName("SPHERE-node"); } else if ( st.sval.indexOf("TLIST") != -1) { current =SceneGraphUtility.createFullSceneGraphComponent("TLIST-node"); boolean transposed = (st.sval.indexOf("FLIP") != -1); if (transposed) LoggingSystem.getLogger(ReaderOOGL.class).log(Level.FINER,"Matrices are trasnposed"); double[] mat = new double[16]; boolean reading = true; int count = 0; while ( reading ) { for (int j = 0; j<16; ++j) { st.nextToken(); if (st.ttype != StreamTokenizer.TT_WORD) {reading = false; break;} mat[j] = Double.parseDouble(st.sval); } if (transposed) Rn.transpose(mat,mat); if (reading == false) break; SceneGraphComponent sgc = new SceneGraphComponent(); sgc.setName("tlist child"+count++); sgc.setTransformation(new Transformation(mat)); //LoggingSystem.getLogger().log(Level.FINER,"Matrix read: "+Rn.matrixToString(mat)); current.addChild(sgc); } } else if ( st.sval.indexOf("LIST") != -1) { current =SceneGraphUtility.createFullSceneGraphComponent("LIST-node"); SceneGraphComponent child; while ( (child = loadOneLevel(st, bracketDepth)) != null) { current.addChild( child); } } else if ( st.sval.indexOf("INST") != -1) { current =SceneGraphUtility.createFullSceneGraphComponent("INST-node"); SceneGraphComponent geom =SceneGraphUtility.createFullSceneGraphComponent("INST-unit"); st.nextToken(); if (st.ttype != StreamTokenizer.TT_WORD) { LoggingSystem.getLogger(ReaderOOGL.class).log(Level.FINER,"Invalid type in INST: "+st.ttype); return null; } // we require that the geometry comes first if (st.sval.indexOf("unit") != -1 || st.sval.indexOf("geom") != -1) { geom = loadOneLevel(st, bracketDepth); } st.nextToken(); //while (st.ttype == '}') st.nextToken(); // followed by the matrices if (st.sval.indexOf("tlist") != -1 || st.sval.indexOf("transform") != -1) { current = loadOneLevel(st, bracketDepth); } for (int i = 0; i<current.getChildComponentCount(); ++i) { SceneGraphComponent cc = current.getChildComponent(i); cc.addChild(geom); } } //current.setName(name); } } catch (IOException e) { e.printStackTrace(); } if (current!= null) { LoggingSystem.getLogger(ReaderOOGL.class).log(Level.FINER,"made "+current.getChildComponentCount()+" components"); LoggingSystem.getLogger(ReaderOOGL.class).log(Level.FINER,"done."); } return current; }
25560 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25560/c01f05493a57d3e204a3847b8bf0066d745c8b47/ReaderOOGL.java/clean/src-io/de/jreality/reader/ReaderOOGL.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 29347, 4137, 1841, 1262, 3335, 2355, 12, 1228, 10524, 384, 16, 509, 9843, 6148, 13, 225, 288, 4202, 29347, 4137, 1841, 783, 33, 446, 31, 1377, 368, 474, 6533, 273, 374, 31, 1377, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 29347, 4137, 1841, 1262, 3335, 2355, 12, 1228, 10524, 384, 16, 509, 9843, 6148, 13, 225, 288, 4202, 29347, 4137, 1841, 783, 33, 446, 31, 1377, 368, 474, 6533, 273, 374, 31, 1377, ...
private Intersection[] lineQuadIntersect(LineSegment l, QuadSegment c)
Intersection[] lineQuadIntersect(LineSegment l, QuadSegment c)
private Intersection[] lineQuadIntersect(LineSegment l, QuadSegment c) { double[] y = new double[3]; double[] x = new double[3]; double[] r = new double[3]; int nRoots; double x0 = c.P1.getX(); double y0 = c.P1.getY(); double x1 = c.cp.getX(); double y1 = c.cp.getY(); double x2 = c.P2.getX(); double y2 = c.P2.getY(); double lx0 = l.P1.getX(); double ly0 = l.P1.getY(); double lx1 = l.P2.getX(); double ly1 = l.P2.getY(); double dx = lx1 - lx0; double dy = ly1 - ly0; // form r(t) = y(t) - x(t) for the bezier y[0] = y0; y[1] = 2 * (y1 - y0); y[2] = (y2 - 2 * y1 + y0); x[0] = x0; x[1] = 2 * (x1 - x0); x[2] = (x2 - 2 * x1 + x0); // a point, not a line if (dy == 0 && dx == 0) return null; // line on y axis if (dx == 0 || (dy / dx) > 1.0) { double k = dx / dy; x[0] -= lx0; y[0] -= ly0; y[0] *= k; y[1] *= k; y[2] *= k; } else { double k = dy / dx; x[0] -= lx0; y[0] -= ly0; x[0] *= k; x[1] *= k; x[2] *= k; } for (int i = 0; i < 3; i++) r[i] = y[i] - x[i]; if ((nRoots = QuadCurve2D.solveQuadratic(r)) > 0) { Intersection[] temp = new Intersection[nRoots]; int intersections = 0; for (int i = 0; i < nRoots; i++) { double t = r[i]; if (t >= 0.0 && t <= 1.0) { Point2D p = c.evaluatePoint(t); // if the line is on an axis, snap the point to that axis. if (dx == 0) p.setLocation(lx0, p.getY()); if (dy == 0) p.setLocation(p.getX(), ly0); if (p.getX() <= Math.max(lx0, lx1) && p.getX() >= Math.min(lx0, lx1) && p.getY() <= Math.max(ly0, ly1) && p.getY() >= Math.min(ly0, ly1)) { double lineparameter = p.distance(l.P1) / l.P2.distance(l.P1); temp[i] = new Intersection(p, lineparameter, t); intersections++; } } else temp[i] = null; } if (intersections == 0) return null; Intersection[] rValues = new Intersection[intersections]; for (int i = 0; i < nRoots; i++) if (temp[i] != null) rValues[--intersections] = temp[i]; return (rValues); } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/01dce648448be461531cfd95f93f9421282da0f4/Area.java/clean/core/src/classpath/java/java/awt/geom/Area.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 5294, 3464, 8526, 980, 24483, 22541, 12, 1670, 4131, 328, 16, 27258, 4131, 276, 13, 225, 288, 565, 1645, 8526, 677, 273, 394, 1645, 63, 23, 15533, 565, 1645, 8526, 619, 273, 394, 1645, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 5294, 3464, 8526, 980, 24483, 22541, 12, 1670, 4131, 328, 16, 27258, 4131, 276, 13, 225, 288, 565, 1645, 8526, 677, 273, 394, 1645, 63, 23, 15533, 565, 1645, 8526, 619, 273, 394, 1645, ...
int total_turns;
public static TurnVectors generateTurnOrder(Vector v, boolean infLast) { int[] num_inf_turns = new int[v.size()]; int[] num_oth_turns = new int[v.size()]; int total_inf_turns = 0; int total_oth_turns = 0; int idx; int total_turns; TurnOrdered[] order = new TurnOrdered[v.size()]; int oi = 0; com.sun.java.util.collections.ArrayList plist = new com.sun.java.util.collections.ArrayList(v.size()); for (Enumeration i = v.elements(); i.hasMoreElements();) { Object item = i.nextElement(); plist.add(item); } com.sun.java.util.collections.Collections.sort(plist, new com.sun.java.util.collections.Comparator() { public int compare(Object o1, Object o2) { return ((TurnOrdered)o1).getInitiative().compareTo(((TurnOrdered)o2).getInitiative()); } }); for (com.sun.java.util.collections.Iterator i = plist.iterator(); i.hasNext();) { final TurnOrdered item = (TurnOrdered)i.next(); order[oi] = item; // If infantry are last, separate them. Otherwise, place all 'turns' in one pile if (infLast) { num_inf_turns[oi] = item.getInfantryCount(); num_oth_turns[oi] = item.getTankCount() + item.getMechCount(); } else { num_inf_turns[oi] = 0; num_oth_turns[oi] = item.getTankCount() + item.getMechCount() + item.getInfantryCount(); } total_inf_turns += num_inf_turns[oi]; total_oth_turns += num_oth_turns[oi]; oi++; } int min; int turns_left; TurnVectors turns = new TurnVectors(total_oth_turns, total_inf_turns); // We will do the 'other' units first (mechs and vehicles, and if infLast is false, // infantry ) min = Integer.MAX_VALUE; for(idx = 0; idx < oi ; idx++) { if ( num_oth_turns[idx] != 0 && num_oth_turns[idx] < min) min = num_oth_turns[idx]; } turns_left = total_oth_turns; while(turns_left > 0) { for(idx = 0; idx < oi; idx++) { // If you have no turns here, skip if (num_oth_turns[idx] == 0) continue; /* If you have less than twice the lowest, move 1. Otherwise, move more. */ int ntm = (int)Math.floor( ((double)num_oth_turns[idx]) / ((double)min) ); for (int j = 0; j < ntm; j++) { turns.non_infantry.addElement(order[idx]); num_oth_turns[idx]--; turns_left--; } } // Since the smallest unit count had to place 1, reduce min) min--; } // Now, we do the 'infantry' turns. if (infLast) { min = Integer.MAX_VALUE; for(idx = 0; idx < oi ; idx++) { if ( num_inf_turns[idx] != 0 && num_inf_turns[idx] < min) min = num_inf_turns[idx]; } turns_left = total_inf_turns; while(turns_left > 0) { for(idx = 0; idx < oi; idx++) { // If you have no turns here, skip if (num_inf_turns[idx] == 0) continue; /* If you have less than twice the lowest, move 1. Otherwise, move more. */ int ntm = (int)Math.floor( ((double)num_inf_turns[idx]) / ((double)min) ); for (int j = 0; j < ntm; j++) { turns.infantry.addElement(order[idx]); num_inf_turns[idx]--; turns_left--; } } // Since the smallest unit count had to place 1, reduce min) min--; } } return turns; }
3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/bc9da7d46e4b55dcede8f1bf0689bdc3fe6eaa51/TurnOrdered.java/clean/megamek/src/megamek/common/TurnOrdered.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 22425, 21680, 2103, 15858, 2448, 12, 5018, 331, 16, 1250, 8286, 3024, 13, 565, 288, 202, 474, 8526, 818, 67, 10625, 67, 20922, 87, 273, 394, 509, 63, 90, 18, 1467, 1435, 1553...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 22425, 21680, 2103, 15858, 2448, 12, 5018, 331, 16, 1250, 8286, 3024, 13, 565, 288, 202, 474, 8526, 818, 67, 10625, 67, 20922, 87, 273, 394, 509, 63, 90, 18, 1467, 1435, 1553...
getLogger().warn("Exception during updating " + this.uri, e);
getLogger().warn("Exception during updating of source " + this.uri, e);
public void execute(String name) { if (this.uri != null) { if (this.getLogger().isInfoEnabled()) { this.getLogger().info("Refreshing " + this.uri); } Source source = null; Cache cache = null; try { cache = (Cache) this.manager.lookup(this.cacheRole); source = this.resolver.resolveURI(this.uri); CachedSourceResponse response = (CachedSourceResponse) cache.get(this.cacheKey); if (source.exists()) { // what is in the cached response? byte[] binary = null; byte[] xml = null; if (response != null) { binary = response.getBinaryResponse(); xml = response.getXMLResponse(); } // create a new cached response response = new CachedSourceResponse(new ExpiresValidity(this.expires * 1000)); // only create objects that have previously been used if (binary != null) { binary = CachingSource.readBinaryResponse(source); response.setBinaryResponse(binary); } if (xml != null) { xml = CachingSource.readXMLResponse(source, binary, this.manager); response.setXMLResponse(xml); } // meta info is always set response.setExtra(CachingSource.readMeta(source)); cache.store(this.cacheKey, response); } else if (response != null) { cache.remove(this.cacheKey); } } catch (Exception e) { if (!failSafe) { // the content expires, so remove it cache.remove(cacheKey); getLogger().warn("Exception during updating " + this.uri, e); } else { getLogger().warn("Updating of source " + this.uri + " failed. " + "Cached response (if any) will be stale.", e); } } finally { this.resolver.release(source); this.manager.release(cache); } } }
46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/9fb35dbd67fa18397a5003bdb164f13e61b2899a/UpdateTarget.java/buggy/src/blocks/scratchpad/java/org/apache/cocoon/components/source/impl/UpdateTarget.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1836, 12, 780, 508, 13, 288, 3639, 309, 261, 2211, 18, 1650, 480, 446, 13, 288, 5411, 309, 261, 2211, 18, 588, 3328, 7675, 291, 966, 1526, 10756, 288, 7734, 333, 18, 588, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1836, 12, 780, 508, 13, 288, 3639, 309, 261, 2211, 18, 1650, 480, 446, 13, 288, 5411, 309, 261, 2211, 18, 588, 3328, 7675, 291, 966, 1526, 10756, 288, 7734, 333, 18, 588, 3...
new javax.xml.namespace.QName("http: "org.genepattern.webservice.WebServiceException", new javax.xml.namespace.QName("http: true ));
new javax.xml.namespace.QName( "http: "fault"), "org.genepattern.webservice.WebServiceException", new javax.xml.namespace.QName( "http: "WebServiceException"), true));
private static void _initOperationDesc1(){ org.apache.axis.description.OperationDesc oper; org.apache.axis.description.ParameterDesc param; oper = new org.apache.axis.description.OperationDesc(); oper.setName("clone"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "lsid"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false); oper.addParameter(param); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "name"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false); oper.addParameter(param); oper.setReturnType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string")); oper.setReturnClass(java.lang.String.class); oper.setReturnQName(new javax.xml.namespace.QName("", "cloneReturn")); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); oper.addFault(new org.apache.axis.description.FaultDesc( new javax.xml.namespace.QName("http://localhost:8080/gp/services/TaskIntegrator", "fault"), "org.genepattern.webservice.WebServiceException", new javax.xml.namespace.QName("http://webservice.genepattern.org", "WebServiceException"), true )); _operations[0] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("delete"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "lsid"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false); oper.addParameter(param); oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); oper.addFault(new org.apache.axis.description.FaultDesc( new javax.xml.namespace.QName("http://localhost:8080/gp/services/TaskIntegrator", "fault"), "org.genepattern.webservice.WebServiceException", new javax.xml.namespace.QName("http://webservice.genepattern.org", "WebServiceException"), true )); _operations[1] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("install"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "lsid"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false); oper.addParameter(param); oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); oper.addFault(new org.apache.axis.description.FaultDesc( new javax.xml.namespace.QName("http://localhost:8080/gp/services/TaskIntegrator", "fault"), "org.genepattern.webservice.WebServiceException", new javax.xml.namespace.QName("http://webservice.genepattern.org", "WebServiceException"), true )); _operations[2] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("errorMessage"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "message"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false); oper.addParameter(param); oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[3] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("deleteTask"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "lsid"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false); oper.addParameter(param); oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); oper.addFault(new org.apache.axis.description.FaultDesc( new javax.xml.namespace.QName("http://localhost:8080/gp/services/TaskIntegrator", "fault"), "org.genepattern.webservice.WebServiceException", new javax.xml.namespace.QName("http://webservice.genepattern.org", "WebServiceException"), true )); _operations[4] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("installTask"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "lsid"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false); oper.addParameter(param); oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); oper.addFault(new org.apache.axis.description.FaultDesc( new javax.xml.namespace.QName("http://localhost:8080/gp/services/TaskIntegrator", "fault"), "org.genepattern.webservice.WebServiceException", new javax.xml.namespace.QName("http://webservice.genepattern.org", "WebServiceException"), true )); _operations[5] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("statusMessage"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "message"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false); oper.addParameter(param); oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[6] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("beginProgress"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "message"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false); oper.addParameter(param); oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[7] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("continueProgress"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "percentComplete"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false); oper.addParameter(param); oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[8] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("endProgress"); oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[9] = oper; }
57344 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57344/4a820be38a9edc1276f2a21752f65f71b51690d6/TaskIntegratorSoapBindingStub.java/clean/src/org/genepattern/webservice/TaskIntegratorSoapBindingStub.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 918, 389, 2738, 2988, 4217, 21, 1435, 95, 3639, 2358, 18, 19211, 18, 4890, 18, 3384, 18, 2988, 4217, 2255, 31, 3639, 2358, 18, 19211, 18, 4890, 18, 3384, 18, 1662, 4217, 579,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 918, 389, 2738, 2988, 4217, 21, 1435, 95, 3639, 2358, 18, 19211, 18, 4890, 18, 3384, 18, 2988, 4217, 2255, 31, 3639, 2358, 18, 19211, 18, 4890, 18, 3384, 18, 1662, 4217, 579,...