rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
if (jj_scan_token(TRUE)) return true; | if (jj_scan_token(NULL)) return true; | final private boolean jj_3R_49() { if (jj_scan_token(TRUE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(FALSE)) return true; | if (jj_scan_token(TRUE)) return true; | final private boolean jj_3R_50() { if (jj_scan_token(FALSE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(UNDEFINED)) return true; | if (jj_scan_token(FALSE)) return true; | final private boolean jj_3R_51() { if (jj_scan_token(UNDEFINED)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(OP_NOT)) return true; | if (jj_scan_token(UNDEFINED)) return true; | final private boolean jj_3R_52() { if (jj_scan_token(OP_NOT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(NUMBER)) return true; | if (jj_scan_token(OP_NOT)) return true; | final private boolean jj_3R_53() { if (jj_scan_token(NUMBER)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(OP_MINUS)) return true; | if (jj_scan_token(NUMBER)) return true; | final private boolean jj_3R_54() { if (jj_scan_token(OP_MINUS)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(OP_EQ)) return true; | if (jj_scan_token(OP_MINUS)) return true; | final private boolean jj_3R_55() { if (jj_scan_token(OP_EQ)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(OP_SET)) return true; | if (jj_scan_token(OP_EQ)) return true; | final private boolean jj_3R_56() { if (jj_scan_token(OP_SET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(OP_NE)) return true; | if (jj_scan_token(OP_SET)) return true; | final private boolean jj_3R_57() { if (jj_scan_token(OP_NE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(OP_GT)) return true; | if (jj_scan_token(OP_NE)) return true; | final private boolean jj_3R_58() { if (jj_scan_token(OP_GT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(OP_GE)) return true; | if (jj_scan_token(OP_GT)) return true; | final private boolean jj_3R_59() { if (jj_scan_token(OP_GE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(OP_LE)) return true; | if (jj_scan_token(OP_GE)) return true; | final private boolean jj_3R_60() { if (jj_scan_token(OP_LE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(OP_LT)) return true; | if (jj_scan_token(OP_LE)) return true; | final private boolean jj_3R_61() { if (jj_scan_token(OP_LT)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
Token xsp; xsp = jj_scanpos; if (jj_3R_69()) { jj_scanpos = xsp; if (jj_3R_70()) { jj_scanpos = xsp; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) { jj_scanpos = xsp; if (jj_3R_73()) return true; | if (jj_scan_token(OP_LT)) return true; | final private boolean jj_3R_62() { Token xsp; xsp = jj_scanpos; if (jj_3R_69()) { jj_scanpos = xsp; if (jj_3R_70()) { jj_scanpos = xsp; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) { jj_scanpos = xsp; if (jj_3R_73()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_62() { Token xsp; xsp = jj_scanpos; if (jj_3R_69()) { jj_scanpos = xsp; if (jj_3R_70()) { jj_scanpos = xsp; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) { jj_scanpos = xsp; if (jj_3R_73()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
|
if (jj_scan_token(LBRACE)) return true; | Token xsp; xsp = jj_scanpos; if (jj_3R_70()) { jj_scanpos = xsp; if (jj_3R_71()) { jj_scanpos = xsp; if (jj_3R_72()) { jj_scanpos = xsp; if (jj_3R_73()) { jj_scanpos = xsp; if (jj_3R_74()) return true; | final private boolean jj_3R_63() { if (jj_scan_token(LBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_63() { if (jj_scan_token(LBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
|
if (jj_scan_token(RBRACE)) return true; | if (jj_scan_token(LBRACE)) return true; | final private boolean jj_3R_64() { if (jj_scan_token(RBRACE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(POUND)) return true; | if (jj_scan_token(RBRACE)) return true; | final private boolean jj_3R_65() { if (jj_scan_token(POUND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(DOLLAR)) return true; | if (jj_scan_token(POUND)) return true; | final private boolean jj_3R_66() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
Token xsp; xsp = jj_scanpos; if (jj_3R_74()) { jj_scanpos = xsp; if (jj_3R_75()) return true; | if (jj_scan_token(DOLLAR)) return true; | final private boolean jj_3R_67() { Token xsp; xsp = jj_scanpos; if (jj_3R_74()) { jj_scanpos = xsp; if (jj_3R_75()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_67() { Token xsp; xsp = jj_scanpos; if (jj_3R_74()) { jj_scanpos = xsp; if (jj_3R_75()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
|
if (jj_scan_token(LBRACKET)) return true; | Token xsp; xsp = jj_scanpos; if (jj_3R_75()) { jj_scanpos = xsp; if (jj_3R_76()) return true; | final private boolean jj_3R_68() { if (jj_scan_token(LBRACKET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_68() { if (jj_scan_token(LBRACKET)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
|
if (jj_scan_token(STUFF)) return true; | if (jj_scan_token(LBRACKET)) return true; | final private boolean jj_3R_69() { if (jj_scan_token(STUFF)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(QCHAR)) return true; | if (jj_scan_token(STUFF)) return true; | final private boolean jj_3R_70() { if (jj_scan_token(QCHAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(SLASH)) return true; | if (jj_scan_token(QCHAR)) return true; | final private boolean jj_3R_71() { if (jj_scan_token(SLASH)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_3R_76()) return true; | if (jj_scan_token(SLASH)) return true; | final private boolean jj_3R_72() { if (jj_3R_76()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(QUOTE)) return true; | if (jj_3R_78()) return true; | final private boolean jj_3R_74() { if (jj_scan_token(QUOTE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(SQUOTE)) return true; | if (jj_scan_token(QUOTE)) return true; | final private boolean jj_3R_75() { if (jj_scan_token(SQUOTE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (jj_scan_token(POUNDPOUND)) return true; | if (jj_scan_token(SQUOTE)) return true; | final private boolean jj_3R_76() { if (jj_scan_token(POUNDPOUND)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
Token xsp; xsp = jj_scanpos; if (jj_3R_78()) { jj_scanpos = xsp; if (jj_3R_79()) return true; | if (jj_scan_token(POUNDPOUND)) return true; | final private boolean jj_3R_77() { Token xsp; xsp = jj_scanpos; if (jj_3R_78()) { jj_scanpos = xsp; if (jj_3R_79()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_77() { Token xsp; xsp = jj_scanpos; if (jj_3R_78()) { jj_scanpos = xsp; if (jj_3R_79()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
|
if (jj_3R_66()) return true; | Token xsp; xsp = jj_scanpos; if (jj_3R_79()) { jj_scanpos = xsp; if (jj_3R_80()) return true; | final private boolean jj_3R_78() { if (jj_3R_66()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3R_78() { if (jj_3R_66()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
|
if (jj_scan_token(DOLLAR)) return true; | if (jj_3R_67()) return true; | final private boolean jj_3R_79() { if (jj_scan_token(DOLLAR)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
if (!jj_semLA || jj_3R_43()) return true; | if (!jj_semLA || jj_3R_44()) return true; | final private boolean jj_3_21() { Token xsp; xsp = jj_scanpos; if (jj_3R_41()) { jj_scanpos = xsp; if (jj_3R_42()) { jj_scanpos = xsp; lookingAhead = true; jj_semLA = lookahead_not_breaking_subd(); lookingAhead = false; if (!jj_semLA || jj_3R_43()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | final private boolean jj_3_21() { Token xsp; xsp = jj_scanpos; if (jj_3R_41()) { jj_scanpos = xsp; if (jj_3R_42()) { jj_scanpos = xsp; lookingAhead = true; jj_semLA = lookahead_not_breaking_subd(); lookingAhead = false; if (!jj_semLA || jj_3R_43()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
|
if(impl.isIconHandler()){ | if (impl.isIconHandler()) { | private void checkForStaleRooms() { int delay = 1000; // delay for 1 minute int period = 60000; // repeat every 30 seconds. Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); titleLabel.setForeground(Color.gray); titleLabel.setFont(tab.getDefaultFont()); if (chatRoom instanceof ChatRoomImpl) { ChatRoomImpl impl = (ChatRoomImpl)chatRoom; if(impl.isIconHandler()){ return; } String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); } else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE_IMAGE)); } else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.chat) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_FREE_CHAT_STALE_IMAGE)); } else if (mode == Presence.Mode.dnd) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } else if (mode == Presence.Mode.xa) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } } } titleLabel.validate(); titleLabel.repaint(); } } }, delay, period); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/cc321252845d7ea34f21f1f40e3871cb82c36604/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
private void checkForStaleRooms() { int delay = 1000; // delay for 1 minute int period = 60000; // repeat every 30 seconds. Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); titleLabel.setForeground(Color.gray); titleLabel.setFont(tab.getDefaultFont()); if (chatRoom instanceof ChatRoomImpl) { ChatRoomImpl impl = (ChatRoomImpl)chatRoom; if(impl.isIconHandler()){ return; } String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); } else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE_IMAGE)); } else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.chat) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_FREE_CHAT_STALE_IMAGE)); } else if (mode == Presence.Mode.dnd) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } else if (mode == Presence.Mode.xa) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } } } titleLabel.validate(); titleLabel.repaint(); } } }, delay, period); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/cc321252845d7ea34f21f1f40e3871cb82c36604/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
||
if(impl.isIconHandler()){ | if (impl.isIconHandler()) { | public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); titleLabel.setForeground(Color.gray); titleLabel.setFont(tab.getDefaultFont()); if (chatRoom instanceof ChatRoomImpl) { ChatRoomImpl impl = (ChatRoomImpl)chatRoom; if(impl.isIconHandler()){ return; } String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); } else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE_IMAGE)); } else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.chat) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_FREE_CHAT_STALE_IMAGE)); } else if (mode == Presence.Mode.dnd) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } else if (mode == Presence.Mode.xa) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } } } titleLabel.validate(); titleLabel.repaint(); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/cc321252845d7ea34f21f1f40e3871cb82c36604/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); titleLabel.setForeground(Color.gray); titleLabel.setFont(tab.getDefaultFont()); if (chatRoom instanceof ChatRoomImpl) { ChatRoomImpl impl = (ChatRoomImpl)chatRoom; if(impl.isIconHandler()){ return; } String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); } else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE_IMAGE)); } else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.chat) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_FREE_CHAT_STALE_IMAGE)); } else if (mode == Presence.Mode.dnd) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } else if (mode == Presence.Mode.xa) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE)); } } } titleLabel.validate(); titleLabel.repaint(); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/cc321252845d7ea34f21f1f40e3871cb82c36604/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
||
"Confirmation", JOptionPane.YES_NO_OPTION); | "Confirmation", JOptionPane.YES_NO_OPTION); | public void closeActiveRoom() { ChatRoom room = null; try { room = getActiveChatRoom(); } catch (ChatRoomNotFoundException e1) { // AgentLog.logError("Chat room not found", e1); } // Confirm end session boolean isGroupChat = room.getChatType() == Message.Type.GROUP_CHAT; if (isGroupChat) { String message = "Would you like to end this session?"; final int ok = JOptionPane.showConfirmDialog(chatFrame, message, "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { room.closeChatRoom(); return; } } else { room.closeChatRoom(); return; } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/cc321252845d7ea34f21f1f40e3871cb82c36604/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
Log.error("Could not locate chat room.", e1); | Log.debug("Could not locate chat room " + roomname); | private void handleRoomPresence(final Presence p) { final String roomname = StringUtils.parseBareAddress(p.getFrom()); ChatRoom chatRoom; try { chatRoom = getChatRoom(roomname); } catch (ChatRoomNotFoundException e1) { Log.error("Could not locate chat room.", e1); return; } final String userid = StringUtils.parseResource(p.getFrom()); if (p.getType() == Presence.Type.unavailable) { fireUserHasLeft(chatRoom, userid); } else if (p.getType() == Presence.Type.available) { fireUserHasJoined(chatRoom, userid); } // Change tab icon if (chatRoom instanceof ChatRoomImpl) { StatusItem statusItem = SparkManager.getWorkspace().getStatusBar().getItemFromPresence(p); Icon tabIcon = null; if (statusItem == null && p == null) { tabIcon = SparkRes.getImageIcon(SparkRes.CLEAR_BALL_ICON); } else if (statusItem == null && p != null && p.getType() == Presence.Type.available) { tabIcon = SparkRes.getImageIcon(SparkRes.GREEN_BALL); } else { String status = p.getStatus(); if (status != null && status.indexOf("phone") != -1) { tabIcon = SparkRes.getImageIcon(SparkRes.ON_PHONE_IMAGE); } else if (statusItem == null) { tabIcon = SparkRes.getImageIcon(SparkRes.CLEAR_BALL_ICON); } else { tabIcon = statusItem.getIcon(); } } Icon icon = SparkManager.getChatManager().getPresenceIconForContactHandler(p); if (icon != null) { tabIcon = icon; } int tabLoc = indexOfComponent(chatRoom); if (tabLoc != -1) { getTabAt(tabLoc).setIcon(tabIcon); } } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/cc321252845d7ea34f21f1f40e3871cb82c36604/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
threadContext.getRubyClass()); | (ArrayStack)threadContext.getClassStack().clone()); | public void visitDefnNode(DefnNode iVisited) { RubyModule containingClass = threadContext.getRubyClass(); if (containingClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (containingClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && containingClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } MetaClass singletonClass = null; /* // if defining in a singleton, pop it and use visitDefs-style definition below if (containingClass.isSingleton()) { singletonClass = (MetaClass) threadContext.popClass(); containingClass = threadContext.getRubyClass(); } */ DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, threadContext.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); containingClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { containingClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); containingClass.callMethod("singleton_method_added", runtime.newSymbol(name)); } if (singletonClass != null) { threadContext.pushClass(singletonClass); singletonClass.addMethod(iVisited.getName(), newMethod); // FIXME: need to call someone's singleton_method_added (receiver is lost at this point)! //.callMethod("singleton_method_added", runtime.toSymbol(iVisited.getName())); } else { containingClass.callMethod("method_added", runtime.newSymbol(name)); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7fd129dfcc9660fb6d3c382cc48a2692d03890ca/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java |
runtime.getRubyClass()); | (ArrayStack)threadContext.getClassStack().clone()); | public void visitDefsNode(DefsNode iVisited) { IRubyObject receiver = eval(iVisited.getReceiverNode()); if (runtime.getSafeLevel() >= 4 && !receiver.isTaint()) { throw new SecurityError(runtime, "Insecure; can't define singleton method."); } if (receiver.isFrozen()) { throw new FrozenError(runtime, "object"); } if (! receiver.singletonMethodsAllowed()) { throw new TypeError(runtime, "can't define singleton method \"" + iVisited.getName() + "\" for " + receiver.getType()); } RubyClass rubyClass = receiver.getSingletonClass(); if (runtime.getSafeLevel() >= 4) { ICallable method = (ICallable) rubyClass.getMethods().get(iVisited.getName()); if (method != null) { throw new SecurityError(runtime, "Redefining method prohibited."); } } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), Visibility.PUBLIC, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(iVisited.getName(), newMethod); receiver.callMethod("singleton_method_added", runtime.newSymbol(iVisited.getName())); result = runtime.getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7fd129dfcc9660fb6d3c382cc48a2692d03890ca/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java |
System.out.println(iVisited.getBodyNode().getClass().getName()); | public void visitScopeNode(ScopeNode iVisited) { threadContext.getFrameStack().pushCopy(); threadContext.getScopeStack().push(iVisited.getLocalNames()); try { eval(iVisited.getBodyNode()); System.out.println(iVisited.getBodyNode().getClass().getName()); } finally { threadContext.getScopeStack().pop(); threadContext.getFrameStack().pop(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7fd129dfcc9660fb6d3c382cc48a2692d03890ca/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java |
|
finder.addBaseDirectory(new File(args[++i])); | baseDir = args[++i]; | private void parseArguments(String[] args) throws Exception { FileFinder finder = new FileFinder(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) { finder.addBaseDirectory(new File(args[++i])); } else if (args[i].equals("--datafile")) { setDataFile( args[++i]); } else if (args[i].equals("--destination")) { setDestination( args[++i]); } else if (args[i].equals("--format")) { setFormat( args[++i]); } else { finder.addSourceFilePath(args[i]); } } if (dataFile == null) dataFile = CoverageDataFileHandler.getDefaultDataFile(); if (destinationDir == null) { System.err.println("Error: destination directory must be set"); System.exit(1); } if (format == null) { System.err.println("Error: format must be set"); System.exit(1); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("format is " + format); LOGGER.debug("dataFile is " + dataFile.getAbsolutePath()); LOGGER.debug("destinationDir is " + destinationDir.getAbsolutePath()); } ProjectData projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } if (format.equalsIgnoreCase("html")) { new HTMLReport(projectData, destinationDir, finder); } else if (format.equalsIgnoreCase("xml")) { new XMLReport(projectData, destinationDir, finder); } } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/reporting/Main.java |
finder.addSourceFilePath(args[i]); | if( baseDir==null) { finder.addSourceDirectory( args[i]); } else { finder.addSourceFile( baseDir, args[i]); } | private void parseArguments(String[] args) throws Exception { FileFinder finder = new FileFinder(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) { finder.addBaseDirectory(new File(args[++i])); } else if (args[i].equals("--datafile")) { setDataFile( args[++i]); } else if (args[i].equals("--destination")) { setDestination( args[++i]); } else if (args[i].equals("--format")) { setFormat( args[++i]); } else { finder.addSourceFilePath(args[i]); } } if (dataFile == null) dataFile = CoverageDataFileHandler.getDefaultDataFile(); if (destinationDir == null) { System.err.println("Error: destination directory must be set"); System.exit(1); } if (format == null) { System.err.println("Error: format must be set"); System.exit(1); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("format is " + format); LOGGER.debug("dataFile is " + dataFile.getAbsolutePath()); LOGGER.debug("destinationDir is " + destinationDir.getAbsolutePath()); } ProjectData projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } if (format.equalsIgnoreCase("html")) { new HTMLReport(projectData, destinationDir, finder); } else if (format.equalsIgnoreCase("xml")) { new XMLReport(projectData, destinationDir, finder); } } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/reporting/Main.java |
new HTMLReport(projectData, destinationDir, finder); | new HTMLReport(projectData, destinationDir, finder, complexity); | private void parseArguments(String[] args) throws Exception { FileFinder finder = new FileFinder(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) { finder.addBaseDirectory(new File(args[++i])); } else if (args[i].equals("--datafile")) { setDataFile( args[++i]); } else if (args[i].equals("--destination")) { setDestination( args[++i]); } else if (args[i].equals("--format")) { setFormat( args[++i]); } else { finder.addSourceFilePath(args[i]); } } if (dataFile == null) dataFile = CoverageDataFileHandler.getDefaultDataFile(); if (destinationDir == null) { System.err.println("Error: destination directory must be set"); System.exit(1); } if (format == null) { System.err.println("Error: format must be set"); System.exit(1); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("format is " + format); LOGGER.debug("dataFile is " + dataFile.getAbsolutePath()); LOGGER.debug("destinationDir is " + destinationDir.getAbsolutePath()); } ProjectData projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } if (format.equalsIgnoreCase("html")) { new HTMLReport(projectData, destinationDir, finder); } else if (format.equalsIgnoreCase("xml")) { new XMLReport(projectData, destinationDir, finder); } } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/reporting/Main.java |
new XMLReport(projectData, destinationDir, finder); | new XMLReport(projectData, destinationDir, finder, complexity); | private void parseArguments(String[] args) throws Exception { FileFinder finder = new FileFinder(); for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) { finder.addBaseDirectory(new File(args[++i])); } else if (args[i].equals("--datafile")) { setDataFile( args[++i]); } else if (args[i].equals("--destination")) { setDestination( args[++i]); } else if (args[i].equals("--format")) { setFormat( args[++i]); } else { finder.addSourceFilePath(args[i]); } } if (dataFile == null) dataFile = CoverageDataFileHandler.getDefaultDataFile(); if (destinationDir == null) { System.err.println("Error: destination directory must be set"); System.exit(1); } if (format == null) { System.err.println("Error: format must be set"); System.exit(1); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("format is " + format); LOGGER.debug("dataFile is " + dataFile.getAbsolutePath()); LOGGER.debug("destinationDir is " + destinationDir.getAbsolutePath()); } ProjectData projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } if (format.equalsIgnoreCase("html")) { new HTMLReport(projectData, destinationDir, finder); } else if (format.equalsIgnoreCase("xml")) { new XMLReport(projectData, destinationDir, finder); } } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/reporting/Main.java |
sourceFilePaths.add(path); | sourceFilePaths.add(getCorrectedPath(path)); | public void addSourceFilePath(String path) { change(); sourceFilePaths.add(path); } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/09421016268852f85f74b9774657dc46969a87d5/FileFinder.java/buggy/cobertura/src/net/sourceforge/cobertura/util/FileFinder.java |
isg = (pojos.ImageData) i.next(); | isg = (pojos.ImageData) i.next(); | Set getImagesDiff(pojos.DatasetData data, Map filters, Map complexFilters) { Set imagesDiff = new HashSet(); try { imagesDiff = getImportedImages(filters, complexFilters); pojos.ImageData isg; Iterator i = imagesDiff.iterator(); Set images = data.getImages(); Iterator j; while (i.hasNext()) { isg = (pojos.ImageData) i.next(); j = images.iterator(); while (j.hasNext()) { if (((pojos.ImageData) j.next()).getId() == isg.getId()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; /* List imagesDiff = new ArrayList(); try { imagesDiff = getImportedImages(filters, complexFilters); Set images = data.getImages(); pojos.ImageData isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (pojos.ImageData) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((pojos.ImageData) i.next()).getId() == isg.getId()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; */ } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ae72054835091336e69b97adb67fcf7b9129fdb5/DataManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/DataManager.java |
imagesDiff.remove(isg); } | toRemove.add(isg); } | Set getImagesDiff(pojos.DatasetData data, Map filters, Map complexFilters) { Set imagesDiff = new HashSet(); try { imagesDiff = getImportedImages(filters, complexFilters); pojos.ImageData isg; Iterator i = imagesDiff.iterator(); Set images = data.getImages(); Iterator j; while (i.hasNext()) { isg = (pojos.ImageData) i.next(); j = images.iterator(); while (j.hasNext()) { if (((pojos.ImageData) j.next()).getId() == isg.getId()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; /* List imagesDiff = new ArrayList(); try { imagesDiff = getImportedImages(filters, complexFilters); Set images = data.getImages(); pojos.ImageData isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (pojos.ImageData) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((pojos.ImageData) i.next()).getId() == isg.getId()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; */ } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ae72054835091336e69b97adb67fcf7b9129fdb5/DataManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/DataManager.java |
imagesDiff.removeAll(toRemove); | Set getImagesDiff(pojos.DatasetData data, Map filters, Map complexFilters) { Set imagesDiff = new HashSet(); try { imagesDiff = getImportedImages(filters, complexFilters); pojos.ImageData isg; Iterator i = imagesDiff.iterator(); Set images = data.getImages(); Iterator j; while (i.hasNext()) { isg = (pojos.ImageData) i.next(); j = images.iterator(); while (j.hasNext()) { if (((pojos.ImageData) j.next()).getId() == isg.getId()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; /* List imagesDiff = new ArrayList(); try { imagesDiff = getImportedImages(filters, complexFilters); Set images = data.getImages(); pojos.ImageData isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (pojos.ImageData) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((pojos.ImageData) i.next()).getId() == isg.getId()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; */ } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ae72054835091336e69b97adb67fcf7b9129fdb5/DataManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/DataManager.java |
|
public DefnNode(ISourcePosition position, String name, Node argsNode, ScopeNode bodyNode, Visibility visibility) { | public DefnNode(ISourcePosition position, ArgumentNode nameNode, Node argsNode, ScopeNode bodyNode, Visibility visibility) { | public DefnNode(ISourcePosition position, String name, Node argsNode, ScopeNode bodyNode, Visibility visibility) { super(position); this.name = name.intern(); this.argsNode = argsNode; this.bodyNode = bodyNode; this.visibility = visibility; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/DefnNode.java/clean/src/org/jruby/ast/DefnNode.java |
this.name = name.intern(); | this.nameNode = nameNode; | public DefnNode(ISourcePosition position, String name, Node argsNode, ScopeNode bodyNode, Visibility visibility) { super(position); this.name = name.intern(); this.argsNode = argsNode; this.bodyNode = bodyNode; this.visibility = visibility; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/DefnNode.java/clean/src/org/jruby/ast/DefnNode.java |
return Node.createList(argsNode, bodyNode); | return Node.createList(nameNode, argsNode, bodyNode); | public List childNodes() { return Node.createList(argsNode, bodyNode); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/DefnNode.java/clean/src/org/jruby/ast/DefnNode.java |
if (l != null && l.size() > 0) AnnotationMapper.fillImageAnnotations(l, map); | if (l == null || l.size() == 0) return map; AnnotationMapper.fillImageAnnotations(l, map); | public Map getImageAnnotations(int imageID) throws DSOutOfServiceException, DSAccessException { Criteria c = AnnotationMapper.buildImageAnnotationCriteria(imageID); List l = (List) gateway.retrieveListSTSData("ImageAnnotation", c); TreeMap map = new TreeMap(); if (l != null && l.size() > 0) AnnotationMapper.fillImageAnnotations(l, map); return map; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cc61e15d4f5c0f46f93a6f4afe4c8e93e6486041/STSAdapter.java/buggy/SRC/org/openmicroscopy/shoola/env/data/STSAdapter.java |
if (ids.size() > DMSAdapter.LIMIT_FOR_IN) ids = null; | public List retrieveCGCIHierarchy(List imageSummaries) throws DSOutOfServiceException, DSAccessException { if (imageSummaries == null) throw new NullPointerException("List of imageSummaries " + "cannot be null"); if (imageSummaries.size() == 0) throw new IllegalArgumentException("List of imageSummaries " + "cannot be of length 0"); Iterator i = imageSummaries.iterator(); ImageSummary is; Map map = new HashMap(); List ids = new ArrayList(); Integer id; while (i.hasNext()) { is = (ImageSummary) i.next(); id = new Integer(is.getID()); map.put(id, is); ids.add(id); } UserCredentials uc = (UserCredentials) registry.lookup(LookupNames.USER_CREDENTIALS); if (ids.size() > DMSAdapter.LIMIT_FOR_IN) ids = null; Criteria c = HierarchyMapper.buildICGHierarchyCriteria(ids, uc.getUserID()); List classifications = (List) gateway.retrieveListSTSData("Classification", c); if (classifications == null) return null; return HierarchyMapper.fillICGHierarchy(classifications, map); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cc61e15d4f5c0f46f93a6f4afe4c8e93e6486041/STSAdapter.java/buggy/SRC/org/openmicroscopy/shoola/env/data/STSAdapter.java |
|
if (classifications == null) return null; | if (classifications == null) return new ArrayList(); | public List retrieveCGCIHierarchy(List imageSummaries) throws DSOutOfServiceException, DSAccessException { if (imageSummaries == null) throw new NullPointerException("List of imageSummaries " + "cannot be null"); if (imageSummaries.size() == 0) throw new IllegalArgumentException("List of imageSummaries " + "cannot be of length 0"); Iterator i = imageSummaries.iterator(); ImageSummary is; Map map = new HashMap(); List ids = new ArrayList(); Integer id; while (i.hasNext()) { is = (ImageSummary) i.next(); id = new Integer(is.getID()); map.put(id, is); ids.add(id); } UserCredentials uc = (UserCredentials) registry.lookup(LookupNames.USER_CREDENTIALS); if (ids.size() > DMSAdapter.LIMIT_FOR_IN) ids = null; Criteria c = HierarchyMapper.buildICGHierarchyCriteria(ids, uc.getUserID()); List classifications = (List) gateway.retrieveListSTSData("Classification", c); if (classifications == null) return null; return HierarchyMapper.fillICGHierarchy(classifications, map); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cc61e15d4f5c0f46f93a6f4afe4c8e93e6486041/STSAdapter.java/buggy/SRC/org/openmicroscopy/shoola/env/data/STSAdapter.java |
public CommandlineParser(Main main, String[] arguments) { | public CommandlineParser(String[] arguments) { | public CommandlineParser(Main main, String[] arguments) { this.arguments = arguments; this.main = main; processArguments(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d38821551a58969cd2593b463d93df5f32bf3c14/CommandlineParser.java/buggy/src/org/jruby/util/CommandlineParser.java |
this.main = main; processArguments(); | public CommandlineParser(Main main, String[] arguments) { this.arguments = arguments; this.main = main; processArguments(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d38821551a58969cd2593b463d93df5f32bf3c14/CommandlineParser.java/buggy/src/org/jruby/util/CommandlineParser.java |
|
main.printUsage(); | shouldPrintUsage = true; | private void processArgument() { String argument = arguments[argumentIndex]; FOR : for (characterIndex = 1; characterIndex < argument.length(); characterIndex++) { switch (argument.charAt(characterIndex)) { case 'h' : main.printUsage(); shouldRunInterpreter = false; break; case 'I' : String s = grabValue(" -I must be followed by a directory name to add to lib path"); String[] ls = s.split(":"); for(int i=0;i<ls.length;i++) { loadPaths.add(ls[i]); } break FOR; case 'r' : requiredLibraries.add(grabValue("-r must be followed by a package to require")); break FOR; case 'e' : inlineScript.append(grabValue(" -e must be followed by an expression to evaluate")); inlineScript.append('\n'); break FOR; case 'b' : benchmarking = true; break; case 'p' : assumePrinting = true; assumeLoop = true; break; case 'O' : objectSpaceEnabled = false; break; case 'C' : compilerEnabled = true; break; case 'n' : assumeLoop = true; break; case 'a' : split = true; break; case 'd' : debug = true; verbose = true; break; case 'l' : processLineEnds = true; break; case 'v' : verbose = true; setShowVersion(true); break; case 'w' : verbose = true; break; case 'K': // FIXME: No argument seems to work for -K in MRI plus this should not // siphon off additional args 'jruby -K ~/scripts/foo'. Also better error // processing. String eArg = grabValue("provide a value for -K"); if ("u".equals(eArg) || "U".equals(eArg) || "UTF8".equals(eArg)) { encoding = "UTF-8"; } break; case '-' : if (argument.equals("--version")) { setShowVersion(true); break FOR; } else if(argument.equals("--debug")) { debug = true; verbose = true; break; } else { if (argument.equals("--")) { // ruby interpreter compatibilty // Usage: ruby [switches] [--] [programfile] [arguments]) break FOR; } } default : throw new MainExitException(1, "unknown option " + argument.charAt(characterIndex)); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d38821551a58969cd2593b463d93df5f32bf3c14/CommandlineParser.java/buggy/src/org/jruby/util/CommandlineParser.java |
private void processArguments() { while (argumentIndex < arguments.length && isInterpreterArgument(arguments[argumentIndex])) { processArgument(); argumentIndex++; } if (! hasInlineScript()) { if (argumentIndex < arguments.length) { setScriptFileName(arguments[argumentIndex]); | public void processArguments(boolean withInterpreterArguments) { if (withInterpreterArguments) { while (argumentIndex < arguments.length && isInterpreterArgument(arguments[argumentIndex])) { processArgument(); | private void processArguments() { while (argumentIndex < arguments.length && isInterpreterArgument(arguments[argumentIndex])) { processArgument(); argumentIndex++; } if (! hasInlineScript()) { if (argumentIndex < arguments.length) { setScriptFileName(arguments[argumentIndex]); //consume the file name argumentIndex++; } } // Remaining arguments are for the script itself scriptArguments = new String[arguments.length - argumentIndex]; System.arraycopy(arguments, argumentIndex, getScriptArguments(), 0, getScriptArguments().length); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d38821551a58969cd2593b463d93df5f32bf3c14/CommandlineParser.java/buggy/src/org/jruby/util/CommandlineParser.java |
private void processArguments() { while (argumentIndex < arguments.length && isInterpreterArgument(arguments[argumentIndex])) { processArgument(); argumentIndex++; } if (! hasInlineScript()) { if (argumentIndex < arguments.length) { setScriptFileName(arguments[argumentIndex]); //consume the file name argumentIndex++; } } // Remaining arguments are for the script itself scriptArguments = new String[arguments.length - argumentIndex]; System.arraycopy(arguments, argumentIndex, getScriptArguments(), 0, getScriptArguments().length); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d38821551a58969cd2593b463d93df5f32bf3c14/CommandlineParser.java/buggy/src/org/jruby/util/CommandlineParser.java |
||
System.err.println ("build: >"); | public void gt() { newData (); _currentData.setType (WikiDataTypes.GT); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/0dd98294a4b60b5be523f4e9a86fbe699f49c0da/DefaultPageBuilder.java/clean/wiki/src/org/tcdi/opensource/wiki/builder/DefaultPageBuilder.java |
|
System.err.println ("build: <"); | public void lt() { newData (); _currentData.setType (WikiDataTypes.LT); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/0dd98294a4b60b5be523f4e9a86fbe699f49c0da/DefaultPageBuilder.java/clean/wiki/src/org/tcdi/opensource/wiki/builder/DefaultPageBuilder.java |
|
StringTokenizer st = new StringTokenizer(plugin, ", ", false); | final StringTokenizer st = new StringTokenizer(plugin, ",", false); | public void loadPlugins() { // Delete all old plugins File[] oldFiles = PLUGINS_DIRECTORY.listFiles(); final int no = oldFiles != null ? oldFiles.length : 0; for (int i = 0; i < no; i++) { File file = oldFiles[i]; if (file.isDirectory()) { // Check to see if it has an associated .jar File jarFile = new File(PLUGINS_DIRECTORY, file.getName() + ".jar"); if (!jarFile.exists()) { uninstall(file); } } } updateClasspath(); // At the moment, the plug list is hardcode internally until I begin // using external property files. All depends on deployment. final URL url = getClass().getClassLoader().getResource("META-INF/plugins.xml"); try { InputStreamReader reader = new InputStreamReader(url.openStream()); loadInternalPlugins(reader); } catch (IOException e) { Log.error("Could not load plugins.xml file."); } // Load extension plugins loadPublicPlugins(); // For development purposes, load the plugin specified by -Dplugin=... String plugin = System.getProperty("plugin"); if (plugin != null) { StringTokenizer st = new StringTokenizer(plugin, ", ", false); while (st.hasMoreTokens()) { String token = st.nextToken(); File pluginXML = new File(token); loadPublicPlugin(pluginXML.getParentFile()); } } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/91bb3d356ac7e36b1815118359b4af3a4c14abed/PluginManager.java/clean/src/java/org/jivesoftware/spark/PluginManager.java |
return new RubyFixnum(ruby, 0); | return RubyFixnum.newFixnum(ruby, 0); | public static RubyObject chdir(Ruby ruby, RubyObject recv, RubyString path) { System.setProperty("user.dir", getDir(ruby, path.toString()).toString()); return new RubyFixnum(ruby, 0); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/afb67c3765f6466c476317e6bb0c72f6593f05f3/RubyDir.java/buggy/org/jruby/RubyDir.java |
getRuby().yield(new RubyString(getRuby(),contents[i])); | getRuby().yield(RubyString.newString(getRuby(), contents[i])); | public RubyObject each() { String[] contents = snapshot; for (int i=0; i<contents.length; i++) { getRuby().yield(new RubyString(getRuby(),contents[i])); } return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/afb67c3765f6466c476317e6bb0c72f6593f05f3/RubyDir.java/buggy/org/jruby/RubyDir.java |
return new RubyBoolean(ruby, newDir.mkdir()); | return RubyBoolean.newBoolean(ruby, newDir.mkdir()); | public static RubyObject mkdir(Ruby ruby, RubyObject recv, RubyObject[] args) { if (args.length < 1) { throw new ArgumentError(ruby, args.length, 1); } if (args.length > 2) { throw new ArgumentError(ruby, args.length, 2); } args[0].checkSafeString(); String path = args[0].toString(); File newDir = new File(path); if (newDir.exists()) { throw new IOError(ruby, path + " already exists"); } return new RubyBoolean(ruby, newDir.mkdir()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/afb67c3765f6466c476317e6bb0c72f6593f05f3/RubyDir.java/buggy/org/jruby/RubyDir.java |
return new RubyFixnum(getRuby(), pos); | return RubyFixnum.newFixnum(getRuby(), pos); | public RubyObject rewind() { pos = 0; return new RubyFixnum(getRuby(), pos); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/afb67c3765f6466c476317e6bb0c72f6593f05f3/RubyDir.java/buggy/org/jruby/RubyDir.java |
return new RubyFixnum(ruby, 0); | return RubyFixnum.newFixnum(ruby, 0); | public static RubyObject rmdir(Ruby ruby, RubyObject recv, RubyString path) { new File(path.toString()).delete(); return new RubyFixnum(ruby, 0); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/afb67c3765f6466c476317e6bb0c72f6593f05f3/RubyDir.java/buggy/org/jruby/RubyDir.java |
return new RubyFixnum(getRuby(), pos); | return RubyFixnum.newFixnum(getRuby(), pos); | public RubyInteger tell() { return new RubyFixnum(getRuby(), pos); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/afb67c3765f6466c476317e6bb0c72f6593f05f3/RubyDir.java/buggy/org/jruby/RubyDir.java |
if (runtime.getRubyClass() == null) { | if (runtime.getRubyClass().isNil()) { | public void visitClassNode(ClassNode iVisited) { if (runtime.getRubyClass() == null) { throw new TypeError(runtime, "no outer class/module"); } RubyClass superClass = null; if (iVisited.getSuperNode() != null) { try { superClass = (RubyClass) eval(iVisited.getSuperNode()); } catch (Exception excptn) { if (iVisited.getSuperNode() instanceof Colon2Node) { throw new TypeError(runtime, "undefined superclass '" + ((Colon2Node) iVisited.getSuperNode()).getName() + "'"); } else if (iVisited.getSuperNode() instanceof ConstNode) { throw new TypeError(runtime, "undefined superclass '" + ((ConstNode) iVisited.getSuperNode()).getName() + "'"); } else { throw new TypeError(runtime, "undefined superclass"); } } if (superClass != null && superClass instanceof MetaClass) { throw new TypeError(runtime, "can't make subclass of virtual class"); } } RubyClass rubyClass = null; // if ((ruby_class == getRuby().getObjectClass()) && rb_autoload_defined(node.nd_cname())) { // rb_autoload_load(node.nd_cname()); // } if (runtime.getRubyClass().isConstantDefined(iVisited.getClassName())) { IRubyObject type = runtime.getRubyClass().getConstant(iVisited.getClassName()); if (!(type instanceof RubyClass)) { throw new TypeError(runtime, iVisited.getClassName() + " is not a class"); } else { rubyClass = (RubyClass)type; } if (superClass != null && rubyClass.getSuperClass().getRealClass() != superClass) { // FIXME add defineClassId again. rubyClass = runtime.defineClass(iVisited.getClassName(), superClass); rubyClass.setClassPath(runtime.getRubyClass(), iVisited.getClassName()); runtime.getRubyClass().setConstant(iVisited.getClassName(), rubyClass); } else { if (runtime.getSafeLevel() >= 4) { throw new SecurityError(runtime, "extending class prohibited"); } // rb_clear_cache(); } } else { if (superClass == null) { superClass = runtime.getClasses().getObjectClass(); } // FIXME see above rubyClass = runtime.defineClass(iVisited.getClassName(), superClass); runtime.getRubyClass().setConstant(iVisited.getClassName(), rubyClass); rubyClass.setClassPath(runtime.getRubyClass(), iVisited.getClassName()); } if (runtime.getWrapper() != null) { rubyClass.extendObject(runtime.getWrapper()); rubyClass.includeModule(runtime.getWrapper()); } evalClassDefinitionBody(iVisited.getBodyNode(), rubyClass); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/fffe7aa25510c5fa1f975232bea0ef0fd24762d7/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java |
return; | public static void main(String arg[]) { // Build a context WebMacro wm = null; Context context = null; String encoding = null; try { wm = new WM(); context = wm.getContext(); Object names[] = {"prop"}; context.setProperty(names, "Example property"); encoding = wm.getConfig(WMConstants.TEMPLATE_INPUT_ENCODING); } catch (Exception e) { e.printStackTrace(); } try { /* HashMap hm = new HashMap(); hm.put("one", "the first"); hm.put("two", "the second"); hm.put("three", "the third"); context.setBean(hm); */ context.put("helloworld", "Hello World"); context.put("hello", "Hello"); context.put("file", "include.txt"); context.put("today", new Date()); TestObject[] fruits = {new TestObject("apple", false), new TestObject("lemon", true), new TestObject("pear", false), new TestObject("orange", true), new TestObject("watermelon", false), new TestObject("peach", false), new TestObject("lime", true)}; SelectList sl = new SelectList(fruits, 3); context.put("sl-fruits", sl); context.put("fruits", fruits); context.put("flipper", new TestObject("flip", false)); System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); Template t1 = new StreamTemplate(wm.getBroker(), new InputStreamReader(System.in)); t1.parse(); FastWriter w = FastWriter.getInstance(wm.getBroker(), encoding); t1.write(w, context); System.out.println("*** RESULT ***"); w.writeTo(System.out); w.close(); context.clear(); System.out.println("*** DONE ***"); //System.out.println(result); } catch (Exception e) { e.printStackTrace(); } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/8f5880751893a7e5dd9da25d036747a39c9b25b5/StreamTemplate.java/clean/webmacro/src/org/webmacro/engine/StreamTemplate.java |
|
public RubyClass newSubClass(String name, RubyModule parent) { return new ArrayMetaClass(name, this, parent); | public RubyClass newSubClass(String name, SinglyLinkedList parentCRef) { return new ArrayMetaClass(name, this, parentCRef); | public RubyClass newSubClass(String name, RubyModule parent) { return new ArrayMetaClass(name, this, parent); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ArrayMetaClass.java/clean/src/org/jruby/runtime/builtin/meta/ArrayMetaClass.java |
return new IntegerDefinition(ruby).getType(); | RubyClass result = ruby.defineClass("Integer", ruby.getClasses().getNumericClass()); CallbackFactory callbackFactory = ruby.callbackFactory(); result.includeModule(ruby.getClasses().getEnumerableModule()); result.defineMethod("chr", callbackFactory.getMethod(RubyInteger.class, "chr")); result.defineMethod("downto", callbackFactory.getMethod(RubyInteger.class, "downto", RubyNumeric.class)); result.defineMethod("integer?", callbackFactory.getMethod(RubyInteger.class, "int_p")); result.defineMethod("next", callbackFactory.getMethod(RubyInteger.class, "next")); result.defineMethod("step", callbackFactory.getMethod(RubyInteger.class, "step", RubyNumeric.class, RubyNumeric.class)); result.defineMethod("succ", callbackFactory.getMethod(RubyInteger.class, "next")); result.defineMethod("times", callbackFactory.getMethod(RubyInteger.class, "times")); result.defineMethod("upto", callbackFactory.getMethod(RubyInteger.class, "upto", RubyNumeric.class)); result.getMetaClass().undefineMethod("new"); result.defineSingletonMethod("induced_from", callbackFactory.getSingletonMethod(RubyInteger.class, "induced_from", IRubyObject.class)); return result; | public static RubyClass createIntegerClass(Ruby ruby) { return new IntegerDefinition(ruby).getType(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyInteger.java/buggy/src/org/jruby/RubyInteger.java |
public IRubyObject downto(IRubyObject val) { RubyNumeric to = numericValue(val); | public IRubyObject downto(RubyNumeric to) { | public IRubyObject downto(IRubyObject val) { RubyNumeric to = numericValue(val); RubyNumeric i = this; while (true) { if (i.callMethod("<", to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("-", RubyFixnum.one(getRuntime())); } return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyInteger.java/buggy/src/org/jruby/RubyInteger.java |
public IRubyObject step(IRubyObject toVal, IRubyObject stepVal) { RubyNumeric to = numericValue(toVal); RubyNumeric step = numericValue(stepVal); | public IRubyObject step(RubyNumeric to, RubyNumeric step) { | public IRubyObject step(IRubyObject toVal, IRubyObject stepVal) { RubyNumeric to = numericValue(toVal); RubyNumeric step = numericValue(stepVal); RubyNumeric i = this; if (step.getLongValue() == 0) { throw new ArgumentError(getRuntime(), "step cannot be 0"); } String cmp = "<"; if (((RubyBoolean) step.callMethod("<", RubyFixnum.newFixnum(getRuntime(), 0))).isFalse()) { cmp = ">"; } while (true) { if (i.callMethod(cmp, to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("+", step); } return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyInteger.java/buggy/src/org/jruby/RubyInteger.java |
public IRubyObject upto(IRubyObject val) { RubyNumeric to = numericValue(val); | public IRubyObject upto(RubyNumeric to) { | public IRubyObject upto(IRubyObject val) { RubyNumeric to = numericValue(val); RubyNumeric i = this; while (true) { if (i.callMethod(">", to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("+", RubyFixnum.one(getRuntime())); } return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyInteger.java/buggy/src/org/jruby/RubyInteger.java |
setSize(EDITOR_WIDTH, EDITOR_HEIGHT); | Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); int width = 8*(screenSize.width/10); int height = 8*(screenSize.height/10); setSize(width, height); | public void setOnScreen() { setSize(EDITOR_WIDTH, EDITOR_HEIGHT); UIUtilities.centerAndShow(this); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/162318441573d325d081c0b2cc26a9faadc31e20/DataManagerUIF.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/DataManagerUIF.java |
if (holder instanceof Note) parent = (Note) holder; | this.holder = holder; | public Note(String name, NoteHolder holder, String text) { this.name = name; if (holder instanceof Note) parent = (Note) holder; this.notes = new LinkedList<Note>(); this.text = text; holder.addNote(this); } | 57508 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57508/cc213bec5ffa0d2acf674b81cbd7e8b0d5952587/Note.java/clean/trunk/src/de/berlios/koalanotes/data/Note.java |
return RubyFloat.m_newFloat(getRuby(), getDoubleValue() / getDoubleValue()); | return RubyFloat.m_newFloat(getRuby(), getDoubleValue() / other.getDoubleValue()); | public RubyNumeric op_div(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() / getDoubleValue()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/09d14a481cf7e28332c61c038c7d4b468854d38d/RubyFloat.java/buggy/org/jruby/RubyFloat.java |
return RubyFloat.m_newFloat(getRuby(), getDoubleValue() - getDoubleValue()); | return RubyFloat.m_newFloat(getRuby(), getDoubleValue() - other.getDoubleValue()); | public RubyNumeric op_minus(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() - getDoubleValue()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/09d14a481cf7e28332c61c038c7d4b468854d38d/RubyFloat.java/buggy/org/jruby/RubyFloat.java |
return RubyFloat.m_newFloat(getRuby(), getDoubleValue() % getDoubleValue()); | return RubyFloat.m_newFloat(getRuby(), getDoubleValue() % other.getDoubleValue()); | public RubyNumeric op_mod(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() % getDoubleValue()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/09d14a481cf7e28332c61c038c7d4b468854d38d/RubyFloat.java/buggy/org/jruby/RubyFloat.java |
return RubyFloat.m_newFloat(getRuby(), getDoubleValue() * getDoubleValue()); | return RubyFloat.m_newFloat(getRuby(), getDoubleValue() * other.getDoubleValue()); | public RubyNumeric op_mul(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() * getDoubleValue()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/09d14a481cf7e28332c61c038c7d4b468854d38d/RubyFloat.java/buggy/org/jruby/RubyFloat.java |
return RubyFloat.m_newFloat(getRuby(), getDoubleValue() + getDoubleValue()); | return RubyFloat.m_newFloat(getRuby(), getDoubleValue() + other.getDoubleValue()); | public RubyNumeric op_plus(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() + getDoubleValue()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/09d14a481cf7e28332c61c038c7d4b468854d38d/RubyFloat.java/buggy/org/jruby/RubyFloat.java |
return RubyFloat.m_newFloat(getRuby(), Math.pow(getDoubleValue(), getDoubleValue())); | return RubyFloat.m_newFloat(getRuby(), Math.pow(getDoubleValue(), other.getDoubleValue())); | public RubyNumeric op_pow(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), Math.pow(getDoubleValue(), getDoubleValue())); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/09d14a481cf7e28332c61c038c7d4b468854d38d/RubyFloat.java/buggy/org/jruby/RubyFloat.java |
_levels.put(keys[i], levels.getSetting(keys[i])); | _levels.put(keys[i], new Integer(LogSystem.getLevel(levels.getSetting(keys[i])))); | public LogFile(Settings s) throws FileNotFoundException { this(s.getSetting("LogFile")); _trace = s.getBooleanSetting("LogTraceExceptions"); String slevel = s.getSetting("LogLevel", "NOTICE"); _defaultLevel = LogSystem.getLevel(slevel); String format = s.getSetting("LogFormat"); if (format != null) { _mf = new MessageFormat(format); } Settings levels = s.getSubSettings("LogLevel"); String[] keys = levels.keys(); for (int i = 0; i < keys.length; i++) { _levels.put(keys[i], levels.getSetting(keys[i])); } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/be867436488369906604fada27780e8bfab0e962/LogFile.java/buggy/webmacro/src/org/webmacro/util/LogFile.java |
try { b = Expression.isTrue(conditions[i].evaluate(context)); } catch (Exception e) { String warning = "#if: Error evaluating condition: " + e; writeWarning(warning, context, out); } | b = Expression.isTrue(conditions[i].evaluate(context)); | public void write(FastWriter out, Context context) throws PropertyException, IOException { for (int i = 0; i < nConditions; i++) { boolean b = false; try { b = Expression.isTrue(conditions[i].evaluate(context)); } catch (Exception e) { String warning = "#if: Error evaluating condition: " + e; writeWarning(warning, context, out); } if (b) { blocks[i].write(out, context); return; } } // If we fell out, we ran out of conditions, try the else block if any if (elseBlock != null) elseBlock.write(out, context); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/2a732af6347caef331bbf5ad7353790dce990292/IfDirective.java/buggy/webmacro/src/org/webmacro/directive/IfDirective.java |
.showErrorMessage("You have already created a user called \'NewUser\'." + "This is the user you should rename/modify."); | .showErrorMessage("You have already created a user called \'NewUser\'." + "This is the user you should rename/modify."); | void addNewUser() { if (model.findUserByName("NewUser")) { view .showErrorMessage("You have already created a user called \'NewUser\'." + "This is the user you should rename/modify."); return; } try { Experimenter user = model.createNewUser(); model.addUser(user); } catch (Exception e) { handleException(e, "Add New User to server"); } view.clearForm(); view.setToTop(); view.refresh(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fd4505692e138e4db4ee312f68ae3142987af347/UsersTabController.java/clean/components/tools/admin/src/adminTool/usersPanel/UsersTabController.java |
void changePassword() { String user = view.getSelectedUser(); if (user == null) { view.showErrorMessage("You must select a user before you can" + " change their password."); return; } PasswordDialog passwordDialog = new PasswordDialog(); Point loc = view.getLocationOnScreen(); int x = loc.x + view.getWidth() / 2 - passwordDialog.getWidth() / 2; int y = loc.y + view.getHeight() / 2 - passwordDialog.getHeight() / 2; passwordDialog.setLocation(x, y); passwordDialog.setVisible(true); if (passwordDialog.OKSelected()) { model.setCurrentUser(user); try { model.changePassword(passwordDialog.getPassword()); } catch (Exception e) { handleException(e, "Change User password"); } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fd4505692e138e4db4ee312f68ae3142987af347/UsersTabController.java/clean/components/tools/admin/src/adminTool/usersPanel/UsersTabController.java |
||
if (begLen != null) { | if (begLen == null) { | public IRubyObject aref(IRubyObject[] args) { int argc = argCount(args, 1, 2); if (argc == 2) { long beg = RubyNumeric.fix2long(args[0]); long len = RubyNumeric.fix2long(args[1]); if (beg < 0) { beg += getSize(); } return subseq(beg, len); } if (args[0] instanceof RubyFixnum) { return group(RubyNumeric.fix2long(args[0])); } if (args[0] instanceof RubyBignum) { throw new IndexError(getRuntime(), "index too big"); } if (args[0] instanceof RubyRange) { long[] begLen = ((RubyRange) args[0]).getBeginLength(getSize(), true, false); if (begLen != null) { return getRuntime().getNil(); } return subseq(begLen[0], begLen[1]); } return group(RubyNumeric.num2long(args[0])); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a078f9690f15014ec8b7b2fe3682e7cfa9301e95/RubyMatchData.java/clean/src/org/jruby/RubyMatchData.java |
return RubyString.newString(getRuntime(), str); | RubyString frozenString = RubyString.newString(getRuntime(), str); frozenString.freeze(); return frozenString; | public RubyString string() { return RubyString.newString(getRuntime(), str); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a078f9690f15014ec8b7b2fe3682e7cfa9301e95/RubyMatchData.java/clean/src/org/jruby/RubyMatchData.java |
public RubyArray subseq(long beg, long len) { if (beg > getSize()) { return RubyArray.nilArray(getRuntime()); } if (beg < 0 || len < 0) { return RubyArray.nilArray(getRuntime()); } if (beg + len > getSize()) { len = getSize() - beg; } if (len < 0) { len = 0; } if (len == 0) { return RubyArray.newArray(getRuntime()); } RubyArray arr = RubyArray.newArray(getRuntime(), 0); for (long i = beg; i < beg + len; i++) { arr.append(group(i)); } return arr; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a078f9690f15014ec8b7b2fe3682e7cfa9301e95/RubyMatchData.java/clean/src/org/jruby/RubyMatchData.java |
||
Image m = new Image(new Long(annotatedObject.getId()), false); | Image m = new Image(annotatedObject.getId(), false); | public static IObject createAnnotation(IObject annotatedObject, AnnotationData data) { if (annotatedObject instanceof Dataset) { Dataset m = (Dataset) annotatedObject; DatasetAnnotation annotation = new DatasetAnnotation(); annotation.setContent(data.getText()); annotation.setDataset(m); return annotation; } else if (annotatedObject instanceof ImageData) { Image m = new Image(new Long(annotatedObject.getId()), false); ImageAnnotation annotation = new ImageAnnotation(); annotation.setContent(data.getText()); annotation.setImage(m); return annotation; } throw new IllegalArgumentException("DataObject cannot be annotated."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9666179cb1142b20e8f56d7f261dd1a9c4d2a5ba/ModelMapper.java/clean/SRC/org/openmicroscopy/shoola/env/data/util/ModelMapper.java |
dialog.setSize(400, 225); | dialog.setSize(400, 250); | public void invoke(final String jid) { this.jid = jid; final Roster roster = SparkManager.getConnection().getRoster(); // If User is already in roster, do not show. RosterEntry entry = roster.getEntry(jid); if (entry != null && entry.getType() == RosterPacket.ItemType.TO) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); return; } String message = Res.getString("message.approve.subscription", UserManager.unescapeJID(jid)); Transport transport = TransportUtils.getTransport(StringUtils.parseServer(jid)); Icon icon = null; if (transport != null) { icon = transport.getIcon(); } messageLabel = new TitlePanel("", message, icon, true); // Add Message Label mainPanel.add(messageLabel, new GridBagConstraints(0, 0, 6, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); String username = StringUtils.parseName(UserManager.unescapeJID(jid)); usernameLabelValue.setText(UserManager.unescapeJID(jid)); nicknameField.setText(username); acceptButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (!rosterBox.isSelected()) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); dialog.dispose(); return; } boolean addEntry = addEntry(); if (addEntry) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); } else { dialog.dispose(); } } }); denyButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Send subscribed Presence response = new Presence(Presence.Type.unsubscribe); response.setTo(jid); SparkManager.getConnection().sendPacket(response); dialog.dispose(); } }); viewInfoButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { SparkManager.getVCardManager().viewProfile(jid, mainPanel); } }); dialog = new JFrame("Subscription Request"); dialog.setIconImage(SparkRes.getImageIcon(SparkRes.MAIN_IMAGE).getImage()); dialog.getContentPane().add(mainPanel); dialog.pack(); dialog.setSize(400, 225); dialog.setLocationRelativeTo(SparkManager.getMainWindow()); if (SparkManager.getMainWindow().isFocused()) { dialog.setState(Frame.NORMAL); dialog.setVisible(true); } else if (!SparkManager.getMainWindow().isVisible() || !SparkManager.getMainWindow().isFocused()) { dialog.setFocusableWindowState(false); dialog.setState(Frame.ICONIFIED); dialog.setVisible(true); SparkManager.getAlertManager().flashWindowStopOnFocus(dialog); dialog.setFocusableWindowState(true); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/6c0051f92a99737d42226d1e696824d21ec0dcd2/SubscriptionDialog.java/buggy/src/java/org/jivesoftware/spark/ui/SubscriptionDialog.java |
if (len != otherLen) { return (len > otherLen) ? RubyFixnum.one(getRuntime()) : RubyFixnum.minus_one(getRuntime()); } | int minCommon = Math.min(len, otherLen); | public IRubyObject op_cmp(IRubyObject other) { RubyArray ary = other.convertToArray(); int otherLen = ary.getLength(); int len = getLength(); if (len != otherLen) { return (len > otherLen) ? RubyFixnum.one(getRuntime()) : RubyFixnum.minus_one(getRuntime()); } ThreadContext context = getRuntime().getCurrentContext(); for (int i = 0; i < len; i++) { IRubyObject result = entry(i).callMethod(context, "<=>", ary.entry(i)); if (result.isNil() || ((RubyFixnum)result).getLongValue() != 0) { return result; } } return RubyFixnum.zero(getRuntime()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/c5efec819547c1904f24520251cba220ba8d4a25/RubyArray.java/buggy/src/org/jruby/RubyArray.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.