rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
if (!fullRepaint) | if (!fullRepaint) { | protected synchronized void updateImage(int x, int y , int width, int height) { if (gg2d == null) { //System.out.println("was null"); gg2d = (Graphics2D)gui.getGraphics(); } // check for selected area and erase it before updating screen if (gui.rubberband != null && gui.rubberband.isAreaSelected()) { gui.rubberband.erase(); } if (bi == null || gg2d == null) { if (bi == null) System.out.println("bi was null in update image"); if (gg2d == null) System.out.println("gg2d was null in update image"); return; } g2d.setClip(x,y,width,height); if (!cursorActive && x + width <= bi.getWidth(null) && y + height <= (bi.getHeight(null) - fmWidth)) {// if (!cursorActive) { paintComponent2(g2d); }// if (tileimage != null) {//// AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f);// g2d.setComposite(ac);// g2d.drawImage(tileimage, null, null);// } // fix for jdk1.4 - found this while testing under jdk1.4 // if the height and or the width are equal to zero we skip the // the updating of the image.// if (gui.isVisible() && height > 0 && width > 0) {// bi.drawImageBuffer(gg2d,x,y,width,height);// } if (gui.isVisible()) { if (height > 0 && width > 0) { // We now redraw the selected area rectangle. if (gui.rubberband != null && gui.rubberband.isAreaSelected()) { gui.rubberband.draw(); } if (!fullRepaint) bi.drawImageBuffer(gg2d,x,y,width,height); else gui.repaint();// System.out.println(" something went right finally " + gui.isVisible() +// " height " + height + " width " + width); }// else { // bi.drawImageBuffer(gg2d);// System.out.println(" something is wrong here " + gui.isVisible() +// " height " + height + " width " + width);// } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6df9beff359d58308f77418bf46d7eb474d031a7/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java |
} | protected synchronized void updateImage(int x, int y , int width, int height) { if (gg2d == null) { //System.out.println("was null"); gg2d = (Graphics2D)gui.getGraphics(); } // check for selected area and erase it before updating screen if (gui.rubberband != null && gui.rubberband.isAreaSelected()) { gui.rubberband.erase(); } if (bi == null || gg2d == null) { if (bi == null) System.out.println("bi was null in update image"); if (gg2d == null) System.out.println("gg2d was null in update image"); return; } g2d.setClip(x,y,width,height); if (!cursorActive && x + width <= bi.getWidth(null) && y + height <= (bi.getHeight(null) - fmWidth)) {// if (!cursorActive) { paintComponent2(g2d); }// if (tileimage != null) {//// AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f);// g2d.setComposite(ac);// g2d.drawImage(tileimage, null, null);// } // fix for jdk1.4 - found this while testing under jdk1.4 // if the height and or the width are equal to zero we skip the // the updating of the image.// if (gui.isVisible() && height > 0 && width > 0) {// bi.drawImageBuffer(gg2d,x,y,width,height);// } if (gui.isVisible()) { if (height > 0 && width > 0) { // We now redraw the selected area rectangle. if (gui.rubberband != null && gui.rubberband.isAreaSelected()) { gui.rubberband.draw(); } if (!fullRepaint) bi.drawImageBuffer(gg2d,x,y,width,height); else gui.repaint();// System.out.println(" something went right finally " + gui.isVisible() +// " height " + height + " width " + width); }// else { // bi.drawImageBuffer(gg2d);// System.out.println(" something is wrong here " + gui.isVisible() +// " height " + height + " width " + width);// } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6df9beff359d58308f77418bf46d7eb474d031a7/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java |
|
c.setOpaque(true); | protected void installDefaults(JLabel c) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); c.setForeground(defaults.getColor("Label.foreground")); c.setBackground(defaults.getColor("Label.background")); c.setFont(defaults.getFont("Label.font")); c.setBorder(defaults.getBorder("Label.border")); c.setOpaque(true); //XXX: There are properties we don't use called disabledForeground //and disabledShadow. } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/BasicLabelUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicLabelUI.java |
|
public LabelUI() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/LabelUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/LabelUI.java |
||
public MenuEvent(Object source) { | public MenuEvent(Object source) { | public MenuEvent(Object source) { super(source); } // MenuEvent() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/MenuEvent.java/buggy/core/src/classpath/javax/javax/swing/event/MenuEvent.java |
} | } | public MenuEvent(Object source) { super(source); } // MenuEvent() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/MenuEvent.java/buggy/core/src/classpath/javax/javax/swing/event/MenuEvent.java |
public SpinnerUI() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/SpinnerUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/SpinnerUI.java |
||
if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; | if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; } else { keysBuffered = true; if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } | public void sendKeys(String text) { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9e3f98202f0eb0ef5207f9793209ab3f13916f81/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java |
isInField(lastPos,true); strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); | if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } isInField(lastPos,true); if (text.length() == 1 && !text.equals("[") && !text.equals("]")) { simulateKeyStroke(text.charAt(0)); | public void sendKeys(String text) { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9e3f98202f0eb0ef5207f9793209ab3f13916f81/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java |
if (s != null) simulateMnemonic(getMnemonicValue(s)); else | strokenizer.setKeyStrokes(text); String s; boolean done = false; | public void sendKeys(String text) { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9e3f98202f0eb0ef5207f9793209ab3f13916f81/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java |
System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; | while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } | public void sendKeys(String text) { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9e3f98202f0eb0ef5207f9793209ab3f13916f81/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java |
public static final ResourceBundle getBundle(String baseName, Locale locale) | public static final ResourceBundle getBundle(String baseName) | public static final ResourceBundle getBundle(String baseName, Locale locale) { return getBundle(baseName, locale, security.getCallingClassLoader()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/9f3276c764a7f5fb60abdd6d117191387354920c/ResourceBundle.java/buggy/core/src/classpath/java/java/util/ResourceBundle.java |
return getBundle(baseName, locale, security.getCallingClassLoader()); | return getBundle(baseName, Locale.getDefault(), security.getCallingClassLoader()); | public static final ResourceBundle getBundle(String baseName, Locale locale) { return getBundle(baseName, locale, security.getCallingClassLoader()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/9f3276c764a7f5fb60abdd6d117191387354920c/ResourceBundle.java/buggy/core/src/classpath/java/java/util/ResourceBundle.java |
setSize(view.getPreferredSpan(X_AXIS), view.getPreferredSpan(Y_AXIS)); | public HTMLRootView(JComponent c, View view, EditorKit kit, Document doc) { super(null); component = c; editorKit = kit; document = doc; setView(view); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicHTML.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicHTML.java |
|
public String toString() { return null; } | public String toString() { return this.getClass().toString() + "[ source=" + source.toString() + " firstIndex= " + firstIndex + " lastIndex= " + lastIndex + " isAdjusting= " + isAdjusting + " ]"; } | public String toString() { return null; // TODO } // toString() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ListSelectionEvent.java/clean/core/src/classpath/javax/javax/swing/event/ListSelectionEvent.java |
protected AccessibleJCheckBoxMenuItem() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JCheckBoxMenuItem.java/clean/core/src/classpath/javax/javax/swing/JCheckBoxMenuItem.java |
||
log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); | Level.toLevel(org.apache.log4j.Level.DEBUG_INT); | public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); break; } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Log4jLogger.java/buggy/tn5250j/src/org/tn5250j/tools/logging/Log4jLogger.java |
log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); | Level.toLevel(org.apache.log4j.Level.INFO_INT); | public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); break; } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Log4jLogger.java/buggy/tn5250j/src/org/tn5250j/tools/logging/Log4jLogger.java |
log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); | Level.toLevel(org.apache.log4j.Level.WARN_INT); | public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); break; } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Log4jLogger.java/buggy/tn5250j/src/org/tn5250j/tools/logging/Log4jLogger.java |
log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); | Level.toLevel(org.apache.log4j.Level.ERROR_INT); | public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); break; } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Log4jLogger.java/buggy/tn5250j/src/org/tn5250j/tools/logging/Log4jLogger.java |
log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); | Level.toLevel(org.apache.log4j.Level.FATAL_INT); | public void setLevel(int newLevel) { switch (newLevel) { case OFF: Level.toLevel(Level.OFF_INT); break; case DEBUG: log.getLevel().toLevel(org.apache.log4j.Level.DEBUG_INT); break; case INFO: log.getLevel().toLevel(org.apache.log4j.Level.INFO_INT); break; case WARN: log.getLevel().toLevel(org.apache.log4j.Level.WARN_INT); break; case ERROR: log.getLevel().toLevel(org.apache.log4j.Level.ERROR_INT); break; case FATAL: log.getLevel().toLevel(org.apache.log4j.Level.FATAL_INT); break; } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/Log4jLogger.java/buggy/tn5250j/src/org/tn5250j/tools/logging/Log4jLogger.java |
if (selectionMode == SINGLE_SELECTION) setSelectionInterval(index0, index1); | public void addSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); oldSel = sel.clone(); if (selectionMode == SINGLE_SELECTION) setSelectionInterval(index0, index1); // COMPAT: Like Sun (but not like IBM), we allow calls to // addSelectionInterval when selectionMode is // SINGLE_SELECTION_INTERVAL iff the interval being added // is adjacent to an already selected interval if (selectionMode == SINGLE_INTERVAL_SELECTION) if (!(isSelectedIndex(index0) || isSelectedIndex(index1) || isSelectedIndex(Math.max(lo-1,0)) || isSelectedIndex(Math.min(hi+1,sel.size())))) sel.clear(); // We have to update the anchorSelectionIndex and leadSelectionIndex // variables // The next if statements breaks down to "if this selection is adjacent // to the previous selection and going in the same direction" if ((isSelectedIndex(leadSelectionIndex)) && ((index0 - 1 == leadSelectionIndex && (index1 >= index0) && (leadSelectionIndex >= anchorSelectionIndex)) || (index0 + 1 == leadSelectionIndex && (index1 <= index0) && (leadSelectionIndex <= anchorSelectionIndex))) && (anchorSelectionIndex != -1 || leadSelectionIndex != -1)) { // setting setLeadCalledFromAdd to true tells setLeadSelectionIndex // not to update oldSel setLeadCalledFromAdd = true; setLeadSelectionIndex(index1); setLeadCalledFromAdd = false; } else { leadSelectionIndex = index1; anchorSelectionIndex = index0; sel.set(lo, hi+1); fireDifference(sel, (BitSet) oldSel); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/DefaultListSelectionModel.java |
|
} | public void addSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); oldSel = sel.clone(); if (selectionMode == SINGLE_SELECTION) setSelectionInterval(index0, index1); // COMPAT: Like Sun (but not like IBM), we allow calls to // addSelectionInterval when selectionMode is // SINGLE_SELECTION_INTERVAL iff the interval being added // is adjacent to an already selected interval if (selectionMode == SINGLE_INTERVAL_SELECTION) if (!(isSelectedIndex(index0) || isSelectedIndex(index1) || isSelectedIndex(Math.max(lo-1,0)) || isSelectedIndex(Math.min(hi+1,sel.size())))) sel.clear(); // We have to update the anchorSelectionIndex and leadSelectionIndex // variables // The next if statements breaks down to "if this selection is adjacent // to the previous selection and going in the same direction" if ((isSelectedIndex(leadSelectionIndex)) && ((index0 - 1 == leadSelectionIndex && (index1 >= index0) && (leadSelectionIndex >= anchorSelectionIndex)) || (index0 + 1 == leadSelectionIndex && (index1 <= index0) && (leadSelectionIndex <= anchorSelectionIndex))) && (anchorSelectionIndex != -1 || leadSelectionIndex != -1)) { // setting setLeadCalledFromAdd to true tells setLeadSelectionIndex // not to update oldSel setLeadCalledFromAdd = true; setLeadSelectionIndex(index1); setLeadCalledFromAdd = false; } else { leadSelectionIndex = index1; anchorSelectionIndex = index0; sel.set(lo, hi+1); fireDifference(sel, (BitSet) oldSel); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/DefaultListSelectionModel.java |
|
public void setAnchorSelectionIndex(int anchorIndex) | public void setAnchorSelectionIndex(int index) | public void setAnchorSelectionIndex(int anchorIndex) { anchorSelectionIndex = anchorIndex; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/DefaultListSelectionModel.java |
anchorSelectionIndex = anchorIndex; | if (anchorSelectionIndex != index) { int old = anchorSelectionIndex; anchorSelectionIndex = index; if (leadAnchorNotificationEnabled) fireValueChanged(index, old); } | public void setAnchorSelectionIndex(int anchorIndex) { anchorSelectionIndex = anchorIndex; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/DefaultListSelectionModel.java |
public void setSelectionInterval(int index0, int index1) | public void setSelectionInterval(int anchor, int lead) | public void setSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/DefaultListSelectionModel.java |
if (index0 == -1 || index1 == -1) | if (anchor == -1 || lead == -1) | public void setSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/DefaultListSelectionModel.java |
index0 = index1; | anchor = lead; | public void setSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/DefaultListSelectionModel.java |
int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); | int lo = Math.min(anchor, lead); int hi = Math.max(anchor, lead); | public void setSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/DefaultListSelectionModel.java |
setAnchorSelectionIndex(index0); leadSelectionIndex=index1; | setAnchorSelectionIndex(anchor); leadSelectionIndex = lead; | public void setSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/DefaultListSelectionModel.java |
} | public void setSelectionInterval(int index0, int index1) { if (index0 == -1 || index1 == -1) return; BitSet oldSel = (BitSet) sel.clone(); sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables setAnchorSelectionIndex(index0); leadSelectionIndex=index1; fireDifference(sel, oldSel); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/DefaultListSelectionModel.java |
|
void insertIndexInterval(int index, int length, boolean before); | void insertIndexInterval(int index, int length, boolean before); | void insertIndexInterval(int index, int length, boolean before); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/ListSelectionModel.java/buggy/core/src/classpath/javax/javax/swing/ListSelectionModel.java |
void removeIndexInterval(int index0, int index1); | void removeIndexInterval(int index0, int index1); | void removeIndexInterval(int index0, int index1); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/ListSelectionModel.java/buggy/core/src/classpath/javax/javax/swing/ListSelectionModel.java |
revalidate(); repaint(); | public void setText(String newText) { if (text != newText) { String oldText = text; text = newText; firePropertyChange("text", oldText, newText); if (text != null && text.length() <= displayedMnemonicIndex) setDisplayedMnemonicIndex(text.length() - 1); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JLabel.java/buggy/core/src/classpath/javax/javax/swing/JLabel.java |
|
new GrayFilter(false, 100)))); | new GrayFilter(true, 0)))); | public static Image createDisabledImage(Image src) { return (Toolkit.getDefaultToolkit(). createImage(new FilteredImageSource(src.getSource(), new GrayFilter(false, 100)))); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/GrayFilter.java/buggy/core/src/classpath/javax/javax/swing/GrayFilter.java |
Class c = Class.forName("org.tn5250j.transport.SSL.SSLImplementation"); | Class c = Class.forName("org.tn5250j.framework.transport.SSL.SSLImplementation"); | public Socket createSocket(String destination, int port) { try { if (sslType.equals(SSLConstants.SSL_TYPE_NONE)) { System.out.println("Creating Socket"); // for jdk 1.4// return SocketFactory.getDefault().createSocket(destination,port); return new Socket(destination,port); } //Using SSL Socket SSLInterface o = null; try { Class c = Class.forName("org.tn5250j.transport.SSL.SSLImplementation"); o = (SSLInterface)c.newInstance(); o.setSSLType(sslType); return o.createSSLSocket(destination,port); } catch (Exception e) { System.err.println(e); } } catch (Exception e) { System.err.println("SocketConnector: createSocket: " + e.getMessage()); } return null; } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/045d501464a6456025b2ce1e473ae86cfc285fd0/SocketConnector.java/clean/tn5250j/src/org/tn5250j/framework/transport/SocketConnector.java |
public void menuDragMouseExited(MenuDragMouseEvent e) { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicMenuItemUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuItemUI.java |
||
public void menuKeyPressed(MenuKeyEvent e) { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicMenuItemUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuItemUI.java |
||
public void menuKeyReleased(MenuKeyEvent e) { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicMenuItemUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuItemUI.java |
||
public void menuKeyTyped(MenuKeyEvent e) { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicMenuItemUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuItemUI.java |
||
protected MouseInputHandler() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicMenuItemUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuItemUI.java |
||
public static void setTabSet(MutableAttributeSet a, javax.swing.text.TabSet tabs) | public static void setTabSet(MutableAttributeSet a, javax.swing.text.TabSet tabs) | public static void setTabSet(MutableAttributeSet a, javax.swing.text.TabSet tabs) { a.addAttribute(StyleConstants.TabSet, tabs); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/StyleConstants.java/buggy/core/src/classpath/javax/javax/swing/text/StyleConstants.java |
log.debug(" bound " + band.getEndPoint()); | public void areaBounded(RubberBand band, int x1, int y1, int x2, int y2) {// repaint(x1,y1,x2-1,y2-1); repaint();// System.out.println(" bound " + band.getEndPoint()); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
|
catch (Exception exc) {} | catch (Exception exc) { log.warn(""+exc.getMessage()); } | private void doTransfer(java.io.File file) { try { Properties props = new Properties(); props.load(new java.io.FileInputStream(file)); org.tn5250j.tools.XTFRFile tfr = new org.tn5250j.tools.XTFRFile(null, vt, (Session)this,props); } catch (Exception exc) {} } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
log.debug("Initializing macros"); | private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false);// setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(false); screen = new Screen5250(this,sesConfig); this.addComponentListener(this); if (!sesConfig.isPropertyExists("width") || !sesConfig.isPropertyExists("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(sesConfig.getIntegerProperty("width"), sesConfig.getIntegerProperty("height")); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 & doubleClick) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); scroller = new SessionScroller().getScrollerInstance((Session)this); if (!sesConfig.getStringProperty("mouseWheel").equals("Yes")) scroller.removeMouseWheelListener((Session)this); keyHandler = KeyboardHandler.getKeyboardHandlerInstance((Session)this); macros = new Macronizer(); Macronizer.init(); keyPad.addActionListener(this); if (sesConfig.getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); // check if double click sends enter if (sesConfig.getStringProperty("doubleClick").equals("Yes")) doubleClick = true; else doubleClick = false; DropTargetAdapter dta = new DropTargetAdapter() { public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } }; DropTarget dt = new DropTarget((JPanel)this,dta); setDropTarget(dt); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
|
System.out.println("dtde drop it2 "); | log.debug("dtde drop it2 "); | private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false);// setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(false); screen = new Screen5250(this,sesConfig); this.addComponentListener(this); if (!sesConfig.isPropertyExists("width") || !sesConfig.isPropertyExists("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(sesConfig.getIntegerProperty("width"), sesConfig.getIntegerProperty("height")); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 & doubleClick) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); scroller = new SessionScroller().getScrollerInstance((Session)this); if (!sesConfig.getStringProperty("mouseWheel").equals("Yes")) scroller.removeMouseWheelListener((Session)this); keyHandler = KeyboardHandler.getKeyboardHandlerInstance((Session)this); macros = new Macronizer(); Macronizer.init(); keyPad.addActionListener(this); if (sesConfig.getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); // check if double click sends enter if (sesConfig.getStringProperty("doubleClick").equals("Yes")) doubleClick = true; else doubleClick = false; DropTargetAdapter dta = new DropTargetAdapter() { public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } }; DropTarget dt = new DropTarget((JPanel)this,dta); setDropTarget(dt); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
System.out.println("importData: unsupported data flavor"); | log.info("importData: unsupported data flavor"); | private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false);// setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(false); screen = new Screen5250(this,sesConfig); this.addComponentListener(this); if (!sesConfig.isPropertyExists("width") || !sesConfig.isPropertyExists("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(sesConfig.getIntegerProperty("width"), sesConfig.getIntegerProperty("height")); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 & doubleClick) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); scroller = new SessionScroller().getScrollerInstance((Session)this); if (!sesConfig.getStringProperty("mouseWheel").equals("Yes")) scroller.removeMouseWheelListener((Session)this); keyHandler = KeyboardHandler.getKeyboardHandlerInstance((Session)this); macros = new Macronizer(); Macronizer.init(); keyPad.addActionListener(this); if (sesConfig.getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); // check if double click sends enter if (sesConfig.getStringProperty("doubleClick").equals("Yes")) doubleClick = true; else doubleClick = false; DropTargetAdapter dta = new DropTargetAdapter() { public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } }; DropTarget dt = new DropTarget((JPanel)this,dta); setDropTarget(dt); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
System.out.println("importData: I/O exception"); | log.warn("importData: I/O exception"); | private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false);// setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(false); screen = new Screen5250(this,sesConfig); this.addComponentListener(this); if (!sesConfig.isPropertyExists("width") || !sesConfig.isPropertyExists("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(sesConfig.getIntegerProperty("width"), sesConfig.getIntegerProperty("height")); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 & doubleClick) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); scroller = new SessionScroller().getScrollerInstance((Session)this); if (!sesConfig.getStringProperty("mouseWheel").equals("Yes")) scroller.removeMouseWheelListener((Session)this); keyHandler = KeyboardHandler.getKeyboardHandlerInstance((Session)this); macros = new Macronizer(); Macronizer.init(); keyPad.addActionListener(this); if (sesConfig.getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); // check if double click sends enter if (sesConfig.getStringProperty("doubleClick").equals("Yes")) doubleClick = true; else doubleClick = false; DropTargetAdapter dta = new DropTargetAdapter() { public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } }; DropTarget dt = new DropTarget((JPanel)this,dta); setDropTarget(dt); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
System.out.println(ex.getMessage()); | log.warn(""+ex.getMessage()); | private void jbInit() throws Exception { this.setLayout(borderLayout1);// this.setOpaque(false);// setDoubleBuffered(true); s.setOpaque(false); s.setDoubleBuffered(false); screen = new Screen5250(this,sesConfig); this.addComponentListener(this); if (!sesConfig.isPropertyExists("width") || !sesConfig.isPropertyExists("height")) // set the initialize size this.setSize(screen.getPreferredSize()); else { this.setSize(sesConfig.getIntegerProperty("width"), sesConfig.getIntegerProperty("height")); } addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { /** @todo check for popup trigger on linux * */// if (e.isPopupTrigger()) { // using SwingUtilities because popuptrigger does not work on linux if (SwingUtilities.isRightMouseButton(e)) { doPopup(e); } } public void mouseReleased(MouseEvent e) {// System.out.println("Mouse Released"); } public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 & doubleClick) { screen.sendKeys("[enter]"); } else { screen.moveCursor(e); repaint(); getFocusForMe(); } } }); scroller = new SessionScroller().getScrollerInstance((Session)this); if (!sesConfig.getStringProperty("mouseWheel").equals("Yes")) scroller.removeMouseWheelListener((Session)this); keyHandler = KeyboardHandler.getKeyboardHandlerInstance((Session)this); macros = new Macronizer(); Macronizer.init(); keyPad.addActionListener(this); if (sesConfig.getStringProperty("keypad").equals("Yes")) keyPad.setVisible(true); else keyPad.setVisible(false); // Warning do not change the the order of the adding of keypad and // the screen. This will cause resizing problems because it will // resize the screen first and during the resize we need to calculate // the bouding area based on the height of the keyPad. // See resizeMe() and getDrawingBounds() this.add(keyPad,BorderLayout.SOUTH); this.add(s,BorderLayout.CENTER); setRubberBand(new TNRubberBand(this)); this.requestFocus(); jumpEvent = new SessionJumpEvent(this); // check if double click sends enter if (sesConfig.getStringProperty("doubleClick").equals("Yes")) doubleClick = true; else doubleClick = false; DropTargetAdapter dta = new DropTargetAdapter() { public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } }; DropTarget dt = new DropTarget((JPanel)this,dta); setDropTarget(dt); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
System.out.println("dtde drop it2 "); | log.debug("dtde drop it2 "); | public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
System.out.println("importData: unsupported data flavor"); | log.info("importData: unsupported data flavor"); | public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
System.out.println("importData: I/O exception"); | log.warn("importData: I/O exception"); | public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
System.out.println(ex.getMessage()); | log.warn(""+ex.getMessage()); | public void drop(DropTargetDropEvent dtde) { Transferable tr = dtde.getTransferable(); dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); DataFlavor[] dfs = dtde.getCurrentDataFlavors(); if(tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { try { System.out.println("dtde drop it2 "); java.util.List fileList = (java.util.List)tr.getTransferData(DataFlavor.javaFileListFlavor); // implementation for when we are able to process a list // of files.// Iterator iterator = fileList.iterator();// if (iterator.hasNext()) {// File file = (File)iterator.next();// } java.io.File file = (java.io.File)fileList.get(0); System.out.println(file.toString()); dtde.dropComplete(true); doTransfer(file); return; } catch (UnsupportedFlavorException ufe) { System.out.println("importData: unsupported data flavor"); } catch (java.io.IOException ieo) { System.out.println("importData: I/O exception"); } catch (Exception ex) { System.out.println(ex.getMessage()); } finally { dtde.dropComplete(false); } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
log.debug("paint from screen"); | protected void paintComponent(Graphics g) {// System.out.println("paint from screen"); screen.paintComponent3(g); if (rubberband.isAreaSelected() && !rubberband.isDragging()) { rubberband.erase(); rubberband.draw(); } keyPad.repaint(); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
|
System.out.println(macName); | log.info(macName); | protected void startRecordingMe() { String macName = (String)JOptionPane.showInputDialog(null, LangTool.getString("macro.message"), LangTool.getString("macro.title"), JOptionPane.PLAIN_MESSAGE); if (macName != null) { macName = macName.trim(); if (macName.length() > 0) { System.out.println(macName); newMacName = macName; keyHandler.startRecording(); } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
System.out.println(keyHandler.getRecordBuffer()); | log.debug(keyHandler.getRecordBuffer()); | protected void stopRecordingMe() { if (keyHandler.getRecordBuffer().length() > 0) { Macronizer.setMacro(newMacName,keyHandler.getRecordBuffer()); System.out.println(keyHandler.getRecordBuffer()); } keyHandler.stopRecording(); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
System.out.println(exc.getMessage()); | log.warn(exc.getMessage()); | public void toggleDebug() { vt.toggleDebug(); try { vt.sendHeartBeat(); } catch (Exception exc) { System.out.println(exc.getMessage()); } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
log.debug("paint from gui"); | public void update(Graphics g) {// System.out.println("paint from gui"); paint(g); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250.java/buggy/tn5250j/src/org/tn5250j/Gui5250.java |
|
public SessionPopup(Session ses, MouseEvent me) { JMenuItem menuItem; Action action; JPopupMenu popup = new JPopupMenu(); session = ses; vt = session.getVT();// final Gui5250 g = session; screen = session.getScreen(); JMenuItem mi; final int pos = screen.getPosFromView(me.getX(),me.getY()); if (!session.rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(false); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); session.getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyMe(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); session.getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (session.rubberband.isAreaSelected()) { // get the bounded area of the selection screen.getBoundingArea(workR); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + workR.width); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + workR.height); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); createKeyboardItem(kbMenu,MNEMONIC_ATTN); createKeyboardItem(kbMenu,MNEMONIC_RESET); createKeyboardItem(kbMenu,MNEMONIC_SYSREQ); if (screen.isMessageWait() && OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_MESSAGES)) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); createKeyboardItem(kbMenu,MNEMONIC_DUP_FIELD); createKeyboardItem(kbMenu,MNEMONIC_HELP); createKeyboardItem(kbMenu,MNEMONIC_ERASE_EOF); createKeyboardItem(kbMenu,MNEMONIC_FIELD_PLUS); createKeyboardItem(kbMenu,MNEMONIC_FIELD_MINUS); createKeyboardItem(kbMenu,MNEMONIC_NEW_LINE); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_PRINT)) { action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); } createShortCutItems(kbMenu); if (screen.isMessageWait() && OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_MESSAGES)) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,"")); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_ATTRIBUTES)) { action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { session.doAttributes(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); } popup.addSeparator(); if (session.isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { session.setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (session.isSessionRecording()) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { session.stopRecordingMe(); session.getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { session.startRecordingMe(); session.getFocusForMe(); } }; } macMenu.add(action); if (Macronizer.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); JMenu xtfrMenu = new JMenu(LangTool.getString("popup.export")); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_FILE_TRANSFER)) { action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); session.getFocusForMe(); } }; xtfrMenu.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_SPOOL_FILE)) { action = new AbstractAction(LangTool.getString("popup.xtfrSpool")) { public void actionPerformed(ActionEvent e) { doMeSpool(); session.getFocusForMe(); } }; xtfrMenu.add(action); } popup.add(xtfrMenu); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_QUICK_MAIL)) { action = new AbstractAction(LangTool.getString("popup.quickmail")) { public void actionPerformed(ActionEvent e) { sendQuickEMail(); session.getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_QUICK_MAIL)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_E_MAIL)) { action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); session.getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); } action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); action = new AbstractAction(LangTool.getString("popup.toImage")) { public void actionPerformed(ActionEvent e) { sendMeToImageFile(); } }; sendMenu.add(action); popup.addSeparator(); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_OPEN_NEW)) { action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { session.doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); } popup.addSeparator(); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_TOGGLE_CONNECTION)) { if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); session.getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); session.getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_CLOSE)) { action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { session.closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); } GUIGraphicsUtils.positionPopup(me.getComponent(),popup, me.getX(),me.getY()); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/0686de448db01a9cc1b09cae982858a4d418dae8/SessionPopup.java/buggy/tn5250j/src/org/tn5250j/SessionPopup.java |
||
session.doConnections(); | session.startNewSession(); | public SessionPopup(Session ses, MouseEvent me) { JMenuItem menuItem; Action action; JPopupMenu popup = new JPopupMenu(); session = ses; vt = session.getVT();// final Gui5250 g = session; screen = session.getScreen(); JMenuItem mi; final int pos = screen.getPosFromView(me.getX(),me.getY()); if (!session.rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(false); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); session.getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyMe(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); session.getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (session.rubberband.isAreaSelected()) { // get the bounded area of the selection screen.getBoundingArea(workR); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + workR.width); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + workR.height); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); createKeyboardItem(kbMenu,MNEMONIC_ATTN); createKeyboardItem(kbMenu,MNEMONIC_RESET); createKeyboardItem(kbMenu,MNEMONIC_SYSREQ); if (screen.isMessageWait() && OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_MESSAGES)) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); createKeyboardItem(kbMenu,MNEMONIC_DUP_FIELD); createKeyboardItem(kbMenu,MNEMONIC_HELP); createKeyboardItem(kbMenu,MNEMONIC_ERASE_EOF); createKeyboardItem(kbMenu,MNEMONIC_FIELD_PLUS); createKeyboardItem(kbMenu,MNEMONIC_FIELD_MINUS); createKeyboardItem(kbMenu,MNEMONIC_NEW_LINE); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_PRINT)) { action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); } createShortCutItems(kbMenu); if (screen.isMessageWait() && OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_MESSAGES)) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,"")); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_DISP_ATTRIBUTES)) { action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { session.doAttributes(); session.getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); } popup.addSeparator(); if (session.isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { session.setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (session.isSessionRecording()) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { session.stopRecordingMe(); session.getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { session.startRecordingMe(); session.getFocusForMe(); } }; } macMenu.add(action); if (Macronizer.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); JMenu xtfrMenu = new JMenu(LangTool.getString("popup.export")); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_FILE_TRANSFER)) { action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); session.getFocusForMe(); } }; xtfrMenu.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_SPOOL_FILE)) { action = new AbstractAction(LangTool.getString("popup.xtfrSpool")) { public void actionPerformed(ActionEvent e) { doMeSpool(); session.getFocusForMe(); } }; xtfrMenu.add(action); } popup.add(xtfrMenu); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_QUICK_MAIL)) { action = new AbstractAction(LangTool.getString("popup.quickmail")) { public void actionPerformed(ActionEvent e) { sendQuickEMail(); session.getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_QUICK_MAIL)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_E_MAIL)) { action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); session.getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); } action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); action = new AbstractAction(LangTool.getString("popup.toImage")) { public void actionPerformed(ActionEvent e) { sendMeToImageFile(); } }; sendMenu.add(action); popup.addSeparator(); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_OPEN_NEW)) { action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { session.doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); } popup.addSeparator(); if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_TOGGLE_CONNECTION)) { if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); session.getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); session.getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); } if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_CLOSE)) { action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { session.closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); } GUIGraphicsUtils.positionPopup(me.getComponent(),popup, me.getX(),me.getY()); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/0686de448db01a9cc1b09cae982858a4d418dae8/SessionPopup.java/buggy/tn5250j/src/org/tn5250j/SessionPopup.java |
public DropTarget (Component c, DropTargetListener dtl) | public DropTarget () | public DropTarget (Component c, DropTargetListener dtl) { this (c, 0, dtl, true, null); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/DropTarget.java/buggy/core/src/classpath/java/java/awt/dnd/DropTarget.java |
this (c, 0, dtl, true, null); | this (null, 0, null, true, null); | public DropTarget (Component c, DropTargetListener dtl) { this (c, 0, dtl, true, null); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/DropTarget.java/buggy/core/src/classpath/java/java/awt/dnd/DropTarget.java |
protected void closeConnection() | protected synchronized void closeConnection() | protected void closeConnection() throws IOException { if (socket != null) { try { socket.close(); } finally { socket = null; } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/HTTPConnection.java/buggy/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPConnection.java |
protected InputStream getInputStream() | protected synchronized InputStream getInputStream() | protected InputStream getInputStream() throws IOException { if (socket == null) { getSocket(); } return in; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/HTTPConnection.java/buggy/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPConnection.java |
protected OutputStream getOutputStream() | protected synchronized OutputStream getOutputStream() | protected OutputStream getOutputStream() throws IOException { if (socket == null) { getSocket(); } return out; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/HTTPConnection.java/buggy/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPConnection.java |
protected Socket getSocket() | protected synchronized Socket getSocket() | protected Socket getSocket() throws IOException { if (socket == null) { String connectHostname = hostname; int connectPort = port; if (isUsingProxy()) { connectHostname = proxyHostname; connectPort = proxyPort; } socket = new Socket(); InetSocketAddress address = new InetSocketAddress(connectHostname, connectPort); if (connectionTimeout > 0) { socket.connect(address, connectionTimeout); } else { socket.connect(address); } if (timeout > 0) { socket.setSoTimeout(timeout); } if (secure) { try { SSLSocketFactory factory = getSSLSocketFactory(); SSLSocket ss = (SSLSocket) factory.createSocket(socket, connectHostname, connectPort, true); String[] protocols = { "TLSv1", "SSLv3" }; ss.setEnabledProtocols(protocols); ss.setUseClientMode(true); synchronized (handshakeCompletedListeners) { if (!handshakeCompletedListeners.isEmpty()) { for (Iterator i = handshakeCompletedListeners.iterator(); i.hasNext(); ) { HandshakeCompletedListener l = (HandshakeCompletedListener) i.next(); ss.addHandshakeCompletedListener(l); } } } ss.startHandshake(); socket = ss; } catch (GeneralSecurityException e) { throw new IOException(e.getMessage()); } } in = socket.getInputStream(); in = new BufferedInputStream(in); out = socket.getOutputStream(); out = new BufferedOutputStream(out); } return socket; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/HTTPConnection.java/buggy/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPConnection.java |
public void connect(SocketAddress endpoint, int timeout) throws IOException | public void connect(SocketAddress endpoint) throws IOException | public void connect(SocketAddress endpoint, int timeout) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); // The Sun spec says that if we have an associated channel and // it is in non-blocking mode, we throw an IllegalBlockingModeException. // However, in our implementation if the channel itself initiated this // operation, then we must honor it regardless of its blocking mode. if (getChannel() != null && ! getChannel().isBlocking() && ! ((PlainSocketImpl) getImpl()).isInChannelOperation()) throw new IllegalBlockingModeException(); if (! isBound()) bind(null); try { getImpl().connect(endpoint, timeout); } catch (IOException exception) { close(); throw exception; } catch (RuntimeException exception) { close(); throw exception; } catch (Error error) { close(); throw error; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/Socket.java/buggy/core/src/classpath/java/java/net/Socket.java |
if (isClosed()) throw new SocketException("socket is closed"); if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); if (getChannel() != null && ! getChannel().isBlocking() && ! ((PlainSocketImpl) getImpl()).isInChannelOperation()) throw new IllegalBlockingModeException(); if (! isBound()) bind(null); try { getImpl().connect(endpoint, timeout); } catch (IOException exception) { close(); throw exception; } catch (RuntimeException exception) { close(); throw exception; } catch (Error error) { close(); throw error; } | connect(endpoint, 0); | public void connect(SocketAddress endpoint, int timeout) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException("unsupported address type"); // The Sun spec says that if we have an associated channel and // it is in non-blocking mode, we throw an IllegalBlockingModeException. // However, in our implementation if the channel itself initiated this // operation, then we must honor it regardless of its blocking mode. if (getChannel() != null && ! getChannel().isBlocking() && ! ((PlainSocketImpl) getImpl()).isInChannelOperation()) throw new IllegalBlockingModeException(); if (! isBound()) bind(null); try { getImpl().connect(endpoint, timeout); } catch (IOException exception) { close(); throw exception; } catch (RuntimeException exception) { close(); throw exception; } catch (Error error) { close(); throw error; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/Socket.java/buggy/core/src/classpath/java/java/net/Socket.java |
int stop = locators.size(); for (int i = 0; i < stop; i++) { ((Locator) locators.get(i)).addAxis(axis); } updateNotesLocationOrder(); | public Axis addAxis(Axis axis) { if (!canAddAxisObjToArray(axis)) //check if the axis can be added return null; getDataCube().incrementDimension(axis ); //increment the DataCube dimension by 1 getAxisList().add(axis); //update the locators that is related to this Array object int stop = locators.size(); for (int i = 0; i < stop; i++) { ((Locator) locators.get(i)).addAxis(axis); } updateNotesLocationOrder(); // reset to the current order of the axes return axis; } | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/cb12c2b95d9b1b83618eb2a5538cd5c44c6bd8cb/Array.java/buggy/src/gov/nasa/gsfc/adc/xdf/Array.java |
|
int stop = locators.size(); for (int i = 0; i < stop; i++) { ((Locator) locators.get(i)).addAxis(fieldAxis); } | updateChildLocators(fieldAxis, "add"); | public FieldAxis addFieldAxis(FieldAxis fieldAxis) { if (!canAddAxisObjToArray(fieldAxis)) return null; if (getFieldAxis() !=null) { List axisList = getAxisList(); axisList.remove(0); axisList.add(0, fieldAxis); //replace the old fieldAxis with the new one } else { //add fieldAxis and increment dimension getAxisList().add(0, fieldAxis); getDataCube().incrementDimension(fieldAxis); } hasFieldAxis = true; //update the locators that are related to this Array object int stop = locators.size(); for (int i = 0; i < stop; i++) { ((Locator) locators.get(i)).addAxis(fieldAxis); } //array doenst hold a dataformat anymore //each field along the fieldAxis should have dataformat setDataFormat(null); return fieldAxis; } | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/cb12c2b95d9b1b83618eb2a5538cd5c44c6bd8cb/Array.java/buggy/src/gov/nasa/gsfc/adc/xdf/Array.java |
public void appendData (Locator locator, String strValue) throws SetDataException{ | public void appendData (Locator locator, String strValue) throws SetDataException { | public void appendData (Locator locator, String strValue) throws SetDataException{ getDataCube().appendData(locator, strValue); } | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/cb12c2b95d9b1b83618eb2a5538cd5c44c6bd8cb/Array.java/buggy/src/gov/nasa/gsfc/adc/xdf/Array.java |
private boolean canAddAxisObjToArray(AxisInterface axisToAdd) { | private boolean canAddAxisObjToArray (AxisInterface axisToAdd) { | private boolean canAddAxisObjToArray(AxisInterface axisToAdd) { if (axisToAdd.getAxisId() == null) { Log.warnln("Warning: Can't add Axis Object without axisId attribute defined"); return false; } return true; } | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/cb12c2b95d9b1b83618eb2a5538cd5c44c6bd8cb/Array.java/buggy/src/gov/nasa/gsfc/adc/xdf/Array.java |
cloneObj.locators = new Vector(); | cloneObj.locatorList = new Vector(); | public Object clone() throws CloneNotSupportedException { Array cloneObj = (Array) super.clone(); //deep clone for DataCube cloneObj.setDataCube((DataCube) this.getDataCube().clone()); //there are no locators that are related to the cloned Array object cloneObj.locators = new Vector(); //set the parentArray correctly for child object cloneObj.getDataCube().setParentArray(cloneObj); cloneObj.getXMLDataIOStyle().setParentArray(cloneObj); synchronized (this.paramGroupOwnedHash) { synchronized(cloneObj.paramGroupOwnedHash) { cloneObj.paramGroupOwnedHash = Collections.synchronizedSet(new HashSet(this.paramGroupOwnedHash.size())); Iterator iter = this.paramGroupOwnedHash.iterator(); while (iter.hasNext()) { cloneObj.paramGroupOwnedHash.add(((Group) iter.next()).clone()); } } } return cloneObj; } //end of clone | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/cb12c2b95d9b1b83618eb2a5538cd5c44c6bd8cb/Array.java/buggy/src/gov/nasa/gsfc/adc/xdf/Array.java |
locators.add(locatorObj); | locatorList.add(locatorObj); | public Locator createLocator() { Locator locatorObj = new Locator(this); //add this locator to the list of locators this Array object monitors locators.add(locatorObj); return locatorObj; } | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/cb12c2b95d9b1b83618eb2a5538cd5c44c6bd8cb/Array.java/buggy/src/gov/nasa/gsfc/adc/xdf/Array.java |
public boolean removeAxis(Axis what) { boolean isRemoveSuccess = removeFromList(what, getAxisList(), "axisList"); if (isRemoveSuccess) | public boolean removeAxis(Axis axisObj) { boolean isRemoveSuccess = removeFromList(axisObj, getAxisList(), "axisList"); if (isRemoveSuccess) { | public boolean removeAxis(Axis what) { boolean isRemoveSuccess = removeFromList(what, getAxisList(), "axisList"); if (isRemoveSuccess) //remove successful getDataCube().decrementDimension(); //decrease the dimension by 1 return isRemoveSuccess; } | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/cb12c2b95d9b1b83618eb2a5538cd5c44c6bd8cb/Array.java/buggy/src/gov/nasa/gsfc/adc/xdf/Array.java |
updateChildLocators(axisObj, "remove"); } | public boolean removeAxis(Axis what) { boolean isRemoveSuccess = removeFromList(what, getAxisList(), "axisList"); if (isRemoveSuccess) //remove successful getDataCube().decrementDimension(); //decrease the dimension by 1 return isRemoveSuccess; } | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/cb12c2b95d9b1b83618eb2a5538cd5c44c6bd8cb/Array.java/buggy/src/gov/nasa/gsfc/adc/xdf/Array.java |
|
public Note addNote (Note note ) | public Note addNote (Note note ) | public Note addNote (Note note ) { if (note == null) { Log.warn("in Notes.addNote(), the Note passed in is null"); return null; } getNoteList().add(note); return note; } | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/1e7f6912855beedfa6f64bcbc5bc675d9beedbae/Notes.java/buggy/src/gov/nasa/gsfc/adc/xdf/Notes.java |
if (note == null) { Log.warn("in Notes.addNote(), the Note passed in is null"); return null; } | public Note addNote (Note note ) { if (note == null) { Log.warn("in Notes.addNote(), the Note passed in is null"); return null; } getNoteList().add(note); return note; } | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/1e7f6912855beedfa6f64bcbc5bc675d9beedbae/Notes.java/buggy/src/gov/nasa/gsfc/adc/xdf/Notes.java |
|
if (unit == null) { Log.warn("in Units.addUnit(), the Unit passed in is null"); return null; } | public Unit addUnit(Unit unit) { if (unit == null) { Log.warn("in Units.addUnit(), the Unit passed in is null"); return null; } getUnitList().add(unit); return unit; } | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/1e7f6912855beedfa6f64bcbc5bc675d9beedbae/Units.java/buggy/src/gov/nasa/gsfc/adc/xdf/Units.java |
|
if (dimension == 0) { Log.error(" in DataCube, incrementDimentsion, the dimension is 0"); return 0; } else return dimension--; | Log.errorln("in DataCube, decrementDimension(), methods empty, returning -1"); return -1; | public int decrementDimension() { if (dimension == 0) { Log.error(" in DataCube, incrementDimentsion, the dimension is 0"); return 0; } else return dimension--;} | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/1e7f6912855beedfa6f64bcbc5bc675d9beedbae/DataCube.java/buggy/src/gov/nasa/gsfc/adc/xdf/DataCube.java |
NotesLocationOrder orderObj = (NotesLocationOrder) | NotesLocationOrder orderObj = (NotesLocationOrder) | public void setLocationOrderList (List axisIdList) { NotesLocationOrder orderObj = (NotesLocationOrder) ((XMLAttribute) attribHash.get("locationOrder")).getAttribValue(); orderObj.setAxisOrderList(axisIdList); } | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/1e7f6912855beedfa6f64bcbc5bc675d9beedbae/Notes.java/buggy/src/gov/nasa/gsfc/adc/xdf/Notes.java |
os.log("#" + address); | if (debug) { os.log("#" + address + " VStack: " + vstack.toString()); } else { os.log("#" + address); } | public void startInstruction(int address) { if (debug) { BootLog.debug("#" + address + "\t" + vstack); } if (log) { os.log("#" + address); } this.curAddress = address; this.curInstrLabel = helper.getInstrLabel(address); if (startOfBB || setCurInstrLabel) { os.setObjectRef(curInstrLabel); startOfBB = false; setCurInstrLabel = false; } final int offset = os.getLength() - startOffset; cm.add(currentMethod, address, offset); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7dc855065f1e71c38a1e2ae55f0d25329a209fcd/X86BytecodeVisitor.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java |
final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); | vstack.push(eContext); System.out.println("####### dup2_x2"); final Item v1 = vstack.pop1(); final Item v2 = vstack.pop1(); | public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7dc855065f1e71c38a1e2ae55f0d25329a209fcd/X86BytecodeVisitor.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java |
v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); | os.writePOP(Register.EAX); os.writePOP(Register.EBX); os.writePOP(Register.ECX); os.writePOP(Register.EDX); os.writePUSH(Register.EBX); os.writePUSH(Register.EAX); os.writePUSH(Register.EDX); os.writePUSH(Register.ECX); os.writePUSH(Register.EBX); os.writePUSH(Register.EAX); | public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7dc855065f1e71c38a1e2ae55f0d25329a209fcd/X86BytecodeVisitor.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java |
vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); | vstack.push1(ifac.createStack(v1.getType())); vstack.push1(v2); vstack.push1(v1); | public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7dc855065f1e71c38a1e2ae55f0d25329a209fcd/X86BytecodeVisitor.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java |
final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); | final Item v3 = vstack.pop1(); | public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7dc855065f1e71c38a1e2ae55f0d25329a209fcd/X86BytecodeVisitor.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java |
vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); | vstack.push1(ifac.createStack(v1.getType())); vstack.push1(v3); vstack.push1(v2); vstack.push1(v1); | public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7dc855065f1e71c38a1e2ae55f0d25329a209fcd/X86BytecodeVisitor.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java |
vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); | vstack.push1(ifac.createStack(v2.getType())); vstack.push1(ifac.createStack(v1.getType())); vstack.push1(v3); vstack.push1(v2); vstack.push1(v1); | public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7dc855065f1e71c38a1e2ae55f0d25329a209fcd/X86BytecodeVisitor.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java |
final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); | final Item v4 = vstack.pop1(); vstack.push1(ifac.createStack(v2.getType())); vstack.push1(ifac.createStack(v1.getType())); vstack.push1(v4); vstack.push1(v3); vstack.push1(v2); vstack.push1(v1); | public final void visit_dup2_x2() { final Item v1 = vstack.pop(); final Item v2 = vstack.pop(); final int c1 = v1.getCategory(); final int c2 = v2.getCategory(); v1.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); v2.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); // cope with brain-dead definition from Sun (look-like somebody there // was to eager to optimize this and it landed in the compiler... if (c2 == 2) { // form 4 assertCondition(c1 == 2, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v2); vstack.push(v1); } else { final Item v3 = vstack.pop(); v3.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); int c3 = v3.getCategory(); if (c1 == 2) { // form 2 assertCondition(c3 == 1, "category mismatch"); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else if (c3 == 2) { // form 3 vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v3); vstack.push(v2); vstack.push(v1); } else { // form 1 final Item v4 = vstack.pop(); v4.loadIf(eContext, Item.Kind.STACK | Item.Kind.FPUSTACK); vstack.push(v2.clone(eContext)); vstack.push(v1.clone(eContext)); vstack.push(v4); vstack.push(v3); vstack.push(v2); vstack.push(v1); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7dc855065f1e71c38a1e2ae55f0d25329a209fcd/X86BytecodeVisitor.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java |
os.writeLEA(SP, SP, 8); | os.writeLEA(SP, SP, -8); | final void loadTo(EmitterContext ec, Register lsb, Register msb) { final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: // invariant: (msb != lsb) && (this.msb != this.lsb) if (msb != this.lsb) { // generic case; avoid only if msb is lsb' (value overwriting) // invariant: (msb != this.lsb) && (msb != lsb) && (this.msb != // this.lsb) // msb <- msb' // lsb <- lsb' if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { // invariant: (msb != this.lsb) && (lsb != this.lsb) && (msb // != lsb) && (this.msb != this.lsb) os.writeMOV(INTSIZE, lsb, this.lsb); //if (msb != this.lsb) { <- enforced by first if() pool.release(this.lsb); //} } } else if (lsb != this.msb) { // generic case, assignment sequence inverted; avoid only if lsb // is msb' (overwriting) // invariant: (msb == this.lsb) && (lsb != this.msb) // lsb <- lsb' // msb <- msb' // if (lsb != this.lsb) { <- always true, because msb == // this.lsb os.writeMOV(INTSIZE, lsb, this.lsb); // if (msb != this.lsb) { <- always false, because of invariant // pool.release(this.lsb); // } // } // if (msb != this.msb) { <- always true, because of invariant os.writeMOV(INTSIZE, msb, this.msb); // if (lsb != this.msb) { <- always true, because of invariant pool.release(this.msb); // } // } } else { // invariant: (msb == this.lsb) && (lsb == this.msb) // swap registers os.writeXCHG(this.lsb, this.msb); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break; case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, 8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4210cbd2e8532c8a29412a6b016e4072578a8de8/DoubleWordItem.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java |
public final void writeClassInitialize(Label curInstrLabel, Register classReg, VmType cls) { if (!cls.isInitialized()) { os.writeTEST(classReg, context.getVmTypeState().getOffset(), VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(curInstrLabel + "$$after-classinit-ex"); os.writeJCC(afterInit, X86Constants.JNZ); os.writePUSHA(); os.writePUSH(classReg); invokeJavaMethod(context.getVmTypeInitialize()); os.writePOPA(); os.setObjectRef(afterInit); | public final boolean writeClassInitialize(VmMethod method, Register methodReg, Register scratch) { if (method.isStatic() && !method.isInitializer()) { final VmType cls = method.getDeclaringClass(); if (!cls.isInitialized()) { os.writePUSH(EAX); os.writeMOV(INTSIZE, EAX, methodReg, context .getVmMemberDeclaringClassField().getOffset()); os.writeTEST(EAX, context.getVmTypeState().getOffset(), VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(method.getMangledName() + "$$after-classinit"); os.writeJCC(afterInit, X86Constants.JNZ); os.writePUSH(EAX); invokeJavaMethod(context.getVmTypeInitialize()); os.setObjectRef(afterInit); os.writePOP(EAX); return true; } | public final void writeClassInitialize(Label curInstrLabel, Register classReg, VmType cls) { if (!cls.isInitialized()) { // Test declaringClass.modifiers os.writeTEST(classReg, context.getVmTypeState().getOffset(), VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(curInstrLabel + "$$after-classinit-ex"); os.writeJCC(afterInit, X86Constants.JNZ); os.writePUSHA(); // Call cls.initialize os.writePUSH(classReg); invokeJavaMethod(context.getVmTypeInitialize()); os.writePOPA(); // Set label os.setObjectRef(afterInit); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/X86CompilerHelper.java/buggy/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java |
return false; | public final void writeClassInitialize(Label curInstrLabel, Register classReg, VmType cls) { if (!cls.isInitialized()) { // Test declaringClass.modifiers os.writeTEST(classReg, context.getVmTypeState().getOffset(), VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(curInstrLabel + "$$after-classinit-ex"); os.writeJCC(afterInit, X86Constants.JNZ); os.writePUSHA(); // Call cls.initialize os.writePUSH(classReg); invokeJavaMethod(context.getVmTypeInitialize()); os.writePOPA(); // Set label os.setObjectRef(afterInit); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/X86CompilerHelper.java/buggy/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java |
|
vstack.push(createConst(type, fpv1 / fpv2)); | vstack.push(createConst(type, fpv1 % fpv2)); | final static void rem(AbstractX86Stream os, EmitterContext ec, VirtualStack vstack, int type) { final Item v2 = vstack.pop(type); final Item v1 = vstack.pop(type); if (v1.isConstant() && v2.isConstant()) { final double fpv1 = getFPValue(v1); final double fpv2 = getFPValue(v2); vstack.push(createConst(type, fpv1 / fpv2)); } else { // Prepare stack final FPUStack fpuStack = vstack.fpuStack; final Register reg; reg = prepareForOperation(os, ec, vstack, fpuStack, v2, v1, false); // We need reg to be ST1, if not swap fxchST1(os, fpuStack, reg); // Pop the fpuStack.tos fpuStack.pop(); // Calculate os.writeFPREM(); os.writeFSTP(Register.ST1); // Push result vstack.push(fpuStack.tos()); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4210cbd2e8532c8a29412a6b016e4072578a8de8/FPUHelper.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/FPUHelper.java |
os.writeFXCH(Register.ST1); | final static void rem(AbstractX86Stream os, EmitterContext ec, VirtualStack vstack, int type) { final Item v2 = vstack.pop(type); final Item v1 = vstack.pop(type); if (v1.isConstant() && v2.isConstant()) { final double fpv1 = getFPValue(v1); final double fpv2 = getFPValue(v2); vstack.push(createConst(type, fpv1 / fpv2)); } else { // Prepare stack final FPUStack fpuStack = vstack.fpuStack; final Register reg; reg = prepareForOperation(os, ec, vstack, fpuStack, v2, v1, false); // We need reg to be ST1, if not swap fxchST1(os, fpuStack, reg); // Pop the fpuStack.tos fpuStack.pop(); // Calculate os.writeFPREM(); os.writeFSTP(Register.ST1); // Push result vstack.push(fpuStack.tos()); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4210cbd2e8532c8a29412a6b016e4072578a8de8/FPUHelper.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/FPUHelper.java |
|
public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') | public static final int getArgSlotCount(char[] signature) { int ofs = 0; final int len = signature.length; if (signature[ofs++] != '(') | public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/Signature.java/buggy/core/src/core/org/jnode/vm/classmgr/Signature.java |
char ch = signature.charAt(ofs++); | char ch = signature[ofs++]; | public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/Signature.java/buggy/core/src/core/org/jnode/vm/classmgr/Signature.java |
while (signature.charAt(ofs) == '[') | while (signature[ofs] == '[') | public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/Signature.java/buggy/core/src/core/org/jnode/vm/classmgr/Signature.java |
if (signature.charAt(ofs) == 'L') { | if (signature[ofs] == 'L') { | public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/Signature.java/buggy/core/src/core/org/jnode/vm/classmgr/Signature.java |
while (signature.charAt(ofs) != ';') | while (signature[ofs] != ';') | public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/Signature.java/buggy/core/src/core/org/jnode/vm/classmgr/Signature.java |
while (signature.charAt(ofs) != ';') | while (signature[ofs] != ';') | public static final int getArgSlotCount(String signature) { /*int ofs = 0; final int len = signature.length(); if (signature.charAt(ofs++) != '(') return 0; int count = 0; while (ofs < len) { char ch = signature.charAt(ofs++); switch (ch) { case ')' : return count; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float count++; break; case 'D' : // Double case 'J' : // Long count += 2; break; case '[' : // Array { count++; while (signature.charAt(ofs) == '[') ofs++; if (signature.charAt(ofs) == 'L') { ofs++; while (signature.charAt(ofs) != ';') ofs++; } ofs++; } break; case 'L' : // Object { count++; while (signature.charAt(ofs) != ';') ofs++; ofs++; } break; } } throw new RuntimeException( "Invalid signature in getArgSlotCount: " + signature);*/ return getArgSlotCount(signature.toCharArray()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/Signature.java/buggy/core/src/core/org/jnode/vm/classmgr/Signature.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.