rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
public static Currency getInstance (Locale locale)
public static Currency getInstance(Locale locale)
public static Currency getInstance (Locale locale) { /** * The new instance must be the only available instance * for the currency it supports. We ensure this happens, * while maintaining a suitable performance level, by * creating the appropriate object on the first call to * this method, and returning the cached instance on * later calls. */ Currency newCurrency; /* Attempt to get the currency from the cache */ newCurrency = (Currency) cache.get(locale); if (newCurrency == null) { /* Create the currency for this locale */ newCurrency = new Currency (locale); /* Cache it */ cache.put(locale, newCurrency); } /* Return the instance */ return newCurrency; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Currency.java/clean/core/src/classpath/java/java/util/Currency.java
newCurrency = (Currency) cache.get(locale); if (newCurrency == null)
String code = (String) countryMap.get(country); if (code == null)
public static Currency getInstance (Locale locale) { /** * The new instance must be the only available instance * for the currency it supports. We ensure this happens, * while maintaining a suitable performance level, by * creating the appropriate object on the first call to * this method, and returning the cached instance on * later calls. */ Currency newCurrency; /* Attempt to get the currency from the cache */ newCurrency = (Currency) cache.get(locale); if (newCurrency == null) { /* Create the currency for this locale */ newCurrency = new Currency (locale); /* Cache it */ cache.put(locale, newCurrency); } /* Return the instance */ return newCurrency; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Currency.java/clean/core/src/classpath/java/java/util/Currency.java
newCurrency = new Currency (locale);
newCurrency = new Currency(locale); /* * If the currency code is null, then creation failed * and we return null. */ code = newCurrency.getCurrencyCode(); if (code == null) { return null; } else {
public static Currency getInstance (Locale locale) { /** * The new instance must be the only available instance * for the currency it supports. We ensure this happens, * while maintaining a suitable performance level, by * creating the appropriate object on the first call to * this method, and returning the cached instance on * later calls. */ Currency newCurrency; /* Attempt to get the currency from the cache */ newCurrency = (Currency) cache.get(locale); if (newCurrency == null) { /* Create the currency for this locale */ newCurrency = new Currency (locale); /* Cache it */ cache.put(locale, newCurrency); } /* Return the instance */ return newCurrency; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Currency.java/clean/core/src/classpath/java/java/util/Currency.java
cache.put(locale, newCurrency);
countryMap.put(country, code); cache.put(code, newCurrency); } } else { newCurrency = (Currency) cache.get(code);
public static Currency getInstance (Locale locale) { /** * The new instance must be the only available instance * for the currency it supports. We ensure this happens, * while maintaining a suitable performance level, by * creating the appropriate object on the first call to * this method, and returning the cached instance on * later calls. */ Currency newCurrency; /* Attempt to get the currency from the cache */ newCurrency = (Currency) cache.get(locale); if (newCurrency == null) { /* Create the currency for this locale */ newCurrency = new Currency (locale); /* Cache it */ cache.put(locale, newCurrency); } /* Return the instance */ return newCurrency; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Currency.java/clean/core/src/classpath/java/java/util/Currency.java
try { /* What does this return if there is no mapping? */ return res.getString ("currencySymbol"); } catch (Exception _) { return null; }
return currencySymbol == null ? getCurrencyCode() : currencySymbol;
public String getSymbol() { try { /* What does this return if there is no mapping? */ return res.getString ("currencySymbol"); } catch (Exception _) { return null; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Currency.java/clean/core/src/classpath/java/java/util/Currency.java
if(CharacterAttributeTranslator.translateTag(charAttr, t, a)) return;
public void start(HTML.Tag t, MutableAttributeSet a) { // Put the old attribute set on the stack. pushCharacterStyle(); // Translate tag.. return if succesful. if(CharacterAttributeTranslator.translateTag(charAttr, t, a)) return; // Just add the attributes in <code>a</code>. if (a != null) charAttr.addAttribute(t, a.copyAttributes()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
if (a != null)
public void start(HTML.Tag t, MutableAttributeSet a) { // Put the old attribute set on the stack. pushCharacterStyle(); // Translate tag.. return if succesful. if(CharacterAttributeTranslator.translateTag(charAttr, t, a)) return; // Just add the attributes in <code>a</code>. if (a != null) charAttr.addAttribute(t, a.copyAttributes()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
DefaultStyledDocument.ElementSpec spec; spec = new DefaultStyledDocument.ElementSpec(copy,
DefaultStyledDocument.ElementSpec spec = new DefaultStyledDocument.ElementSpec(copy,
protected void addSpecialElement(HTML.Tag t, MutableAttributeSet a) { a.addAttribute(StyleConstants.NameAttribute, t); // Migrate from the rather htmlAttributeSet to the faster, lighter and // unchangeable alternative implementation. AttributeSet copy = a.copyAttributes(); // TODO: Figure out why we must always insert this single character // (otherwise the element does not appear). Either fix or add explaining // comment or at least report a normal bug. DefaultStyledDocument.ElementSpec spec; spec = new DefaultStyledDocument.ElementSpec(copy, DefaultStyledDocument.ElementSpec.ContentType, new char[] {' '}, 0, 1 ); parseBuffer.add(spec); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
new char[] {' '}, 0, 1 );
new char[] {' ', ' '}, 0, 2 );
protected void addSpecialElement(HTML.Tag t, MutableAttributeSet a) { a.addAttribute(StyleConstants.NameAttribute, t); // Migrate from the rather htmlAttributeSet to the faster, lighter and // unchangeable alternative implementation. AttributeSet copy = a.copyAttributes(); // TODO: Figure out why we must always insert this single character // (otherwise the element does not appear). Either fix or add explaining // comment or at least report a normal bug. DefaultStyledDocument.ElementSpec spec; spec = new DefaultStyledDocument.ElementSpec(copy, DefaultStyledDocument.ElementSpec.ContentType, new char[] {' '}, 0, 1 ); parseBuffer.add(spec); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
else if (parseStack.peek() == HTML.Tag.IMPLIED) { element = new DefaultStyledDocument.ElementSpec(null, DefaultStyledDocument.ElementSpec.EndTagType); parseBuffer.addElement(element); if (parseStack.size() > 0) parseStack.pop(); }
protected void blockClose(HTML.Tag t) { printBuffer(); DefaultStyledDocument.ElementSpec element; // If the previous tag is a start tag then we insert a synthetic // content tag. DefaultStyledDocument.ElementSpec prev; prev = (DefaultStyledDocument.ElementSpec) parseBuffer.get(parseBuffer.size() - 1); if (prev.getType() == DefaultStyledDocument.ElementSpec.StartTagType) { AbstractDocument.AttributeContext ctx = getAttributeContext(); AttributeSet attributes = ctx.getEmptySet(); attributes = ctx.addAttribute(attributes, StyleConstants.NameAttribute, HTML.Tag.CONTENT); element = new DefaultStyledDocument.ElementSpec(attributes, DefaultStyledDocument.ElementSpec.ContentType, new char[0], 0, 0); parseBuffer.add(element); } // If the previous tag is content and the parent is p-implied, then // we must also close the p-implied. else if (parseStack.peek() == HTML.Tag.IMPLIED) { element = new DefaultStyledDocument.ElementSpec(null, DefaultStyledDocument.ElementSpec.EndTagType); parseBuffer.addElement(element); if (parseStack.size() > 0) parseStack.pop(); } element = new DefaultStyledDocument.ElementSpec(null, DefaultStyledDocument.ElementSpec.EndTagType); parseBuffer.addElement(element); printBuffer(); if (parseStack.size() > 0) parseStack.pop(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
if (parseStack.size() > 0 && parseStack.peek() == HTML.Tag.IMPLIED) { element = new DefaultStyledDocument.ElementSpec(null, DefaultStyledDocument.ElementSpec.EndTagType); parseBuffer.addElement(element); parseStack.pop(); }
protected void blockOpen(HTML.Tag t, MutableAttributeSet attr) { printBuffer(); DefaultStyledDocument.ElementSpec element; // If the previous tag is content and the parent is p-implied, then // we must also close the p-implied. if (parseStack.size() > 0 && parseStack.peek() == HTML.Tag.IMPLIED) { element = new DefaultStyledDocument.ElementSpec(null, DefaultStyledDocument.ElementSpec.EndTagType); parseBuffer.addElement(element); parseStack.pop(); } parseStack.push(t); AbstractDocument.AttributeContext ctx = getAttributeContext(); AttributeSet copy = attr.copyAttributes(); copy = ctx.addAttribute(copy, StyleConstants.NameAttribute, t); element = new DefaultStyledDocument.ElementSpec(copy, DefaultStyledDocument.ElementSpec.StartTagType); parseBuffer.addElement(element); printBuffer(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
if (endHTMLEncountered) return;
if (shouldInsert()) {
public void handleComment(char[] data, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; TagAction action = (TagAction) tagToAction.get(HTML.Tag.COMMENT); if (action != null) { action.start(HTML.Tag.COMMENT, new SimpleAttributeSet()); action.end (HTML.Tag.COMMENT); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
action.start(HTML.Tag.COMMENT, new SimpleAttributeSet()); action.end (HTML.Tag.COMMENT);
action.start(HTML.Tag.COMMENT, htmlAttributeSet.EMPTY_HTML_ATTRIBUTE_SET); action.end(HTML.Tag.COMMENT); }
public void handleComment(char[] data, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; TagAction action = (TagAction) tagToAction.get(HTML.Tag.COMMENT); if (action != null) { action.start(HTML.Tag.COMMENT, new SimpleAttributeSet()); action.end (HTML.Tag.COMMENT); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
throws NotImplementedException
public void handleEndOfLineString(String eol) throws NotImplementedException { // FIXME: Implement. print ("HTMLReader.handleEndOfLineString not implemented yet"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
if (endHTMLEncountered) return;
if (shouldInsert()) {
public void handleEndTag(HTML.Tag t, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; // If this is the </html> tag we need to stop calling the Actions if (t == HTML.Tag.HTML) endHTMLEncountered = true; TagAction action = (TagAction) tagToAction.get(t); if (action != null) action.end(t); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
}
public void handleEndTag(HTML.Tag t, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; // If this is the </html> tag we need to stop calling the Actions if (t == HTML.Tag.HTML) endHTMLEncountered = true; TagAction action = (TagAction) tagToAction.get(t); if (action != null) action.end(t); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
if (endHTMLEncountered) return;
if (t == insertTag) insertTagEncountered = true;
public void handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; TagAction action = (TagAction) tagToAction.get (t); if (action != null) { action.start(t, a); action.end(t); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
TagAction action = (TagAction) tagToAction.get (t);
if (shouldInsert()) { TagAction action = (TagAction) tagToAction.get(t);
public void handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; TagAction action = (TagAction) tagToAction.get (t); if (action != null) { action.start(t, a); action.end(t); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
}
public void handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; TagAction action = (TagAction) tagToAction.get (t); if (action != null) { action.start(t, a); action.end(t); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
if (endHTMLEncountered) return;
if (t == insertTag) insertTagEncountered = true;
public void handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; TagAction action = (TagAction) tagToAction.get(t); if (action != null) action.start(t, a); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
}
public void handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; TagAction action = (TagAction) tagToAction.get(t); if (action != null) action.start(t, a); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
ConvertAction convertAction = new ConvertAction();
void initTags() { tagToAction = new HashMap(72); CharacterAction characterAction = new CharacterAction(); HiddenAction hiddenAction = new HiddenAction(); AreaAction areaAction = new AreaAction(); BaseAction baseAction = new BaseAction(); BlockAction blockAction = new BlockAction(); SpecialAction specialAction = new SpecialAction(); ParagraphAction paragraphAction = new ParagraphAction(); HeadAction headAction = new HeadAction(); FormAction formAction = new FormAction(); IsindexAction isindexAction = new IsindexAction(); LinkAction linkAction = new LinkAction(); MapAction mapAction = new MapAction(); PreAction preAction = new PreAction(); MetaAction metaAction = new MetaAction(); StyleAction styleAction = new StyleAction(); TitleAction titleAction = new TitleAction(); tagToAction.put(HTML.Tag.A, characterAction); tagToAction.put(HTML.Tag.ADDRESS, characterAction); tagToAction.put(HTML.Tag.APPLET, hiddenAction); tagToAction.put(HTML.Tag.AREA, areaAction); tagToAction.put(HTML.Tag.B, characterAction); tagToAction.put(HTML.Tag.BASE, baseAction); tagToAction.put(HTML.Tag.BASEFONT, characterAction); tagToAction.put(HTML.Tag.BIG, characterAction); tagToAction.put(HTML.Tag.BLOCKQUOTE, blockAction); tagToAction.put(HTML.Tag.BODY, blockAction); tagToAction.put(HTML.Tag.BR, specialAction); tagToAction.put(HTML.Tag.CAPTION, blockAction); tagToAction.put(HTML.Tag.CENTER, blockAction); tagToAction.put(HTML.Tag.CITE, characterAction); tagToAction.put(HTML.Tag.CODE, characterAction); tagToAction.put(HTML.Tag.DD, blockAction); tagToAction.put(HTML.Tag.DFN, characterAction); tagToAction.put(HTML.Tag.DIR, blockAction); tagToAction.put(HTML.Tag.DIV, blockAction); tagToAction.put(HTML.Tag.DL, blockAction); tagToAction.put(HTML.Tag.DT, paragraphAction); tagToAction.put(HTML.Tag.EM, characterAction); tagToAction.put(HTML.Tag.FONT, characterAction); tagToAction.put(HTML.Tag.FORM, blockAction); tagToAction.put(HTML.Tag.FRAME, specialAction); tagToAction.put(HTML.Tag.FRAMESET, blockAction); tagToAction.put(HTML.Tag.H1, paragraphAction); tagToAction.put(HTML.Tag.H2, paragraphAction); tagToAction.put(HTML.Tag.H3, paragraphAction); tagToAction.put(HTML.Tag.H4, paragraphAction); tagToAction.put(HTML.Tag.H5, paragraphAction); tagToAction.put(HTML.Tag.H6, paragraphAction); tagToAction.put(HTML.Tag.HEAD, headAction); tagToAction.put(HTML.Tag.HR, specialAction); tagToAction.put(HTML.Tag.HTML, blockAction); tagToAction.put(HTML.Tag.I, characterAction); tagToAction.put(HTML.Tag.IMG, specialAction); tagToAction.put(HTML.Tag.INPUT, formAction); tagToAction.put(HTML.Tag.ISINDEX, isindexAction); tagToAction.put(HTML.Tag.KBD, characterAction); tagToAction.put(HTML.Tag.LI, blockAction); tagToAction.put(HTML.Tag.LINK, linkAction); tagToAction.put(HTML.Tag.MAP, mapAction); tagToAction.put(HTML.Tag.MENU, blockAction); tagToAction.put(HTML.Tag.META, metaAction); tagToAction.put(HTML.Tag.NOFRAMES, blockAction); tagToAction.put(HTML.Tag.OBJECT, specialAction); tagToAction.put(HTML.Tag.OL, blockAction); tagToAction.put(HTML.Tag.OPTION, formAction); tagToAction.put(HTML.Tag.P, paragraphAction); tagToAction.put(HTML.Tag.PARAM, hiddenAction); tagToAction.put(HTML.Tag.PRE, preAction); tagToAction.put(HTML.Tag.SAMP, characterAction); tagToAction.put(HTML.Tag.SCRIPT, hiddenAction); tagToAction.put(HTML.Tag.SELECT, formAction); tagToAction.put(HTML.Tag.SMALL, characterAction); tagToAction.put(HTML.Tag.STRIKE, characterAction); tagToAction.put(HTML.Tag.S, characterAction); tagToAction.put(HTML.Tag.STRONG, characterAction); tagToAction.put(HTML.Tag.STYLE, styleAction); tagToAction.put(HTML.Tag.SUB, characterAction); tagToAction.put(HTML.Tag.SUP, characterAction); tagToAction.put(HTML.Tag.TABLE, blockAction); tagToAction.put(HTML.Tag.TD, blockAction); tagToAction.put(HTML.Tag.TEXTAREA, formAction); tagToAction.put(HTML.Tag.TH, blockAction); tagToAction.put(HTML.Tag.TITLE, titleAction); tagToAction.put(HTML.Tag.TR, blockAction); tagToAction.put(HTML.Tag.TT, characterAction); tagToAction.put(HTML.Tag.U, characterAction); tagToAction.put(HTML.Tag.UL, blockAction); tagToAction.put(HTML.Tag.VAR, characterAction); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
tagToAction.put(HTML.Tag.FONT, characterAction);
tagToAction.put(HTML.Tag.FONT, convertAction);
void initTags() { tagToAction = new HashMap(72); CharacterAction characterAction = new CharacterAction(); HiddenAction hiddenAction = new HiddenAction(); AreaAction areaAction = new AreaAction(); BaseAction baseAction = new BaseAction(); BlockAction blockAction = new BlockAction(); SpecialAction specialAction = new SpecialAction(); ParagraphAction paragraphAction = new ParagraphAction(); HeadAction headAction = new HeadAction(); FormAction formAction = new FormAction(); IsindexAction isindexAction = new IsindexAction(); LinkAction linkAction = new LinkAction(); MapAction mapAction = new MapAction(); PreAction preAction = new PreAction(); MetaAction metaAction = new MetaAction(); StyleAction styleAction = new StyleAction(); TitleAction titleAction = new TitleAction(); tagToAction.put(HTML.Tag.A, characterAction); tagToAction.put(HTML.Tag.ADDRESS, characterAction); tagToAction.put(HTML.Tag.APPLET, hiddenAction); tagToAction.put(HTML.Tag.AREA, areaAction); tagToAction.put(HTML.Tag.B, characterAction); tagToAction.put(HTML.Tag.BASE, baseAction); tagToAction.put(HTML.Tag.BASEFONT, characterAction); tagToAction.put(HTML.Tag.BIG, characterAction); tagToAction.put(HTML.Tag.BLOCKQUOTE, blockAction); tagToAction.put(HTML.Tag.BODY, blockAction); tagToAction.put(HTML.Tag.BR, specialAction); tagToAction.put(HTML.Tag.CAPTION, blockAction); tagToAction.put(HTML.Tag.CENTER, blockAction); tagToAction.put(HTML.Tag.CITE, characterAction); tagToAction.put(HTML.Tag.CODE, characterAction); tagToAction.put(HTML.Tag.DD, blockAction); tagToAction.put(HTML.Tag.DFN, characterAction); tagToAction.put(HTML.Tag.DIR, blockAction); tagToAction.put(HTML.Tag.DIV, blockAction); tagToAction.put(HTML.Tag.DL, blockAction); tagToAction.put(HTML.Tag.DT, paragraphAction); tagToAction.put(HTML.Tag.EM, characterAction); tagToAction.put(HTML.Tag.FONT, characterAction); tagToAction.put(HTML.Tag.FORM, blockAction); tagToAction.put(HTML.Tag.FRAME, specialAction); tagToAction.put(HTML.Tag.FRAMESET, blockAction); tagToAction.put(HTML.Tag.H1, paragraphAction); tagToAction.put(HTML.Tag.H2, paragraphAction); tagToAction.put(HTML.Tag.H3, paragraphAction); tagToAction.put(HTML.Tag.H4, paragraphAction); tagToAction.put(HTML.Tag.H5, paragraphAction); tagToAction.put(HTML.Tag.H6, paragraphAction); tagToAction.put(HTML.Tag.HEAD, headAction); tagToAction.put(HTML.Tag.HR, specialAction); tagToAction.put(HTML.Tag.HTML, blockAction); tagToAction.put(HTML.Tag.I, characterAction); tagToAction.put(HTML.Tag.IMG, specialAction); tagToAction.put(HTML.Tag.INPUT, formAction); tagToAction.put(HTML.Tag.ISINDEX, isindexAction); tagToAction.put(HTML.Tag.KBD, characterAction); tagToAction.put(HTML.Tag.LI, blockAction); tagToAction.put(HTML.Tag.LINK, linkAction); tagToAction.put(HTML.Tag.MAP, mapAction); tagToAction.put(HTML.Tag.MENU, blockAction); tagToAction.put(HTML.Tag.META, metaAction); tagToAction.put(HTML.Tag.NOFRAMES, blockAction); tagToAction.put(HTML.Tag.OBJECT, specialAction); tagToAction.put(HTML.Tag.OL, blockAction); tagToAction.put(HTML.Tag.OPTION, formAction); tagToAction.put(HTML.Tag.P, paragraphAction); tagToAction.put(HTML.Tag.PARAM, hiddenAction); tagToAction.put(HTML.Tag.PRE, preAction); tagToAction.put(HTML.Tag.SAMP, characterAction); tagToAction.put(HTML.Tag.SCRIPT, hiddenAction); tagToAction.put(HTML.Tag.SELECT, formAction); tagToAction.put(HTML.Tag.SMALL, characterAction); tagToAction.put(HTML.Tag.STRIKE, characterAction); tagToAction.put(HTML.Tag.S, characterAction); tagToAction.put(HTML.Tag.STRONG, characterAction); tagToAction.put(HTML.Tag.STYLE, styleAction); tagToAction.put(HTML.Tag.SUB, characterAction); tagToAction.put(HTML.Tag.SUP, characterAction); tagToAction.put(HTML.Tag.TABLE, blockAction); tagToAction.put(HTML.Tag.TD, blockAction); tagToAction.put(HTML.Tag.TEXTAREA, formAction); tagToAction.put(HTML.Tag.TH, blockAction); tagToAction.put(HTML.Tag.TITLE, titleAction); tagToAction.put(HTML.Tag.TR, blockAction); tagToAction.put(HTML.Tag.TT, characterAction); tagToAction.put(HTML.Tag.U, characterAction); tagToAction.put(HTML.Tag.UL, blockAction); tagToAction.put(HTML.Tag.VAR, characterAction); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
this(null);
this(new GapContent(BUFFER_SIZE_DEFAULT), new StyleSheet());
public HTMLDocument() { this(null); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
return styleSheet;
return (StyleSheet) getAttributeContext();
public StyleSheet getStyleSheet() { return styleSheet; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
throws BadLocationException, IOException, NotImplementedException
throws BadLocationException, IOException
public void insertAfterEnd(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertAfterEnd not implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
if (parser == null) throw new IllegalStateException("Parser has not been set"); System.out.println("insertAfterEnd not implemented");
HTMLEditorKit.ParserCallback reader = getInsertingReader( elem.getEndOffset(), 0, 0, HTML.Tag.BODY, elem); getParser().parse(new StringReader(htmlText), reader, true);
public void insertAfterEnd(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertAfterEnd not implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
throws BadLocationException, IOException, NotImplementedException
throws BadLocationException, IOException
public void insertAfterStart(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertAfterStart not implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
if (parser == null) throw new IllegalStateException("Parser has not been set"); System.out.println("insertAfterStart not implemented");
HTMLEditorKit.ParserCallback reader = getInsertingReader( elem.getStartOffset(), 0, 0, HTML.Tag.BODY, elem); getParser().parse(new StringReader(htmlText), reader, true);
public void insertAfterStart(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertAfterStart not implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
throws BadLocationException, IOException, NotImplementedException
throws BadLocationException, IOException
public void insertBeforeEnd(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertBeforeEnd not implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
if (parser == null) throw new IllegalStateException("Parser has not been set"); System.out.println("insertBeforeEnd not implemented");
HTMLEditorKit.ParserCallback reader = getInsertingReader( elem.getEndOffset(), 0, 0, HTML.Tag.BODY, elem); getParser().parse(new StringReader(htmlText), reader, true);
public void insertBeforeEnd(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertBeforeEnd not implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
throws BadLocationException, IOException, NotImplementedException
throws BadLocationException, IOException
public void insertBeforeStart(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertBeforeStart not implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
if (parser == null) throw new IllegalStateException("Parser has not been set"); System.out.println("insertBeforeStart not implemented");
HTMLEditorKit.ParserCallback reader = getInsertingReader( elem.getStartOffset(), 0, 0, HTML.Tag.BODY, elem); getParser().parse(new StringReader(htmlText), reader, true);
public void insertBeforeStart(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertBeforeStart not implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
styleSheet.setBase(u);
getStyleSheet().setBase(u);
public void setBase(URL u) { baseURL = u; styleSheet.setBase(u); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
throws BadLocationException, IOException, NotImplementedException
throws BadLocationException, IOException
public void setInnerHTML(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (elem.isLeaf()) throw new IllegalArgumentException("Element is a leaf"); if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("setInnerHTML not implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
if (parser == null) throw new IllegalStateException("Parser has not been set"); System.out.println("setInnerHTML not implemented");
int start = elem.getStartOffset(); int end = elem.getEndOffset(); HTMLEditorKit.ParserCallback reader = getInsertingReader( end, 0, 0, HTML.Tag.BODY, elem); getParser().parse(new StringReader(htmlText), reader, true); remove(start, end - start);
public void setInnerHTML(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (elem.isLeaf()) throw new IllegalArgumentException("Element is a leaf"); if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("setInnerHTML not implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
public void setOuterHTML(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException
public void setOuterHTML(Element elem, String htmlText) throws BadLocationException, IOException
public void setOuterHTML(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("setOuterHTML not implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
if (parser == null) throw new IllegalStateException("Parser has not been set"); System.out.println("setOuterHTML not implemented");
int start = elem.getStartOffset(); int end = elem.getEndOffset(); remove(start, end-start); HTMLEditorKit.ParserCallback reader = getInsertingReader( start, 0, 0, HTML.Tag.BODY, elem); getParser().parse(new StringReader(htmlText), reader, true);
public void setOuterHTML(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("setOuterHTML not implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/HTMLDocument.java/buggy/core/src/classpath/javax/javax/swing/text/html/HTMLDocument.java
bad.minor = Minor.Any;
public static NamingContextExt extract(Any a) { try { return ((NamingContextExtHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { BAD_OPERATION bad = new BAD_OPERATION("NamingContextExt expected"); bad.initCause(ex); throw bad; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/NamingContextExtHelper.java/clean/core/src/classpath/org/org/omg/CosNaming/NamingContextExtHelper.java
if (member < 1) throw new IllegalArgumentException("member may not be less than 1");
public PageRanges(int member) { super(member); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/a78ab2f492456918e4f5c52be600854882e139fc/PageRanges.java/clean/core/src/classpath/javax/javax/print/attribute/standard/PageRanges.java
noteFrame(this);
Frame(){ this("");}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/Frame.java/buggy/core/src/classpath/java/java/awt/Frame.java
if (parent != null && parent.isDisplayable()) fireDummyEvent();
addNotify(){ if (menuBar != null) menuBar.addNotify(); if (peer == null) peer = getToolkit ().createFrame (this); super.addNotify();}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/Frame.java/buggy/core/src/classpath/java/java/awt/Frame.java
getFrames()
public static Frame[] getFrames()
getFrames(){ //Frame[] array = new Frames[frames.size()]; //return frames.toArray(array); String msg = "FIXME: can't be implemented without weak references"; throw new UnsupportedOperationException(msg);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/Frame.java/buggy/core/src/classpath/java/java/awt/Frame.java
String msg = "FIXME: can't be implemented without weak references"; throw new UnsupportedOperationException(msg);
int n = 0; synchronized (weakFrames) { Iterator i = weakFrames.iterator(); while (i.hasNext()) { WeakReference wr = (WeakReference) i.next(); if (wr.get() != null) ++n; } if (n == 0) return new Frame[0]; else { Frame[] frames = new Frame[n]; n = 0; i = weakFrames.iterator(); while (i.hasNext()) { WeakReference wr = (WeakReference) i.next(); if (wr.get() != null) frames[n++] = (Frame) wr.get(); } return frames; } }
getFrames(){ //Frame[] array = new Frames[frames.size()]; //return frames.toArray(array); String msg = "FIXME: can't be implemented without weak references"; throw new UnsupportedOperationException(msg);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/Frame.java/buggy/core/src/classpath/java/java/awt/Frame.java
fireDummyEvent();
public void removeNotify(){ if (menuBar != null) menuBar.removeNotify(); super.removeNotify();}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/Frame.java/buggy/core/src/classpath/java/java/awt/Frame.java
startFrameType();
My5250 () { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) { } loadSessions(); focused = createImageIcon("focused.gif"); unfocused = createImageIcon("unfocused.gif"); tnicon = createImageIcon("tnicon.jpg"); frames = new Vector(); newView(); setDefaultLocale(); manager = new SessionManager(); manager.setController(this); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/99debc0e39981c309029bd7389a7d7c50837d87b/My5250.java/clean/tn5250j/src/org/tn5250j/My5250.java
if (isSpecified("-MDI",args))
if (isSpecified("-MDI",args)) {
static public void main(String[] args) { if (isSpecified("-MDI",args)) useMDIFrames = true; if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame1.getWidth(); int height = m.frame1.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame1.setSize(width,height); m.frame1.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame1.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame1.isVisible()) m.frame1.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/99debc0e39981c309029bd7389a7d7c50837d87b/My5250.java/clean/tn5250j/src/org/tn5250j/My5250.java
}
static public void main(String[] args) { if (isSpecified("-MDI",args)) useMDIFrames = true; if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame1.getWidth(); int height = m.frame1.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame1.setSize(width,height); m.frame1.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame1.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame1.isVisible()) m.frame1.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/99debc0e39981c309029bd7389a7d7c50837d87b/My5250.java/clean/tn5250j/src/org/tn5250j/My5250.java
{
{
public JInternalFrame createInternalFrame(Component parentComponent, String title) throws RuntimeException { // Try to find a JDesktopPane. JLayeredPane toUse = getDesktopPaneForComponent(parentComponent); // If we don't have a JDesktopPane, we try to find a JLayeredPane. if (toUse == null) toUse = JLayeredPane.getLayeredPaneAbove(parentComponent); // If this still fails, we throw a RuntimeException. if (toUse == null) throw new RuntimeException ("parentComponent does not have a valid parent"); JInternalFrame frame = new JInternalFrame(title); inputValue = UNINITIALIZED_VALUE; value = UNINITIALIZED_VALUE; frame.setContentPane(this); frame.setClosable(true); toUse.add(frame); frame.setLayer(JLayeredPane.MODAL_LAYER); frame.pack(); frame.setVisible(true); return frame; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
}
}
public JInternalFrame createInternalFrame(Component parentComponent, String title) throws RuntimeException { // Try to find a JDesktopPane. JLayeredPane toUse = getDesktopPaneForComponent(parentComponent); // If we don't have a JDesktopPane, we try to find a JLayeredPane. if (toUse == null) toUse = JLayeredPane.getLayeredPaneAbove(parentComponent); // If this still fails, we throw a RuntimeException. if (toUse == null) throw new RuntimeException ("parentComponent does not have a valid parent"); JInternalFrame frame = new JInternalFrame(title); inputValue = UNINITIALIZED_VALUE; value = UNINITIALIZED_VALUE; frame.setContentPane(this); frame.setClosable(true); toUse.add(frame); frame.setLayer(JLayeredPane.MODAL_LAYER); frame.pack(); frame.setVisible(true); return frame; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
{
{
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJOptionPane(); return accessibleContext; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
}
}
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJOptionPane(); return accessibleContext; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
{
{
public static JDesktopPane getDesktopPaneForComponent(Component parentComponent) { return (JDesktopPane) SwingUtilities.getAncestorOfClass(JDesktopPane.class, parentComponent); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
}
}
public static JDesktopPane getDesktopPaneForComponent(Component parentComponent) { return (JDesktopPane) SwingUtilities.getAncestorOfClass(JDesktopPane.class, parentComponent); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
}
}
public Object getInputValue() { return inputValue; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
}
}
protected String paramString() { return "JOptionPane"; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
{
{
public void setIcon(Icon newIcon) { if (icon != newIcon) { Icon old = icon; icon = newIcon; firePropertyChange(ICON_PROPERTY, old, icon); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
}
}
public void setIcon(Icon newIcon) { if (icon != newIcon) { Icon old = icon; icon = newIcon; firePropertyChange(ICON_PROPERTY, old, icon); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
{
{
public void setInitialSelectionValue(Object newValue) { if (initialSelectionValue != newValue) { Object old = initialSelectionValue; initialSelectionValue = newValue; firePropertyChange(INITIAL_SELECTION_VALUE_PROPERTY, old, initialSelectionValue); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
}
}
public void setInitialSelectionValue(Object newValue) { if (initialSelectionValue != newValue) { Object old = initialSelectionValue; initialSelectionValue = newValue; firePropertyChange(INITIAL_SELECTION_VALUE_PROPERTY, old, initialSelectionValue); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
{
{
public void setInitialValue(Object newValue) { if (initialValue != newValue) { Object old = initialValue; initialValue = newValue; firePropertyChange(INITIAL_VALUE_PROPERTY, old, initialValue); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
}
}
public void setInitialValue(Object newValue) { if (initialValue != newValue) { Object old = initialValue; initialValue = newValue; firePropertyChange(INITIAL_VALUE_PROPERTY, old, initialValue); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
{
{
public void setMessageType(int newType) { if (! validMessageType(newType)) throw new IllegalArgumentException("Message Type not legal value."); if (newType != messageType) { int old = messageType; messageType = newType; firePropertyChange(MESSAGE_TYPE_PROPERTY, old, messageType); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
}
}
public void setMessageType(int newType) { if (! validMessageType(newType)) throw new IllegalArgumentException("Message Type not legal value."); if (newType != messageType) { int old = messageType; messageType = newType; firePropertyChange(MESSAGE_TYPE_PROPERTY, old, messageType); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
}
}
public void setWantsInput(boolean newValue) { if (wantsInput != newValue) { boolean old = wantsInput; wantsInput = newValue; firePropertyChange(WANTS_INPUT_PROPERTY, old, wantsInput); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
return cause; }
return containedException; }
public Throwable getCause() { return cause; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/TransformerException.java/clean/core/src/classpath/javax/javax/xml/transform/TransformerException.java
return cause; }
return containedException; }
public Throwable getException() { return cause; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/TransformerException.java/clean/core/src/classpath/javax/javax/xml/transform/TransformerException.java
}
}
public String getLocationAsString() { if (locator == null) { return null; } String publicId = locator.getPublicId(); String systemId = locator.getSystemId(); int lineNumber = locator.getLineNumber(); int columnNumber = locator.getColumnNumber(); StringBuffer buffer = new StringBuffer (); if (publicId != null) { buffer.append ("publicId="); buffer.append (publicId); } if (systemId != null) { if (buffer.length() > 0) { buffer.append(' '); } buffer.append ("systemId="); buffer.append (systemId); } if (lineNumber != -1) { if (buffer.length() > 0) { buffer.append(' '); } buffer.append ("lineNumber="); buffer.append (lineNumber); } if (columnNumber != -1) { if (buffer.length() > 0) { buffer.append(' '); } buffer.append ("columnNumber="); buffer.append (columnNumber); } return buffer.toString(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/TransformerException.java/clean/core/src/classpath/javax/javax/xml/transform/TransformerException.java
}
}
public SourceLocator getLocator() { return locator; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/TransformerException.java/clean/core/src/classpath/javax/javax/xml/transform/TransformerException.java
}
}
public String getMessageAndLocation() { return (locator == null) ? getMessage() : getMessage() + ": " + getLocationAsString(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/TransformerException.java/clean/core/src/classpath/javax/javax/xml/transform/TransformerException.java
if (this.cause != null)
if (this.containedException != null)
public Throwable initCause(Throwable cause) { if (this.cause != null) { throw new IllegalStateException(); } if (cause == this) { throw new IllegalArgumentException(); } this.cause = cause; return this; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/TransformerException.java/clean/core/src/classpath/javax/javax/xml/transform/TransformerException.java
}
}
public Throwable initCause(Throwable cause) { if (this.cause != null) { throw new IllegalStateException(); } if (cause == this) { throw new IllegalArgumentException(); } this.cause = cause; return this; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/TransformerException.java/clean/core/src/classpath/javax/javax/xml/transform/TransformerException.java
} this.cause = cause;
} this.containedException = cause;
public Throwable initCause(Throwable cause) { if (this.cause != null) { throw new IllegalStateException(); } if (cause == this) { throw new IllegalArgumentException(); } this.cause = cause; return this; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/TransformerException.java/clean/core/src/classpath/javax/javax/xml/transform/TransformerException.java
}
}
public Throwable initCause(Throwable cause) { if (this.cause != null) { throw new IllegalStateException(); } if (cause == this) { throw new IllegalArgumentException(); } this.cause = cause; return this; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/TransformerException.java/clean/core/src/classpath/javax/javax/xml/transform/TransformerException.java
}
}
public void setLocator(SourceLocator location) { locator = location; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/TransformerException.java/clean/core/src/classpath/javax/javax/xml/transform/TransformerException.java
System.out.println(" sent heartbeat to " + ses.getSessionName());
log.info(" sent heartbeat to " + ses.getSessionName());
public void actionPerformed(ActionEvent e) { Session ses; for (int x = 0; x < sessions.size(); x++) { try { ses = (Session)sessions.get(x); if (ses.isConnected() && ses.isSendKeepAlive()) { ses.getVT().sendHeartBeat(); System.out.println(" sent heartbeat to " + ses.getSessionName()); } } catch (Exception ex) { System.out.println(ex.getMessage()); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Sessions.java/clean/tn5250j/src/org/tn5250j/Sessions.java
System.out.println(ex.getMessage());
log.warn(ex.getMessage());
public void actionPerformed(ActionEvent e) { Session ses; for (int x = 0; x < sessions.size(); x++) { try { ses = (Session)sessions.get(x); if (ses.isConnected() && ses.isSendKeepAlive()) { ses.getVT().sendHeartBeat(); System.out.println(" sent heartbeat to " + ses.getSessionName()); } } catch (Exception ex) { System.out.println(ex.getMessage()); } } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Sessions.java/clean/tn5250j/src/org/tn5250j/Sessions.java
synchronized (pool) {
void release() { if (pool != null) { synchronized (pool) { useCount++; Object key = HTTPConnection.getPoolKey(hostname, port, secure); pool.put(key, this); while (pool.size() >= HTTPURLConnection.maxConnections) { // maxConnections must always be >= 1 Object lru = pool.keySet().iterator().next(); HTTPConnection c = (HTTPConnection)pool.remove(lru); try { c.closeConnection(); } catch (IOException ioe) { // Ignore it. We are just cleaning up. } } } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8d798e21ea9e711563d557b9684e4c872138a713/HTTPConnection.java/clean/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPConnection.java
Object key = HTTPConnection.getPoolKey(hostname, port, secure); pool.put(key, this); while (pool.size() >= HTTPURLConnection.maxConnections)
pool.put(this); } else
void release() { if (pool != null) { synchronized (pool) { useCount++; Object key = HTTPConnection.getPoolKey(hostname, port, secure); pool.put(key, this); while (pool.size() >= HTTPURLConnection.maxConnections) { // maxConnections must always be >= 1 Object lru = pool.keySet().iterator().next(); HTTPConnection c = (HTTPConnection)pool.remove(lru); try { c.closeConnection(); } catch (IOException ioe) { // Ignore it. We are just cleaning up. } } } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8d798e21ea9e711563d557b9684e4c872138a713/HTTPConnection.java/clean/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPConnection.java
Object lru = pool.keySet().iterator().next(); HTTPConnection c = (HTTPConnection)pool.remove(lru);
void release() { if (pool != null) { synchronized (pool) { useCount++; Object key = HTTPConnection.getPoolKey(hostname, port, secure); pool.put(key, this); while (pool.size() >= HTTPURLConnection.maxConnections) { // maxConnections must always be >= 1 Object lru = pool.keySet().iterator().next(); HTTPConnection c = (HTTPConnection)pool.remove(lru); try { c.closeConnection(); } catch (IOException ioe) { // Ignore it. We are just cleaning up. } } } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8d798e21ea9e711563d557b9684e4c872138a713/HTTPConnection.java/clean/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPConnection.java
c.closeConnection();
closeConnection();
void release() { if (pool != null) { synchronized (pool) { useCount++; Object key = HTTPConnection.getPoolKey(hostname, port, secure); pool.put(key, this); while (pool.size() >= HTTPURLConnection.maxConnections) { // maxConnections must always be >= 1 Object lru = pool.keySet().iterator().next(); HTTPConnection c = (HTTPConnection)pool.remove(lru); try { c.closeConnection(); } catch (IOException ioe) { // Ignore it. We are just cleaning up. } } } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8d798e21ea9e711563d557b9684e4c872138a713/HTTPConnection.java/clean/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPConnection.java
} }
void release() { if (pool != null) { synchronized (pool) { useCount++; Object key = HTTPConnection.getPoolKey(hostname, port, secure); pool.put(key, this); while (pool.size() >= HTTPURLConnection.maxConnections) { // maxConnections must always be >= 1 Object lru = pool.keySet().iterator().next(); HTTPConnection c = (HTTPConnection)pool.remove(lru); try { c.closeConnection(); } catch (IOException ioe) { // Ignore it. We are just cleaning up. } } } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8d798e21ea9e711563d557b9684e4c872138a713/HTTPConnection.java/clean/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPConnection.java
void setPool(LinkedHashMap p)
void setPool(Pool p)
void setPool(LinkedHashMap p) { pool = p; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8d798e21ea9e711563d557b9684e4c872138a713/HTTPConnection.java/clean/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPConnection.java
if (!Utility.isValidEncoding(strEncoding)) {
if (!Utility.isValidIOEncoding(strEncoding)) {
public String setEncoding (String strEncoding) { if (!Utility.isValidEncoding(strEncoding)) { Log.error("not valid encoding. 'set' request ingored. returning null"); return null; } return (String) ((XMLAttribute) attribHash.get("encoding")).setAttribValue(strEncoding); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/13e829735e98cf10a44ce759a77df05c7ed52902/XMLDataIOStyle.java/buggy/src/gov/nasa/gsfc/adc/xdf/XMLDataIOStyle.java
{ return null; }
{ if (accessibleContext == null) accessibleContext = new AccessibleJCheckBox(); return accessibleContext; }
public AccessibleContext getAccessibleContext() { return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JCheckBox.java/buggy/core/src/classpath/javax/javax/swing/JCheckBox.java
{ return "CheckBoxUI"; }
{ return "CheckBoxUI"; }
public String getUIClassID() { return "CheckBoxUI"; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JCheckBox.java/buggy/core/src/classpath/javax/javax/swing/JCheckBox.java
{
{
protected String paramString() { return super.paramString() + ",borderPaintedFlat=" + borderPaintedFlat; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JCheckBox.java/buggy/core/src/classpath/javax/javax/swing/JCheckBox.java
}
}
protected String paramString() { return super.paramString() + ",borderPaintedFlat=" + borderPaintedFlat; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JCheckBox.java/buggy/core/src/classpath/javax/javax/swing/JCheckBox.java
value [ i ] = input.read_wstring();
value [ i ] = input.read_string();
public void _read(InputStream input) { value = new String[ input.read_long() ]; for (int i = 0; i < value.length; i++) { value [ i ] = input.read_wstring(); } typecode.setLength(value.length); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72c2f223affb33a2850592b25490f4663c651bee/StringSeqHolder.java/buggy/core/src/classpath/org/org/omg/CORBA/StringSeqHolder.java
output.write_wstring(value [ i ]);
output.write_string(value [ i ]);
public void _write(OutputStream output) { output.write_long(value.length); for (int i = 0; i < value.length; i++) { output.write_wstring(value [ i ]); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72c2f223affb33a2850592b25490f4663c651bee/StringSeqHolder.java/buggy/core/src/classpath/org/org/omg/CORBA/StringSeqHolder.java
System.err.println("WARNING: CURRENTLY GAPPLETVIEWER RUNS WITH NO SECURITY MANAGER.\n\n" + "THIS MEANS THAT APPLETS YOU LOAD CAN DO ANYTHING A JAVA APPLICATION\n" + "THAT YOU DOWNLOAD AND RUN CAN DO. BE *VERY* CAREFUL WHICH APPLETS YOU RUN.\n" + "DO NOT USE GAPPLETVIEWER ON YOUR SYSTEM IF YOUR SYSTEM STORES IMPORTANT DATA.\n" + "THIS DATA CAN BE DESTROYED OR STOLEN IF YOU LOAD A MALICIOUS APPLET.\n"); System.err.println("[press 'c' or 'C' to continue or anything else to quit]"); BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); String response = null; try { response = stdin.readLine(); } catch (IOException e) { System.err.println("failed to read response to warning message: " + e); System.exit(1); } if (!(response.equals("c") || response.equals("C"))) { System.exit(0); }
public static void main(String[] args) throws IOException { parser = new ClasspathToolParser("appletviewer", true); parser.setHeader("usage: appletviewer [OPTION] -code CODE | URL..."); OptionGroup attributeGroup = new OptionGroup("Applet tag options"); attributeGroup.add(new Option("code", Main.messages.getString ("gcjwebplugin.code_description"), "CODE") { public void parsed(String argument) throws OptionException { code = argument; } }); attributeGroup.add(new Option("codebase", Main.messages.getString ("gcjwebplugin.codebase_description"), "CODEBASE") { public void parsed(String argument) throws OptionException { codebase = argument; } }); attributeGroup.add(new Option("archive", Main.messages.getString ("gcjwebplugin.archive_description"), "ARCHIVE") { public void parsed(String argument) throws OptionException { archive = argument; } }); attributeGroup.add(new Option("width", Main.messages.getString ("gcjwebplugin.width_description"), "WIDTH") { public void parsed(String argument) throws OptionException { dimensions.width = Integer.parseInt(argument); } }); attributeGroup.add(new Option("height", Main.messages.getString ("gcjwebplugin.height_description"), "HEIGHT") { public void parsed(String argument) throws OptionException { dimensions.height = Integer.parseInt(argument); } }); attributeGroup.add(new Option("param", Main.messages.getString ("gcjwebplugin.param_description"), "NAME,VALUE") { public void parsed(String argument) throws OptionException { parameters.add(argument); } }); OptionGroup pluginGroup = new OptionGroup("Plugin option"); pluginGroup.add(new Option("plugin", Main.messages.getString ("gcjwebplugin.plugin_description"), "INPUT,OUTPUT") { public void parsed(String argument) throws OptionException { pluginMode = true; int comma = argument.indexOf(','); pipeInName = argument.substring(0, comma); pipeOutName = argument.substring(comma + 1); } }); OptionGroup debuggingGroup = new OptionGroup("Debugging option"); debuggingGroup.add(new Option("verbose", Main.messages.getString ("gcjwebplugin.verbose_description"), (String) null) { public void parsed(String argument) throws OptionException { verbose = true; } }); OptionGroup compatibilityGroup = new OptionGroup("Compatibility options"); compatibilityGroup.add(new Option("debug", Main.messages.getString ("gcjwebplugin.debug_description"), (String) null) { public void parsed(String argument) throws OptionException { // Currently ignored. } }); compatibilityGroup.add(new Option("encoding", Main.messages.getString ("gcjwebplugin.encoding_description"), "CHARSET") { public void parsed(String argument) throws OptionException { // FIXME: We should probably be using // java.nio.charset.CharsetDecoder to handle the encoding. What // is the status of Classpath's implementation? } }); parser.add(attributeGroup); parser.add(pluginGroup); parser.add(debuggingGroup); parser.add(compatibilityGroup); String[] urls = parser.parse(args); // Print arguments. printArguments(args); args = urls; if (dimensions.height < 0) dimensions.height = 200; if (dimensions.width < 0) dimensions.width = (int) (1.6 * dimensions.height); //System.setSecurityManager(new AppletSecurityManager(pluginMode)); if (pluginMode) { InputStream in; OutputStream out; in = new FileInputStream(pipeInName); out = new FileOutputStream(pipeOutName); PluginAppletViewer.start(in, out); } else { if (code == null) { // The --code option wasn't given and there are no URL // arguments so we have nothing to work with. if (args.length == 0) { System.err.println(Main.messages.getString("gcjwebplugin.no_input_files")); System.exit(1); } // Create a standalone appletviewer from a list of URLs. new StandaloneAppletViewer(args); } else { // Create a standalone appletviewer from the --code // option. new StandaloneAppletViewer(code, codebase, archive, parameters, dimensions); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/bd3c4af88fcde25afb91781dd0bd56ebcfa8a15b/Main.java/buggy/core/src/classpath/tools/gnu/classpath/tools/appletviewer/Main.java
public FTPFileSystem(FTPFSDevice device) {
public FTPFileSystem(final FTPFSDevice device) {
public FTPFileSystem(FTPFSDevice device) { this.device = device; device.addListener(new DeviceListener() { public void deviceStarted(Device device) { //empty } public void deviceStop(Device device) { try { close(); } catch(IOException x){ x.printStackTrace(); } } }); try{// setRemoteHost(device.getHost());// setTimeout(300000);// connect(); connect(device.getHost()); login(device.getUser(),device.getPassword()); thread = new Thread(new Runnable(){ public void run() { try{ while(!isClosed()){ try { Thread.sleep(100000); nop(); }catch(InterruptedException x){ //ignore } } } catch(Exception x){ x.printStackTrace(); } } },"ftpfs_keepalive"); thread.start(); //FTPFile f = new FTPFile("/", "/", 0, true, new Date(0)); FTPFile f = new FTPFile(); f.setName(printWorkingDirectory()); root = new FTPFSDirectory(this, f); closed = false; }catch(Exception e){ throw new RuntimeException(e); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7bedbedab739f364e6ba4d4ce6644de8332fbdf9/FTPFileSystem.java/buggy/fs/src/fs/org/jnode/fs/ftpfs/FTPFileSystem.java
connect(device.getHost());
setRemoteHost(device.getHost()); setTimeout(300000); AccessController.doPrivileged( new PrivilegedAction(){ public Object run() { try{ connect(); return null; }catch(Exception e){ throw new RuntimeException(e); } } });
public FTPFileSystem(FTPFSDevice device) { this.device = device; device.addListener(new DeviceListener() { public void deviceStarted(Device device) { //empty } public void deviceStop(Device device) { try { close(); } catch(IOException x){ x.printStackTrace(); } } }); try{// setRemoteHost(device.getHost());// setTimeout(300000);// connect(); connect(device.getHost()); login(device.getUser(),device.getPassword()); thread = new Thread(new Runnable(){ public void run() { try{ while(!isClosed()){ try { Thread.sleep(100000); nop(); }catch(InterruptedException x){ //ignore } } } catch(Exception x){ x.printStackTrace(); } } },"ftpfs_keepalive"); thread.start(); //FTPFile f = new FTPFile("/", "/", 0, true, new Date(0)); FTPFile f = new FTPFile(); f.setName(printWorkingDirectory()); root = new FTPFSDirectory(this, f); closed = false; }catch(Exception e){ throw new RuntimeException(e); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7bedbedab739f364e6ba4d4ce6644de8332fbdf9/FTPFileSystem.java/buggy/fs/src/fs/org/jnode/fs/ftpfs/FTPFileSystem.java
FTPFile f = new FTPFile(); f.setName(printWorkingDirectory());
FTPFile f = new FTPFile("/", "/", 0, true, new Date(0));
public FTPFileSystem(FTPFSDevice device) { this.device = device; device.addListener(new DeviceListener() { public void deviceStarted(Device device) { //empty } public void deviceStop(Device device) { try { close(); } catch(IOException x){ x.printStackTrace(); } } }); try{// setRemoteHost(device.getHost());// setTimeout(300000);// connect(); connect(device.getHost()); login(device.getUser(),device.getPassword()); thread = new Thread(new Runnable(){ public void run() { try{ while(!isClosed()){ try { Thread.sleep(100000); nop(); }catch(InterruptedException x){ //ignore } } } catch(Exception x){ x.printStackTrace(); } } },"ftpfs_keepalive"); thread.start(); //FTPFile f = new FTPFile("/", "/", 0, true, new Date(0)); FTPFile f = new FTPFile(); f.setName(printWorkingDirectory()); root = new FTPFSDirectory(this, f); closed = false; }catch(Exception e){ throw new RuntimeException(e); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7bedbedab739f364e6ba4d4ce6644de8332fbdf9/FTPFileSystem.java/buggy/fs/src/fs/org/jnode/fs/ftpfs/FTPFileSystem.java
public void run() {
public Object run() {
public void run() { try{ while(!isClosed()){ try { Thread.sleep(100000); nop(); }catch(InterruptedException x){ //ignore } } } catch(Exception x){ x.printStackTrace(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7bedbedab739f364e6ba4d4ce6644de8332fbdf9/FTPFileSystem.java/buggy/fs/src/fs/org/jnode/fs/ftpfs/FTPFileSystem.java
while(!isClosed()){ try { Thread.sleep(100000); nop(); }catch(InterruptedException x){ } } } catch(Exception x){ x.printStackTrace();
connect(); return null; }catch(Exception e){ throw new RuntimeException(e);
public void run() { try{ while(!isClosed()){ try { Thread.sleep(100000); nop(); }catch(InterruptedException x){ //ignore } } } catch(Exception x){ x.printStackTrace(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7bedbedab739f364e6ba4d4ce6644de8332fbdf9/FTPFileSystem.java/buggy/fs/src/fs/org/jnode/fs/ftpfs/FTPFileSystem.java
listFiles(root.path());
dir(root.path());
private synchronized void nop() throws Exception{ listFiles(root.path()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7bedbedab739f364e6ba4d4ce6644de8332fbdf9/FTPFileSystem.java/buggy/fs/src/fs/org/jnode/fs/ftpfs/FTPFileSystem.java
void addSelectionInterval(int index0, int index1);
void addSelectionInterval(int anchor, int lead);
void addSelectionInterval(int index0, int index1);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/ListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/ListSelectionModel.java
boolean isSelectedIndex(int a);
boolean isSelectedIndex(int index);
boolean isSelectedIndex(int a);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/ListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/ListSelectionModel.java
void removeSelectionInterval(int index0, int index1);
void removeSelectionInterval(int anchor, int lead);
void removeSelectionInterval(int index0, int index1);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/ListSelectionModel.java/clean/core/src/classpath/javax/javax/swing/ListSelectionModel.java