rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
return hierarchyMembers(hierarchy, evaluator, true); | return hierarchyMembers(hierarchy, evaluator, false); | public List evaluateList(Evaluator evaluator) { Hierarchy hierarchy = hierarchyCalc.evaluateHierarchy(evaluator); return hierarchyMembers(hierarchy, evaluator, true); } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/5aca340e1cdbb6179077d96383341db48f0997be/BuiltinFunTable.java/buggy/src/main/mondrian/olap/fun/BuiltinFunTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
5397,
1071,
987,
5956,
682,
12,
15876,
18256,
13,
288,
13491,
670,
6000,
9360,
273,
27573,
9360,
25779,
18,
21024,
12074,
12,
14168,
639,
1769,
13491,
327,
9360,
6918,
12,
17937,
16,
18256,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
5397,
1071,
987,
5956,
682,
12,
15876,
18256,
13,
288,
13491,
670,
6000,
9360,
273,
27573,
9360,
25779,
18,
21024,
12074,
12,
14168,
639,
1769,
13491,
327,
9360,
6918,
12,
17937,
16,
18256,
16,
... |
Set possibleFutures = (Set)modMap.get(historyContext); | Set possibleFutures = (Set)modNonterminalMap.get(historyContext); | private Set possibleFutures(ModifierEvent modEvent, boolean side) { ProbabilityStructure modPS = modNonterminalPS; int lastLevel = modNonterminalPSLastLevel; boolean onLeft = side == Constants.LEFT; Map modMap = (onLeft ? leftModNonterminalMap : rightModNonterminalMap); Event historyContext = modPS.getHistory(modEvent, lastLevel); Set possibleFutures = (Set)modMap.get(historyContext); return possibleFutures; } | 5472 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5472/222d9d98350c0c528cfaeca7dc6a6e4449e376e2/Decoder.java/buggy/src/danbikel/parser/Decoder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1000,
3323,
28732,
12,
9829,
1133,
681,
1133,
16,
1250,
4889,
13,
288,
565,
14610,
2967,
6999,
681,
5857,
273,
681,
3989,
15979,
5857,
31,
565,
509,
1142,
2355,
273,
681,
3989,
1597... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1000,
3323,
28732,
12,
9829,
1133,
681,
1133,
16,
1250,
4889,
13,
288,
565,
14610,
2967,
6999,
681,
5857,
273,
681,
3989,
15979,
5857,
31,
565,
509,
1142,
2355,
273,
681,
3989,
1597... |
public boolean hasNext(); | boolean hasNext(); | public boolean hasNext(); | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/b37b39a8e8ee762cc74efa7e8d06368d13147150/Iterator.java/buggy/libraries/javalib/java/util/Iterator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
4564,
5621,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
4564,
5621,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
SwingUtilities.invokeLater(new Runnable() { public void run() { metadataManagerView.setVisible(true); } }); | metadataManagerView.setVisible(true); | public void actionPerformed(ActionEvent actionEvent) { System.out.println("Metadata Manager"); if (metadataManagerModel == null) { metadataManagerModel = new MetadataManager(model.getDatabase()); metadataManagerView = new MetadataManagerView(metadataManagerModel, view, true); metadataManagerCtrl = new MetadataManagerCtrl(metadataManagerModel,metadataManagerView); metadataManagerModel.addObserver(managerBridge); } Task task = metadataManagerModel.searchMetadata(true); new DefaultProgressBar(task, view, true) { @Override public void afterStopping() { if (! metadataManagerModel.isFinishedTask()) return; metadataManagerModel.setInfoFinishedTask(false); metadataManagerCtrl.reloadData(1, MetadataManager.DEFAULT_DISPLAY_ROWS); SwingUtilities.invokeLater(new Runnable() { public void run() { metadataManagerView.setVisible(true); } }); } }; task.start(); } | 57211 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57211/c1954bf761e06c32e407394b3900d7feaa192596/AppCoreCtrl.java/buggy/trunk/src/net/sf/plantlore/client/AppCoreCtrl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
26100,
12,
1803,
1133,
1301,
1133,
13,
288,
1082,
202,
3163,
18,
659,
18,
8222,
2932,
2277,
8558,
8863,
1082,
202,
430,
261,
4165,
1318,
1488,
422,
446,
13,
288,
9506,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
26100,
12,
1803,
1133,
1301,
1133,
13,
288,
1082,
202,
3163,
18,
659,
18,
8222,
2932,
2277,
8558,
8863,
1082,
202,
430,
261,
4165,
1318,
1488,
422,
446,
13,
288,
9506,
2... |
return s.toString(); } | return s.toString(); } | public String toString() { ElectronContainer ec; StringBuffer s = new StringBuffer(); s.append("LonePair("); s.append(this.hashCode() + ", "); s.append(atom.hashCode()); s.append(")"); return s.toString(); } | 45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/b164fe9060b31408afc2f0f9b64536bf5c09120d/LonePair.java/clean/src/org/openscience/cdk/LonePair.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1762,
1435,
288,
202,
202,
28621,
2170,
6557,
31,
202,
202,
780,
1892,
272,
273,
394,
6674,
5621,
3639,
272,
18,
6923,
2932,
48,
476,
4154,
2932,
1769,
3639,
272,
18,
692... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1762,
1435,
288,
202,
202,
28621,
2170,
6557,
31,
202,
202,
780,
1892,
272,
273,
394,
6674,
5621,
3639,
272,
18,
6923,
2932,
48,
476,
4154,
2932,
1769,
3639,
272,
18,
692... |
public void onClassFeature(JavaFeature jf, String doccomment) | public void onClassFeature(final JavaFeature jf, final String doccomment) | public void onClassFeature(JavaFeature jf, String doccomment) throws IOException, InjectorParseException { if(!clean && !class_state.javaclass.isInterface()) { if(jf instanceof JavaAttribute && !Modifier.isFinal(jf.getModifiers()) && !discardnextfeature) class_state.observedFeatures.add(jf); if(jf instanceof JavaBehaviour && !jf.isStatic() && !jf.isAbstract() && !discardnextfeature) { if(delayinsertions) class_state.behaviours.add(jf); else writeWrapper((JavaBehaviour)jf); //if(!"void".equals(jf.getType())) //observedFeatures.add(jf); } String element_type=null; String key_type=null; if(doccomment!=null) { element_type=Injector.findDocTag(doccomment, "element-type"); key_type= Injector.findDocTag(doccomment, "key-type"); } boolean notYetAddedToTypedAttributes=true; if(element_type!=null) { if(jf instanceof JavaAttribute) { ((JavaAttribute)jf).setElementType(element_type); class_state.typedAttributes.add(jf); notYetAddedToTypedAttributes=false; } else throw new InjectorParseException("encountered @element-type tag on non-attribute"); } if(key_type!=null) { if(jf instanceof JavaAttribute) { ((JavaAttribute)jf).setKeyType(key_type); if(notYetAddedToTypedAttributes) class_state.typedAttributes.add(jf); } else throw new InjectorParseException("encountered @key-type tag on non-attribute"); } } discardnextfeature=false; } | 6381 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6381/5a374a70efb240b5ee83887f2b52ed1688cea857/Instrumentor.java/clean/ocl/src/tudresden/ocl/injection/Instrumentor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
603,
797,
4595,
12,
5852,
4595,
525,
74,
16,
514,
997,
3469,
13,
202,
15069,
1860,
16,
21286,
13047,
202,
95,
202,
202,
430,
12,
5,
6200,
597,
401,
1106,
67,
2019,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
603,
797,
4595,
12,
5852,
4595,
525,
74,
16,
514,
997,
3469,
13,
202,
15069,
1860,
16,
21286,
13047,
202,
95,
202,
202,
430,
12,
5,
6200,
597,
401,
1106,
67,
2019,
18,
... |
List history = GrouperShell.getHistory(i); if (idx == -2) { idx = history.size() - 2; | GrouperShell.setOurCommand(i, false); Object obj = i.eval(cmd); if (!GrouperShell.isDevel(i)) { p.pp(i, obj); | protected static boolean eval(Interpreter i, int idx) throws GrouperShellException { try { List history = GrouperShell.getHistory(i); // An ugly way of getting the last command if (idx == -2) { idx = history.size() - 2; } String cmd = (String) history.get(idx); i.eval(cmd); return true; } catch (ArrayIndexOutOfBoundsException eAIOOB) { GrouperShell.error(i, eAIOOB, E.OUTOFBOUNDS); } catch (bsh.EvalError eBEE) { GrouperShell.error(i, eBEE); } catch (IndexOutOfBoundsException eIOOB) { GrouperShell.error(i, eIOOB, E.OUTOFBOUNDS); } return false; } // protected static boolean eval(i, idx) | 5235 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5235/de1486c4280090d4759183a60b6effca39dc601d/ShellHelper.java/clean/grouper/contrib/cdg/src/cdg/com/devclue/grouper/shell/ShellHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
760,
1250,
5302,
12,
30010,
277,
16,
509,
2067,
13,
377,
1216,
225,
3756,
264,
13220,
503,
225,
288,
565,
775,
288,
1377,
987,
565,
4927,
273,
3756,
264,
13220,
18,
588,
5623,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
760,
1250,
5302,
12,
30010,
277,
16,
509,
2067,
13,
377,
1216,
225,
3756,
264,
13220,
503,
225,
288,
565,
775,
288,
1377,
987,
565,
4927,
273,
3756,
264,
13220,
18,
588,
5623,
12,... |
AST __t103 = _t; | AST __t105 = _t; | public final Expression expr(AST _t, PathExpr path ) throws RecognitionException, PermissionDeniedException,EXistException,XPathException { Expression step; org.exist.xquery.parser.XQueryAST expr_AST_in = (_t == ASTNULL) ? null : (org.exist.xquery.parser.XQueryAST)_t; org.exist.xquery.parser.XQueryAST c = null; org.exist.xquery.parser.XQueryAST astIf = null; org.exist.xquery.parser.XQueryAST someVarName = null; org.exist.xquery.parser.XQueryAST everyVarName = null; org.exist.xquery.parser.XQueryAST r = null; org.exist.xquery.parser.XQueryAST f = null; org.exist.xquery.parser.XQueryAST varName = null; org.exist.xquery.parser.XQueryAST posVar = null; org.exist.xquery.parser.XQueryAST l = null; org.exist.xquery.parser.XQueryAST letVarName = null; org.exist.xquery.parser.XQueryAST w = null; org.exist.xquery.parser.XQueryAST collURI = null; step= null; if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_castable: case LITERAL_cast: { step=typeCastExpr(_t,path); _t = _retTree; break; } case COMMA: { AST __t59 = _t; c = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,COMMA); _t = _t.getFirstChild(); PathExpr left= new PathExpr(context); PathExpr right= new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; SequenceConstructor sc= new SequenceConstructor(context); sc.setASTNode(c); sc.addPath(left); sc.addPath(right); path.addPath(sc); step = sc; _t = __t59; _t = _t.getNextSibling(); break; } case LITERAL_if: { AST __t60 = _t; astIf = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_if); _t = _t.getFirstChild(); PathExpr testExpr= new PathExpr(context); PathExpr thenExpr= new PathExpr(context); PathExpr elseExpr= new PathExpr(context); step=expr(_t,testExpr); _t = _retTree; step=expr(_t,thenExpr); _t = _retTree; step=expr(_t,elseExpr); _t = _retTree; ConditionalExpression cond= new ConditionalExpression(context, testExpr, thenExpr, elseExpr); cond.setASTNode(astIf); path.add(cond); step = cond; _t = __t60; _t = _t.getNextSibling(); break; } case LITERAL_some: { AST __t61 = _t; org.exist.xquery.parser.XQueryAST tmp3_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_some); _t = _t.getFirstChild(); List clauses= new ArrayList(); PathExpr satisfiesExpr = new PathExpr(context); { _loop66: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==VARIABLE_BINDING)) { AST __t63 = _t; someVarName = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,VARIABLE_BINDING); _t = _t.getFirstChild(); ForLetClause clause= new ForLetClause(); PathExpr inputSequence = new PathExpr(context); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_as: { AST __t65 = _t; org.exist.xquery.parser.XQueryAST tmp4_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_as); _t = _t.getFirstChild(); sequenceType(_t,clause.sequenceType); _t = _retTree; _t = __t65; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,inputSequence); _t = _retTree; clause.varName= someVarName.getText(); clause.inputSequence= inputSequence; clauses.add(clause); _t = __t63; _t = _t.getNextSibling(); } else { break _loop66; } } while (true); } step=expr(_t,satisfiesExpr); _t = _retTree; Expression action = satisfiesExpr; for (int i= clauses.size() - 1; i >= 0; i--) { ForLetClause clause= (ForLetClause) clauses.get(i); BindingExpression expr = new QuantifiedExpression(context, QuantifiedExpression.SOME); expr.setVariable(clause.varName); expr.setSequenceType(clause.sequenceType); expr.setInputSequence(clause.inputSequence); expr.setReturnExpression(action); satisfiesExpr= null; action= expr; } path.add(action); step = action; _t = __t61; _t = _t.getNextSibling(); break; } case LITERAL_every: { AST __t67 = _t; org.exist.xquery.parser.XQueryAST tmp5_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_every); _t = _t.getFirstChild(); List clauses= new ArrayList(); PathExpr satisfiesExpr = new PathExpr(context); { _loop72: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==VARIABLE_BINDING)) { AST __t69 = _t; everyVarName = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,VARIABLE_BINDING); _t = _t.getFirstChild(); ForLetClause clause= new ForLetClause(); PathExpr inputSequence = new PathExpr(context); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_as: { AST __t71 = _t; org.exist.xquery.parser.XQueryAST tmp6_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_as); _t = _t.getFirstChild(); sequenceType(_t,clause.sequenceType); _t = _retTree; _t = __t71; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,inputSequence); _t = _retTree; clause.varName= everyVarName.getText(); clause.inputSequence= inputSequence; clauses.add(clause); _t = __t69; _t = _t.getNextSibling(); } else { break _loop72; } } while (true); } step=expr(_t,satisfiesExpr); _t = _retTree; Expression action = satisfiesExpr; for (int i= clauses.size() - 1; i >= 0; i--) { ForLetClause clause= (ForLetClause) clauses.get(i); BindingExpression expr = new QuantifiedExpression(context, QuantifiedExpression.EVERY); expr.setVariable(clause.varName); expr.setSequenceType(clause.sequenceType); expr.setInputSequence(clause.inputSequence); expr.setReturnExpression(action); satisfiesExpr= null; action= expr; } path.add(action); step = action; _t = __t67; _t = _t.getNextSibling(); break; } case LITERAL_return: { AST __t73 = _t; r = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_return); _t = _t.getFirstChild(); List clauses= new ArrayList(); Expression action= new PathExpr(context); action.setASTNode(r); PathExpr whereExpr= null; List orderBy= null; { int _cnt88=0; _loop88: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_for: { AST __t75 = _t; f = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_for); _t = _t.getFirstChild(); { int _cnt81=0; _loop81: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==VARIABLE_BINDING)) { AST __t77 = _t; varName = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,VARIABLE_BINDING); _t = _t.getFirstChild(); ForLetClause clause= new ForLetClause(); clause.ast = f; PathExpr inputSequence= new PathExpr(context); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_as: { AST __t79 = _t; org.exist.xquery.parser.XQueryAST tmp7_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_as); _t = _t.getFirstChild(); clause.sequenceType= new SequenceType(); sequenceType(_t,clause.sequenceType); _t = _retTree; _t = __t79; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case POSITIONAL_VAR: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case POSITIONAL_VAR: { posVar = (org.exist.xquery.parser.XQueryAST)_t; match(_t,POSITIONAL_VAR); _t = _t.getNextSibling(); clause.posVar= posVar.getText(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,inputSequence); _t = _retTree; clause.varName= varName.getText(); clause.inputSequence= inputSequence; clauses.add(clause); _t = __t77; _t = _t.getNextSibling(); } else { if ( _cnt81>=1 ) { break _loop81; } else {throw new NoViableAltException(_t);} } _cnt81++; } while (true); } _t = __t75; _t = _t.getNextSibling(); break; } case LITERAL_let: { AST __t82 = _t; l = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_let); _t = _t.getFirstChild(); { int _cnt87=0; _loop87: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==VARIABLE_BINDING)) { AST __t84 = _t; letVarName = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,VARIABLE_BINDING); _t = _t.getFirstChild(); ForLetClause clause= new ForLetClause(); clause.ast = l; clause.isForClause= false; PathExpr inputSequence= new PathExpr(context); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_as: { AST __t86 = _t; org.exist.xquery.parser.XQueryAST tmp8_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_as); _t = _t.getFirstChild(); clause.sequenceType= new SequenceType(); sequenceType(_t,clause.sequenceType); _t = _retTree; _t = __t86; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,inputSequence); _t = _retTree; clause.varName= letVarName.getText(); clause.inputSequence= inputSequence; clauses.add(clause); _t = __t84; _t = _t.getNextSibling(); } else { if ( _cnt87>=1 ) { break _loop87; } else {throw new NoViableAltException(_t);} } _cnt87++; } while (true); } _t = __t82; _t = _t.getNextSibling(); break; } default: { if ( _cnt88>=1 ) { break _loop88; } else {throw new NoViableAltException(_t);} } } _cnt88++; } while (true); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_where: { w = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_where); _t = _t.getNextSibling(); whereExpr= new PathExpr(context); whereExpr.setASTNode(w); step=expr(_t,whereExpr); _t = _retTree; break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case ORDER_BY: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ORDER_BY: { AST __t91 = _t; org.exist.xquery.parser.XQueryAST tmp9_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,ORDER_BY); _t = _t.getFirstChild(); orderBy= new ArrayList(3); { int _cnt98=0; _loop98: do { if (_t==null) _t=ASTNULL; if ((_tokenSet_0.member(_t.getType()))) { PathExpr orderSpecExpr= new PathExpr(context); step=expr(_t,orderSpecExpr); _t = _retTree; OrderSpec orderSpec= new OrderSpec(context, orderSpecExpr); int modifiers= 0; orderBy.add(orderSpec); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_ascending: case LITERAL_descending: { { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_ascending: { org.exist.xquery.parser.XQueryAST tmp10_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_ascending); _t = _t.getNextSibling(); break; } case LITERAL_descending: { org.exist.xquery.parser.XQueryAST tmp11_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_descending); _t = _t.getNextSibling(); modifiers= OrderSpec.DESCENDING_ORDER; orderSpec.setModifiers(modifiers); break; } default: { throw new NoViableAltException(_t); } } } break; } case 3: case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_collation: case LITERAL_element: case LCURLY: case COMMA: case LITERAL_empty: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_empty: { org.exist.xquery.parser.XQueryAST tmp12_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_empty); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_greatest: { org.exist.xquery.parser.XQueryAST tmp13_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_greatest); _t = _t.getNextSibling(); break; } case LITERAL_least: { org.exist.xquery.parser.XQueryAST tmp14_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_least); _t = _t.getNextSibling(); modifiers |= OrderSpec.EMPTY_LEAST; orderSpec.setModifiers(modifiers); break; } default: { throw new NoViableAltException(_t); } } } break; } case 3: case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_collation: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_collation: { org.exist.xquery.parser.XQueryAST tmp15_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_collation); _t = _t.getNextSibling(); collURI = (org.exist.xquery.parser.XQueryAST)_t; match(_t,STRING_LITERAL); _t = _t.getNextSibling(); orderSpec.setCollation(collURI.getText()); break; } case 3: case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } } else { if ( _cnt98>=1 ) { break _loop98; } else {throw new NoViableAltException(_t);} } _cnt98++; } while (true); } _t = __t91; _t = _t.getNextSibling(); break; } case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { break; } default: { throw new NoViableAltException(_t); } } } step=expr(_t,(PathExpr) action); _t = _retTree; for (int i= clauses.size() - 1; i >= 0; i--) { ForLetClause clause= (ForLetClause) clauses.get(i); BindingExpression expr; if (clause.isForClause) expr= new ForExpr(context); else expr= new LetExpr(context); expr.setASTNode(clause.ast); expr.setVariable(clause.varName); expr.setSequenceType(clause.sequenceType); expr.setInputSequence(clause.inputSequence); expr.setReturnExpression(action); if (clause.isForClause) ((ForExpr) expr).setPositionalVariable(clause.posVar); if (whereExpr != null) { expr.setWhereExpression(whereExpr); whereExpr= null; } action= expr; } if (orderBy != null) { OrderSpec orderSpecs[]= new OrderSpec[orderBy.size()]; int k= 0; for (Iterator j= orderBy.iterator(); j.hasNext(); k++) { OrderSpec orderSpec= (OrderSpec) j.next(); orderSpecs[k]= orderSpec; } ((BindingExpression)action).setOrderSpecs(orderSpecs); } path.add(action); step = action; _t = __t73; _t = _t.getNextSibling(); break; } case LITERAL_instance: { AST __t99 = _t; org.exist.xquery.parser.XQueryAST tmp16_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_instance); _t = _t.getFirstChild(); PathExpr expr = new PathExpr(context); SequenceType type= new SequenceType(); step=expr(_t,expr); _t = _retTree; sequenceType(_t,type); _t = _retTree; step = new InstanceOfExpression(context, expr, type); path.add(step); _t = __t99; _t = _t.getNextSibling(); break; } case LITERAL_or: { AST __t100 = _t; org.exist.xquery.parser.XQueryAST tmp17_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_or); _t = _t.getFirstChild(); PathExpr left= new PathExpr(context); PathExpr right= new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t100; _t = _t.getNextSibling(); OpOr or= new OpOr(context); or.addPath(left); or.addPath(right); path.addPath(or); step = or; break; } case LITERAL_and: { AST __t101 = _t; org.exist.xquery.parser.XQueryAST tmp18_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_and); _t = _t.getFirstChild(); PathExpr left= new PathExpr(context); PathExpr right= new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t101; _t = _t.getNextSibling(); OpAnd and= new OpAnd(context); and.addPath(left); and.addPath(right); path.addPath(and); step = and; break; } case UNION: { AST __t102 = _t; org.exist.xquery.parser.XQueryAST tmp19_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,UNION); _t = _t.getFirstChild(); PathExpr left= new PathExpr(context); PathExpr right= new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t102; _t = _t.getNextSibling(); Union union= new Union(context, left, right); path.add(union); step = union; break; } case LITERAL_intersect: { AST __t103 = _t; org.exist.xquery.parser.XQueryAST tmp20_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_intersect); _t = _t.getFirstChild(); PathExpr left = new PathExpr(context); PathExpr right = new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t103; _t = _t.getNextSibling(); Intersection intersect = new Intersection(context, left, right); path.add(intersect); step = intersect; break; } case LITERAL_except: { AST __t104 = _t; org.exist.xquery.parser.XQueryAST tmp21_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_except); _t = _t.getFirstChild(); PathExpr left = new PathExpr(context); PathExpr right = new PathExpr(context); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; _t = __t104; _t = _t.getNextSibling(); Except intersect = new Except(context, left, right); path.add(intersect); step = intersect; break; } case ABSOLUTE_SLASH: { AST __t105 = _t; org.exist.xquery.parser.XQueryAST tmp22_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,ABSOLUTE_SLASH); _t = _t.getFirstChild(); RootNode root= new RootNode(context); path.add(root); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { step=expr(_t,path); _t = _retTree; break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t105; _t = _t.getNextSibling(); break; } case ABSOLUTE_DSLASH: { AST __t107 = _t; org.exist.xquery.parser.XQueryAST tmp23_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,ABSOLUTE_DSLASH); _t = _t.getFirstChild(); RootNode root= new RootNode(context); path.add(root); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case BEFORE: case AFTER: case ATTRIBUTE_TEST: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case NCNAME: case EQ: case STRING_LITERAL: case LITERAL_element: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case LT: case GT: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GTEQ: case LTEQ: case LITERAL_is: case LITERAL_isnot: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case XML_COMMENT: case XML_PI: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: case LITERAL_preceding: { step=expr(_t,path); _t = _retTree; if (step instanceof LocationStep) { LocationStep s= (LocationStep) step; if (s.getAxis() == Constants.ATTRIBUTE_AXIS) // combines descendant-or-self::node()/attribute:* s.setAxis(Constants.DESCENDANT_ATTRIBUTE_AXIS); else s.setAxis(Constants.DESCENDANT_SELF_AXIS); } else step.setPrimaryAxis(Constants.DESCENDANT_SELF_AXIS); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t107; _t = _t.getNextSibling(); break; } case LITERAL_to: { AST __t109 = _t; org.exist.xquery.parser.XQueryAST tmp24_AST_in = (org.exist.xquery.parser.XQueryAST)_t; match(_t,LITERAL_to); _t = _t.getFirstChild(); PathExpr start= new PathExpr(context); PathExpr end= new PathExpr(context); List args= new ArrayList(2); args.add(start); args.add(end); step=expr(_t,start); _t = _retTree; step=expr(_t,end); _t = _retTree; RangeExpression range= new RangeExpression(context); range.setArguments(args); path.addPath(range); step = range; _t = __t109; _t = _t.getNextSibling(); break; } case EQ: case LT: case GT: case NEQ: case GTEQ: case LTEQ: { step=generalComp(_t,path); _t = _retTree; break; } case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: { step=valueComp(_t,path); _t = _retTree; break; } case BEFORE: case AFTER: case LITERAL_is: case LITERAL_isnot: { step=nodeComp(_t,path); _t = _retTree; break; } case ANDEQ: case OREQ: { step=fulltextComp(_t,path); _t = _retTree; break; } case PARENTHESIZED: case FUNCTION: case VARIABLE_REF: case ELEMENT: case TEXT: case COMP_ELEM_CONSTRUCTOR: case COMP_ATTR_CONSTRUCTOR: case COMP_TEXT_CONSTRUCTOR: case COMP_COMMENT_CONSTRUCTOR: case COMP_PI_CONSTRUCTOR: case COMP_DOC_CONSTRUCTOR: case STRING_LITERAL: case LCURLY: case XML_COMMENT: case XML_PI: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_CDATA: { step=primaryExpr(_t,path); _t = _retTree; break; } case QNAME: case WILDCARD: case PREFIX_WILDCARD: case ATTRIBUTE_TEST: case NCNAME: case LITERAL_element: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 140: case SELF: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 152: case 153: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 157: case 158: case LITERAL_preceding: { step=pathExpr(_t,path); _t = _retTree; break; } case UNARY_MINUS: case UNARY_PLUS: case STAR: case PLUS: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: { step=numericExpr(_t,path); _t = _retTree; break; } default: { throw new NoViableAltException(_t); } } _retTree = _t; return step; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/9aec85412cf9f86cb609358133dd23628306f44a/XQueryTreeParser.java/clean/src/org/exist/xquery/parser/XQueryTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
3065,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
202,
202,
2300,
2235,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
3065,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
202,
202,
2300,
2235,
3... |
return operateHandles( transferData, container, position, Messages .getString( "DNDUtil.trans.cut" ), TYPE_CUT ); | return operateHandles( transferData, container, position, Messages.getString( "DNDUtil.trans.cut" ), TYPE_CUT ); | public static boolean moveHandles( Object transferData, Object container, int position ) { return operateHandles( transferData, container, position, Messages .getString( "DNDUtil.trans.cut" ), TYPE_CUT ); //$NON-NLS-1$ } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/15872394c039d121619cbe58b491c78363c43ff7/DNDUtil.java/clean/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/DNDUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
3635,
8788,
12,
1033,
7412,
751,
16,
1033,
1478,
16,
1082,
202,
474,
1754,
262,
202,
95,
202,
202,
2463,
20829,
8788,
12,
7412,
751,
16,
1478,
16,
1754,
16,
4838,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
3635,
8788,
12,
1033,
7412,
751,
16,
1033,
1478,
16,
1082,
202,
474,
1754,
262,
202,
95,
202,
202,
2463,
20829,
8788,
12,
7412,
751,
16,
1478,
16,
1754,
16,
4838,
... |
if (n < 0) { return shiftRight( -n); } return new BigInteger(sign, shiftLeft(magnitude, n)); | return newMag; | public BigInteger shiftLeft(int n) { if (sign == 0 || magnitude.length == 0) { return ZERO; } if (n == 0) { return this; } if (n < 0) { return shiftRight( -n); } return new BigInteger(sign, shiftLeft(magnitude, n)); } | 14767 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14767/227207a85a3d5c42ba1f9442b5bc93c84b84f315/BigInteger.java/buggy/crypto/j2me/java/math/BigInteger.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10246,
4654,
3910,
12,
474,
290,
13,
565,
288,
3639,
309,
261,
2977,
422,
374,
747,
13463,
18,
2469,
422,
374,
13,
3639,
288,
5411,
327,
18449,
31,
3639,
289,
3639,
309,
261,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10246,
4654,
3910,
12,
474,
290,
13,
565,
288,
3639,
309,
261,
2977,
422,
374,
747,
13463,
18,
2469,
422,
374,
13,
3639,
288,
5411,
327,
18449,
31,
3639,
289,
3639,
309,
261,
82,
... |
final Entity entity = (Entity)i.nextElement(); if (!(entity instanceof Mech) || entity.isProne() || entity.isDoomed() || entity.isDestroyed()) { continue; } int rolls = 0; StringBuffer reasons = new StringBuffer(); PilotingRollData roll = Compute.getBasePilotingRoll(game, entity.getId()); for (Enumeration j = pilotRolls.elements(); j.hasMoreElements();) { final PilotingRollData modifier = (PilotingRollData)j.nextElement(); if (modifier.getEntityId() == entity.getId()) { rolls++; if (reasons.length() > 0) { reasons.append(", "); } reasons.append(modifier.getPlainDesc()); roll.append(modifier); } } if (rolls == 0) { continue; } if (roll.getValue() == PilotingRollData.AUTOMATIC_FAIL || roll.getValue() == PilotingRollData.IMPOSSIBLE) { phaseReport.append("\n" ).append( entity.getDisplayName() ).append( " must make " ).append( rolls ).append( " piloting skill roll(s) and automatically fails (" ).append( roll.getDesc() ).append( ").\n"); doEntityFall(entity, roll); } else { phaseReport.append("\n" ).append( entity.getDisplayName() ).append( " must make " ).append( rolls ).append( " piloting skill roll(s) (" ).append( reasons.toString() ).append( ").\n"); phaseReport.append("The target is " ).append( roll.getValueAsString() ).append( " [" ).append( roll.getDesc() ).append( "].\n"); for (int j = 0; j < rolls; j++) { final int diceRoll = Compute.d6(2); phaseReport.append(" " ).append( entity.getDisplayName() ).append( " needs " ).append( roll.getValueAsString() ).append( ", rolls " ).append( diceRoll ).append( " : "); phaseReport.append((diceRoll >= roll.getValue() ? "remains standing" : "falls") ).append( ".\n"); if (diceRoll < roll.getValue()) { doEntityFall(entity, roll); break; } } } | resolvePilotingRolls((Entity)i.nextElement()); | private void resolvePilotingRolls() { for (Enumeration i = game.getEntities(); i.hasMoreElements();) { final Entity entity = (Entity)i.nextElement(); if (!(entity instanceof Mech) || entity.isProne() || entity.isDoomed() || entity.isDestroyed()) { continue; } int rolls = 0; StringBuffer reasons = new StringBuffer(); PilotingRollData roll = Compute.getBasePilotingRoll(game, entity.getId()); for (Enumeration j = pilotRolls.elements(); j.hasMoreElements();) { final PilotingRollData modifier = (PilotingRollData)j.nextElement(); if (modifier.getEntityId() == entity.getId()) { rolls++; if (reasons.length() > 0) { reasons.append(", "); } reasons.append(modifier.getPlainDesc()); roll.append(modifier); } } // any rolls needed? if (rolls == 0) { continue; } if (roll.getValue() == PilotingRollData.AUTOMATIC_FAIL || roll.getValue() == PilotingRollData.IMPOSSIBLE) { phaseReport.append("\n" ).append( entity.getDisplayName() ).append( " must make " ).append( rolls ).append( " piloting skill roll(s) and automatically fails (" ).append( roll.getDesc() ).append( ").\n"); doEntityFall(entity, roll); } else { phaseReport.append("\n" ).append( entity.getDisplayName() ).append( " must make " ).append( rolls ).append( " piloting skill roll(s) (" ).append( reasons.toString() ).append( ").\n"); phaseReport.append("The target is " ).append( roll.getValueAsString() ).append( " [" ).append( roll.getDesc() ).append( "].\n"); for (int j = 0; j < rolls; j++) { final int diceRoll = Compute.d6(2); phaseReport.append(" " ).append( entity.getDisplayName() ).append( " needs " ).append( roll.getValueAsString() ).append( ", rolls " ).append( diceRoll ).append( " : "); phaseReport.append((diceRoll >= roll.getValue() ? "remains standing" : "falls") ).append( ".\n"); if (diceRoll < roll.getValue()) { doEntityFall(entity, roll); // break rolling loop break; } } } } pilotRolls.removeAllElements(); } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/092146ee0d51b60b340898a9fba24facbe89bfad/Server.java/clean/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2245,
52,
330,
17128,
4984,
3251,
1435,
288,
3639,
364,
261,
21847,
277,
273,
7920,
18,
588,
8108,
5621,
277,
18,
5332,
7417,
3471,
5621,
13,
288,
5411,
727,
3887,
1522,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2245,
52,
330,
17128,
4984,
3251,
1435,
288,
3639,
364,
261,
21847,
277,
273,
7920,
18,
588,
8108,
5621,
277,
18,
5332,
7417,
3471,
5621,
13,
288,
5411,
727,
3887,
1522,
273,
... |
public short loadShort(Offset offset) { | public short loadShort() { | public short loadShort(Offset offset) { if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); return (short)0; } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/9b22bffbb06319b08a93aed2a8f11de10ba3fecf/Address.java/buggy/rvm/src/vm/vmmagic/unboxed/Address.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3025,
1262,
4897,
1435,
288,
565,
309,
261,
7397,
18,
8097,
8213,
1115,
13,
8251,
6315,
11231,
12,
7397,
18,
4400,
67,
29416,
15023,
1769,
565,
327,
261,
6620,
13,
20,
31,
225,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3025,
1262,
4897,
1435,
288,
565,
309,
261,
7397,
18,
8097,
8213,
1115,
13,
8251,
6315,
11231,
12,
7397,
18,
4400,
67,
29416,
15023,
1769,
565,
327,
261,
6620,
13,
20,
31,
225,
28... |
private void initialize() { GridData dateTextGridData = new org.eclipse.swt.layout.GridData(); dateTextGridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; dateTextGridData.grabExcessHorizontalSpace = true; dateTextGridData.verticalAlignment = org.eclipse.swt.layout.GridData.FILL; GridData pickButtonGridData = new org.eclipse.swt.layout.GridData(); pickButtonGridData.horizontalAlignment = org.eclipse.swt.layout.GridData.END; pickButtonGridData.verticalAlignment = org.eclipse.swt.layout.GridData.FILL; GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2; gridLayout.horizontalSpacing = 2; gridLayout.verticalSpacing = 2; gridLayout.marginWidth = 0; gridLayout.marginHeight = 2; gridLayout.makeColumnsEqualWidth = false; this.setLayout(gridLayout); setSize(new org.eclipse.swt.graphics.Point(125, 28)); dateText = new Text(this, SWT.BORDER | SWT.READ_ONLY); dateText.setBackground(Display.getCurrent().getSystemColor( SWT.COLOR_WHITE)); dateText.setLayoutData(dateTextGridData); pickButton = new Button(this, SWT.ARROW | SWT.DOWN); pickButton.setLayoutData(pickButtonGridData); pickButton.addSelectionListener(new SelectionListener() { public void widgetSelected(SelectionEvent arg0) { Display display = Display.getCurrent(); showDatePicker(display.getCursorLocation().x, display.getCursorLocation().y); } public void widgetDefaultSelected(SelectionEvent arg0) { } }); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/92f83f5f3b5a64a9ecf81dc04a4195948196d480/DatePicker.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/contribution/DatePicker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
4046,
1435,
288,
202,
202,
6313,
751,
1509,
1528,
6313,
751,
273,
394,
2358,
18,
20416,
18,
5328,
88,
18,
6741,
18,
6313,
751,
5621,
202,
202,
712,
1528,
6313,
751,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
4046,
1435,
288,
202,
202,
6313,
751,
1509,
1528,
6313,
751,
273,
394,
2358,
18,
20416,
18,
5328,
88,
18,
6741,
18,
6313,
751,
5621,
202,
202,
712,
1528,
6313,
751,
18,
... | ||
NationalNumber result = (NationalNumber)context.get(SUBJECT_KEY); | public boolean validate(Map context) { NationalNumber result = (NationalNumber)context.get(SUBJECT_KEY); String leftNumber = (String)context.get("leftNumber"); PropertyException pExc = (PropertyException)context.get(EXCEPTION_KEY); return ( leftNumber == null ) && (pExc.reportsOn( NationalNumber.class, "leftNumber", "LEFT_NUMBER_IS_NULL", null) ); }}); | 14638 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14638/5d5ac983c4aaf491a84f63bdd6e825ae6bba3385/_Contract_NationalNumber.java/buggy/src/toryt/be/peopleware/value_I/_Contract_NationalNumber.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1250,
1954,
12,
863,
819,
13,
288,
2398,
202,
5411,
202,
780,
2002,
1854,
273,
261,
780,
13,
2472,
18,
588,
2932,
4482,
1854,
8863,
2398,
202,
2398,
202,
1396,
503,
293,
29924,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1250,
1954,
12,
863,
819,
13,
288,
2398,
202,
5411,
202,
780,
2002,
1854,
273,
261,
780,
13,
2472,
18,
588,
2932,
4482,
1854,
8863,
2398,
202,
2398,
202,
1396,
503,
293,
29924,
2... | |
return System.getProperty(property); | return FrameworkProperties.getProperty(property); | public String getProperty(final String property) { if (System.getSecurityManager() == null) return System.getProperty(property); return (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(property); } }, controlContext); } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/795e339493dd76d146d62fd4fd2526e831c650bd/SecureAction.java/clean/bundles/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/util/SecureAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
3911,
12,
6385,
514,
1272,
13,
288,
202,
202,
430,
261,
3163,
18,
588,
4368,
1318,
1435,
422,
446,
13,
1082,
202,
2463,
2332,
18,
588,
1396,
12,
4468,
1769,
202,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
3911,
12,
6385,
514,
1272,
13,
288,
202,
202,
430,
261,
3163,
18,
588,
4368,
1318,
1435,
422,
446,
13,
1082,
202,
2463,
2332,
18,
588,
1396,
12,
4468,
1769,
202,
202,
2... |
checkIn( "**/pom.xml,**/release-pom.xml", "[maven-release-plugin] prepare release" ); | checkIn( "**/pom.xml,**/release-pom.xml", "[maven-release-plugin] prepare release " + getTagLabel() ); | private void checkInRelease() throws MojoExecutionException { if ( !getReleaseProgress().verifyCheckpoint( ReleaseProgressTracker.CP_CHECKED_IN_RELEASE_VERSION ) ) { checkIn( "**/pom.xml,**/release-pom.xml", "[maven-release-plugin] prepare release" ); try { getReleaseProgress().checkpoint( basedir, ReleaseProgressTracker.CP_CHECKED_IN_RELEASE_VERSION ); } catch ( IOException e ) { getLog().warn( "Error writing checkpoint.", e ); } } } | 7444 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7444/625596d32f1138e016cf983748dd893bd640133a/PrepareReleaseMojo.java/buggy/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
382,
7391,
1435,
3639,
1216,
18780,
565,
288,
3639,
309,
261,
401,
588,
7391,
5491,
7675,
8705,
14431,
12,
10819,
5491,
8135,
18,
4258,
67,
10687,
2056,
67,
706,
67,
30762... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
382,
7391,
1435,
3639,
1216,
18780,
565,
288,
3639,
309,
261,
401,
588,
7391,
5491,
7675,
8705,
14431,
12,
10819,
5491,
8135,
18,
4258,
67,
10687,
2056,
67,
706,
67,
30762... |
treeViewer.refresh(); | refresh(); | public void applyEditorValue() { Object selection = ((IStructuredSelection) treeViewer.getSelection()).getFirstElement(); if (selection instanceof ITask) { ITask task = (ITask) selection; int estimate = (Integer) estimateEditor.getValue(); if (estimate == -1) { estimate = 0; } task.setEstimatedTimeHours(estimate); // updateLabels(); treeViewer.refresh(); } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/750c09dfac672981453a04722d98d050529f9d9a/TaskActivityView.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskActivityView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
2230,
6946,
620,
1435,
288,
9506,
202,
921,
4421,
273,
14015,
45,
30733,
6233,
13,
2151,
18415,
18,
588,
6233,
1435,
2934,
588,
3759,
1046,
5621,
9506,
202,
430,
261,
1070... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
2230,
6946,
620,
1435,
288,
9506,
202,
921,
4421,
273,
14015,
45,
30733,
6233,
13,
2151,
18415,
18,
588,
6233,
1435,
2934,
588,
3759,
1046,
5621,
9506,
202,
430,
261,
1070... |
((candidate != null) && (candidate instanceof Container) && (((Container)candidate).getComponentCount () > 0)); | ((candidate != null) && (candidate instanceof Container) && (((Container)candidate).getComponentCount () > 0)); | void acquireComponentForMouseEvent (MouseEvent me) { int x = me.getX (); int y = me.getY (); Component candidate = mouseEventTarget; boolean candidate_is_container_with_children = ((candidate != null) && (candidate instanceof Container) && (((Container)candidate).getComponentCount () > 0)); boolean candidate_does_not_contain_point = ((candidate != null) && (! candidate.contains (x - candidate.getX (), y - candidate.getY ()))); if (candidate == null || candidate_is_container_with_children || candidate_does_not_contain_point) { // Try to reacquire. candidate = nativeContainer.findComponentAt (x, y); } if (mouseEventTarget != null && mouseEventTarget != candidate) { int nx = x - mouseEventTarget.getX (); int ny = y - mouseEventTarget.getY (); MouseEvent exited = new MouseEvent (mouseEventTarget, MouseEvent.MOUSE_EXITED, me.getWhen (), me.getModifiers (), nx, ny, me.getClickCount (), me.isPopupTrigger (), me.getButton ()); mouseEventTarget.dispatchEvent (exited); mouseEventTarget = null; } if (candidate != null) { // Possibly set new state. if (candidate.isLightweight() && candidate != nativeContainer && candidate != mouseEventTarget) { mouseEventTarget = candidate; int nx = x - mouseEventTarget.getX (); int ny = y - mouseEventTarget.getY (); // If acquired, enter it. MouseEvent entered = new MouseEvent (mouseEventTarget, MouseEvent.MOUSE_ENTERED, me.getWhen (), me.getModifiers (), nx, ny, me.getClickCount (), me.isPopupTrigger (), me.getButton ()); mouseEventTarget.dispatchEvent (entered); } } } | 45163 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45163/ad6c8435ee03593e980da05d382c95b10d220822/Container.java/clean/libjava/java/awt/Container.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
10533,
1841,
1290,
9186,
1133,
261,
9186,
1133,
1791,
13,
225,
288,
565,
509,
619,
273,
1791,
18,
588,
60,
261,
1769,
565,
509,
677,
273,
1791,
18,
588,
61,
261,
1769,
565,
5435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
10533,
1841,
1290,
9186,
1133,
261,
9186,
1133,
1791,
13,
225,
288,
565,
509,
619,
273,
1791,
18,
588,
60,
261,
1769,
565,
509,
677,
273,
1791,
18,
588,
61,
261,
1769,
565,
5435,
... |
context.setEvaluator(new JSILGenerator()); JSILGenerator.setOut( input[i]+".jsil" ); node.evaluate(context, context.getEvaluator()); | context.setEvaluator(new BlockEvaluator()); node.evaluate(context, context.getEvaluator()); JSILGenerator.setOut( input[i]+".blocks" ); context.setEvaluator(new JSILGenerator()); node.evaluate(context, context.getEvaluator()); context.setEvaluator(new ConstantEvaluator()); value = node.evaluate(context, context.getEvaluator()); context.setEvaluator(new JSILGenerator()); JSILGenerator.setOut( input[i]+".jsil" ); node.evaluate(context, context.getEvaluator()); errorCount = context.errorCount(); } | static final void compile(String name, String[] input) throws Exception { Debugger.trace( "begin testEvaluator: " + name ); String result; Node node; Value type; Evaluator evaluator; Value value; Class pc = Parser.class; Class[] args = new Class[0]; Parser parser; long t=0; ObjectValue global = null; for( int i = 0; i < input.length; i++ ) { try { if( traceInput ) { InputBuffer.setOut(input[i]+".inp"); } if( traceLexer ) { Scanner.setOut(input[i]+".lex"); } if( debug ) { Debugger.setDbgFile( input[i]+".dbg" ); } Debugger.setErrFile( input[i]+".err" ); FileInputStream srcfile = new FileInputStream( input[i] ); InputStreamReader reader = new InputStreamReader( srcfile ); Context context = new Context(); global = new ObjectValue("__systemGlobal", new GlobalObject()); context.pushScope(global); parser = new Parser(reader); Evaluator cevaluator = new ConstantEvaluator(); System.gc(); t = System.currentTimeMillis(); node = parser.parseProgram(); if( traceParser ) { Debugger.trace("setting parser output to " + input[i]); JSILGenerator.setOut( input[i]+".par" ); node.evaluate(context,new JSILGenerator()); } //Evaluator evaluator; context.setEvaluator(new BlockEvaluator()); node.evaluate(context, context.getEvaluator()); JSILGenerator.setOut( input[i]+".blocks" ); context.setEvaluator(new JSILGenerator()); node.evaluate(context, context.getEvaluator()); context.setEvaluator(new ConstantEvaluator()); value = node.evaluate(context, context.getEvaluator()); context.setEvaluator(new JSILGenerator()); JSILGenerator.setOut( input[i]+".jsil" ); node.evaluate(context, context.getEvaluator()); t = System.currentTimeMillis() - t; //Debugger.trace(""+global); System.out.println(input[i] + ": "+context.errorCount()+" errors [" + Long.toString(t) + " msec] --> " + value.getValue(context) ); } catch( Exception x ) { x.printStackTrace(); t = System.currentTimeMillis() - t; System.out.println(input[i] + ": internal error" ); } //Debugger.trace( " " + i + " passed in " + Long.toString(t) + // " msec: [" + input[i] + "] = " + result ); } } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/c8f0271f30beb85814bc53c3804d1ad914028ad4/Main.java/buggy/js/js2/jsc/src/java/main/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
727,
918,
4074,
12,
780,
508,
16,
514,
8526,
810,
13,
1216,
1185,
288,
3639,
28645,
18,
5129,
12,
315,
10086,
1842,
15876,
30,
315,
397,
508,
11272,
3639,
514,
563,
31,
3639,
2029,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
727,
918,
4074,
12,
780,
508,
16,
514,
8526,
810,
13,
1216,
1185,
288,
3639,
28645,
18,
5129,
12,
315,
10086,
1842,
15876,
30,
315,
397,
508,
11272,
3639,
514,
563,
31,
3639,
2029,... |
public void testSFBug1089770_2() { try{ SmilesGenerator sg = new SmilesGenerator(); String filename = "data/mdl/bug1089770-2.mol"; InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename); MDLReader reader = new MDLReader(new InputStreamReader(ins)); Molecule mol1 = (Molecule) reader.read(new Molecule()); String moleculeSmile = sg.createSMILES(mol1); System.out.println(filename + " -> " + moleculeSmile); assertEquals(moleculeSmile,"C=1CCC=CCCC=1"); } catch (Exception exc) { exc.printStackTrace(); System.out.println(exc); fail(exc.getMessage()); } } | public void testSFBug1089770_2() { try { SmilesGenerator sg = new SmilesGenerator(); String filename = "data/mdl/bug1089770-2.mol"; InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename); MDLReader reader = new MDLReader(new InputStreamReader(ins)); Molecule mol1 = (Molecule) reader.read(new Molecule()); String moleculeSmile = sg.createSMILES(mol1); System.out.println(filename + " -> " + moleculeSmile); assertEquals(moleculeSmile, "C=1CCC=CCCC=1"); } catch (Exception exc) { exc.printStackTrace(); System.out.println(exc); fail(exc.getMessage()); } } | public void testSFBug1089770_2() { try{ SmilesGenerator sg = new SmilesGenerator(); String filename = "data/mdl/bug1089770-2.mol"; InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename); MDLReader reader = new MDLReader(new InputStreamReader(ins)); Molecule mol1 = (Molecule) reader.read(new Molecule()); String moleculeSmile = sg.createSMILES(mol1); System.out.println(filename + " -> " + moleculeSmile); assertEquals(moleculeSmile,"C=1CCC=CCCC=1"); } catch (Exception exc) { exc.printStackTrace(); System.out.println(exc); fail(exc.getMessage()); } } | 1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/59606b04fc4a28c30470c452644c11af7cf211fa/SmilesGeneratorTest.java/clean/src/org/openscience/cdk/test/smiles/SmilesGeneratorTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
22395,
19865,
2163,
6675,
4700,
20,
67,
22,
1435,
288,
1377,
775,
95,
3639,
9425,
1449,
3908,
11150,
273,
394,
9425,
1449,
3908,
5621,
3639,
514,
1544,
273,
315,
892,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
22395,
19865,
2163,
6675,
4700,
20,
67,
22,
1435,
288,
1377,
775,
95,
3639,
9425,
1449,
3908,
11150,
273,
394,
9425,
1449,
3908,
5621,
3639,
514,
1544,
273,
315,
892,
19,... |
buildContainer(new XMLContainerBuilder(script, getClass().getClassLoader())); | buildContainer(new XMLContainerBuilder(script, getClass().getClassLoader()), null); | public void testUnknownComponentClassThrowsAssemblyException() throws Exception, SAXException, ParserConfigurationException, IOException { try { Reader script = new StringReader("<container>" + " <component class='Foo'/>" + "</container>"); buildContainer(new XMLContainerBuilder(script, getClass().getClassLoader())); fail("Should have thrown a ClassNotFoundException"); } catch (RuntimeException cnfe) { } } | 14040 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14040/f32794b219c939ca8bf45fa3bb7f3eee78eda2c0/XMLContainerBuilderTestCase.java/buggy/java/nanocontainer/src/test/org/nanocontainer/script/xml/XMLContainerBuilderTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4874,
1841,
797,
21845,
24368,
503,
1435,
1216,
1185,
16,
14366,
16,
6783,
10737,
16,
1860,
288,
3639,
775,
288,
5411,
5393,
2728,
273,
394,
26227,
2932,
32,
3782,
2984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4874,
1841,
797,
21845,
24368,
503,
1435,
1216,
1185,
16,
14366,
16,
6783,
10737,
16,
1860,
288,
3639,
775,
288,
5411,
5393,
2728,
273,
394,
26227,
2932,
32,
3782,
2984,
... |
registry = null; | acceptor= null; | public void destroy() { registry.unbind( udpService ); registry.unbind( tcpService ); registry = null; handler = null; udpService = null; tcpService = null; log.debug( "{} has stopped listening on port {}", config.getName(), new Integer( config.getPort() ) ); } | 10677 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10677/05ad6b2f1dfc0a667fdae4160212ce3cf4f8151a/DnsServer.java/buggy/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsServer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
5546,
1435,
565,
288,
3639,
4023,
18,
318,
4376,
12,
16673,
1179,
11272,
3639,
4023,
18,
318,
4376,
12,
9658,
1179,
11272,
3639,
2791,
280,
33,
446,
31,
3639,
1838,
273,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
5546,
1435,
565,
288,
3639,
4023,
18,
318,
4376,
12,
16673,
1179,
11272,
3639,
4023,
18,
318,
4376,
12,
9658,
1179,
11272,
3639,
2791,
280,
33,
446,
31,
3639,
1838,
273,
446,
... |
if(df==null) { df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); tl_tsdf.set(df); } | public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { SimpleDateFormat df = (SimpleDateFormat) tl_tsdf.get(); if(df==null) { df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); tl_tsdf.set(df); } df.setTimeZone(TimeZone.getTimeZone("GMT")); // Use the shared StringBuffer synchronized(sbuf) { sbuf.setLength(0); sbuf.append("'").append(df.format(x)).append('.').append(x.getNanos()/10000000).append("+00'"); set(parameterIndex, sbuf.toString()); } // The above works, but so does the following. I'm leaving the above in, but this seems // to be identical. Pays to read the docs ;-) //set(parameterIndex,"'"+x.toString()+"'"); } | 47293 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47293/54361b4233a8da20e4ee47f16cc1dd97612dbe2e/PreparedStatement.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
25251,
12,
474,
25412,
16,
8159,
619,
13,
1216,
6483,
3639,
288,
1850,
17005,
3013,
273,
261,
5784,
11878,
13,
8332,
67,
3428,
2180,
18,
588,
5621,
1850,
309,
12,
2180,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
25251,
12,
474,
25412,
16,
8159,
619,
13,
1216,
6483,
3639,
288,
1850,
17005,
3013,
273,
261,
5784,
11878,
13,
8332,
67,
3428,
2180,
18,
588,
5621,
1850,
309,
12,
2180,
6... | |
break; case 3: if (args[0] == runtime.getClass("Exception")) { re = new RaiseException((RubyException) args[0].callMethod("exception", args[1])); } else { string = (RubyString) args[1]; excptn = new RubyException(runtime, ((RubyClass)args[0]), string.getValue()); excptn.set_backtrace(args[2]); re = new RaiseException(excptn); } break; default : re = runtime.newArgumentError("wrong number of arguments"); | exception = args[0].callMethod("exception", args[1]); | public static IRubyObject raise(IRubyObject recv, IRubyObject[] args) { // FIXME special case in ruby // recv.checkArgumentCount(args, 0, 2); IRuby runtime = recv.getRuntime(); RubyString string = null; RubyException excptn = null; RaiseException re = null; switch (args.length) { case 0 : IRubyObject defaultException = runtime.getGlobalVariables().get("$!"); if (defaultException.isNil()) { re = new RaiseException(runtime, runtime.getClass("RuntimeError"), "", false); } else { re = new RaiseException((RubyException) defaultException); } break; case 1 : if (args[0] instanceof RubyException) { re = new RaiseException((RubyException) args[0]); } else if (args[0] instanceof RubyClass) { re = new RaiseException(RubyException.newInstance(args[0], new IRubyObject[0])); } else { re = new RaiseException(RubyException.newInstance(runtime.getClass("RuntimeError"), args)); } break; case 2 : if (args[0] == runtime.getClass("Exception")) { re = new RaiseException((RubyException) args[0].callMethod("exception", args[1])); } else { string = (RubyString) args[1]; re = new RaiseException(new RubyException(runtime, ((RubyClass)args[0]), string.getValue())); } break; case 3: if (args[0] == runtime.getClass("Exception")) { re = new RaiseException((RubyException) args[0].callMethod("exception", args[1])); } else { string = (RubyString) args[1]; excptn = new RubyException(runtime, ((RubyClass)args[0]), string.getValue()); excptn.set_backtrace(args[2]); re = new RaiseException(excptn); } break; default : re = runtime.newArgumentError("wrong number of arguments"); } // Insert exception to be raised into global var and current thread runtime.getGlobalVariables().set("$!", re.getException()); throw re; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/db72794764bda58903c87df9b567f1f843bea69c/RubyKernel.java/buggy/src/org/jruby/RubyKernel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
1002,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
8526,
833,
13,
288,
3639,
368,
9852,
225,
4582,
648,
316,
22155,
3639,
368,
10665,
18,
1893,
1379,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
1002,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
8526,
833,
13,
288,
3639,
368,
9852,
225,
4582,
648,
316,
22155,
3639,
368,
10665,
18,
1893,
1379,
... |
public StringBuilder objectRenderer(Object o, String index, Part p) throws MessagingException { StringBuilder buf=new StringBuilder(); try { if (o instanceof MimeMultipart) { MimeMultipart mm_i=(MimeMultipart) o; StringBuilder sb=decend(mm_i, index); buf.append(sb); } else if (o instanceof IMAPNestedMessage) { Object o_1=((Message) o).getContent(); if (o_1 instanceof String) { String s=(String) o_1; buf.append("<br>\n<hr>\n<br>\n"); Message m=new MimeMessage( Session.getInstance(new Properties()), new ByteArrayInputStream(s.getBytes())); buf.append(objectRenderer(m, index, m)); } else if (o_1 instanceof MimeMultipart) { buf.append(new RenderMessage().objectRenderer( (Message) o, index, (Message) o, this)); } } else { ObjectRender or=renderers.get(o.getClass()); if (or==null) { Set<Class> classes=renderers.keySet(); for (Class c : classes) { if (c.isAssignableFrom(o.getClass())) { or=renderers.get(c); break; } } } if (or==null) { buf.append(makeAttachmentBox(index, p)); } else { buf.append(or.objectRenderer(o, index, p, this)); } } } catch (IOException ioe) { throw new MessagingException("I/O error", ioe); } return buf; } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/b13c667b376deb4a8f2c235ffd847b57616d23c4/Renderer.java/clean/grendel/sources/grendel/renderer/Renderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3225,
733,
6747,
12,
921,
320,
16,
514,
770,
16,
6393,
293,
13,
1171,
9079,
1216,
23794,
503,
225,
288,
565,
3225,
1681,
33,
2704,
3225,
5621,
565,
775,
288,
1377,
309,
261,
83,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3225,
733,
6747,
12,
921,
320,
16,
514,
770,
16,
6393,
293,
13,
1171,
9079,
1216,
23794,
503,
225,
288,
565,
3225,
1681,
33,
2704,
3225,
5621,
565,
775,
288,
1377,
309,
261,
83,
... | ||
stackpos -= 53; | stackpos -= STACKSIZE; | public void intersectPrimitive(Ray r, int primID, IntersectionState state) { // ray patch intersection final float[] stack = state.getRobustStack(); { // init patch float[] patch = patches[primID]; for (int i = 0; i < 4 * 4 * 3; i++) stack[i] = patch[i]; stack[48] = Float.POSITIVE_INFINITY; // bbox size stack[49] = 0; // umin stack[50] = 0; // vmin stack[51] = 1; // umax stack[52] = 1; // vmax } // 53 elements per stack item int stackpos = 0; float orgX = r.ox; float dirX = r.dx, invDirX = 1 / dirX; float orgY = r.oy; float dirY = r.dy, invDirY = 1 / dirY; float orgZ = r.oz; float dirZ = r.dz, invDirZ = 1 / dirZ; float t1, t2; while (stackpos >= 0) { float intervalMin = r.getMin(); float intervalMax = r.getMax(); // x-axis bbox float minx = stack[stackpos + 0]; float maxx = stack[stackpos + 0]; for (int j = 1, idx = stackpos + 3; j < 4 * 4; j++, idx += 3) { if (minx > stack[idx]) minx = stack[idx]; if (maxx < stack[idx]) maxx = stack[idx]; } t1 = (minx - orgX) * invDirX; t2 = (maxx - orgX) * invDirX; if (invDirX > 0) { if (t1 > intervalMin) intervalMin = t1; if (t2 < intervalMax) intervalMax = t2; } else { if (t2 > intervalMin) intervalMin = t2; if (t1 < intervalMax) intervalMax = t1; } if (intervalMin > intervalMax) { stackpos -= 53; continue; } // y-axis bbox float miny = stack[stackpos + 1]; float maxy = stack[stackpos + 1]; for (int j = 1, idx = stackpos + 4; j < 4 * 4; j++, idx += 3) { if (miny > stack[idx]) miny = stack[idx]; if (maxy < stack[idx]) maxy = stack[idx]; } t1 = (miny - orgY) * invDirY; t2 = (maxy - orgY) * invDirY; if (invDirY > 0) { if (t1 > intervalMin) intervalMin = t1; if (t2 < intervalMax) intervalMax = t2; } else { if (t2 > intervalMin) intervalMin = t2; if (t1 < intervalMax) intervalMax = t1; } if (intervalMin > intervalMax) { stackpos -= 53; continue; } // z-axis bbox float minz = stack[stackpos + 2]; float maxz = stack[stackpos + 2]; for (int j = 1, idx = stackpos + 5; j < 4 * 4; j++, idx += 3) { if (minz > stack[idx]) minz = stack[idx]; if (maxz < stack[idx]) maxz = stack[idx]; } t1 = (minz - orgZ) * invDirZ; t2 = (maxz - orgZ) * invDirZ; if (invDirZ > 0) { if (t1 > intervalMin) intervalMin = t1; if (t2 < intervalMax) intervalMax = t2; } else { if (t2 > intervalMin) intervalMin = t2; if (t1 < intervalMax) intervalMax = t1; } if (intervalMin > intervalMax) { stackpos -= 53; continue; } // intersection was found - keep going float size = (maxx - minx) + (maxy - miny) + (maxz - minz); if (Float.floatToRawIntBits(stack[stackpos + 48]) == Float.floatToRawIntBits(size)) { // L1 norm is 0, we are done r.setMax(intervalMin); state.setIntersection(primID, stack[stackpos + 49], stack[stackpos + 50]); stackpos -= 53; continue; } // not small enough yet - subdivide // lets pick a subdivision axis first: float sizeu = 0; float sizev = 0; for (int i = 0; i < 3; i++) { sizeu += Math.abs(stack[stackpos + (0 * 4 + 3) * 3 + i] - stack[stackpos + i]); sizev += Math.abs(stack[stackpos + (3 * 4 + 0) * 3 + i] - stack[stackpos + i]); } if (sizeu > sizev) { // split in U direction for (int i = 0; i < 4; i++) { for (int axis = 0; axis < 3; axis++) { // load data float p0 = stack[stackpos + (i * 4 + 0) * 3 + axis]; float p1 = stack[stackpos + (i * 4 + 1) * 3 + axis]; float p2 = stack[stackpos + (i * 4 + 2) * 3 + axis]; float p3 = stack[stackpos + (i * 4 + 3) * 3 + axis]; // Split curve in the middle float q0 = p0; float q1 = (p0 + p1) * 0.5f; float q2 = q1 * 0.5f + (p1 + p2) * 0.25f; float r3 = p3; float r2 = (p2 + p3) * 0.5f; float r1 = r2 * 0.5f + (p1 + p2) * 0.25f; float q3 = (q2 + r1) * 0.5f; float r0 = q3; // load new curve data into the stack stack[stackpos + (i * 4 + 0) * 3 + axis] = q0; stack[stackpos + (i * 4 + 1) * 3 + axis] = q1; stack[stackpos + (i * 4 + 2) * 3 + axis] = q2; stack[stackpos + (i * 4 + 3) * 3 + axis] = q3; stack[stackpos + 53 + (i * 4 + 0) * 3 + axis] = r0; stack[stackpos + 53 + (i * 4 + 1) * 3 + axis] = r1; stack[stackpos + 53 + (i * 4 + 2) * 3 + axis] = r2; stack[stackpos + 53 + (i * 4 + 3) * 3 + axis] = r3; } } // copy current bbox size stack[stackpos + 48] = stack[stackpos + 53 + 48] = size; // finally - split uv ranges float umin = stack[stackpos + 49]; float umax = stack[stackpos + 51]; stack[stackpos + 49] = umin; stack[stackpos + 53 + 50] = stack[stackpos + 50]; stack[stackpos + 51] = stack[stackpos + 53 + 49] = (umin + umax) * 0.5f; stack[stackpos + 53 + 51] = umax; stack[stackpos + 53 + 52] = stack[stackpos + 52]; } else { // split in V direction for (int i = 0; i < 4; i++) { for (int axis = 0; axis < 3; axis++) { // load data float p0 = stack[stackpos + (0 * 4 + i) * 3 + axis]; float p1 = stack[stackpos + (1 * 4 + i) * 3 + axis]; float p2 = stack[stackpos + (2 * 4 + i) * 3 + axis]; float p3 = stack[stackpos + (3 * 4 + i) * 3 + axis]; // Split curve in the middle float q0 = p0; float q1 = (p0 + p1) * 0.5f; float q2 = q1 * 0.5f + (p1 + p2) * 0.25f; float r3 = p3; float r2 = (p2 + p3) * 0.5f; float r1 = r2 * 0.5f + (p1 + p2) * 0.25f; float q3 = (q2 + r1) * 0.5f; float r0 = q3; // load new curve data into the stack stack[stackpos + (0 * 4 + i) * 3 + axis] = q0; stack[stackpos + (1 * 4 + i) * 3 + axis] = q1; stack[stackpos + (2 * 4 + i) * 3 + axis] = q2; stack[stackpos + (3 * 4 + i) * 3 + axis] = q3; stack[stackpos + 53 + (0 * 4 + i) * 3 + axis] = r0; stack[stackpos + 53 + (1 * 4 + i) * 3 + axis] = r1; stack[stackpos + 53 + (2 * 4 + i) * 3 + axis] = r2; stack[stackpos + 53 + (3 * 4 + i) * 3 + axis] = r3; } } // copy current bbox size stack[stackpos + 48] = stack[stackpos + 53 + 48] = size; // finally - split uv ranges float vmin = stack[stackpos + 50]; float vmax = stack[stackpos + 52]; stack[stackpos + 53 + 49] = stack[stackpos + 49]; stack[stackpos + 50] = vmin; stack[stackpos + 52] = stack[stackpos + 53 + 50] = (vmin + vmax) * 0.5f; stack[stackpos + 53 + 51] = stack[stackpos + 51]; stack[stackpos + 53 + 52] = vmax; } stackpos += 53; } } | 51147 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51147/60ad3ecf07958b1e5dd6f377555c6fb7fbd5e425/BezierMesh.java/buggy/src/org/sunflow/core/tesselatable/BezierMesh.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
9136,
9840,
12,
54,
528,
436,
16,
509,
15610,
734,
16,
5294,
3464,
1119,
919,
13,
288,
3639,
368,
14961,
4729,
7619,
3639,
727,
1431,
8526,
2110,
273,
919,
18,
588,
14444,
64... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
9136,
9840,
12,
54,
528,
436,
16,
509,
15610,
734,
16,
5294,
3464,
1119,
919,
13,
288,
3639,
368,
14961,
4729,
7619,
3639,
727,
1431,
8526,
2110,
273,
919,
18,
588,
14444,
64... |
private static boolean forStatementMustRecurse(PsiForStatement forStatement, PsiMethod method) { | private static boolean forStatementMustRecurse(PsiForStatement forStatement, PsiMethod method){ | private static boolean forStatementMustRecurse(PsiForStatement forStatement, PsiMethod method) { final PsiStatement initialization = forStatement.getInitialization(); if (statementMustRecurse(initialization, method)) { return true; } final PsiExpression condition = forStatement.getCondition(); if (expressionMustRecurse(condition, method)) { return true; } if (BoolUtils.isTrue(condition)) { final PsiStatement body = forStatement.getBody(); return statementMustRecurse(body, method); } return false; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/5d60670c94763ec336e534e66ee87700ab0d35be/RecursionUtils.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/psiutils/RecursionUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
364,
3406,
10136,
426,
17682,
12,
52,
7722,
1290,
3406,
364,
3406,
16,
453,
7722,
1305,
707,
15329,
3639,
727,
453,
7722,
3406,
10313,
273,
364,
3406,
18,
588,
17701,
562... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
364,
3406,
10136,
426,
17682,
12,
52,
7722,
1290,
3406,
364,
3406,
16,
453,
7722,
1305,
707,
15329,
3639,
727,
453,
7722,
3406,
10313,
273,
364,
3406,
18,
588,
17701,
562... |
public static void log(String message, IStatus status) { if (message != null) { getDefault().getLog().log(StatusUtil.newStatus(IStatus.ERROR, message, null)); System.err.println(message + "\nReason:"); } getDefault().getLog().log(status); System.err.println(status.getMessage()); | public static void log(String message) { getDefault().getLog().log(StatusUtil.newStatus(IStatus.ERROR, message, null)); System.err.println(message); | public static void log(String message, IStatus status) { //1FTUHE0: ITPCORE:ALL - API - Status & logging - loss of semantic info if (message != null) { getDefault().getLog().log(StatusUtil.newStatus(IStatus.ERROR, message, null)); System.err.println(message + "\nReason:"); //$NON-NLS-1$ } getDefault().getLog().log(status); System.err.println(status.getMessage()); //1FTTJKV: ITPCORE:ALL - log(status) does not allow plugin information to be recorded } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/2417e14f8fbf30cc7a54f9f3ec3cbb3ba4885de7/IDEWorkbenchPlugin.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
613,
12,
780,
883,
16,
467,
1482,
1267,
13,
288,
202,
202,
759,
21,
4464,
57,
3900,
20,
30,
24142,
3513,
8607,
30,
4685,
300,
1491,
300,
2685,
473,
2907,
300,
8324... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
613,
12,
780,
883,
16,
467,
1482,
1267,
13,
288,
202,
202,
759,
21,
4464,
57,
3900,
20,
30,
24142,
3513,
8607,
30,
4685,
300,
1491,
300,
2685,
473,
2907,
300,
8324... |
} catch (BreakException bExcptn) { | } catch (BreakJump bExcptn) { | public RubyObject eval(Ruby ruby, RubyObject self) { while (true) { try { // while (!rb_gets().isNil() false) { // HACK +++ if (true) { // HACK --- try { getBodyNode().eval(ruby, self); } catch (RedoException rExcptn) { } } break; } catch (NextException nExcptn) { } catch (BreakException bExcptn) { break; } } return ruby.getNil(); } | 47619 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47619/786cea08c1dd2092a02d1254b49fbee371ace5f9/OptNNode.java/clean/org/jruby/nodes/OptNNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
5302,
12,
54,
10340,
22155,
16,
19817,
921,
365,
13,
288,
3639,
1323,
261,
3767,
13,
288,
5411,
775,
288,
7734,
368,
1323,
16051,
6731,
67,
14665,
7675,
291,
12616,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
5302,
12,
54,
10340,
22155,
16,
19817,
921,
365,
13,
288,
3639,
1323,
261,
3767,
13,
288,
5411,
775,
288,
7734,
368,
1323,
16051,
6731,
67,
14665,
7675,
291,
12616,
1435... |
if (getTable() != null) { List newTable = new ArrayList(getTable().size()); newTable.addAll(getTable()); | if (getTable() != null) { List newTable = new ArrayList(getTable().size()); newTable.addAll(getTable()); | public Node copyNodeScope(CRefNode refValue) { Node copy = new ScopeNode(null, refValue.cloneCRefNode(), getNextNode()); if (getTable() != null) { List newTable = new ArrayList(getTable().size()); newTable.addAll(getTable()); copy.setTable(newTable); } return copy; } | 48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/d31a76ee29d5978a9bec41e3ac9134cee024bcab/Node.java/buggy/org/jruby/nodes/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2029,
1610,
907,
3876,
12,
39,
1957,
907,
1278,
620,
13,
288,
202,
202,
907,
1610,
273,
394,
5468,
907,
12,
2011,
16,
1278,
620,
18,
14056,
39,
1957,
907,
9334,
6927,
907,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2029,
1610,
907,
3876,
12,
39,
1957,
907,
1278,
620,
13,
288,
202,
202,
907,
1610,
273,
394,
5468,
907,
12,
2011,
16,
1278,
620,
18,
14056,
39,
1957,
907,
9334,
6927,
907,
1... |
insertTransAttribute(transMeta.getId(), 0, "USING_THREAD_PRIORITIES", 0, transMeta.isUsingThreadPriorityManagment()?"Y":"N"); | public synchronized void insertTransformation(TransMeta transMeta) throws KettleDatabaseException { Row table = new Row(); table.addValue(new Value("ID_TRANSFORMATION", transMeta.getId())); table.addValue(new Value("NAME", transMeta.getName())); table.addValue(new Value("ID_STEP_READ", transMeta.getReadStep() ==null ? -1L : transMeta.getReadStep().getID())); table.addValue(new Value("ID_STEP_WRITE", transMeta.getWriteStep() ==null ? -1L : transMeta.getWriteStep().getID())); table.addValue(new Value("ID_STEP_INPUT", transMeta.getInputStep() ==null ? -1L : transMeta.getInputStep().getID())); table.addValue(new Value("ID_STEP_OUTPUT", transMeta.getOutputStep()==null ? -1L : transMeta.getOutputStep().getID())); table.addValue(new Value("ID_STEP_UPDATE", transMeta.getUpdateStep()==null ? -1L : transMeta.getUpdateStep().getID())); table.addValue(new Value("ID_DATABASE_LOG", transMeta.getLogConnection()==null ? -1L : transMeta.getLogConnection().getID())); table.addValue(new Value("TABLE_NAME_LOG", transMeta.getLogTable())); table.addValue(new Value("USE_BATCHID", transMeta.isBatchIdUsed())); table.addValue(new Value("USE_LOGFIELD", transMeta.isLogfieldUsed())); table.addValue(new Value("ID_DATABASE_MAXDATE", transMeta.getMaxDateConnection()==null ? -1L : transMeta.getMaxDateConnection().getID())); table.addValue(new Value("TABLE_NAME_MAXDATE", transMeta.getMaxDateTable())); table.addValue(new Value("FIELD_NAME_MAXDATE", transMeta.getMaxDateField())); table.addValue(new Value("OFFSET_MAXDATE", transMeta.getMaxDateOffset())); table.addValue(new Value("DIFF_MAXDATE", transMeta.getMaxDateDifference())); table.addValue(new Value("MODIFIED_USER", transMeta.getModifiedUser())); table.addValue(new Value("MODIFIED_DATE", transMeta.getModifiedDate())); table.addValue(new Value("SIZE_ROWSET", (long) transMeta.getSizeRowset())); table.addValue(new Value("ID_DIRECTORY", transMeta.getDirectory().getID())); database.prepareInsert(table, "R_TRANSFORMATION"); database.setValuesInsert(table); database.insertRow(); database.closeInsert(); insertTransAttribute(transMeta.getId(), 0, "UNIQUE_CONNECTIONS", 0, transMeta.isUsingUniqueConnections()?"Y":"N"); insertTransAttribute(transMeta.getId(), 0, "FEEDBACK_SHOWN", 0, transMeta.isFeedbackShown()?"Y":"N"); insertTransAttribute(transMeta.getId(), 0, "FEEDBACK_SIZE", transMeta.getFeedbackSize(), ""); // Save the logging connection link... if (transMeta.getLogConnection()!=null) insertStepDatabase(transMeta.getId(), -1L, transMeta.getLogConnection().getID()); // Save the maxdate connection link... if (transMeta.getMaxDateConnection()!=null) insertStepDatabase(transMeta.getId(), -1L, transMeta.getMaxDateConnection().getID()); } | 58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/648a567c65474805f079f0175535239c031d705f/Repository.java/clean/kettle/src/be/ibridge/kettle/repository/Repository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6387,
1429,
1499,
12,
2338,
2781,
18,
26321,
9334,
374,
16,
315,
3378,
1360,
67,
21730,
67,
7698,
916,
25673,
3113,
374,
16,
906,
2781,
18,
291,
7736,
3830,
8183,
49,
940,
475... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6387,
1429,
1499,
12,
2338,
2781,
18,
26321,
9334,
374,
16,
315,
3378,
1360,
67,
21730,
67,
7698,
916,
25673,
3113,
374,
16,
906,
2781,
18,
291,
7736,
3830,
8183,
49,
940,
475... | |
public static void addDnsServer(ProtocolAddress _dnsserver) throws NetworkException { if (resolver == null) { try { // resolver = (ExtendedResolver) Lookup.getDefaultResolver(); if (resolver == null) { resolver = new ExtendedResolver(); Lookup.setDefaultResolver(resolver); } } catch (UnknownHostException e) { throw new NetworkException("Can't add DnsServer", e); } } try { String key = _dnsserver.toString(); if (resolvers == null) { resolvers = new Hashtable(); } if (!resolvers.containsKey(key)) { SimpleResolver simpleResolver = new SimpleResolver(key); resolver.addResolver(simpleResolver); resolvers.put(key, simpleResolver); } } catch (UnknownHostException e) { throw new NetworkException("Can't add DnsServer", e); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/84f039f178ab04b2540694eaf8549c4946dbef40/ResolverImpl.java/buggy/net/src/net/org/jnode/net/ipv4/util/ResolverImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
918,
527,
18600,
2081,
12,
5752,
1887,
389,
14926,
3567,
13,
1216,
5128,
503,
95,
430,
261,
14122,
422,
446,
15329,
698,
95,
759,
14122,
273,
261,
11456,
4301,
13,
8834,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
918,
527,
18600,
2081,
12,
5752,
1887,
389,
14926,
3567,
13,
1216,
5128,
503,
95,
430,
261,
14122,
422,
446,
15329,
698,
95,
759,
14122,
273,
261,
11456,
4301,
13,
8834,
18,
588,
... | ||
props.setProperty("proxyPort", port+""); | props.setProperty(PROXY_PORT, port+""); | public synchronized void setProxyPort(int port) { proxyPort = port; props.setProperty("proxyPort", port+""); notify(Pref.PROXY_PORT); } | 36868 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/36868/34ba7c6c558f8559d4cf770e8e210f76122709a9/Preferences.java/buggy/src/nz/net/kallisti/emusicj/controller/Preferences.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
444,
3886,
2617,
12,
474,
1756,
13,
288,
3639,
2889,
2617,
273,
1756,
31,
3639,
3458,
18,
542,
1396,
12,
16085,
67,
6354,
16,
1756,
15,
3660,
1769,
6647,
5066,
12,
2321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
444,
3886,
2617,
12,
474,
1756,
13,
288,
3639,
2889,
2617,
273,
1756,
31,
3639,
3458,
18,
542,
1396,
12,
16085,
67,
6354,
16,
1756,
15,
3660,
1769,
6647,
5066,
12,
2321... |
return new BuildOutputStream(fManager.getStream(BuildConsoleManager.BUILD_STREAM_TYPE_INFO)); | return new BuildOutputStream(fManager.getStream(BuildConsoleManager.BUILD_STREAM_TYPE_ERROR)); | public ConsoleOutputStream getErrorStream() throws CoreException { return new BuildOutputStream(fManager.getStream(BuildConsoleManager.BUILD_STREAM_TYPE_INFO)); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/fdb7641d4594d72033ca03b1189b7ad16ee8930e/BuildConsolePartitioner.java/buggy/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
9657,
4632,
7926,
1228,
1435,
1216,
30015,
288,
202,
202,
2463,
394,
3998,
4632,
12,
74,
1318,
18,
588,
1228,
12,
3116,
10215,
1318,
18,
20215,
67,
13693,
67,
2399,
67,
5923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
9657,
4632,
7926,
1228,
1435,
1216,
30015,
288,
202,
202,
2463,
394,
3998,
4632,
12,
74,
1318,
18,
588,
1228,
12,
3116,
10215,
1318,
18,
20215,
67,
13693,
67,
2399,
67,
5923,
... |
(Character.isLowerCase(first) && Character.isUpperCase(second) || first != '_' && second == '_' || offset + 1 < text.length() && Character.isUpperCase(first) && Character.isUpperCase(second) && Character.isLowerCase(text.charAt(offset + 1)))) { | (Character.isLowerCase(prev) && Character.isUpperCase(current) || prev != '_' && current == '_' || Character.isUpperCase(prev) && Character.isUpperCase(current) && Character.isLowerCase(next))) { | public static boolean isWordEnd(CharSequence text, int offset, boolean isCamel) { char first = text.charAt(offset - 1); char second = text.charAt(offset); final boolean firstIsIdentifiePart = Character.isJavaIdentifierPart(first); final boolean secondIsIdentifierPart = Character.isJavaIdentifierPart(second); if (firstIsIdentifiePart && !secondIsIdentifierPart) { return true; } if (isCamel) { if (firstIsIdentifiePart && secondIsIdentifierPart && (Character.isLowerCase(first) && Character.isUpperCase(second) || first != '_' && second == '_' || offset + 1 < text.length() && Character.isUpperCase(first) && Character.isUpperCase(second) && Character.isLowerCase(text.charAt(offset + 1)))) { return true; } } return !Character.isWhitespace(first) && !firstIsIdentifiePart && (Character.isWhitespace(second) || secondIsIdentifierPart); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/805d72a7cb09c818b4c55721e6460adf31c004d3/EditorActionUtil.java/buggy/source/com/intellij/openapi/editor/actions/EditorActionUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
353,
3944,
1638,
12,
2156,
4021,
977,
16,
509,
1384,
16,
1250,
353,
16373,
13,
288,
565,
1149,
1122,
273,
977,
18,
3001,
861,
12,
3348,
300,
404,
1769,
565,
1149,
2205,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
353,
3944,
1638,
12,
2156,
4021,
977,
16,
509,
1384,
16,
1250,
353,
16373,
13,
288,
565,
1149,
1122,
273,
977,
18,
3001,
861,
12,
3348,
300,
404,
1769,
565,
1149,
2205,... |
public void setClip (int x, int y, int width, int height) | public void setClip(int x, int y, int width, int height) | public void setClip (int x, int y, int width, int height) { setClip(new Rectangle2D.Double ((double)x, (double)y, (double)width, (double)height)); } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/bef34bda2204726d6cecbf5422e100bc663abc3e/GdkGraphics2D.java/buggy/libraries/javalib/gnu/java/awt/peer/gtk/GdkGraphics2D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
11440,
3169,
12,
474,
619,
16,
509,
677,
16,
509,
1835,
16,
509,
2072,
13,
225,
288,
565,
11440,
3169,
12,
2704,
13264,
22,
40,
18,
5265,
14015,
9056,
13,
92,
16,
261,
9056... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
11440,
3169,
12,
474,
619,
16,
509,
677,
16,
509,
1835,
16,
509,
2072,
13,
225,
288,
565,
11440,
3169,
12,
2704,
13264,
22,
40,
18,
5265,
14015,
9056,
13,
92,
16,
261,
9056... |
protected void insertAfter(IContributionManager mgr, String refId, IAction action) { insertAfter(mgr, refId, new ActionContributionItem(action)); | protected void insertAfter(IContributionManager mgr, String refId, PluginAction action) { insertAfter(mgr, refId, new PluginActionContributionItem(action)); | protected void insertAfter(IContributionManager mgr, String refId, IAction action) { insertAfter(mgr, refId, new ActionContributionItem(action));} | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/3113adf073596bfd0c0770703963de0f288cda77/PluginActionBuilder.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
2243,
4436,
12,
45,
442,
4027,
1318,
13333,
16,
514,
1278,
548,
16,
225,
202,
45,
1803,
1301,
13,
288,
202,
6387,
4436,
12,
13552,
16,
1278,
548,
16,
394,
4382,
442,
4027,
1180,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
2243,
4436,
12,
45,
442,
4027,
1318,
13333,
16,
514,
1278,
548,
16,
225,
202,
45,
1803,
1301,
13,
288,
202,
6387,
4436,
12,
13552,
16,
1278,
548,
16,
394,
4382,
442,
4027,
1180,
... |
return createHashtableOfStringArrayFromSqlResults(data, meta) ; | return createHashtableOfStringArrayFromSqlResults( data, meta ); | public static Map sqlQueryHash(ConnectionPool conPool, String sqlQuery, String[] params) { DBConnect dbc = new DBConnect(conPool); dbc.setSQLString(sqlQuery, params); List data = dbc.executeQuery(); String[] meta = dbc.getColumnLabels(); return createHashtableOfStringArrayFromSqlResults(data, meta) ; } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/1ad33c9099b6999235d960a1be2d0fd723408b1c/SqlHelpers.java/buggy/server/src/imcode/server/db/SqlHelpers.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1635,
24451,
2310,
12,
1952,
2864,
356,
2864,
16,
514,
24451,
16,
514,
8526,
859,
13,
288,
3639,
2383,
5215,
9881,
273,
394,
2383,
5215,
12,
591,
2864,
1769,
3639,
9881,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1635,
24451,
2310,
12,
1952,
2864,
356,
2864,
16,
514,
24451,
16,
514,
8526,
859,
13,
288,
3639,
2383,
5215,
9881,
273,
394,
2383,
5215,
12,
591,
2864,
1769,
3639,
9881,
18,
... |
openLibrary( "LibraryToReload.xml" ); | openLibrary( libFilePath, false ); | public void testReloadLibraryWithInvalidExtends( ) throws Exception { openDesign( "DesignToReloadLibrary.xml" ); //$NON-NLS-1$ // make modification on its library. openLibrary( "LibraryToReload.xml" );//$NON-NLS-1$ libraryHandle.findElement( "libTable2" ).drop( ); //$NON-NLS-1$ GridHandle grid = libraryHandle.getElementFactory( ).newGridItem( "libTable2", 2, 2 ); //$NON-NLS-1$ libraryHandle.getComponents( ).add( grid ); libraryHandle.save( ); designHandle.reloadLibrary( libraryHandle ); TableHandle table2 = (TableHandle) designHandle.findElement( "table2" );//$NON-NLS-1$ assertNull( table2.getExtends( ) ); assertEquals( "Lib1.libTable2", table2.getElement( ).getExtendsName( ) ); //$NON-NLS-1$ // recover the original library file. recoverOriginalLibrary( "LibraryToReload_backup.xml", //$NON-NLS-1$ "LibraryToReload.xml" ); //$NON-NLS-1$ } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/14f7f5097c347fb97b4edd5251bb64dc3c62527b/ReloadLibraryTest.java/buggy/model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/library/ReloadLibraryTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
13013,
9313,
1190,
1941,
19581,
12,
262,
1216,
1185,
202,
95,
202,
202,
3190,
15478,
12,
315,
15478,
774,
13013,
9313,
18,
2902,
6,
11272,
4329,
3993,
17,
5106,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
13013,
9313,
1190,
1941,
19581,
12,
262,
1216,
1185,
202,
95,
202,
202,
3190,
15478,
12,
315,
15478,
774,
13013,
9313,
18,
2902,
6,
11272,
4329,
3993,
17,
5106,
17,
... |
Configuration config = snipsnap.api.app.Application.get().getConfiguration(); | Configuration config = Application.get().getConfiguration(); | public byte[] dumpXml() throws IOException { Configuration config = snipsnap.api.app.Application.get().getConfiguration(); ByteArrayOutputStream exportStream = new ByteArrayOutputStream(); XMLSnipExport.store(exportStream, space.getAll(), um.getAll(), null, null, config.getFilePath()); return exportStream.toByteArray(); } | 6853 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6853/b6c2287f5b3ca967208eed57480d56a7a852ba57/SnipSnapHandler.java/clean/src/org/snipsnap/xmlrpc/SnipSnapHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1160,
8526,
4657,
4432,
1435,
1216,
1860,
288,
565,
4659,
642,
273,
4257,
18,
588,
7675,
588,
1750,
5621,
565,
11559,
3359,
1228,
273,
394,
11559,
5621,
565,
3167,
10461,
625,
6144,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1160,
8526,
4657,
4432,
1435,
1216,
1860,
288,
565,
4659,
642,
273,
4257,
18,
588,
7675,
588,
1750,
5621,
565,
11559,
3359,
1228,
273,
394,
11559,
5621,
565,
3167,
10461,
625,
6144,
... |
assertTrue(((EncryptHeader)((Message)reply.getArg()).getHeader(ENCRYPT.EncryptHeader.KEY)).getType() == ENCRYPT.EncryptHeader.SECRETKEY); | assertEquals(((EncryptHeader)((Message)reply.getArg()).getHeader(EncryptHeader.KEY)).getType(), EncryptHeader.SECRETKEY); | public void testViewChangeNewKeyServerNewKey() throws Exception{ // create peer and server ENCRYPT peer = new ENCRYPT(); try { peer.init(); } catch (Exception e){ fail(e.getMessage()); } ENCRYPT server = new ENCRYPT(); try { server.init(); } catch (Exception e){ fail(e.getMessage()); } ENCRYPT peer2 = new ENCRYPT(); try { peer2.init(); } catch (Exception e){ fail(e.getMessage()); } // set up server server.keyServer = true; MockObserver serverObserver = new MockObserver(); server.setObserver(serverObserver); //set the local address and view change to simulate a started instance Address serverAddress = new MockAddress("server"); server.setLocal_addr(serverAddress); // set the server up as keyserver Vector serverVector = new Vector(); serverVector.add(serverAddress); View tempView = new View(new ViewId(serverAddress,1),serverVector); Event serverEvent = new Event(Event.VIEW_CHANGE,tempView); server.up(serverEvent); // set up peer as if it has started but not recieved view change Address peerAddress = new MockAddress("peer"); peer.setLocal_addr(peerAddress); MockObserver peerObserver = new MockObserver(); peer.setObserver(peerObserver); peer.keyServer = false; // set up peer2 with server as key server Address peer2Address = new MockAddress("peer2"); peer2.setLocal_addr(peer2Address); MockObserver peer2Observer = new MockObserver(); peer2.setObserver(peer2Observer); peer2.keyServer = false; peer2.setKeyServerAddr(serverAddress); // send an encrypted message from the server Message msg = new Message(); msg.setBuffer("hello".getBytes()); Event evt = new Event(Event.MSG,msg); server.down(evt); // message0 is in response to view change Event encEvt = (Event)serverObserver.getDownMessages().get("message1"); // sent to peer encrypted - should be queued in encyption layer as we do not have a keyserver set peer.up(encEvt); //assert that message is queued as we have no key from server assertTrue(peerObserver.getUpMessages().isEmpty()); // send a view change to peer where peer2 is controller Vector peerVector = new Vector(); peerVector.add(peer2Address); View tempPeerView = new View(new ViewId(peer2Address,1),peerVector); Event event = new Event(Event.VIEW_CHANGE,tempPeerView); // send to peer - should set peer2 as keyserver peer.up(event); // assert that peer\ keyserver address is now set assertTrue(peer2Address == peer.getKeyServerAddr()); // get the resulting message from the peer - should be a key request to peer2 Event sent = (Event)peerObserver.getDownMessages().get("message0"); // ensure type and that request contains peers pub key assertTrue(((EncryptHeader)((Message)sent.getArg()).getHeader(ENCRYPT.EncryptHeader.KEY)).getType() == ENCRYPT.EncryptHeader.KEY_REQUEST); assertEquals(new String(((Message)sent.getArg()).getBuffer()),new String(peer.getKpair().getPublic().getEncoded())); //assume that server is no longer available and peer2 is new server // but did not get the key from server before assuming role // send this event to peer2// send a view change to trigger the become key server // we use the fact that our address is now the controller one // send a view change where we are not the controller Vector peer2Vector = new Vector(); peer2Vector.add(peer2Address); View tempPeer2View = new View(new ViewId(peer2Address,1),peer2Vector); Event event2 = new Event(Event.VIEW_CHANGE,tempPeer2View); // this should have changed us to the key server peer2.up(event2); peer2.up(sent); Event reply = (Event)peer2Observer.getDownMessages().get("message1"); //assert that reply is the session key encrypted with peer's public key assertTrue(((EncryptHeader)((Message)reply.getArg()).getHeader(ENCRYPT.EncryptHeader.KEY)).getType() == ENCRYPT.EncryptHeader.SECRETKEY); assertNotSame(peer.getDesKey(),peer2.getDesKey()); assertNotSame(server.getDesKey(),peer2.getDesKey()); // now send back to peer peer.up(reply); // assert that both now have same key assertEquals(peer.getDesKey(),peer2.getDesKey()); assertNotSame(server.getDesKey(),peer.getDesKey()); // send another encrypted message to peer to test queue Message msg2 = new Message(); msg2.setBuffer("hello2".getBytes()); Event evt2 = new Event(Event.MSG,msg2); peer2.down(evt2); Event Evt2 = (Event)peer2Observer.getDownMessages().get("message2"); peer.up(Evt2); // make sure we have the events now in the up layers assertEquals(2,peerObserver.getUpMessages().size()); Event tempEvt = (Event)peerObserver.getUpMessages().get("message2"); assertEquals(new String(((Message)tempEvt.getArg()).getBuffer()),"hello2"); } | 3550 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3550/28be62b4097e0b01b17ca403d23ca6a4aac01eca/ENCRYPTAsymmetricTest.java/clean/tests/junit/org/jgroups/protocols/ENCRYPTAsymmetricTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1767,
3043,
1908,
653,
2081,
1908,
653,
1435,
1216,
1185,
95,
202,
202,
759,
752,
4261,
471,
1438,
202,
202,
1157,
14306,
4261,
273,
394,
6693,
14306,
5621,
202,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1767,
3043,
1908,
653,
2081,
1908,
653,
1435,
1216,
1185,
95,
202,
202,
759,
752,
4261,
471,
1438,
202,
202,
1157,
14306,
4261,
273,
394,
6693,
14306,
5621,
202,
202,... |
private void checkTestSetPrefixSoap2(String soapEnvelope) throws Exception { xpp.setInput(new StringReader(soapEnvelope)); xpp.setFeature(xpp.FEATURE_PROCESS_NAMESPACES, true); xpp.require(xpp.START_DOCUMENT, null, null); xpp.next(); // essentially moveToContent() xpp.require(xpp.START_TAG, ENV, "Envelope"); xpp.nextTag(); xpp.require(xpp.START_TAG, ENV, "Header"); xpp.nextTag(); xpp.require(xpp.START_TAG, ALERTCONTROL, "alertcontrol"); String mustUderstand = xpp.getAttributeValue(ENV, "mustUnderstand"); assertEquals("true", mustUderstand); String role = xpp.getAttributeValue(ENV, "role"); assertEquals(ROLE, role); xpp.nextTag(); xpp.require(xpp.START_TAG, ALERTCONTROL, "priority"); String text = xpp.nextText(); assertEquals("1", text); //Integer.parseInt(text); xpp.nextTag(); xpp.require(xpp.START_TAG, ALERTCONTROL, "expires"); text = xpp.nextText(); assertEquals(EXPIRES, text); xpp.nextTag(); xpp.require(xpp.END_TAG, ALERTCONTROL, "alertcontrol"); xpp.nextTag(); xpp.require(xpp.END_TAG, ENV, "Header"); xpp.nextTag(); xpp.require(xpp.START_TAG, ENV, "Body"); xpp.nextTag(); xpp.require(xpp.START_TAG, ALERT, "alert"); xpp.nextTag(); xpp.require(xpp.START_TAG, ALERT, "msg"); text = xpp.nextText(); assertEquals(MSG, text); xpp.nextTag(); xpp.require(xpp.END_TAG, ALERT, "alert"); xpp.nextTag(); xpp.require(xpp.END_TAG, ENV, "Body"); xpp.nextTag(); xpp.require(xpp.END_TAG, ENV, "Envelope"); xpp.next(); xpp.require(xpp.END_DOCUMENT, null, null); } | 3949 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3949/667d531516f3ff0957c7b5ab81ff2a9dc2ffe4e6/TestSerializeWithNs.java/clean/src/java/tests/org/xmlpull/v1/tests/TestSerializeWithNs.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
4709,
694,
2244,
20601,
22,
12,
780,
9930,
10862,
13,
1216,
1185,
288,
3639,
619,
11858,
18,
542,
1210,
12,
2704,
26227,
12,
19215,
10862,
10019,
3639,
619,
11858,
18,
542... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
4709,
694,
2244,
20601,
22,
12,
780,
9930,
10862,
13,
1216,
1185,
288,
3639,
619,
11858,
18,
542,
1210,
12,
2704,
26227,
12,
19215,
10862,
10019,
3639,
619,
11858,
18,
542... | ||
return getAsset().getName() + " Linkid : " + linkid; | return getName() + " Linkid : " + linkid; | public String toString() { return getAsset().getName() + " Linkid : " + linkid; } | 7783 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7783/2e0ba0f92c19c555d277beef3df40501c8214d09/MatrixTreeNode.java/buggy/core/lib/asset_map/java/src/net/squiz/matrix/matrixtree/MatrixTreeNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1762,
1435,
288,
202,
202,
2463,
24689,
7675,
17994,
1435,
397,
315,
4048,
350,
294,
315,
397,
1692,
350,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1762,
1435,
288,
202,
202,
2463,
24689,
7675,
17994,
1435,
397,
315,
4048,
350,
294,
315,
397,
1692,
350,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
conf.getInt("io.file.buffer.size", 4096))); | bufferSize)); | public FSDataOutputStream(FileSystem fs, File file, boolean overwrite, Configuration conf) throws IOException { super(new Buffer(new PositionCache(new Summer(fs, file, overwrite, conf)), conf.getInt("io.file.buffer.size", 4096))); } | 51718 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51718/553d462ed01628cc682ae5e9bb1eb7a7c2e43333/FSDataOutputStream.java/clean/src/java/org/apache/hadoop/fs/FSDataOutputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
9247,
751,
4632,
12,
11785,
2662,
16,
1387,
585,
16,
11794,
1250,
6156,
16,
4659,
2195,
13,
565,
1216,
1860,
288,
565,
2240,
12,
2704,
3525,
12,
2704,
11010,
1649,
12,
2704,
9352,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
9247,
751,
4632,
12,
11785,
2662,
16,
1387,
585,
16,
11794,
1250,
6156,
16,
4659,
2195,
13,
565,
1216,
1860,
288,
565,
2240,
12,
2704,
3525,
12,
2704,
11010,
1649,
12,
2704,
9352,
... |
} /* We can't run SVG script in any old Context; it has to be a * Context created by the Batik classes. (If we fail to do this, * various things go wrong in the script. Notably, any attempt to * refer to "document" throws a ClassCastException.) See the * SVGCanvas.SVGUI methods for the code that ensures this. */ if (!(context instanceof RhinoInterpreter.ExtendedContext)) { throw new AssertionError("Tried to run ECMAScript for SVG in a non-Batik Context"); | public void callUIMethod(Function method, List params, Completion callback) { try { Context context = Context.enter(); synchronized (callInProgress) { if (callInProgress == Boolean.TRUE) throw new AssertionError("Tried to run two ECMAScript calls at the same time"); callInProgress = Boolean.TRUE; } /* We can't run SVG script in any old Context; it has to be a * Context created by the Batik classes. (If we fail to do this, * various things go wrong in the script. Notably, any attempt to * refer to "document" throws a ClassCastException.) See the * SVGCanvas.SVGUI methods for the code that ensures this. */ if (!(context instanceof RhinoInterpreter.ExtendedContext)) { throw new AssertionError("Tried to run ECMAScript for SVG in a non-Batik Context"); } context.setWrapFactory(rpcWrapFactory); try { Object ret = method.call(context, scope, game, params.toArray()); if (ret instanceof Undefined) { // function returned void, but RPC result has to be non-void ret = Boolean.TRUE; } if (callback != null) callback.result(ret); } catch (JavaScriptException ex) { errorHandler.error(ex); if (callback != null) callback.error(ex); } } finally { synchronized (callInProgress) { callInProgress = Boolean.FALSE; } Context.exit(); } } | 49579 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49579/e6246d57d7f25805d991992f9942a16d9e13968a/TestUI.java/clean/Javolin/source/org/volity/testbench/TestUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
745,
5370,
1305,
12,
2083,
707,
16,
987,
859,
16,
20735,
1348,
13,
565,
288,
3639,
775,
288,
5411,
1772,
819,
273,
1772,
18,
2328,
5621,
5411,
3852,
261,
1991,
13434,
13,
288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
745,
5370,
1305,
12,
2083,
707,
16,
987,
859,
16,
20735,
1348,
13,
565,
288,
3639,
775,
288,
5411,
1772,
819,
273,
1772,
18,
2328,
5621,
5411,
3852,
261,
1991,
13434,
13,
288... | |
String username = iq.element("username").getTextTrim(); | String username = query.elementTextTrim("username"); | public synchronized IQ handleIQ(IQ packet) throws UnauthorizedException, PacketException { try { Session session = sessionManager.getSession(packet.getFrom()); IQ response = null; try { Element iq = packet.getElement(); if (IQ.Type.get == packet.getType()) { String username = iq.element("username").getTextTrim(); probeResponse.element("username").setText(username); response = IQ.createResultIQ(new IQ(probeResponse)); } // Otherwise set query else { if (iq.elements().isEmpty()) { // Anonymous authentication response = anonymousLogin(session, packet); } else { String username = iq.element("username").getTextTrim(); // Login authentication String password = null; if (iq.element("password") != null) { password = iq.element("password").getTextTrim(); } String digest = null; if (iq.element("digest") != null) { digest = iq.element("digest").getTextTrim().toLowerCase(); } // If we're already logged in, this is a password reset if (session.getStatus() == Session.STATUS_AUTHENTICATED) { response = passwordReset(password, packet, username, session); } else { // it is an auth attempt response = login(username, iq, packet, response, password, session, digest); } } } } catch (UserNotFoundException e) { response = IQ.createResultIQ(packet); response.setError(PacketError.Condition.not_authorized); } catch (UnauthorizedException e) { response = IQ.createResultIQ(packet); response.setError(PacketError.Condition.not_authorized); } deliverer.deliver(response); } catch (Exception e) { Log.error("Error handling authentication IQ packet", e); } return null; } | 6161 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6161/3d8faa45a459587f44b4646ed376f4cfe5fe7029/IQAuthHandler.java/clean/src/java/org/jivesoftware/messenger/handler/IQAuthHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
26950,
1640,
45,
53,
12,
45,
53,
4414,
13,
1216,
24830,
16,
11114,
503,
288,
3639,
775,
288,
5411,
3877,
1339,
273,
1339,
1318,
18,
588,
2157,
12,
11482,
18,
588,
1265,
1066... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
26950,
1640,
45,
53,
12,
45,
53,
4414,
13,
1216,
24830,
16,
11114,
503,
288,
3639,
775,
288,
5411,
3877,
1339,
273,
1339,
1318,
18,
588,
2157,
12,
11482,
18,
588,
1265,
1066... |
MockHttpServletResponse response = new MockHttpServletResponse(); | GrailsHttpServletResponse response = new GrailsHttpServletResponse(new MockHttpServletResponse()); | public void testParamsDynamicProperty() throws Exception { GroovyClassLoader gcl = new GroovyClassLoader(); MockHttpServletRequest request = new MockHttpServletRequest(); request.setCharacterEncoding("utf-8"); MockHttpServletResponse response = new MockHttpServletResponse(); request.addParameter("testParam", "testValue"); Class groovyClass = gcl.parseClass( "class TestController {\n" + "def list = {\n" + "}\n" + "}" ); GrailsControllerHelper helper1 = makeControllerHelper(groovyClass, gcl); try { helper1.handleURI("/test/list",request,response); GroovyObject go = (GroovyObject)request.getAttribute(GrailsApplicationAttributes.CONTROLLER); Object params = go.getProperty( "params" ); assertNotNull(params); assertTrue(params instanceof Map); Map paramsMap = (Map)params; assertTrue(paramsMap.containsKey("testParam")); assertEquals("testValue",paramsMap.get("testParam")); } catch(MissingMethodException mme) { fail("Missing method exception should not have been thrown!"); } catch(MissingPropertyException mpex) { fail("Missing property exception should not have been thrown!"); } } | 26970 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/26970/a69de2359e35657b0bda15659649eb6cfeeeac77/ControllerMetaClassTests.java/clean/test/web/org/codehaus/groovy/grails/web/metaclass/ControllerMetaClassTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1370,
9791,
1396,
1435,
1216,
1185,
288,
540,
20841,
7805,
314,
830,
273,
394,
20841,
7805,
5621,
540,
7867,
2940,
18572,
590,
273,
394,
7867,
2940,
18572,
5621,
540,
590,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1370,
9791,
1396,
1435,
1216,
1185,
288,
540,
20841,
7805,
314,
830,
273,
394,
20841,
7805,
5621,
540,
7867,
2940,
18572,
590,
273,
394,
7867,
2940,
18572,
5621,
540,
590,
... |
if (e.getPropertyName().equals(AbstractAction.ENABLED_PROPERTY)) | if (e.getPropertyName().equals("enabled")) | public void propertyChange(PropertyChangeEvent e) { Action act = (Action) (e.getSource()); if (e.getPropertyName().equals(AbstractAction.ENABLED_PROPERTY)) setEnabled(act.isEnabled()); else if (e.getPropertyName().equals(Action.NAME)) setText((String)(act.getValue(Action.NAME))); else if (e.getPropertyName().equals(Action.SMALL_ICON)) setIcon((Icon)(act.getValue(Action.SMALL_ICON))); else if (e.getPropertyName().equals(Action.SHORT_DESCRIPTION)) setToolTipText((String)(act.getValue(Action.SHORT_DESCRIPTION))); else if (e.getPropertyName().equals(Action.MNEMONIC_KEY)) if (act.getValue(Action.MNEMONIC_KEY) != null) setMnemonic(((Integer)(act.getValue(Action.MNEMONIC_KEY))).intValue()); else if (e.getPropertyName().equals(Action.ACTION_COMMAND_KEY)) setActionCommand((String)(act.getValue(Action.ACTION_COMMAND_KEY))); } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/c754360f408c2c16385a58f8faaf10fbcf3e9594/AbstractButton.java/buggy/libraries/javalib/javax/swing/AbstractButton.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1272,
3043,
12,
1396,
20930,
425,
13,
3639,
288,
1850,
4382,
1328,
273,
261,
1803,
13,
261,
73,
18,
588,
1830,
10663,
1082,
225,
309,
261,
73,
18,
588,
13073,
7675,
14963,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1272,
3043,
12,
1396,
20930,
425,
13,
3639,
288,
1850,
4382,
1328,
273,
261,
1803,
13,
261,
73,
18,
588,
1830,
10663,
1082,
225,
309,
261,
73,
18,
588,
13073,
7675,
14963,
12... |
public void run() { initialize(); while (true) { // sleep until awoken synchronized(this) { try { wait(); } catch (InterruptedException e) { e.printStackTrace(); } } // we've been awoken, process the information try { thresholdReached(); } catch (Exception e) { VM.sysWrite("AOS: WARNING: exception in organizer "+this+"\n"); e.printStackTrace(); // Is there a more elegant way to make this exception fatal to // the application? System.exit(-1); } } } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/8d583baf18b4f8c8aa0d97cf3bbc496c1f5624dd/VM_Organizer.java/buggy/rvm/src/vm/adaptive/runtimeMeasurements/organizers/VM_Organizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
2681,
1435,
95,
11160,
5621,
17523,
12,
3767,
15329,
759,
19607,
12198,
2219,
3573,
15666,
12,
2211,
15329,
698,
95,
202,
7048,
5621,
97,
14683,
12,
24485,
503,
73,
15329,
202,
73,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
2681,
1435,
95,
11160,
5621,
17523,
12,
3767,
15329,
759,
19607,
12198,
2219,
3573,
15666,
12,
2211,
15329,
698,
95,
202,
7048,
5621,
97,
14683,
12,
24485,
503,
73,
15329,
202,
73,
... | ||
for (Iterator i = children.iterator(); i.hasNext();) { Component comp = (Component) i.next(); Dimension sz = comp.getMaximumSize(); x += sz.width; if (x < 0) x = Integer.MAX_VALUE; y = Math.max(y, sz.height); } | hReq = SizeRequirements.getTiledSizeRequirements(hSizeReqs); vReq = SizeRequirements.getAlignedSizeRequirements(vSizeReqs); | public Dimension maximumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.top + insets.bottom; List children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (Iterator i = children.iterator(); i.hasNext();) { Component comp = (Component) i.next(); Dimension sz = comp.getMaximumSize(); x += sz.width; // Check for overflow. if (x < 0) x = Integer.MAX_VALUE; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (Iterator i = children.iterator(); i.hasNext();) { Component comp = (Component) i.next(); Dimension sz = comp.getMaximumSize(); y += sz.height; // Check for overflow if (y < 0) y = Integer.MAX_VALUE; x = Math.max(x, sz.width); } } return new Dimension(x, y); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/e607bce31cfb856ba77722e6c4f9f876b63f1cf8/BoxLayout.java/clean/core/src/classpath/javax/javax/swing/BoxLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13037,
4207,
3744,
1225,
12,
2170,
982,
13,
225,
288,
565,
309,
261,
2938,
480,
1478,
13,
1377,
604,
394,
432,
8588,
668,
2932,
5387,
982,
8863,
3639,
22300,
23576,
273,
982,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13037,
4207,
3744,
1225,
12,
2170,
982,
13,
225,
288,
565,
309,
261,
2938,
480,
1478,
13,
1377,
604,
394,
432,
8588,
668,
2932,
5387,
982,
8863,
3639,
22300,
23576,
273,
982,
18,
... |
return mValue; | return mValue.getTarget(); | public String getAsText() { return mValue; } | 7933 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7933/8fee1d6fa57d44364f221f6a7411f27553f537d1/ConfigElementPointerEditor.java/buggy/modules/jackal/editors/org/vrjuggler/jccl/editors/ConfigElementPointerEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
514,
13122,
1528,
1435,
282,
288,
1377,
327,
26658,
18,
588,
2326,
5621,
282,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
514,
13122,
1528,
1435,
282,
288,
1377,
327,
26658,
18,
588,
2326,
5621,
282,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
setErrorText(null); | setErrorText(null); | public void editorValueChanged(boolean oldValidState, boolean newValidState) { if (!newValidState) { // currently not valid so show an error message setErrorText(editor.getErrorMessage()); } else { // currently valid setErrorText(null); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/1ccb6f8ddf35b3b40ebd3ebe3e7982aa947ec045/PropertySheetEntry.java/buggy/bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheetEntry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
4858,
620,
5033,
12,
6494,
1592,
1556,
1119,
16,
7734,
1250,
394,
1556,
1119,
13,
288,
5411,
309,
16051,
2704,
1556,
1119,
13,
288,
9506,
202,
759,
4551,
486,
923,
1427,
2405,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
4858,
620,
5033,
12,
6494,
1592,
1556,
1119,
16,
7734,
1250,
394,
1556,
1119,
13,
288,
5411,
309,
16051,
2704,
1556,
1119,
13,
288,
9506,
202,
759,
4551,
486,
923,
1427,
2405,
... |
if(proxy == structure.getRootElement()) { | if (proxy == structure.getRootElement()) { | public TestNGResults(final Project project, final TestNGConsoleView console) { this.project = project; model = new TestNGResultsTableModel(); this.consoleProperties = console.getConsoleProperties(); resultsTable = new TableView(model); rootNode = new TreeRootNode(); final TestTreeStructure structure = new TestTreeStructure(project, rootNode); tree.attachToModel(project, structure.getRootElement(), console.getConsoleProperties()); treeBuilder = new TestTreeBuilder(tree, structure); toolbarPanel.setLayout(new BorderLayout()); toolbarPanel.add(new ToolbarPanel(console.getConsoleProperties(), this)); animator = new Animator(treeBuilder); tree.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener() { public void valueChanged(TreeSelectionEvent e) { TreePath path = e.getPath(); if (path == null) return; TestProxy proxy = TestTreeView.getObject(path); if(proxy == null) return; if(ScrollToTestSourceAction.isScrollEnabled(TestNGResults.this)) { OpenSourceUtil.openSourcesFrom(tree, false); } if(proxy == structure.getRootElement()) { console.reset(); } else { List<TestNGConsoleView.Chunk> output = proxy.getOutput(); console.setView(output); } } }); progress.setColor(ColorProgressBar.GREEN); GuiUtils.replaceJSplitPaneWithIDEASplitter(splitPane); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/4cc1ae735fc300655676abd1d78bcef2bedd3b37/TestNGResults.java/buggy/plugins/testng/src/com/theoryinpractice/testng/ui/TestNGResults.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
7766,
4960,
3447,
12,
6385,
5420,
1984,
16,
727,
7766,
4960,
10215,
1767,
2983,
13,
288,
3639,
333,
18,
4406,
273,
1984,
31,
3639,
938,
273,
394,
7766,
4960,
3447,
1388,
1488,
5621,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
7766,
4960,
3447,
12,
6385,
5420,
1984,
16,
727,
7766,
4960,
10215,
1767,
2983,
13,
288,
3639,
333,
18,
4406,
273,
1984,
31,
3639,
938,
273,
394,
7766,
4960,
3447,
1388,
1488,
5621,... |
public ASTASMDefinition( IContainerSymbol scope, String assembly, int first, int last ) | public ASTASMDefinition( IContainerSymbol scope, String assembly, int first, int firstLine, int last , int lastLine ) | public ASTASMDefinition( IContainerSymbol scope, String assembly, int first, int last ) { super( scope ); this.assembly = assembly; setStartingOffset(first); setEndingOffset(last); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/a38f5c4f0dd1208b4df07f8a318b103677fbf77a/ASTASMDefinition.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/ASTASMDefinition.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9183,
3033,
49,
1852,
12,
467,
2170,
5335,
2146,
16,
514,
19931,
16,
509,
1122,
16,
509,
24415,
16,
509,
1142,
269,
509,
31661,
262,
565,
288,
3639,
2240,
12,
2146,
11272,
3639,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9183,
3033,
49,
1852,
12,
467,
2170,
5335,
2146,
16,
514,
19931,
16,
509,
1122,
16,
509,
24415,
16,
509,
1142,
269,
509,
31661,
262,
565,
288,
3639,
2240,
12,
2146,
11272,
3639,
3... |
boolean matches(Invocation invocation); | boolean matches( Invocation invocation ); | boolean matches(Invocation invocation); | 2796 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2796/065d08edd62599d5d244a9317db470157690f4f9/InvocationMatcher.java/buggy/jmock/core/src/org/jmock/core/InvocationMatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
1885,
12,
9267,
9495,
1769,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
1885,
12,
9267,
9495,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return (RubyModule) setConstant(name, getRuntime().defineModuleUnder(name, cref)); | return (RubyModule) setConstant(name, getRuntime().defineModuleUnder(name, cref)); | public RubyModule defineModuleUnder(String name) { IRubyObject type = getConstantAt(name); if (type == null) { return (RubyModule) setConstant(name, getRuntime().defineModuleUnder(name, cref)); } if (!(type instanceof RubyModule)) { throw getRuntime().newTypeError(name + " is not a module."); } return (RubyModule) type; } | 49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/1278c5bb3507a052d150d814f15453542ae41aed/RubyModule.java/buggy/src/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
3120,
4426,
3120,
14655,
12,
780,
508,
13,
288,
3639,
15908,
10340,
921,
618,
273,
24337,
861,
12,
529,
1769,
7734,
309,
261,
723,
422,
446,
13,
288,
5411,
327,
261,
54,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
3120,
4426,
3120,
14655,
12,
780,
508,
13,
288,
3639,
15908,
10340,
921,
618,
273,
24337,
861,
12,
529,
1769,
7734,
309,
261,
723,
422,
446,
13,
288,
5411,
327,
261,
54,
10... |
if (logger.isInfoEnabled()) logger.info("Outside Load Changed to Moderate"); | if (logger.isInfoEnabled()) logger.info("Outside Load Changed to Moderate for enclave " + arManager); | public void doGet(HttpServletRequest request, HttpServletResponse response) { String none = request.getParameter(NONE); String moderate = request.getParameter(MODERATE); String high = request.getParameter(HIGH); response.setContentType("text/html"); OutsideLoadDiagnosis diag = null; blackboard.openTransaction(); Collection c = blackboard.query(OutsideLoadDiagnosis.pred); Iterator iter = c.iterator(); if (iter.hasNext()) { diag = (OutsideLoadDiagnosis)iter.next(); } try { PrintWriter out = response.getWriter(); sendData(out); if (diag == null) { try { diag = new OutsideLoadDiagnosis("LOCAL", serviceBroker); } catch (TechSpecNotFoundException e) { logger.error(e.toString()); } blackboard.publishAdd(diag); } try { if (none != null) { diag.setValue(NONE); out.println("<center><h2>Outside Load Changed to None </h2></center><br>" ); blackboard.publishChange(diag); if (logger.isInfoEnabled()) logger.info("Outside Load Changed to None"); } else if (moderate != null) { diag.setValue(MODERATE); out.println("<center><h2>Outside Load Changed to Moderate</h2></center><br>" ); blackboard.publishChange(diag); if (logger.isInfoEnabled()) logger.info("Outside Load Changed to Moderate"); } else if (high != null) { diag.setValue(HIGH); out.println("<center><h2>Outside Load Changed to High</h2></center><br>" ); blackboard.publishChange(diag); if (logger.isInfoEnabled()) logger.info("Outside Load Changed to High"); } } catch (IllegalValueException e) { logger.error(e.toString()); } out.close(); } catch (java.io.IOException e) { e.printStackTrace(); } blackboard.closeTransaction(); } | 11869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11869/faf9a76d1a9a6d939e67fe5edb39e3898ec7dedf/OutsideLoadServlet.java/buggy/Coordinator/src/org/cougaar/coordinator/sensors/load/OutsideLoadServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
23611,
12,
2940,
18572,
590,
16,
12446,
766,
13,
288,
3639,
514,
6555,
273,
590,
18,
588,
1662,
12,
9826,
1769,
3639,
514,
681,
12600,
273,
590,
18,
588,
1662,
12,
6720,
654... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
23611,
12,
2940,
18572,
590,
16,
12446,
766,
13,
288,
3639,
514,
6555,
273,
590,
18,
588,
1662,
12,
9826,
1769,
3639,
514,
681,
12600,
273,
590,
18,
588,
1662,
12,
6720,
654... |
if(request.isParameterSet("inverse")){ isInversed = true; | if(request.isParameterSet("reversed")){ isReverted = true; | public void handleGet(URI uri, ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { final HTTPRequest request = new HTTPRequest(uri); String path = uri.getPath(); if(path.endsWith("myref.fref")) { SimpleFieldSet fs = node.exportPublicFieldSet(); StringWriter sw = new StringWriter(); fs.writeTo(sw); this.writeReply(ctx, 200, "text/plain", "OK", sw.toString()); return; } final boolean advancedEnabled = node.isAdvancedDarknetEnabled(); final boolean fProxyJavascriptEnabled = node.isFProxyJavascriptEnabled(); /* gather connection statistics */ PeerNodeStatus[] peerNodeStatuses = node.getPeerNodeStatuses(); Arrays.sort(peerNodeStatuses, new Comparator() { public int compare(Object first, Object second) { int result = 0; boolean isSet = true; PeerNodeStatus firstNode = (PeerNodeStatus) first; PeerNodeStatus secondNode = (PeerNodeStatus) second; if(request.isParameterSet("sortBy")){ final String sortBy = request.getParam("sortBy"); if(sortBy.equals("name")){ result = firstNode.getName().compareToIgnoreCase(secondNode.getName()); }else if(sortBy.equals("address")){ result = firstNode.getPeerAddress().compareToIgnoreCase(secondNode.getPeerAddress()); }else if(sortBy.equals("location")){ double diff = firstNode.getLocation() - secondNode.getLocation(); result = diff > 0 ? -1 : 1; // It shouldn't ever be equal anyway }else if(sortBy.equals("version")){ result = firstNode.getVersion().compareTo(secondNode.getVersion()); }else if(sortBy.equals("privnote")){ result = firstNode.getPrivateDarknetCommentNote().compareTo(secondNode.getPrivateDarknetCommentNote()); }else isSet=false; } if(!isSet){ int statusDifference = firstNode.getStatusValue() - secondNode.getStatusValue(); if (statusDifference == 0) result = statusDifference; else result = firstNode.getName().compareToIgnoreCase(secondNode.getName()); } if(request.isParameterSet("inverse")){ isInversed = true; return (result == 0 ? 0 : (result == 1 ? -1 : 1)); }else{ isInversed = false; return result; } } }); int numberOfConnected = PeerNodeStatus.getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_CONNECTED); int numberOfRoutingBackedOff = PeerNodeStatus.getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_ROUTING_BACKED_OFF); int numberOfTooNew = PeerNodeStatus.getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_TOO_NEW); int numberOfTooOld = PeerNodeStatus.getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_TOO_OLD); int numberOfDisconnected = PeerNodeStatus.getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_DISCONNECTED); int numberOfNeverConnected = PeerNodeStatus.getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_NEVER_CONNECTED); int numberOfDisabled = PeerNodeStatus.getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_DISABLED); int numberOfBursting = PeerNodeStatus.getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_BURSTING); int numberOfListening = PeerNodeStatus.getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_LISTENING); int numberOfListenOnly = PeerNodeStatus.getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_LISTEN_ONLY); int numberOfSimpleConnected = numberOfConnected + numberOfRoutingBackedOff; int numberOfNotConnected = numberOfTooNew + numberOfTooOld + numberOfDisconnected + numberOfNeverConnected + numberOfDisabled + numberOfBursting + numberOfListening + numberOfListenOnly; String titleCountString = null; if(advancedEnabled) { titleCountString = "(" + numberOfConnected + '/' + numberOfRoutingBackedOff + '/' + numberOfTooNew + '/' + numberOfTooOld + '/' + numberOfNotConnected + ')'; } else { titleCountString = (numberOfNotConnected + numberOfSimpleConnected)>0 ? String.valueOf(numberOfSimpleConnected) : ""; } HTMLNode pageNode = ctx.getPageMaker().getPageNode(titleCountString + " Darknet Peers of " + node.getMyName()); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); // FIXME! We need some nice images long now = System.currentTimeMillis(); contentNode.addChild(core.alerts.createSummary()); if(peerNodeStatuses.length>0){ /* node status values */ long nodeUptimeSeconds = (now - node.startupTime) / 1000; int bwlimitDelayTime = (int) node.getBwlimitDelayTime(); int nodeAveragePingTime = (int) node.getNodeAveragePingTime(); int networkSizeEstimateSession = node.getNetworkSizeEstimate(-1); int networkSizeEstimateRecent = 0; if(nodeUptimeSeconds > (48*60*60)) { // 48 hours networkSizeEstimateRecent = node.getNetworkSizeEstimate(now - (48*60*60*1000)); // 48 hours } DecimalFormat fix4 = new DecimalFormat("0.0000"); double routingMissDistance = node.routingMissDistance.currentValue(); DecimalFormat fix1 = new DecimalFormat("##0.0%"); double backedOffPercent = node.backedOffPercent.currentValue(); String nodeUptimeString = TimeUtil.formatTime(nodeUptimeSeconds * 1000); // *1000 to convert to milliseconds // BEGIN OVERVIEW TABLE HTMLNode overviewTable = contentNode.addChild("table", "class", "column"); HTMLNode overviewTableRow = overviewTable.addChild("tr"); HTMLNode nextTableCell = overviewTableRow.addChild("td", "class", "first"); /* node status overview box */ if(advancedEnabled) { HTMLNode overviewInfobox = nextTableCell.addChild("div", "class", "infobox"); overviewInfobox.addChild("div", "class", "infobox-header", "Node status overview"); HTMLNode overviewInfoboxContent = overviewInfobox.addChild("div", "class", "infobox-content"); HTMLNode overviewList = overviewInfoboxContent.addChild("ul"); overviewList.addChild("li", "bwlimitDelayTime:\u00a0" + bwlimitDelayTime + "ms"); overviewList.addChild("li", "nodeAveragePingTime:\u00a0" + nodeAveragePingTime + "ms"); overviewList.addChild("li", "networkSizeEstimateSession:\u00a0" + networkSizeEstimateSession + "\u00a0nodes"); if(nodeUptimeSeconds > (48*60*60)) { // 48 hours overviewList.addChild("li", "networkSizeEstimateRecent:\u00a0" + networkSizeEstimateRecent + "\u00a0nodes"); } overviewList.addChild("li", "nodeUptime:\u00a0" + nodeUptimeString); overviewList.addChild("li", "routingMissDistance:\u00a0" + fix4.format(routingMissDistance)); overviewList.addChild("li", "backedOffPercent:\u00a0" + fix1.format(backedOffPercent)); overviewList.addChild("li", "pInstantReject:\u00a0" + fix1.format(node.pRejectIncomingInstantly())); nextTableCell = overviewTableRow.addChild("td"); } // Activity box int numInserts = node.getNumInserts(); int numRequests = node.getNumRequests(); int numTransferringRequests = node.getNumTransferringRequests(); int numARKFetchers = node.getNumARKFetchers(); HTMLNode activityInfobox = nextTableCell.addChild("div", "class", "infobox"); activityInfobox.addChild("div", "class", "infobox-header", "Current activity"); HTMLNode activityInfoboxContent = activityInfobox.addChild("div", "class", "infobox-content"); if ((numInserts == 0) && (numRequests == 0) && (numTransferringRequests == 0) && (numARKFetchers == 0)) { activityInfoboxContent.addChild("#", "Your node is not processing any requests right now."); } else { HTMLNode activityList = activityInfoboxContent.addChild("ul"); if (numInserts > 0) { activityList.addChild("li", "Inserts:\u00a0" + numInserts); } if (numRequests > 0) { activityList.addChild("li", "Requests:\u00a0" + numRequests); } if (numTransferringRequests > 0) { activityList.addChild("li", "Transferring\u00a0Requests:\u00a0" + numTransferringRequests); } if (advancedEnabled) { if (numARKFetchers > 0) { activityList.addChild("li", "ARK\u00a0Fetch\u00a0Requests:\u00a0" + numARKFetchers); } long[] total = IOStatisticCollector.getTotalIO(); long total_output_rate = (total[0]) / nodeUptimeSeconds; long total_input_rate = (total[1]) / nodeUptimeSeconds; long totalPayload = node.getTotalPayloadSent(); long total_payload_rate = totalPayload / nodeUptimeSeconds; int percent = (int) (100 * totalPayload / total[0]); activityList.addChild("li", "Total Output:\u00a0" + SizeUtil.formatSize(total[0], true) + "\u00a0(" + SizeUtil.formatSize(total_output_rate, true) + "ps)"); activityList.addChild("li", "Payload Output:\u00a0" + SizeUtil.formatSize(totalPayload, true) + "\u00a0(" + SizeUtil.formatSize(total_payload_rate, true) + "ps) ("+percent+"%)"); activityList.addChild("li", "Total Input:\u00a0" + SizeUtil.formatSize(total[1], true) + "\u00a0(" + SizeUtil.formatSize(total_input_rate, true) + "ps)"); long[] rate = node.getNodeIOStats(); long delta = (rate[5] - rate[2]) / 1000; long output_rate = (rate[3] - rate[0]) / delta; long input_rate = (rate[4] - rate[1]) / delta; SubConfig nodeConfig = node.config.get("node"); int outputBandwidthLimit = nodeConfig.getInt("outputBandwidthLimit"); int inputBandwidthLimit = nodeConfig.getInt("inputBandwidthLimit"); if(inputBandwidthLimit == -1) { inputBandwidthLimit = outputBandwidthLimit * 4; } activityList.addChild("li", "Output Rate:\u00a0" + SizeUtil.formatSize(output_rate, true) + "ps (of\u00a0"+SizeUtil.formatSize(outputBandwidthLimit, true)+"ps)"); activityList.addChild("li", "Input Rate:\u00a0" + SizeUtil.formatSize(input_rate, true) + "ps (of\u00a0"+SizeUtil.formatSize(inputBandwidthLimit, true)+"ps)"); } } nextTableCell = advancedEnabled ? overviewTableRow.addChild("td") : overviewTableRow.addChild("td", "class", "last"); // Peer statistics box HTMLNode peerStatsInfobox = nextTableCell.addChild("div", "class", "infobox"); peerStatsInfobox.addChild("div", "class", "infobox-header", "Peer statistics"); HTMLNode peerStatsContent = peerStatsInfobox.addChild("div", "class", "infobox-content"); HTMLNode peerStatsList = peerStatsContent.addChild("ul"); if (numberOfConnected > 0) { HTMLNode peerStatsConnectedListItem = peerStatsList.addChild("li").addChild("span"); peerStatsConnectedListItem.addChild("span", new String[] { "class", "title", "style" }, new String[] { "peer_connected", "Connected: We're successfully connected to these nodes", "border-bottom: 1px dotted; cursor: help;" }, "Connected"); peerStatsConnectedListItem.addChild("span", ":\u00a0" + numberOfConnected); } if (numberOfRoutingBackedOff > 0) { HTMLNode peerStatsRoutingBackedOffListItem = peerStatsList.addChild("li").addChild("span"); peerStatsRoutingBackedOffListItem.addChild("span", new String[] { "class", "title", "style" }, new String[] { "peer_backed_off", (advancedEnabled ? "Connected but backed off: These peers are connected but we're backed off of them" : "Busy: These peers are connected but they're busy") + ", so the node is not routing requests to them", "border-bottom: 1px dotted; cursor: help;" }, advancedEnabled ? "Backed off" : "Busy"); peerStatsRoutingBackedOffListItem.addChild("span", ":\u00a0" + numberOfRoutingBackedOff); } if (numberOfTooNew > 0) { HTMLNode peerStatsTooNewListItem = peerStatsList.addChild("li").addChild("span"); peerStatsTooNewListItem.addChild("span", new String[] { "class", "title", "style" }, new String[] { "peer_too_new", "Connected but too new: These peers' minimum mandatory build is higher than this node's build. This node is not routing requests to them", "border-bottom: 1px dotted; cursor: help;" }, "Too New"); peerStatsTooNewListItem.addChild("span", ":\u00a0" + numberOfTooNew); } if (numberOfTooOld > 0) { HTMLNode peerStatsTooOldListItem = peerStatsList.addChild("li").addChild("span"); peerStatsTooOldListItem.addChild("span", new String[] { "class", "title", "style" }, new String[] { "peer_too_old", "Connected but too old: This node's minimum mandatory build is higher than these peers' build. This node is not routing requests to them", "border-bottom: 1px dotted; cursor: help;" }, "Too Old"); peerStatsTooOldListItem.addChild("span", ":\u00a0" + numberOfTooOld); } if (numberOfDisconnected > 0) { HTMLNode peerStatsDisconnectedListItem = peerStatsList.addChild("li").addChild("span"); peerStatsDisconnectedListItem.addChild("span", new String[] { "class", "title", "style" }, new String[] { "peer_disconnected", "Not connected: No connection so far but this node is continuously trying to connect", "border-bottom: 1px dotted; cursor: help;" }, "Disconnected"); peerStatsDisconnectedListItem.addChild("span", ":\u00a0" + numberOfDisconnected); } if (numberOfNeverConnected > 0) { HTMLNode peerStatsNeverConnectedListItem = peerStatsList.addChild("li").addChild("span"); peerStatsNeverConnectedListItem.addChild("span", new String[] { "class", "title", "style" }, new String[] { "peer_never_connected", "Never Connected: The node has never connected with these peers", "border-bottom: 1px dotted; cursor: help;" }, "Never Connected"); peerStatsNeverConnectedListItem.addChild("span", ":\u00a0" + numberOfNeverConnected); } if (numberOfDisabled > 0) { HTMLNode peerStatsDisabledListItem = peerStatsList.addChild("li").addChild("span"); peerStatsDisabledListItem.addChild("span", new String[] { "class", "title", "style" }, new String[] { "peer_disabled", "Not connected and disabled: because the user has instructed to not connect to peers ", "border-bottom: 1px dotted; cursor: help;" }, "Disabled"); peerStatsDisabledListItem.addChild("span", ":\u00a0" + numberOfDisabled); } if (numberOfBursting > 0) { HTMLNode peerStatsBurstingListItem = peerStatsList.addChild("li").addChild("span"); peerStatsBurstingListItem.addChild("span", new String[] { "class", "title", "style" }, new String[] { "peer_bursting", "Not connected and bursting: this node is, for a short period, trying to connect to these peers because the user has set BurstOnly on them", "border-bottom: 1px dotted; cursor: help;" }, "Bursting"); peerStatsBurstingListItem.addChild("span", ":\u00a0" + numberOfBursting); } if (numberOfListening > 0) { HTMLNode peerStatsListeningListItem = peerStatsList.addChild("li").addChild("span"); peerStatsListeningListItem.addChild("span", new String[] { "class", "title", "style" }, new String[] { "peer_listening", "Not connected but listening: this node won't try to connect to these peers very often because the user has set BurstOnly on them", "border-bottom: 1px dotted; cursor: help;" }, "Listening"); peerStatsListeningListItem.addChild("span", ":\u00a0" + numberOfListening); } if (numberOfListenOnly > 0) { HTMLNode peerStatsListenOnlyListItem = peerStatsList.addChild("li").addChild("span"); peerStatsListenOnlyListItem.addChild("span", new String[] { "class", "title", "style" }, new String[] { "peer_listen_only", "Not connected and listen only: this node won't try to connect to these peers at all because the user has set ListenOnly on them", "border-bottom: 1px dotted; cursor: help;" }, "Listen Only"); peerStatsListenOnlyListItem.addChild("span", ":\u00a0" + numberOfListenOnly); } // Peer routing backoff reason box if(advancedEnabled) { nextTableCell = overviewTableRow.addChild("td", "class", "last"); HTMLNode backoffReasonInfobox = nextTableCell.addChild("div", "class", "infobox"); backoffReasonInfobox.addChild("div", "class", "infobox-header", "Peer backoff reasons"); HTMLNode backoffReasonContent = backoffReasonInfobox.addChild("div", "class", "infobox-content"); String [] routingBackoffReasons = node.getPeerNodeRoutingBackoffReasons(); if(routingBackoffReasons.length == 0) { backoffReasonContent.addChild("#", "Good, your node is not backed off from any peers!"); } else { HTMLNode reasonList = backoffReasonContent.addChild("ul"); for(int i=0;i<routingBackoffReasons.length;i++) { int reasonCount = node.getPeerNodeRoutingBackoffReasonSize(routingBackoffReasons[i]); if(reasonCount > 0) { reasonList.addChild("li", routingBackoffReasons[i] + '\u00a0' + reasonCount); } } } } // END OVERVIEW TABLE // BEGIN PEER TABLE if(fProxyJavascriptEnabled) { StringBuffer jsBuf = new StringBuffer(); // FIXME: There's probably some icky Javascript in here (this is the first thing that worked for me); feel free to fix up to Javascript guru standards jsBuf.append( " function peerNoteChange() {\n" ); jsBuf.append( " var theobj = document.getElementById( \"action\" );\n" ); jsBuf.append( " var length = theobj.options.length;\n" ); jsBuf.append( " for (var i = 0; i < length; i++) {\n" ); jsBuf.append( " if(theobj.options[i] == \"update_notes\") {\n" ); jsBuf.append( " theobj.options[i].select = true;\n" ); jsBuf.append( " } else {\n" ); jsBuf.append( " theobj.options[i].select = false;\n" ); jsBuf.append( " }\n" ); jsBuf.append( " }\n" ); jsBuf.append( " theobj.value=\"update_notes\";\n" ); //jsBuf.append( " document.getElementById( \"peersForm\" ).submit();\n" ); jsBuf.append( " document.getElementById( \"peersForm\" ).doAction.click();\n" ); jsBuf.append( " }\n" ); jsBuf.append( " function peerNoteBlur() {\n" ); jsBuf.append( " var theobj = document.getElementById( \"action\" );\n" ); jsBuf.append( " var length = theobj.options.length;\n" ); jsBuf.append( " for (var i = 0; i < length; i++) {\n" ); jsBuf.append( " if(theobj.options[i] == \"update_notes\") {\n" ); jsBuf.append( " theobj.options[i].select = true;\n" ); jsBuf.append( " } else {\n" ); jsBuf.append( " theobj.options[i].select = false;\n" ); jsBuf.append( " }\n" ); jsBuf.append( " }\n" ); jsBuf.append( " theobj.value=\"update_notes\";\n" ); jsBuf.append( " }\n" ); contentNode.addChild("script", "type", "text/javascript").addChild("%", jsBuf.toString()); } HTMLNode peerTableInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); HTMLNode peerTableInfoboxHeader = peerTableInfobox.addChild("div", "class", "infobox-header"); peerTableInfoboxHeader.addChild("#", "My peers"); if (advancedEnabled) { if (!path.endsWith("displaymessagetypes.html")) { peerTableInfoboxHeader.addChild("#", " "); peerTableInfoboxHeader.addChild("a", "href", "displaymessagetypes.html", "(more detailed)"); } } HTMLNode peerTableInfoboxContent = peerTableInfobox.addChild("div", "class", "infobox-content"); if (peerNodeStatuses.length == 0) { peerTableInfoboxContent.addChild("#", "Freenet can not work as you have not added any peers so far. Please go to the "); peerTableInfoboxContent.addChild("a", "href", "/", "node homepage"); peerTableInfoboxContent.addChild("#", " and read the top infobox to see how it is done."); } else { HTMLNode peerForm = ctx.addFormChild(peerTableInfoboxContent, ".", "peersForm"); HTMLNode peerTable = peerForm.addChild("table", "class", "darknet_connections"); HTMLNode peerTableHeaderRow = peerTable.addChild("tr"); peerTableHeaderRow.addChild("th"); peerTableHeaderRow.addChild("th").addChild("a", "href", (!isInversed ? "?sortBy=status&inversed=true" : "?sortBy=status")).addChild("#", "Status"); peerTableHeaderRow.addChild("th").addChild("a", "href", (!isInversed ? "?sortBy=name&inversed=true" : "?sortBy=name")).addChild("span", new String[] { "title", "style" }, new String[] { "The node's name. Click on the name link to send the node a N2NTM (Node To Node Text Message)", "border-bottom: 1px dotted; cursor: help;" }, "Name"); if (advancedEnabled) { peerTableHeaderRow.addChild("th").addChild("a", "href", (!isInversed ? "?sortBy=address&inversed=true" : "?sortBy=address")).addChild("span", new String[] { "title", "style" }, new String[] { "The node's network address as IP:Port", "border-bottom: 1px dotted; cursor: help;" }, "Address"); } peerTableHeaderRow.addChild("th").addChild("a", "href", (!isInversed ? "?sortBy=version&inversed=true" : "?sortBy=version")).addChild("#", "Version"); if (advancedEnabled) { peerTableHeaderRow.addChild("th").addChild("a", "href", (!isInversed ? "?sortBy=location&inversed=true" : "?sortBy=location")).addChild("#", "Location"); peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "Other node busy? Display: Percentage of time the node is overloaded, Current wait time remaining (0=not overloaded)/total/last overload reason", "border-bottom: 1px dotted; cursor: help;" }, "Backoff"); peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "Probability of the node rejecting a request due to overload or causing a timeout.", "border-bottom: 1px dotted; cursor: help;" }, "Overload Probability"); } peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "How long since the node was connected or last seen", "border-bottom: 1px dotted; cursor: help;" }, "Connected\u00a0/\u00a0Idle"); peerTableHeaderRow.addChild("th").addChild("a", "href", (!isInversed ? "?sortBy=privnote&inversed=true" : "?sortBy=privnote")).addChild("span", new String[] { "title", "style" }, new String[] { "A private note concerning this peer", "border-bottom: 1px dotted; cursor: help;" }, "Private Note"); if(advancedEnabled) { peerTableHeaderRow.addChild("th", "%\u00a0Time Routable"); peerTableHeaderRow.addChild("th", "Total\u00a0Traffic\u00a0(in/out)"); } for (int peerIndex = 0, peerCount = peerNodeStatuses.length; peerIndex < peerCount; peerIndex++) { PeerNodeStatus peerNodeStatus = peerNodeStatuses[peerIndex]; HTMLNode peerRow = peerTable.addChild("tr"); // check box column peerRow.addChild("td", "class", "peer-marker").addChild("input", new String[] { "type", "name" }, new String[] { "checkbox", "node_" + peerNodeStatus.hashCode() }); // status column String statusString = peerNodeStatus.getStatusName(); if (!advancedEnabled && (peerNodeStatus.getStatusValue() == Node.PEER_NODE_STATUS_ROUTING_BACKED_OFF)) { statusString = "BUSY"; } peerRow.addChild("td", "class", "peer-status").addChild("span", "class", peerNodeStatus.getStatusCSSName(), statusString + (peerNodeStatus.isFetchingARK() ? "*" : "")); // name column peerRow.addChild("td", "class", "peer-name").addChild("a", "href", "/send_n2ntm/?peernode_hashcode=" + peerNodeStatus.hashCode(), peerNodeStatus.getName()); // address column if (advancedEnabled) { String pingTime = ""; if (peerNodeStatus.isConnected()) { pingTime = " (" + (int) peerNodeStatus.getAveragePingTime() + "ms)"; } peerRow.addChild("td", "class", "peer-address").addChild("#", ((peerNodeStatus.getPeerAddress() != null) ? (peerNodeStatus.getPeerAddress() + ':' + peerNodeStatus.getPeerPort()) : ("(unknown address)")) + pingTime); } // version column if (peerNodeStatus.getStatusValue() != Node.PEER_NODE_STATUS_NEVER_CONNECTED && (peerNodeStatus.isPublicInvalidVersion() || peerNodeStatus.isPublicReverseInvalidVersion())) { // Don't draw attention to a version problem if NEVER CONNECTED peerRow.addChild("td", "class", "peer-version").addChild("span", "class", "peer_version_problem", peerNodeStatus.getSimpleVersion()); } else { peerRow.addChild("td", "class", "peer-version").addChild("#", peerNodeStatus.getSimpleVersion()); } // location column if (advancedEnabled) { peerRow.addChild("td", "class", "peer-location", String.valueOf(peerNodeStatus.getLocation())); } if (advancedEnabled) { // backoff column HTMLNode backoffCell = peerRow.addChild("td", "class", "peer-backoff"); backoffCell.addChild("#", fix1.format(peerNodeStatus.getBackedOffPercent())); int backoff = (int) (Math.max(peerNodeStatus.getRoutingBackedOffUntil() - now, 0)); // Don't list the backoff as zero before it's actually zero if ((backoff > 0) && (backoff < 1000)) { backoff = 1000; } backoffCell.addChild("#", ' ' + String.valueOf(backoff / 1000) + '/' + String.valueOf(peerNodeStatus.getRoutingBackoffLength() / 1000)); backoffCell.addChild("#", (peerNodeStatus.getLastBackoffReason() == null) ? "" : ('/' + (peerNodeStatus.getLastBackoffReason()))); // overload probability column HTMLNode pRejectCell = peerRow.addChild("td", "class", "peer-backoff"); // FIXME pRejectCell.addChild("#", fix1.format(peerNodeStatus.getPReject())); } // idle column long idle = peerNodeStatus.getTimeLastRoutable(); if (peerNodeStatus.isRoutable()) { idle = peerNodeStatus.getTimeLastConnectionCompleted(); } else if (peerNodeStatus.getStatusValue() == Node.PEER_NODE_STATUS_NEVER_CONNECTED) { idle = peerNodeStatus.getPeerAddedTime(); } if(!peerNodeStatus.isConnected() && (now - idle) > (2 * 7 * 24 * 60 * 60 * (long) 1000)) { // 2 weeks peerRow.addChild("td", "class", "peer-idle").addChild("span", "class", "peer_idle_old", idleToString(now, idle)); } else { peerRow.addChild("td", "class", "peer-idle", idleToString(now, idle)); } // private darknet node comment note column if(fProxyJavascriptEnabled) { peerRow.addChild("td", "class", "peer-private-darknet-comment-note").addChild("input", new String[] { "type", "name", "size", "maxlength", "onBlur", "onChange", "value" }, new String[] { "text", "peerPrivateNote_" + peerNodeStatus.hashCode(), "16", "250", "peerNoteBlur();", "peerNoteChange();", peerNodeStatus.getPrivateDarknetCommentNote() }); } else { peerRow.addChild("td", "class", "peer-private-darknet-comment-note").addChild("input", new String[] { "type", "name", "size", "maxlength", "value" }, new String[] { "text", "peerPrivateNote_" + peerNodeStatus.hashCode(), "16", "250", peerNodeStatus.getPrivateDarknetCommentNote() }); } if(advancedEnabled) { // percent of time connected column peerRow.addChild("td", "class", "peer-idle" /* FIXME */).addChild("#", fix1.format(peerNodeStatus.getPercentTimeRoutableConnection())); // total traffic column peerRow.addChild("td", "class", "peer-idle" /* FIXME */).addChild("#", SizeUtil.formatSize(peerNodeStatus.getTotalInputBytes())+" / "+SizeUtil.formatSize(peerNodeStatus.getTotalOutputBytes())); } if (path.endsWith("displaymessagetypes.html")) { HTMLNode messageCountRow = peerTable.addChild("tr", "class", "message-status"); messageCountRow.addChild("td", "colspan", "2"); HTMLNode messageCountCell = messageCountRow.addChild("td", "colspan", String.valueOf(advancedEnabled ? 9 : 5)); // = total table row width - 2 from above colspan HTMLNode messageCountTable = messageCountCell.addChild("table", "class", "message-count"); HTMLNode countHeaderRow = messageCountTable.addChild("tr"); countHeaderRow.addChild("th", "Message"); countHeaderRow.addChild("th", "Incoming"); countHeaderRow.addChild("th", "Outgoing"); List messageNames = new ArrayList(); Map messageCounts = new HashMap(); for (Iterator incomingMessages = peerNodeStatus.getLocalMessagesReceived().keySet().iterator(); incomingMessages.hasNext(); ) { String messageName = (String) incomingMessages.next(); messageNames.add(messageName); Long messageCount = (Long) peerNodeStatus.getLocalMessagesReceived().get(messageName); messageCounts.put(messageName, new Long[] { messageCount, new Long(0) }); } for (Iterator outgoingMessages = peerNodeStatus.getLocalMessagesSent().keySet().iterator(); outgoingMessages.hasNext(); ) { String messageName = (String) outgoingMessages.next(); if (!messageNames.contains(messageName)) { messageNames.add(messageName); } Long messageCount = (Long) peerNodeStatus.getLocalMessagesSent().get(messageName); Long[] existingCounts = (Long[]) messageCounts.get(messageName); if (existingCounts == null) { messageCounts.put(messageName, new Long[] { new Long(0), messageCount }); } else { existingCounts[1] = messageCount; } } Collections.sort(messageNames, new Comparator() { public int compare(Object first, Object second) { return ((String) first).compareToIgnoreCase((String) second); } }); for (Iterator messageNamesIterator = messageNames.iterator(); messageNamesIterator.hasNext(); ) { String messageName = (String) messageNamesIterator.next(); Long[] messageCount = (Long[]) messageCounts.get(messageName); HTMLNode messageRow = messageCountTable.addChild("tr"); messageRow.addChild("td", messageName); messageRow.addChild("td", "class", "right-align", String.valueOf(messageCount[0])); messageRow.addChild("td", "class", "right-align", String.valueOf(messageCount[1])); } } } HTMLNode actionSelect = peerForm.addChild("select", new String[] { "id", "name" }, new String[] { "action", "action" }); actionSelect.addChild("option", "value", "", "-- Select action --"); actionSelect.addChild("option", "value", "send_n2ntm", "Send N2NTM to selected peers"); actionSelect.addChild("option", "value", "update_notes", "Update changed private notes"); if(advancedEnabled) { actionSelect.addChild("option", "value", "enable", "Enable selected peers"); actionSelect.addChild("option", "value", "disable", "Disable selected peers"); actionSelect.addChild("option", "value", "set_burst_only", "On selected peers, set BurstOnly (only set this if you have a static IP and are not NATed and neither is the peer)"); actionSelect.addChild("option", "value", "clear_burst_only", "On selected peers, clear BurstOnly"); actionSelect.addChild("option", "value", "set_listen_only", "On selected peers, set ListenOnly (not recommended)"); actionSelect.addChild("option", "value", "clear_listen_only", "On selected peers, clear ListenOnly"); actionSelect.addChild("option", "value", "set_allow_local", "On selected peers, set allowLocalAddresses (useful if you are connecting to another node on the same LAN)"); actionSelect.addChild("option", "value", "clear_allow_local", "On selected peers, clear allowLocalAddresses"); actionSelect.addChild("option", "value", "set_ignore_source_port", "On selected peers, set ignoreSourcePort (try this if behind an evil corporate firewall; otherwise not recommended)"); actionSelect.addChild("option", "value", "clear_ignore_source_port", "On selected peers, clear ignoreSourcePort"); } actionSelect.addChild("option", "value", "", "-- -- --"); actionSelect.addChild("option", "value", "remove", "Remove selected peers"); peerForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "doAction", "Go" }); } // END PEER TABLE } // BEGIN PEER ADDITION BOX HTMLNode peerAdditionInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); peerAdditionInfobox.addChild("div", "class", "infobox-header", "Add another peer"); HTMLNode peerAdditionContent = peerAdditionInfobox.addChild("div", "class", "infobox-content"); HTMLNode peerAdditionForm = ctx.addFormChild(peerAdditionContent, ".", "addPeerForm"); peerAdditionForm.addChild("#", "Paste the reference here:"); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("textarea", new String[] { "id", "name", "rows", "cols" }, new String[] { "reftext", "ref", "8", "74" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("#", "Enter the URL of the reference here: "); peerAdditionForm.addChild("input", new String[] { "id", "type", "name" }, new String[] { "refurl", "text", "url" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("#", "Choose the file containing the reference here: "); peerAdditionForm.addChild("input", new String[] { "id", "type", "name" }, new String[] { "reffile", "file", "reffile" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("#", "Enter a node description: "); peerAdditionForm.addChild("input", new String[] { "id", "type", "name", "size", "maxlength", "value" }, new String[] { "peerPrivateNote", "text", "peerPrivateNote", "16", "250", "" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "add", "Add" }); // our reference HTMLNode referenceInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); referenceInfobox.addChild("div", "class", "infobox-header").addChild("a", "href", "myref.fref", "My reference"); referenceInfobox.addChild("div", "class", "infobox-content").addChild("pre", "id", "reference", node.exportPublicFieldSet().toString()); // our ports HTMLNode portInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); portInfobox.addChild("div", "class", "infobox-header", "Node's Ports"); HTMLNode portInfoboxContent = portInfobox.addChild("div", "class", "infobox-content"); HTMLNode portInfoList = portInfoboxContent.addChild("ul"); SimpleFieldSet fproxyConfig = node.config.get("fproxy").exportFieldSet(true); SimpleFieldSet fcpConfig = node.config.get("fcp").exportFieldSet(true); SimpleFieldSet tmciConfig = node.config.get("console").exportFieldSet(true); portInfoList.addChild("li", "FNP:\u00a0" + node.getFNPPort() + "/udp\u00a0\u00a0\u00a0(between nodes; this is usually the only port that you might want to port forward)"); try { if(fproxyConfig.getBoolean("enabled", false)) { portInfoList.addChild("li", "FProxy:\u00a0" + fproxyConfig.getInt("port") + "/tcp\u00a0\u00a0\u00a0(this web interface)"); } else { portInfoList.addChild("li", "FProxy:\u00a0disabled/tcp\u00a0\u00a0\u00a0(this web interface)"); } if(fcpConfig.getBoolean("enabled", false)) { portInfoList.addChild("li", "FCP:\u00a0" + fcpConfig.getInt("port") + "/tcp\u00a0\u00a0\u00a0(for Freenet clients such as Frost and Thaw)"); } else { portInfoList.addChild("li", "FCP:\u00a0disabled/tcp\u00a0\u00a0\u00a0(for Freenet clients such as Frost and Thaw)"); } if(tmciConfig.getBoolean("enabled", false)) { portInfoList.addChild("li", "TMCI:\u00a0" + tmciConfig.getInt("port") + "/tcp\u00a0\u00a0\u00a0(simple telnet-based command-line interface)"); } else { portInfoList.addChild("li", "TMCI:\u00a0disabled/tcp\u00a0\u00a0\u00a0(simple telnet-based command-line interface)"); } } catch (FSParseException e) { // ignore } StringBuffer pageBuffer = new StringBuffer(); pageNode.generate(pageBuffer); this.writeReply(ctx, 200, "text/html", "OK", pageBuffer.toString()); } | 50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/c0ace656fce78eb9788046a23b7c72f8de626007/DarknetConnectionsToadlet.java/clean/src/freenet/clients/http/DarknetConnectionsToadlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
1216,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
202,
202,
6385,
25238,
590,
273,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
1216,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
202,
202,
6385,
25238,
590,
273,
394... |
File[] srcFiles; File[] argFiles; File[] injarFiles; File[] aspectFiles; | final File[] argFiles = FileUtil.getBaseDirFiles(testBaseSrcDir, spec.argfiles); final File[] injarFiles = FileUtil.getBaseDirFiles(testBaseSrcDir, injarPaths); final File[] aspectFiles = FileUtil.getBaseDirFiles(testBaseSrcDir, spec.aspectpath); final File[] classFiles = FileUtil.getBaseDirFiles(testBaseSrcDir, spec.classpath); if (!validator.canRead(argFiles, "argFiles") || !validator.canRead(injarFiles, "injarfiles") || !validator.canRead(aspectFiles, "aspectfiles") || !validator.canRead(classFiles, "classfiles")) { return false; } final File[] srcFiles; | public boolean setupAjcRun(Sandbox sandbox, Validator validator) { if (!validator.nullcheck(spec.getOptionsArray(), "localOptions") || !validator.nullcheck(sandbox, "sandbox") || !validator.nullcheck(spec.compiler, "compilerName") || !validator.canRead(Globals.F_aspectjrt_jar, "aspectjrt.jar") || !validator.canRead(Globals.F_testingclient_jar, "testing-client.jar") //|| !validator.canRead(Main.F_bridge_jar, "bridge.jar") ) { return false; } this.sandbox = sandbox; File[] cp = new File[] { sandbox.classesDir, Globals.F_aspectjrt_jar, Globals.F_testingclient_jar }; sandbox.setClasspath(cp, true, this); String rdir = spec.testSrcDirOffset; File testBaseSrcDir; if ((null == rdir) || (0 == rdir.length())) { testBaseSrcDir = sandbox.testBaseDir; } else { testBaseSrcDir = new File(sandbox.testBaseDir, rdir); if (!validator.canReadDir(testBaseSrcDir, "sandbox.testBaseSrcDir")) { return false; } } sandbox.setTestBaseSrcDir(testBaseSrcDir, this); arguments.clear(); // sources come as relative paths - check read, copy if staging // this renders paths absolute before run(RunStatusI) is called // for a compile run to support relative paths + source base // change so the run calculates the paths (differently when staging) final String[] injarPaths; final String[] srcPaths; { final String[] paths = spec.getPathsArray(); srcPaths = LangUtil.endsWith(paths, CompilerRun.SOURCE_SUFFIXES, true); injarPaths = LangUtil.endsWith(paths, CompilerRun.JAR_SUFFIXES, true); } // validate readable for sources if (!validator.canRead(testBaseSrcDir, srcPaths, "sources") || !validator.canRead(testBaseSrcDir, injarPaths, "injars") || !validator.canRead(testBaseSrcDir, spec.argfiles, "argfiles")) { return false; } int numSources = srcPaths.length + injarPaths.length + spec.argfiles.length; if (numSources < 1) { validator.fail("no source files, input jars, or arg files"); return false; } File[] srcFiles; File[] argFiles; File[] injarFiles; File[] aspectFiles; if (!spec.isStaging()) { // XXX why this? was always? || (testBaseSrcDir != sandbox.stagingDir))) { srcFiles = FileUtil.getBaseDirFiles(testBaseSrcDir, srcPaths, CompilerRun.SOURCE_SUFFIXES); argFiles = FileUtil.getBaseDirFiles(testBaseSrcDir, spec.argfiles); injarFiles = FileUtil.getBaseDirFiles(testBaseSrcDir, injarPaths); aspectFiles = FileUtil.getBaseDirFiles(testBaseSrcDir, spec.aspectpath); } else { // staging - copy files try { srcFiles = FileUtil.copyFiles(testBaseSrcDir, srcPaths, sandbox.stagingDir); argFiles = FileUtil.copyFiles(testBaseSrcDir, spec.argfiles, sandbox.stagingDir); injarFiles = FileUtil.copyFiles(testBaseSrcDir, injarPaths, sandbox.stagingDir); aspectFiles = FileUtil.copyFiles(testBaseSrcDir, spec.aspectpath, sandbox.stagingDir); } catch (IllegalArgumentException e) { validator.fail("staging - bad input", e); return false; } catch (IOException e) { validator.fail("staging - operations", e); return false; } // validate readable for copied sources if (!validator.canRead(srcFiles, "copied paths") || !validator.canRead(argFiles, "copied argfiles")) { return false; } } arguments.clear(); injars.clear(); aspectpath.clear(); if (!LangUtil.isEmpty(srcFiles)) { arguments.addAll(Arrays.asList(FileUtil.getPaths(srcFiles))); } if (!LangUtil.isEmpty(injarFiles)) { injars.addAll(Arrays.asList(FileUtil.getPaths(injarFiles))); } if (!LangUtil.isEmpty(aspectFiles)) { aspectpath.addAll(Arrays.asList(FileUtil.getPaths(aspectFiles))); } if (!LangUtil.isEmpty(argFiles)) { String[] ra = FileUtil.getPaths(argFiles); for (int j = 0; j < ra.length; j++) { arguments.add("@" + ra[j]); } if (spec.isStaging) { validator.info("warning: files listed in argfiles not staged"); } } return true; } | 53148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53148/47b257cb438cc74cf708d7edbb4beb11405402f6/CompilerRun.java/clean/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3875,
37,
78,
71,
1997,
12,
17881,
15202,
16,
9150,
4213,
13,
288,
3639,
309,
16051,
7357,
18,
2011,
1893,
12,
2793,
18,
588,
1320,
1076,
9334,
315,
3729,
1320,
7923,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3875,
37,
78,
71,
1997,
12,
17881,
15202,
16,
9150,
4213,
13,
288,
3639,
309,
16051,
7357,
18,
2011,
1893,
12,
2793,
18,
588,
1320,
1076,
9334,
315,
3729,
1320,
7923,
54... |
String xslUri = state.runtimeData.getParameter("cw_xsl"); if (xslUri != null) state.xslUri = xslUri; | public void setRuntimeData (ChannelRuntimeData rd, String uid) { ChannelState state = (ChannelState)stateTable.get(uid); if (state == null) log.error("CWebProxy:setRuntimeData() : attempting to access a non-established channel! setStaticData() hasn't been called on uid=\""+uid+"\""); else { state.runtimeData = rd; if ( rd.isEmpty() && (state.refresh != -1) ) { // A refresh-- State remains the same. if ( state.buttonxmlUri != null ) { state.key = state.buttonxmlUri; state.fullxmlUri = state.buttonxmlUri; state.refresh = 0; } else { if ( state.refresh == 0 ) state.key = state.fullxmlUri; state.fullxmlUri = state.xmlUri; state.refresh = 1; } } else { state.refresh = 0; String xmlUri = state.runtimeData.getParameter("cw_xml"); if (xmlUri != null) { state.xmlUri = xmlUri; // don't need an explicit reset if a new URI is provided. state.buttonxmlUri = null; } String sslUri = state.runtimeData.getParameter("cw_ssl"); if (sslUri != null) state.sslUri = sslUri; String xslTitle = state.runtimeData.getParameter("cw_xslTitle"); if (xslTitle != null) state.xslTitle = xslTitle; String xslUri = state.runtimeData.getParameter("cw_xsl"); if (xslUri != null) state.xslUri = xslUri; String passThrough = state.runtimeData.getParameter("cw_passThrough"); if (passThrough != null) state.passThrough = passThrough; String person = state.runtimeData.getParameter("cw_person"); if (person != null) state.person = person; String tidy = state.runtimeData.getParameter("cw_tidy"); if (tidy != null) state.tidy = tidy; String infoUri = state.runtimeData.getParameter("cw_info"); if (infoUri != null) state.infoUri = infoUri; String editUri = state.runtimeData.getParameter("cw_edit"); if (editUri != null) state.editUri = editUri; String helpUri = state.runtimeData.getParameter("cw_help"); if (helpUri != null) state.helpUri = helpUri; String cacheTimeout = state.runtimeData.getParameter("cw_cacheDefaultTimeout"); if (cacheTimeout != null) state.cacheDefaultTimeout = Long.parseLong(cacheTimeout); cacheTimeout = state.runtimeData.getParameter("cw_cacheTimeout"); if (cacheTimeout != null) state.cacheTimeout = Long.parseLong(cacheTimeout); else state.cacheTimeout = state.cacheDefaultTimeout; String cacheDefaultMode = state.runtimeData.getParameter("cw_cacheDefaultMode"); if (cacheDefaultMode != null) { state.cacheDefaultMode = cacheDefaultMode; } String cacheMode = state.runtimeData.getParameter("cw_cacheMode"); if (cacheMode != null) { state.cacheMode = cacheMode; } else state.cacheMode = state.cacheDefaultMode; // reset is a one-time thing. String reset = state.runtimeData.getParameter("cw_reset"); if (reset != null) { if (reset.equalsIgnoreCase("return")) { state.buttonxmlUri = null; } } if ( state.buttonxmlUri != null ) state.fullxmlUri = state.buttonxmlUri; else { //log.debug("CWebProxy: xmlUri is " + state.xmlUri); // pass IPerson atts independent of the value of cw_passThrough StringBuffer newXML = new StringBuffer(); String appendchar = ""; // here add in attributes according to cw_person if (state.person != null && state.personAllow_set != null) { StringTokenizer st = new StringTokenizer(state.person,","); if (st != null) { while (st.hasMoreElements ()) { String pName = st.nextToken(); if ((pName!=null)&&(!pName.trim().equals(""))) { if ( state.personAllow.trim().equals("*") || state.personAllow_set.contains(pName) ) { newXML.append(appendchar); appendchar = "&"; newXML.append(pName); newXML.append("="); // note, this only gets the first one if it's a // java.util.Vector. Should check String pVal = (String)state.iperson.getAttribute(pName); if (pVal != null) try { newXML.append(URLEncoder.encode(pVal,"UTF-8")); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } else { if (log.isInfoEnabled()) log.info( "CWebProxy: request to pass " + pName + " denied."); } } } } } // end cw_person code // Is this a case where we need to pass request parameters to the xmlURI? if ( state.passThrough != null && !state.passThrough.equalsIgnoreCase("none") && ( state.passThrough.equalsIgnoreCase("all") || state.passThrough.equalsIgnoreCase("application") || rd.getParameter("cw_inChannelLink") != null ) ) { // keyword and parameter processing // NOTE: if both exist, only keywords are appended String keywords = rd.getKeywords(); if (keywords != null) { if (appendchar.equals("&")) newXML.append("&keywords=" + keywords); else newXML.append(keywords); } else { // want all runtime parameters not specific to WebProxy Enumeration e=rd.getParameterNames (); if (e!=null) { while (e.hasMoreElements ()) { String pName = (String) e.nextElement (); if ( !pName.startsWith("cw_") && !pName.startsWith("upc_") && !pName.trim().equals("")) { String[] value_array = rd.getParameterValues(pName); int i = 0; while ( i < value_array.length ) { newXML.append(appendchar); appendchar = "&"; newXML.append(pName); newXML.append("="); try { newXML.append(URLEncoder.encode(value_array[i++].trim(),"UTF-8")); } catch (UnsupportedEncodingException e1) { throw new RuntimeException(e1); } } } } } } } state.reqParameters = newXML.toString(); state.fullxmlUri = state.xmlUri; if (!state.runtimeData.getHttpRequestMethod().equals("POST")) { if ((state.reqParameters!=null) && (!state.reqParameters.trim().equals(""))) { appendchar = (state.xmlUri.indexOf('?') == -1) ? "?" : "&"; state.fullxmlUri = state.fullxmlUri+appendchar+state.reqParameters; } state.reqParameters = null; } //log.debug("CWebProxy: fullxmlUri now: " + state.fullxmlUri); } // set key for cache based on request parameters // NOTE: POST requests are not idempotent and therefore are not // retrievable from the cache if (!state.runtimeData.getHttpRequestMethod().equals("POST")) state.key = state.fullxmlUri; else //generate a unique string as key state.key = String.valueOf((new Date()).getTime()); } } } | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/d56043b4480e273eeeb8c30e6eaed3efb3c71a1f/CWebProxy.java/clean/source/org/jasig/portal/channels/webproxy/CWebProxy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
5576,
751,
261,
2909,
5576,
751,
9437,
16,
514,
4555,
13,
225,
288,
377,
5307,
1119,
919,
273,
261,
2909,
1119,
13,
2019,
1388,
18,
588,
12,
1911,
1769,
377,
309,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
5576,
751,
261,
2909,
5576,
751,
9437,
16,
514,
4555,
13,
225,
288,
377,
5307,
1119,
919,
273,
261,
2909,
1119,
13,
2019,
1388,
18,
588,
12,
1911,
1769,
377,
309,
261,
... | |
public void setUp() throws Exception { super.setUp(); theDaemon = new MyMockLockssDaemon(); mgr = new MyMockPluginManager(); theDaemon.setPluginManager(mgr); theDaemon.setDaemonInited(true); // Prepare the loadable plugin directory property, which is // created by mgr.startService() pluginDir = getTempDir().getAbsolutePath() + File.separator; Properties p = new Properties(); p.setProperty(PluginManager.PARAM_PLATFORM_DISK_SPACE_LIST, pluginDir); p.setProperty(PluginManager.PARAM_PLUGIN_LOCATION, "plugins"); ConfigurationUtil.setCurrentConfigFromProps(p); mgr.setLoadablePluginsReady(true); mgr.initService(theDaemon); mgr.startService(); } | 8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/d0b3f6e5d9e73263e86cc779f5d9802be444ab00/TestPluginManager.java/buggy/test/src/org/lockss/plugin/TestPluginManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
542,
1211,
1435,
15069,
503,
95,
9565,
18,
542,
1211,
5621,
5787,
12858,
33,
2704,
12062,
9865,
2531,
1049,
12858,
5621,
13552,
33,
2704,
12062,
9865,
3773,
1318,
5621,
5787,
12858,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
542,
1211,
1435,
15069,
503,
95,
9565,
18,
542,
1211,
5621,
5787,
12858,
33,
2704,
12062,
9865,
2531,
1049,
12858,
5621,
13552,
33,
2704,
12062,
9865,
3773,
1318,
5621,
5787,
12858,
... | ||
boolean updateNeeded = false; | boolean updateNeeded = true; | public void removeExtension(IExtension extension, Object[] objects) { // remove the contributions from the window bars and dispose of the // actions for (int i = 0; i < objects.length; i++) { if (objects[i] instanceof PluginActionSetBuilder.Binding) { PluginActionSetBuilder.Binding binding = (PluginActionSetBuilder.Binding) objects[i]; binding.builder.removeActionExtensions(binding.set, binding.window); binding.set.dispose(); } } // update all opened perspectives Perspective[] perspectives = getActiveWorkbenchPage() .getOpenInternalPerspectives(); boolean updateNeeded = false; for (int i = 0; i < perspectives.length; i++) { IActionSetDescriptor[] originalSets = perspectives[i] .getActionSets(); ArrayList newSets = new ArrayList(Arrays.asList(originalSets)); for (int j = 0; j < objects.length; j++) { if (objects[j] instanceof IActionSetDescriptor) { IActionSetDescriptor setToRemove = (IActionSetDescriptor) objects[j]; newSets.remove(setToRemove); } } // if set sizes differ, flag for window updating // and update the perspective if (originalSets.length != newSets.size()) { updateNeeded |= true; perspectives[i] .setActionSets((IActionSetDescriptor[]) newSets .toArray(new IActionSetDescriptor[newSets .size()])); } } if (updateNeeded) { // refresh the window updateActionSets(); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/56f8e6c4b867931001b9607e02b459fe3346470b/WorkbenchWindow.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1206,
3625,
12,
45,
3625,
2710,
16,
1033,
8526,
2184,
13,
288,
5411,
368,
1206,
326,
13608,
6170,
628,
326,
2742,
22252,
471,
15825,
434,
326,
5411,
368,
4209,
5411,
364,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1206,
3625,
12,
45,
3625,
2710,
16,
1033,
8526,
2184,
13,
288,
5411,
368,
1206,
326,
13608,
6170,
628,
326,
2742,
22252,
471,
15825,
434,
326,
5411,
368,
4209,
5411,
364,
261,
... |
FusionCode.generateFusionHeader(); | FusionCode.generateFusionHeader(str); | public static void run(SIRStream str, JInterfaceDeclaration[] interfaces, SIRInterfaceTable[] interfaceTables, SIRStructure[] structs) { HashMap[] exec_counts1; HashMap[] exec_counts2; boolean doCacheOptimization = KjcOptions.cacheopt; int code_cache = 16000; int data_cache = 16000; System.out.println("Entry to Cluster Backend"); System.out.println(" --cluster parameter is: "+KjcOptions.cluster); System.out.println(" peekratio is: "+KjcOptions.peekratio); System.out.println(" rename1 is: "+KjcOptions.rename1); System.out.println(" rename2 is: "+KjcOptions.rename2); structures = structs; // set number of columns/rows //RawBackend.rawRows = KjcOptions.raw; //if(KjcOptions.rawcol>-1) // RawBackend.rawColumns = KjcOptions.rawcol; //else // RawBackend.rawColumns = KjcOptions.raw; //simulator = new FineGrainSimulator(); //this must be run now, FlatIRToC relies on it!!! RenameAll.renameAllFilters(str); // move field initializations into init function System.out.print("Moving initializers into init functions... "); FieldInitMover.moveStreamInitialAssignments(str, FieldInitMover.IGNORE_ARRAY_INITIALIZERS); System.out.println("done."); // propagate constants and unroll loop System.out.print("Running Constant Prop and Unroll..."); Unroller.setLimitNoTapeLoops(true, 4); ConstantProp.propagateAndUnroll(str); System.out.println(" done."); // add initPath functions EnqueueToInitPath.doInitPath(str); // construct stream hierarchy from SIRInitStatements ConstructSIRTree.doit(str); if (Flattener.hasDynamicRates(str)) { System.err.println("Failure: Dynamic rates are not yet supported in the cluster backend."); System.exit(1); } //SIRPrinter printer1 = new SIRPrinter(); //str.accept(printer1); //printer1.close(); //VarDecl Raise to move array assignments up new VarDeclRaiser().raiseVars(str); // do constant propagation on fields System.out.print("Running Constant Field Propagation..."); FieldProp.doPropagate(str); System.out.println(" done."); //System.out.println("Analyzing Branches.."); //new BlockFlattener().flattenBlocks(str); //new BranchAnalyzer().analyzeBranches(str); SIRPortal.findMessageStatements(str); // optimize so that IncreaseFilterMult has accurate estimates // of code size Optimizer.optimize(str); Estimator.estimate(str); Lifter.liftAggressiveSync(str); //StreamItDot.printGraph(str, "before-partition.dot"); // gather application-characterization statistics if (KjcOptions.stats) { StatisticsGathering.doit(str); } str = Flattener.doLinearAnalysis(str); str = Flattener.doStateSpaceAnalysis(str); // Calculate SIRSchedule before increasing multiplicity StreamItDot.printGraph(str, "before-peekmult.dot"); exec_counts1 = SIRScheduler.getExecutionCounts(str); // Increasing filter Multiplicity if ( doCacheOptimization ) { IncreaseFilterMult.inc(str, 1, code_cache); //} /* for cluster backend, fusion means to fuse segments on same cluster if (KjcOptions.fusion) { System.out.println("Running FuseAll..."); str = FuseAll.fuse(str); Lifter.lift(str); System.out.println("Done FuseAll..."); } */ Optimizer.optimize(str); Estimator.estimate(str); int threads = KjcOptions.cluster; HashMap partitionMap = new HashMap(); if ( doCacheOptimization ) { boolean decreased; str = new CachePartitioner(str, WorkEstimate.getWorkEstimate(str), 0, code_cache, data_cache).calcPartitions(partitionMap); decreased = IncreaseFilterMult.decreaseMult(partitionMap); if (decreased) { // Repartition second time str = new CachePartitioner(str, WorkEstimate.getWorkEstimate(str), 0, code_cache, data_cache).calcPartitions(partitionMap); decreased = IncreaseFilterMult.decreaseMult(partitionMap); } } // Calculate SIRSchedule after increasing multiplicity StreamItDot.printGraph(str, "after-peekmult.dot"); exec_counts2 = SIRScheduler.getExecutionCounts(str); //exec_counts2 = SIRScheduler.getExecutionCounts(str); //find out how what is the schedule multiplicity due to //peek scaling HashMap steady1 = exec_counts1[1]; HashMap steady2 = exec_counts2[1]; int implicit_mult = IncreaseFilterMult.scheduleMultAfterScaling(steady1, steady2); System.out.println("Implicit schedule mult increase due to peek scaling is: "+implicit_mult); System.err.println("Running Partitioning... target number of threads: "+threads); StreamItDot.printGraph(str, "before-partition.dot"); // actually fuse components if fusion flag is enabled if (KjcOptions.fusion) { // turn on dynamic programming if no other partitioning is turned on if (!KjcOptions.partition_greedy && !KjcOptions.partition_greedier) { KjcOptions.partition_dp = true; } if ( doCacheOptimization ) { str = CachePartitioner.doit(str, code_cache, data_cache); } else { str = Partitioner.doit(str, 0, threads, false, false); } /* if (str instanceof SIRContainer) { ((SIRContainer)str).reclaimChildren(); } */ } //HashMap partitionMap = new HashMap(); partitionMap.clear(); if ( doCacheOptimization ) { str = new CachePartitioner(str, WorkEstimate.getWorkEstimate(str), 0, code_cache, data_cache).calcPartitions(partitionMap); } else { // Fix up a bug that might be caused by previous // pass of partitioner str.setParent(null); str = new DynamicProgPartitioner(str, WorkEstimate.getWorkEstimate(str), threads, false, false).calcPartitions(partitionMap); } System.err.println("Done Partitioning..."); Unroller.setLimitNoTapeLoops(false, 0); if (KjcOptions.sjtopipe) { SJToPipe.doit(str); } StreamItDot.printGraph(str, "after-partition.dot"); //VarDecl Raise to move array assignments up new VarDeclRaiser().raiseVars(str); //VarDecl Raise to move peek index up so //constant prop propagates the peek buffer index new VarDeclRaiser().raiseVars(str); // optionally print a version of the source code that we're // sending to the scheduler if (KjcOptions.print_partitioned_source) { new streamit.scheduler2.print.PrintProgram().printProgram(IterFactory.createFactory().createIter(str)); } //run constrained scheduler System.out.print("Constrained Scheduler Begin..."); //topStreamIter = IterFactory.createFactory().createIter(str); topStreamIter = IterFactory.createFineGrainedFactory().createIter(str); //new streamit.scheduler2.print.PrintGraph().printProgram(topStreamIter); //new streamit.scheduler2.print.PrintProgram().printProgram(topStreamIter); if (KjcOptions.debug) { debugOutput(str); } System.out.println(" done."); // end constrained scheduler System.out.println("Flattener Begin..."); executionCounts = SIRScheduler.getExecutionCounts(str); PartitionDot.printScheduleGraph(str, "schedule.dot", executionCounts); GraphFlattener graphFlattener = new GraphFlattener(str); //graphFlattener.dumpGraph("flatgraph.dot"); System.out.println("Flattener End."); //create the execution counts for other passes createExecutionCounts(str, graphFlattener); //////////////////////////////////////////////// // the cluster specific code begins here NodeEnumerator.reset(); graphFlattener.top.accept(new NodeEnumerator(), new HashSet(), true); graphFlattener.top.accept(new RegisterStreams(), new HashSet(), true); DiscoverSchedule d_sched = new DiscoverSchedule(); graphFlattener.top.accept(d_sched, new HashSet(), true); d_sched.findPhases(); if (KjcOptions.removeglobals) { RemoveGlobals.doit(graphFlattener.top); } StructureIncludeFile.doit(structures, graphFlattener.top); /// start output portals SIRPortal portals[] = SIRPortal.getPortals(); LatencyConstraints.detectConstraints(topStreamIter, portals); /// end output portals //VarDecl Raise to move array assignments down? new VarDeclRaiser().raiseVars(str); // creating filter2Node filter2Node = new HashMap(); graphFlattener.top.accept(new ClusterBackend(), null, true); //generating code for partitioned nodes //ClusterExecutionCode.doit(graphFlattener.top); System.out.println("Cluster Code begin..."); ClusterFusion.setPartitionMap(partitionMap); if (KjcOptions.fusion) { graphFlattener.top.accept(new ClusterFusion(), new HashSet(), true); } ClusterCode.setPartitionMap(partitionMap); ClusterCode.generateCode(graphFlattener.top); FusionCode.generateFusionHeader(); FusionCode.generateFusionFile(d_sched, implicit_mult); ClusterCode.generateMasterFile(); ClusterCode.generateMakeFile(); ClusterCode.generateConfigFile(); ClusterCode.generateSetupFile(); System.out.println("Cluster Code End."); /* //generate the makefiles System.out.println("Creating Makefile."); MakefileGenerator.createMakefile(); */ System.out.println("Exiting"); System.exit(0); } /** * Just some debugging output. */ private static void debugOutput(SIRStream str) { streamit.scheduler2.constrained.Scheduler cscheduler = new streamit.scheduler2.constrained.Scheduler(topStreamIter); //cscheduler.computeSchedule(); //"Not Implemented" if (!(str instanceof SIRPipeline)) return; int pipe_size = ((SIRPipeline)str).size(); SIRFilter first = (SIRFilter)((SIRPipeline)str).get(0); SIRFilter last = (SIRFilter)((SIRPipeline)str).get(pipe_size-1); streamit.scheduler2.iriter.Iterator firstIter = IterFactory.createFactory().createIter(first); streamit.scheduler2.iriter.Iterator lastIter = IterFactory.createFactory().createIter(last); streamit.scheduler2.SDEPData sdep; try { sdep = cscheduler.computeSDEP(firstIter, lastIter); System.out.println("\n"); System.out.println("Source --> Sink Dependency:\n"); System.out.println(" Source Init Phases: "+sdep.getNumSrcInitPhases()); System.out.println(" Destn. Init Phases: "+sdep.getNumDstInitPhases()); System.out.println(" Source Steady Phases: "+sdep.getNumSrcSteadyPhases()); System.out.println(" Destn. Steady Phases: "+sdep.getNumDstSteadyPhases()); /* for (int t = 0; t < 20; t++) { int phase = sdep.getSrcPhase4DstPhase(t); int phaserev = sdep.getDstPhase4SrcPhase(t); System.out.println("sdep ["+t+"] = "+phase+ " reverse_sdep["+t+"] = "+phaserev); } */ } catch (streamit.scheduler2.constrained.NoPathException ex) { } DoSchedules.findSchedules(topStreamIter, firstIter, str); } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/27a6931eed80e22f34097df73528fdc32def5326/ClusterBackend.java/buggy/streams/src/at/dms/kjc/cluster/ClusterBackend.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1086,
12,
2320,
54,
1228,
609,
16,
9506,
282,
804,
1358,
6094,
8526,
4697,
282,
7349,
16,
9506,
282,
5705,
54,
1358,
1388,
8526,
9506,
282,
1560,
6905,
16,
9506,
282,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1086,
12,
2320,
54,
1228,
609,
16,
9506,
282,
804,
1358,
6094,
8526,
4697,
282,
7349,
16,
9506,
282,
5705,
54,
1358,
1388,
8526,
9506,
282,
1560,
6905,
16,
9506,
282,
57... |
if(C_DEBUG && A_OpenCms.isLogging()) { | if(C_DEBUG && (A_OpenCms.isLogging() && I_CmsLogChannels.C_PREPROCESSOR_IS_LOGGING)) { | public byte[] getContent(CmsObject cms, String templateFile, String elementName, Hashtable parameters, String templateSelector) throws CmsException { if(C_DEBUG && A_OpenCms.isLogging()) { A_OpenCms.log(C_OPENCMS_DEBUG, this.getClassName() + "getting content of element " + ((elementName == null) ? "<root>" : elementName)); A_OpenCms.log(C_OPENCMS_DEBUG, this.getClassName() + "template file is: " + templateFile); A_OpenCms.log(C_OPENCMS_DEBUG, this.getClassName() + "selected template section is: " + ((templateSelector == null) ? "<default>" : templateSelector)); } CmsXmlTemplateFile xmlTemplateDocument = getOwnTemplateFile(cms, templateFile, elementName, parameters, templateSelector); I_CmsSession session = cms.getRequestContext().getSession(true); I_CmsRegistry reg = cms.getRegistry(); Hashtable sessionData = (Hashtable)session.getValue(C_SESSION_MODULE_ADMIN_DATA); String module = (String)sessionData.get(C_MODULE_PACKETNAME); xmlTemplateDocument.setData("packetname", module); Vector paraNames = (Vector)sessionData.get(C_SESSION_MODULE_ADMIN_PROP_NAMES); Vector paraDescr = (Vector)sessionData.get(C_SESSION_MODULE_ADMIN_PROP_DESCR); Vector paraTyp = (Vector)sessionData.get(C_SESSION_MODULE_ADMIN_PROP_TYP); Vector paraVal = (Vector)sessionData.get(C_SESSION_MODULE_ADMIN_PROP_VAL); String allList = ""; for(int i = 0;i < paraNames.size();i++) { xmlTemplateDocument.setData("propname", (String)paraNames.elementAt(i)); xmlTemplateDocument.setData("typ", (String)paraTyp.elementAt(i)); xmlTemplateDocument.setData("value", (String)paraVal.elementAt(i)); xmlTemplateDocument.setData("description", (String)paraDescr.elementAt(i)); allList += xmlTemplateDocument.getProcessedDataValue("list_entry", this); } xmlTemplateDocument.setData("list", allList); // Now load the template file and start the processing return startProcessing(cms, xmlTemplateDocument, elementName, parameters, templateSelector); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/65fec749058083642e3e85283287c65357fa8690/CmsAdminModuleAdminProperties.java/clean/src/com/opencms/workplace/CmsAdminModuleAdminProperties.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1160,
8526,
5154,
12,
4747,
921,
6166,
16,
514,
28215,
16,
514,
14453,
16,
18559,
1472,
16,
514,
1542,
4320,
13,
1216,
11228,
288,
3639,
309,
12,
39,
67,
9394,
597,
261,
37,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1160,
8526,
5154,
12,
4747,
921,
6166,
16,
514,
28215,
16,
514,
14453,
16,
18559,
1472,
16,
514,
1542,
4320,
13,
1216,
11228,
288,
3639,
309,
12,
39,
67,
9394,
597,
261,
37,
67,
... |
public Configuration(ProjectType projectType, IManagedConfigElement element) { | public Configuration(ProjectType projectType, IManagedConfigElement element, String managedBuildRevision) { | public Configuration(ProjectType projectType, IManagedConfigElement element) { this.projectType = projectType; isExtensionConfig = true; // setup for resolving resolved = false; // Initialize from the XML attributes loadFromManifest(element); // Hook me up to the Managed Build Manager ManagedBuildManager.addExtensionConfiguration(this); // Hook me up to the ProjectType if (projectType != null) { projectType.addConfiguration(this); } // Load the children IManagedConfigElement[] configElements = element.getChildren(); for (int l = 0; l < configElements.length; ++l) { IManagedConfigElement configElement = configElements[l]; if (configElement.getName().equals(IToolChain.TOOL_CHAIN_ELEMENT_NAME)) { toolChain = new ToolChain(this, configElement); }else if (configElement.getName().equals(IResourceConfiguration.RESOURCE_CONFIGURATION_ELEMENT_NAME)) { ResourceConfiguration resConfig = new ResourceConfiguration(this, configElement); addResourceConfiguration(resConfig); } } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/107015f42710bd6aa44335ede117d866b68eaaef/Configuration.java/buggy/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4659,
12,
4109,
559,
1984,
559,
16,
6246,
4184,
809,
1046,
930,
13,
288,
202,
202,
2211,
18,
4406,
559,
273,
1984,
559,
31,
202,
202,
291,
3625,
809,
273,
638,
31,
9506,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4659,
12,
4109,
559,
1984,
559,
16,
6246,
4184,
809,
1046,
930,
13,
288,
202,
202,
2211,
18,
4406,
559,
273,
1984,
559,
31,
202,
202,
291,
3625,
809,
273,
638,
31,
9506,
202... |
public boolean updateCurrentArray( String text ) { int currentValue = 0, index = 0, arrayIndex = 0; char current = 0; //previous = 0; boolean inHex = false; boolean twoChars = false; try { currentTextBlock = new byte[ currentSize( text ) ]; } catch( UndefinedSizeException e ) { return false; } catch( InvalidNumberFormatException e ) { return false; } while( index < text.length() ) { current = text.charAt( index ); //go into a loop that parses until a hex string ends (everything between [ and ]... //throws exception if ] never found //throws exception if invalid hex values found //does not do anything for empty brackets "[ ]" or "[][][][][][]" //adds 5 to return value for [01 2 03 04 5 ] //throws exception for internal sets of brackets ie. [0 0 [0 0] ] if( inHex ) { if(index < text.length() ) { //current = text.charAt( index ); //checks to see if hex string ends... if( current == ']' ) { inHex = false; index++; } //check for space else if( current == ' ' ) { index++; } //else if valid hex value //must check if it's one or two char long, if it's longer, throw an exception else if( (current >= '0' && current <= '9' ) || ( current >= 'a' && current <= 'f' ) ) { index++; current = text.charAt(index); //if there's a second char and it's valid if( (current >= '0' && current <= '9' ) || ( current >= 'a' && current <= 'f' ) ) { twoChars = true; index++; current = text.charAt(index); //make sure that it's only two chars long for each hex value if( current == ' ' ) { index++; } else { index++; inHex = false; } } //store the currentValue if it made it this far if( twoChars ) { currentValue = Integer.parseInt( text.substring( index - 3, index - 1 ), 16 ); } else { currentValue = Integer.parseInt( text.substring( index - 1, index ), 16 ); } currentTextBlock[ arrayIndex++ ] = (byte) currentValue; twoChars = false; } //else if invalid hex value } } //if it's not hex, check to see for new hex //also check to make sure if it's formatted properly //if it's just standard text, add them to the current size else if ( current == '[' ) { inHex = true; index++; } else { index++; //currentValue = new String(int; currentTextBlock[ arrayIndex++ ] = (byte) simpToGameChar( (char) current ); } } return true; } | 3699 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3699/e3746491678a9f0bdee74ba64d785d53772c8516/FlyoverEditor.java/clean/src/net/starmen/pkhack/eb/FlyoverEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1250,
1089,
3935,
1076,
12,
514,
977,
262,
5411,
288,
7734,
509,
377,
14794,
273,
374,
16,
13491,
770,
273,
374,
16,
13491,
526,
1016,
273,
374,
31,
7734,
1149,
565,
783,
273,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1250,
1089,
3935,
1076,
12,
514,
977,
262,
5411,
288,
7734,
509,
377,
14794,
273,
374,
16,
13491,
770,
273,
374,
16,
13491,
526,
1016,
273,
374,
31,
7734,
1149,
565,
783,
273,
37... | ||
reachOnlyByBranch = false; | private int resetForMethodEntry0(PreorderVisitor v) { if (DEBUG) System.out.println(" --- "); stack.clear(); jumpTarget = -1; lvValues.clear(); jumpStack.clear(); seenTransferOfControl = false; String className = v.getClassName(); String signature = v.getMethodSig(); exceptionHandlers.clear(); Method m = v.getMethod(); Code code = m.getCode(); if (code != null) { CodeException[] exceptionTable = code.getExceptionTable(); if (exceptionTable != null) for(CodeException ex : exceptionTable) exceptionHandlers.set(ex.getHandlerPC()); } if (DEBUG) System.out.println(" --- " + className + " " + m.getName() + " " + signature); Type[] argTypes = Type.getArgumentTypes(signature); int reg = 0; if (!m.isStatic()) { Item it = new Item("L" + className+";"); it.isInitialParameter = true; it.registerNumber = reg; setLVValue( reg++, it); } for (Type argType : argTypes) { Item it = new Item(argType.getSignature()); it.registerNumber = reg; it.isInitialParameter = true; setLVValue(reg++, it); } return reg; } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/ac826de6b79fc3659ab714df87fb22ffae7a4b8f/OpcodeStack.java/clean/findbugs/src/java/edu/umd/cs/findbugs/OpcodeStack.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
11365,
270,
822,
497,
3386,
858,
7108,
273,
629,
31,
509,
12974,
3386,
858,
7108,
273,
629,
31,
2715,
1290,
1305,
1622,
20,
12,
1386,
1019,
7413,
12974,
3386,
858,
7108,
273,
629,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
11365,
270,
822,
497,
3386,
858,
7108,
273,
629,
31,
509,
12974,
3386,
858,
7108,
273,
629,
31,
2715,
1290,
1305,
1622,
20,
12,
1386,
1019,
7413,
12974,
3386,
858,
7108,
273,
629,
... | |
return InspectionGadgetsBundle.message("static.method.via.subclass.display.name"); | return InspectionGadgetsBundle.message( "static.method.via.subclass.display.name"); | public String getDisplayName() { return InspectionGadgetsBundle.message("static.method.via.subclass.display.name"); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/03b3e78c314f288686ee78bf6accd2340015ae0e/StaticCallOnSubclassInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/bugs/StaticCallOnSubclassInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
22055,
1435,
288,
3639,
327,
22085,
7017,
43,
361,
14665,
3405,
18,
2150,
12,
315,
3845,
18,
2039,
18,
21985,
18,
10678,
18,
5417,
18,
529,
8863,
565,
289,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
22055,
1435,
288,
3639,
327,
22085,
7017,
43,
361,
14665,
3405,
18,
2150,
12,
315,
3845,
18,
2039,
18,
21985,
18,
10678,
18,
5417,
18,
529,
8863,
565,
289,
2,
-100,
-100,
-10... |
public void draw3DRect(int x, int y, int w, int h, boolean raised) | public void draw3DRect(int x, int y, int width, int height, boolean raised) | public void draw3DRect(int x, int y, int w, int h, boolean raised) { // TODO } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/3606b7996ab5dbdf4a0195418025163510897b5d/DebugGraphics.java/buggy/core/src/classpath/javax/javax/swing/DebugGraphics.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3724,
23,
40,
6120,
12,
474,
619,
16,
509,
677,
16,
509,
1835,
16,
509,
2072,
16,
1250,
11531,
13,
225,
288,
202,
202,
759,
2660,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3724,
23,
40,
6120,
12,
474,
619,
16,
509,
677,
16,
509,
1835,
16,
509,
2072,
16,
1250,
11531,
13,
225,
288,
202,
202,
759,
2660,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,... |
return vmManager.dumpNamespace( namespace ); | return vmManager.dumpNamespace(namespace); | public boolean dumpVMNamespace( String namespace ) { return vmManager.dumpNamespace( namespace ); } | 9291 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9291/f4e8bdb1bf96e4d82dd923209d92df15c6616116/VelocimacroFactory.java/clean/src/java/org/apache/velocity/runtime/VelocimacroFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
4657,
7397,
3402,
12,
514,
1981,
262,
565,
288,
3639,
327,
4268,
1318,
18,
8481,
3402,
12,
4937,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
4657,
7397,
3402,
12,
514,
1981,
262,
565,
288,
3639,
327,
4268,
1318,
18,
8481,
3402,
12,
4937,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Iterator iter = plugins.values().iterator(); while (iter.hasNext()) { PluginDescriptor plugin = (PluginDescriptor) iter.next(); if (plugin == null) { continue; } String id = plugin.getPluginId(); if (id == null) { continue; } if (!includes.matcher(id).matches()) { if (LOG.isDebugEnabled()) { LOG.debug("not including: " + id); } continue; } if (excludes.matcher(id).matches()) { if (LOG.isDebugEnabled()) { LOG.debug("excluding: " + id); } continue; } map.put(plugin.getPluginId(), plugin); } | Map<String, PluginDescriptor> map = new HashMap<String, PluginDescriptor>(); if (plugins == null) { | private Map filter(Pattern excludes, Pattern includes, Map plugins) { Map map = new HashMap(); if (plugins == null) { return map; } Iterator iter = plugins.values().iterator(); while (iter.hasNext()) { PluginDescriptor plugin = (PluginDescriptor) iter.next(); if (plugin == null) { continue; } String id = plugin.getPluginId(); if (id == null) { continue; } if (!includes.matcher(id).matches()) { if (LOG.isDebugEnabled()) { LOG.debug("not including: " + id); } continue; } if (excludes.matcher(id).matches()) { if (LOG.isDebugEnabled()) { LOG.debug("excluding: " + id); } continue; } map.put(plugin.getPluginId(), plugin); } return map; } | 1316 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1316/cd00889fb5930fea91d208ac97a4b7fafa399a8e/PluginRepository.java/clean/src/java/org/apache/nutch/plugin/PluginRepository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1635,
1034,
12,
3234,
13644,
16,
6830,
6104,
16,
1635,
4799,
13,
288,
1377,
1635,
852,
273,
394,
4317,
5621,
1377,
309,
261,
8057,
422,
446,
13,
288,
327,
852,
31,
289,
1377,
4498... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1635,
1034,
12,
3234,
13644,
16,
6830,
6104,
16,
1635,
4799,
13,
288,
1377,
1635,
852,
273,
394,
4317,
5621,
1377,
309,
261,
8057,
422,
446,
13,
288,
327,
852,
31,
289,
1377,
4498... |
public void testLoadSaveSynchronizeSettings() throws Exception { CmsObject cms = getCmsObject(); echo("Testing loading and saving the synchronization settings of a user"); CmsUserSettings userSettings = new CmsUserSettings(cms.getRequestContext().currentUser()); // default sync settings are null assertNull(userSettings.getSynchronizeSettings()); String source = "/folder1/"; String dest = getTestDataPath(""); if (dest.endsWith(File.separator)) { dest = dest.substring(0, dest.length() -1); } CmsSynchronizeSettings syncSettings = new CmsSynchronizeSettings(); syncSettings.setEnabled(true); ArrayList sourceList = new ArrayList(); sourceList.add(source); syncSettings.setSourceListInVfs(sourceList); syncSettings.setDestinationPathInRfs(dest); // store the settings userSettings.setSynchronizeSettings(syncSettings); userSettings.save(cms); // login another user cms.loginUser("test1", "test1"); userSettings = new CmsUserSettings(cms.getRequestContext().currentUser()); // default sync settings are null for this user assertNull(userSettings.getSynchronizeSettings()); // login another user cms.loginUser(OpenCms.getDefaultUsers().getUserAdmin(), "admin"); userSettings = new CmsUserSettings(cms.getRequestContext().currentUser()); syncSettings = userSettings.getSynchronizeSettings(); assertNotNull(syncSettings); assertTrue(syncSettings.isEnabled()); assertEquals(source, syncSettings.getSourceListInVfs().get(0)); assertEquals(dest, syncSettings.getDestinationPathInRfs()); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/6f754ad872cb162fb0d29d167cdd6d159d8112a0/TestSynchronize.java/buggy/test/org/opencms/synchronize/TestSynchronize.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2563,
4755,
19298,
554,
2628,
1435,
1216,
1185,
288,
7734,
14371,
6166,
273,
28287,
5621,
3639,
3376,
2932,
22218,
7153,
471,
12392,
326,
24488,
1947,
434,
279,
729,
8863,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2563,
4755,
19298,
554,
2628,
1435,
1216,
1185,
288,
7734,
14371,
6166,
273,
28287,
5621,
3639,
3376,
2932,
22218,
7153,
471,
12392,
326,
24488,
1947,
434,
279,
729,
8863,
... | ||
return range; | return range; | public RangeType getRange() { return range; } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/4df872aabc29a3e53e330b63a7b853df5c00552e/AmmoType.java/buggy/megamek/src/megamek/common/AmmoType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8086,
559,
22373,
1435,
288,
202,
2463,
1048,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8086,
559,
22373,
1435,
288,
202,
2463,
1048,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
this.stopTime = stop.getTime() / 1000 - SdpConstants.NTP_CONST; | this.stopTime = SdpFactory.getNtpTime( stop ); | public void setStop(Date stop) throws SdpException { if (stop == null) throw new SdpException("The date is null"); else { this.stopTime = stop.getTime() / 1000 - SdpConstants.NTP_CONST; } } | 3364 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3364/bcf061a7b1f7e8cbef4c19406f2786c29a36ed86/TimeField.java/buggy/src/gov/nist/javax/sdp/fields/TimeField.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
4947,
12,
1626,
2132,
13,
1216,
348,
9295,
503,
288,
202,
202,
430,
261,
5681,
422,
446,
13,
1082,
202,
12849,
394,
348,
9295,
503,
2932,
1986,
1509,
353,
446,
8863,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
4947,
12,
1626,
2132,
13,
1216,
348,
9295,
503,
288,
202,
202,
430,
261,
5681,
422,
446,
13,
1082,
202,
12849,
394,
348,
9295,
503,
2932,
1986,
1509,
353,
446,
8863,... |
} | } | public void afterPropertiesSet() throws MalformedURLException { if (getServiceInterface() == null) { throw new IllegalArgumentException("serviceInterface is required."); } if (getServiceUrl() == null) { throw new IllegalArgumentException("serviceUrl is required."); } serviceUrl = new URL(getServiceUrl()); if (transport == null) { transport = new HttpTransport(serviceUrl); } transport.setAuthenticationCallback(new AuthenticationCallback() { public Authentication authenticate(Request request) { if (userName != null && password != null) { return new UsernamePasswordAuthentication(userName, password); } return null; } }); this.serviceProxy = ProxyFactory.getProxy(getServiceInterface(), new MethodInterceptor() { public Object invoke(MethodInvocation invocation) throws Throwable { Method method = invocation.getMethod(); Object[] args = invocation.getArguments(); return transport .invokeRemoteMethod(getServiceInterface(), method, args); } }); } | 55916 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55916/e234e2fb6f38935d0806ccfa20cc71a4161b68ad/SimpleProxyFactoryBean.java/buggy/sandbox/src/org/springframework/remoting/simple/SimpleProxyFactoryBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1839,
2297,
694,
1435,
1216,
20710,
288,
3639,
309,
261,
588,
18348,
1435,
422,
446,
13,
288,
5411,
604,
394,
2754,
2932,
3278,
1358,
353,
1931,
1199,
1769,
3639,
289,
3639,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1839,
2297,
694,
1435,
1216,
20710,
288,
3639,
309,
261,
588,
18348,
1435,
422,
446,
13,
288,
5411,
604,
394,
2754,
2932,
3278,
1358,
353,
1931,
1199,
1769,
3639,
289,
3639,
30... |
return null; | return new Box(BoxLayout.Y_AXIS); | public static Box createVerticalBox() { return null; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50dc6879c9be89f646fdff68c58f785e3dc0b90e/Box.java/buggy/core/src/classpath/javax/javax/swing/Box.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
8549,
752,
15704,
3514,
1435,
225,
288,
565,
327,
394,
8549,
12,
3514,
3744,
18,
61,
67,
25614,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
8549,
752,
15704,
3514,
1435,
225,
288,
565,
327,
394,
8549,
12,
3514,
3744,
18,
61,
67,
25614,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
showPathList(subCtx, " | public void showLocale(WebContext ctx, String which) { int i; int j; int n = ctx.docLocale.length; if(which.equals(xREMOVE)) { ctx.println("<b><a href=\"" + ctx.url() + "\">" + "List of Locales" + "</a></b><br/>"); ctx.session.getLocales().remove(ctx.field("_")); ctx.println("<h2>Your session for " + ctx.field("_") + " has been removed.</h2>"); doMain(ctx); return; } CLDRFile cf = getUserFile(ctx, (ctx.session.user==null)?null:ctx.session.user, ctx.locale); if(cf == null) { throw new InternalError("CLDRFile is null!"); } CLDRDBSource ourSrc = (CLDRDBSource)ctx.getByLocale(USER_FILE + CLDRDBSRC); // TODO: remove. debuggin' if(ourSrc == null) { throw new InternalError("oursrc is null! - " + (USER_FILE + CLDRDBSRC) + " @ " + ctx.locale ); } synchronized (ourSrc) { // Set up checks CheckCLDR checkCldr = (CheckCLDR)ctx.getByLocale(USER_FILE + CHECKCLDR); List checkCldrResult = new ArrayList(); if (checkCldr == null) { logger.info("Initting tests . . ."); long t0 = System.currentTimeMillis(); checkCldr = CheckCLDR.getCheckAll(/* "(?!.*Collision.*).*" */ ".*"); ctx.putByLocale(USER_FILE + CHECKCLDR, checkCldr); { CheckCLDR subCheckCldr = (CheckCLDR)ctx.getByLocale(SurveyMain.USER_FILE + SurveyMain.CHECKCLDR); if(subCheckCldr == null) { throw new InternalError("subCheckCldr == null"); } } checkCldr.setDisplayInformation(getEnglishFile()); checkCldr.setCldrFileToCheck(cf, null, checkCldrResult); // TODO: when does this get updated? if(!checkCldrResult.isEmpty()) { ctx.putByLocale(USER_FILE + CHECKCLDR_RES, checkCldrResult); // don't bother if empty . . . } long t2 = System.currentTimeMillis(); logger.info("Time to init tests: " + (t2-t0)); } // Locale menu ctx.println("<table width='95%' border=0><tr><td width='25%'>"); ctx.println("<b><a href=\"" + ctx.url() + "\">" + "Locales" + "</a></b><br/>"); for(i=(n-1);i>0;i--) { for(j=0;j<(n-i);j++) { ctx.print(" "); } boolean canModify = UserRegistry.userCanModifyLocale(ctx.session.user,ctx.docLocale[i]); ctx.println("\u2517 <a href=\"" + ctx.url() + ctx.urlConnector() +"_=" + ctx.docLocale[i] + "\">" + ctx.docLocale[i] + "</a> " + new ULocale(ctx.docLocale[i]).getDisplayName() ); if(canModify) { ctx.print(MODIFY_THING); } ctx.println("<br/>"); } for(j=0;j<n;j++) { ctx.print(" "); } boolean canModifyL = UserRegistry.userCanModifyLocale(ctx.session.user,ctx.locale.toString()); ctx.print("\u2517 <font size=+2><b>" + ctx.locale + "</b>"); if(canModifyL) { ctx.print(MODIFY_THING); } ctx.println("</font> " + ctx.locale.getDisplayName() + "<br/>"); ctx.println("</td><td>"); if((which == null) || which.equals("")) { ////which = RAW_MENU_ITEM; //which = LOCALEDISPLAYNAMES_ITEMS[0]; // was xMAIN which = xMAIN; } WebContext subCtx = new WebContext(ctx); subCtx.addQuery("_",ctx.locale.toString()); printMenu(subCtx, which, xMAIN); subCtx.println("<p class='hang'> Locale Display: "); for(n =0 ; n < LOCALEDISPLAYNAMES_ITEMS.length; n++) { //if(n>0) ctx.print(", "); printMenu(subCtx, which, LOCALEDISPLAYNAMES_ITEMS[n]); } subCtx.println("</p> <p class='hang'>Other Items: "); for(n =0 ; n < OTHERROOTS_ITEMS.length; n++) { if(n>0) ctx.print(" "); printMenu(subCtx, which, OTHERROOTS_ITEMS[n]); } ctx.print(" "); printMenu(subCtx, which, xOTHER); printMenu(subCtx, which, TEST_MENU_ITEM); printMenu(subCtx, which, RAW_MENU_ITEM); subCtx.println("</td></tr></table>"); if( (!checkCldrResult.isEmpty()) && (/* true || */ (checkCldr != null) && (xMAIN.equals(which))) ) { ctx.println("<hr /><h4>Possible problems with locale:</h4>"); ctx.println("<pre style='border: 1px dashed olive; padding: 1em; background-color: cream; overflow: auto;'>"); for (Iterator it3 = checkCldrResult.iterator(); it3.hasNext();) { CheckCLDR.CheckStatus status = (CheckCLDR.CheckStatus) it3.next(); if (!status.getType().equals(status.exampleType)) { ctx.println(status.toString() + "<br />"); } else { ctx.println("<i>example available</i><br />"); } } ctx.println("</pre><hr />"); } subCtx.addQuery("x",which); for(n =0 ; n < LOCALEDISPLAYNAMES_ITEMS.length; n++) { if(LOCALEDISPLAYNAMES_ITEMS[n].equals(which)) { showLocaleCodeList(subCtx, which); return; } } // handle from getNodeSet for these . . . for(j=0;j<OTHERROOTS_ITEMS.length;j++) { if(OTHERROOTS_ITEMS[j].equals(which)) { if(which.equals("timeZoneNames")) { showZoneList(subCtx); } else { showPathList(subCtx, "//ldml/"+OTHERROOTS_ITEMS[j], null); } return; } } // fall through if wasn't one of the other roots if(xOTHER.equals(which)) { // doOtherList(subCtx, which); } else if(RAW_MENU_ITEM.equals(which)) { doRaw(subCtx); /* } else if((checkCldr != null) && (TEST_MENU_ITEM.equals(which))) { // print the results CLDRFile file = cf; ctx.println("<pre style='border: 1px dashed olive; padding: 1em; background-color: cream; overflow: auto;'>"); // Set locales = ourSrc.getAvailable(); XPathParts pathParts = new XPathParts(null, null); XPathParts fullPathParts = new XPathParts(null, null); // for (Iterator it = locales.iterator(); it.hasNext();) { String localeID = ctx.locale.toString(); ctx.println(checkCldr.getLocaleAndName(localeID)); // CLDRFile file = ourSrc.factory.make(localeID, false); ctx.println(" <h4>Test Results</h4>"); for (Iterator it2 = file.iterator(); it2.hasNext();) { String path = (String) it2.next(); //System.out.println("P: " + path); String value = file.getStringValue(path); String fullPath = file.getFullXPath(path); checkCldr.check(path, fullPath, value, pathParts, fullPathParts, checkCldrResult); for (Iterator it3 = checkCldrResult.iterator(); it3.hasNext();) { CheckCLDR.CheckStatus status = (CheckCLDR.CheckStatus) it3.next(); if (!status.getType().equals(status.exampleType)) { ctx.println(status.toString() + "\t" + value + "\t" + fullPath); } //else { //ctx.println("<i>example available</i><br />"); //} } } System.out.println(" done with tests "); // } ctx.println("</pre>"); */ } else { doMain(subCtx); } } // ?// ctx.removeByLocale(USER_FILE + CHECKCLDR);// ctx.removeByLocale(USER_FILE + CHECKCLDR_RES);} | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/214310376f49cf87cc714ee3005cb268886db7e6/SurveyMain.java/clean/tools/java/org/unicode/cldr/web/SurveyMain.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2405,
743,
682,
12,
1717,
6442,
16,
315,
2405,
743,
682,
12,
1717,
6442,
16,
315,
2405,
743,
682,
12,
1717,
6442,
16,
315,
2405,
743,
682,
12,
1717,
6442,
16,
315,
1071,
4500,
743,
682,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2405,
743,
682,
12,
1717,
6442,
16,
315,
2405,
743,
682,
12,
1717,
6442,
16,
315,
2405,
743,
682,
12,
1717,
6442,
16,
315,
2405,
743,
682,
12,
1717,
6442,
16,
315,
1071,
4500,
743,
682,
12... | |
else if (datum == BASE_URI) | else if (datum == BASE_URI || datum == DOCUMENT_URI) | public final int gotoChildrenStart(int index) { if (index == data.length) return -1; char datum = data[index]; if ((datum >= BEGIN_GROUP_SHORT && datum <= BEGIN_GROUP_SHORT+BEGIN_GROUP_SHORT_INDEX_MAX) || datum == BEGIN_GROUP_LONG || datum == BEGIN_DOCUMENT) index += 3; else return -1; for (;;) { if (index >= gapStart) index += gapEnd - gapStart; datum = data[index]; if (datum == BEGIN_ATTRIBUTE_LONG) { int end = getIntN(index+3); index = end + (end < 0 ? data.length : index); } else if (datum == END_ATTRIBUTE || datum == JOINER) index++; else if (datum == BASE_URI) index += 3; else break; } return index; } | 41089 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41089/7d74338b6ba195e91595d0eecd6c792a5a900a8d/TreeList.java/clean/gnu/lists/TreeList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
509,
2897,
4212,
1685,
12,
474,
770,
13,
225,
288,
565,
309,
261,
1615,
422,
501,
18,
2469,
13,
1377,
327,
300,
21,
31,
565,
1149,
12059,
273,
501,
63,
1615,
15533,
565,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
509,
2897,
4212,
1685,
12,
474,
770,
13,
225,
288,
565,
309,
261,
1615,
422,
501,
18,
2469,
13,
1377,
327,
300,
21,
31,
565,
1149,
12059,
273,
501,
63,
1615,
15533,
565,
30... |
decompiler.addString(xml); | decompiler.addName(xml); | private Node xmlInitializer() throws IOException { int tt = ts.getFirstXMLToken(); if (tt != Token.XML && tt != Token.XMLEND) { reportError("msg.syntax"); return null; } /* Make a NEW node to append to. */ Node pnXML = nf.createLeaf(Token.NEW); decompiler.addToken(Token.NEW); decompiler.addToken(Token.DOT); String xml = ts.getString(); boolean fAnonymous = xml.trim().startsWith("<>"); decompiler.addName(fAnonymous ? "XMLList" : "XML"); Node pn = nf.createName(fAnonymous ? "XMLList" : "XML"); nf.addChildToBack(pnXML, pn); pn = null; Node expr; for (;;tt = ts.getNextXMLToken()) { switch (tt) { case Token.XML: xml = ts.getString(); decompiler.addString(xml); mustMatchToken(Token.LC, "msg.syntax"); decompiler.addToken(Token.LC); expr = (peekToken() == Token.RC) ? nf.createString("") : expr(false); mustMatchToken(Token.RC, "msg.syntax"); decompiler.addToken(Token.RC); if (pn == null) { pn = nf.createString(xml); } else { pn = nf.createBinary(Token.ADD, pn, nf.createString(xml)); } int nodeType; if (ts.isXMLAttribute()) { nodeType = Token.ESCXMLATTR; } else { nodeType = Token.ESCXMLTEXT; } expr = nf.createUnary(nodeType, expr); pn = nf.createBinary(Token.ADD, pn, expr); break; case Token.XMLEND: xml = ts.getString(); decompiler.addString(xml); if (pn == null) { pn = nf.createString(xml); } else { pn = nf.createBinary(Token.ADD, pn, nf.createString(xml)); } nf.addChildToBack(pnXML, pn); return pnXML; default: reportError("msg.syntax"); return null; } } } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/b95c09649bc1271bfd1e276600f8d302777292ac/Parser.java/buggy/src/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
2029,
2025,
14729,
1435,
1216,
1860,
565,
288,
3639,
509,
3574,
273,
3742,
18,
588,
3759,
4201,
1345,
5621,
3639,
309,
261,
748,
480,
3155,
18,
4201,
597,
3574,
480,
3155,
18,
60,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
2029,
2025,
14729,
1435,
1216,
1860,
565,
288,
3639,
509,
3574,
273,
3742,
18,
588,
3759,
4201,
1345,
5621,
3639,
309,
261,
748,
480,
3155,
18,
4201,
597,
3574,
480,
3155,
18,
60,
... |
protected void dropObject(LayoutPart sourcePart, LayoutPart targetPart, int side) { | protected void dropObject(PartPane[] toDrop, LayoutPart visiblePart, LayoutPart targetPart, int side) { getControl().setRedraw(false); | protected void dropObject(LayoutPart sourcePart, LayoutPart targetPart, int side) { if (side == SWT.CENTER) { ILayoutContainer container = (ILayoutContainer)targetPart; ILayoutContainer sourceContainer = null; LayoutPart visiblePart = null; if (isStackType(sourcePart)) { sourceContainer = (ILayoutContainer)sourcePart; visiblePart = getVisiblePart(sourceContainer); } stack(sourcePart, targetPart); if (sourceContainer != null) { if (visiblePart != null) { setVisiblePart(container, visiblePart); visiblePart.setFocus(); } } else if (isPaneType(sourcePart)) { setVisiblePart(container, sourcePart); sourcePart.setFocus(); } } else { if (isStackType(sourcePart)) { // Remove the part from old container. derefPart(sourcePart); addEnhanced(sourcePart, side, getDockingRatio(sourcePart, targetPart), targetPart); } else { derefPart(sourcePart); LayoutPart newPart = createStack(sourcePart); addEnhanced(newPart, side, getDockingRatio(sourcePart, targetPart), targetPart); } sourcePart.setFocus(); }} | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e04a85b80c5ca10481c86bbaa2202b3f2fc194bb/PartSashContainer.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartSashContainer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
3640,
921,
12,
3744,
1988,
1084,
1988,
16,
9995,
1988,
1018,
1988,
16,
509,
4889,
13,
288,
202,
202,
430,
261,
5564,
422,
348,
8588,
18,
19835,
13,
288,
202,
377,
202,
377,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
3640,
921,
12,
3744,
1988,
1084,
1988,
16,
9995,
1988,
1018,
1988,
16,
509,
4889,
13,
288,
202,
202,
430,
261,
5564,
422,
348,
8588,
18,
19835,
13,
288,
202,
377,
202,
377,
202,
... |
public OID(String strRep) | public OID(int[] components) | public OID(String strRep) { this(strRep, false); } | 27835 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27835/b56b0f1768429005c2413ce50995d9a217f69c35/OID.java/buggy/libjava/gnu/java/security/OID.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
18026,
12,
474,
8526,
4085,
13,
225,
288,
565,
333,
12,
701,
18933,
16,
629,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
18026,
12,
474,
8526,
4085,
13,
225,
288,
565,
333,
12,
701,
18933,
16,
629,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
vcs.createFile(p("file"), "old"); | vcs.createFile(p("/file"), "old"); | public void testTreatingDeletedAndCreatedFilesWithSameNameDifferently() { vcs.createFile(p("file"), "old"); vcs.apply(); vcs.delete(p("file")); vcs.createFile(p("file"), "new"); vcs.apply(); List<Label> labels = vcs.getLabelsFor(p("file")); assertEquals(1, labels.size()); Entry e = labels.get(0).getEntry(); assertEquals("file", e.getName()); assertEquals("new", e.getContent()); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/8a6fdbc15b3cd4aaa232cf2026aa4a60418c162a/LocalVcsDifferencesTest.java/buggy/LocalVcs/test/com/intellij/localvcs/LocalVcsDifferencesTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
56,
266,
1776,
7977,
1876,
6119,
2697,
1190,
8650,
461,
26270,
715,
1435,
288,
565,
20255,
18,
2640,
812,
12,
84,
2932,
19,
768,
6,
3631,
315,
1673,
8863,
565,
20255,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
56,
266,
1776,
7977,
1876,
6119,
2697,
1190,
8650,
461,
26270,
715,
1435,
288,
565,
20255,
18,
2640,
812,
12,
84,
2932,
19,
768,
6,
3631,
315,
1673,
8863,
565,
20255,
1... |
throw new AgiNetworkException( "Unable to read reply from Asterisk: " + e.getMessage(), e); | throw new AgiNetworkException("Unable to read reply from Asterisk: " + e.getMessage(), e); | public AgiReply readReply() throws AgiException { AgiReply reply; List<String> lines; String line; lines = new ArrayList<String>(); try { line = socket.readLine(); } catch (IOException e) { throw new AgiNetworkException( "Unable to read reply from Asterisk: " + e.getMessage(), e); } if (line == null) { throw new AgiHangupException(); } lines.add(line); // read synopsis and usage if statuscode is 520 if (line.startsWith(Integer .toString(AgiReply.SC_INVALID_COMMAND_SYNTAX))) { try { while ((line = socket.readLine()) != null) { lines.add(line); if (line.startsWith(Integer .toString(AgiReply.SC_INVALID_COMMAND_SYNTAX))) { break; } } } catch (IOException e) { throw new AgiNetworkException( "Unable to read reply from Asterisk: " + e.getMessage(), e); } } reply = new AgiReplyImpl(lines); return reply; } | 56387 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56387/e5e7c815574e16efadab1f60645a8eaee5aa7999/AgiReaderImpl.java/buggy/src/main/java/org/asteriskjava/fastagi/internal/AgiReaderImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5495,
77,
7817,
855,
7817,
1435,
1216,
5495,
77,
503,
565,
288,
3639,
5495,
77,
7817,
4332,
31,
3639,
987,
32,
780,
34,
2362,
31,
3639,
514,
980,
31,
3639,
2362,
273,
394,
2407,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5495,
77,
7817,
855,
7817,
1435,
1216,
5495,
77,
503,
565,
288,
3639,
5495,
77,
7817,
4332,
31,
3639,
987,
32,
780,
34,
2362,
31,
3639,
514,
980,
31,
3639,
2362,
273,
394,
2407,
... |
PsiJavaFile file = (PsiJavaFile)createFile("Test.java", "class Test extends Type {\n}"); | PsiJavaFile file = (PsiJavaFile)createLightFile("Test.java", "class Test extends Type {\n}"); | public void testAdd() throws IncorrectOperationException { PsiJavaFile file = (PsiJavaFile)createFile("Test.java", "class Test extends Type {\n}"); PsiClass aClass = file.getClasses()[0]; PsiJavaCodeReferenceElement ref = aClass.getExtendsList().getReferenceElements()[0]; PsiReferenceParameterList list = ref.getParameterList(); PsiElementFactory factory = getPsiManager().getElementFactory(); PsiTypeElement typeElement1 = factory.createTypeElement(factory.createTypeFromText("A", null)); list.add(typeElement1); assertEquals("class Test extends Type<A> {\n}", file.getText()); PsiTestUtil.checkFileStructure(file); PsiTypeElement typeElement2 = factory.createTypeElement(factory.createTypeFromText("B", null)); list.add(typeElement2); assertEquals("class Test extends Type<A, B> {\n}", file.getText()); PsiTestUtil.checkFileStructure(file); PsiTypeElement typeElement3 = factory.createTypeElement(factory.createTypeFromText("C", null)); list.addAfter(typeElement3, null); assertEquals("class Test extends Type<C, A, B> {\n}", file.getText()); PsiTestUtil.checkFileStructure(file); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/64507d88d77c8d00d061dec4545c0c5feeb7d05f/AddRemoveInTypeParameterListTest.java/buggy/idea-tests/src/com/intellij/psi/AddRemoveInTypeParameterListTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
986,
1435,
1216,
657,
6746,
10602,
288,
565,
453,
7722,
5852,
812,
585,
273,
261,
52,
7722,
5852,
812,
13,
2640,
12128,
812,
2932,
4709,
18,
6290,
3113,
315,
1106,
7766,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
986,
1435,
1216,
657,
6746,
10602,
288,
565,
453,
7722,
5852,
812,
585,
273,
261,
52,
7722,
5852,
812,
13,
2640,
12128,
812,
2932,
4709,
18,
6290,
3113,
315,
1106,
7766,
... |
if (name == null) { result = new RubySymbol(runtime, null) { public boolean isNil() { return true; } }; } else { result = new RubySymbol(runtime, name); } | result = new RubySymbol(runtime, name); | public static RubySymbol newSymbol(Ruby runtime, String name) { RubySymbol result; synchronized (RubySymbol.class) { // Locked to prevent the creation of multiple instances of // the same symbol. Most code depends on them being unique. result = runtime.symbolTable.lookup(name); if (result == null) { if (name == null) { result = new RubySymbol(runtime, null) { public boolean isNil() { return true; } }; } else { result = new RubySymbol(runtime, name); } runtime.symbolTable.store(result); } } return result; } | 47984 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47984/cc20d41e6031b7e9c9ed46676d32e45334ed0d53/RubySymbol.java/clean/src/org/jruby/RubySymbol.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
5335,
394,
5335,
12,
54,
10340,
3099,
16,
514,
508,
13,
288,
3639,
19817,
5335,
563,
31,
3639,
3852,
261,
54,
10340,
5335,
18,
1106,
13,
288,
5411,
368,
3488,
329,
358... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
5335,
394,
5335,
12,
54,
10340,
3099,
16,
514,
508,
13,
288,
3639,
19817,
5335,
563,
31,
3639,
3852,
261,
54,
10340,
5335,
18,
1106,
13,
288,
5411,
368,
3488,
329,
358... |
public JavaParserLexer(CharStream input) { super(input); } | public JavaParserLexer() {;} | public JavaParserLexer(CharStream input) { super(input); } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/7e425814ce563fcc662b266adb2a4dc8e1a95d19/JavaParserLexer.java/buggy/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParserLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5110,
2678,
13356,
12,
2156,
1228,
810,
13,
288,
3639,
2240,
12,
2630,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5110,
2678,
13356,
12,
2156,
1228,
810,
13,
288,
3639,
2240,
12,
2630,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
myNestedClassesCache = new THashMap<ReferenceType, List<ReferenceType>>(myNestedClassesCache.size()); | myNestedClassesCache = new HashMap<ReferenceType, List<ReferenceType>>(myNestedClassesCache.size()); | public void clearCaches() { if (LOG.isDebugEnabled()) { LOG.debug("VM cleared"); } myAllClasses = null; if (myNestedClassesCache.size() > 0) { myNestedClassesCache = new THashMap<ReferenceType, List<ReferenceType>>(myNestedClassesCache.size()); } myAllThreadsDirty = true; myTimeStamp++; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/54b892b05496f9bc7ec57669244e87488a2a6d67/VirtualMachineProxyImpl.java/clean/debugger/impl/com/intellij/debugger/jdi/VirtualMachineProxyImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2424,
18755,
1435,
288,
565,
309,
261,
4842,
18,
291,
2829,
1526,
10756,
288,
1377,
2018,
18,
4148,
2932,
7397,
16054,
8863,
565,
289,
565,
3399,
1595,
4818,
273,
446,
31,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2424,
18755,
1435,
288,
565,
309,
261,
4842,
18,
291,
2829,
1526,
10756,
288,
1377,
2018,
18,
4148,
2932,
7397,
16054,
8863,
565,
289,
565,
3399,
1595,
4818,
273,
446,
31,
565,... |
if(logMINOR) Logger.minor(this, "Look up got '"+addr+"'"); | if(logMINOR) Logger.minor(this, "Look up got '"+addr+ '\''); | public InetAddress getHandshakeAddress() { // Since we're handshaking, hostname-to-IP may have changed boolean logMINOR = Logger.shouldLog(Logger.MINOR, this); if ((_address != null) && (hostname == null)) { if(logMINOR) Logger.minor(this, "hostname is null, returning "+_address); return _address; } else { if(logMINOR) Logger.minor(this, "Looking up '"+hostname+"' in DNS"); /* * Peers are constructed from an address once a * handshake has been completed, so this lookup * will only be performed during a handshake * (this method should normally only be called * from PeerNode.getHandshakeIPs() and once * each connection from this.getAddress() * otherwise) - it doesn't mean we perform a * DNS lookup with every packet we send. */ try { InetAddress addr = InetAddress.getByName(hostname); if(logMINOR) Logger.minor(this, "Look up got '"+addr+"'"); if( addr != null ) { /* * cache the answer since getHandshakeAddress() * doesn't use the cached value, thus * getHandshakeIPs() should always get the * latest value from DNS (minus Java's caching) */ this._address = InetAddress.getByAddress(addr.getAddress()); if(logMINOR) Logger.minor(this, "Setting address to "+_address); } return addr; } catch (UnknownHostException e) { if(logMINOR) Logger.minor(this, "DNS said hostname '"+hostname+"' is an unknown host, returning null"); return null; } } } | 50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/62fd59041864b4ed1f43adc676de6bfb5ea977f3/FreenetInetAddress.java/buggy/src/freenet/io/comm/FreenetInetAddress.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
14218,
336,
14545,
1887,
1435,
288,
202,
565,
368,
7897,
732,
4565,
948,
674,
6159,
16,
5199,
17,
869,
17,
2579,
2026,
1240,
3550,
202,
202,
6494,
613,
6236,
916,
273,
4242,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
14218,
336,
14545,
1887,
1435,
288,
202,
565,
368,
7897,
732,
4565,
948,
674,
6159,
16,
5199,
17,
869,
17,
2579,
2026,
1240,
3550,
202,
202,
6494,
613,
6236,
916,
273,
4242,
1... |
public synchronized void terminate() { audioLine.close(); setClosed(true); notify(); } | public void terminate() {} | public synchronized void terminate() { audioLine.close(); setClosed(true); notify(); } | 7874 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7874/1cf1caacbab8455f25d94b957b0669f5382f2b7b/Microphone.java/buggy/edu/cmu/sphinx/frontend/Microphone.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
10850,
1435,
288,
3639,
7447,
1670,
18,
4412,
5621,
3639,
444,
7395,
12,
3767,
1769,
3639,
5066,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
10850,
1435,
288,
3639,
7447,
1670,
18,
4412,
5621,
3639,
444,
7395,
12,
3767,
1769,
3639,
5066,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
StringBuffer buf = new StringBuffer (); | StringBuffer int_buf = new StringBuffer (); | public Number parse (String str, ParsePosition pos) { // Our strategy is simple: copy the text into a buffer, // translating or omitting locale-specific information. Then // let Double or Long convert the number for us. boolean is_neg = false; int index = pos.getIndex(); StringBuffer buf = new StringBuffer (); // We have to check both prefixes, because one might be empty. We // want to pick the longest prefix that matches. boolean got_pos = str.startsWith(positivePrefix, index); String np = (negativePrefix != null ? negativePrefix : positivePrefix + symbols.getMinusSign()); boolean got_neg = str.startsWith(np, index); if (got_pos && got_neg) { // By checking this way, we preserve ambiguity in the case // where the negative format differs only in suffix. We // check this again later. if (np.length() > positivePrefix.length()) { is_neg = true; index += np.length(); } else index += positivePrefix.length(); } else if (got_neg) { is_neg = true; index += np.length(); } else if (got_pos) index += positivePrefix.length(); else { pos.setErrorIndex (index); return null; } // FIXME: handle Inf and NaN. // FIXME: do we have to respect minimum digits? // What about leading zeros? What about multiplier? int start_index = index; int max = str.length(); int last = index + maximumIntegerDigits; if (last > 0 && max > last) max = last; char zero = symbols.getZeroDigit(); int last_group = -1; boolean int_part = true; boolean exp_part = false; for (; index < max; ++index) { char c = str.charAt(index); // FIXME: what about grouping size? if (groupingUsed && c == symbols.getGroupingSeparator()) { if (last_group != -1 && groupingSize != 0 && (index - last_group) % groupingSize != 0) { pos.setErrorIndex(index); return null; } last_group = index; } else if (c >= zero && c <= zero + 9) { buf.append((char) (c - zero + '0')); exp_part = false; } else if (parseIntegerOnly) break; else if (c == symbols.getDecimalSeparator()) { if (last_group != -1 && groupingSize != 0 && (index - last_group) % groupingSize != 0) { pos.setErrorIndex(index); return null; } buf.append('.'); int_part = false; } else if (c == symbols.getExponential()) { buf.append('E'); int_part = false; exp_part = true; } else if (exp_part && (c == '+' || c == '-' || c == symbols.getMinusSign())) { // For exponential notation. buf.append(c); } else break; } if (index == start_index) { // Didn't see any digits. pos.setErrorIndex(index); return null; } // Check the suffix. We must do this before converting the // buffer to a number to handle the case of a number which is // the most negative Long. boolean got_pos_suf = str.startsWith(positiveSuffix, index); String ns = (negativePrefix == null ? positiveSuffix : negativeSuffix); boolean got_neg_suf = str.startsWith(ns, index); if (is_neg) { if (! got_neg_suf) { pos.setErrorIndex(index); return null; } } else if (got_pos && got_neg && got_neg_suf) { is_neg = true; } else if (got_pos != got_pos_suf && got_neg != got_neg_suf) { pos.setErrorIndex(index); return null; } String suffix = is_neg ? ns : positiveSuffix; if (is_neg) buf.insert(0, '-'); String t = buf.toString(); Number result = null; try { result = new Long (t); } catch (NumberFormatException x1) { try { result = new Double (t); } catch (NumberFormatException x2) { } } if (result == null) { pos.setErrorIndex(index); return null; } pos.setIndex(index + suffix.length()); return result; } | 25337 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25337/34290161e7c358c11bc837788b6e95a9d3b39f49/DecimalFormat.java/buggy/libjava/java/text/DecimalFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3588,
1109,
261,
780,
609,
16,
2884,
2555,
949,
13,
225,
288,
565,
368,
29613,
6252,
353,
4143,
30,
1610,
326,
977,
1368,
279,
1613,
16,
565,
368,
2162,
1776,
578,
14088,
1787,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3588,
1109,
261,
780,
609,
16,
2884,
2555,
949,
13,
225,
288,
565,
368,
29613,
6252,
353,
4143,
30,
1610,
326,
977,
1368,
279,
1613,
16,
565,
368,
2162,
1776,
578,
14088,
1787,
25... |
List list = new ArrayList(); | List<String> list = new ArrayList<String>(); | public List getAttributeNames(Request request) { List list = new ArrayList(); WicketPortletRequest webRequest = toPortletRequest(request); PortletSession httpSession = getPortletSession(webRequest); if (httpSession != null) { final Enumeration names = httpSession.getAttributeNames(); final String prefix = getSessionAttributePrefix(webRequest); while (names.hasMoreElements()) { final String name = (String)names.nextElement(); if (name.startsWith(prefix)) { list.add(name.substring(prefix.length())); } } } return list; } | 46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/c491c4e8d95c40482a6747a07837b22481bcdcb9/PortletSessionStore.java/buggy/wicket/src/java/wicket/protocol/http/portlet/PortletSessionStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
4061,
1557,
12,
691,
590,
13,
202,
95,
202,
202,
682,
666,
273,
394,
2407,
5621,
202,
202,
59,
29378,
18566,
691,
3311,
691,
273,
358,
18566,
691,
12,
2293,
1769,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
4061,
1557,
12,
691,
590,
13,
202,
95,
202,
202,
682,
666,
273,
394,
2407,
5621,
202,
202,
59,
29378,
18566,
691,
3311,
691,
273,
358,
18566,
691,
12,
2293,
1769,
202,
... |
protected void init() throws Exception { AxisProperties.setProperty("axis.doAutoTypes", String.valueOf(connector.isDoAutoTypes())); MuleDescriptor descriptor = (MuleDescriptor) component.getDescriptor(); String style = (String) descriptor.getProperties().get("style"); String use = (String) descriptor.getProperties().get("use"); String doc = (String) descriptor.getProperties().get("documentation"); UMOEndpointURI uri = endpoint.getEndpointURI(); String serviceName = component.getDescriptor().getName(); SOAPService existing = this.connector.getAxisServer().getService(serviceName); if( existing != null) { service = existing; logger.debug("Using existing service for " + serviceName); } else { //Check if the style is message. If so, we need to create //a message oriented provider if (style != null && style.equalsIgnoreCase("message")) { logger.debug("Creating Message Provider"); service = new SOAPService(new MuleMsgProvider(connector)); } else { logger.debug("Creating RPC Provider"); service = new SOAPService(new MuleProvider(connector)); } service.setEngine(connector.getAxisServer()); } String servicePath = uri.getPath(); service.setOption(serviceName, this); service.setOption(AxisConnector.SERVICE_PROPERTY_SERVCE_PATH, servicePath); service.setOption(AxisConnector.SERVICE_PROPERTY_COMPONENT_NAME, serviceName); service.setName(serviceName); // Add any custom options from the Descriptor config Map options = (Map) descriptor.getProperties().get("axisOptions"); if (options != null) { Map.Entry entry; for (Iterator iterator = options.entrySet().iterator(); iterator.hasNext();) { entry = (Map.Entry) iterator.next(); service.setOption(entry.getKey().toString(), entry.getValue()); logger.debug("Adding Axis option: " + entry); } } // set method names Class[] interfaces = ServiceProxy.getInterfacesForComponent(component); if (interfaces.length == 0) { throw new InitialisationException(new Message(Messages.X_MUST_IMPLEMENT_AN_INTERFACE, serviceName), component); } // You must supply a class name if you want to restrict methods // or specify the 'allowedMethods' property in the axisOptions property String methodNames = "*"; if (endpoint.getProperties().get("soapMethods") != null) { Map methods = (Map) endpoint.getProperties().get("soapMethods"); Iterator i = methods.keySet().iterator(); StringBuffer buf = new StringBuffer(64); while (i.hasNext()) { String name = (String) i.next(); SoapMethod method = new SoapMethod(name, (String) methods.get(name)); List namedParameters = method.getNamedParameters(); ParameterDesc[] parameters = new ParameterDesc[namedParameters.size()]; for (int j = 0; j < namedParameters.size(); j++) { NamedParameter parameter = (NamedParameter) namedParameters.get(j); byte mode = ParameterDesc.INOUT; if (parameter.getMode().equals(ParameterMode.IN)) { mode = ParameterDesc.IN; } else if (parameter.getMode().equals(ParameterMode.OUT)) { mode = ParameterDesc.OUT; } parameters[j] = new ParameterDesc(parameter.getName(), mode, parameter.getType()); } service.getServiceDescription().addOperationDesc(new OperationDesc(name, parameters, method.getReturnType())); buf.append(name + ","); } methodNames = buf.toString(); methodNames = methodNames.substring(0, methodNames.length() - 1); } else { String[] methods = ServiceProxy.getMethodNames(interfaces); StringBuffer buf = new StringBuffer(64); for (int i = 0; i < methods.length; i++) { buf.append(methods[i]).append(","); } methodNames = buf.toString(); methodNames = methodNames.substring(0, methodNames.length() - 1); } String className = interfaces[0].getName(); // The namespace of the service. //Todo use the service qname in Mule 2.0 String namespace = (String) descriptor.getProperties().get("serviceNamespace"); if(namespace==null) { namespace = Namespaces.makeNamespace(className); } //WSDL override String wsdlFile = (String) descriptor.getProperties().get("wsdlFile"); if(wsdlFile!=null) { service.getServiceDescription().setWSDLFile(wsdlFile); } /* * Now we set up the various options for the SOAPService. We set: * * RPCProvider.OPTION_WSDL_SERVICEPORT In essense, this is our service * name * * RPCProvider.OPTION_CLASSNAME This tells the serverProvider (whether * it be an AvalonProvider or just JavaProvider) what class to load via * "makeNewServiceObject". * * RPCProvider.OPTION_SCOPE How long the object loaded via * "makeNewServiceObject" will persist - either request, session, or * application. We use the default for now. * * RPCProvider.OPTION_WSDL_TARGETNAMESPACE A namespace created from the * package name of the service. * * RPCProvider.OPTION_ALLOWEDMETHODS What methods the service can * execute on our class. * * We don't set: RPCProvider.OPTION_WSDL_PORTTYPE * RPCProvider.OPTION_WSDL_SERVICEELEMENT */ setOptionIfNotset(service, JavaProvider.OPTION_WSDL_SERVICEPORT, serviceName); setOptionIfNotset(service, JavaProvider.OPTION_CLASSNAME, className); setOptionIfNotset(service, JavaProvider.OPTION_SCOPE, "Request"); if(StringUtils.isNotBlank(namespace)) { setOptionIfNotset(service, JavaProvider.OPTION_WSDL_TARGETNAMESPACE, namespace); } // Set the allowed methods, allow all if there are none specified. if (methodNames == null) { setOptionIfNotset(service, JavaProvider.OPTION_ALLOWEDMETHODS, "*"); } else { setOptionIfNotset(service, JavaProvider.OPTION_ALLOWEDMETHODS, methodNames); } // Note that Axis has specific rules to how these two variables are // combined. This is handled for us // Set style: RPC/wrapped/Doc/Message if (style != null) { Style s = Style.getStyle(style); if(s==null) { throw new InitialisationException(new Message(Messages.VALUE_X_IS_INVALID_FOR_X, style, "style"), this); } else { service.setStyle(s); } } // Set use: Endcoded/Literal if (use != null) { Use u = Use.getUse(use); if(u==null) { throw new InitialisationException(new Message(Messages.VALUE_X_IS_INVALID_FOR_X, use, "use"), this); } else { service.setUse(u); } } service.getServiceDescription().setDocumentation(doc); // Tell Axis to try and be intelligent about serialization. TypeMappingRegistryImpl registry = (TypeMappingRegistryImpl) service.getTypeMappingRegistry(); // TypeMappingImpl tm = (TypeMappingImpl) registry.(); // Handle complex bean type automatically // registry.setDoAutoTypes( true ); // Axis 1.2 fix to handle autotypes properly AxisProperties.setProperty("axis.doAutoTypes", String.valueOf(connector.isDoAutoTypes())); // Load any explicitly defined bean types List types = (List) descriptor.getProperties().get("beanTypes"); connector.registerTypes(registry, types); service.setName(serviceName); // Add initialisation callback for the Axis service descriptor.addInitialisationCallback(new AxisInitialisationCallback(service)); if(uri.getScheme().equalsIgnoreCase("servlet")) { connector.addServletService(service); String endpointUrl = uri.getAddress() + "/" + serviceName; endpointUrl.replaceFirst("servlet:", "http:"); service.getServiceDescription().setEndpointURL(endpointUrl); } else { service.getServiceDescription().setEndpointURL(uri.getAddress() + "/" + serviceName); } if(StringUtils.isNotBlank(namespace)) { service.getServiceDescription().setDefaultNamespace(namespace); } service.stop(); } | 28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/9b925ef2807bc4f00b2f1c79003700cf0a1a7846/AxisMessageReceiver.java/clean/providers/axis/src/main/java/org/mule/providers/soap/axis/AxisMessageReceiver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1208,
1435,
1216,
1185,
565,
288,
3639,
15509,
2297,
18,
542,
1396,
2932,
4890,
18,
2896,
4965,
2016,
3113,
514,
18,
1132,
951,
12,
23159,
18,
291,
3244,
4965,
2016,
1435,
1001... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1208,
1435,
1216,
1185,
565,
288,
3639,
15509,
2297,
18,
542,
1396,
2932,
4890,
18,
2896,
4965,
2016,
3113,
514,
18,
1132,
951,
12,
23159,
18,
291,
3244,
4965,
2016,
1435,
1001... | ||
return returnValue; | return result; | public List getAllCheckedListItems() { List returnValue = getAllCheckedListItems(null); if(returnValue == null) return new ArrayList(); else return returnValue; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/1b5a48dc95ba70bbbb127e0222939475c30a03f4/ResourceTreeAndListGroup.java/buggy/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/dialogs/ResourceTreeAndListGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
987,
5514,
11454,
682,
3126,
1435,
288,
202,
682,
7750,
273,
5514,
11454,
682,
3126,
12,
2011,
1769,
202,
430,
12,
2463,
620,
422,
446,
13,
202,
202,
2463,
394,
2407,
5621,
202,
12107,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
987,
5514,
11454,
682,
3126,
1435,
288,
202,
682,
7750,
273,
5514,
11454,
682,
3126,
12,
2011,
1769,
202,
430,
12,
2463,
620,
422,
446,
13,
202,
202,
2463,
394,
2407,
5621,
202,
12107,
... |
NumberDataSet orthoValues = NumberDataSetImpl.create( new double[]{ | NumberDataSet orthoValues1 = NumberDataSetImpl.create( new double[]{ | public static final Chart createLine( ) { ChartWithAxes cwa3DLine = ChartWithAxesImpl.create( ); cwa3DLine.setDimension( ChartDimension.THREE_DIMENSIONAL_LITERAL ); // Plot cwa3DLine.getBlock( ).setBackground( ColorDefinitionImpl.WHITE( ) ); Plot p = cwa3DLine.getPlot( ); p.getClientArea( ).setBackground( ColorDefinitionImpl.create( 255, 255, 225 ) ); // Title cwa3DLine.getTitle( ) .getLabel( ) .getCaption( ) .setValue( "3D Line Chart" );//$NON-NLS-1$ // X-Axis Axis xAxisPrimary = cwa3DLine.getPrimaryBaseAxes( )[0]; xAxisPrimary.setType( AxisType.TEXT_LITERAL ); xAxisPrimary.getMajorGrid( ).setTickStyle( TickStyle.BELOW_LITERAL ); xAxisPrimary.getOrigin( ).setType( IntersectionType.VALUE_LITERAL ); // Y-Axis Axis yAxisPrimary = cwa3DLine.getPrimaryOrthogonalAxis( xAxisPrimary ); yAxisPrimary.getMajorGrid( ).setTickStyle( TickStyle.LEFT_LITERAL ); // Z-Axis Axis zAxis = AxisImpl.create( Axis.ANCILLARY_BASE ); zAxis.setType( AxisType.TEXT_LITERAL ); zAxis.setLabelPosition( Position.BELOW_LITERAL ); zAxis.setTitlePosition( Position.BELOW_LITERAL ); zAxis.getMajorGrid( ).setTickStyle( TickStyle.BELOW_LITERAL ); zAxis.setOrientation( Orientation.HORIZONTAL_LITERAL ); xAxisPrimary.getAncillaryAxes( ).add( zAxis ); // Data Set TextDataSet categoryValues = TextDataSetImpl.create( new String[]{ "Item 1", "Item 2", "Item 3"} );//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ NumberDataSet orthoValues = NumberDataSetImpl.create( new double[]{ 25, 35, 15 } ); // X-Series Series seCategory = SeriesImpl.create( ); seCategory.setDataSet( categoryValues ); SeriesDefinition sdX = SeriesDefinitionImpl.create( ); xAxisPrimary.getSeriesDefinitions( ).add( sdX ); sdX.getSeries( ).add( seCategory ); // Y-Sereis LineSeries ls = (LineSeries) LineSeriesImpl.create( ); ls.setDataSet( orthoValues ); ls.getLineAttributes( ).setColor( ColorDefinitionImpl.CREAM( ) ); for ( int i = 0; i < ls.getMarkers( ).size( ); i++ ) { ( (Marker) ls.getMarkers( ).get( i ) ).setType( MarkerType.TRIANGLE_LITERAL ); } ls.getLabel( ).setVisible( true ); ls.setPaletteLineColor( true ); SeriesDefinition sdY = SeriesDefinitionImpl.create( ); sdY.getSeriesPalette( ).update( -1 ); yAxisPrimary.getSeriesDefinitions( ).add( sdY ); sdY.getSeries( ).add( ls ); // Z-Series SeriesDefinition sdZ = SeriesDefinitionImpl.create( ); zAxis.getSeriesDefinitions( ).add( sdZ ); // Rotate the chart cwa3DLine.setRotation( Rotation3DImpl.create( new Angle3D[]{ Angle3DImpl.create( -10, 25, 0 ) } ) ); return cwa3DLine; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/87be376b194f799be46893d03147e84946c9d70b/Line.java/buggy/chart/org.eclipse.birt.chart.examples/src/org/eclipse/birt/chart/examples/view/models/Line.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
727,
14804,
752,
1670,
12,
262,
202,
95,
202,
202,
7984,
1190,
26494,
14098,
69,
23,
40,
1670,
273,
14804,
1190,
26494,
2828,
18,
2640,
12,
11272,
202,
202,
71,
91,
69,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
727,
14804,
752,
1670,
12,
262,
202,
95,
202,
202,
7984,
1190,
26494,
14098,
69,
23,
40,
1670,
273,
14804,
1190,
26494,
2828,
18,
2640,
12,
11272,
202,
202,
71,
91,
69,
... |
final QSequenceLineReader reader = new QSequenceLineReader(customEolBytes); | final QSequenceLineReader reader = new QSequenceLineReader(); | public static QSequenceLineFileSystemCache create(QSequenceLineRAData data, QSequenceLineTempDirectoryFactory tempDirectoryFactory, byte[] customEolBytes, int maximumBytesInMemory, int maximumSegmentSize) throws IOException { final QSequenceLineFileSystemCache cache = new QSequenceLineFileSystemCache(data, tempDirectoryFactory, maximumBytesInMemory, maximumSegmentSize); final QSequenceLineReader reader = new QSequenceLineReader(customEolBytes); final InputStream stream = data.read(0, data.length()); reader.read(stream, cache); stream.close(); return cache; } | 2776 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2776/52ee11a378cc7996d46ce83f779e5909931e6bf3/QSequenceLineFileSystemCache.java/buggy/contrib/sequence/src/de/regnis/q/sequence/line/QSequenceLineFileSystemCache.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
2238,
4021,
1670,
11785,
1649,
752,
12,
53,
4021,
1670,
2849,
751,
501,
16,
2238,
4021,
1670,
7185,
2853,
1733,
1906,
2853,
1733,
16,
1160,
8526,
1679,
41,
355,
2160,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
2238,
4021,
1670,
11785,
1649,
752,
12,
53,
4021,
1670,
2849,
751,
501,
16,
2238,
4021,
1670,
7185,
2853,
1733,
1906,
2853,
1733,
16,
1160,
8526,
1679,
41,
355,
2160,
16,
... |
URL requestUrl = new URL("http: + AxisGeronimoUtils.AXIS_SERVICE_PORT + "/axis/services/AdminService"); | URL requestUrl = AxisGeronimoUtils.getURL("/axis/services/AdminService"); | public void testDeployWithAdminClientDinamically() throws Exception { File jarFile = new File(outDir + "echo-jar/echo-ewsimpl.jar"); URLClassLoader cl = new URLClassLoader(new URL[]{jarFile.toURL()}); InputStream deplydd = cl.getResourceAsStream("deploy.wsdd"); assertNotNull(deplydd); ClassLoader parentClassLoder = ClassUtils.getDefaultClassLoader(); ClassUtils.setDefaultClassLoader(cl); AdminClient adminClient = new AdminClient(); URL requestUrl = new URL("http://localhost:" + AxisGeronimoUtils.AXIS_SERVICE_PORT + "/axis/services/AdminService"); Call call = adminClient.getCall(); call.setTargetEndpointAddress(requestUrl); String result = adminClient.process(null, deplydd); URL wsdlrequestUrl = new URL("http://localhost:" + AxisGeronimoUtils.AXIS_SERVICE_PORT + "/axis/services/echoPort?wsdl"); //+"/axis/services/AdminService?wsdl"); HttpURLConnection connection = (HttpURLConnection) wsdlrequestUrl.openConnection(); BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); connection.getResponseCode(); String line = reader.readLine(); while (line != null) { System.out.println(line); line = reader.readLine(); } } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/9b91aa25841b4b5cecf474851e08f831a69104ee/AdminClientDeploymentTest.java/buggy/modules/axis/src/test/org/apache/geronimo/axis/preconditions/AdminClientDeploymentTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
10015,
1190,
4446,
1227,
40,
267,
301,
6478,
1435,
1216,
1185,
288,
3639,
1387,
22588,
273,
394,
1387,
12,
659,
1621,
397,
315,
12946,
17,
11930,
19,
12946,
17,
359,
9812... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
10015,
1190,
4446,
1227,
40,
267,
301,
6478,
1435,
1216,
1185,
288,
3639,
1387,
22588,
273,
394,
1387,
12,
659,
1621,
397,
315,
12946,
17,
11930,
19,
12946,
17,
359,
9812... |
return "ConnectionEndpoint[" + Util.guidToString(connectionID) + "]"; | return "ConnectionEndpoint[" + connectionID + "]"; | public String toString() { return "ConnectionEndpoint[" + Util.guidToString(connectionID) + "]"; } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/bb5207822a56158d5b94faff7c6dbe5f094f6f4c/ServerConnectionEndpoint.java/clean/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
514,
1762,
1435,
282,
288,
1377,
327,
315,
1952,
3293,
9614,
397,
1459,
734,
397,
9870,
31,
282,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
514,
1762,
1435,
282,
288,
1377,
327,
315,
1952,
3293,
9614,
397,
1459,
734,
397,
9870,
31,
282,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
this.imageCache = new MainCellImageCache(); | public MainCellDocument(final Document d) { super(d.getCreatedBy(), d.getCreatedOn(), d.getDescription(), d.getFlags(), d.getUniqueId(), d.getName(), d.getUpdatedBy(), d.getUpdatedOn()); this.imageCache = new MainCellImageCache(); setId(d.getId()); setRemoteInfo(d.getRemoteInfo()); setState(d.getState()); this.keyRequests = new LinkedList<KeyRequest>(); } | 53635 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53635/5d854d833c62bf4f7675c6d158da3953f43a07b0/MainCellDocument.java/clean/local/browser/src/main/java/com/thinkparity/browser/application/browser/display/avatar/main/MainCellDocument.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12740,
4020,
2519,
12,
6385,
4319,
302,
13,
288,
3639,
2240,
12,
72,
18,
588,
6119,
858,
9334,
302,
18,
588,
6119,
1398,
9334,
302,
18,
588,
3291,
9334,
7734,
302,
18,
588,
5094,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12740,
4020,
2519,
12,
6385,
4319,
302,
13,
288,
3639,
2240,
12,
72,
18,
588,
6119,
858,
9334,
302,
18,
588,
6119,
1398,
9334,
302,
18,
588,
3291,
9334,
7734,
302,
18,
588,
5094,
... | |
public void requestActivation(IWorkbenchPart part) { | public void requestActivation(IWorkbenchPart part) { | public void requestActivation(IWorkbenchPart part) { // Sanity check. if (!certifyPart(part)) return; // Real work. setActivePart(part); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e63fb57c60e1285097cb8d21d56f8acdff80e7de/WorkbenchPage.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
590,
14857,
12,
45,
2421,
22144,
1988,
1087,
13,
288,
3639,
368,
23123,
866,
18,
3639,
309,
16051,
7593,
1164,
1988,
12,
2680,
3719,
5411,
327,
31,
3639,
368,
15987,
1440,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
590,
14857,
12,
45,
2421,
22144,
1988,
1087,
13,
288,
3639,
368,
23123,
866,
18,
3639,
309,
16051,
7593,
1164,
1988,
12,
2680,
3719,
5411,
327,
31,
3639,
368,
15987,
1440,
18,
... |
return (BugReport)bug; | return (BugReport) bug; | public BugReport getCurrentBug(int id) throws MalformedURLException, LoginException, IOException { // Look among the offline reports for a bug with the given id. OfflineReportsFile reportsFile = BugzillaPlugin.getDefault().getOfflineReports(); int offlineId = reportsFile.find(id); // If an offline bug was found, return it if possible. if (offlineId != -1) { IBugzillaBug bug = reportsFile.elements().get(offlineId); if (bug instanceof BugReport) { return (BugReport)bug; } } // If a suitable offline report was not found, try to get one from the server. return getBug(id); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/7dcfd671c09bb0bddf39851fb6f84201fc98cdfe/BugzillaRepository.java/buggy/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/BugzillaRepository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
16907,
4820,
5175,
19865,
12,
474,
612,
13,
1216,
20710,
16,
11744,
503,
16,
1860,
288,
202,
202,
759,
10176,
17200,
326,
13493,
10557,
364,
279,
7934,
598,
326,
864,
612,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
16907,
4820,
5175,
19865,
12,
474,
612,
13,
1216,
20710,
16,
11744,
503,
16,
1860,
288,
202,
202,
759,
10176,
17200,
326,
13493,
10557,
364,
279,
7934,
598,
326,
864,
612,
18,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.