rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
page.paintBorder(c, PAGE_PAINTING_CLEARANCE);
page.paintBorder(c, PAGE_PAINTING_CLEARANCE, Layer.PAGED_MODE_SCREEN);
private void paintPagedView(RenderingContext c, Layer root) { if (root.getLastPage() == null) { return; } root.assignPagePaintingPositions( c, Layer.PAGED_MODE_SCREEN, PAGE_PAINTING_CLEARANCE); setPreferredSize(new Dimension( root.getMaxPageWidth(c, PAGE_PAINTING_CLEARANCE), root.getLastPage().getPaintingBottom() + PAGE_PAINTING_CLEARANCE)); revalidate(); Graphics2D g = ((Java2DOutputDevice)c.getOutputDevice()).getGraphics(); Shape working = g.getClip(); List pages = root.getPages(); c.setPageCount(pages.size()); for (int i = 0; i < pages.size(); i++) { PageBox page = (PageBox)pages.get(i); c.setPage(i, page); g.setClip(working); Rectangle overall = page.getOverallPaintingBounds(c, PAGE_PAINTING_CLEARANCE); overall.x -= 1; overall.y -= 1; overall.width += 1; overall.height += 1; Rectangle bounds = new Rectangle(overall); bounds.width += 1; bounds.height += 1; if (working.intersects(bounds)) { Color old = g.getColor(); g.setColor(Color.BLACK); g.drawRect(overall.x, overall.y, overall.width, overall.height); g.setColor(old); Rectangle content = page.getPagedViewClippingBounds(c, PAGE_PAINTING_CLEARANCE); g.clip(content); int left = PAGE_PAINTING_CLEARANCE + page.getStyle().getMarginBorderPadding(c, CalculatedStyle.LEFT); int top = page.getPaintingTop() + page.getStyle().getMarginBorderPadding(c, CalculatedStyle.TOP) - page.getTop(); g.translate(left, top); root.paint(c, 0, 0); g.translate(-left, -top); g.setClip(working); page.paintAlternateFlows(c, root, Layer.PAGED_MODE_SCREEN, PAGE_PAINTING_CLEARANCE); page.paintBorder(c, PAGE_PAINTING_CLEARANCE); } } g.setClip(working); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/e887a17fc3203362d3f56c4a2b337639be435104/BasicPanel.java/clean/src/java/org/xhtmlrenderer/swing/BasicPanel.java
public Iterator<IMapEntry> iterator() {
public Iterator iterator() {
public Iterator<IMapEntry> iterator() { return new Iter(array);}
52334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52334/3e18fcb60b00f869f74b112af5b5d90b9a9edba0/PersistentHashtableMap.java/buggy/src/org/clojure/runtime/PersistentHashtableMap.java
public void init(ServletConfig sc) throws ServletException {
public void init(ServletConfig config) throws ServletException {
public void init(ServletConfig sc) throws ServletException { synchronized (CaptchaServlet.class) { super.init(sc); try { WordList wordList = new WordList(Locale.getDefault()); Iterator itr = WordsUtil.getDictionary().iterator(); while (itr.hasNext()) { wordList.addWord((String)itr.next()); } WordGenerator wordGenerator = new DictionaryWordGenerator( new WordListDictionnary(wordList)); Integer width = new Integer(300); Integer height = new Integer(100); Integer minFontSize = new Integer(45); Integer maxFontSize = new Integer(45); Integer minWordLength = new Integer(6); Integer maxWordLength = new Integer(8); Color textColor = Color.WHITE; _engine = new MultipleGimpyEngine( wordGenerator, width, height, minFontSize, maxFontSize, minWordLength, maxWordLength, textColor); } catch (Exception e) { e.printStackTrace(); } } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/040c2681e4d9add708033fd90dece3a20844ca53/CaptchaServlet.java/buggy/portal-ejb/src/com/liferay/portal/servlet/CaptchaServlet.java
super.init(sc);
super.init(config);
public void init(ServletConfig sc) throws ServletException { synchronized (CaptchaServlet.class) { super.init(sc); try { WordList wordList = new WordList(Locale.getDefault()); Iterator itr = WordsUtil.getDictionary().iterator(); while (itr.hasNext()) { wordList.addWord((String)itr.next()); } WordGenerator wordGenerator = new DictionaryWordGenerator( new WordListDictionnary(wordList)); Integer width = new Integer(300); Integer height = new Integer(100); Integer minFontSize = new Integer(45); Integer maxFontSize = new Integer(45); Integer minWordLength = new Integer(6); Integer maxWordLength = new Integer(8); Color textColor = Color.WHITE; _engine = new MultipleGimpyEngine( wordGenerator, width, height, minFontSize, maxFontSize, minWordLength, maxWordLength, textColor); } catch (Exception e) { e.printStackTrace(); } } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/040c2681e4d9add708033fd90dece3a20844ca53/CaptchaServlet.java/buggy/portal-ejb/src/com/liferay/portal/servlet/CaptchaServlet.java
throw new TypeError(getRuntime(), "not a java array");
throw getRuntime().newTypeError("not a java array");
public IRubyObject aref(IRubyObject index) { throw new TypeError(getRuntime(), "not a java array"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/JavaObject.java/clean/src/org/jruby/javasupport/JavaObject.java
throw new TypeError(getRuntime(), "not a java array");
throw getRuntime().newTypeError("not a java array");
public IRubyObject aset(IRubyObject index, IRubyObject value) { throw new TypeError(getRuntime(), "not a java array"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/JavaObject.java/clean/src/org/jruby/javasupport/JavaObject.java
return RubyFixnum.newFixnum(runtime, value == null ? 0 : value.hashCode());
return getRuntime().newFixnum(value == null ? 0 : value.hashCode());
public RubyFixnum hash() { return RubyFixnum.newFixnum(runtime, value == null ? 0 : value.hashCode()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/JavaObject.java/clean/src/org/jruby/javasupport/JavaObject.java
return RubyString.newString(getRuntime(), getJavaClass().getName());
return getRuntime().newString(getJavaClass().getName());
public RubyString java_type() { return RubyString.newString(getRuntime(), getJavaClass().getName()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/JavaObject.java/clean/src/org/jruby/javasupport/JavaObject.java
throw new TypeError(getRuntime(), "not a java array");
throw getRuntime().newTypeError("not a java array");
public RubyFixnum length() { throw new TypeError(getRuntime(), "not a java array"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/JavaObject.java/clean/src/org/jruby/javasupport/JavaObject.java
return RubyString.newString(runtime,
return getRuntime().newString(
public RubyString to_s() { return RubyString.newString(runtime, value == null ? "null" : value.toString()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/JavaObject.java/clean/src/org/jruby/javasupport/JavaObject.java
int n = 0; int possibleWrap; boolean lastLenCheck = false; while (true) { possibleWrap = n; n = currentString.indexOf(WhitespaceStripper.SPACE, n + 1); if (n == -1) { break;
int left = 0; int right = currentString.indexOf(WhitespaceStripper.SPACE, left+1); int lastWrap = 0; int graphicsLength = 0; while(right > 0 && graphicsLength <= avail) { graphicsLength += FontUtil.len(c, currentString.substring(left, right), font); lastWrap = left; left = right; right = currentString.indexOf(WhitespaceStripper.SPACE, left+1); } if(right < 0) { graphicsLength += FontUtil.len(c, currentString.substring(left), font); } if(graphicsLength <= avail) { return; } if (lastWrap != 0) { inline.setSubstring(inline.start_index, inline.start_index + lastWrap); inline.break_after = true; } else { if(left == 0) left = currentString.length(); inline.setSubstring(inline.start_index, inline.start_index + left); if (prev_align != null && !prev_align.break_after) { inline.break_before = true; } else { inline.break_after = true;
public static void breakText(Context c, InlineTextBox inline, InlineBox prev_align, int avail, Font font) { boolean db = false; if (db) { Uu.p("========================="); Uu.p("breaking: " + inline); //Uu.p("breaking : '" + inline.getSubstring() + "'"); //Uu.p("avail = " + avail); //Uu.p("max = " + max); //Uu.p("prev align = " + prev_align); } //inline.setFont(font); // ====== handle nowrap if (inline.whitespace == IdentValue.NOWRAP) { return; } //check if we should break on the next newline if (inline.whitespace == IdentValue.PRE || inline.whitespace == IdentValue.PRE_WRAP || inline.whitespace == IdentValue.PRE_LINE) { // Uu.p("doing a pre line"); int n = inline.getSubstring().indexOf(WhitespaceStripper.EOL); // Uu.p("got eol at: " + n); if (n > -1) { inline.end_index = inline.start_index + n + 1; inline.break_after = true; } } //check if we may wrap if (inline.whitespace == IdentValue.PRE) { return; } String currentString = inline.getSubstring(); int n = 0; int possibleWrap; boolean lastLenCheck = false; while (true) { possibleWrap = n; n = currentString.indexOf(WhitespaceStripper.SPACE, n + 1); if (n == -1) { break; } lastLenCheck = FontUtil.len(c, currentString.substring(0, n), font) > avail; if (lastLenCheck) { break; } } if (n == -1 && FontUtil.len(c, currentString, font) <= avail) { return; } if (possibleWrap == 0) { if (lastLenCheck) { n = 0; } else { possibleWrap = currentString.length(); } } // (0 is a boundary condition when the first was a space) if (n <= 0) {//unbreakable string inline.setSubstring(inline.start_index, inline.start_index + possibleWrap);//the best we can do if (prev_align != null && !prev_align.break_after) { inline.break_before = true; }//else {//I think this else should be here? inline.break_after = true; //} } else {//found a place to wrap inline.setSubstring(inline.start_index, inline.start_index + possibleWrap); inline.break_after = true; } return; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/67207a960b40ad6a0d6bd9b265e6deb61ef398b2/Breaker.java/buggy/src/java/org/xhtmlrenderer/layout/inline/Breaker.java
lastLenCheck = FontUtil.len(c, currentString.substring(0, n), font) > avail; if (lastLenCheck) { break; } } if (n == -1 && FontUtil.len(c, currentString, font) <= avail) { return; } if (possibleWrap == 0) { if (lastLenCheck) { n = 0; } else { possibleWrap = currentString.length(); } } if (n <= 0) { inline.setSubstring(inline.start_index, inline.start_index + possibleWrap); if (prev_align != null && !prev_align.break_after) { inline.break_before = true; } inline.break_after = true; } else { inline.setSubstring(inline.start_index, inline.start_index + possibleWrap); inline.break_after = true; }
}
public static void breakText(Context c, InlineTextBox inline, InlineBox prev_align, int avail, Font font) { boolean db = false; if (db) { Uu.p("========================="); Uu.p("breaking: " + inline); //Uu.p("breaking : '" + inline.getSubstring() + "'"); //Uu.p("avail = " + avail); //Uu.p("max = " + max); //Uu.p("prev align = " + prev_align); } //inline.setFont(font); // ====== handle nowrap if (inline.whitespace == IdentValue.NOWRAP) { return; } //check if we should break on the next newline if (inline.whitespace == IdentValue.PRE || inline.whitespace == IdentValue.PRE_WRAP || inline.whitespace == IdentValue.PRE_LINE) { // Uu.p("doing a pre line"); int n = inline.getSubstring().indexOf(WhitespaceStripper.EOL); // Uu.p("got eol at: " + n); if (n > -1) { inline.end_index = inline.start_index + n + 1; inline.break_after = true; } } //check if we may wrap if (inline.whitespace == IdentValue.PRE) { return; } String currentString = inline.getSubstring(); int n = 0; int possibleWrap; boolean lastLenCheck = false; while (true) { possibleWrap = n; n = currentString.indexOf(WhitespaceStripper.SPACE, n + 1); if (n == -1) { break; } lastLenCheck = FontUtil.len(c, currentString.substring(0, n), font) > avail; if (lastLenCheck) { break; } } if (n == -1 && FontUtil.len(c, currentString, font) <= avail) { return; } if (possibleWrap == 0) { if (lastLenCheck) { n = 0; } else { possibleWrap = currentString.length(); } } // (0 is a boundary condition when the first was a space) if (n <= 0) {//unbreakable string inline.setSubstring(inline.start_index, inline.start_index + possibleWrap);//the best we can do if (prev_align != null && !prev_align.break_after) { inline.break_before = true; }//else {//I think this else should be here? inline.break_after = true; //} } else {//found a place to wrap inline.setSubstring(inline.start_index, inline.start_index + possibleWrap); inline.break_after = true; } return; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/67207a960b40ad6a0d6bd9b265e6deb61ef398b2/Breaker.java/buggy/src/java/org/xhtmlrenderer/layout/inline/Breaker.java
log().verbose(
log().debug(
public Upload queueUpload(Member from, RequestDownload dl) { if (dl == null || dl.file == null) { throw new NullPointerException("Downloadrequest/File is null"); } // Never upload db files !! if (Folder.DB_FILENAME.equalsIgnoreCase(dl.file.getName()) || Folder.DB_BACKUP_FILENAME.equalsIgnoreCase(dl.file.getName())) { log() .error( from.getNick() + " has illegally requested to download a folder database file"); return null; } Upload oldUpload = null; Upload upload = new Upload(this, from, dl); if (upload.isBroken()) { // Check if this download is broken return null; } // Check if we have a old upload to break synchronized (activeUploads) { synchronized (queuedUploads) { int oldUploadIndex = activeUploads.indexOf(upload); if (oldUploadIndex >= 0) { oldUpload = activeUploads.get(oldUploadIndex); activeUploads.remove(oldUploadIndex); } oldUploadIndex = queuedUploads.indexOf(upload); if (oldUploadIndex >= 0) { if (oldUpload != null) { // Should never happen throw new IllegalStateException("Found illegal upload. is in list of queued AND active uploads: " + oldUpload); } oldUpload = queuedUploads.get(oldUploadIndex); queuedUploads.remove(oldUploadIndex); } } } if (oldUpload != null) { log().warn( "Received already known download request for " + dl.file + " from " + from.getNick() + ", overwriting old request"); // Stop former upload request oldUpload.abort(); oldUpload.shutdown(); setBroken(oldUpload); } synchronized (queuedUploads) { log().verbose( "Upload enqueud: " + dl.file + ", startOffset: " + dl.startOffset + ", to: " + from); queuedUploads.add(upload); } // If upload is not started, tell peer if (!upload.isStarted()) { from.sendMessageAsynchron(new DownloadQueued(upload.getFile()), null); } if (!upload.isBroken()) { fireUploadRequested(new TransferManagerEvent(this, upload)); } // Trigger working thread triggerTransfersCheck(); return upload; }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/6bcf13ec3614a91a953cd24aee9de2681ded44fd/TransferManager.java/buggy/src/main/de/dal33t/powerfolder/transfer/TransferManager.java
&& (newNode.getConnectAddress() != null)
public void queueNewNodes(MemberInfo[] newNodes) { if (newNodes == null || newNodes.length == 0) { return; } // queue new members if (logVerbose) { log().verbose("Received new list of " + newNodes.length + " nodes"); } int nNewNodes = 0; int nQueuedNodes = 0; for (int i = 0; i < newNodes.length; i++) { MemberInfo newNode = newNodes[i]; // just check, for a faster shutdown if (Thread.currentThread().isInterrupted()) { return; } if (newNode == null || newNode.isInvalid(getController())) { // Member is too old, ignore if (logVerbose) { log().verbose("Not adding new node: " + newNode); } continue; } Member thisNode = getNode(newNode); if (newNode.matches(mySelf)) { // ignore myself continue; } else if (getController().isLanOnly() && !NetworkUtil.isOnLanOrLoopback(newNode.getConnectAddress() .getAddress())) { // ignore if lan only mode && newNode not is onlan continue; } else if (thisNode == null) { // add node thisNode = addNode(newNode); nNewNodes++; } else { // update own information if more valueable thisNode.updateInfo(newNode); } if (newNode.isConnected) { // Node is connected to the network thisNode.setConnectedToNetwork(newNode.isConnected); synchronized (reconnectionQueue) { // Add node to reconnection queue if (!thisNode.isReconnecting() && reconnectionQueue.indexOf(thisNode) < 0) { reconnectionQueue.add(thisNode); nQueuedNodes++; } } } } if (nQueuedNodes > 0 || nNewNodes > 0) { if (nQueuedNodes > 0) { // Resort reconnection queue synchronized (reconnectionQueue) { Collections.sort(reconnectionQueue, MemberComparator.BY_RECONNECTION_PRIORITY); } } if (logVerbose) { log().verbose( "Queued " + nQueuedNodes + " new nodes for reconnection, " + nNewNodes + " added"); } } }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/fe68691125b55cde659a9e7ef72a60ae4aa6701a/NodeManager.java/buggy/src/main/de/dal33t/powerfolder/net/NodeManager.java
RuntimePortletUtil.processPortlet( renderPortletSB, ctx, req, res, renderRequest, renderResponse, rootPortletId, instanceId);
try { req.setAttribute(WebKeys.RENDER_PORTLET_RESOURCE, Boolean.TRUE); RuntimePortletUtil.processPortlet( renderPortletSB, ctx, req, res, renderRequest, renderResponse, rootPortletId, instanceId); } finally { req.removeAttribute(WebKeys.RENDER_PORTLET_RESOURCE); }
public static void doTag( String portletName, PageContext pageContext, ServletContext ctx, HttpServletRequest req, HttpServletResponse res) throws Exception { PortletRequest portletRequest = (PortletRequest)req.getAttribute(WebKeys.JAVAX_PORTLET_REQUEST); RenderRequest renderRequest = null; if ((portletRequest != null) && (portletRequest instanceof RenderRequest)) { renderRequest = (RenderRequest)portletRequest; } PortletResponse portletResponse = (PortletResponse)req.getAttribute(WebKeys.JAVAX_PORTLET_RESPONSE); RenderResponse renderResponse = null; if ((portletResponse != null) && (portletResponse instanceof RenderResponse)) { renderResponse = (RenderResponse)portletResponse; } String rootPortletId = Portlet.getRootPortletId(portletName); String instanceId = Portlet.getInstanceId(portletName); StringBuffer renderPortletSB = new StringBuffer(); RuntimePortletUtil.processPortlet( renderPortletSB, ctx, req, res, renderRequest, renderResponse, rootPortletId, instanceId); if (pageContext != null) { pageContext.getOut().print(renderPortletSB.toString()); } else { res.getOutputStream().print(renderPortletSB.toString()); } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/9062831bde888aa5b72655a453c1468ddc85783f/RuntimeTag.java/buggy/util-taglib/src/com/liferay/taglib/portletext/RuntimeTag.java
Member[] nodes = new Member[knownNodes.size()]; knownNodes.values().toArray(nodes); return nodes;
return knownNodes.values().toArray(new Member[0]);
public Member[] getNodes() { synchronized (knownNodes) { Member[] nodes = new Member[knownNodes.size()]; knownNodes.values().toArray(nodes); return nodes; } }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/ec858d625f4f686b517266653ac1acab8ed74248/NodeManager.java/buggy/src/main/de/dal33t/powerfolder/net/NodeManager.java
if (node == null) { System.err.println("Node null"); }
public Member[] getValidNodes() { Member[] nodes = getNodes(); // init with initial cap. to reduce growth problems List validNodes = new ArrayList(nodes.length); for (Member node : nodes) { if (!node.getInfo().isInvalid(getController())) { validNodes.add(node); } } nodes = new Member[validNodes.size()]; validNodes.toArray(nodes); return nodes; }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/ec858d625f4f686b517266653ac1acab8ed74248/NodeManager.java/buggy/src/main/de/dal33t/powerfolder/net/NodeManager.java
timer.schedule(new GarbageCollectorTriggerer(), 0, 1000);
timer.schedule(new GarbageCollectorTriggerer(), 0, 5 * 1000);
private void setupPeridicalTasks() { Reject.ifNull(timer, "Timer is null to setup periodical tasks"); // Broadcast transfer status timer.schedule(new TransferStatusBroadcaster(), Constants.TRANSFER_STATUS_BROADCAST_INTERVAL * 1000 / 2, Constants.TRANSFER_STATUS_BROADCAST_INTERVAL * 1000); // Request network folder list timer.schedule(new NetworkFolderListRequestor(), Constants.NETWORK_FOLDER_LIST_REQUEST_INTERVAL * 1000 / 2, Constants.NETWORK_FOLDER_LIST_REQUEST_INTERVAL * 1000); // Request new node list from time to time timer.schedule(new NodeListRequestor(), Constants.NODE_LIST_REQUEST_INTERVAL * 1000 / 2, Constants.NODE_LIST_REQUEST_INTERVAL * 1000); // Broadcast the nodes that went online timer.schedule(new NodesThatWentOnlineListBroadcaster(), Constants.NODES_THAN_WENT_ONLINE_BROADCAST_TIME * 1000 / 2, Constants.NODES_THAN_WENT_ONLINE_BROADCAST_TIME * 1000); // Check incoming connection tries timer.schedule(new IncomingConnectionChecker(), 0, Constants.INCOMING_CONNECTION_CHECK_TIME * 1000); // Trigger gc from time to time timer.schedule(new GarbageCollectorTriggerer(), 0, 1000); timer.schedule(new StatisticsWriter(), 59 * 1000, 60 * 1000); }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/ec858d625f4f686b517266653ac1acab8ed74248/NodeManager.java/buggy/src/main/de/dal33t/powerfolder/net/NodeManager.java
broadcastMessageToSupernodes(request, 6);
broadcastMessageToSupernodes(request, Constants.N_SUPERNODES_TO_CONTACT_FOR_NODE_LIST);
public void run() { // Request new nodelist from supernodes RequestNodeList request = createDefaultNodeListRequestMessage(); if (logEnabled) { log().debug("Requesting nodelist: " + request); } broadcastMessageToSupernodes(request, 6); }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/206b2d412ecf2d025a84b786a291be70c54fc55e/NodeManager.java/buggy/src/main/de/dal33t/powerfolder/net/NodeManager.java
Debug.writeNodeList(reconnectionQueue, "ReconnectionQueue.txt");
Debug.writeNodeListCSV(reconnectionQueue, "ReconnectionQueue.csv");
private void buildReconnectionQueue() { // Process only valid nodes Member[] nodes = getValidNodes(); int nBefore = reconnectionQueue.size(); synchronized (reconnectionQueue) { reconnectionQueue.clear(); // Offline limit time, all nodes before this time are not getting // reconnected Date offlineLimitTime = new Date(System.currentTimeMillis() - Constants.MAX_NODE_OFFLINE_TIME); for (int i = 0; i < nodes.length; i++) { Member node = nodes[i]; if (node.isConnected() || node.isMySelf()) { // not process already connected nodes continue; } if (getController().isLanOnly() && !node.isOnLAN()) { // in lanOnly mode we don't want strangers continue; } // Check if node was offline too long Date lastConnectTime = node.getLastNetworkConnectTime(); boolean offlineTooLong = true; offlineTooLong = lastConnectTime != null ? lastConnectTime .before(offlineLimitTime) : true; // If node is interesting if (node.isInteresting()) { // Always add friends and supernodes to reconnect queue if (node.isFriend() || node.isSupernode() || (!node.receivedWrongIdentity() && !offlineTooLong)) { reconnectionQueue.add(node); } } } // Lately connect first Collections.sort(reconnectionQueue, MemberComparator.BY_RECONNECTION_PRIORITY); if (logVerbose) { log().verbose( "Freshly filled reconnection queue with " + reconnectionQueue.size() + " nodes, " + nBefore + " were in queue before"); } if (getController().isVerbose()) { Debug.writeNodeList(reconnectionQueue, "ReconnectionQueue.txt"); } if (reconnectionQueue.size() > 200) { log().warn("Reconnection queue contains more than 200 nodes"); } // Notify threads if (!reconnectionQueue.isEmpty()) { reconnectionQueue.notify(); } } }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/206b2d412ecf2d025a84b786a291be70c54fc55e/NodeManager.java/buggy/src/main/de/dal33t/powerfolder/net/NodeManager.java
private void buildReconnectionQueue() { // Process only valid nodes Member[] nodes = getValidNodes(); int nBefore = reconnectionQueue.size(); synchronized (reconnectionQueue) { reconnectionQueue.clear(); // Offline limit time, all nodes before this time are not getting // reconnected Date offlineLimitTime = new Date(System.currentTimeMillis() - Constants.MAX_NODE_OFFLINE_TIME); for (int i = 0; i < nodes.length; i++) { Member node = nodes[i]; if (node.isConnected() || node.isMySelf()) { // not process already connected nodes continue; } if (getController().isLanOnly() && !node.isOnLAN()) { // in lanOnly mode we don't want strangers continue; } // Check if node was offline too long Date lastConnectTime = node.getLastNetworkConnectTime(); boolean offlineTooLong = true; offlineTooLong = lastConnectTime != null ? lastConnectTime .before(offlineLimitTime) : true; // If node is interesting if (node.isInteresting()) { // Always add friends and supernodes to reconnect queue if (node.isFriend() || node.isSupernode() || (!node.receivedWrongIdentity() && !offlineTooLong)) { reconnectionQueue.add(node); } } } // Lately connect first Collections.sort(reconnectionQueue, MemberComparator.BY_RECONNECTION_PRIORITY); if (logVerbose) { log().verbose( "Freshly filled reconnection queue with " + reconnectionQueue.size() + " nodes, " + nBefore + " were in queue before"); } if (getController().isVerbose()) { Debug.writeNodeList(reconnectionQueue, "ReconnectionQueue.txt"); } if (reconnectionQueue.size() > 200) { log().warn("Reconnection queue contains more than 200 nodes"); } // Notify threads if (!reconnectionQueue.isEmpty()) { reconnectionQueue.notify(); } } }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/206b2d412ecf2d025a84b786a291be70c54fc55e/NodeManager.java/buggy/src/main/de/dal33t/powerfolder/net/NodeManager.java
private void loadNodesFromInet() { log().info("Loading nodes from inet: " + NODES_URL); URL url; try { url = new URL(NODES_URL); } catch (MalformedURLException e) { log().verbose(e); return; } NodeList inetNodes = new NodeList(); try { inetNodes.load(url); List<MemberInfo> supernodes = inetNodes.getNodeList(); // Sort by connet time Collections.sort(supernodes, MemberComparator.BY_LAST_CONNECT_DATE); for (Iterator<MemberInfo> it = supernodes.iterator(); it.hasNext();) { MemberInfo node = it.next(); if (knowsNode(node) || !node.isSupernode) { it.remove(); } else { if (logVerbose) { log().verbose( node.toString() + " ,last connect: " + node.lastConnectTime); } // If supernode is outdated, fix date if (node.lastConnectTime == null || node.lastConnectTime.getTime() < (System .currentTimeMillis() - Constants.MAX_NODE_OFFLINE_TIME)) { log().verbose( "Fixed date of internet supernode list " + node); // Give supernode date (<20 days) node.lastConnectTime = new Date(System .currentTimeMillis() - Constants.MAX_NODE_OFFLINE_TIME + 1000 * 60 * 60 * 4); } } } log().info( "Loaded " + supernodes.size() + " new supernodes from " + NODES_URL); MemberInfo[] supernodesArr = new MemberInfo[supernodes.size()]; supernodes.toArray(supernodesArr); queueNewNodes(supernodesArr); // Trigger connection to these nodes triggerConnect(); } catch (IOException e) { log().warn("Unable to read supernodes files from " + NODES_URL, e); } catch (ClassCastException e) { log().warn("Illegal format of supernodes files on " + NODES_URL, e); } catch (ClassNotFoundException e) { log().warn("Illegal format of supernodes files on " + NODES_URL, e); } }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/206b2d412ecf2d025a84b786a291be70c54fc55e/NodeManager.java/buggy/src/main/de/dal33t/powerfolder/net/NodeManager.java
if (getController().getMySelf().isSupernode()) { storeOnlineSupernodes(); }
storeOnlineSupernodes();
public void shutdown() { // Remove listeners, not bothering them by boring shutdown events started = false; if (getController().getMySelf().isSupernode()) { // Store the latest supernodes storeOnlineSupernodes(); } // Stop threadpool if (threadPool != null) { log().debug("Shutting down incoming connection threadpool"); threadPool.stop(); } log().debug( "Shutting down " + acceptors.size() + " incoming connections (Acceptors)"); List<Acceptor> tempList = new ArrayList<Acceptor>(acceptors); for (Acceptor acceptor : tempList) { acceptor.shutdown(); } // Shutdown reconnectors synchronized (reconnectors) { log().debug( "Shutting down " + reconnectors.size() + " reconnectors"); for (Iterator<Reconnector> it = reconnectors.iterator(); it .hasNext();) { Reconnector reconnector = it.next(); reconnector.shutdown(); it.remove(); } } if (workerThread != null) { workerThread.interrupt(); } if (timer != null) { timer.cancel(); } log().debug("Shutting down nodes"); Member[] members = getNodes(); log().debug("Shutting down " + members.length + " nodes"); for (int i = 0; i < members.length; i++) { members[i].shutdown(); } // first save current members connection state if (nodefileLoaded) { // Only store if was fully started storeNodes(); // Shutdown, unloaded nodefile nodefileLoaded = false; } log().debug("Stopped"); }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/206b2d412ecf2d025a84b786a291be70c54fc55e/NodeManager.java/buggy/src/main/de/dal33t/powerfolder/net/NodeManager.java
Collection<MemberInfo> latestSupernodes = new ArrayList<MemberInfo>();
Collection<MemberInfo> latestSupernodesInfos = new ArrayList<MemberInfo>(); Collection<Member> latestSupernodes = new ArrayList<Member>();
private void storeOnlineSupernodes() { Member[] nodes = getNodes(); Collection<MemberInfo> latestSupernodes = new ArrayList<MemberInfo>(); for (Member node : nodes) { if (!node.isSupernode()) { // Skip non-supernode continue; } if (node.getInfo().isInvalid(getController())) { // Skip invalid nodes continue; } if (!node.isConnectedToNetwork()) { continue; } latestSupernodes.add(node.getInfo()); } if (getMySelf().isSupernode()) { latestSupernodes.add(getMySelf().getInfo()); } NodeList nodeList = new NodeList(latestSupernodes, null); storeNodes0(getController().getConfigName() + "-Supernodes.nodes", nodeList); }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/206b2d412ecf2d025a84b786a291be70c54fc55e/NodeManager.java/buggy/src/main/de/dal33t/powerfolder/net/NodeManager.java
if (node.getInfo().isInvalid(getController())) { continue; }
private void storeOnlineSupernodes() { Member[] nodes = getNodes(); Collection<MemberInfo> latestSupernodes = new ArrayList<MemberInfo>(); for (Member node : nodes) { if (!node.isSupernode()) { // Skip non-supernode continue; } if (node.getInfo().isInvalid(getController())) { // Skip invalid nodes continue; } if (!node.isConnectedToNetwork()) { continue; } latestSupernodes.add(node.getInfo()); } if (getMySelf().isSupernode()) { latestSupernodes.add(getMySelf().getInfo()); } NodeList nodeList = new NodeList(latestSupernodes, null); storeNodes0(getController().getConfigName() + "-Supernodes.nodes", nodeList); }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/206b2d412ecf2d025a84b786a291be70c54fc55e/NodeManager.java/buggy/src/main/de/dal33t/powerfolder/net/NodeManager.java
latestSupernodes.add(node.getInfo());
latestSupernodesInfos.add(node.getInfo()); latestSupernodes.add(node);
private void storeOnlineSupernodes() { Member[] nodes = getNodes(); Collection<MemberInfo> latestSupernodes = new ArrayList<MemberInfo>(); for (Member node : nodes) { if (!node.isSupernode()) { // Skip non-supernode continue; } if (node.getInfo().isInvalid(getController())) { // Skip invalid nodes continue; } if (!node.isConnectedToNetwork()) { continue; } latestSupernodes.add(node.getInfo()); } if (getMySelf().isSupernode()) { latestSupernodes.add(getMySelf().getInfo()); } NodeList nodeList = new NodeList(latestSupernodes, null); storeNodes0(getController().getConfigName() + "-Supernodes.nodes", nodeList); }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/206b2d412ecf2d025a84b786a291be70c54fc55e/NodeManager.java/buggy/src/main/de/dal33t/powerfolder/net/NodeManager.java
latestSupernodes.add(getMySelf().getInfo());
latestSupernodesInfos.add(getMySelf().getInfo()); latestSupernodes.add(getMySelf());
private void storeOnlineSupernodes() { Member[] nodes = getNodes(); Collection<MemberInfo> latestSupernodes = new ArrayList<MemberInfo>(); for (Member node : nodes) { if (!node.isSupernode()) { // Skip non-supernode continue; } if (node.getInfo().isInvalid(getController())) { // Skip invalid nodes continue; } if (!node.isConnectedToNetwork()) { continue; } latestSupernodes.add(node.getInfo()); } if (getMySelf().isSupernode()) { latestSupernodes.add(getMySelf().getInfo()); } NodeList nodeList = new NodeList(latestSupernodes, null); storeNodes0(getController().getConfigName() + "-Supernodes.nodes", nodeList); }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/206b2d412ecf2d025a84b786a291be70c54fc55e/NodeManager.java/buggy/src/main/de/dal33t/powerfolder/net/NodeManager.java
NodeList nodeList = new NodeList(latestSupernodes, null);
if (getController().isVerbose()) { Debug.writeNodeListCSV(latestSupernodes, "SupernodesOnline.csv"); } NodeList nodeList = new NodeList(latestSupernodesInfos, null);
private void storeOnlineSupernodes() { Member[] nodes = getNodes(); Collection<MemberInfo> latestSupernodes = new ArrayList<MemberInfo>(); for (Member node : nodes) { if (!node.isSupernode()) { // Skip non-supernode continue; } if (node.getInfo().isInvalid(getController())) { // Skip invalid nodes continue; } if (!node.isConnectedToNetwork()) { continue; } latestSupernodes.add(node.getInfo()); } if (getMySelf().isSupernode()) { latestSupernodes.add(getMySelf().getInfo()); } NodeList nodeList = new NodeList(latestSupernodes, null); storeNodes0(getController().getConfigName() + "-Supernodes.nodes", nodeList); }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/206b2d412ecf2d025a84b786a291be70c54fc55e/NodeManager.java/buggy/src/main/de/dal33t/powerfolder/net/NodeManager.java
}
}
public PluginActionBuilder() {}
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/37e84bac0070f808dc88f061b33daf9583dc748a/PluginActionBuilder.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionBuilder.java
String value=element.getAttribute(ATT_TARGET_ID); return value!=null? value : "???"; }
String value = element.getAttribute(ATT_TARGET_ID); return value != null ? value : "???"; }
protected String getTargetID(IConfigurationElement element) { String value=element.getAttribute(ATT_TARGET_ID); return value!=null? value : "???";//$NON-NLS-1$}
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/37e84bac0070f808dc88f061b33daf9583dc748a/PluginActionBuilder.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionBuilder.java
LoggerAdapter.error("Unexpected elem in output stage: "+((StageElement)elem).getElement(), this);
LoggerAdapter.error(MessageKey.JCYCLONE_UNEXPECTED_ELEM.getLocalizedMessage(((StageElement)elem).getElement()), this);
public void handleEvent(IElement elem) throws EventHandlerException { if(elem instanceof OutputElement) { try { ((OutputElement) elem).output(); } catch (MarketceteraException ex) { throw new MarketceteraEventHandlerException(ex.getMessage(), ex); } } else if(elem instanceof StageElement) { LoggerAdapter.error("Unexpected elem in output stage: "+((StageElement)elem).getElement(), this); } }
52787 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52787/c1e9503d3032bc75965b7f7178f503c3094437f3/OutputStage.java/clean/source/core/src/main/java/org/marketcetera/jcyclone/OutputStage.java
LoggerAdapter.error("Exception while sending output", ex, this);
LoggerAdapter.error(MessageKey.JCYCLONE_ERROR_OUTPUT_SEND.getLocalizedMessage(), ex, this);
public void handleEvents(List events) throws EventHandlerException { Vector<Exception> allExceptions = new Vector<Exception>(); for (Object o : events) { try { handleEvent((IElement) o); } catch (Exception ex) { allExceptions.add(ex); LoggerAdapter.error("Exception while sending output", ex, this); } } if(allExceptions.size() > 0) { LoggerAdapter.error("Encountered "+allExceptions.size() + " errors while sending output. see log above", this); throw new MarketceteraEventHandlerException("Encountered "+allExceptions.size() + " errors while sending output. see log above"); } }
52787 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52787/c1e9503d3032bc75965b7f7178f503c3094437f3/OutputStage.java/clean/source/core/src/main/java/org/marketcetera/jcyclone/OutputStage.java
LoggerAdapter.error("Encountered "+allExceptions.size() + " errors while sending output. see log above", this); throw new MarketceteraEventHandlerException("Encountered "+allExceptions.size() + " errors while sending output. see log above");
LoggerAdapter.error(MessageKey.JCYCLONE_SEND_NUM_ERRORS.getLocalizedMessage(allExceptions.size()), this); throw new MarketceteraEventHandlerException(MessageKey.JCYCLONE_SEND_NUM_ERRORS.getLocalizedMessage(allExceptions.size()));
public void handleEvents(List events) throws EventHandlerException { Vector<Exception> allExceptions = new Vector<Exception>(); for (Object o : events) { try { handleEvent((IElement) o); } catch (Exception ex) { allExceptions.add(ex); LoggerAdapter.error("Exception while sending output", ex, this); } } if(allExceptions.size() > 0) { LoggerAdapter.error("Encountered "+allExceptions.size() + " errors while sending output. see log above", this); throw new MarketceteraEventHandlerException("Encountered "+allExceptions.size() + " errors while sending output. see log above"); } }
52787 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52787/c1e9503d3032bc75965b7f7178f503c3094437f3/OutputStage.java/clean/source/core/src/main/java/org/marketcetera/jcyclone/OutputStage.java
if (c.isPrint()) { root.getLayer().trimEmptyPages(c, intrinsic_size.height); }
public void doActualLayout(Graphics g) { //Uu.p("doActualLayout called"); this.removeAll(); if (g == null) { return; } if (doc == null) { return; } LayoutContext c = newLayoutContext((Graphics2D) g); synchronized (this) { if (this.layout_context != null) this.layout_context.stopRendering(); this.layout_context = c; } c.setRenderQueue(queue); setRenderWidth((int) c.getExtents().getWidth()); long start = System.currentTimeMillis(); BlockBox root = Boxing.constructBox(c, new DomToplevelNode(doc)); setRootBox(root); Boxing.layout(c, root, new DomToplevelNode(doc)); long end = System.currentTimeMillis(); XRLog.layout(Level.INFO, "Layout took " + (end - start) + "ms"); if (!c.isStylesAllPopped()) { XRLog.layout(Level.SEVERE, "mismatch in style popping and pushing"); } if (c.shouldStop()) {//interrupted layout return; }// if there is a fixed child then we need to set opaque to false// so that the entire viewport will be repainted. this is slower// but that's the hit you get from using fixed layout if (root.getLayer().containsFixedContent()) { super.setOpaque(false); } else { super.setOpaque(true); } XRLog.layout(Level.FINEST, "after layout: " + root); Dimension intrinsic_size = root.getLayer().getPaintingDimension(c); setPreferredSize(intrinsic_size); revalidate(); // if doc is shorter than viewport // then stretch canvas to fill viewport exactly // then adjust the body element accordingly if (enclosingScrollPane != null) { if (intrinsic_size.height < enclosingScrollPane.getViewport().getHeight()) { //Uu.p("int height is less than viewport height"); // XXX Not threadsafe if (enclosingScrollPane.getViewport().getHeight() != this.getHeight()) { this.setPreferredSize(new Dimension( intrinsic_size.width, enclosingScrollPane.getViewport().getHeight())); this.revalidate(); } //Uu.p("need to do the body hack"); if (root != null) { root.height = enclosingScrollPane.getViewport().getHeight(); bodyExpandHack(root, root.height); intrinsic_size.height = root.height; } } // turn on simple scrolling mode if there's any fixed elements if (root.getLayer().containsFixedContent()) { // Uu.p("is fixed"); enclosingScrollPane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); } else { // Uu.p("is not fixed"); enclosingScrollPane.getViewport().setScrollMode(default_scroll_mode); } } if (isUseThreads()) { queue.dispatchRepaintEvent(new ReflowEvent(ReflowEvent.LAYOUT_COMPLETE)); } this.fireDocumentLoaded(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/868e29fe0bd81b55cbd739f60feedbe5488f9adb/RootPanel.java/buggy/src/java/org/xhtmlrenderer/swing/RootPanel.java
Point maxOffset = root.getLayer().getMaxOffset(); root.getLayer().setPositionsFinalized(true); intrinsic_size = new Dimension(maxOffset.x, maxOffset.y);
Dimension intrinsic_size = root.getLayer().getPaintingDimension(c);
public void doActualLayout(Graphics g) { //Uu.p("doActualLayout called"); this.removeAll(); if (g == null) { return; } if (doc == null) { return; } LayoutContext c = newLayoutContext(pageInfo, (Graphics2D) g); synchronized (this) { if (this.layout_context != null) this.layout_context.stopRendering(); this.layout_context = c; } c.setRenderQueue(queue); setRenderWidth((int) c.getExtents().getWidth()); getSharedContext().getTextRenderer().setupGraphics(c.getGraphics()); long start = System.currentTimeMillis(); BlockBox root = Boxing.preLayout(c, new DomToplevelNode(doc)); setRootBox(root); Boxing.realLayout(c, root, new DomToplevelNode(doc)); long end = System.currentTimeMillis(); XRLog.layout(Level.INFO, "Layout took " + (end - start) + "ms"); if (!c.isStylesAllPopped()) { XRLog.layout(Level.SEVERE, "mismatch in style popping and pushing"); } if (c.shouldStop()) {//interrupted layout return; }// if there is a fixed child then we need to set opaque to false// so that the entire viewport will be repainted. this is slower// but that's the hit you get from using fixed layout if (root.getLayer().containsFixedContent()) { super.setOpaque(false); } else { super.setOpaque(true); } XRLog.layout(Level.FINEST, "after layout: " + root); Point maxOffset = root.getLayer().getMaxOffset(); root.getLayer().setPositionsFinalized(true); intrinsic_size = new Dimension(maxOffset.x, maxOffset.y); setPreferredSize(intrinsic_size); revalidate(); // if doc is shorter than viewport // then stretch canvas to fill viewport exactly // then adjust the body element accordingly if (enclosingScrollPane != null) { if (intrinsic_size.height < enclosingScrollPane.getViewport().getHeight()) { //Uu.p("int height is less than viewport height"); // XXX Not threadsafe if (enclosingScrollPane.getViewport().getHeight() != this.getHeight()) { this.setPreferredSize(new Dimension( intrinsic_size.width, enclosingScrollPane.getViewport().getHeight())); this.revalidate(); } //Uu.p("need to do the body hack"); if (root != null) { root.height = enclosingScrollPane.getViewport().getHeight(); bodyExpandHack(root, root.height); intrinsic_size.height = root.height; } } // turn on simple scrolling mode if there's any fixed elements if (root.getLayer().containsFixedContent()) { // Uu.p("is fixed"); enclosingScrollPane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); } else { // Uu.p("is not fixed"); enclosingScrollPane.getViewport().setScrollMode(default_scroll_mode); } } if (isUseThreads()) { queue.dispatchRepaintEvent(new ReflowEvent(ReflowEvent.LAYOUT_COMPLETE)); } this.fireDocumentLoaded(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/0756aea1531c992a3edd221241cc666701847e91/RootPanel.java/clean/src/java/org/xhtmlrenderer/swing/RootPanel.java
getSharedContext().setMaxWidth(0);
protected LayoutContext newLayoutContext(PageInfo pageInfo, Graphics2D g) { XRLog.layout(Level.FINEST, "new context begin"); getSharedContext().setCanvas(this); Rectangle extents; extents = getBaseExtents(pageInfo); //Uu.p("newContext() = extents = " + extents); getSharedContext().setMaxWidth(0); //getSharedContext().setMaxHeight(0); XRLog.layout(Level.FINEST, "new context end"); //Uu.p("new context with extents: " + extents); LayoutContext result = getSharedContext().newLayoutContextInstance(extents); result.setGraphics(g.getDeviceConfiguration().createCompatibleImage(1, 1).createGraphics()); result.setPrint(pageInfo != null); result.setInteractive(pageInfo == null); return result; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/0756aea1531c992a3edd221241cc666701847e91/RootPanel.java/clean/src/java/org/xhtmlrenderer/swing/RootPanel.java
protected LayoutContext newLayoutContext(PageInfo pageInfo, Graphics2D g) { XRLog.layout(Level.FINEST, "new context begin"); getSharedContext().setCanvas(this); Rectangle extents; extents = getBaseExtents(pageInfo); //Uu.p("newContext() = extents = " + extents); getSharedContext().setMaxWidth(0); //getSharedContext().setMaxHeight(0); XRLog.layout(Level.FINEST, "new context end"); //Uu.p("new context with extents: " + extents); LayoutContext result = getSharedContext().newLayoutContextInstance(extents); result.setGraphics(g.getDeviceConfiguration().createCompatibleImage(1, 1).createGraphics()); result.setPrint(pageInfo != null); result.setInteractive(pageInfo == null); return result; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/0756aea1531c992a3edd221241cc666701847e91/RootPanel.java/clean/src/java/org/xhtmlrenderer/swing/RootPanel.java
getSharedContext().setMaxWidth(0);
protected RenderingContext newRenderingContext(PageInfo pageInfo, Graphics2D g) { XRLog.layout(Level.FINEST, "new context begin"); getSharedContext().setCanvas(this); Rectangle extents; extents = getBaseExtents(pageInfo); //Uu.p("newContext() = extents = " + extents); getSharedContext().setMaxWidth(0); //getSharedContext().setMaxHeight(0); XRLog.layout(Level.FINEST, "new context end"); //Uu.p("new context with extents: " + extents); RenderingContext result = getSharedContext().newRenderingContextInstance(extents); result.setGraphics(g); result.setPrint(pageInfo != null); result.setInteractive(pageInfo == null); return result; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/0756aea1531c992a3edd221241cc666701847e91/RootPanel.java/clean/src/java/org/xhtmlrenderer/swing/RootPanel.java
protected RenderingContext newRenderingContext(PageInfo pageInfo, Graphics2D g) { XRLog.layout(Level.FINEST, "new context begin"); getSharedContext().setCanvas(this); Rectangle extents; extents = getBaseExtents(pageInfo); //Uu.p("newContext() = extents = " + extents); getSharedContext().setMaxWidth(0); //getSharedContext().setMaxHeight(0); XRLog.layout(Level.FINEST, "new context end"); //Uu.p("new context with extents: " + extents); RenderingContext result = getSharedContext().newRenderingContextInstance(extents); result.setGraphics(g); result.setPrint(pageInfo != null); result.setInteractive(pageInfo == null); return result; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/0756aea1531c992a3edd221241cc666701847e91/RootPanel.java/clean/src/java/org/xhtmlrenderer/swing/RootPanel.java
if (importWizardActionGroup.getWizardActionIds().length == 0) {
if (exportWizardActionGroup.getWizardActionIds().length == 0) {
private void addExportMenu(IMenuManager aMenu) { exportWizardActionGroup.setContext(getContext()); if (importWizardActionGroup.getWizardActionIds().length == 0) { aMenu.appendToGroup(ICommonMenuConstants.GROUP_PORT, exportAction); return; } IMenuManager submenu = new MenuManager( WorkbenchNavigatorMessages.PortingActionProvider_ExportResourcesMenu_label, COMMON_NAVIGATOR_EXPORT_MENU); exportWizardActionGroup.fillContextMenu(submenu); submenu.add(new Separator(ICommonMenuConstants.GROUP_ADDITIONS)); submenu.add(new Separator()); submenu.add(exportAction); aMenu.appendToGroup(ICommonMenuConstants.GROUP_PORT, submenu); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/b494e18a41670a924436e3655714c91255530029/PortingActionProvider.java/buggy/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PortingActionProvider.java
if (setChangeListeners == null) { boolean hadListeners = hasListeners(); setChangeListeners = listener; if (!hadListeners) { firstListenerAdded(); } return; } Collection listenerList; if (setChangeListeners instanceof Collection) { listenerList = (Collection) setChangeListeners; } else { ISetChangeListener l = (ISetChangeListener) setChangeListeners; listenerList = new ArrayList(); listenerList.add(l); setChangeListeners = listenerList; } listenerList.add(listener);
addListener(SetChangeEvent.TYPE, listener);
public void addSetChangeListener(ISetChangeListener listener) { if (setChangeListeners == null) { boolean hadListeners = hasListeners(); setChangeListeners = listener; if (!hadListeners) { firstListenerAdded(); } return; } Collection listenerList; if (setChangeListeners instanceof Collection) { listenerList = (Collection) setChangeListeners; } else { ISetChangeListener l = (ISetChangeListener) setChangeListeners; listenerList = new ArrayList(); listenerList.add(l); setChangeListeners = listenerList; } listenerList.add(listener); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/ObservableSet.java/buggy/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ObservableSet.java
setChangeListeners = null;
public void dispose() { setChangeListeners = null; super.dispose(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/ObservableSet.java/buggy/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ObservableSet.java
if (setChangeListeners == null) { return; } if (setChangeListeners instanceof ISetChangeListener) { ((ISetChangeListener) setChangeListeners).handleSetChange(this, diff); return; } Collection changeListenerCollection = (Collection) setChangeListeners; ISetChangeListener[] listeners = (ISetChangeListener[]) (changeListenerCollection) .toArray(new ISetChangeListener[changeListenerCollection.size()]); for (int i = 0; i < listeners.length; i++) { listeners[i].handleSetChange(this, diff); }
fireEvent(new SetChangeEvent(this, diff));
protected void fireSetChange(SetDiff diff) { // fire general change event first super.fireChange(); if (setChangeListeners == null) { return; } if (setChangeListeners instanceof ISetChangeListener) { ((ISetChangeListener) setChangeListeners).handleSetChange(this, diff); return; } Collection changeListenerCollection = (Collection) setChangeListeners; ISetChangeListener[] listeners = (ISetChangeListener[]) (changeListenerCollection) .toArray(new ISetChangeListener[changeListenerCollection.size()]); for (int i = 0; i < listeners.length; i++) { listeners[i].handleSetChange(this, diff); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/ObservableSet.java/buggy/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ObservableSet.java
if (setChangeListeners == listener) { setChangeListeners = null; if (!hasListeners()) { lastListenerRemoved(); } return; } if (setChangeListeners instanceof Collection) { Collection listenerList = (Collection) setChangeListeners; listenerList.remove(listener); if (listenerList.isEmpty()) { setChangeListeners = null; if (!hasListeners()) { lastListenerRemoved(); } } }
removeListener(SetChangeEvent.TYPE, listener);
public void removeSetChangeListener(ISetChangeListener listener) { if (setChangeListeners == listener) { setChangeListeners = null; if (!hasListeners()) { lastListenerRemoved(); } return; } if (setChangeListeners instanceof Collection) { Collection listenerList = (Collection) setChangeListeners; listenerList.remove(listener); if (listenerList.isEmpty()) { setChangeListeners = null; if (!hasListeners()) { lastListenerRemoved(); } } } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/ObservableSet.java/buggy/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/ObservableSet.java
timeClass.defineMethod("-", CallbackFactory.getMethod(RubyTime.class, "op_minus", RubyObject.class)); timeClass.defineMethod("to_s", CallbackFactory.getMethod(RubyTime.class, "to_s")); timeClass.defineMethod("inspect", CallbackFactory.getMethod(RubyTime.class, "to_s"));
public static RubyClass createTimeClass(Ruby ruby) { RubyClass timeClass = ruby.defineClass("Time", ruby.getClasses().getObjectClass()); Callback s_new = new ReflectionCallbackMethod(RubyTime.class, "s_new", false, true); timeClass.defineSingletonMethod("new", s_new); timeClass.defineSingletonMethod("now", s_new); return timeClass; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/4e4bb40b2eb2d38881d15ca8ef7cda4c34323793/RubyTime.java/clean/org/jruby/RubyTime.java
RubyTime time = new RubyTime(ruby, (RubyClass) rubyClass.getRubyClass());
RubyTime time = new RubyTime(ruby, (RubyClass) rubyClass);
public static RubyTime s_at(Ruby ruby, RubyObject rubyClass, RubyObject[] args) { long secs = RubyNumeric.num2long(args[0]); RubyTime time = new RubyTime(ruby, (RubyClass) rubyClass.getRubyClass()); GregorianCalendar cal = new GregorianCalendar(); cal.setTime(new Date(secs)); time.setJavaCalendar(cal); return time; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/4e4bb40b2eb2d38881d15ca8ef7cda4c34323793/RubyTime.java/clean/org/jruby/RubyTime.java
public static InlineBox generateFirstLetterInlineBox(Context c, Node node, int start, String text, InlineBox prev, InlineBox prev_align, int avail) {
public static InlineBox generateFirstLetterInlineBox(Context c, int start, String text, InlineBox prev_align, TextContent content, CascadedStyle firstLetterStyle, CascadedStyle firstLineStyle) {
public static InlineBox generateFirstLetterInlineBox(Context c, Node node, int start, String text, InlineBox prev, InlineBox prev_align, int avail) { // u.p("gen first letter box"); // u.p("node = " + node); // u.p("start = " + start); int end = start + 1; // u.p("text = " + text); // u.p("prev = " + prev); // u.p("prev align = " + prev_align); // u.p("avail = " + avail); CalculatedStyle style = c.css.getStyle(node); Font font = FontUtil.getFont(c, style); InlineBox box = newBox(c, node, start, end, prev, text, prev_align, font); //not used: int len = FontUtil.len(c, text.substring(start, end), font); CascadedStyle ps = c.css.getPseudoElementStyle(node, "first-letter"); CalculatedStyle parent = c.css.getStyle(node); CalculatedStyle cs = null; if (ps != null) { cs = c.css.getDerivedStyle(parent, ps); } else { cs = parent; } // u.p("style = " + cs); styleInlineBox(c, cs, box); box.break_after = false; //u.p("generated a first letter inline: " + box); return box; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/bbe26e114cd1f823901a5ca3d63b5fccfdfedf81/LineBreaker.java/clean/src/java/org/xhtmlrenderer/layout/LineBreaker.java
CalculatedStyle style = c.css.getStyle(node);
CalculatedStyle style = content.getStyle();
public static InlineBox generateFirstLetterInlineBox(Context c, Node node, int start, String text, InlineBox prev, InlineBox prev_align, int avail) { // u.p("gen first letter box"); // u.p("node = " + node); // u.p("start = " + start); int end = start + 1; // u.p("text = " + text); // u.p("prev = " + prev); // u.p("prev align = " + prev_align); // u.p("avail = " + avail); CalculatedStyle style = c.css.getStyle(node); Font font = FontUtil.getFont(c, style); InlineBox box = newBox(c, node, start, end, prev, text, prev_align, font); //not used: int len = FontUtil.len(c, text.substring(start, end), font); CascadedStyle ps = c.css.getPseudoElementStyle(node, "first-letter"); CalculatedStyle parent = c.css.getStyle(node); CalculatedStyle cs = null; if (ps != null) { cs = c.css.getDerivedStyle(parent, ps); } else { cs = parent; } // u.p("style = " + cs); styleInlineBox(c, cs, box); box.break_after = false; //u.p("generated a first letter inline: " + box); return box; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/bbe26e114cd1f823901a5ca3d63b5fccfdfedf81/LineBreaker.java/clean/src/java/org/xhtmlrenderer/layout/LineBreaker.java
InlineBox box = newBox(c, node, start, end, prev, text, prev_align, font);
InlineBox box = newBox(c, content, start, end, text, prev_align, font, firstLineStyle);
public static InlineBox generateFirstLetterInlineBox(Context c, Node node, int start, String text, InlineBox prev, InlineBox prev_align, int avail) { // u.p("gen first letter box"); // u.p("node = " + node); // u.p("start = " + start); int end = start + 1; // u.p("text = " + text); // u.p("prev = " + prev); // u.p("prev align = " + prev_align); // u.p("avail = " + avail); CalculatedStyle style = c.css.getStyle(node); Font font = FontUtil.getFont(c, style); InlineBox box = newBox(c, node, start, end, prev, text, prev_align, font); //not used: int len = FontUtil.len(c, text.substring(start, end), font); CascadedStyle ps = c.css.getPseudoElementStyle(node, "first-letter"); CalculatedStyle parent = c.css.getStyle(node); CalculatedStyle cs = null; if (ps != null) { cs = c.css.getDerivedStyle(parent, ps); } else { cs = parent; } // u.p("style = " + cs); styleInlineBox(c, cs, box); box.break_after = false; //u.p("generated a first letter inline: " + box); return box; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/bbe26e114cd1f823901a5ca3d63b5fccfdfedf81/LineBreaker.java/clean/src/java/org/xhtmlrenderer/layout/LineBreaker.java
CascadedStyle ps = c.css.getPseudoElementStyle(node, "first-letter"); CalculatedStyle parent = c.css.getStyle(node);
public static InlineBox generateFirstLetterInlineBox(Context c, Node node, int start, String text, InlineBox prev, InlineBox prev_align, int avail) { // u.p("gen first letter box"); // u.p("node = " + node); // u.p("start = " + start); int end = start + 1; // u.p("text = " + text); // u.p("prev = " + prev); // u.p("prev align = " + prev_align); // u.p("avail = " + avail); CalculatedStyle style = c.css.getStyle(node); Font font = FontUtil.getFont(c, style); InlineBox box = newBox(c, node, start, end, prev, text, prev_align, font); //not used: int len = FontUtil.len(c, text.substring(start, end), font); CascadedStyle ps = c.css.getPseudoElementStyle(node, "first-letter"); CalculatedStyle parent = c.css.getStyle(node); CalculatedStyle cs = null; if (ps != null) { cs = c.css.getDerivedStyle(parent, ps); } else { cs = parent; } // u.p("style = " + cs); styleInlineBox(c, cs, box); box.break_after = false; //u.p("generated a first letter inline: " + box); return box; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/bbe26e114cd1f823901a5ca3d63b5fccfdfedf81/LineBreaker.java/clean/src/java/org/xhtmlrenderer/layout/LineBreaker.java
if (ps != null) { cs = c.css.getDerivedStyle(parent, ps);
if (firstLetterStyle != null) { cs = c.css.getDerivedStyle(style, firstLetterStyle);
public static InlineBox generateFirstLetterInlineBox(Context c, Node node, int start, String text, InlineBox prev, InlineBox prev_align, int avail) { // u.p("gen first letter box"); // u.p("node = " + node); // u.p("start = " + start); int end = start + 1; // u.p("text = " + text); // u.p("prev = " + prev); // u.p("prev align = " + prev_align); // u.p("avail = " + avail); CalculatedStyle style = c.css.getStyle(node); Font font = FontUtil.getFont(c, style); InlineBox box = newBox(c, node, start, end, prev, text, prev_align, font); //not used: int len = FontUtil.len(c, text.substring(start, end), font); CascadedStyle ps = c.css.getPseudoElementStyle(node, "first-letter"); CalculatedStyle parent = c.css.getStyle(node); CalculatedStyle cs = null; if (ps != null) { cs = c.css.getDerivedStyle(parent, ps); } else { cs = parent; } // u.p("style = " + cs); styleInlineBox(c, cs, box); box.break_after = false; //u.p("generated a first letter inline: " + box); return box; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/bbe26e114cd1f823901a5ca3d63b5fccfdfedf81/LineBreaker.java/clean/src/java/org/xhtmlrenderer/layout/LineBreaker.java
cs = parent;
cs = style;
public static InlineBox generateFirstLetterInlineBox(Context c, Node node, int start, String text, InlineBox prev, InlineBox prev_align, int avail) { // u.p("gen first letter box"); // u.p("node = " + node); // u.p("start = " + start); int end = start + 1; // u.p("text = " + text); // u.p("prev = " + prev); // u.p("prev align = " + prev_align); // u.p("avail = " + avail); CalculatedStyle style = c.css.getStyle(node); Font font = FontUtil.getFont(c, style); InlineBox box = newBox(c, node, start, end, prev, text, prev_align, font); //not used: int len = FontUtil.len(c, text.substring(start, end), font); CascadedStyle ps = c.css.getPseudoElementStyle(node, "first-letter"); CalculatedStyle parent = c.css.getStyle(node); CalculatedStyle cs = null; if (ps != null) { cs = c.css.getDerivedStyle(parent, ps); } else { cs = parent; } // u.p("style = " + cs); styleInlineBox(c, cs, box); box.break_after = false; //u.p("generated a first letter inline: " + box); return box; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/bbe26e114cd1f823901a5ca3d63b5fccfdfedf81/LineBreaker.java/clean/src/java/org/xhtmlrenderer/layout/LineBreaker.java
public static InlineBox generateReplacedInlineBox(Context c, Node node, int avail, InlineBox prev, String text, InlineBox prev_align, Font font) {
public static InlineBox generateReplacedInlineBox(Context c, Content content, int avail, InlineBox prev_align, Font font) {
public static InlineBox generateReplacedInlineBox(Context c, Node node, int avail, InlineBox prev, String text, InlineBox prev_align, Font font) { //u.p("generating replaced Inline Box"); // get the layout for the replaced element Layout layout = c.getLayout(node); //TODO: temporary hack BlockBox block = (BlockBox) layout.layout(c, new BlockContent((Element) node, c.css.getStyle(node))); //u.p("got a block box from the sub layout: " + block); Rectangle bounds = new Rectangle(block.x, block.y, block.width, block.height); //u.p("bounds = " + bounds); /* * joshy: change this to just modify the existing block instead of creating * a new one */ // create new inline InlineBox box = newBox(c, node, 0, 0, prev, text, bounds, prev_align, font); //joshy: activate this: box.block = block //u.p("created a new inline box"); box.replaced = true; box.sub_block = block; block.setParent(box); // set up the extents box.width = bounds.width; box.height = bounds.height; box.break_after = false; // if it won't fit on this line, then put it on the next one if (box.width > avail) { box.break_before = true; box.x = 0; } // return //u.p("last replaced = " + box); return box; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/bbe26e114cd1f823901a5ca3d63b5fccfdfedf81/LineBreaker.java/clean/src/java/org/xhtmlrenderer/layout/LineBreaker.java
Layout layout = c.getLayout(node); BlockBox block = (BlockBox) layout.layout(c, new BlockContent((Element) node, c.css.getStyle(node)));
Layout layout = c.getLayout(content.getElement()); BlockBox block = (BlockBox) layout.layout(c, content);
public static InlineBox generateReplacedInlineBox(Context c, Node node, int avail, InlineBox prev, String text, InlineBox prev_align, Font font) { //u.p("generating replaced Inline Box"); // get the layout for the replaced element Layout layout = c.getLayout(node); //TODO: temporary hack BlockBox block = (BlockBox) layout.layout(c, new BlockContent((Element) node, c.css.getStyle(node))); //u.p("got a block box from the sub layout: " + block); Rectangle bounds = new Rectangle(block.x, block.y, block.width, block.height); //u.p("bounds = " + bounds); /* * joshy: change this to just modify the existing block instead of creating * a new one */ // create new inline InlineBox box = newBox(c, node, 0, 0, prev, text, bounds, prev_align, font); //joshy: activate this: box.block = block //u.p("created a new inline box"); box.replaced = true; box.sub_block = block; block.setParent(box); // set up the extents box.width = bounds.width; box.height = bounds.height; box.break_after = false; // if it won't fit on this line, then put it on the next one if (box.width > avail) { box.break_before = true; box.x = 0; } // return //u.p("last replaced = " + box); return box; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/bbe26e114cd1f823901a5ca3d63b5fccfdfedf81/LineBreaker.java/clean/src/java/org/xhtmlrenderer/layout/LineBreaker.java
InlineBox box = newBox(c, node, 0, 0, prev, text, bounds, prev_align, font);
CascadedStyle firstLineStyle = c.css.getPseudoElementStyle(content.getElement(), "first-line"); InlineBox box = newBox(c, content, 0, 0, null, bounds, prev_align, font, firstLineStyle);
public static InlineBox generateReplacedInlineBox(Context c, Node node, int avail, InlineBox prev, String text, InlineBox prev_align, Font font) { //u.p("generating replaced Inline Box"); // get the layout for the replaced element Layout layout = c.getLayout(node); //TODO: temporary hack BlockBox block = (BlockBox) layout.layout(c, new BlockContent((Element) node, c.css.getStyle(node))); //u.p("got a block box from the sub layout: " + block); Rectangle bounds = new Rectangle(block.x, block.y, block.width, block.height); //u.p("bounds = " + bounds); /* * joshy: change this to just modify the existing block instead of creating * a new one */ // create new inline InlineBox box = newBox(c, node, 0, 0, prev, text, bounds, prev_align, font); //joshy: activate this: box.block = block //u.p("created a new inline box"); box.replaced = true; box.sub_block = block; block.setParent(box); // set up the extents box.width = bounds.width; box.height = bounds.height; box.break_after = false; // if it won't fit on this line, then put it on the next one if (box.width > avail) { box.break_before = true; box.x = 0; } // return //u.p("last replaced = " + box); return box; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/bbe26e114cd1f823901a5ca3d63b5fccfdfedf81/LineBreaker.java/clean/src/java/org/xhtmlrenderer/layout/LineBreaker.java
public static InlineBox newBox(Context c, Node node, int start, int end, InlineBox prev, String text, InlineBox prev_align, Font font) { return newBox(c, node, start, end, prev, text, null, prev_align, font);
public static InlineBox newBox(Context c, Content content, int start, int end, String text, InlineBox prev_align, Font font, CascadedStyle firstLineStyle) { return newBox(c, content, start, end, text, null, prev_align, font, firstLineStyle);
public static InlineBox newBox(Context c, Node node, int start, int end, InlineBox prev, String text, InlineBox prev_align, Font font) { return newBox(c, node, start, end, prev, text, null, prev_align, font); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/bbe26e114cd1f823901a5ca3d63b5fccfdfedf81/LineBreaker.java/clean/src/java/org/xhtmlrenderer/layout/LineBreaker.java
TextDecoration.setupTextDecoration(style, box.getNode(), box);
TextDecoration.setupTextDecoration(style, box);
public static void styleInlineBox(Context c, CalculatedStyle style, InlineBox box) { box.color = style.getColor(); TextDecoration.setupTextDecoration(style, box.getNode(), box); Font font = FontUtil.getFont(c, style); box.setFont(font); box.width = FontUtil.len(c, box.getSubstring(), font); box.height = FontUtil.lineHeight(c, style, box); VerticalAlign.setupVerticalAlign(c, style, box); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/bbe26e114cd1f823901a5ca3d63b5fccfdfedf81/LineBreaker.java/clean/src/java/org/xhtmlrenderer/layout/LineBreaker.java
u.p("media = " + ctx.getMedia());
public String getMedia() { u.p("media = " + ctx.getMedia()); return ctx.getMedia(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/d508e9a872dba49f2e2897db7dde2a08b2e6fd2b/Context.java/clean/src/java/org/xhtmlrenderer/layout/Context.java
q.setCacheable(true);
q.setCacheable(false);
public int getGroupsSize(String pk) throws SystemException { Session session = null; try { session = openSession(); SQLQuery q = session.createSQLQuery(_SQL_GETGROUPSSIZE); q.setCacheable(true); q.addScalar(HibernateUtil.getCountColumnName(), Hibernate.LONG); QueryPos qPos = QueryPos.getInstance(q); qPos.add(pk); Iterator itr = q.list().iterator(); if (itr.hasNext()) { Long count = (Long)itr.next(); if (count != null) { return count.intValue(); } } return 0; } catch (HibernateException he) { throw new SystemException(he); } finally { closeSession(session); } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/c87a9e5474551de7510843e3bbf71a043bcf1043/OrganizationPersistence.java/buggy/portal-ejb/src/com/liferay/portal/service/persistence/OrganizationPersistence.java
q.setCacheable(true);
q.setCacheable(false);
public int getUsersSize(String pk) throws SystemException { Session session = null; try { session = openSession(); SQLQuery q = session.createSQLQuery(_SQL_GETUSERSSIZE); q.setCacheable(true); q.addScalar(HibernateUtil.getCountColumnName(), Hibernate.LONG); QueryPos qPos = QueryPos.getInstance(q); qPos.add(pk); Iterator itr = q.list().iterator(); if (itr.hasNext()) { Long count = (Long)itr.next(); if (count != null) { return count.intValue(); } } return 0; } catch (HibernateException he) { throw new SystemException(he); } finally { closeSession(session); } }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/c87a9e5474551de7510843e3bbf71a043bcf1043/OrganizationPersistence.java/buggy/portal-ejb/src/com/liferay/portal/service/persistence/OrganizationPersistence.java
public UploadsTableModel(TransferManager transferManager) {
public UploadsTableModel(TransferManager transferManager, boolean enabledPeriodicalUpdates) {
public UploadsTableModel(TransferManager transferManager) { super(transferManager.getController()); this.listeners = Collections .synchronizedCollection(new LinkedList<TableModelListener>()); this.uploads = Collections.synchronizedList(new LinkedList<Upload>()); // Add listener transferManager.addListener(new UploadTransferManagerListener()); // Init init(transferManager); task = new MyTimerTask(); getController().scheduleAndRepeat(task, UPDATE_TIME); }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/a49171da04ec10edf60306c84d71f188b2bbb3f8/UploadsTableModel.java/buggy/src/main/de/dal33t/powerfolder/ui/transfer/UploadsTableModel.java
task = new MyTimerTask(); getController().scheduleAndRepeat(task, UPDATE_TIME);
if (enabledPeriodicalUpdates) { task = new MyTimerTask(); getController().scheduleAndRepeat(task, UPDATE_TIME); }
public UploadsTableModel(TransferManager transferManager) { super(transferManager.getController()); this.listeners = Collections .synchronizedCollection(new LinkedList<TableModelListener>()); this.uploads = Collections.synchronizedList(new LinkedList<Upload>()); // Add listener transferManager.addListener(new UploadTransferManagerListener()); // Init init(transferManager); task = new MyTimerTask(); getController().scheduleAndRepeat(task, UPDATE_TIME); }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/a49171da04ec10edf60306c84d71f188b2bbb3f8/UploadsTableModel.java/buggy/src/main/de/dal33t/powerfolder/ui/transfer/UploadsTableModel.java
TableModelEvent e = new TableModelEvent(this, getRowCount(), getRowCount(), TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT);
TableModelEvent e = new TableModelEvent(this, getRowCount() - 1, getRowCount() - 1, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT);
private void rowAdded() { TableModelEvent e = new TableModelEvent(this, getRowCount(), getRowCount(), TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT); modelChanged(e); }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/a49171da04ec10edf60306c84d71f188b2bbb3f8/UploadsTableModel.java/buggy/src/main/de/dal33t/powerfolder/ui/transfer/UploadsTableModel.java
TableModelEvent e = new TableModelEvent(this, start, end);
TableModelEvent e = new TableModelEvent(this, start, end, TableModelEvent.ALL_COLUMNS, TableModelEvent.UPDATE);
private void rowsUpdated(int start, int end) { TableModelEvent e = new TableModelEvent(this, start, end); modelChanged(e); }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/a49171da04ec10edf60306c84d71f188b2bbb3f8/UploadsTableModel.java/buggy/src/main/de/dal33t/powerfolder/ui/transfer/UploadsTableModel.java
hashCode = HASH_INITIAL * HASH_FACTOR + Util.hashCode(value);
hashCode = hashCode * HASH_FACTOR + Util.hashCode(value);
public final int hashCode() { if (hashCode == HASH_CODE_NOT_COMPUTED) { hashCode = HASH_INITIAL * HASH_FACTOR + Util.hashCode(parameter); hashCode = HASH_INITIAL * HASH_FACTOR + Util.hashCode(value); if (hashCode == HASH_CODE_NOT_COMPUTED) { hashCode++; } } return hashCode; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/93a9ee73087009b29275c4fd77412f1b5a0354e8/Parameterization.java/buggy/bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/Parameterization.java
updateMessage();
protected void update(){ // Update the window title updateWindowTitle(); // Update the title bar updateTitleBar(); // Update the message line updateMessage(); // Update the buttons updateButtons();}
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/c4f6eea0242519035d1255fb52958492b9739dbf/WizardDialog.java/buggy/bundles/org.eclipse.ui/Eclipse JFace/org/eclipse/jface/wizard/WizardDialog.java
LineMetrics metrics = FontUtil.getLineMetrics(new_inline.getStyle().getFont(c), new_inline, tr, g2); lineHeight = (int) Math.round(new_inline.getStyle().getCalculatedStyle().getLineHeight(c));
Font font = c.getFont(style.getFont(c)); LineMetrics metrics = FontUtil.getLineMetrics(font, null, tr, g2); lineHeight = (int) style.getLineHeight(c);
public static int getBaselineOffset(CssContext c, LineBox curr_line, InlineBox new_inline, TextRenderer tr, Graphics2D g2, BlockFormattingContext bfc) { int lineHeight; int ascent; int descent; int leading; //int xheight; int baselineOffset; if (new_inline instanceof InlineTextBox) { // should be the metrics of the font, actually is the metrics of the text LineMetrics metrics = FontUtil.getLineMetrics(new_inline.getStyle().getFont(c), new_inline, tr, g2); lineHeight = (int) Math.round(new_inline.getStyle().getCalculatedStyle().getLineHeight(c)); ascent = (int) metrics.getAscent(); descent = (int) metrics.getDescent(); leading = (int) metrics.getLeading(); //xheight = (int)(-metrics.getStrikethroughOffset()*2.0); } else { lineHeight = new_inline.height; ascent = lineHeight; descent = 0; leading = 0; //xheight = lineHeight/2; } LineMetrics blockLineMetrics = curr_line.blockLineMetrics; //Assumption: our baseline is aligned with parent baseline IdentValue vertical_align = new_inline.getStyle().getCalculatedStyle().getIdent(CSSName.VERTICAL_ALIGN); if (vertical_align == IdentValue.BASELINE) { baselineOffset = 0; } else if (vertical_align == IdentValue.SUPER) { // works okay i think baselineOffset = (int) Math.round(-blockLineMetrics.getStrikethroughOffset() * 1.5);//up is negative in Java! //XRLog.render("baseline offset for super "+baselineOffset); } else if (vertical_align == IdentValue.SUB) { // works okay i think baselineOffset = (int) blockLineMetrics.getStrikethroughOffset();//up is negative in Java! //XRLog.render("baseline offset for sub "+baselineOffset); } else if (vertical_align == IdentValue.TEXT_TOP) { // the top of this text is equal to the top of the parent's text // so we take the parent's height above the baseline and subtract our // height above the baseline baselineOffset = (int) (blockLineMetrics.getAscent() - ascent); //XRLog.render("baseline offset for text-top"+baselineOffset); } else if (vertical_align == IdentValue.TEXT_BOTTOM) { baselineOffset = -(int) (blockLineMetrics.getDescent() - descent); //XRLog.render("baseline offset for text-bottom"+baselineOffset); } else if (vertical_align == IdentValue.MIDDLE) { // just like firefox! int halfxheight = -(int) (blockLineMetrics.getStrikethroughOffset()); int boxmiddle = (int) Math.round(new_inline.height / 2.0); int boxbase = (int) Math.round(ascent + leading / 2.0); int boxalign = boxbase - boxmiddle; baselineOffset = halfxheight - boxalign; } else if (vertical_align == IdentValue.TOP) { // like firefox, so I suppose it's correct... baselineOffset = curr_line.getBaseline() - lineHeight; } else if (vertical_align == IdentValue.BOTTOM) { baselineOffset = descent - (curr_line.height - curr_line.getBaseline()); } else { baselineOffset = (int) new_inline.getStyle().getCalculatedStyle().getFloatPropertyProportionalHeight(CSSName.VERTICAL_ALIGN, bfc.getHeight(), c); } return baselineOffset; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/7b06bfada90be75b4ee2dc701a4db08d653fdac8/VerticalAlign.java/clean/src/java/org/xhtmlrenderer/layout/inline/VerticalAlign.java
leading = (int) metrics.getLeading();
leading = lineHeight - (ascent + descent);
public static int getBaselineOffset(CssContext c, LineBox curr_line, InlineBox new_inline, TextRenderer tr, Graphics2D g2, BlockFormattingContext bfc) { int lineHeight; int ascent; int descent; int leading; //int xheight; int baselineOffset; if (new_inline instanceof InlineTextBox) { // should be the metrics of the font, actually is the metrics of the text LineMetrics metrics = FontUtil.getLineMetrics(new_inline.getStyle().getFont(c), new_inline, tr, g2); lineHeight = (int) Math.round(new_inline.getStyle().getCalculatedStyle().getLineHeight(c)); ascent = (int) metrics.getAscent(); descent = (int) metrics.getDescent(); leading = (int) metrics.getLeading(); //xheight = (int)(-metrics.getStrikethroughOffset()*2.0); } else { lineHeight = new_inline.height; ascent = lineHeight; descent = 0; leading = 0; //xheight = lineHeight/2; } LineMetrics blockLineMetrics = curr_line.blockLineMetrics; //Assumption: our baseline is aligned with parent baseline IdentValue vertical_align = new_inline.getStyle().getCalculatedStyle().getIdent(CSSName.VERTICAL_ALIGN); if (vertical_align == IdentValue.BASELINE) { baselineOffset = 0; } else if (vertical_align == IdentValue.SUPER) { // works okay i think baselineOffset = (int) Math.round(-blockLineMetrics.getStrikethroughOffset() * 1.5);//up is negative in Java! //XRLog.render("baseline offset for super "+baselineOffset); } else if (vertical_align == IdentValue.SUB) { // works okay i think baselineOffset = (int) blockLineMetrics.getStrikethroughOffset();//up is negative in Java! //XRLog.render("baseline offset for sub "+baselineOffset); } else if (vertical_align == IdentValue.TEXT_TOP) { // the top of this text is equal to the top of the parent's text // so we take the parent's height above the baseline and subtract our // height above the baseline baselineOffset = (int) (blockLineMetrics.getAscent() - ascent); //XRLog.render("baseline offset for text-top"+baselineOffset); } else if (vertical_align == IdentValue.TEXT_BOTTOM) { baselineOffset = -(int) (blockLineMetrics.getDescent() - descent); //XRLog.render("baseline offset for text-bottom"+baselineOffset); } else if (vertical_align == IdentValue.MIDDLE) { // just like firefox! int halfxheight = -(int) (blockLineMetrics.getStrikethroughOffset()); int boxmiddle = (int) Math.round(new_inline.height / 2.0); int boxbase = (int) Math.round(ascent + leading / 2.0); int boxalign = boxbase - boxmiddle; baselineOffset = halfxheight - boxalign; } else if (vertical_align == IdentValue.TOP) { // like firefox, so I suppose it's correct... baselineOffset = curr_line.getBaseline() - lineHeight; } else if (vertical_align == IdentValue.BOTTOM) { baselineOffset = descent - (curr_line.height - curr_line.getBaseline()); } else { baselineOffset = (int) new_inline.getStyle().getCalculatedStyle().getFloatPropertyProportionalHeight(CSSName.VERTICAL_ALIGN, bfc.getHeight(), c); } return baselineOffset; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/7b06bfada90be75b4ee2dc701a4db08d653fdac8/VerticalAlign.java/clean/src/java/org/xhtmlrenderer/layout/inline/VerticalAlign.java
public static int getBaselineOffset(CssContext c, LineBox curr_line, InlineBox new_inline, TextRenderer tr, Graphics2D g2, BlockFormattingContext bfc) { int lineHeight; int ascent; int descent; int leading; //int xheight; int baselineOffset; if (new_inline instanceof InlineTextBox) { // should be the metrics of the font, actually is the metrics of the text LineMetrics metrics = FontUtil.getLineMetrics(new_inline.getStyle().getFont(c), new_inline, tr, g2); lineHeight = (int) Math.round(new_inline.getStyle().getCalculatedStyle().getLineHeight(c)); ascent = (int) metrics.getAscent(); descent = (int) metrics.getDescent(); leading = (int) metrics.getLeading(); //xheight = (int)(-metrics.getStrikethroughOffset()*2.0); } else { lineHeight = new_inline.height; ascent = lineHeight; descent = 0; leading = 0; //xheight = lineHeight/2; } LineMetrics blockLineMetrics = curr_line.blockLineMetrics; //Assumption: our baseline is aligned with parent baseline IdentValue vertical_align = new_inline.getStyle().getCalculatedStyle().getIdent(CSSName.VERTICAL_ALIGN); if (vertical_align == IdentValue.BASELINE) { baselineOffset = 0; } else if (vertical_align == IdentValue.SUPER) { // works okay i think baselineOffset = (int) Math.round(-blockLineMetrics.getStrikethroughOffset() * 1.5);//up is negative in Java! //XRLog.render("baseline offset for super "+baselineOffset); } else if (vertical_align == IdentValue.SUB) { // works okay i think baselineOffset = (int) blockLineMetrics.getStrikethroughOffset();//up is negative in Java! //XRLog.render("baseline offset for sub "+baselineOffset); } else if (vertical_align == IdentValue.TEXT_TOP) { // the top of this text is equal to the top of the parent's text // so we take the parent's height above the baseline and subtract our // height above the baseline baselineOffset = (int) (blockLineMetrics.getAscent() - ascent); //XRLog.render("baseline offset for text-top"+baselineOffset); } else if (vertical_align == IdentValue.TEXT_BOTTOM) { baselineOffset = -(int) (blockLineMetrics.getDescent() - descent); //XRLog.render("baseline offset for text-bottom"+baselineOffset); } else if (vertical_align == IdentValue.MIDDLE) { // just like firefox! int halfxheight = -(int) (blockLineMetrics.getStrikethroughOffset()); int boxmiddle = (int) Math.round(new_inline.height / 2.0); int boxbase = (int) Math.round(ascent + leading / 2.0); int boxalign = boxbase - boxmiddle; baselineOffset = halfxheight - boxalign; } else if (vertical_align == IdentValue.TOP) { // like firefox, so I suppose it's correct... baselineOffset = curr_line.getBaseline() - lineHeight; } else if (vertical_align == IdentValue.BOTTOM) { baselineOffset = descent - (curr_line.height - curr_line.getBaseline()); } else { baselineOffset = (int) new_inline.getStyle().getCalculatedStyle().getFloatPropertyProportionalHeight(CSSName.VERTICAL_ALIGN, bfc.getHeight(), c); } return baselineOffset; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/7b06bfada90be75b4ee2dc701a4db08d653fdac8/VerticalAlign.java/clean/src/java/org/xhtmlrenderer/layout/inline/VerticalAlign.java
LineMetrics blockLineMetrics = curr_line.blockLineMetrics;
return getBaselineOffset(style, c, tr, g2, ascent, descent, lineHeight, leading, curr_line, bfc);
public static int getBaselineOffset(CssContext c, LineBox curr_line, InlineBox new_inline, TextRenderer tr, Graphics2D g2, BlockFormattingContext bfc) { int lineHeight; int ascent; int descent; int leading; //int xheight; int baselineOffset; if (new_inline instanceof InlineTextBox) { // should be the metrics of the font, actually is the metrics of the text LineMetrics metrics = FontUtil.getLineMetrics(new_inline.getStyle().getFont(c), new_inline, tr, g2); lineHeight = (int) Math.round(new_inline.getStyle().getCalculatedStyle().getLineHeight(c)); ascent = (int) metrics.getAscent(); descent = (int) metrics.getDescent(); leading = (int) metrics.getLeading(); //xheight = (int)(-metrics.getStrikethroughOffset()*2.0); } else { lineHeight = new_inline.height; ascent = lineHeight; descent = 0; leading = 0; //xheight = lineHeight/2; } LineMetrics blockLineMetrics = curr_line.blockLineMetrics; //Assumption: our baseline is aligned with parent baseline IdentValue vertical_align = new_inline.getStyle().getCalculatedStyle().getIdent(CSSName.VERTICAL_ALIGN); if (vertical_align == IdentValue.BASELINE) { baselineOffset = 0; } else if (vertical_align == IdentValue.SUPER) { // works okay i think baselineOffset = (int) Math.round(-blockLineMetrics.getStrikethroughOffset() * 1.5);//up is negative in Java! //XRLog.render("baseline offset for super "+baselineOffset); } else if (vertical_align == IdentValue.SUB) { // works okay i think baselineOffset = (int) blockLineMetrics.getStrikethroughOffset();//up is negative in Java! //XRLog.render("baseline offset for sub "+baselineOffset); } else if (vertical_align == IdentValue.TEXT_TOP) { // the top of this text is equal to the top of the parent's text // so we take the parent's height above the baseline and subtract our // height above the baseline baselineOffset = (int) (blockLineMetrics.getAscent() - ascent); //XRLog.render("baseline offset for text-top"+baselineOffset); } else if (vertical_align == IdentValue.TEXT_BOTTOM) { baselineOffset = -(int) (blockLineMetrics.getDescent() - descent); //XRLog.render("baseline offset for text-bottom"+baselineOffset); } else if (vertical_align == IdentValue.MIDDLE) { // just like firefox! int halfxheight = -(int) (blockLineMetrics.getStrikethroughOffset()); int boxmiddle = (int) Math.round(new_inline.height / 2.0); int boxbase = (int) Math.round(ascent + leading / 2.0); int boxalign = boxbase - boxmiddle; baselineOffset = halfxheight - boxalign; } else if (vertical_align == IdentValue.TOP) { // like firefox, so I suppose it's correct... baselineOffset = curr_line.getBaseline() - lineHeight; } else if (vertical_align == IdentValue.BOTTOM) { baselineOffset = descent - (curr_line.height - curr_line.getBaseline()); } else { baselineOffset = (int) new_inline.getStyle().getCalculatedStyle().getFloatPropertyProportionalHeight(CSSName.VERTICAL_ALIGN, bfc.getHeight(), c); } return baselineOffset; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/7b06bfada90be75b4ee2dc701a4db08d653fdac8/VerticalAlign.java/clean/src/java/org/xhtmlrenderer/layout/inline/VerticalAlign.java
IdentValue vertical_align = new_inline.getStyle().getCalculatedStyle().getIdent(CSSName.VERTICAL_ALIGN); if (vertical_align == IdentValue.BASELINE) { baselineOffset = 0; } else if (vertical_align == IdentValue.SUPER) { baselineOffset = (int) Math.round(-blockLineMetrics.getStrikethroughOffset() * 1.5); } else if (vertical_align == IdentValue.SUB) { baselineOffset = (int) blockLineMetrics.getStrikethroughOffset(); } else if (vertical_align == IdentValue.TEXT_TOP) { baselineOffset = (int) (blockLineMetrics.getAscent() - ascent); } else if (vertical_align == IdentValue.TEXT_BOTTOM) { baselineOffset = -(int) (blockLineMetrics.getDescent() - descent); } else if (vertical_align == IdentValue.MIDDLE) { int halfxheight = -(int) (blockLineMetrics.getStrikethroughOffset()); int boxmiddle = (int) Math.round(new_inline.height / 2.0); int boxbase = (int) Math.round(ascent + leading / 2.0); int boxalign = boxbase - boxmiddle; baselineOffset = halfxheight - boxalign; } else if (vertical_align == IdentValue.TOP) { baselineOffset = curr_line.getBaseline() - lineHeight; } else if (vertical_align == IdentValue.BOTTOM) { baselineOffset = descent - (curr_line.height - curr_line.getBaseline()); } else { baselineOffset = (int) new_inline.getStyle().getCalculatedStyle().getFloatPropertyProportionalHeight(CSSName.VERTICAL_ALIGN, bfc.getHeight(), c); } return baselineOffset;
public static int getBaselineOffset(CssContext c, LineBox curr_line, InlineBox new_inline, TextRenderer tr, Graphics2D g2, BlockFormattingContext bfc) { int lineHeight; int ascent; int descent; int leading; //int xheight; int baselineOffset; if (new_inline instanceof InlineTextBox) { // should be the metrics of the font, actually is the metrics of the text LineMetrics metrics = FontUtil.getLineMetrics(new_inline.getStyle().getFont(c), new_inline, tr, g2); lineHeight = (int) Math.round(new_inline.getStyle().getCalculatedStyle().getLineHeight(c)); ascent = (int) metrics.getAscent(); descent = (int) metrics.getDescent(); leading = (int) metrics.getLeading(); //xheight = (int)(-metrics.getStrikethroughOffset()*2.0); } else { lineHeight = new_inline.height; ascent = lineHeight; descent = 0; leading = 0; //xheight = lineHeight/2; } LineMetrics blockLineMetrics = curr_line.blockLineMetrics; //Assumption: our baseline is aligned with parent baseline IdentValue vertical_align = new_inline.getStyle().getCalculatedStyle().getIdent(CSSName.VERTICAL_ALIGN); if (vertical_align == IdentValue.BASELINE) { baselineOffset = 0; } else if (vertical_align == IdentValue.SUPER) { // works okay i think baselineOffset = (int) Math.round(-blockLineMetrics.getStrikethroughOffset() * 1.5);//up is negative in Java! //XRLog.render("baseline offset for super "+baselineOffset); } else if (vertical_align == IdentValue.SUB) { // works okay i think baselineOffset = (int) blockLineMetrics.getStrikethroughOffset();//up is negative in Java! //XRLog.render("baseline offset for sub "+baselineOffset); } else if (vertical_align == IdentValue.TEXT_TOP) { // the top of this text is equal to the top of the parent's text // so we take the parent's height above the baseline and subtract our // height above the baseline baselineOffset = (int) (blockLineMetrics.getAscent() - ascent); //XRLog.render("baseline offset for text-top"+baselineOffset); } else if (vertical_align == IdentValue.TEXT_BOTTOM) { baselineOffset = -(int) (blockLineMetrics.getDescent() - descent); //XRLog.render("baseline offset for text-bottom"+baselineOffset); } else if (vertical_align == IdentValue.MIDDLE) { // just like firefox! int halfxheight = -(int) (blockLineMetrics.getStrikethroughOffset()); int boxmiddle = (int) Math.round(new_inline.height / 2.0); int boxbase = (int) Math.round(ascent + leading / 2.0); int boxalign = boxbase - boxmiddle; baselineOffset = halfxheight - boxalign; } else if (vertical_align == IdentValue.TOP) { // like firefox, so I suppose it's correct... baselineOffset = curr_line.getBaseline() - lineHeight; } else if (vertical_align == IdentValue.BOTTOM) { baselineOffset = descent - (curr_line.height - curr_line.getBaseline()); } else { baselineOffset = (int) new_inline.getStyle().getCalculatedStyle().getFloatPropertyProportionalHeight(CSSName.VERTICAL_ALIGN, bfc.getHeight(), c); } return baselineOffset; }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/7b06bfada90be75b4ee2dc701a4db08d653fdac8/VerticalAlign.java/clean/src/java/org/xhtmlrenderer/layout/inline/VerticalAlign.java
viewMenu.add( autosizeColumns ); viewMenu.add( autosizeAndHideColumns );
viewMenu.add( viewAutosizeColumns ); viewMenu.add( viewAutosizeAndHideColumns ); viewMenu.addSeparator(); viewExportMenu.add( viewExportFIX ); viewExportMenu.add( viewExportXML ); viewExportMenu.add( viewExportCSV ); viewMenu.add( viewExportMenu );
public MenuBar() throws HeadlessException { super(); int keyMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); fileOpen.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_O, keyMask ) ); fileMenu.add( fileOpen ); fileClose.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_W, keyMask ) ); fileMenu.add( fileClose ); fileMenu.add( new JSeparator() ); fileTrace.setEnabled( true ); fileMenu.add( fileTrace ); add( fileMenu ); viewMenu.add( autosizeColumns ); viewMenu.add( autosizeAndHideColumns ); add( viewMenu ); filterAllMessages.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_M, keyMask ) ); filterMenu.add( filterAllMessages ); filterAdministrativeMessages.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_D, keyMask ) ); filterMenu.add( filterAdministrativeMessages ); filterApplicationMessages.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_P, keyMask ) ); filterMenu.add( filterApplicationMessages ); filterMenu.add( new JSeparator() ); filterCustomFilter.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_F, keyMask ) ); filterMenu.add( filterCustomFilter ); filterMenu.add( new JSeparator() ); filterMenu.add( filterIndicationCategory ); filterMenu.add( filterEventCommunicationCategory ); filterMenu.add( filterQuotationNegotiationCategory ); filterMenu.add( filterMarketDataCategory ); filterMenu.add( filterSecurityAndTradingSessionCategory ); filterMenu.add( new JSeparator() ); filterMenu.add( filterSingleGeneralOrderHandlingCategory ); filterMenu.add( filterCrossOrdersCategory ); filterMenu.add( filterMultilegOrdersCategory ); filterMenu.add( filterListProgramBasketTradingCategory ); filterMenu.add( new JSeparator() ); filterMenu.add( filterAllocationCategory ); filterMenu.add( filterConfirmationCategory ); filterMenu.add( filterSettlementInstructionsCategory ); filterMenu.add( filterTradeCaptureReportingCategory ); filterMenu.add( filterRegistrationInstructionsCategory ); filterMenu.add( filterPositionsMaintenanceCategory ); filterMenu.add( filterCollateralManagementCategory ); add( filterMenu ); helpMenu.add( about ); add( helpMenu ); reset(); addActionListener( this ); filterAllMessages.setSelected( true ); }
55685 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55685/4363305f238db09ca57c1bff107f3d4d2476840e/MenuBar.java/clean/quickfix/logviewer/MenuBar.java
helpMenu.add( about );
helpMenu.add( helpAbout );
public MenuBar() throws HeadlessException { super(); int keyMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); fileOpen.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_O, keyMask ) ); fileMenu.add( fileOpen ); fileClose.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_W, keyMask ) ); fileMenu.add( fileClose ); fileMenu.add( new JSeparator() ); fileTrace.setEnabled( true ); fileMenu.add( fileTrace ); add( fileMenu ); viewMenu.add( autosizeColumns ); viewMenu.add( autosizeAndHideColumns ); add( viewMenu ); filterAllMessages.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_M, keyMask ) ); filterMenu.add( filterAllMessages ); filterAdministrativeMessages.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_D, keyMask ) ); filterMenu.add( filterAdministrativeMessages ); filterApplicationMessages.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_P, keyMask ) ); filterMenu.add( filterApplicationMessages ); filterMenu.add( new JSeparator() ); filterCustomFilter.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_F, keyMask ) ); filterMenu.add( filterCustomFilter ); filterMenu.add( new JSeparator() ); filterMenu.add( filterIndicationCategory ); filterMenu.add( filterEventCommunicationCategory ); filterMenu.add( filterQuotationNegotiationCategory ); filterMenu.add( filterMarketDataCategory ); filterMenu.add( filterSecurityAndTradingSessionCategory ); filterMenu.add( new JSeparator() ); filterMenu.add( filterSingleGeneralOrderHandlingCategory ); filterMenu.add( filterCrossOrdersCategory ); filterMenu.add( filterMultilegOrdersCategory ); filterMenu.add( filterListProgramBasketTradingCategory ); filterMenu.add( new JSeparator() ); filterMenu.add( filterAllocationCategory ); filterMenu.add( filterConfirmationCategory ); filterMenu.add( filterSettlementInstructionsCategory ); filterMenu.add( filterTradeCaptureReportingCategory ); filterMenu.add( filterRegistrationInstructionsCategory ); filterMenu.add( filterPositionsMaintenanceCategory ); filterMenu.add( filterCollateralManagementCategory ); add( filterMenu ); helpMenu.add( about ); add( helpMenu ); reset(); addActionListener( this ); filterAllMessages.setSelected( true ); }
55685 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55685/4363305f238db09ca57c1bff107f3d4d2476840e/MenuBar.java/clean/quickfix/logviewer/MenuBar.java
autosizeColumns.addActionListener( l ); autosizeAndHideColumns.addActionListener( l ); about.addActionListener( l );
viewAutosizeColumns.addActionListener( l ); viewAutosizeAndHideColumns.addActionListener( l ); viewExportFIX.addActionListener( l ); viewExportXML.addActionListener( l ); viewExportCSV.addActionListener( l ); helpAbout.addActionListener( l );
public void addActionListener( ActionListener l ) { if( l == this ) { fileOpen.addActionListener( l ); fileClose.addActionListener( l ); fileTrace.addActionListener( l ); autosizeColumns.addActionListener( l ); autosizeAndHideColumns.addActionListener( l ); about.addActionListener( l ); Component[] components = filterMenu.getMenuComponents(); for( int i = 0; i < components.length; ++i ) { try { JCheckBoxMenuItem component = (JCheckBoxMenuItem)components[i]; component.addActionListener(l); } catch( ClassCastException cce ) { } } } else { actionListeners.add( l ); } }
55685 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55685/4363305f238db09ca57c1bff107f3d4d2476840e/MenuBar.java/clean/quickfix/logviewer/MenuBar.java
String folderId, String name, String title, String description)
String folderId, String newFolderId, String name, String sourceFileName, String title, String description, byte[] byteArray)
public DLFileEntry updateFileEntry( String folderId, String name, String title, String description) throws PortalException, RemoteException, SystemException { User user = getUser(); DLFileEntryPermission.check( getPermissionChecker(), folderId, name, ActionKeys.UPDATE); DLFileEntryPK pk = new DLFileEntryPK(folderId, name); boolean alreadyHasLock = LockServiceUtil.hasLock( DLFileEntry.class.getName(), pk, user.getUserId()); if (!alreadyHasLock) { // Lock LockServiceUtil.lock( DLFileEntry.class.getName(), pk, user.getCompanyId(), user.getUserId(), DLFileEntry.LOCK_EXPIRATION_TIME); } DLFileEntry fileEntry = DLFileEntryLocalServiceUtil.updateFileEntry( folderId, name, title, description); if (!alreadyHasLock) { // Unlock LockServiceUtil.unlock(DLFileEntry.class.getName(), pk); } return fileEntry; }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/8070b2cd3a8f006cc80a43648f5b69bbbd86a9ca/DLFileEntryServiceImpl.java/buggy/portal-ejb/src/com/liferay/portlet/documentlibrary/service/impl/DLFileEntryServiceImpl.java
folderId, name, title, description);
getUserId(), folderId, newFolderId, name, sourceFileName, title, description, byteArray);
public DLFileEntry updateFileEntry( String folderId, String name, String title, String description) throws PortalException, RemoteException, SystemException { User user = getUser(); DLFileEntryPermission.check( getPermissionChecker(), folderId, name, ActionKeys.UPDATE); DLFileEntryPK pk = new DLFileEntryPK(folderId, name); boolean alreadyHasLock = LockServiceUtil.hasLock( DLFileEntry.class.getName(), pk, user.getUserId()); if (!alreadyHasLock) { // Lock LockServiceUtil.lock( DLFileEntry.class.getName(), pk, user.getCompanyId(), user.getUserId(), DLFileEntry.LOCK_EXPIRATION_TIME); } DLFileEntry fileEntry = DLFileEntryLocalServiceUtil.updateFileEntry( folderId, name, title, description); if (!alreadyHasLock) { // Unlock LockServiceUtil.unlock(DLFileEntry.class.getName(), pk); } return fileEntry; }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/8070b2cd3a8f006cc80a43648f5b69bbbd86a9ca/DLFileEntryServiceImpl.java/buggy/portal-ejb/src/com/liferay/portlet/documentlibrary/service/impl/DLFileEntryServiceImpl.java
u.p("layout thread ending");
private synchronized void completeLayout() { u.p("layout thread ending"); done = true; graphics = null; panel.repaint(); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/0c66b0065199584307997eaf70c9585a4d0964be/HTMLPanel.java/clean/src/java/org/xhtmlrenderer/swing/HTMLPanel.java
public void scan(Folder folder, boolean manual) {
public void scan(Folder folder, boolean manual) {
public void scan(Folder folder, boolean manual) { // TODO / Ideas: // FolderScanner should only have ONE folder to be scanned at a time, // no queue. If this method gets called while scanning process is // running throw a IllegalStateException. A new scan should only be // startable swhen // 1. the former scan was finished or 2. the former scan was canceled synchronized (foldersToScan) { if (manual) { foldersToScan.add(0, folder); } else { foldersToScan.add(folder); } } synchronized (this) { notify(); } }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/6cb9bb7552e4e9ee12e7a642713b25293b4311a9/FolderScanner.java/buggy/src/main/de/dal33t/powerfolder/disk/FolderScanner.java
if (currentScanningFolder == folder) { return; } if (foldersToScan.contains(folder)) { if (manual) { foldersToScan.remove(folder); foldersToScan.add(0, folder); } else { return; } }
public void scan(Folder folder, boolean manual) { // TODO / Ideas: // FolderScanner should only have ONE folder to be scanned at a time, // no queue. If this method gets called while scanning process is // running throw a IllegalStateException. A new scan should only be // startable swhen // 1. the former scan was finished or 2. the former scan was canceled synchronized (foldersToScan) { if (manual) { foldersToScan.add(0, folder); } else { foldersToScan.add(folder); } } synchronized (this) { notify(); } }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/6cb9bb7552e4e9ee12e7a642713b25293b4311a9/FolderScanner.java/buggy/src/main/de/dal33t/powerfolder/disk/FolderScanner.java
totalFilesCount++;
private final void scanFile(File fileToScan, String currentDirName) { // this is a incomplete fileinfo just find one fast in the remaining // list log().verbose( "scanFile: " + fileToScan + " curdirname: " + currentDirName); String filename; if (currentDirName.length() == 0) { filename = fileToScan.getName(); } else { filename = currentDirName + "/" + fileToScan.getName(); } FileInfo fInfo = new FileInfo(currentScanningFolder.getInfo(), filename); FileInfo exists; boolean changed = false; synchronized (remaining) { exists = remaining.remove(fInfo); } if (exists != null) {// file was known if (exists.isDeleted()) { // file restored exists.setVersion(exists.getVersion() + 1); exists.setModifiedInfo(getController().getMySelf().getInfo(), new Date(fileToScan.lastModified())); exists.setSize(fileToScan.length()); exists.setDeleted(false); changed = true; } else { long modification = fileToScan.lastModified(); if (exists.getModifiedDate().getTime() < modification) { // disk file = newer MemberInfo myself = getController().getMySelf().getInfo(); exists.setModifiedInfo(myself, new Date(modification)); changed = true; } long size = fileToScan.length(); if (exists.getSize() != size) { // size changed exists.setSize(size); changed = true; } if (changed) { synchronized (changedFiles) { changedFiles.add(exists); } } } } else {// file is new log().verbose( "NEW file found: " + fInfo.getName() + " hash: " + fInfo.hashCode()); FileInfo info = new FileInfo(currentScanningFolder, fileToScan); info.setFolder(currentScanningFolder); info.setSize(fileToScan.length()); info.setModifiedInfo(getController().getMySelf().getInfo(), new Date(fileToScan.lastModified())); synchronized (newFiles) { newFiles.add(info); } } }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/6cb9bb7552e4e9ee12e7a642713b25293b4311a9/FolderScanner.java/buggy/src/main/de/dal33t/powerfolder/disk/FolderScanner.java
exists.setVersion(exists.getVersion() + 1);
private final void scanFile(File fileToScan, String currentDirName) { // this is a incomplete fileinfo just find one fast in the remaining // list log().verbose( "scanFile: " + fileToScan + " curdirname: " + currentDirName); String filename; if (currentDirName.length() == 0) { filename = fileToScan.getName(); } else { filename = currentDirName + "/" + fileToScan.getName(); } FileInfo fInfo = new FileInfo(currentScanningFolder.getInfo(), filename); FileInfo exists; boolean changed = false; synchronized (remaining) { exists = remaining.remove(fInfo); } if (exists != null) {// file was known if (exists.isDeleted()) { // file restored exists.setVersion(exists.getVersion() + 1); exists.setModifiedInfo(getController().getMySelf().getInfo(), new Date(fileToScan.lastModified())); exists.setSize(fileToScan.length()); exists.setDeleted(false); changed = true; } else { long modification = fileToScan.lastModified(); if (exists.getModifiedDate().getTime() < modification) { // disk file = newer MemberInfo myself = getController().getMySelf().getInfo(); exists.setModifiedInfo(myself, new Date(modification)); changed = true; } long size = fileToScan.length(); if (exists.getSize() != size) { // size changed exists.setSize(size); changed = true; } if (changed) { synchronized (changedFiles) { changedFiles.add(exists); } } } } else {// file is new log().verbose( "NEW file found: " + fInfo.getName() + " hash: " + fInfo.hashCode()); FileInfo info = new FileInfo(currentScanningFolder, fileToScan); info.setFolder(currentScanningFolder); info.setSize(fileToScan.length()); info.setModifiedInfo(getController().getMySelf().getInfo(), new Date(fileToScan.lastModified())); synchronized (newFiles) { newFiles.add(info); } } }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/6cb9bb7552e4e9ee12e7a642713b25293b4311a9/FolderScanner.java/buggy/src/main/de/dal33t/powerfolder/disk/FolderScanner.java
exists.setVersion(exists.getVersion() + 1);
private final void scanFile(File fileToScan, String currentDirName) { // this is a incomplete fileinfo just find one fast in the remaining // list log().verbose( "scanFile: " + fileToScan + " curdirname: " + currentDirName); String filename; if (currentDirName.length() == 0) { filename = fileToScan.getName(); } else { filename = currentDirName + "/" + fileToScan.getName(); } FileInfo fInfo = new FileInfo(currentScanningFolder.getInfo(), filename); FileInfo exists; boolean changed = false; synchronized (remaining) { exists = remaining.remove(fInfo); } if (exists != null) {// file was known if (exists.isDeleted()) { // file restored exists.setVersion(exists.getVersion() + 1); exists.setModifiedInfo(getController().getMySelf().getInfo(), new Date(fileToScan.lastModified())); exists.setSize(fileToScan.length()); exists.setDeleted(false); changed = true; } else { long modification = fileToScan.lastModified(); if (exists.getModifiedDate().getTime() < modification) { // disk file = newer MemberInfo myself = getController().getMySelf().getInfo(); exists.setModifiedInfo(myself, new Date(modification)); changed = true; } long size = fileToScan.length(); if (exists.getSize() != size) { // size changed exists.setSize(size); changed = true; } if (changed) { synchronized (changedFiles) { changedFiles.add(exists); } } } } else {// file is new log().verbose( "NEW file found: " + fInfo.getName() + " hash: " + fInfo.hashCode()); FileInfo info = new FileInfo(currentScanningFolder, fileToScan); info.setFolder(currentScanningFolder); info.setSize(fileToScan.length()); info.setModifiedInfo(getController().getMySelf().getInfo(), new Date(fileToScan.lastModified())); synchronized (newFiles) { newFiles.add(info); } } }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/6cb9bb7552e4e9ee12e7a642713b25293b4311a9/FolderScanner.java/buggy/src/main/de/dal33t/powerfolder/disk/FolderScanner.java
log().info("---------------FolderScanner start------------------");
log().info( getController().getMySelf().getNick() + "-------FolderScanner start-----------");
private void startScan() { log().info("---------------FolderScanner start------------------"); long started = System.currentTimeMillis(); if (currentScanningFolder != null) { throw new IllegalStateException( "don't want 2 scan 2 Folders concurrent"); } synchronized (foldersToScan) { if (foldersToScan.size() > 0) { currentScanningFolder = foldersToScan.remove(0); remaining = currentScanningFolder.getKnownFiles(); } } if (currentScanningFolder != null) { File base = currentScanningFolder.getLocalBase(); scan(base); } log().verbose("Scan took: " + (System.currentTimeMillis() - started)); log().verbose("new files:" + newFiles.size()); List<FileInfo> moved = tryFindMovements(); Map<FileInfo, List<String>> problemFiles = tryFindProblems(); result = new ScanResult(); result.setChangedFiles(changedFiles); result.setNewFiles(newFiles); result.setDeletedFiles(new ArrayList(remaining.keySet())); result.setMovedFiles(moved); result.setProblemFiles(problemFiles); currentScanningFolder.scanned(result); newFiles.clear(); changedFiles.clear(); currentScanningFolder = null; scanning = false; }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/6cb9bb7552e4e9ee12e7a642713b25293b4311a9/FolderScanner.java/buggy/src/main/de/dal33t/powerfolder/disk/FolderScanner.java
changedFiles.clear();
changedFiles.clear();
private void startScan() { log().info("---------------FolderScanner start------------------"); long started = System.currentTimeMillis(); if (currentScanningFolder != null) { throw new IllegalStateException( "don't want 2 scan 2 Folders concurrent"); } synchronized (foldersToScan) { if (foldersToScan.size() > 0) { currentScanningFolder = foldersToScan.remove(0); remaining = currentScanningFolder.getKnownFiles(); } } if (currentScanningFolder != null) { File base = currentScanningFolder.getLocalBase(); scan(base); } log().verbose("Scan took: " + (System.currentTimeMillis() - started)); log().verbose("new files:" + newFiles.size()); List<FileInfo> moved = tryFindMovements(); Map<FileInfo, List<String>> problemFiles = tryFindProblems(); result = new ScanResult(); result.setChangedFiles(changedFiles); result.setNewFiles(newFiles); result.setDeletedFiles(new ArrayList(remaining.keySet())); result.setMovedFiles(moved); result.setProblemFiles(problemFiles); currentScanningFolder.scanned(result); newFiles.clear(); changedFiles.clear(); currentScanningFolder = null; scanning = false; }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/6cb9bb7552e4e9ee12e7a642713b25293b4311a9/FolderScanner.java/buggy/src/main/de/dal33t/powerfolder/disk/FolderScanner.java
synchronized (this) { notify(); }
private void startScan() { log().info("---------------FolderScanner start------------------"); long started = System.currentTimeMillis(); if (currentScanningFolder != null) { throw new IllegalStateException( "don't want 2 scan 2 Folders concurrent"); } synchronized (foldersToScan) { if (foldersToScan.size() > 0) { currentScanningFolder = foldersToScan.remove(0); remaining = currentScanningFolder.getKnownFiles(); } } if (currentScanningFolder != null) { File base = currentScanningFolder.getLocalBase(); scan(base); } log().verbose("Scan took: " + (System.currentTimeMillis() - started)); log().verbose("new files:" + newFiles.size()); List<FileInfo> moved = tryFindMovements(); Map<FileInfo, List<String>> problemFiles = tryFindProblems(); result = new ScanResult(); result.setChangedFiles(changedFiles); result.setNewFiles(newFiles); result.setDeletedFiles(new ArrayList(remaining.keySet())); result.setMovedFiles(moved); result.setProblemFiles(problemFiles); currentScanningFolder.scanned(result); newFiles.clear(); changedFiles.clear(); currentScanningFolder = null; scanning = false; }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/6cb9bb7552e4e9ee12e7a642713b25293b4311a9/FolderScanner.java/buggy/src/main/de/dal33t/powerfolder/disk/FolderScanner.java
throw new NotImplementedError("chroot not implemented: chroot is non-portable and is not supported.");
throw new NotImplementedError(recv.getRuntime(), "chroot not implemented: chroot is non-portable and is not supported.");
public static IRubyObject chroot(IRubyObject recv, RubyString path) { throw new NotImplementedError("chroot not implemented: chroot is non-portable and is not supported."); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/76d37f709db398798e5b6a889937559a9e75e062/RubyDir.java/clean/org/jruby/RubyDir.java
throw new NotImplementedError();
throw new NotImplementedError(recv.getRuntime());
public static IRubyObject open(IRubyObject recv, RubyString path) { throw new NotImplementedError(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/76d37f709db398798e5b6a889937559a9e75e062/RubyDir.java/clean/org/jruby/RubyDir.java
job = newJob; }
job = newJob; }
JobMonitor(Job newJob) { job = newJob; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/9f68fc05c49b144eebae1957b15f8f3671c54cac/ProgressManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java
listener = monitor; JobInfo info = getJobInfo(job); TaskInfo currentTask = info.getTaskInfo(); if (currentTask != null) { listener.beginTask(currentTaskName, currentTask.totalWork); listener.internalWorked(currentTask.preWork); } }
listener = monitor; JobInfo info = getJobInfo(job); TaskInfo currentTask = info.getTaskInfo(); if (currentTask != null) { listener.beginTask(currentTaskName, currentTask.totalWork); listener.internalWorked(currentTask.preWork); } }
void addProgressListener(IProgressMonitorWithBlocking monitor) { listener = monitor; JobInfo info = getJobInfo(job); TaskInfo currentTask = info.getTaskInfo(); if (currentTask != null) { listener.beginTask(currentTaskName, currentTask.totalWork); listener.internalWorked(currentTask.preWork); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/9f68fc05c49b144eebae1957b15f8f3671c54cac/ProgressManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java
JobInfo info = getJobInfo(job); info.beginTask(taskName, totalWork); refreshJobInfo(info); currentTaskName = taskName; if (listener != null) {
JobInfo info = getJobInfo(job); info.beginTask(taskName, totalWork); refreshJobInfo(info); currentTaskName = taskName; if (listener != null) {
public void beginTask(String taskName, int totalWork) { JobInfo info = getJobInfo(job); info.beginTask(taskName, totalWork); refreshJobInfo(info); currentTaskName = taskName; if (listener != null) { listener.beginTask(taskName, totalWork); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/9f68fc05c49b144eebae1957b15f8f3671c54cac/ProgressManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java
}
}
public void beginTask(String taskName, int totalWork) { JobInfo info = getJobInfo(job); info.beginTask(taskName, totalWork); refreshJobInfo(info); currentTaskName = taskName; if (listener != null) { listener.beginTask(taskName, totalWork); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/9f68fc05c49b144eebae1957b15f8f3671c54cac/ProgressManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java
JobInfo info = getJobInfo(job); info.setBlockedStatus(null); refreshJobInfo(info); if (listener != null) {
JobInfo info = getJobInfo(job); info.setBlockedStatus(null); refreshJobInfo(info); if (listener != null) {
public void clearBlocked() { JobInfo info = getJobInfo(job); info.setBlockedStatus(null); refreshJobInfo(info); if (listener != null) { listener.clearBlocked(); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/9f68fc05c49b144eebae1957b15f8f3671c54cac/ProgressManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java
}
}
public void clearBlocked() { JobInfo info = getJobInfo(job); info.setBlockedStatus(null); refreshJobInfo(info); if (listener != null) { listener.clearBlocked(); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/9f68fc05c49b144eebae1957b15f8f3671c54cac/ProgressManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java
JobInfo info = getJobInfo(job); info.clearTaskInfo(); info.clearChildren(); runnableMonitors.remove(job); if (listener != null) {
JobInfo info = getJobInfo(job); info.clearTaskInfo(); info.clearChildren(); runnableMonitors.remove(job); if (listener != null) {
public void done() { JobInfo info = getJobInfo(job); info.clearTaskInfo(); info.clearChildren(); runnableMonitors.remove(job); if (listener != null) { listener.done(); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/9f68fc05c49b144eebae1957b15f8f3671c54cac/ProgressManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java
}
}
public void done() { JobInfo info = getJobInfo(job); info.clearTaskInfo(); info.clearChildren(); runnableMonitors.remove(job); if (listener != null) { listener.done(); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/9f68fc05c49b144eebae1957b15f8f3671c54cac/ProgressManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java
JobInfo info = getJobInfo(job); if (info.hasTaskInfo()) { info.addWork(work); refreshJobInfo(info); } if (listener != null) {
JobInfo info = getJobInfo(job); if (info.hasTaskInfo()) { info.addWork(work); refreshJobInfo(info); } if (listener != null) {
public void internalWorked(double work) { JobInfo info = getJobInfo(job); if (info.hasTaskInfo()) { info.addWork(work); refreshJobInfo(info); } if (listener != null) { listener.internalWorked(work); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/9f68fc05c49b144eebae1957b15f8f3671c54cac/ProgressManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java
}
}
public void internalWorked(double work) { JobInfo info = getJobInfo(job); if (info.hasTaskInfo()) { info.addWork(work); refreshJobInfo(info); } if (listener != null) { listener.internalWorked(work); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/9f68fc05c49b144eebae1957b15f8f3671c54cac/ProgressManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java
JobInfo info = getJobInfo(job); return info.isCanceled(); }
JobInfo info = getJobInfo(job); return info.isCanceled(); }
public boolean isCanceled() { JobInfo info = getJobInfo(job); return info.isCanceled(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/9f68fc05c49b144eebae1957b15f8f3671c54cac/ProgressManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java
JobInfo info = getJobInfo(job); info.setBlockedStatus(null); refreshJobInfo(info); if (listener != null) {
JobInfo info = getJobInfo(job); info.setBlockedStatus(null); refreshJobInfo(info); if (listener != null) {
public void setBlocked(IStatus reason) { JobInfo info = getJobInfo(job); info.setBlockedStatus(null); refreshJobInfo(info); if (listener != null) { listener.setBlocked(reason); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/9f68fc05c49b144eebae1957b15f8f3671c54cac/ProgressManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java
}
}
public void setBlocked(IStatus reason) { JobInfo info = getJobInfo(job); info.setBlockedStatus(null); refreshJobInfo(info); if (listener != null) { listener.setBlocked(reason); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/9f68fc05c49b144eebae1957b15f8f3671c54cac/ProgressManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java