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 |
|---|---|---|---|---|---|---|
public void setTransaction(Transaction transaction, boolean force){ //If the new transaction is not the same as the old one, then we // want to reset the form. Since this can include nulls, we need // to consider a few cases. // 1) Both are null - do nothing // 2) Both are not null - check the equals() method: // a) Both are equal - do nothing // b) Both are not equal - update // 3) One is null, the other is not - update. if (!force && this.transaction == null && transaction == null) return; if (!force && this.transaction != null && this.transaction.equals(transaction)) return; if (transaction != null){// SimpleDateFormat sdf = new SimpleDateFormat(TransactionCell.dateFormat);// date.setValue(transaction.getDate()); date.setDate(transaction.getDate()); number.setText(transaction.getNumber()); description.setText(transaction.getDescription()); //balance.setText(""); memo.setText(transaction.getMemo()); amount.setValue((double) transaction.getAmount() / 100.0); transferFrom.setSelectedItem(transaction.getFrom()); transferTo.setSelectedItem(transaction.getTo()); } else{ if (date.getDate() == null) date.setDate(new Date()); number.setText(""); description.setText(""); amount.setValue(0);// balance.setText(""); transferTo.setSelectedIndex(0); transferFrom.setSelectedIndex(0); memo.setText(""); date.requestFocus(); setChanged(false); } this.transaction = transaction; } | 58048 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58048/d6b535a4ce819f9912eaf8cc71186452b47d9179/EditableTransaction.java/clean/src/org/homeunix/drummer/view/components/EditableTransaction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6459,
542,
3342,
12,
3342,
7958,
16,
6494,
5734,
15329,
202,
202,
759,
2047,
15991,
359,
7958,
291,
902,
7915,
339,
689,
580,
1673,
476,
16,
15991,
1814,
202,
202,
759,
91,
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,
225,
202,
482,
6459,
542,
3342,
12,
3342,
7958,
16,
6494,
5734,
15329,
202,
202,
759,
2047,
15991,
359,
7958,
291,
902,
7915,
339,
689,
580,
1673,
476,
16,
15991,
1814,
202,
202,
759,
91,
30... | ||
_t = __t282; | _t = __t285; | public final Expression pathExpr(AST _t, PathExpr path ) throws RecognitionException, PermissionDeniedException,EXistException,XPathException { Expression step; AST pathExpr_AST_in = (AST)_t; AST c = null; AST i = null; AST dec = null; AST dbl = null; AST v = null; AST qn = null; AST nc1 = null; AST nc = null; AST attr = null; AST nc2 = null; AST nc3 = null; Expression rightStep= null; step= null; int axis= Constants.CHILD_AXIS; if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case STRING_LITERAL: { c = (AST)_t; match(_t,STRING_LITERAL); _t = _t.getNextSibling(); step= new LiteralValue(context, new StringValue(c.getText())); path.add(step); break; } case INTEGER_LITERAL: { i = (AST)_t; match(_t,INTEGER_LITERAL); _t = _t.getNextSibling(); step= new LiteralValue(context, new IntegerValue(Integer.parseInt(i.getText()))); path.add(step); break; } case DOUBLE_LITERAL: case DECIMAL_LITERAL: { { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case DECIMAL_LITERAL: { dec = (AST)_t; match(_t,DECIMAL_LITERAL); _t = _t.getNextSibling(); step= new LiteralValue(context, new DoubleValue(Double.parseDouble(dec.getText()))); break; } case DOUBLE_LITERAL: { dbl = (AST)_t; match(_t,DOUBLE_LITERAL); _t = _t.getNextSibling(); step= new LiteralValue(context, new DoubleValue(Double.parseDouble(dbl.getText()))); break; } default: { throw new NoViableAltException(_t); } } } path.add(step); break; } case VARIABLE_REF: { v = (AST)_t; match(_t,VARIABLE_REF); _t = _t.getNextSibling(); step= new VariableReference(context, v.getText()); path.add(step); break; } case FUNCTION: { step=functionCall(_t,path); _t = _retTree; break; } case QNAME: case WILDCARD: case PREFIX_WILDCARD: case NCNAME: case LITERAL_text: case LITERAL_node: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 100: case 101: case LITERAL_parent: case LITERAL_ancestor: case 104: case 105: { { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 100: case 101: case LITERAL_parent: case LITERAL_ancestor: case 104: case 105: { axis=forwardAxis(_t); _t = _retTree; break; } case QNAME: case WILDCARD: case PREFIX_WILDCARD: case NCNAME: case LITERAL_text: case LITERAL_node: { break; } default: { throw new NoViableAltException(_t); } } } NodeTest test; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case QNAME: { qn = (AST)_t; match(_t,QNAME); _t = _t.getNextSibling(); QName qname= QName.parse(context, qn.getText()); test= new NameTest(Type.ELEMENT, qname); break; } case PREFIX_WILDCARD: { AST __t277 = _t; AST tmp39_AST_in = (AST)_t; match(_t,PREFIX_WILDCARD); _t = _t.getFirstChild(); nc1 = (AST)_t; match(_t,NCNAME); _t = _t.getNextSibling(); _t = __t277; _t = _t.getNextSibling(); QName qname= new QName(nc1.getText(), null, null); test= new NameTest(Type.ELEMENT, qname); break; } case NCNAME: { AST __t278 = _t; nc = _t==ASTNULL ? null :(AST)_t; match(_t,NCNAME); _t = _t.getFirstChild(); AST tmp40_AST_in = (AST)_t; match(_t,WILDCARD); _t = _t.getNextSibling(); _t = __t278; _t = _t.getNextSibling(); String namespaceURI= context.getURIForPrefix(nc.getText()); QName qname= new QName(null, namespaceURI, null); test= new NameTest(Type.ELEMENT, qname); break; } case WILDCARD: { AST tmp41_AST_in = (AST)_t; match(_t,WILDCARD); _t = _t.getNextSibling(); test= new TypeTest(Type.ELEMENT); break; } case LITERAL_node: { AST tmp42_AST_in = (AST)_t; match(_t,LITERAL_node); _t = _t.getNextSibling(); test= new AnyNodeTest(); break; } case LITERAL_text: { AST tmp43_AST_in = (AST)_t; match(_t,LITERAL_text); _t = _t.getNextSibling(); test= new TypeTest(Type.TEXT); break; } default: { throw new NoViableAltException(_t); } } } step= new LocationStep(context, axis, test); path.add(step); { _loop280: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==PREDICATE)) { predicate(_t,(LocationStep) step); _t = _retTree; } else { break _loop280; } } while (true); } break; } case AT: { AST tmp44_AST_in = (AST)_t; match(_t,AT); _t = _t.getNextSibling(); QName qname; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case QNAME: { attr = (AST)_t; match(_t,QNAME); _t = _t.getNextSibling(); qname= QName.parseAttribute(context, attr.getText()); break; } case PREFIX_WILDCARD: { AST __t282 = _t; AST tmp45_AST_in = (AST)_t; match(_t,PREFIX_WILDCARD); _t = _t.getFirstChild(); nc2 = (AST)_t; match(_t,NCNAME); _t = _t.getNextSibling(); _t = __t282; _t = _t.getNextSibling(); qname= new QName(nc2.getText(), null, null); break; } case NCNAME: { AST __t283 = _t; nc3 = _t==ASTNULL ? null :(AST)_t; match(_t,NCNAME); _t = _t.getFirstChild(); AST tmp46_AST_in = (AST)_t; match(_t,WILDCARD); _t = _t.getNextSibling(); _t = __t283; _t = _t.getNextSibling(); String namespaceURI= context.getURIForPrefix(nc3.getText()); if (namespaceURI == null) throw new EXistException("No namespace defined for prefix " + nc.getText()); qname= new QName(null, namespaceURI, null); break; } default: { throw new NoViableAltException(_t); } } } step= new LocationStep(context, Constants.ATTRIBUTE_AXIS, new NameTest(Type.ATTRIBUTE, qname)); path.add(step); { _loop285: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==PREDICATE)) { predicate(_t,(LocationStep) step); _t = _retTree; } else { break _loop285; } } while (true); } break; } case SELF: { AST tmp47_AST_in = (AST)_t; match(_t,SELF); _t = _t.getNextSibling(); step= new LocationStep(context, Constants.SELF_AXIS, new TypeTest(Type.NODE)); path.add(step); { _loop287: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==PREDICATE)) { predicate(_t,(LocationStep) step); _t = _retTree; } else { break _loop287; } } while (true); } break; } case PARENT: { AST tmp48_AST_in = (AST)_t; match(_t,PARENT); _t = _t.getNextSibling(); step= new LocationStep(context, Constants.PARENT_AXIS, new TypeTest(Type.NODE)); path.add(step); { _loop289: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==PREDICATE)) { predicate(_t,(LocationStep) step); _t = _retTree; } else { break _loop289; } } while (true); } break; } case SLASH: { AST __t290 = _t; AST tmp49_AST_in = (AST)_t; match(_t,SLASH); _t = _t.getFirstChild(); step=pathExpr(_t,path); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case QNAME: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case VARIABLE_REF: case NCNAME: case STRING_LITERAL: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 100: case 101: case LITERAL_parent: case LITERAL_ancestor: case 104: case 105: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: { rightStep=pathExpr(_t,path); _t = _retTree; if (rightStep instanceof LocationStep && ((LocationStep) rightStep).getAxis() == -1) ((LocationStep) rightStep).setAxis(Constants.CHILD_AXIS); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t290; _t = _t.getNextSibling(); if (step instanceof LocationStep && ((LocationStep) step).getAxis() == -1) ((LocationStep) step).setAxis(Constants.CHILD_AXIS); break; } case DSLASH: { AST __t292 = _t; AST tmp50_AST_in = (AST)_t; match(_t,DSLASH); _t = _t.getFirstChild(); step=pathExpr(_t,path); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case QNAME: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case VARIABLE_REF: case NCNAME: case STRING_LITERAL: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 100: case 101: case LITERAL_parent: case LITERAL_ancestor: case 104: case 105: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: { rightStep=pathExpr(_t,path); _t = _retTree; if (rightStep instanceof LocationStep) { LocationStep rs= (LocationStep) rightStep; if (rs.getAxis() == Constants.ATTRIBUTE_AXIS) rs.setAxis(Constants.DESCENDANT_ATTRIBUTE_AXIS); else rs.setAxis(Constants.DESCENDANT_SELF_AXIS); } break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t292; _t = _t.getNextSibling(); if (step instanceof LocationStep && ((LocationStep) rightStep).getAxis() == -1) ((LocationStep) step).setAxis(Constants.DESCENDANT_SELF_AXIS); break; } default: { throw new NoViableAltException(_t); } } _retTree = _t; return step; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/be23536931f66ed6f552941df1c272ed48eeb933/XPathTreeParser2.java/clean/src/org/exist/parser/XPathTreeParser2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
589,
4742,
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,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
589,
4742,
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,
22... |
throw new gnuForwardRequest(forw_ex.forward_reference); | { throw new gnuForwardRequest(forw_ex.forward_reference); } | public InvokeHandler getHandler(String operation, CookieHolder cookie, boolean forwarding_allowed ) throws gnuForwardRequest { if (servant != null) return servantToHandler(servant); else { // Use servant locator to locate the servant. if (poa.servant_locator != null) { try { servant = poa.servant_locator.preinvoke(Id, poa, operation, cookie); return servantToHandler(servant); } catch (ForwardRequest forw_ex) { if (forwarding_allowed) throw new gnuForwardRequest(forw_ex.forward_reference); else { servant = ForwardedServant.create(forw_ex.forward_reference); return servantToHandler(servant); } } } else // Use servant activator to locate the servant. if (poa.applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION) && poa.applies(ServantRetentionPolicyValue.RETAIN) ) { try { poa.activate_object_with_id(Id, servant, forwarding_allowed); servant = poa.id_to_servant(Id); return servantToHandler(servant); } catch (gnuForwardRequest forwarded) { throw forwarded; } catch (Exception ex) { ex.printStackTrace(); BAD_OPERATION bad = new BAD_OPERATION("Unable to activate", 0x5004, CompletionStatus.COMPLETED_NO ); bad.initCause(ex); throw bad; } } else if (poa.default_servant != null) { servant = poa.default_servant; return servantToHandler(servant); } // No servant and no servant manager - throw exception. else throw new BAD_OPERATION("Unable to activate", 0x5002, CompletionStatus.COMPLETED_NO ); } } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/d03b7ded9dacd5a74a8420d7dade451079b17d89/gnuServantObject.java/buggy/libraries/javalib/gnu/CORBA/Poa/gnuServantObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
14373,
1503,
18945,
12,
780,
1674,
16,
10201,
6064,
3878,
16,
21394,
1250,
20635,
67,
8151,
4766,
262,
21821,
1216,
314,
13053,
8514,
691,
225,
288,
565,
309,
261,
550,
7445,
480,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14373,
1503,
18945,
12,
780,
1674,
16,
10201,
6064,
3878,
16,
21394,
1250,
20635,
67,
8151,
4766,
262,
21821,
1216,
314,
13053,
8514,
691,
225,
288,
565,
309,
261,
550,
7445,
480,
4... |
if (debugLevel >= 1) generateDebugInit(cx, tree); | public String generateCode(Node tree, Vector names, Vector classFiles, ClassNameHelper nameHelper) { this.itsNameHelper = (OptClassNameHelper) nameHelper; this.namesVector = names; this.classFilesVector = classFiles; Context cx = Context.getCurrentContext(); itsSourceFile = null; if (cx.isGeneratingDebug()) itsSourceFile = (String) tree.getProp(Node.SOURCENAME_PROP); version = cx.getLanguageVersion(); optLevel = cx.getOptimizationLevel(); inFunction = tree.getType() == TokenStream.FUNCTION; if (debugLevel >= 3) { superClassName = inFunction ? debugFunctionSuperClassName : debugScriptSuperClassName; } else { superClassName = inFunction ? normalFunctionSuperClassName : normalScriptSuperClassName; } superClassSlashName = superClassName.replace('.', '/'); Node codegenBase; if (inFunction) { OptFunctionNode fnNode = (OptFunctionNode) tree; inDirectCallFunction = fnNode.isTargetOfDirectCall(); vars = (OptVariableTable) fnNode.getVariableTable(); this.name = fnNode.getClassName(); classFile = new ClassFileWriter(name, superClassName, itsSourceFile); Node args = tree.getFirstChild(); String name = fnNode.getFunctionName(); generateInit(cx, "<init>", tree, name, args); if (fnNode.isTargetOfDirectCall()) { classFile.startMethod("call", "(Lorg/mozilla/javascript/Context;" + "Lorg/mozilla/javascript/Scriptable;" + "Lorg/mozilla/javascript/Scriptable;" + "[Ljava/lang/Object;)Ljava/lang/Object;", (short)(ClassFileWriter.ACC_PUBLIC + ClassFileWriter.ACC_FINAL)); addByteCode(ByteCode.ALOAD_0); addByteCode(ByteCode.ALOAD_1); addByteCode(ByteCode.ALOAD_2); addByteCode(ByteCode.ALOAD_3); for (int i = 0; i < vars.getParameterCount(); i++) { push(i); addByteCode(ByteCode.ALOAD, 4); addByteCode(ByteCode.ARRAYLENGTH); int undefArg = acquireLabel(); int beyond = acquireLabel(); addByteCode(ByteCode.IF_ICMPGE, undefArg); addByteCode(ByteCode.ALOAD, 4); push(i); addByteCode(ByteCode.AALOAD); push(0.0); addByteCode(ByteCode.GOTO, beyond); markLabel(undefArg); pushUndefined(); push(0.0); markLabel(beyond); } addByteCode(ByteCode.ALOAD, 4); addVirtualInvoke(this.name, "callDirect", fnNode.getDirectCallParameterSignature(), "Ljava/lang/Object;"); addByteCode(ByteCode.ARETURN); classFile.stopMethod((short)5, null); // 1 for this, 1 for js this, 1 for args[] emitDirectConstructor(fnNode); startNewMethod("callDirect", fnNode.getDirectCallParameterSignature() + "Ljava/lang/Object;", 1, false, true); vars.assignParameterJRegs(); if (!fnNode.getParameterNumberContext()) { // make sure that all parameters are objects itsForcedObjectParameters = true; for (int i = 0; i < vars.getParameterCount(); i++) { OptLocalVariable lVar = (OptLocalVariable) vars.get(i); aload(lVar.getJRegister()); classFile.add(ByteCode.GETSTATIC, "java/lang/Void", "TYPE", "Ljava/lang/Class;"); int isObjectLabel = acquireLabel(); addByteCode(ByteCode.IF_ACMPNE, isObjectLabel); addByteCode(ByteCode.NEW,"java/lang/Double"); addByteCode(ByteCode.DUP); dload((short)(lVar.getJRegister() + 1)); addDoubleConstructor(); astore(lVar.getJRegister()); markLabel(isObjectLabel); } } generatePrologue(cx, tree, true, vars.getParameterCount()); } else { startNewMethod("call", "(Lorg/mozilla/javascript/Context;" + "Lorg/mozilla/javascript/Scriptable;" + "Lorg/mozilla/javascript/Scriptable;" + "[Ljava/lang/Object;)Ljava/lang/Object;", 1, false, true); generatePrologue(cx, tree, true, -1); } codegenBase = tree.getLastChild(); } else { // better be a script if (tree.getType() != TokenStream.SCRIPT) badTree(); vars = (OptVariableTable) tree.getProp(Node.VARS_PROP); boolean isPrimary = itsNameHelper.getTargetExtends() == null && itsNameHelper.getTargetImplements() == null; this.name = itsNameHelper.getJavaScriptClassName(null, isPrimary); classFile = new ClassFileWriter(name, superClassName, itsSourceFile); classFile.addInterface("org/mozilla/javascript/Script"); generateScriptCtor(cx, tree); generateMain(cx); generateInit(cx, "initScript", tree, "", null); generateExecute(cx); startNewMethod("call", "(Lorg/mozilla/javascript/Context;" + "Lorg/mozilla/javascript/Scriptable;" + "Lorg/mozilla/javascript/Scriptable;" + "[Ljava/lang/Object;)Ljava/lang/Object;", 1, false, true); generatePrologue(cx, tree, false, -1); tree.addChildToBack(new Node(TokenStream.RETURN)); codegenBase = tree; } generateCodeFromNode(codegenBase, null, -1, -1); generateEpilogue(); finishMethod(cx, debugVars); emitConstantDudeInitializers(); // this needs to be done after the primary code generation is done if (debugLevel >= 1) generateDebugInit(cx, tree); ByteArrayOutputStream out = new ByteArrayOutputStream(512); try { classFile.write(out); } catch (IOException ioe) { throw new RuntimeException("unexpected IOException"); } byte[] bytes = out.toByteArray(); namesVector.addElement(name); classFilesVector.addElement(bytes); classFile = null; return name; } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/358852ab0559d31ad406a9294705552786b43c55/Codegen.java/buggy/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2103,
1085,
12,
907,
2151,
16,
5589,
1257,
16,
5589,
667,
2697,
16,
1171,
9079,
19811,
2276,
508,
2276,
13,
377,
288,
3639,
333,
18,
1282,
461,
2276,
273,
261,
6179,
3834,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
2103,
1085,
12,
907,
2151,
16,
5589,
1257,
16,
5589,
667,
2697,
16,
1171,
9079,
19811,
2276,
508,
2276,
13,
377,
288,
3639,
333,
18,
1282,
461,
2276,
273,
261,
6179,
3834,
22... | |
public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; int end = start + length - 1; for (int i = start; i <= end; i++) { char c = syms[i].getToken(); switch (c) { case 'a': case 'A': aCount++; break; case 'c': case 'C': cCount++; break; case 'g': case 'G': gCount++; break; case 't': case 'T': tCount++; break; default: oCount++; } } // Get separator for system String nl = System.getProperty("line.separator"); sq.delete(0, sq.length()); sq.append("BASE COUNT "); sq.append(aCount + " a "); sq.append(aCount + " c "); sq.append(aCount + " g "); sq.append(aCount + " t"); sq.append(nl); sq.append("ORIGIN"); sq.append(nl); // Print sequence summary header stream.println(sq); int fullLine = length / 60; int partLine = length % 60; int lineCount = fullLine; if (partLine > 0) lineCount++; int lineLens [] = new int [lineCount]; // All lines are 60, except last (if present) Arrays.fill(lineLens, 60); lineLens[lineCount - 1] = partLine; for (int i = 0; i < lineLens.length; i++) { // Empty the primary buffer sq.delete(0, sq.length()); // Empty the secondary buffer ub.delete(0, ub.length()); // How long is this chunk? int len = lineLens[i]; // Prepare line 80 characters wide char [] emptyLine = new char [80]; Arrays.fill(emptyLine, ' '); sq.append(emptyLine); // Prepare a Symbol array same length as chunk Symbol [] sa = new Symbol [len]; // Get symbols and format into blocks of tokens System.arraycopy(syms, start + (i * 60), sa, 0, len); String blocks = (formatTokenBlock(ub, sa, 10)).toString(); sq.replace(10, blocks.length() + 10, blocks); // Calculate the running residue count and add to the line String count = Integer.toString((i * 60) + 1); sq.replace((9 - count.length()), 9, count); // Print formatted sequence line stream.println(sq); } // Print end of entry stream.println("//"); } | 50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/71f563e886a013cf8c29df26a5f2530272fb47e2/GenbankFileFormer.java/buggy/src/org/biojava/bio/seq/io/GenbankFileFormer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
14821,
12,
27316,
225,
4190,
16,
9506,
282,
8565,
5378,
24367,
16,
9506,
282,
509,
4202,
787,
16,
9506,
282,
509,
4202,
769,
13,
202,
15069,
2141,
27316,
503,
565,
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,
527,
14821,
12,
27316,
225,
4190,
16,
9506,
282,
8565,
5378,
24367,
16,
9506,
282,
509,
4202,
787,
16,
9506,
282,
509,
4202,
769,
13,
202,
15069,
2141,
27316,
503,
565,
288,
... | ||
return "select next value for outageNxtId from seqQueryTable"; | return "select next value for outageNxtId from seqQueryTable;"; | public String getNextOutageIdStatement() { return "select next value for outageNxtId from seqQueryTable"; } | 11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/7fc2867031a646336a69eb6ad11ecd8b103f983e/MockDatabase.java/buggy/src/services/org/opennms/netmgt/mock/MockDatabase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
6927,
1182,
410,
548,
3406,
1435,
288,
3639,
327,
315,
4025,
1024,
460,
364,
596,
410,
50,
15239,
548,
628,
3833,
1138,
1388,
4868,
31,
565,
289,
2,
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,
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,
514,
6927,
1182,
410,
548,
3406,
1435,
288,
3639,
327,
315,
4025,
1024,
460,
364,
596,
410,
50,
15239,
548,
628,
3833,
1138,
1388,
4868,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-... |
dlg.run(true,true,new IRunnableWithProgress() { | dlg.run(true, true, new IRunnableWithProgress() { | private void refreshFromLocal() { IPreferenceStore store = WorkbenchPlugin.getDefault().getPreferenceStore(); boolean refresh = store.getBoolean(IPreferenceConstants.REFRESH_WORKSPACE_ON_STARTUP); if(!refresh) return; //Do not refresh if it was already done by core on startup. for (int i = 0; i < commandLineArgs.length; i++) if(commandLineArgs[i].equalsIgnoreCase("-refresh")) return; IWorkbenchWindow windows[] = getWorkbenchWindows(); Shell shell = windows[windows.length - 1].getShell(); ProgressMonitorDialog dlg = new ProgressMonitorDialog(shell); final CoreException ex[] = new CoreException[1]; try { dlg.run(true,true,new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { IContainer root = ResourcesPlugin.getWorkspace().getRoot(); root.refreshLocal(IResource.DEPTH_INFINITE,monitor); } catch (CoreException e) { ex[0] = e; } } }); if(ex[0] != null) { String errorTitle = WorkbenchMessages.getString("Workspace.problemsTitle"); //$NON-NLS-1$ String msg = WorkbenchMessages.getString("Workspace.problemMessage"); //$NON-NLS-1$ ErrorDialog.openError(shell,errorTitle,msg,ex[0].getStatus()); } } catch (InterruptedException e) { //Do nothing. Operation was canceled. } catch (InvocationTargetException e) { String msg = "InvocationTargetException refreshing from local on startup"; //$NON-NLS-1$ WorkbenchPlugin.log(msg,new Status(Status.ERROR,PlatformUI.PLUGIN_ID,0,msg,e.getTargetException())); } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/25425fe3505bc6f62e9021f3f79e33d77a752241/Workbench.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
4460,
1265,
2042,
1435,
288,
202,
202,
45,
9624,
2257,
1707,
273,
4147,
22144,
3773,
18,
588,
1868,
7675,
588,
9624,
2257,
5621,
202,
202,
6494,
4460,
273,
1707,
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,
225,
202,
1152,
918,
4460,
1265,
2042,
1435,
288,
202,
202,
45,
9624,
2257,
1707,
273,
4147,
22144,
3773,
18,
588,
1868,
7675,
588,
9624,
2257,
5621,
202,
202,
6494,
4460,
273,
1707,
18,
588,
... |
return ordinalToDescriptionMap[ordinal - min]; | final Value value = ordinalToValueMap[ordinal - min]; if (value == null) { return null; } else { return value.getDescription(); } | public final String getDescription(int ordinal) { Util.assertPrecondition(isImmutable()); return ordinalToDescriptionMap[ordinal - min]; } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/3d57e0d95581f154be9f8c4d0e69c51f642272b8/EnumeratedValues.java/clean/src/main/mondrian/olap/EnumeratedValues.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
514,
11056,
12,
474,
12675,
13,
202,
95,
202,
202,
1304,
18,
11231,
1386,
4175,
12,
291,
16014,
10663,
202,
202,
2463,
12675,
774,
3291,
863,
63,
517,
1490,
300,
1131,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
514,
11056,
12,
474,
12675,
13,
202,
95,
202,
202,
1304,
18,
11231,
1386,
4175,
12,
291,
16014,
10663,
202,
202,
2463,
12675,
774,
3291,
863,
63,
517,
1490,
300,
1131,
15... |
factories.put(id, cf); | factories.put(Integer.valueOf(id), cf); | public synchronized String registerConnectionFactory(String clientID, JNDIBindings jndiBindings) throws Exception { String id = generateConnectionFactoryID(); ServerConnectionFactoryEndpoint endpoint = new ServerConnectionFactoryEndpoint(id, serverPeer, clientID, jndiBindings); ClientConnectionFactoryDelegate delegate; try { delegate = new ClientConnectionFactoryDelegate(id, serverPeer.getLocatorURI()); } catch (Exception e) { throw new JBossJMSException("Failed to create connection factory delegate", e); } Dispatcher.singleton.registerTarget(id, endpoint); endpoints.put(id, endpoint); JBossConnectionFactory cf = new JBossConnectionFactory(delegate); if (jndiBindings != null) { List jndiNames = jndiBindings.getNames(); for(Iterator i = jndiNames.iterator(); i.hasNext(); ) { String jndiName = (String)i.next(); initialContext.rebind(jndiName, cf); } } factories.put(id, cf); return id; } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/bb5207822a56158d5b94faff7c6dbe5f094f6f4c/ConnectionFactoryJNDIMapper.java/buggy/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
3852,
514,
1744,
18749,
12,
780,
20707,
16,
4766,
13491,
804,
24513,
10497,
525,
16564,
10497,
13,
1216,
1185,
282,
288,
1377,
514,
612,
273,
2103,
18749,
734,
5621,
1377,
3224,
18749... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
565,
1071,
3852,
514,
1744,
18749,
12,
780,
20707,
16,
4766,
13491,
804,
24513,
10497,
525,
16564,
10497,
13,
1216,
1185,
282,
288,
1377,
514,
612,
273,
2103,
18749,
734,
5621,
1377,
3224,
18749... |
request.next = null; | private void doRequest(final Request request) { if(request.inAWT) { Log.log(Log.DEBUG,this,"Adding request to AWT queue: " + request.run); synchronized(lock) { if(firstAWTRequest == null && lastAWTRequest == null) firstAWTRequest = lastAWTRequest = request; else { lastAWTRequest.next = request; lastAWTRequest = request; request.next = null; // dequeue it // from request queue } awtRequestCount++; queueAWTRunner(); } } else { Log.log(Log.DEBUG,WorkThread.class,"Running in work thread: " + request.run); try { request.run.run(); } catch(Throwable t) { Log.log(Log.ERROR,WorkThread.class,"Exception " + "in work thread:"); Log.log(Log.ERROR,WorkThread.class,t); } requestCount--; } } | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/b08a73c9b6d3ed79b4e2cf0030ce6f85bc941ba3/WorkThread.java/buggy/org/gjt/sp/util/WorkThread.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
25801,
12,
6385,
1567,
590,
13,
202,
95,
202,
202,
430,
12,
2293,
18,
267,
37,
8588,
13,
202,
202,
95,
1082,
202,
1343,
18,
1330,
12,
1343,
18,
9394,
16,
2211,
10837,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25801,
12,
6385,
1567,
590,
13,
202,
95,
202,
202,
430,
12,
2293,
18,
267,
37,
8588,
13,
202,
202,
95,
1082,
202,
1343,
18,
1330,
12,
1343,
18,
9394,
16,
2211,
10837,
... | |
break _loop415; | break _loop423; | protected final void mSTRING_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = STRING_LITERAL; int _saveIndex; switch ( LA(1)) { case '"': { _saveIndex=text.length(); match('"'); text.setLength(_saveIndex); { _loop415: do { if ((LA(1)=='&') && (LA(2)=='a'||LA(2)=='g'||LA(2)=='l'||LA(2)=='q')) { mPREDEFINED_ENTITY_REF(false); } else if ((LA(1)=='&') && (LA(2)=='#')) { mCHAR_REF(false); } else if ((LA(1)=='"') && (LA(2)=='"')) { { _saveIndex=text.length(); match('"'); text.setLength(_saveIndex); match('"'); } } else if ((_tokenSet_12.member(LA(1)))) { { match(_tokenSet_12); } } else { break _loop415; } } while (true); } _saveIndex=text.length(); match('"'); text.setLength(_saveIndex); break; } case '\'': { _saveIndex=text.length(); match('\''); text.setLength(_saveIndex); { _loop419: do { if ((LA(1)=='&') && (LA(2)=='a'||LA(2)=='g'||LA(2)=='l'||LA(2)=='q')) { mPREDEFINED_ENTITY_REF(false); } else if ((LA(1)=='&') && (LA(2)=='#')) { mCHAR_REF(false); } else if ((LA(1)=='\'') && (LA(2)=='\'')) { { _saveIndex=text.length(); match('\''); text.setLength(_saveIndex); match('\''); } } else if ((_tokenSet_13.member(LA(1)))) { { match(_tokenSet_13); } } else { break _loop419; } } while (true); } _saveIndex=text.length(); match('\''); text.setLength(_saveIndex); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/b1f955b7f1cec4172ad3be7bd2855bd3cca3e6f2/XQueryLexer.java/buggy/src/org/exist/xquery/parser/XQueryLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
727,
918,
312,
5804,
67,
23225,
12,
6494,
389,
2640,
1345,
13,
1216,
9539,
16,
3703,
1228,
503,
16,
3155,
1228,
503,
288,
202,
202,
474,
389,
88,
723,
31,
3155,
389,
2316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1117,
727,
918,
312,
5804,
67,
23225,
12,
6494,
389,
2640,
1345,
13,
1216,
9539,
16,
3703,
1228,
503,
16,
3155,
1228,
503,
288,
202,
202,
474,
389,
88,
723,
31,
3155,
389,
2316,
... |
.create(getWindow()); | .create(window); | protected void makeActions(IWorkbenchWindow window) { // @issue should obtain from ConfigurationItemFactory statusLineItem = new StatusLineContributionItem("ModeContributionItem"); //$NON-NLS-1$ newWizardAction = ActionFactory.NEW.create(getWindow()); register(newWizardAction); newWizardDropDownAction = IDEActionFactory.NEW_WIZARD_DROP_DOWN .create(getWindow()); register(newWizardDropDownAction); importResourcesAction = ActionFactory.IMPORT.create(getWindow()); register(importResourcesAction); exportResourcesAction = ActionFactory.EXPORT.create(getWindow()); register(exportResourcesAction); buildAllAction = IDEActionFactory.BUILD.create(getWindow()); register(buildAllAction); cleanAction = IDEActionFactory.BUILD_CLEAN.create(getWindow()); register(cleanAction); toggleAutoBuildAction = IDEActionFactory.BUILD_AUTOMATICALLY .create(getWindow()); register(toggleAutoBuildAction); saveAction = ActionFactory.SAVE.create(getWindow()); register(saveAction); saveAsAction = ActionFactory.SAVE_AS.create(getWindow()); register(saveAsAction); saveAllAction = ActionFactory.SAVE_ALL.create(getWindow()); register(saveAllAction); undoAction = ActionFactory.UNDO.create(getWindow()); register(undoAction); redoAction = ActionFactory.REDO.create(getWindow()); register(redoAction); cutAction = ActionFactory.CUT.create(getWindow()); register(cutAction); copyAction = ActionFactory.COPY.create(getWindow()); register(copyAction); pasteAction = ActionFactory.PASTE.create(getWindow()); register(pasteAction); printAction = ActionFactory.PRINT.create(getWindow()); register(printAction); selectAllAction = ActionFactory.SELECT_ALL.create(getWindow()); register(selectAllAction); findAction = ActionFactory.FIND.create(getWindow()); register(findAction); closeAction = ActionFactory.CLOSE.create(getWindow()); register(closeAction); closeAllAction = ActionFactory.CLOSE_ALL.create(getWindow()); register(closeAllAction); closeAllSavedAction = ActionFactory.CLOSE_ALL_SAVED.create(getWindow()); register(closeAllSavedAction); helpContentsAction = ActionFactory.HELP_CONTENTS.create(getWindow()); register(helpContentsAction); aboutAction = ActionFactory.ABOUT.create(getWindow()); aboutAction .setImageDescriptor(IDEInternalWorkbenchImages .getImageDescriptor(IDEInternalWorkbenchImages.IMG_OBJS_DEFAULT_PROD)); register(aboutAction); openPreferencesAction = ActionFactory.PREFERENCES.create(getWindow()); register(openPreferencesAction); addBookmarkAction = IDEActionFactory.BOOKMARK.create(getWindow()); register(addBookmarkAction); addTaskAction = IDEActionFactory.ADD_TASK.create(getWindow()); register(addTaskAction); deleteAction = ActionFactory.DELETE.create(getWindow()); register(deleteAction); AboutInfo[] infos = IDEWorkbenchPlugin.getDefault().getFeatureInfos(); // See if a welcome page is specified for (int i = 0; i < infos.length; i++) { if (infos[i].getWelcomePageURL() != null) { quickStartAction = IDEActionFactory.QUICK_START .create(getWindow()); register(quickStartAction); break; } } // See if a tips and tricks page is specified for (int i = 0; i < infos.length; i++) { if (infos[i].getTipsAndTricksHref() != null) { tipsAndTricksAction = IDEActionFactory.TIPS_AND_TRICKS .create(getWindow()); register(tipsAndTricksAction); break; } } // Actions for invisible accelerators showViewMenuAction = ActionFactory.SHOW_VIEW_MENU.create(getWindow()); register(showViewMenuAction); showPartPaneMenuAction = ActionFactory.SHOW_PART_PANE_MENU .create(getWindow()); register(showPartPaneMenuAction); nextEditorAction = ActionFactory.NEXT_EDITOR.create(getWindow()); register(nextEditorAction); prevEditorAction = ActionFactory.PREVIOUS_EDITOR.create(getWindow()); register(prevEditorAction); ActionFactory.linkCycleActionPair(nextEditorAction, prevEditorAction); nextPartAction = ActionFactory.NEXT_PART.create(getWindow()); register(nextPartAction); prevPartAction = ActionFactory.PREVIOUS_PART.create(getWindow()); register(prevPartAction); ActionFactory.linkCycleActionPair(nextPartAction, prevPartAction); nextPerspectiveAction = ActionFactory.NEXT_PERSPECTIVE .create(getWindow()); register(nextPerspectiveAction); prevPerspectiveAction = ActionFactory.PREVIOUS_PERSPECTIVE .create(getWindow()); register(prevPerspectiveAction); ActionFactory.linkCycleActionPair(nextPerspectiveAction, prevPerspectiveAction); activateEditorAction = ActionFactory.ACTIVATE_EDITOR .create(getWindow()); register(activateEditorAction); maximizePartAction = ActionFactory.MAXIMIZE.create(getWindow()); register(maximizePartAction); minimizePartAction = ActionFactory.MINIMIZE.create(getWindow()); register(minimizePartAction); workbenchEditorsAction = ActionFactory.SHOW_OPEN_EDITORS .create(getWindow()); register(workbenchEditorsAction); workbookEditorsAction = ActionFactory.SHOW_WORKBOOK_EDITORS .create(getWindow()); register(workbookEditorsAction); hideShowEditorAction = ActionFactory.SHOW_EDITOR.create(getWindow()); register(hideShowEditorAction); savePerspectiveAction = ActionFactory.SAVE_PERSPECTIVE .create(getWindow()); register(savePerspectiveAction); editActionSetAction = ActionFactory.EDIT_ACTION_SETS .create(getWindow()); register(editActionSetAction); lockToolBarAction = ActionFactory.LOCK_TOOL_BAR.create(getWindow()); register(lockToolBarAction); resetPerspectiveAction = ActionFactory.RESET_PERSPECTIVE .create(getWindow()); register(resetPerspectiveAction); closePerspAction = ActionFactory.CLOSE_PERSPECTIVE.create(getWindow()); register(closePerspAction); closeAllPerspsAction = ActionFactory.CLOSE_ALL_PERSPECTIVES .create(getWindow()); register(closeAllPerspsAction); forwardHistoryAction = ActionFactory.FORWARD_HISTORY .create(getWindow()); register(forwardHistoryAction); backwardHistoryAction = ActionFactory.BACKWARD_HISTORY .create(getWindow()); register(backwardHistoryAction); revertAction = ActionFactory.REVERT.create(getWindow()); register(revertAction); refreshAction = ActionFactory.REFRESH.create(getWindow()); register(refreshAction); propertiesAction = ActionFactory.PROPERTIES.create(getWindow()); register(propertiesAction); quitAction = ActionFactory.QUIT.create(getWindow()); register(quitAction); moveAction = ActionFactory.MOVE.create(getWindow()); register(moveAction); renameAction = ActionFactory.RENAME.create(getWindow()); register(renameAction); goIntoAction = ActionFactory.GO_INTO.create(getWindow()); register(goIntoAction); backAction = ActionFactory.BACK.create(getWindow()); register(backAction); forwardAction = ActionFactory.FORWARD.create(getWindow()); register(forwardAction); upAction = ActionFactory.UP.create(getWindow()); register(upAction); nextAction = ActionFactory.NEXT.create(getWindow()); nextAction .setImageDescriptor(IDEInternalWorkbenchImages .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_NEXT_NAV)); register(nextAction); previousAction = ActionFactory.PREVIOUS.create(getWindow()); previousAction .setImageDescriptor(IDEInternalWorkbenchImages .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_PREVIOUS_NAV)); register(previousAction); buildProjectAction = IDEActionFactory.BUILD_PROJECT.create(getWindow()); register(buildProjectAction); openProjectAction = IDEActionFactory.OPEN_PROJECT.create(getWindow()); register(openProjectAction); closeProjectAction = IDEActionFactory.CLOSE_PROJECT.create(getWindow()); register(closeProjectAction); openWorkspaceAction = IDEActionFactory.OPEN_WORKSPACE .create(getWindow()); register(openWorkspaceAction); projectPropertyDialogAction = IDEActionFactory.OPEN_PROJECT_PROPERTIES .create(getWindow()); register(projectPropertyDialogAction); if (getWindow().getWorkbench().getIntroManager().hasIntro()) { introAction = ActionFactory.INTRO.create(window); register(introAction); } String showInQuickMenuId = "org.eclipse.ui.navigate.showInQuickMenu"; //$NON-NLS-1$ showInQuickMenu = new QuickMenuAction(showInQuickMenuId) { protected void fillMenu(IMenuManager menu) { menu.add(ContributionItemFactory.VIEWS_SHOW_IN .create(getWindow())); } }; register(showInQuickMenu); final String newQuickMenuId = "org.eclipse.ui.file.newQuickMenu"; //$NON-NLS-1$ newQuickMenu = new QuickMenuAction(newQuickMenuId) { protected void fillMenu(IMenuManager menu) { menu.add(new NewWizardMenu(getWindow())); } }; register(newQuickMenu); pinEditorContributionItem = ContributionItemFactory.PIN_EDITOR .create(getWindow()); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/1bde0643dd187b23bf57cd332e0997f6c371aaa1/WorkbenchActionBuilder.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/WorkbenchActionBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1221,
6100,
12,
45,
2421,
22144,
3829,
2742,
13,
288,
3639,
368,
632,
13882,
1410,
7161,
628,
4659,
1180,
1733,
3639,
1267,
30038,
273,
394,
2685,
1670,
442,
4027,
1180,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1221,
6100,
12,
45,
2421,
22144,
3829,
2742,
13,
288,
3639,
368,
632,
13882,
1410,
7161,
628,
4659,
1180,
1733,
3639,
1267,
30038,
273,
394,
2685,
1670,
442,
4027,
1180,
2932,
... |
public Feature getFeature() throws IOException { Cepstrum input = predecessor.getCepstrum(); if (input != null) { if (input.hasContent()) { addCepstrumData(input.getCepstrumData()); computeFeatures(1); } else if (input.hasSignal(Signal.UTTERANCE_START)) { hasUtteranceEnd = false; outputQueue.add(new Feature(Signal.UTTERANCE_START, IDGenerator.NON_ID)); featureID.reset(); Cepstrum start = predecessor.getCepstrum(); int n = processFirstCepstrum(start); computeFeatures(n); if (hasUtteranceEnd) { outputQueue.add(getUtteranceEndFeature()); } } else if (input.hasSignal(Signal.UTTERANCE_END)) { // when the UTTERANCE_END is right at the boundary int n = replicateLastCepstrum(); computeFeatures(n); outputQueue.add(getUtteranceEndFeature()); } } if (outputQueue.size() > 0) { Feature feature = (Feature) outputQueue.remove(0); // System.out.println(feature); return feature; } else { return null; } } | 48839 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48839/313c9c761b782b54773c5ffc146c146aef00c3ac/LiveFeatureExtractor.java/buggy/sphinx4/edu/cmu/sphinx/frontend/LiveFeatureExtractor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
4595,
588,
4595,
1435,
15069,
14106,
95,
39,
881,
701,
379,
2630,
33,
1484,
14258,
280,
18,
588,
39,
881,
701,
379,
5621,
430,
12,
2630,
5,
33,
2011,
15329,
430,
12,
2630,
18,
5332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4595,
588,
4595,
1435,
15069,
14106,
95,
39,
881,
701,
379,
2630,
33,
1484,
14258,
280,
18,
588,
39,
881,
701,
379,
5621,
430,
12,
2630,
5,
33,
2011,
15329,
430,
12,
2630,
18,
5332,
... | ||
classNumber2NameMap.put(new Integer(i), "Class " + i); | names[i] = "" + i; classNumber2NameMap.put(new Integer(i), "" + i); | void read() throws IOException, org.genepattern.io.ParseException { processHeader();// <num_data> <num_classes> 1 String classifierLine = reader.readLine(); String[] names = null; String dataLine = null; String[] assignments = null; Map classNumber2NameMap = new HashMap(); if (hasClassNames(classifierLine)) { names = readClassNamesLine(classifierLine); for (int i = 0, length = names.length; i < length; i++) { classNumber2NameMap.put(new Integer(i), names[i]); } dataLine = reader.readLine(); assignments = processData(dataLine, classNumber2NameMap); } else {// assume classifier line was skipped (second line) so try it as // data for (int i = 0; i < numClasses; i++) { classNumber2NameMap.put(new Integer(i), "Class " + i); } dataLine = classifierLine; assignments = processData(dataLine, classNumber2NameMap); } if (handler != null) { handler.assignments(assignments); } } | 57344 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57344/33c6c1762d2c7957b4a342900c1841054ea96dbe/ClsParser.java/buggy/src/org/genepattern/io/expr/cls/ClsParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
855,
1435,
1216,
1860,
16,
2358,
18,
4507,
881,
1344,
18,
1594,
18,
13047,
288,
202,
202,
2567,
1864,
5621,
759,
411,
2107,
67,
892,
34,
411,
2107,
67,
4701,
34,
404,
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,
6459,
855,
1435,
1216,
1860,
16,
2358,
18,
4507,
881,
1344,
18,
1594,
18,
13047,
288,
202,
202,
2567,
1864,
5621,
759,
411,
2107,
67,
892,
34,
411,
2107,
67,
4701,
34,
404,
202,
... |
SOAPEnvelope reqEnv = omfactory.createSOAPEnvelope(); reqEnv.declareNamespace("http: | SOAPEnvelope reqEnv = omfactory.getDefaultEnvelope(); | public SOAPEnvelope getEchoSoapEnvelope() { SOAPFactory omfactory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope reqEnv = omfactory.createSOAPEnvelope(); reqEnv.declareNamespace("http://schemas.xmlsoap.org/soap/envelope/", "soapenv"); reqEnv.declareNamespace("http://www.w3.org/2001/XMLSchema", "xsd"); reqEnv.declareNamespace("http://schemas.xmlsoap.org/soap/encoding/", "SOAP-ENC"); //xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" reqEnv.declareNamespace("http://www.w3.org/2001/XMLSchema-instance", "xsi"); reqEnv.declareNamespace("http://soapinterop.org/xsd", "s"); reqEnv.declareNamespace("http://soapinterop.org/", "m"); SOAPHeader header = omfactory.createSOAPHeader(reqEnv); OMNamespace hns = reqEnv.declareNamespace("http://soapinterop.org/echoheader/", "hns"); //xmlns:m0="http://soapinterop.org/echoheader/ SOAPHeaderBlock block1 = header.addHeaderBlock("echoMeStringRequest", hns); block1.addAttribute("xsi:type", "xsd:string", null); block1.addChild(omfactory.createText("string")); // header.addChild(headerChild); header.addChild(block1); SOAPHeaderBlock block2 = header.addHeaderBlock("echoMeStructRequest", hns); block2.addAttribute("xsi:type", "s:SOAPStruct", null); OMElement h2Val1 = omfactory.createOMElement("varString", null); h2Val1.addAttribute("xsi:type", "xsd:string", null); h2Val1.addChild(omfactory.createText("string")); OMElement h2Val2 = omfactory.createOMElement("varInt", null); h2Val2.addAttribute("xsi:type", "xsd:int", null); h2Val2.addChild(omfactory.createText("150")); OMElement h2Val3 = omfactory.createOMElement("varFloat", null); h2Val3.addAttribute("xsi:type", "xsd:float", null); h2Val3.addChild(omfactory.createText("456.321")); block2.addChild(h2Val1); block2.addChild(h2Val2); block2.addChild(h2Val3); OMElement operation = omfactory.createOMElement("echoStructArray", "http://soapinterop.org/", null); SOAPBody body = omfactory.createSOAPBody(reqEnv); body.addChild(operation); operation.addAttribute("soapenv:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/", null); OMElement part = omfactory.createOMElement("inputStructArray", "", null); part.addAttribute("xsi:type", "SOAP-ENC:Array", null); part.addAttribute("SOAP-ENC:arrayType", "s:SOAPStruct[3]", null); OMElement item0 = omfactory.createOMElement("item0", null); OMElement value00 = omfactory.createOMElement("varString", "", null); value00.addAttribute("xsi:type", "xsd:string", null); value00.addChild(omfactory.createText("strss fdfing1")); OMElement value01 = omfactory.createOMElement("varInt", "", null); value01.addAttribute("xsi:type", "xsd:int", null); value01.addChild(omfactory.createText("25")); OMElement value02 = omfactory.createOMElement("varFloat", "", null); value02.addAttribute("xsi:type", "xsd:float", null); value02.addChild(omfactory.createText("25.23")); OMElement item1 = omfactory.createOMElement("item0", null); OMElement value10 = omfactory.createOMElement("varString", "", null); value10.addAttribute("xsi:type", "xsd:string", null); value10.addChild(omfactory.createText("strss fdfing1")); OMElement value11 = omfactory.createOMElement("varInt", "", null); value11.addAttribute("xsi:type", "xsd:int", null); value11.addChild(omfactory.createText("25")); OMElement value12 = omfactory.createOMElement("varFloat", "", null); value12.addAttribute("xsi:type", "xsd:float", null); value12.addChild(omfactory.createText("25.23")); OMElement item2 = omfactory.createOMElement("item0", null); OMElement value20 = omfactory.createOMElement("varString", "", null); value20.addAttribute("xsi:type", "xsd:string", null); value20.addChild(omfactory.createText("strss fdfing1")); OMElement value21 = omfactory.createOMElement("varInt", "", null); value21.addAttribute("xsi:type", "xsd:int", null); value21.addChild(omfactory.createText("25")); OMElement value22 = omfactory.createOMElement("varFloat", "", null); value22.addAttribute("xsi:type", "xsd:float", null); value22.addChild(omfactory.createText("25.23")); item0.addChild(value00); item0.addChild(value01); item0.addChild(value02); item1.addChild(value10); item1.addChild(value11); item1.addChild(value12); item2.addChild(value20); item2.addChild(value21); item2.addChild(value22); part.addChild(item0); part.addChild(item1); part.addChild(item2); operation.addChild(part); //reqEnv.getBody().addChild(method); return reqEnv; } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/95f09abc768fee06d65b12836e31273ac0e15eb3/GroupcStructArrayUtil.java/clean/modules/integration/src/test/interop/whitemesa/round2/util/GroupcStructArrayUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16434,
10862,
4774,
2599,
20601,
10862,
1435,
288,
3639,
16434,
1733,
8068,
6848,
273,
531,
5535,
3336,
1733,
18,
588,
27952,
2499,
1733,
5621,
3639,
16434,
10862,
1111,
3491,
273,
8068... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16434,
10862,
4774,
2599,
20601,
10862,
1435,
288,
3639,
16434,
1733,
8068,
6848,
273,
531,
5535,
3336,
1733,
18,
588,
27952,
2499,
1733,
5621,
3639,
16434,
10862,
1111,
3491,
273,
8068... |
if ( newKeyExpr != null && !newKeyExpr.equals( oldKeyExpr ) ) | if ( newKeyExpr != null && newKeyExpr.length( ) != 0 && !newKeyExpr.equals( oldKeyExpr ) ) | protected void okPressed( ) { try { inputGroup.setName( nameEditor.getText( ) ); String newToc = UIUtil.convertToModelString( tocEditor.getText( ), true ); if ( newToc != inputGroup.getTocExpression( ) ) { if ( newToc == null || !newToc.equals( inputGroup.getTocExpression( ) ) ) { inputGroup.setTocExpression( newToc ); } } int index = keyChooser.getSelectionIndex( ); String oldKeyExpr = inputGroup.getKeyExpr( ); String newKeyExpr = getKeyExpression( ); inputGroup.setKeyExpr( newKeyExpr ); if ( newKeyExpr != null && !newKeyExpr.equals( oldKeyExpr ) ) { SlotHandle slotHandle = null; if ( inputGroup instanceof ListGroupHandle ) { slotHandle = inputGroup.getHeader( ); } else if ( inputGroup instanceof TableGroupHandle ) { if ( inputGroup.getHeader( ).getCount( ) != 0 ) { RowHandle rowHandle = ( (RowHandle) inputGroup.getHeader( ) .get( 0 ) ); CellHandle cellHandle = (CellHandle) rowHandle.getCells( ) .get( 0 ); slotHandle = cellHandle.getContent( ); } } if ( slotHandle != null ) { Object insertObject; if ( index == -1 ) { insertObject = newKeyExpr.trim( ); } else { insertObject = columnList.get( index ); } DesignElementHandle dataItemHandle = InsertInLayoutUtil.performInsert( insertObject, slotHandle, inputGroup.getContainer( ) ); slotHandle.add( dataItemHandle ); } } index = intervalType.getSelectionIndex( ); inputGroup.setInterval( intervalChoices[index].getName( ) ); if ( index != 0 ) { inputGroup.setIntervalRange( intervalRange.getSelection( ) ); } else { inputGroup.setProperty( GroupHandle.INTERVAL_RANGE_PROP, null ); } if ( intervalBaseText.getEnabled( ) ) { inputGroup.setIntervalBase( UIUtil.convertToModelString( intervalBaseText.getText( ), false ) ); } else { inputGroup.setIntervalBase( null ); } inputGroup.setHideDetail( hideDetail.getSelection( ) ); if ( inputGroup instanceof TableGroupHandle ) { if ( includeHeader.getSelection( ) != inputGroup.hasHeader( ) ) {// the include header status changed if ( includeHeader.getSelection( ) ) {// from unchecked to checked inputGroup.getHeader( ).add( createRow( ) ); } else {// from checked to unchecked,clear the slot inputGroup.clearContents( GroupHandle.HEADER_SLOT ); } } if ( includeFooter.getSelection( ) != inputGroup.hasFooter( ) ) {// the include footer status changed if ( includeFooter.getSelection( ) ) {// from unchecked to checked inputGroup.getFooter( ).add( createRow( ) ); } else {// from checked to unchecked,clear the slot inputGroup.clearContents( GroupHandle.FOOTER_SLOT ); } } } if ( ascending.getSelection( ) ) { inputGroup.setSortDirection( DesignChoiceConstants.SORT_DIRECTION_ASC ); } else { inputGroup.setSortDirection( DesignChoiceConstants.SORT_DIRECTION_DESC ); } inputGroup.setPageBreakBefore( pagebreakBeforeChoicesAll[pagebreakBeforeCombo.getSelectionIndex( )].getName( ) ); inputGroup.setPageBreakAfter( pagebreakAfterChoicesAll[pagebreakAfterCombo.getSelectionIndex( )].getName( ) ); inputGroup.setRepeatHeader( repeatHeaderButton.getSelection( ) ); } catch ( SemanticException e ) { ExceptionHandler.handle( e ); return; } setResult( inputGroup ); super.okPressed( ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/80ccf180bdb6168009b31f74fea6b0435bb34605/GroupDialog.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/GroupDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1529,
24624,
12,
262,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
2630,
1114,
18,
542,
461,
12,
508,
6946,
18,
588,
1528,
12,
262,
11272,
1082,
202,
780,
394,
56,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1117,
918,
1529,
24624,
12,
262,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
2630,
1114,
18,
542,
461,
12,
508,
6946,
18,
588,
1528,
12,
262,
11272,
1082,
202,
780,
394,
56,... |
createSpaceInCode(mySettings.SPACE_WITHIN_ARRAY_INITIALIZER_BRACES); | if (mySettings.ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE) { int spaces = mySettings.SPACE_WITHIN_ARRAY_INITIALIZER_BRACES ? 1 : 0; myResult = Spacing .createDependentLFSpacing(spaces, spaces, myParent.getTextRange(), mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_CODE); } else { createSpaceProperty(mySettings.SPACE_WITHIN_ARRAY_INITIALIZER_BRACES, mySettings.KEEP_BLANK_LINES_IN_CODE); } | public void visitArrayInitializerExpression(PsiArrayInitializerExpression expression) { if (myRole1 == ChildRole.LBRACE) { createSpaceInCode(mySettings.SPACE_WITHIN_ARRAY_INITIALIZER_BRACES); } else if (myRole2 == ChildRole.LBRACE) { createSpaceInCode(mySettings.SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE); } else if (myRole2 == ChildRole.RBRACE) { createSpaceProperty(mySettings.SPACE_WITHIN_ARRAY_INITIALIZER_BRACES, mySettings.KEEP_BLANK_LINES_BEFORE_RBRACE); } else if (myRole1 == ChildRole.COMMA) { createSpaceInCode(mySettings.SPACE_AFTER_COMMA); } else if (myRole2 == ChildRole.COMMA) { createSpaceInCode(mySettings.SPACE_BEFORE_COMMA); } } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/a7f4605252e34b99623e11827e396b7735719acf/JavaSpacePropertyProcessor.java/clean/source/com/intellij/psi/formatter/java/JavaSpacePropertyProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3757,
1076,
14729,
2300,
12,
52,
7722,
1076,
14729,
2300,
2652,
13,
288,
565,
309,
261,
4811,
2996,
21,
422,
7451,
2996,
18,
12995,
9254,
13,
288,
1377,
309,
261,
4811,
2628,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
1076,
14729,
2300,
12,
52,
7722,
1076,
14729,
2300,
2652,
13,
288,
565,
309,
261,
4811,
2996,
21,
422,
7451,
2996,
18,
12995,
9254,
13,
288,
1377,
309,
261,
4811,
2628,
... |
new IntegerResult(atomCount), new String[] { "n"+elementName }); | new IntegerResult(atomCount), new String[] { name }); | public DescriptorValue calculate(IAtomContainer container) throws CDKException { int atomCount = 0; if (container == null) throw new CDKException("The supplied AtomContainer was NULL"); if (container.getAtomCount() == 0) throw new CDKException("There were no atoms in the supplied AtomContainer"); if (elementName.equals("*")) { for (int i = 0; i < container.getAtomCount(); i++) { atomCount += container.getAtom(i).getHydrogenCount(); } atomCount += container.getAtomCount(); } else if (elementName.equals("H")) { for (int i = 0; i < container.getAtomCount(); i++) { if (container.getAtom(i).getSymbol().equals(elementName)) { atomCount += 1; } else { atomCount += container.getAtom(i).getHydrogenCount(); } } } else { for (int i = 0; i < container.getAtomCount(); i++) { if (container.getAtom(i).getSymbol().equals(elementName)) { atomCount += 1; } } } return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(atomCount), new String[] { "n"+elementName }); } | 1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/d8e69af3ef47e2138d10320ad90363e74b54f5d7/AtomCountDescriptor.java/clean/src/org/openscience/cdk/qsar/descriptors/molecular/AtomCountDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12823,
620,
4604,
12,
45,
3641,
2170,
1478,
13,
1216,
24570,
288,
3639,
509,
3179,
1380,
273,
374,
31,
3639,
309,
261,
3782,
422,
446,
13,
604,
394,
24570,
2932,
1986,
4580,
7149,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12823,
620,
4604,
12,
45,
3641,
2170,
1478,
13,
1216,
24570,
288,
3639,
509,
3179,
1380,
273,
374,
31,
3639,
309,
261,
3782,
422,
446,
13,
604,
394,
24570,
2932,
1986,
4580,
7149,
... |
Iterator resources = getSelectedResources().iterator(); while (resources.hasNext()) { IProject currentResource = (IProject)resources.next(); if (!currentResource.isOpen()) { return true; } | protected boolean updateSelection(IStructuredSelection s) { // don't call super since we want to enable if closed project is selected. if (!selectionIsOfType(IResource.PROJECT)) return false; Iterator resources = getSelectedResources().iterator(); while (resources.hasNext()) { IProject currentResource = (IProject)resources.next(); if (!currentResource.isOpen()) { return true; } } return false;} | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/698979fab03fafd802fa0d1da93feb7d6f6fee7f/OpenResourceAction.java/buggy/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/actions/OpenResourceAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
1250,
1089,
6233,
12,
45,
30733,
6233,
272,
13,
288,
202,
759,
2727,
1404,
745,
2240,
3241,
732,
2545,
358,
4237,
309,
4375,
1984,
353,
3170,
18,
202,
202,
430,
16051,
10705,
2520,
18859... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
1089,
6233,
12,
45,
30733,
6233,
272,
13,
288,
202,
759,
2727,
1404,
745,
2240,
3241,
732,
2545,
358,
4237,
309,
4375,
1984,
353,
3170,
18,
202,
202,
430,
16051,
10705,
2520,
18859... | |
lastToken = currToken; | if( currToken != null ) lastToken = currToken; | protected Token consume() throws EndOfFile { if (currToken == null) currToken = fetchToken(); lastToken = currToken; currToken = currToken.getNext(); return lastToken; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/1c7ed5ec083e9fdb6e165b75e306449b86d74c99/Parser.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
3155,
7865,
1435,
1216,
4403,
951,
812,
288,
202,
202,
430,
261,
17016,
1345,
422,
446,
13,
1082,
202,
17016,
1345,
273,
2158,
1345,
5621,
202,
202,
2722,
1345,
273,
4306,
1345... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
3155,
7865,
1435,
1216,
4403,
951,
812,
288,
202,
202,
430,
261,
17016,
1345,
422,
446,
13,
1082,
202,
17016,
1345,
273,
2158,
1345,
5621,
202,
202,
2722,
1345,
273,
4306,
1345... |
reference.getAdaptedElement(), | public void run() { while (true) { // will block if there are no resources to be decorated DecorationReference reference = next(); DecorationBuilder cacheResult = new DecorationBuilder(); // if next() returned null, we are done and should shut down. if (reference == null) { return; } //Don't decorate if there is already a pending result if (!resultCache.containsKey(reference.getElement())) { decoratorManager .getLightweightManager() .getDecorations( reference.getElement(), reference.getAdaptedElement(), cacheResult); if (cacheResult.hasValue()) { DecorationResult result = cacheResult.createResult(); resultCache.put(reference.getElement(), result); pendingUpdate.add(reference.getElement()); }; } // notify that decoration is ready if (awaitingDecoration.isEmpty()) { decorated(); } } }; | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/41c5778a9dcb7d8f71f323e9504679098f09dc21/DecorationScheduler.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecorationScheduler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
1435,
288,
9506,
202,
17523,
261,
3767,
13,
288,
6862,
202,
759,
903,
1203,
309,
1915,
854,
1158,
2703,
358,
506,
13816,
6862,
202,
7859,
367,
2404,
2114,
273,
1024,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
1435,
288,
9506,
202,
17523,
261,
3767,
13,
288,
6862,
202,
759,
903,
1203,
309,
1915,
854,
1158,
2703,
358,
506,
13816,
6862,
202,
7859,
367,
2404,
2114,
273,
1024,... | |
galleries = getCms().readResources("/", CmsResourceFilter.requireType(resourceType)); | galleries = getCms().readResources(I_CmsConstants.C_ROOT, CmsResourceFilter.requireType(resourceType)); | protected List getGalleries(int resourceType) { List galleries = null; try { galleries = getCms().readResources("/", CmsResourceFilter.requireType(resourceType)); } catch (CmsException e) { if (OpenCms.getLog(this).isErrorEnabled()) { OpenCms.getLog(this).error(e); } } return galleries; } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/3fd74bfe5ef3b3bfbcc73045be29c283789f5de5/CmsGallery.java/buggy/src/org/opencms/workplace/commons/CmsGallery.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
987,
7162,
30912,
12,
474,
14110,
13,
288,
3639,
987,
314,
30912,
273,
446,
31,
3639,
775,
288,
5411,
314,
30912,
273,
14413,
7675,
896,
3805,
12,
45,
67,
4747,
2918,
18,
39,
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,
4750,
987,
7162,
30912,
12,
474,
14110,
13,
288,
3639,
987,
314,
30912,
273,
446,
31,
3639,
775,
288,
5411,
314,
30912,
273,
14413,
7675,
896,
3805,
12,
45,
67,
4747,
2918,
18,
39,
67,
... |
private ArrayList<FocusTrackback> getStackForRoot(final Window root) { ArrayList<FocusTrackback> stack = ourRootWindowToParentsStack.get(root); | private List<FocusTrackback> getStackForRoot(final Window root) { List<FocusTrackback> stack = ourRootWindowToParentsStack.get(root); | private ArrayList<FocusTrackback> getStackForRoot(final Window root) { ArrayList<FocusTrackback> stack = ourRootWindowToParentsStack.get(root); if (stack == null) { stack = new ArrayList<FocusTrackback>(); ourRootWindowToParentsStack.put(root, stack); } return stack; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/81fc6eec603453d2027dd6381b24767971ee6c45/FocusTrackback.java/buggy/source/com/intellij/ui/FocusTrackback.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
2407,
32,
9233,
4402,
823,
34,
18457,
1290,
2375,
12,
6385,
6076,
1365,
13,
288,
565,
2407,
32,
9233,
4402,
823,
34,
2110,
273,
3134,
2375,
3829,
774,
13733,
2624,
18,
588,
12,
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,
3238,
2407,
32,
9233,
4402,
823,
34,
18457,
1290,
2375,
12,
6385,
6076,
1365,
13,
288,
565,
2407,
32,
9233,
4402,
823,
34,
2110,
273,
3134,
2375,
3829,
774,
13733,
2624,
18,
588,
12,
30... |
QueryResult qr = queryForUserByEmail(session, user.getEmail()); | QueryResult qr = queryForUserByEmail(session, user.getEmail()); | public void updateUser(final User user) { user.validate(); getJcrTemplate().execute(new JcrCallback() { public Object doInJcr(Session session) throws RepositoryException { String path = calculateUserNodePath(user.getUsername()); if (user.isUsernameChanged()) { // validate uniqueness of new username if (session.itemExists(path)) { throw new DuplicateUsernameException(user.getUsername()); } } else if (! session.itemExists(path)) { throw new DataRetrievalFailureException("account " + user.getUsername() + " not found"); } if (user.isEmailChanged()) { // validate email uniqueness QueryResult qr = queryForUserByEmail(session, user.getEmail()); NodeIterator i = qr.getNodes(); if (i.hasNext() && ! i.nextNode().getPath().equals(path)) { throw new DuplicateEmailException(user.getEmail()); } } Node node = (Node) session.getItem(path); user.setDateModified(new Date()); JcrUserMapper.userToNode(user, node); node.save(); return null; } }); } | 47226 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47226/a1d123b11821680601717cd03a15c8229c324545/JcrUserDao.java/buggy/src/main/java/org/osaf/cosmo/dao/jcr/JcrUserDao.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
28213,
12,
6385,
2177,
729,
13,
288,
3639,
729,
18,
5662,
5621,
3639,
9285,
3353,
2283,
7675,
8837,
12,
2704,
22481,
2428,
1435,
288,
7734,
1071,
1033,
741,
382,
46,
3353,
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,
377,
1071,
918,
28213,
12,
6385,
2177,
729,
13,
288,
3639,
729,
18,
5662,
5621,
3639,
9285,
3353,
2283,
7675,
8837,
12,
2704,
22481,
2428,
1435,
288,
7734,
1071,
1033,
741,
382,
46,
3353,
12,
... |
showLoginPage(request, response, "directoryDown"); | showLoginPage(request, response, RequestUtil.ERROR_DIRECTORY_DOWN); | public final void doPost(final HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException { Properties config = getConfig(); /* Login ticket */ String loginTicketId = request.getParameter(config.getProperty("loginTicketID")); /* SSO ticket */ String ssoTicketId = request.getParameter(config.getProperty("ssoTicketID")); String username = request.getParameter("username"); String password = request.getParameter("password"); String org = request.getParameter("org"); /* Parse username */ if (username.indexOf("@") != -1) { org = username.substring(username.indexOf("@") + 1, username.length()); } /* Validate input */// if (username == null || username.equals("")) {// showLoginPage(request, response, "nocred");// return;// } else if (password == null || password.equals("")) {// showLoginPage(request, response, "nocred");// return;// } else if (org == null || org.equals("") || org.equals("null")) { showLoginPage(request, response, "noorg"); return; } else if (!RequestUtil.parseConfig(getConfig(), "org", "en").containsValue(org)) { // TODO: Requires english bundle showLoginPage(request, response, "errorg"); return; } /* Attempt login */ Map tickets; String redirectURL; try { tickets = MoriaController.attemptLogin(loginTicketId, ssoTicketId, username+"@"+org, password); redirectURL = MoriaController.getRedirectURL((String) tickets.get(MoriaController.SERVICE_TICKET)); } catch (AuthenticationException e) { showLoginPage(request, response, "auth"); return; } catch (UnknownTicketException e) { showLoginPage(request, response, "unknownTicket"); return; } catch (DirectoryUnavailableException e) { // TODO: Create error message showLoginPage(request, response, "directoryDown"); return; } catch (InoperableStateException e) { // TODO: Create error message showLoginPage(request, response, "moriaDown"); return; } catch (IllegalInputException e) { // TODO: Create error message showLoginPage(request, response, "nocred"); return; /* This should not happen. Programming error. */ } response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY); response.setHeader("Location", redirectURL); // TODO: Set SSO ticket in cookie } | 1637 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1637/c8900107462a3c7eb2ee13cca6981e6d0fa8103d/LoginServlet.java/buggy/moria2/modules/moria-web/src/java/no/feide/moria/servlet/LoginServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
741,
3349,
12,
6385,
9984,
590,
16,
727,
12446,
766,
13,
5411,
1216,
1860,
16,
16517,
288,
3639,
6183,
642,
273,
4367,
5621,
3639,
1748,
11744,
9322,
1195,
3639,
514,
3925... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
918,
741,
3349,
12,
6385,
9984,
590,
16,
727,
12446,
766,
13,
5411,
1216,
1860,
16,
16517,
288,
3639,
6183,
642,
273,
4367,
5621,
3639,
1748,
11744,
9322,
1195,
3639,
514,
3925... |
instance.importDictionary("test/testC.dicml", "C"); | instance.importDictionary("test/testC.dicml", name); | public void testDeleteDictionary() { System.out.println("deleteDictionary"); String name = "C"; SQLiteProvider instance = new SQLiteProvider("owl.db"); instance.importDictionary("test/testC.dicml", "C"); boolean expResult = true; boolean result = instance.deleteDictionary(name); assertEquals(expResult, result); // additionally test, wether really removed String[][] r1 = instance.getEntry("C"); if(r1.length != 0) fail("removed \"C\" still exists "); String[] r2; r2 = instance.getAvailableDictionaries(); if(r2.length != 0) fail("deleted dic still in list of dictionaries"); // I don't trust you instance.importDictionary("test/testC.dicml", "C"); instance.importDictionary("test/testD.dicml", "D"); instance.activateDictionary("D"); expResult = true; result = instance.deleteDictionary(name); assertEquals(expResult, result); expResult = false; result = instance.deleteDictionary("NOTEXISTING"); assertEquals(expResult, result); // additionally test, wether really removed r1 = instance.getEntry("C"); if(r1.length != 0) fail("removed \"C\" still exists "); r2 = instance.getAvailableDictionaries(); if(r2.length != 1) fail("deleted dic still in list of dictionaries"); // make sure that the rest is still there r1 = instance.getEntry("D"); if(r1.length == 0) fail("\"D\" was accidently removed"); } | 13418 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13418/bd9bbbe3990c221ab5c18c81852ca28e52ad451f/SQLiteProviderTest.java/clean/trunk/owl2-base/test/de/gidoo/owl2/base/SQLiteProviderTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
2613,
10905,
1435,
288,
565,
2332,
18,
659,
18,
8222,
2932,
3733,
10905,
8863,
3639,
514,
508,
273,
315,
39,
14432,
565,
16192,
2249,
791,
273,
394,
16192,
2249,
2932,
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,
282,
1071,
918,
1842,
2613,
10905,
1435,
288,
565,
2332,
18,
659,
18,
8222,
2932,
3733,
10905,
8863,
3639,
514,
508,
273,
315,
39,
14432,
565,
16192,
2249,
791,
273,
394,
16192,
2249,
2932,
54... |
public long getTime(); | long getTime(); | public long getTime(); | 9368 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9368/edfbbd9ac4b0509913ee0d047a6b893c082271af/HappinessChangeEvent.java/clean/csmart/src/org/cougaar/tools/csmart/ldm/event/HappinessChangeEvent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1525,
6135,
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... | [
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1525,
6135,
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,
... |
private void update() { // Builds the url for quotes download StringBuffer url = new StringBuffer("http://quote.yahoo.com/download/javasoft.beans?symbols="); for (Iterator iter = map.values().iterator(); iter.hasNext(); ) url = url.append((String)iter.next() + "+"); if (url.charAt(url.length() - 1) == '+') url.deleteCharAt(url.length() - 1); url.append("&format=sl1d1t1c1ohgvbap"); // Read the last prices String line = ""; try { HttpClient client = new HttpClient(); client.getHttpConnectionManager().getParams().setConnectionTimeout(5000); IPreferenceStore store = CorePlugin.getDefault().getPreferenceStore(); if (store.getBoolean(CorePlugin.PREFS_ENABLE_HTTP_PROXY)) { client.getHostConfiguration().setProxy(store.getString(CorePlugin.PREFS_PROXY_HOST_ADDRESS), store.getInt(CorePlugin.PREFS_PROXY_PORT_ADDRESS)); if (store.getBoolean(CorePlugin.PREFS_ENABLE_PROXY_AUTHENTICATION)) client.getState().setProxyCredentials(AuthScope.ANY, new UsernamePasswordCredentials(store.getString(CorePlugin.PREFS_PROXY_USER), store.getString(CorePlugin.PREFS_PROXY_PASSWORD))); } HttpMethod method = new GetMethod(url.toString()); method.setFollowRedirects(true); client.executeMethod(method); BufferedReader in = new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream())); while ((line = in.readLine()) != null) { String[] item = line.split(","); if (line.indexOf(";") != -1) item = line.split(";"); Double open = null, high = null, low = null, close = null; Quote quote = new Quote(); // 2 = Date // 3 = Time try { GregorianCalendar c = new GregorianCalendar(TimeZone.getTimeZone("EST"), Locale.US); usDateTimeParser.setTimeZone(c.getTimeZone()); usDateParser.setTimeZone(c.getTimeZone()); usTimeParser.setTimeZone(c.getTimeZone()); String date = stripQuotes(item[2]); if (date.indexOf("N/A") != -1) date = usDateParser.format(Calendar.getInstance().getTime()); String time = stripQuotes(item[3]); if (time.indexOf("N/A") != -1) time = usTimeParser.format(Calendar.getInstance().getTime()); c.setTime(usDateTimeParser.parse(date + " " + time)); c.setTimeZone(TimeZone.getDefault()); quote.setDate(c.getTime()); } catch (Exception e) { System.out.println(e.getMessage() + ": " + line); } // 1 = Last price or N/A if (item[1].equalsIgnoreCase("N/A") == false) quote.setLast(numberFormat.parse(item[1]).doubleValue()); // 4 = Change // 5 = Open if (item[5].equalsIgnoreCase("N/A") == false) open = new Double(numberFormat.parse(item[5]).doubleValue()); // 6 = Maximum if (item[6].equalsIgnoreCase("N/A") == false) high = new Double(numberFormat.parse(item[6]).doubleValue()); // 7 = Minimum if (item[7].equalsIgnoreCase("N/A") == false) low = new Double(numberFormat.parse(item[7]).doubleValue()); // 8 = Volume if (item[8].equalsIgnoreCase("N/A") == false) quote.setVolume(numberFormat.parse(item[8]).intValue()); // 9 = Bid Price if (item[9].equalsIgnoreCase("N/A") == false) quote.setBid(numberFormat.parse(item[9]).doubleValue()); // 10 = Ask Price if (item[10].equalsIgnoreCase("N/A") == false) quote.setAsk(numberFormat.parse(item[10]).doubleValue()); // 11 = Close Price if (item[11].equalsIgnoreCase("N/A") == false) close = new Double(numberFormat.parse(item[11]).doubleValue()); // 0 = Code String symbol = stripQuotes(item[0]); for (Iterator iter = map.keySet().iterator(); iter.hasNext(); ) { Security security = (Security)iter.next(); if (symbol.equalsIgnoreCase((String)map.get(security))) security.setQuote(quote, open, high, low, close); } } in.close(); } catch (Exception e) { System.out.println(e.getMessage() + ": " + line); e.printStackTrace(); } } | 12846 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12846/524a8be4f0b9e4d94c4e019992d947173b744e1a/Feed.java/clean/net.sourceforge.eclipsetrader.yahoo/src/net/sourceforge/eclipsetrader/yahoo/Feed.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
1435,
565,
288,
3639,
368,
3998,
87,
326,
880,
364,
10681,
4224,
3639,
6674,
880,
273,
394,
6674,
2932,
2505,
2207,
6889,
18,
93,
9795,
5161,
18,
832,
19,
7813,
19,
192... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
1435,
565,
288,
3639,
368,
3998,
87,
326,
880,
364,
10681,
4224,
3639,
6674,
880,
273,
394,
6674,
2932,
2505,
2207,
6889,
18,
93,
9795,
5161,
18,
832,
19,
7813,
19,
192... | ||
this.preferences.line_separator = System.getProperty("line.separator"); | this.preferences.line_separator = System.getProperty("line.separator"); | public TextEdit format(int kind, String source, int offset, int length, int indentationLevel, String lineSeparator) { TextEdit edit= null; ITranslationUnit tu= (ITranslationUnit)options.get(DefaultCodeFormatterConstants.FORMATTER_TRANSLATION_UNIT); if (tu == null) { IFile file= (IFile)options.get(DefaultCodeFormatterConstants.FORMATTER_CURRENT_FILE); if (file != null) { tu= (ITranslationUnit)CoreModel.getDefault().create(file); } } if (lineSeparator != null) { this.preferences.line_separator = lineSeparator; } else { this.preferences.line_separator = System.getProperty("line.separator"); } this.preferences.initial_indentation_level = indentationLevel; if (tu != null) { IIndex index; try { index = CCorePlugin.getIndexManager().getIndex(tu.getCProject()); index.acquireReadLock(); } catch (CoreException e) { throw new AbortFormatting(e); } catch (InterruptedException e) { return null; } IASTTranslationUnit ast; try { try { ast= tu.getAST(index, ITranslationUnit.AST_SKIP_ALL_HEADERS); } catch (CoreException exc) { throw new AbortFormatting(exc); } CodeFormatterVisitor codeFormatter = new CodeFormatterVisitor(this.preferences, this.options, offset, length); edit= codeFormatter.format(source, ast); } finally { index.releaseReadLock(); } } else { ICodeReaderFactory codeReaderFactory; codeReaderFactory = SavedCodeReaderFactory.getInstance(); IScannerInfo scanInfo = new ScannerInfo(); CodeReader reader; reader= new CodeReader(source.toCharArray()); ILanguage language= (ILanguage)options.get(DefaultCodeFormatterConstants.FORMATTER_LANGUAGE); if (language == null) { language= GPPLanguage.getDefault(); } IASTTranslationUnit ast; try { ast= language.getASTTranslationUnit(reader, scanInfo, codeReaderFactory, null, ParserUtil.getParserLogService()); CodeFormatterVisitor codeFormatter = new CodeFormatterVisitor(this.preferences, this.options, offset, length); edit= codeFormatter.format(source, ast); } catch (CoreException exc) { throw new AbortFormatting(exc); } } return edit; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/d6d9ed6df05fa9a4d5efa12e7ef50e6fa2caec66/CCodeFormatter.java/clean/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CCodeFormatter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3867,
4666,
740,
12,
474,
3846,
16,
514,
1084,
16,
509,
1384,
16,
509,
769,
16,
509,
12018,
2355,
16,
514,
31053,
13,
288,
202,
202,
1528,
4666,
3874,
33,
446,
31,
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,
3867,
4666,
740,
12,
474,
3846,
16,
514,
1084,
16,
509,
1384,
16,
509,
769,
16,
509,
12018,
2355,
16,
514,
31053,
13,
288,
202,
202,
1528,
4666,
3874,
33,
446,
31,
202,
202,... |
} else { | public void drop (DropTargetDropEvent event) { System.out.println ("DNDLibraryTable drop"); try { Transferable transferable = event.getTransferable (); Patch pat=(Patch)((PatchListModel)getModel ()).PatchList.get (this.rowAtPoint (event.getLocation ())); DataFlavor df=new DataFlavor (PatchEdit.getDriver(pat.deviceNum,pat.driverNum).getClass (),pat.toString ()); if (transferable.isDataFlavorSupported (df)) { //System.out.println ("IsSupported"); Patch so=(Patch)event.getTransferable ().getTransferData (df); so.ChooseDriver (); // Because the driverNum is transient in Patch //System.out.println(so.getType()+" "+so.getName()); event.acceptDrop (DnDConstants.ACTION_COPY_OR_MOVE); Point p=event.getLocation (); //System.out.println ("Zieltabelle Zeile: "+this.rowAtPoint (p)); ((PatchListModel)getModel ()).setPatchAt (so,this.rowAtPoint (p));/* String s = (String)transferable.getTransferData ( DataFlavor.stringFlavor); addElement( s ); */ event.getDropTargetContext ().dropComplete (true); event.dropComplete(true); } else { //System.out.println (transferable.toString ()+" "+df.getMimeType ()); //System.out.println ("DNDLibraryTable:rejectDrop"); event.rejectDrop (); } } catch (IOException exception) { ErrorMsg.reportError ("Error", "IO Exception",exception); // exception.printStackTrace (); // System.err.println ( "Exception" + exception.getMessage ()); event.rejectDrop (); } catch (UnsupportedFlavorException ufException ) { ErrorMsg.reportError ("Error", "Unsupported Dnd Flavor",ufException); // ufException.printStackTrace (); // System.err.println ( "Exception" + ufException.getMessage ()); event.rejectDrop (); } } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/3b16911f3034387b67fd800fe8f1e5d32ef48df6/DNDLibraryTable.java/clean/JSynthLib/core/DNDLibraryTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3640,
261,
7544,
2326,
7544,
1133,
871,
13,
565,
288,
3639,
2332,
18,
659,
18,
8222,
7566,
40,
2908,
9313,
1388,
3640,
8863,
7734,
775,
3639,
288,
5411,
12279,
429,
7412,
429,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3640,
261,
7544,
2326,
7544,
1133,
871,
13,
565,
288,
3639,
2332,
18,
659,
18,
8222,
7566,
40,
2908,
9313,
1388,
3640,
8863,
7734,
775,
3639,
288,
5411,
12279,
429,
7412,
429,
... | |
public final int getInitialHeaderValue() | public final VM_Word getInitialHeaderValue() | public final int getInitialHeaderValue() throws VM_PragmaInline { return markState; } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/e9199992b356786655ffe0ebed85eac89e929500/MarkSweepSpace.java/buggy/MMTk/src/org/mmtk/policy/MarkSweepSpace.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
8251,
67,
3944,
24044,
31229,
1435,
377,
1216,
8251,
67,
2050,
9454,
10870,
288,
565,
327,
2267,
1119,
31,
225,
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,
282,
1071,
727,
8251,
67,
3944,
24044,
31229,
1435,
377,
1216,
8251,
67,
2050,
9454,
10870,
288,
565,
327,
2267,
1119,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
public final void setImage(final java.io.File data,final java.lang.String contentType) | public final void setImage(final byte[] data,final java.lang.String contentType) | public final void setImage(final java.io.File data,final java.lang.String contentType) throws java.io.IOException { MediaItem.image.set(this,data,contentType); }/** | 50290 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50290/33089a042893b053f97a739e57e31c1d1a72185c/MediaItem.java/buggy/runtime/testmodelsrc/com/exedio/cope/testmodel/MediaItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
18893,
12,
6385,
2252,
18,
1594,
18,
812,
501,
16,
6385,
2252,
18,
4936,
18,
780,
5064,
13,
1082,
202,
15069,
9506,
202,
6290,
18,
1594,
18,
14106,
202,
95,
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
18893,
12,
6385,
2252,
18,
1594,
18,
812,
501,
16,
6385,
2252,
18,
4936,
18,
780,
5064,
13,
1082,
202,
15069,
9506,
202,
6290,
18,
1594,
18,
14106,
202,
95,
202,
2... |
public boolean canMerge( List list ) { assert list != null; int size = list.size( ); if ( size <= 1 ) { return false; } RowUIInfomation rowInfo = getRowInfo( ( (CellHandle) list.get( 0 ) ).getContainer( ) ); if ( rowInfo == null ) { //when delete row, this can be null. return false; } String first = rowInfo.getRowDisplayName( ); for ( int i = 1; i < size; i++ ) { RowUIInfomation info = getRowInfo( ( (CellHandle) list.get( i ) ).getContainer( ) ); if ( info == null ) { return false; } String str = info.getRowDisplayName( ); if ( !first.equals( str ) ) { return false; } } return true; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/f20dffa9abb940a955b0a18cf6914d4f48216b6c/TableHandleAdapter.java/buggy/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/core/model/schematic/TableHandleAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
848,
6786,
12,
987,
666,
262,
202,
95,
202,
202,
11231,
666,
480,
446,
31,
202,
202,
474,
963,
273,
666,
18,
1467,
12,
11272,
202,
202,
430,
261,
963,
1648,
404,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
848,
6786,
12,
987,
666,
262,
202,
95,
202,
202,
11231,
666,
480,
446,
31,
202,
202,
474,
963,
273,
666,
18,
1467,
12,
11272,
202,
202,
430,
261,
963,
1648,
404,
262,
... | ||
return clazz.getName().endsWith(DefaultGrailsPageFlowClass.PAGE_FLOW) && !Closure.class.isAssignableFrom(clazz); | return isPageFlowClass(clazz.getName()) && !Closure.class.isAssignableFrom(clazz); | public static boolean isPageFlowClass( Class clazz ) { return clazz.getName().endsWith(DefaultGrailsPageFlowClass.PAGE_FLOW) && !Closure.class.isAssignableFrom(clazz); } | 51763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51763/9319b2487e82433202c4b7e86c557193a7ad2ae3/GrailsClassUtils.java/buggy/src/commons/org/codehaus/groovy/grails/commons/GrailsClassUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
353,
1964,
5249,
797,
12,
1659,
4003,
262,
288,
202,
202,
2463,
4003,
18,
17994,
7675,
5839,
1190,
12,
1868,
14571,
14573,
1964,
5249,
797,
18,
11219,
67,
17430,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
353,
1964,
5249,
797,
12,
1659,
4003,
262,
288,
202,
202,
2463,
4003,
18,
17994,
7675,
5839,
1190,
12,
1868,
14571,
14573,
1964,
5249,
797,
18,
11219,
67,
17430,
13,
... |
if (G2 == null) { RecognizerUtilities.debugMessageOut( "ERROR LOADING GRAMMAR " + grammarURL); } else { if (grams!=null) grams.addElement(G2); if (recurse) loadImports(R,G2,context,recurse,relo,grams); | if (G2 != null) { if (grams != null) { grams.addElement(G2); } if (recurse) { loadImports(R, G2, context, recurse, relo, grams); } | static private void loadImports(Recognizer R, RuleGrammar G,URL context, boolean recurse,boolean relo,Vector grams) throws GrammarException, IOException { RuleGrammar G2=null; RuleName imports[] = G.listImports(); if (imports != null) { for (int i=0; i<imports.length; i++) { //RecognizerUtilities.debugMessageOut("Checking import " + // imports[i].getRuleName()); String gname = imports[i].getFullGrammarName(); RuleGrammar GI = R.getRuleGrammar(gname); if (GI == null) { URL grammarURL = gnameToURL(context,imports[i].getFullGrammarName()); // RecognizerUtilities.debugMessageOut("loading " + grammarURL); G2 = JSGFParser.newGrammarFromJSGF(grammarURL, R); if (G2 == null) { RecognizerUtilities.debugMessageOut( "ERROR LOADING GRAMMAR " + grammarURL); } else { if (grams!=null) grams.addElement(G2); if (recurse) loadImports(R,G2,context,recurse,relo,grams); } } } } } | 7874 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7874/00d4a126cfd8413dc5064b1d56549d38bb8d3d69/BaseRecognizer.java/buggy/com/sun/speech/engine/recognition/BaseRecognizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
3238,
918,
1262,
13347,
12,
28131,
534,
16,
6781,
18576,
611,
16,
1785,
819,
16,
6862,
565,
1250,
11502,
16,
6494,
283,
383,
16,
5018,
24663,
87,
13,
3639,
1216,
27809,
503,
16,
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,
760,
3238,
918,
1262,
13347,
12,
28131,
534,
16,
6781,
18576,
611,
16,
1785,
819,
16,
6862,
565,
1250,
11502,
16,
6494,
283,
383,
16,
5018,
24663,
87,
13,
3639,
1216,
27809,
503,
16,
18... |
ApplyMylarToPackageExplorerAction.getActionForPart(view).update(true); | FocusPackageExplorerAction.getActionForPart(view).update(true); | protected void setUp() throws Exception { super.setUp(); view = PackageExplorerPart.openInActivePerspective(); viewer = view.getTreeViewer(); ContextUiPlugin.getDefault().getViewerManager().setSyncRefreshMode(true); ApplyMylarToPackageExplorerAction.getActionForPart(view).update(true); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/1a43c8402e3ef667e0e2c220c7538fd78575c279/PackageExplorerRefreshTest.java/buggy/org.eclipse.mylyn.java.tests/src/org/eclipse/mylyn/java/tests/PackageExplorerRefreshTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
24292,
1435,
1216,
1185,
288,
202,
202,
9565,
18,
542,
1211,
5621,
202,
202,
1945,
273,
7508,
20938,
1988,
18,
3190,
382,
3896,
14781,
16772,
5621,
202,
202,
25256,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
24292,
1435,
1216,
1185,
288,
202,
202,
9565,
18,
542,
1211,
5621,
202,
202,
1945,
273,
7508,
20938,
1988,
18,
3190,
382,
3896,
14781,
16772,
5621,
202,
202,
25256,
273,
1... |
Object obj = enum.nextElement(); | Object obj = enumeration.nextElement(); | private void update() { // Compone l'url per la lettura degli ultimi prezzi rimappando i codici usati da Yahoo StringBuffer url = new StringBuffer(YahooPlugin.getDefault().getPreferenceStore().getString("yahoo.url") + "?s="); Iterator iterator = data.keySet().iterator(); while(iterator.hasNext() == true) url = url.append((String)iterator.next() + "+"); if (url.charAt(url.length() - 1) == '+') url.deleteCharAt(url.length() - 1); url.append("&f=sl1d1t1c1ohgvbap&e=.csv");// System.out.println(url.toString()); // Read the last prices try { String line; HttpURLConnection con = (HttpURLConnection)new URL(url.toString()).openConnection(); String proxyHost = (String)System.getProperties().get("http.proxyHost"); String proxyUser = (String)System.getProperties().get("http.proxyUser"); String proxyPassword = (String)System.getProperties().get("http.proxyPassword"); if (proxyHost != null && proxyHost.length() != 0 && proxyUser != null && proxyUser.length() != 0 && proxyPassword != null) { String login = proxyUser + ":" + proxyPassword; String encodedLogin = new BASE64Encoder().encodeBuffer(login.getBytes()); con.setRequestProperty("Proxy-Authorization", "Basic " + encodedLogin.trim()); } con.setAllowUserInteraction(true); con.setRequestMethod("GET"); con.setInstanceFollowRedirects(true); BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); while ((line = in.readLine()) != null) { String[] item; if (line.indexOf(";") != -1) item = line.split(";"); else item = line.split(","); // 0 = Code IExtendedData pd = (IExtendedData)data.get(stripQuotes(item[0])); if (pd == null) continue; try { // 1 = Last price or N/A if (item[1].equalsIgnoreCase("N/A") == false) pd.setLastPrice(Double.parseDouble(item[1].replace(',', '.'))); // 2 = Date // 3 = Time if (item[3].indexOf("am") != -1 || item[3].indexOf("pm") != -1) pd.setDate(df_us.parse(stripQuotes(item[2]) + " " + stripQuotes(item[3]))); else pd.setDate(df.parse(stripQuotes(item[2]) + " " + stripQuotes(item[3]) + ":00")); // 4 = Change // 5 = Open if (item[5].equalsIgnoreCase("N/A") == false) pd.setOpenPrice(Double.parseDouble(item[5].replace(',', '.'))); // 6 = Maximum if (item[6].equalsIgnoreCase("N/A") == false) pd.setHighPrice(Double.parseDouble(item[6].replace(',', '.'))); // 7 = Minimum if (item[7].equalsIgnoreCase("N/A") == false) pd.setLowPrice(Double.parseDouble(item[7].replace(',', '.'))); // 8 = Volume if (item[8].equalsIgnoreCase("N/A") == false) pd.setVolume(Integer.parseInt(item[8])); // 9 = Bid Price if (item[9].equalsIgnoreCase("N/A") == false) pd.setBidPrice(Double.parseDouble(item[9].replace(',', '.'))); // 10 = Ask Price if (item[10].equalsIgnoreCase("N/A") == false) pd.setAskPrice(Double.parseDouble(item[10].replace(',', '.'))); // 11 = Close Price if (item[11].equalsIgnoreCase("N/A") == false) pd.setClosePrice(Double.parseDouble(item[11].replace(',', '.'))); // Data not available from Yahoo pd.setBidSize(0); pd.setAskSize(0); } catch(Exception x) { x.printStackTrace(); }; } in.close(); } catch(IOException x) {}; Enumeration enum = listeners.elements(); while(enum.hasMoreElements() == true) { Object obj = enum.nextElement(); if (obj instanceof SnapshotDataProvider) ((SnapshotDataProvider)obj).update(); if (obj instanceof IndexDataProvider) ((IndexDataProvider)obj).update(); } | 12330 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12330/5daab57f74f76c13acbe66f631dacd08c88633d1/Streamer.java/clean/net.sourceforge.eclipsetrader.yahoo/src/net/sourceforge/eclipsetrader/yahoo/internal/Streamer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1089,
1435,
225,
288,
565,
368,
5427,
476,
328,
11,
718,
1534,
7125,
2231,
88,
21401,
5843,
549,
225,
406,
381,
77,
675,
6378,
77,
436,
381,
2910,
28630,
277,
11012,
14463,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1089,
1435,
225,
288,
565,
368,
5427,
476,
328,
11,
718,
1534,
7125,
2231,
88,
21401,
5843,
549,
225,
406,
381,
77,
675,
6378,
77,
436,
381,
2910,
28630,
277,
11012,
14463,
5... |
asm.emitADD_Reg_Imm(SP, 4); | asm.emitADD_Reg_Imm(SP, WORDSIZE*3); | private final VM_MachineCode genCode (int compiledMethodId, VM_Method method) { /* initialization */ { // TODO!! check register ranges TODO!! this.method = method; klass = method.getDeclaringClass(); bytecodes = method.getBytecodes(); bytecodeLength = bytecodes.length; bytecodeMap = new int [bytecodeLength]; if (klass.isBridgeFromNative()) // JNIFunctions need space for bigger prolog & epilog asm = new VM_Assembler(bytecodeLength+10); else asm = new VM_Assembler(bytecodeLength); profilerClass = null; // TODO!! set this correctly parameterWords = method.getParameterWords(); parameterWords += (method.isStatic() ? 0 : 1); // add 1 for this pointer // if (VM.VerifyAssertions) VM.assert(parameters == 0); // TODO!! } VM_Assembler asm = this.asm; // premature optimization if (klass.isBridgeFromNative()) { // replace the normal prologue with a special prolog VM_JNICompiler.generateGlueCodeForJNIMethod (asm, method, compiledMethodId); // set some constants for the code generation of the rest of the method // firstLocalOffset is shifted down because more registers are saved firstLocalOffset = STACKFRAME_BODY_OFFSET - (VM_JNICompiler.SAVED_GPRS_FOR_JNI<<LG_WORDSIZE) ; } else { genPrologue(compiledMethodId); } for (bi=0; bi<bytecodeLength;) { bytecodeMap[bi] = asm.getMachineCodeIndex(); asm.resolveForwardReferences(bi); biStart = bi; int code = fetch1ByteUnsigned(); // if (VM.runningVM) VM.sysWrite("\n at: " + VM_Lister.decimal(biStart) + " = " + VM_Lister.hex((byte) code) + "\n"); switch (code) { case 0x00: /* nop */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "nop"); break; } case 0x01: /* aconst_null */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "aconst_null "); asm.emitPUSH_Imm(0); break; } case 0x02: /* iconst_m1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iconst_m1 "); asm.emitPUSH_Imm(-1); break; } case 0x03: /* iconst_0 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iconst_0 "); asm.emitPUSH_Imm(0); break; } case 0x04: /* iconst_1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iconst_1 "); asm.emitPUSH_Imm(1); break; } case 0x05: /* iconst_2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iconst_2 "); asm.emitPUSH_Imm(2); break; } case 0x06: /* iconst_3 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iconst_3 "); asm.emitPUSH_Imm(3); break; } case 0x07: /* iconst_4 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iconst_4 "); asm.emitPUSH_Imm(4); break; } case 0x08: /* iconst_5 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iconst_5 "); asm.emitPUSH_Imm(5); break; } case 0x09: /* lconst_0 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lconst_0 "); // floating-point 0 is long 0 asm.emitPUSH_Imm(0); asm.emitPUSH_Imm(0); break; } case 0x0a: /* lconst_1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lconst_1 "); asm.emitPUSH_Imm(0); // high part asm.emitPUSH_Imm(1); // low part break; } case 0x0b: /* fconst_0 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fconst_0"); asm.emitPUSH_Imm(0); break; } case 0x0c: /* fconst_1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fconst_1"); asm.emitPUSH_Imm(0x3f800000); break; } case 0x0d: /* fconst_2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fconst_2"); asm.emitPUSH_Imm(0x40000000); break; } case 0x0e: /* dconst_0 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dconst_0"); asm.emitPUSH_Imm(0x00000000); asm.emitPUSH_Imm(0x00000000); break; } case 0x0f: /* dconst_1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dconst_1"); asm.emitPUSH_Imm(0x3ff00000); asm.emitPUSH_Imm(0x00000000); break; } case 0x10: /* bipush */ { int val = fetch1ByteSigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "bipush " + VM_Lister.decimal(val)); asm.emitPUSH_Imm(val); break; } case 0x11: /* sipush */ { int val = fetch2BytesSigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "sipush " + VM_Lister.decimal(val)); asm.emitPUSH_Imm(val); break; } case 0x12: /* ldc */ { int index = fetch1ByteUnsigned(); int offset = klass.getLiteralOffset(index); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ldc " + VM_Lister.decimal(index)); asm.emitPUSH_RegDisp(JTOC, offset); break; } case 0x13: /* ldc_w */ { int index = fetch2BytesUnsigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ldc_w " + VM_Lister.decimal(index)); int offset = klass.getLiteralOffset(index); asm.emitPUSH_RegDisp(JTOC, offset); break; } case 0x14: /* ldc2_w */ { int index = fetch2BytesUnsigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ldc2_w " + VM_Lister.decimal(index)); int offset = klass.getLiteralOffset(index); asm.emitPUSH_RegDisp(JTOC, offset+4); // high part of the long asm.emitPUSH_RegDisp(JTOC, offset); // low part of the long break; } case 0x15: /* iload */ { int index = fetch1ByteUnsigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iload " + VM_Lister.decimal(index)); int offset = localOffset(index); asm.emitPUSH_RegDisp(FP,offset); break; } case 0x16: /* lload */ { int index = fetch1ByteUnsigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lload " + VM_Lister.decimal(index)); int offset = localOffset(index); asm.emitPUSH_RegDisp(FP, offset); // high part offset = localOffset(index+1); asm.emitPUSH_RegDisp(FP, offset); // low part break; } case 0x17: /* fload */ { int index = fetch1ByteUnsigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fload " + VM_Lister.decimal(index)); int offset = localOffset(index); asm.emitPUSH_RegDisp (FP, offset); break; } case 0x18: /* dload */ { int index = fetch1ByteUnsigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dload " + VM_Lister.decimal(index)); int offset = localOffset(index); asm.emitPUSH_RegDisp(FP, offset); // high part offset = localOffset(index+1); asm.emitPUSH_RegDisp(FP, offset); // low part break; } case 0x19: /* aload */ { int index = fetch1ByteUnsigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "aload " + VM_Lister.decimal(index)); int offset = localOffset(index); asm.emitPUSH_RegDisp(FP, offset); break; } case 0x1a: /* iload_0 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iload_0"); int offset = localOffset(0); asm.emitPUSH_RegDisp ( FP, offset); break; } case 0x1b: /* iload_1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iload_1"); int offset = localOffset(1); asm.emitPUSH_RegDisp ( FP, offset); break; } case 0x1c: /* iload_2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iload_2"); int offset = localOffset(2); asm.emitPUSH_RegDisp (FP, offset); break; } case 0x1d: /* iload_3 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iload_3"); int offset = localOffset(3); asm.emitPUSH_RegDisp ( FP, offset); break; } case 0x1e: /* lload_0 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lload_0"); int offset = localOffset(0); asm.emitPUSH_RegDisp(FP, offset); // high part offset = localOffset(1); asm.emitPUSH_RegDisp(FP, offset); // low part break; } case 0x1f: /* lload_1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lload_1"); int offset = localOffset(1); asm.emitPUSH_RegDisp(FP, offset); // high part offset = localOffset(2); asm.emitPUSH_RegDisp(FP, offset); // low part break; } case 0x20: /* lload_2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lload_2"); int offset = localOffset(2); asm.emitPUSH_RegDisp(FP, offset); // high part offset = localOffset(3); asm.emitPUSH_RegDisp(FP, offset); // low part break; } case 0x21: /* lload_3 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lload_3"); int offset = localOffset(3); asm.emitPUSH_RegDisp(FP, offset); // high part offset = localOffset(4); asm.emitPUSH_RegDisp(FP, offset); // low part break; } case 0x22: /* fload_0 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fload_0"); int offset = localOffset(0); asm.emitPUSH_RegDisp ( FP, offset); break; } case 0x23: /* fload_1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fload_1"); int offset = localOffset(1); asm.emitPUSH_RegDisp ( FP, offset); break; } case 0x24: /* fload_2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fload_2"); int offset = localOffset(2); asm.emitPUSH_RegDisp ( FP, offset); break; } case 0x25: /* fload_3 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fload_3"); int offset = localOffset(3); asm.emitPUSH_RegDisp ( FP, offset); break; } case 0x26: /* dload_0 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dload_0"); int offset = localOffset(0); asm.emitPUSH_RegDisp(FP, offset); // high part offset = localOffset(1); asm.emitPUSH_RegDisp(FP, offset); // low part break; } case 0x27: /* dload_1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dload_1"); int offset = localOffset(1); asm.emitPUSH_RegDisp(FP, offset); // high part offset = localOffset(2); asm.emitPUSH_RegDisp(FP, offset); // low part break; } case 0x28: /* dload_2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dload_2"); int offset = localOffset(2); asm.emitPUSH_RegDisp(FP, offset); // high part offset = localOffset(3); asm.emitPUSH_RegDisp(FP, offset); // low part break; } case 0x29: /* dload_3 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dload_3"); int offset = localOffset(3); asm.emitPUSH_RegDisp(FP, offset); // high part offset = localOffset(4); asm.emitPUSH_RegDisp(FP, offset); // low part break; } case 0x2a: /* aload_0 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "aload_0"); int offset = localOffset(0); asm.emitPUSH_RegDisp(FP, offset); break; } case 0x2b: /* aload_1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "aload_1"); int offset = localOffset(1); asm.emitPUSH_RegDisp(FP, offset); break; } case 0x2c: /* aload_2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "aload_2"); int offset = localOffset(2); asm.emitPUSH_RegDisp(FP, offset); break; } case 0x2d: /* aload_3 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "aload_3"); int offset = localOffset(3); asm.emitPUSH_RegDisp(FP, offset); break; } case 0x2e: /* iaload */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iaload"); asm.emitPOP_Reg(T0); // T0 is index asm.emitPOP_Reg(S0); // S0 is array ref genBoundsCheck(asm, T0, S0); // T0 is index, S0 is address of array asm.emitPUSH_RegIdx(S0, T0, asm.WORD, 0); // push desired int array element break; } case 0x2f: /* laload */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "laload"); asm.emitPOP_Reg(T0); // T0 is index asm.emitPOP_Reg(S0); // S0 is array ref genBoundsCheck(asm, T0,S0); // T0 is index, S0 is address of array asm.emitPUSH_RegIdx(S0, T0, asm.LONG, WORDSIZE); // load high part of desired long array element asm.emitPUSH_RegIdx(S0, T0, asm.LONG, 0); // load low part of desired long array element break; } case 0x30: /* faload */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "faload"); asm.emitPOP_Reg(T0); // T0 is array index asm.emitPOP_Reg(S0); // S0 is array ref genBoundsCheck(asm, T0, S0); // T0 is index, S0 is address of array asm.emitPUSH_RegIdx(S0, T0, asm.WORD, 0); // push desired float array element break; } case 0x31: /* daload */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "daload"); asm.emitPOP_Reg(T0); // T0 is index asm.emitPOP_Reg(S0); // S0 is array ref genBoundsCheck(asm, T0,S0); // T0 is index, S0 is address of array asm.emitPUSH_RegIdx(S0, T0, asm.LONG, WORDSIZE); // load high part of double asm.emitPUSH_RegIdx(S0, T0, asm.LONG, 0); // load low part of double break; } case 0x32: /* aaload */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "aaload"); asm.emitPOP_Reg(T0); // T0 is array index asm.emitPOP_Reg(S0); // S0 is array ref genBoundsCheck(asm, T0, S0); // T0 is index, S0 is address of array asm.emitPUSH_RegIdx(S0, T0, asm.WORD, 0); // push desired int array element break; } case 0x33: /* baload */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "baload"); asm.emitPOP_Reg(T0); // T0 is array index asm.emitPOP_Reg(S0); // S0 is array ref genBoundsCheck(asm, T0, S0); // T0 is index, S0 is address of array asm.emitMOVSX_Reg_RegIdx_Byte(T1, S0, T0, asm.BYTE, 0); // load byte and sign extend to a 32 bit word asm.emitPUSH_Reg(T1); // push onto stack break; } case 0x34: /* caload */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "caload"); asm.emitPOP_Reg(T0); // T0 is array index asm.emitPOP_Reg(S0); // S0 is array ref genBoundsCheck(asm, T0, S0); // T0 is index, S0 is address of array asm.emitMOVZX_Reg_RegIdx_Word(T1, S0, T0, asm.SHORT, 0); // load halfword without sign extend to a 32 bit word asm.emitPUSH_Reg(T1); // push onto stack break; } case 0x35: /* saload */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "saload"); asm.emitPOP_Reg(T0); // T0 is array index asm.emitPOP_Reg(S0); // S0 is array ref genBoundsCheck(asm, T0,S0); // check array length vs index asm.emitMOVSX_Reg_RegIdx_Word(T1, S0, T0, asm.SHORT, 0); // load halfword sign extend to a 32 bit word asm.emitPUSH_Reg(T1); // push onto stack break; } case 0x36: /* istore */ { int index = fetch1ByteUnsigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "istore " + VM_Lister.decimal(index)); int offset = localOffset(index); asm.emitPOP_RegDisp (FP, offset); break; } case 0x37: /* lstore */ { int index = fetch1ByteUnsigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lstore " + VM_Lister.decimal(index)); int offset = localOffset(index+1); asm.emitPOP_RegDisp(FP, offset); // high part offset = localOffset(index); asm.emitPOP_RegDisp(FP, offset); // low part break; } case 0x38: /* fstore */ { int index = fetch1ByteUnsigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fstore " + VM_Lister.decimal(index)); int offset = localOffset(index); asm.emitPOP_RegDisp (FP, offset); break; } case 0x39: /* dstore */ { int index = fetch1ByteUnsigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dstore " + VM_Lister.decimal(index)); int offset = localOffset(index+1); asm.emitPOP_RegDisp(FP, offset); // high part offset = localOffset(index); asm.emitPOP_RegDisp(FP, offset); // low part break; } case 0x3a: /* astore */ { int index = fetch1ByteUnsigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "astore " + VM_Lister.decimal(index)); int offset = localOffset(index); asm.emitPOP_RegDisp (FP, offset); break; } case 0x3b: /* istore_0 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "istore_0"); int offset = localOffset(0); asm.emitPOP_RegDisp (FP, offset); break; } case 0x3c: /* istore_1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "istore_1"); int offset = localOffset(1); asm.emitPOP_RegDisp (FP, offset); break; } case 0x3d: /* istore_2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "istore_2"); int offset = localOffset(2); asm.emitPOP_RegDisp (FP, offset); break; } case 0x3e: /* istore_3 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "istore_3"); int offset = localOffset(3); asm.emitPOP_RegDisp (FP, offset); break; } case 0x3f: /* lstore_0 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lstore_0"); int offset = localOffset(1); asm.emitPOP_RegDisp(FP, offset); // high part offset = localOffset(0); asm.emitPOP_RegDisp(FP, offset); // low part break; } case 0x40: /* lstore_1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lstore_1"); int offset = localOffset(2); asm.emitPOP_RegDisp(FP, offset); // high part offset = localOffset(1); asm.emitPOP_RegDisp(FP, offset); // low part break; } case 0x41: /* lstore_2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lstore_2"); int offset = localOffset(3); asm.emitPOP_RegDisp(FP, offset); // high part offset = localOffset(2); asm.emitPOP_RegDisp(FP, offset); // low part break; } case 0x42: /* lstore_3 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lstore_3"); int offset = localOffset(4); asm.emitPOP_RegDisp(FP, offset); // high part offset = localOffset(3); asm.emitPOP_RegDisp(FP, offset); // low part break; } case 0x43: /* fstore_0 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fstore_0"); int offset = localOffset(0); asm.emitPOP_RegDisp (FP, offset); break; } case 0x44: /* fstore_1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fstore_1"); int offset = localOffset(1); asm.emitPOP_RegDisp (FP, offset); break; } case 0x45: /* fstore_2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fstore_2"); int offset = localOffset(2); asm.emitPOP_RegDisp (FP, offset); break; } case 0x46: /* fstore_3 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fstore_3"); int offset = localOffset(3); asm.emitPOP_RegDisp (FP, offset); break; } case 0x47: /* dstore_0 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dstore_0"); int offset = localOffset(1); asm.emitPOP_RegDisp(FP, offset); // high part offset = localOffset(0); asm.emitPOP_RegDisp(FP, offset); // low part break; } case 0x48: /* dstore_1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dstore_1"); int offset = localOffset(2); asm.emitPOP_RegDisp(FP, offset); // high part offset = localOffset(1); asm.emitPOP_RegDisp(FP, offset); // low part break; } case 0x49: /* dstore_2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dstore_2"); int offset = localOffset(3); asm.emitPOP_RegDisp(FP, offset); // high part offset = localOffset(2); asm.emitPOP_RegDisp(FP, offset); // low part break; } case 0x4a: /* dstore_3 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dstore_3"); int offset = localOffset(4); asm.emitPOP_RegDisp(FP, offset); // high part offset = localOffset(3); asm.emitPOP_RegDisp(FP, offset); // low part break; } case 0x4b: /* astore_0 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "astore_0"); int offset = localOffset(0); asm.emitPOP_RegDisp (FP, offset); break; } case 0x4c: /* astore_1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "astore_1"); int offset = localOffset(1); asm.emitPOP_RegDisp (FP, offset); break; } case 0x4d: /* astore_2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "astore_2"); int offset = localOffset(2); asm.emitPOP_RegDisp (FP, offset); break; } case 0x4e: /* astore_3 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "astore_3"); int offset = localOffset(3); asm.emitPOP_RegDisp (FP, offset); break; } case 0x4f: /* iastore */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iastore"); asm.emitPOP_Reg(T1); // T1 is the value asm.emitPOP_Reg(T0); // T0 is array index //asm.emitPOP_Reg(S0); // S0 is array ref asm.emitMOV_Reg_RegDisp(S0, SP, 0); // S0 is the array ref genBoundsCheck(asm, T0,S0); // T0 is index, S0 is address of array asm.emitMOV_RegIdx_Reg(S0, T0, asm.WORD, 0, T1); // [S0 + T0<<2] <- T1 asm.emitADD_Reg_Imm(SP, 4); break; } case 0x50: /* lastore */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lastore"); asm.emitMOV_Reg_RegDisp(T0, SP, 8); // T0 is the array index asm.emitMOV_Reg_RegDisp(S0, SP, 12); // S0 is the array ref genBoundsCheck(asm, T0,S0); asm.emitPOP_Reg(T1); // low part asm.emitMOV_RegIdx_Reg(S0, T0, asm.LONG, 0, T1); // [S0 + T0<<3 + 0] <- T1 store low part into array i.e. asm.emitPOP_Reg(T1); // high part asm.emitMOV_RegIdx_Reg(S0, T0, asm.LONG, WORDSIZE, T1); // [S0 + T0<<3 + 4] <- T1 store high part into array i.e. asm.emitADD_Reg_Imm(SP, WORDSIZE*2); // remove index and ref from the stack break; } case 0x51: /* fastore */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fastore"); asm.emitPOP_Reg(T1); // T1 is the value asm.emitPOP_Reg(T0); // T0 is array index asm.emitPOP_Reg(S0); // S0 is array ref genBoundsCheck(asm, T0, S0); // T0 is index, S0 is address of array asm.emitMOV_RegIdx_Reg(S0, T0, asm.WORD, 0, T1); // [S0 + T0<<2] <- T1 break; } case 0x52: /* dastore */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dastore"); asm.emitMOV_Reg_RegDisp(T0, SP, 8); // T0 is the array index asm.emitMOV_Reg_RegDisp(S0, SP, 12); // S0 is the array ref genBoundsCheck(asm, T0,S0); asm.emitPOP_Reg(T1); // low part asm.emitMOV_RegIdx_Reg(S0, T0, asm.LONG, 0, T1); // [S0 + T0<<3 + 0] <- T1 store low part into array i.e. asm.emitPOP_Reg(T1); // high part asm.emitMOV_RegIdx_Reg(S0, T0, asm.LONG, WORDSIZE, T1); // [S0 + T0<<3 + 4] <- T1 store high part into array i.e. asm.emitADD_Reg_Imm(SP, WORDSIZE*2); // remove index and ref from the stack break; } case 0x53: /* aastore */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "aastore"); asm.emitPUSH_RegDisp(SP, 2<<LG_WORDSIZE); // duplicate array ref asm.emitPUSH_RegDisp(SP, 1<<LG_WORDSIZE); // duplicate value genParameterRegisterLoad(2); // pass 2 parameter asm.emitCALL_RegDisp(JTOC, VM_Entrypoints.checkstoreOffset); // checkstore(array ref, value) asm.emitPOP_Reg(T1); // T1 is the value asm.emitPOP_Reg(T0); // T0 is array index asm.emitPOP_Reg(S0); // S0 is array ref genBoundsCheck(asm, T0, S0); // T0 is index, S0 is address of array asm.emitMOV_RegIdx_Reg(S0, T0, asm.WORD, 0, T1); // [S0 + T0<<2] <- T1 break; } case 0x54: /* bastore */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "bastore"); asm.emitPOP_Reg(T1); // T1 is the value asm.emitPOP_Reg(T0); // T0 is array index asm.emitPOP_Reg(S0); // S0 is array ref genBoundsCheck(asm, T0,S0); // T0 is index, S0 is address of array asm.emitMOV_RegIdx_Reg_Byte(S0, T0, asm.BYTE, 0, T1); // store byte element into array i.e. [S0 +T0] <- T1 (byte) break; } case 0x55: /* castore */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "castore"); asm.emitPOP_Reg(T1); // T1 is the value asm.emitPOP_Reg(T0); // T0 is array index asm.emitPOP_Reg(S0); // S0 is array ref genBoundsCheck(asm, T0,S0); // T0 is index, S0 is address of array asm.emitMOV_RegIdx_Reg_Word(S0, T0, asm.SHORT, 0, T1); // store halfword element into array i.e. [S0 +T0] <- T1 (halfword) break; } case 0x56: /* sastore */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "sastore"); asm.emitPOP_Reg(T1); // T1 is the value asm.emitPOP_Reg(T0); // T0 is array index asm.emitPOP_Reg(S0); // S0 is array ref genBoundsCheck(asm, T0,S0); // T0 is index, S0 is address of array asm.emitMOV_RegIdx_Reg_Word(S0, T0, asm.SHORT, 0, T1); // store halfword element into array i.e. [S0 +T0] <- T1 (halfword) break; } case 0x57: /* pop */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "pop"); asm.emitPOP_Reg(T0); break; } case 0x58: /* +++ pop2 +++ */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "pop2"); asm.emitPOP_Reg(T0); asm.emitPOP_Reg(T0); break; } case 0x59: /* dup */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dup"); asm.emitMOV_Reg_RegInd (T0, SP); asm.emitPUSH_Reg(T0); break; } case 0x5a: /* dup_x1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dup_x1"); asm.emitPOP_Reg(T0); asm.emitPOP_Reg(S0); asm.emitPUSH_Reg(T0); asm.emitPUSH_Reg(S0); asm.emitPUSH_Reg(T0); break; } case 0x5b: /* dup_x2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dup_x2"); asm.emitPOP_Reg(T0); asm.emitPOP_Reg(S0); asm.emitPOP_Reg(T1); asm.emitPUSH_Reg(T0); asm.emitPUSH_Reg(T1); asm.emitPUSH_Reg(S0); asm.emitPUSH_Reg(T0); break; } case 0x5c: /* dup2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dup2"); asm.emitMOV_Reg_RegDisp (T0, SP, 4); asm.emitMOV_Reg_RegInd (S0, SP); asm.emitPUSH_Reg(T0); asm.emitPUSH_Reg(S0); break; } case 0x5d: /* dup2_x1 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dup2_x1"); asm.emitPOP_Reg(T0); asm.emitPOP_Reg(S0); asm.emitPOP_Reg(T1); asm.emitPUSH_Reg(S0); asm.emitPUSH_Reg(T0); asm.emitPUSH_Reg(T1); asm.emitPUSH_Reg(S0); asm.emitPUSH_Reg(T0); break; } case 0x5e: /* dup2_x2 */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dup2_x2"); asm.emitPOP_Reg(T0); asm.emitPOP_Reg(S0); asm.emitPOP_Reg(T1); asm.emitPOP_Reg(JTOC); // JTOC is scratch register asm.emitPUSH_Reg(S0); asm.emitPUSH_Reg(T0); asm.emitPUSH_Reg(JTOC); asm.emitPUSH_Reg(T1); asm.emitPUSH_Reg(S0); asm.emitPUSH_Reg(T0); asm.emitMOV_Reg_RegDisp (JTOC, PR, VM_Entrypoints.jtocOffset); // restore JTOC register break; } case 0x5f: /* swap */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "swap"); asm.emitPOP_Reg(T0); asm.emitPOP_Reg(S0); asm.emitPUSH_Reg(T0); asm.emitPUSH_Reg(S0); break; } case 0x60: /* iadd */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iadd"); asm.emitPOP_Reg(T0); asm.emitADD_RegInd_Reg(SP, T0); break; } case 0x61: /* ladd */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ladd"); asm.emitPOP_Reg(T0); // the low half of one long asm.emitPOP_Reg(S0); // the high half asm.emitADD_RegInd_Reg(SP, T0); // add low halves asm.emitADC_RegDisp_Reg(SP, WORDSIZE, S0); // add high halves with carry break; } case 0x62: /* fadd */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fadd"); asm.emitFLD_Reg_RegInd (FP0, SP); // FPU reg. stack <- value2 asm.emitFADD_Reg_RegDisp(FP0, SP, WORDSIZE); // FPU reg. stack += value1 asm.emitPOP_Reg (T0); // discard asm.emitFSTP_RegInd_Reg(SP, FP0); // POP FPU reg. stack onto stack break; } case 0x63: /* dadd */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dadd"); asm.emitFLD_Reg_RegInd_Quad (FP0, SP); // FPU reg. stack <- value2 asm.emitFADD_Reg_RegDisp_Quad(FP0, SP, 8); // FPU reg. stack += value1 asm.emitADD_Reg_Imm(SP, 2*WORDSIZE); // shrink the stack asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); // POP FPU reg. stack onto stack break; } case 0x64: /* isub */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "isub"); asm.emitPOP_Reg(T0); asm.emitSUB_RegInd_Reg(SP, T0); break; } case 0x65: /* lsub */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lsub"); asm.emitPOP_Reg(T0); // the low half of one long asm.emitPOP_Reg(S0); // the high half asm.emitSUB_RegInd_Reg(SP, T0); // subtract low halves asm.emitSBB_RegDisp_Reg(SP, WORDSIZE, S0); // subtract high halves with borrow break; } case 0x66: /* fsub */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fsub"); asm.emitFLD_Reg_RegDisp (FP0, SP, WORDSIZE); // FPU reg. stack <- value1 asm.emitFSUB_Reg_RegDisp(FP0, SP, 0); // FPU reg. stack -= value2 asm.emitPOP_Reg (T0); // discard asm.emitFSTP_RegInd_Reg(SP, FP0); // POP FPU reg. stack onto stack break; } case 0x67: /* dsub */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dsub"); asm.emitFLD_Reg_RegDisp_Quad (FP0, SP, 8); // FPU reg. stack <- value1 asm.emitFSUB_Reg_RegDisp_Quad(FP0, SP, 0); // FPU reg. stack -= value2 asm.emitADD_Reg_Imm (SP, 2*WORDSIZE); // shrink the stack asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); // POP FPU reg. stack onto stack break; } case 0x68: /* imul */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "imul"); asm.emitPOP_Reg (T0); asm.emitIMUL2_Reg_RegInd(T0, SP); asm.emitMOV_RegInd_Reg (SP, T0); break; } case 0x69: /* lmul */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lmul"); // 0: JTOC is used as scratch registers (see 14) // 1: load value1.low temp0, i.e., save value1.low // 2: eax <- temp0 eax is value1.low // 3: edx:eax <- eax * value2.low (product of the two low halves) // 4: store eax which is result.low into place --> value1.low is destroyed // 5: temp1 <- edx which is the carry of the product of the low halves // aex and edx now free of results // 6: aex <- temp0 which is still value1.low // 7: pop into aex aex <- value2.low --> value2.low is sort of destroyed // 8: edx:eax <- eax * value1.hi (value2.low * value1.hi) // 9: temp1 += aex // 10: pop into eax; eax <- value2.hi -> value2.hi is sort of destroyed // 11: edx:eax <- eax * temp0 (value2.hi * value1.low) // 12: temp1 += eax temp1 is now result.hi // 13: store result.hi // 14: restore JTOC if (VM.VerifyAssertions) VM.assert(S0 != EAX); if (VM.VerifyAssertions) VM.assert(S0 != EDX); asm.emitMOV_Reg_RegDisp (JTOC, SP, 8); // step 1: JTOC is temp0 asm.emitMOV_Reg_Reg (EAX, JTOC); // step 2 asm.emitMUL_Reg_RegInd(EAX, SP); // step 3 asm.emitMOV_RegDisp_Reg (SP, 8, EAX); // step 4 asm.emitMOV_Reg_Reg (S0, EDX); // step 5: S0 is temp1 asm.emitMOV_Reg_Reg (EAX, JTOC); // step 6 asm.emitPOP_Reg (EAX); // step 7: SP changed! asm.emitIMUL1_Reg_RegDisp(EAX, SP, 8);// step 8 asm.emitADD_Reg_Reg (S0, EAX); // step 9 asm.emitPOP_Reg (EAX); // step 10: SP changed! asm.emitIMUL1_Reg_Reg(EAX, JTOC); // step 11 asm.emitADD_Reg_Reg (S0, EAX); // step 12 asm.emitMOV_RegDisp_Reg (SP, 4, S0); // step 13 asm.emitMOV_Reg_RegDisp (JTOC, PR, VM_Entrypoints.jtocOffset); // restore JTOC register break; } case 0x6a: /* fmul */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fmul"); asm.emitFLD_Reg_RegInd (FP0, SP); // FPU reg. stack <- value2 asm.emitFMUL_Reg_RegDisp(FP0, SP, WORDSIZE); // FPU reg. stack *= value1 asm.emitPOP_Reg (T0); // discard asm.emitFSTP_RegInd_Reg(SP, FP0); // POP FPU reg. stack onto stack break; } case 0x6b: /* dmul */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dmul"); asm.emitFLD_Reg_RegInd_Quad (FP0, SP); // FPU reg. stack <- value2 asm.emitFMUL_Reg_RegDisp_Quad(FP0, SP, 8); // FPU reg. stack *= value1 asm.emitADD_Reg_Imm (SP, 2*WORDSIZE); // shrink the stack asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); // POP FPU reg. stack onto stack break; } case 0x6c: /* idiv */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "idiv"); asm.emitPOP_Reg (ECX); // NOTE: can't use symbolic registers because of intel hardware requirements asm.emitPOP_Reg (EAX); asm.emitCDQ (); // sign extend EAX into EDX asm.emitIDIV_Reg_Reg(EAX, ECX); // compute EAX/ECX - Quotient in EAX, remainder in EDX asm.emitPUSH_Reg(EAX); break; } case 0x6d: /* ldiv */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ldiv"); int offset = VM_Entrypoints.longDivideOffset; genParameterRegisterLoad(4); // pass 4 parameter words (2 longs) asm.emitCALL_RegDisp(JTOC, offset); asm.emitPUSH_Reg(T0); // high half asm.emitPUSH_Reg(T1); // low half break; } case 0x6e: /* fdiv */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fdiv"); asm.emitFLD_Reg_RegDisp (FP0, SP, WORDSIZE); // FPU reg. stack <- value1 asm.emitFDIV_Reg_RegDisp(FP0, SP, 0); // FPU reg. stack /= value2 asm.emitPOP_Reg (T0); // discard asm.emitFSTP_RegInd_Reg(SP, FP0); // POP FPU reg. stack onto stack break; } case 0x6f: /* ddiv */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ddiv"); asm.emitFLD_Reg_RegDisp_Quad (FP0, SP, 8); // FPU reg. stack <- value1 asm.emitFDIV_Reg_RegInd_Quad(FP0, SP); // FPU reg. stack /= value2 asm.emitADD_Reg_Imm (SP, 2*WORDSIZE); // shrink the stack asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); // POP FPU reg. stack onto stack break; } case 0x70: /* irem */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "irem"); asm.emitPOP_Reg (ECX); // NOTE: can't use symbolic registers because of intel hardware requirements asm.emitPOP_Reg (EAX); asm.emitCDQ (); // sign extend EAX into EDX asm.emitIDIV_Reg_Reg(EAX, ECX); // compute EAX/ECX - Quotient in EAX, remainder in EDX asm.emitPUSH_Reg(EDX); break; } case 0x71: /* lrem */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lrem"); int offset = VM_Entrypoints.longRemainderOffset; genParameterRegisterLoad(4); // pass 4 parameter words (2 longs) asm.emitCALL_RegDisp(JTOC, offset); asm.emitPUSH_Reg(T0); // high half asm.emitPUSH_Reg(T1); // low half break; } case 0x72: /* frem */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "frem"); asm.emitFLD_Reg_RegInd (FP0, SP); // FPU reg. stack <- value2, or a asm.emitFLD_Reg_RegDisp (FP0, SP, WORDSIZE); // FPU reg. stack <- value1, or b asm.emitFPREM (); // FPU reg. stack <- a%b asm.emitFSTP_RegDisp_Reg(SP, WORDSIZE, FP0); // POP FPU reg. stack (results) onto java stack asm.emitFSTP_RegInd_Reg(SP, FP0); // POP FPU reg. stack onto java stack asm.emitPOP_Reg (T0); // shrink the stack (T0 discarded) break; } case 0x73: /* drem */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "drem"); asm.emitFLD_Reg_RegInd_Quad (FP0, SP); // FPU reg. stack <- value2, or a asm.emitFLD_Reg_RegDisp_Quad (FP0, SP, 2*WORDSIZE); // FPU reg. stack <- value1, or b asm.emitFPREM (); // FPU reg. stack <- a%b asm.emitFSTP_RegDisp_Reg_Quad(SP, 2*WORDSIZE, FP0); // POP FPU reg. stack (result) onto java stack asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); // POP FPU reg. stack onto java stack asm.emitADD_Reg_Imm (SP, 2*WORDSIZE); // shrink the stack break; } case 0x74: /* ineg */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ineg"); asm.emitNEG_RegInd(SP); // [SP] <- -[SP] break; } case 0x75: /* lneg */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lneg"); asm.emitNEG_RegDisp(SP, 4); // [SP+4] <- -[SP+4] or high <- -high asm.emitNEG_RegInd(SP); // [SP] <- -[SP] or low <- -low asm.emitSBB_RegDisp_Imm(SP, 4, 0); // [SP+4] += borrow or high += borrow break; } case 0x76: /* fneg */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fneg"); asm.emitFLD_Reg_RegInd (FP0, SP); // FPU reg. stack <- value1 asm.emitFCHS (); // change sign to stop of FPU stack asm.emitFSTP_RegInd_Reg(SP, FP0); // POP FPU reg. stack onto stack break; } case 0x77: /* dneg */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dneg"); asm.emitFLD_Reg_RegInd_Quad (FP0, SP); // FPU reg. stack <- value1 asm.emitFCHS (); // change sign to stop of FPU stack asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); // POP FPU reg. stack onto stack break; } case 0x78: /* ishl */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ishl"); if (VM.VerifyAssertions) VM.assert(ECX != T0); asm.emitPOP_Reg(ECX); asm.emitSHL_RegInd_Reg(SP, ECX); // shift T0 left ECX times; ECX low order 5 bits break; } case 0x79: /* lshl */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lshl"); // l >> n if (VM.VerifyAssertions) VM.assert (ECX != T0); // ECX is constrained to be the shift count if (VM.VerifyAssertions) VM.assert (ECX != T1); if (VM.VerifyAssertions) VM.assert (ECX != JTOC); // 1: pop shift amount into JTOC (JTOC must be restored at the end) // 2: pop low half into T0 // 3: pop high half into T1 // 4: ECX <- JTOC, copy the shift count // 5: JTOC <- JTOC & 32 --> if 0 then shift amount is less than 32 // 6: branch to step 12 if results is zero // the result is not zero --> the shift amount is greater than 32 // 7: ECX <- ECX XOR JTOC --> ECX is orginal shift amount minus 32 // 8: T1 <- T0, or replace the high half with the low half. This accounts for the 32 bit shift // 9: shift T1 left by ECX bits // 10: T0 <- 0 // 11: branch to step 14 // 12: shift left double from T0 into T1 by ECX bits. T0 is unaltered // 13: shift left T0, the low half, also by ECX bits // 14: push high half from T1 // 15: push the low half from T0 // 16: restore the JTOC asm.emitPOP_Reg (JTOC); // original shift amount 6 bits asm.emitPOP_Reg (T0); // pop low half asm.emitPOP_Reg (T1); // pop high half asm.emitMOV_Reg_Reg (ECX, JTOC); asm.emitAND_Reg_Imm (JTOC, 32); VM_ForwardReference fr1 = asm.forwardJcc(asm.EQ); asm.emitXOR_Reg_Reg (ECX, JTOC); asm.emitMOV_Reg_Reg (T1, T0); // low replaces high asm.emitSHL_Reg_Reg (T1, ECX); asm.emitXOR_Reg_Reg (T0, T0); VM_ForwardReference fr2 = asm.forwardJMP(); fr1.resolve(asm); asm.emitSHLD_Reg_Reg_Reg(T1, T0, ECX); // shift high half (step 12) asm.emitSHL_Reg_Reg (T0, ECX); // shift low half fr2.resolve(asm); asm.emitPUSH_Reg(T1); // push high half (step 14) asm.emitPUSH_Reg(T0); // push low half asm.emitMOV_Reg_RegDisp (JTOC, PR, VM_Entrypoints.jtocOffset); // restore JTOC break; } case 0x7a: /* ishr */ { // unit test by IArith if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ishr"); if (VM.VerifyAssertions) VM.assert (ECX != T0); asm.emitPOP_Reg (ECX); asm.emitSAR_RegInd_Reg (SP, ECX); // shift T0 right ECX times; ECX low order 5 bits break; } case 0x7b: /* lshr */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lshr"); if (VM.VerifyAssertions) VM.assert (ECX != T0); // ECX is constrained to be the shift count if (VM.VerifyAssertions) VM.assert (ECX != T1); if (VM.VerifyAssertions) VM.assert (ECX != JTOC); // 1: pop shift amount into JTOC (JTOC must be restored at the end) // 2: pop low half into T0 // 3: pop high half into T1 // 4: ECX <- JTOC, copy the shift count // 5: JTOC <- JTOC & 32 --> if 0 then shift amount is less than 32 // 6: branch to step 13 if results is zero // the result is not zero --> the shift amount is greater than 32 // 7: ECX <- ECX XOR JTOC --> ECX is orginal shift amount minus 32 // 8: T0 <- T1, or replace the low half with the high half. This accounts for the 32 bit shift // 9: shift T0 right arithmetic by ECX bits // 10: ECX <- 31 // 11: shift T1 right arithmetic by ECX=31 bits, thus exending the sigh // 12: branch to step 15 // 13: shift right double from T1 into T0 by ECX bits. T1 is unaltered // 14: shift right arithmetic T1, the high half, also by ECX bits // 15: push high half from T1 // 16: push the low half from T0 // 17: restore JTOC asm.emitPOP_Reg (JTOC); // original shift amount 6 bits asm.emitPOP_Reg (T0); // pop low half asm.emitPOP_Reg (T1); // pop high asm.emitMOV_Reg_Reg (ECX, JTOC); asm.emitAND_Reg_Imm (JTOC, 32); VM_ForwardReference fr1 = asm.forwardJcc(asm.EQ); asm.emitXOR_Reg_Reg (ECX, JTOC); asm.emitMOV_Reg_Reg (T0, T1); // replace low with high asm.emitSAR_Reg_Reg (T0, ECX); // and shift it asm.emitMOV_Reg_Imm (ECX, 31); asm.emitSAR_Reg_Reg (T1, ECX); // set high half VM_ForwardReference fr2 = asm.forwardJMP(); fr1.resolve(asm); asm.emitSHRD_Reg_Reg_Reg(T0, T1, ECX); // shift low half (step 13) asm.emitSAR_Reg_Reg (T1, ECX); // shift high half fr2.resolve(asm); asm.emitPUSH_Reg(T1); // push high half (step 15) asm.emitPUSH_Reg(T0); // push low half asm.emitMOV_Reg_RegDisp (JTOC, PR, VM_Entrypoints.jtocOffset); // restore JTOC break; } case 0x7c: /* iushr */ { // unit test by IArith if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iushr"); if (VM.VerifyAssertions) VM.assert (ECX != T0); asm.emitPOP_Reg (ECX); asm.emitSHR_RegInd_Reg(SP, ECX); // shift T0 right ECX times; ECX low order 5 bits break; } case 0x7d: /* lushr */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lushr"); if (VM.VerifyAssertions) VM.assert (ECX != T0); // ECX is constrained to be the shift count if (VM.VerifyAssertions) VM.assert (ECX != T1); if (VM.VerifyAssertions) VM.assert (ECX != JTOC); // 1: pop shift amount into JTOC (JTOC must be restored at the end) // 2: pop low half into T0 // 3: ECX <- JTOC, copy the shift count // 4: JTOC <- JTOC & 32 --> if 0 then shift amount is less than 32 // 5: branch to step 11 if results is zero // the result is not zero --> the shift amount is greater than 32 // 6: ECX <- ECX XOR JTOC --> ECX is orginal shift amount minus 32 // 7: pop high half into T0 replace the low half with the high // half. This accounts for the 32 bit shift // 8: shift T0 right logical by ECX bits // 9: T1 <- 0 T1 is the high half // 10: branch to step 14 // 11: pop high half into T1 // 12: shift right double from T1 into T0 by ECX bits. T1 is unaltered // 13: shift right logical T1, the high half, also by ECX bits // 14: push high half from T1 // 15: push the low half from T0 // 16: restore JTOC asm.emitPOP_Reg(JTOC); // original shift amount 6 bits asm.emitPOP_Reg(T0); // pop low half asm.emitMOV_Reg_Reg(ECX, JTOC); asm.emitAND_Reg_Imm(JTOC, 32); VM_ForwardReference fr1 = asm.forwardJcc(asm.EQ); asm.emitXOR_Reg_Reg (ECX, JTOC); asm.emitPOP_Reg (T0); // replace low with high asm.emitSHR_Reg_Reg (T0, ECX); // and shift it (count - 32) asm.emitXOR_Reg_Reg (T1, T1); // high <- 0 VM_ForwardReference fr2 = asm.forwardJMP(); fr1.resolve(asm); asm.emitPOP_Reg (T1); // high half (step 11) asm.emitSHRD_Reg_Reg_Reg(T0, T1, ECX); // shift low half asm.emitSHR_Reg_Reg (T1, ECX); // shift high half fr2.resolve(asm); asm.emitPUSH_Reg(T1); // push high half (step 14) asm.emitPUSH_Reg(T0); // push low half asm.emitMOV_Reg_RegDisp (JTOC, PR, VM_Entrypoints.jtocOffset); // restore JTOC break; } case 0x7e: /* iand */ { // unit test by IArith if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iand"); asm.emitPOP_Reg(T0); asm.emitAND_RegInd_Reg(SP, T0); break; } case 0x7f: /* land */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "land"); asm.emitPOP_Reg(T0); // low asm.emitPOP_Reg(S0); // high asm.emitAND_RegInd_Reg(SP, T0); asm.emitAND_RegDisp_Reg(SP, 4, S0); break; } case 0x80: /* ior */ { // unit test by IArith if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ior"); asm.emitPOP_Reg(T0); asm.emitOR_RegInd_Reg (SP, T0); break; } case 0x81: /* lor */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lor"); asm.emitPOP_Reg(T0); // low asm.emitPOP_Reg(S0); // high asm.emitOR_RegInd_Reg(SP, T0); asm.emitOR_RegDisp_Reg(SP, 4, S0); break; } case 0x82: /* ixor */ { // unit test by IArith if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ixor"); asm.emitPOP_Reg(T0); asm.emitXOR_RegInd_Reg(SP, T0); break; } case 0x83: /* lxor */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lxor"); asm.emitPOP_Reg(T0); // low asm.emitPOP_Reg(S0); // high asm.emitXOR_RegInd_Reg(SP, T0); asm.emitXOR_RegDisp_Reg(SP, 4, S0); break; } case 0x84: /* iinc */ { int index = fetch1ByteUnsigned(); int val = fetch1ByteSigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iinc " + VM_Lister.decimal(index) + " " + VM_Lister.decimal(val)); int offset = localOffset(index); asm.emitADD_RegDisp_Imm(FP, offset, val); break; } case 0x85: /* i2l */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "i2l"); asm.emitPOP_Reg (EAX); asm.emitCDQ (); asm.emitPUSH_Reg(EDX); asm.emitPUSH_Reg(EAX); break; } case 0x86: /* i2f */ { // unit test by FArith if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "i2f"); asm.emitFILD_Reg_RegInd(FP0, SP); asm.emitFSTP_RegInd_Reg(SP, FP0); break; } case 0x87: /* i2d */ { // unit test by DArith if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "i2d"); asm.emitFILD_Reg_RegInd(FP0, SP); asm.emitPUSH_Reg(T0); // grow the stack asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); break; } case 0x88: /* l2i */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "l2i"); asm.emitPOP_Reg (T0); // low half of the long asm.emitPOP_Reg (S0); // high half of the long asm.emitPUSH_Reg(T0); break; } case 0x89: /* l2f */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "l2f"); asm.emitFILD_Reg_RegInd_Quad(FP0, SP); asm.emitADD_Reg_Imm(SP, WORDSIZE); // shrink the stack asm.emitFSTP_RegInd_Reg(SP, FP0); break; } case 0x8a: /* l2d */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "l2d"); asm.emitFILD_Reg_RegInd_Quad(FP0, SP); asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); break; } case 0x8b: /* f2i */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "f2i"); // convert to double asm.emitFLD_Reg_RegInd(FP0, SP); asm.emitSUB_Reg_Imm(SP, WORDSIZE); // grow the stack asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); // and convert to int int offset = VM_Entrypoints.doubleToIntOffset; genParameterRegisterLoad(); // pass 1 parameter asm.emitCALL_RegDisp(JTOC, offset); asm.emitPUSH_Reg(T0); break; } case 0x8c: /* f2l */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "f2l"); // convert to double asm.emitFLD_Reg_RegInd(FP0, SP); asm.emitSUB_Reg_Imm(SP, WORDSIZE); // grow the stack asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); // and convert to long int offset = VM_Entrypoints.doubleToLongOffset; genParameterRegisterLoad(); // pass 1 parameter asm.emitCALL_RegDisp(JTOC, offset); asm.emitPUSH_Reg(T0); // high half asm.emitPUSH_Reg(T1); // low half break; } case 0x8d: /* f2d */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "f2d"); asm.emitFLD_Reg_RegInd(FP0, SP); asm.emitSUB_Reg_Imm(SP, WORDSIZE); // grow the stack asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); break; } case 0x8e: /* d2i */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "d2i"); int offset = VM_Entrypoints.doubleToIntOffset; genParameterRegisterLoad(); // pass 1 parameter asm.emitCALL_RegDisp(JTOC, offset); asm.emitPUSH_Reg(T0); break; } case 0x8f: /* d2l */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "d2l"); int offset = VM_Entrypoints.doubleToLongOffset; genParameterRegisterLoad(); // pass 1 parameter asm.emitCALL_RegDisp(JTOC, offset); asm.emitPUSH_Reg(T0); // high half asm.emitPUSH_Reg(T1); // low half break; } case 0x90: /* d2f */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "d2f"); asm.emitFLD_Reg_RegInd_Quad(FP0, SP); asm.emitADD_Reg_Imm(SP, WORDSIZE); // shrink the stack asm.emitFSTP_RegInd_Reg(SP, FP0); break; } case 0x91: /* i2b */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "i2b"); // asm.emitMOVSXb(T0, SP, 0); // load byte off top of the stack sign extended // asm.emitMOV (SP, 0, T0); // store result back on the top of the stack asm.emitPOP_Reg (T0); asm.emitMOVSX_Reg_Reg_Byte(T0, T0); asm.emitPUSH_Reg (T0); break; } case 0x92: /* i2c */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "i2c"); // asm.emitMOVZXh(T0, SP, 0); // load char off top of the stack sign extended // asm.emitMOV (SP, 0, T0); // store result back on the top of the stack asm.emitPOP_Reg (T0); asm.emitMOVZX_Reg_Reg_Word(T0, T0); asm.emitPUSH_Reg (T0); break; } case 0x93: /* i2s */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "i2s"); // asm.emitMOVSXh(T0, SP, 0); // load short off top of the stack sign extended // asm.emitMOV (SP, 0, T0); // store result back on the top of the stack asm.emitPOP_Reg (T0); asm.emitMOVSX_Reg_Reg_Word(T0, T0); asm.emitPUSH_Reg (T0); break; } case 0x94: /* lcmp */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lcmp"); // a ? b asm.emitPOP_Reg(T0); // the low half of value2 asm.emitPOP_Reg(S0); // the high half of value2 asm.emitPOP_Reg(T1); // the low half of value1 asm.emitSUB_Reg_Reg(T1, T0); // subtract the low half of value2 from // low half of value1, result into T1 asm.emitPOP_Reg(T0); // the high half of value 1 // pop does not alter the carry register asm.emitSBB_Reg_Reg(T0, S0); // subtract the high half of value2 plus // borrow from the high half of value 1, // result in T0 asm.emitMOV_Reg_Imm(S0, -1); // load -1 into S0 VM_ForwardReference fr1 = asm.forwardJcc(asm.LT); // result negative --> branch to end asm.emitMOV_Reg_Imm(S0, 0); // load 0 into S0 asm.emitOR_Reg_Reg(T0, T1); // result 0 VM_ForwardReference fr2 = asm.forwardJcc(asm.EQ); // result 0 --> branch to end asm.emitMOV_Reg_Imm(S0, 1); // load 1 into S0 fr1.resolve(asm); fr2.resolve(asm); asm.emitPUSH_Reg(S0); // push result on stack break; } case 0x95: /* fcmpl !!- */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fcmpl"); VM_ForwardReference fr1,fr2,fr3; asm.emitFLD_Reg_RegDisp(FP0, SP, WORDSIZE); // copy value1 into FPU asm.emitFLD_Reg_RegInd(FP0, SP); // copy value2 into FPU asm.emitADD_Reg_Imm(SP, 2*WORDSIZE); // popping the stack if (VM.VerifyAssertions) VM.assert(S0 != EAX); // eax is used by FNSTSW asm.emitXOR_Reg_Reg(S0, S0); // S0 <- 0 asm.emitFUCOMPP(); // compare and pop FPU *2 asm.emitFNSTSW(); // move FPU flags into (E)AX asm.emitSAHF(); // store AH into flags fr1 = asm.forwardJcc(asm.EQ); // branch if ZF set (eq. or unord.) // ZF not set -> neither equal nor unordered asm.emitMOV_Reg_Imm(S0, 1); // load 1 into S0 fr2 = asm.forwardJcc(asm.LLT); // branch if CF set (val2 < val1) asm.emitMOV_Reg_Imm(S0, -1); // load -1 into S0 fr1.resolve(asm); // ZF set (equal or unordered) fr3 = asm.forwardJcc(asm.LGE); // branch if CF not set (not unordered) asm.emitMOV_Reg_Imm(S0, -1); // load -1 into S0 fr3.resolve(asm); fr2.resolve(asm); asm.emitPUSH_Reg(S0); // push result on stack break; } case 0x96: /* fcmpg !!- */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "fcmpg"); VM_ForwardReference fr1,fr2,fr3; asm.emitFLD_Reg_RegDisp(FP0, SP, WORDSIZE); // copy value1 into FPU asm.emitFLD_Reg_RegInd(FP0, SP); // copy value2 into FPU asm.emitADD_Reg_Imm(SP, 2*WORDSIZE); // popping the stack if (VM.VerifyAssertions) VM.assert(S0 != EAX); // eax is used by FNSTSW asm.emitXOR_Reg_Reg(S0, S0); // S0 <- 0 asm.emitFUCOMPP(); // compare and pop FPU *2 asm.emitFNSTSW(); // move FPU flags into (E)AX asm.emitSAHF(); // store AH into flags fr1 = asm.forwardJcc(asm.EQ); // branch if ZF set (eq. or unord.) // ZF not set -> neither equal nor unordered asm.emitMOV_Reg_Imm(S0, 1); // load 1 into S0 fr2 = asm.forwardJcc(asm.LLT); // branch if CF set (val2 < val1) asm.emitMOV_Reg_Imm(S0, -1); // load -1 into S0 fr1.resolve(asm); // ZF set (equal or unordered) fr3 = asm.forwardJcc(asm.LGE); // branch if CF not set (not unordered) asm.emitMOV_Reg_Imm(S0, 1); // load 1 into S0 fr3.resolve(asm); fr2.resolve(asm); asm.emitPUSH_Reg(S0); // push result on stack break; } case 0x97: /* dcmpl !!- */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dcmpl"); VM_ForwardReference fr1,fr2,fr3; asm.emitFLD_Reg_RegDisp_Quad(FP0, SP, WORDSIZE*2); // copy value1 into FPU asm.emitFLD_Reg_RegInd_Quad(FP0, SP); // copy value2 into FPU asm.emitADD_Reg_Imm(SP, 4*WORDSIZE); // popping the stack if (VM.VerifyAssertions) VM.assert(S0 != EAX); // eax is used by FNSTSW asm.emitXOR_Reg_Reg(S0, S0); // S0 <- 0 asm.emitFUCOMPP(); // compare and pop FPU *2 asm.emitFNSTSW(); // move FPU flags into (E)AX asm.emitSAHF(); // store AH into flags fr1 = asm.forwardJcc(asm.EQ); // branch if ZF set (eq. or unord.) // ZF not set -> neither equal nor unordered asm.emitMOV_Reg_Imm(S0, 1); // load 1 into S0 fr2 = asm.forwardJcc(asm.LLT); // branch if CF set (val2 < val1) asm.emitMOV_Reg_Imm(S0, -1); // load -1 into S0 fr1.resolve(asm); // ZF set (equal or unordered) fr3 = asm.forwardJcc(asm.LGE); // branch if CF not set (not unordered) asm.emitMOV_Reg_Imm(S0, -1); // load -1 into S0 fr3.resolve(asm); fr2.resolve(asm); asm.emitPUSH_Reg(S0); // push result on stack break; } case 0x98: /* dcmpg !!- */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dcmpg"); VM_ForwardReference fr1,fr2,fr3; asm.emitFLD_Reg_RegDisp_Quad(FP0, SP, WORDSIZE*2); // copy value1 into FPU asm.emitFLD_Reg_RegInd_Quad(FP0, SP); // copy value2 into FPU asm.emitADD_Reg_Imm(SP, 4*WORDSIZE); // popping the stack if (VM.VerifyAssertions) VM.assert(S0 != EAX); // eax is used by FNSTSW asm.emitXOR_Reg_Reg(S0, S0); // S0 <- 0 asm.emitFUCOMPP(); // compare and pop FPU *2 asm.emitFNSTSW(); // move FPU flags into (E)AX asm.emitSAHF(); // store AH into flags fr1 = asm.forwardJcc(asm.EQ); // branch if ZF set (eq. or unord.) // ZF not set -> neither equal nor unordered asm.emitMOV_Reg_Imm(S0, 1); // load 1 into S0 fr2 = asm.forwardJcc(asm.LLT); // branch if CF set (val2 < val1) asm.emitMOV_Reg_Imm(S0, -1); // load -1 into S0 fr1.resolve(asm); // ZF set (equal or unordered) fr3 = asm.forwardJcc(asm.LGE); // branch if CF not set (not unordered) asm.emitMOV_Reg_Imm(S0, 1); // load 1 into S0 fr3.resolve(asm); fr2.resolve(asm); asm.emitPUSH_Reg(S0); // push result on stack break; } case 0x99: /* ifeq */ { int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ifeq " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitPOP_Reg(T0); asm.emitCMP_Reg_Imm(T0, 0); asm.emitJCC_Cond_ImmOrLabel(asm.EQ, mTarget, bTarget); break; } case 0x9a: /* ifne */ { int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ifne " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitPOP_Reg(T0); asm.emitCMP_Reg_Imm(T0, 0); asm.emitJCC_Cond_ImmOrLabel(asm.NE, mTarget, bTarget); break; } case 0x9b: /* iflt */ { int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "iflt " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitPOP_Reg(T0); asm.emitCMP_Reg_Imm(T0, 0); asm.emitJCC_Cond_ImmOrLabel(asm.LT, mTarget, bTarget); break; } case 0x9c: /* ifge */ { int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ifge " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitPOP_Reg(T0); asm.emitCMP_Reg_Imm(T0, 0); asm.emitJCC_Cond_ImmOrLabel(asm.GE, mTarget, bTarget); break; } case 0x9d: /* ifgt */ { int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ifgt " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitPOP_Reg(T0); asm.emitCMP_Reg_Imm(T0, 0); asm.emitJCC_Cond_ImmOrLabel(asm.GT, mTarget, bTarget); break; } case 0x9e: /* ifle */ { int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ifle " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitPOP_Reg(T0); asm.emitCMP_Reg_Imm(T0, 0); asm.emitJCC_Cond_ImmOrLabel(asm.LE, mTarget, bTarget); break; } case 0x9f: /* if_icmpeq */ { int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "if_icmpeq " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitPOP_Reg(S0); asm.emitPOP_Reg(T0); asm.emitCMP_Reg_Reg(T0, S0); asm.emitJCC_Cond_ImmOrLabel(asm.EQ, mTarget, bTarget); break; } case 0xa0: /* if_icmpne */ { int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "if_icmpne " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitPOP_Reg(S0); asm.emitPOP_Reg(T0); asm.emitCMP_Reg_Reg(T0, S0); asm.emitJCC_Cond_ImmOrLabel(asm.NE, mTarget, bTarget); break; } case 0xa1: /* if_icmplt */ { // maria backward brach test is TESTED int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "if_icmplt " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitPOP_Reg(S0); asm.emitPOP_Reg(T0); asm.emitCMP_Reg_Reg(T0, S0); asm.emitJCC_Cond_ImmOrLabel(asm.LT, mTarget, bTarget); break; } case 0xa2: /* if_icmpge */ { int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "if_icmpge " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitPOP_Reg(S0); asm.emitPOP_Reg(T0); asm.emitCMP_Reg_Reg(T0, S0); asm.emitJCC_Cond_ImmOrLabel(asm.GE, mTarget, bTarget); break; } case 0xa3: /* if_icmpgt */ { int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "if_icmpgt " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitPOP_Reg(S0); asm.emitPOP_Reg(T0); asm.emitCMP_Reg_Reg(T0, S0); asm.emitJCC_Cond_ImmOrLabel(asm.GT, mTarget, bTarget); break; } case 0xa4: /* if_icmple */ { int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "if_icmple " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitPOP_Reg(S0); asm.emitPOP_Reg(T0); asm.emitCMP_Reg_Reg(T0, S0); asm.emitJCC_Cond_ImmOrLabel(asm.LE, mTarget, bTarget); break; } case 0xa5: /* if_acmpeq */ { int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "if_acmpeq " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitPOP_Reg(S0); asm.emitPOP_Reg(T0); asm.emitCMP_Reg_Reg(T0, S0); asm.emitJCC_Cond_ImmOrLabel(asm.EQ, mTarget, bTarget); break; } case 0xa6: /* if_acmpne */ { int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "if_acmpne " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitPOP_Reg(S0); asm.emitPOP_Reg(T0); asm.emitCMP_Reg_Reg(T0, S0); asm.emitJCC_Cond_ImmOrLabel(asm.NE, mTarget, bTarget); break; } case 0xa7: /* goto */ { // unit test by IBack int offset = fetch2BytesSigned(); int bTarget = biStart + offset; // bi has been bumped by 3 already int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "goto " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] "); if (offset < 0) genThreadSwitchTest(VM_Thread.BACKEDGE); asm.emitJMP_ImmOrLabel(mTarget, bTarget); break; } case 0xa8: /* jsr */ { int offset = fetch2BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "jsr " + VM_Lister.decimal(offset) + " [" + VM_Lister.decimal(bTarget) + "] (" + VM_Lister.decimal(mTarget)); asm.emitCALL_ImmOrLabel(mTarget, bTarget); break; } case 0xa9: /* ret */ { int index = fetch1ByteUnsigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ret " + VM_Lister.decimal(index)); int offset = localOffset(index); asm.emitJMP_RegDisp(FP, offset); break; } case 0xaa: /* tableswitch */ { // unit test by Table bi = (bi+3) & -4; // eat padding int defaultval = fetch4BytesSigned(); int bTarget = biStart + defaultval; int mTarget = bytecodeMap[bTarget]; int low = fetch4BytesSigned(); int high = fetch4BytesSigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "tableswitch [" + VM_Lister.decimal(low) + "--" + VM_Lister.decimal(high) + "] " + VM_Lister.decimal(defaultval)); int n = high-low+1; // n = number of normal cases (0..n-1) asm.emitPOP_Reg (T0); // T0 is index of desired case asm.emitSUB_Reg_Imm(T0, low); // relativize T0 asm.emitCMP_Reg_Imm(T0, n); // 0 <= relative index < n asm.emitJCC_Cond_ImmOrLabel (asm.LGE, mTarget, bTarget); // if not, goto default case asm.emitCALL_Imm(asm.getMachineCodeIndex() + 5 + (n<<LG_WORDSIZE) ); // jump around table, pushing address of 0th delta for (int i=0; i<n; i++) { // create table of deltas int offset = fetch4BytesSigned(); bTarget = biStart + offset; mTarget = bytecodeMap[bTarget]; // delta i: difference between address of case i and of delta 0 asm.emitOFFSET_Imm_ImmOrLabel(i, mTarget, bTarget ); } asm.emitPOP_Reg (S0); // S0 = address of 0th delta asm.emitADD_Reg_RegIdx (S0, S0, T0, asm.WORD, 0); // S0 += [S0 + T0<<2] asm.emitPUSH_Reg(S0); // push computed case address asm.emitRET (); // goto case break; } case 0xab: /* lookupswitch */ { // unit test by Lookup bi = (bi+3) & -4; // eat padding int defaultval = fetch4BytesSigned(); int npairs = fetch4BytesSigned(); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lookupswitch [<" + VM_Lister.decimal(npairs) + ">]" + VM_Lister.decimal(defaultval)); asm.emitPOP_Reg(T0); for (int i=0; i<npairs; i++) { int match = fetch4BytesSigned(); asm.emitCMP_Reg_Imm(T0, match); int offset = fetch4BytesSigned(); int bTarget = biStart + offset; int mTarget = bytecodeMap[bTarget]; asm.emitJCC_Cond_ImmOrLabel(asm.EQ, mTarget, bTarget); } int bTarget = biStart + defaultval; int mTarget = bytecodeMap[bTarget]; asm.emitJMP_ImmOrLabel(mTarget, bTarget); // TODO replace linear search loop with binary search break; } case 0xac: /* ireturn */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "ireturn"); if (VM.UseEpilogueYieldPoints) genThreadSwitchTest(VM_Thread.EPILOGUE); if (method.isSynchronized()) genMonitorExit(); asm.emitPOP_Reg(T0); genEpilogue(); break; } case 0xad: /* lreturn */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "lreturn"); if (VM.UseEpilogueYieldPoints) genThreadSwitchTest(VM_Thread.EPILOGUE); if (method.isSynchronized()) genMonitorExit(); asm.emitPOP_Reg(T1); // low half asm.emitPOP_Reg(T0); // high half genEpilogue(); break; } case 0xae: /* freturn */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "freturn"); if (VM.UseEpilogueYieldPoints) genThreadSwitchTest(VM_Thread.EPILOGUE); if (method.isSynchronized()) genMonitorExit(); asm.emitFLD_Reg_RegInd(FP0, SP); asm.emitADD_Reg_Imm(SP, WORDSIZE); // pop the stack genEpilogue(); break; } case 0xaf: /* dreturn */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "dreturn"); if (VM.UseEpilogueYieldPoints) genThreadSwitchTest(VM_Thread.EPILOGUE); if (method.isSynchronized()) genMonitorExit(); asm.emitFLD_Reg_RegInd_Quad(FP0, SP); asm.emitADD_Reg_Imm(SP, WORDSIZE<<1); // pop the stack genEpilogue(); break; } case 0xb0: /* areturn */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "areturn"); if (VM.UseEpilogueYieldPoints) genThreadSwitchTest(VM_Thread.EPILOGUE); if (method.isSynchronized()) genMonitorExit(); asm.emitPOP_Reg(T0); genEpilogue(); break; } case 0xb1: /* return */ { if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "return"); if (VM.UseEpilogueYieldPoints) genThreadSwitchTest(VM_Thread.EPILOGUE); if (method.isSynchronized()) genMonitorExit(); genEpilogue(); break; } case 0xb2: /* getstatic */ { int constantPoolIndex = fetch2BytesUnsigned(); VM_Field fieldRef = klass.getFieldRef(constantPoolIndex); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "getstatic " + VM_Lister.decimal(constantPoolIndex) + " (" + fieldRef + ")"); boolean classPreresolved = false; VM_Class fieldRefClass = fieldRef.getDeclaringClass(); if (fieldRef.needsDynamicLink(method) && VM.BuildForPrematureClassResolution) { try { fieldRefClass.load(); fieldRefClass.resolve(); classPreresolved = true; } catch (Exception e) { // report the exception at runtime VM.sysWrite("WARNING: during compilation of " + method + " premature resolution of " + fieldRefClass + " provoked the following exception: " + e); // TODO!! remove this warning message } } if (VM.BuildForPrematureClassResolution && !fieldRefClass.isInitialized() && !(fieldRefClass == klass) && !(fieldRefClass.isInBootImage() && VM.writingBootImage) ) { // TODO!! rearrange the following code to backpatch after the first call asm.emitMOV_Reg_Imm (T0, fieldRefClass.getDictionaryId()); asm.emitPUSH_Reg (T0); asm.emitCALL_RegDisp(JTOC, VM_Entrypoints.initializeClassIfNecessaryOffset); classPreresolved = true; } if (fieldRef.needsDynamicLink(method) && !classPreresolved) { if (VM.VerifyAssertions && VM.BuildForStrongVolatileSemantics) // Either VM.BuildForPrematureClassResolution was not set or the class was not found (these cases are not yet handled) VM.assert(VM.NOT_REACHED); // TODO!! handle this case by emitting code that assumes the field is volatile int offset = fieldRef.getDictionaryId()<<LG_WORDSIZE; // offset of field in dictionary and in fieldOffsets int retryLabel = asm.getMachineCodeIndex(); // branch here after dynamic class loading asm.emitMOV_Reg_RegDisp (T0, JTOC, VM_Entrypoints.fieldOffsetsOffset); // T0 is fieldOffsets table asm.emitMOV_Reg_RegDisp (T0, T0, offset); // T0 is offset in JTOC of static field, or 0 if field's class isn't loaded asm.emitCMP_Reg_Imm (T0, 0); // T0 ?= 0, is field's class loaded? VM_ForwardReference fr = asm.forwardJcc(asm.NE); // if so, skip 3 instructions int classId = fieldRef.getDeclaringClass().getDictionaryId(); asm.emitPUSH_Imm(classId); // pass an indirect pointer to field's class genParameterRegisterLoad(1); // pass 1 parameter word asm.emitCALL_RegDisp(JTOC, VM_Entrypoints.loadClassOnDemandOffset); // load field's class asm.emitJMP_Imm (retryLabel); // reload T0 fr.resolve(asm); // comefrom if (fieldRef.getSize() == 4) { // field is one word asm.emitPUSH_RegIdx (JTOC, T0, asm.BYTE, 0); // get static field } else { // field is two words (double or long) if (VM.VerifyAssertions) VM.assert(fieldRef.getSize() == 8); // TODO!! use 8-byte move if possible asm.emitPUSH_RegIdx (JTOC, T0, asm.BYTE, WORDSIZE); // get high part asm.emitPUSH_RegIdx (JTOC, T0, asm.BYTE, 0); // get low part } } else { fieldRef = fieldRef.resolve(); int fieldOffset = fieldRef.getOffset(); if (fieldRef.getSize() == 4) { // field is one word asm.emitPUSH_RegDisp(JTOC, fieldOffset); } else { // field is two words (double or long) if (VM.VerifyAssertions) VM.assert(fieldRef.getSize() == 8); if (fieldRef.isVolatile() && VM.BuildForStrongVolatileSemantics) { asm.emitMOV_Reg_RegDisp (T0, JTOC, VM_Entrypoints.doublewordVolatileMutexOffset); asm.emitPUSH_Reg (T0); asm.emitMOV_Reg_RegDisp (S0, T0, OBJECT_TIB_OFFSET); asm.emitCALL_RegDisp (S0, VM_Entrypoints.processorLockOffset); } // TODO!! use 8-byte move if possible asm.emitPUSH_RegDisp(JTOC, fieldOffset+WORDSIZE); // get high part asm.emitPUSH_RegDisp(JTOC, fieldOffset); // get low part if (fieldRef.isVolatile() && VM.BuildForStrongVolatileSemantics) { asm.emitMOV_Reg_RegDisp (T0, JTOC, VM_Entrypoints.doublewordVolatileMutexOffset); asm.emitPUSH_Reg (T0); asm.emitMOV_Reg_RegDisp (S0, T0, OBJECT_TIB_OFFSET); asm.emitCALL_RegDisp (S0, VM_Entrypoints.processorUnlockOffset); } } } break; } case 0xb3: /* putstatic */ { int constantPoolIndex = fetch2BytesUnsigned(); int fieldId = klass.getFieldRefId(constantPoolIndex); VM_Field fieldRef = VM_FieldDictionary.getValue(fieldId); if (VM_Assembler.TRACE) asm.noteBytecode(biStart, "putstatic " + VM_Lister.decimal(constantPoolIndex) + " (" + fieldRef + ")"); boolean classPreresolved = false; VM_Class fieldRefClass = fieldRef.getDeclaringClass(); if (fieldRef.needsDynamicLink(method) && VM.BuildForPrematureClassResolution) { try { fieldRefClass.load(); fieldRefClass.resolve(); classPreresolved = true; } catch (Exception e) { // report the exception at runtime VM.sysWrite("WARNING: during compilation of " + method + " premature resolution of " + fieldRefClass + " provoked the following exception: " + e); // TODO!! remove this warning message } } if (VM.BuildForPrematureClassResolution && !fieldRefClass.isInitialized() && !(fieldRefClass == klass) && !(fieldRefClass.isInBootImage() && VM.writingBootImage) ) { // TODO!! rearrange the following code to backpatch after the first call asm.emitMOV_Reg_Imm (T0, fieldRefClass.getDictionaryId()); asm.emitPUSH_Reg (T0); asm.emitCALL_RegDisp(JTOC, VM_Entrypoints.initializeClassIfNecessaryOffset); classPreresolved = true; } if (fieldRef.needsDynamicLink(method) && !classPreresolved) { if (VM.VerifyAssertions && VM.BuildForStrongVolatileSemantics) // Either VM.BuildForPrematureClassResolution was not set or the class was not found (these cases are not yet handled) VM.assert(VM.NOT_REACHED); // TODO!! handle this case by emitting code that assumes the field is volatile int offset = fieldRef.getDictionaryId()<<LG_WORDSIZE; // offset of field in dictionary and in fieldOffsets int retryLabel = asm.getMachineCodeIndex(); // branch here, after dynamic class loading asm.emitMOV_Reg_RegDisp (T0, JTOC, VM_Entrypoints.fieldOffsetsOffset); // T0 is fieldOffsets table asm.emitMOV_Reg_RegDisp (T0, T0, offset); // T0 is offset in JTOC of static field, or 0 if field's class isn't loaded asm.emitCMP_Reg_Imm (T0, 0); // T0 ?= 0, is field's class loaded? VM_ForwardReference fr = asm.forwardJcc(asm.NE); // if so, skip 3 instructions int classId = fieldRef.getDeclaringClass().getDictionaryId(); asm.emitPUSH_Imm(classId); // pass an indirect pointer to field's class genParameterRegisterLoad(1); // pass 1 parameter word asm.emitCALL_RegDisp(JTOC, VM_Entrypoints.loadClassOnDemandOffset); // load field's class asm.emitJMP_Imm (retryLabel); // reload T0 fr.resolve(asm); // comefrom if (fieldRef.getSize() == 4) { // field is one word asm.emitPOP_RegIdx(JTOC, T0, asm.BYTE, 0); } else { // field is two words (double or long) if (VM.VerifyAssertions) VM.assert(fieldRef.getSize() == 8); // TODO!! use 8-byte move if possible asm.emitPOP_RegIdx(JTOC, T0, asm.BYTE, 0); // store low part asm.emitPOP_RegIdx(JTOC, T0, asm.BYTE, WORDSIZE); // store high part } } else { fieldRef = fieldRef.resolve(); int fieldOffset = fieldRef.getOffset(); if (fieldRef.getSize() == 4) { // field is one word asm.emitPOP_RegDisp(JTOC, fieldOffset); } else { // field is two words (double or long) if (VM.VerifyAssertions) VM.assert(fieldRef.getSize() == 8); if (fieldRef.isVolatile() && VM.BuildForStrongVolatileSemantics) { asm.emitMOV_Reg_RegDisp (T0, JTOC, VM_Entrypoints.doublewordVolatileMutexOffset); asm.emitPUSH_Reg (T0); asm.emitMOV_Reg_RegDisp (S0, T0, OBJECT_TIB_OFFSET); asm.emitCALL_RegDisp (S0, VM_Entrypoints.processorLockOffset); } // TODO!! use 8-byte move if possible asm.emitPOP_RegDisp(JTOC, fieldOffset); // store low part asm.emitPOP_RegDisp(JTOC, fieldOffset+WORDSIZE); // store high part if (fieldRef.isVolatile() && VM.BuildForStrongVolatileSemantics) { asm.emitMOV_Reg_RegDisp (T0, JTOC, VM_Entrypoints.doublewordVolatileMutexOffset); asm.emitPUSH_Reg (T0); asm.emitMOV_Reg_RegDisp (S0, T0, OBJECT_TIB_OFFSET); asm.emitCALL_RegDisp (S0, VM_Entrypoints.processorUnlockOffset); } } } break; } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/52ec29e913fb517353c049d49bf3e233c8f33506/VM_Compiler.java/buggy/rvm/src/vm/arch/intel/compilers/baseline/VM_Compiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
727,
8251,
67,
6981,
1085,
3157,
1085,
261,
474,
7743,
30793,
16,
8251,
67,
1305,
707,
13,
288,
565,
1748,
10313,
1195,
288,
1377,
368,
2660,
8548,
866,
1744,
7322,
2660,
8548,
1377... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
8251,
67,
6981,
1085,
3157,
1085,
261,
474,
7743,
30793,
16,
8251,
67,
1305,
707,
13,
288,
565,
1748,
10313,
1195,
288,
1377,
368,
2660,
8548,
866,
1744,
7322,
2660,
8548,
1377... |
public void readFromRegistry() { ActionSetRegistryReader reader = new ActionSetRegistryReader(); reader.readRegistry(Platform.getExtensionRegistry(), this); | private void readFromRegistry() { IExtension[] extensions = getActionSetExtensionPoint().getExtensions(); for (int i = 0; i < extensions.length; i++) { addActionSets(PlatformUI.getWorkbench().getExtensionTracker(), extensions[i]); } | public void readFromRegistry() { ActionSetRegistryReader reader = new ActionSetRegistryReader(); reader.readRegistry(Platform.getExtensionRegistry(), this); ActionSetPartAssociationsReader assocReader = new ActionSetPartAssociationsReader(); assocReader.readRegistry(Platform.getExtensionRegistry(), this); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/b97ada8a49178173d33f907e1eb89e1b33e5ddcd/ActionSetRegistry.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ActionSetRegistry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
20876,
4243,
1435,
288,
3639,
4382,
694,
4243,
2514,
2949,
273,
394,
4382,
694,
4243,
2514,
5621,
3639,
2949,
18,
896,
4243,
12,
8201,
18,
588,
3625,
4243,
9334,
333,
1769,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20876,
4243,
1435,
288,
3639,
4382,
694,
4243,
2514,
2949,
273,
394,
4382,
694,
4243,
2514,
5621,
3639,
2949,
18,
896,
4243,
12,
8201,
18,
588,
3625,
4243,
9334,
333,
1769,
363... |
String filename_cml = "data/cml/1CKV.cml"; | String filename_cml = "data/cml/1CKV_1.cml"; | public void testSFBug1085912_1() throws Exception { String filename_pdb = "data/pdb/1CKV.pdb"; String filename_cml = "data/cml/1CKV.cml"; InputStream ins1 = this.getClass().getClassLoader().getResourceAsStream(filename_pdb); InputStream ins2 = this.getClass().getClassLoader().getResourceAsStream(filename_cml); try { /*1*/ IChemObjectReader reader = new PDBReader(ins1); IChemFile chemFile = (IChemFile) reader.read(new NNChemFile()); IChemSequence seq = chemFile.getChemSequence(0); IChemModel model = seq.getChemModel(0); IAtomContainer container = model.getMoleculeSet().getMolecule(0); IBioPolymer polymer = (IBioPolymer)container; PDBPolymer moleculePDB1 = (PDBPolymer)polymer; StringWriter writer = new StringWriter(); CMLWriter cmlWriter = new CMLWriter(writer); cmlWriter.write(moleculePDB1); String cmlContent1 = writer.toString(); /*2*/ CMLReader reader2 = new CMLReader(new ByteArrayInputStream(cmlContent1.getBytes())); IChemFile chemFil2 = (IChemFile)reader2.read(new NNChemFile()); IChemSequence seq2 = chemFil2.getChemSequence(0); IChemModel model2 = seq2.getChemModel(0); IMolecule container2 = model2.getMoleculeSet().getMolecule(0); IBioPolymer polymer2 = (IBioPolymer)container2; PDBPolymer moleculePDB2 = (PDBPolymer)polymer2; StringWriter writer2 = new StringWriter(); CMLWriter cmlWriter2 = new CMLWriter(writer2); cmlWriter2.write(moleculePDB2); String cmlContent2 = writer2.toString(); /*3*/ CMLReader reader3 = new CMLReader(ins2); IChemFile chemFil3 = (IChemFile)reader3.read(new NNChemFile()); IChemSequence seq3 = chemFil3.getChemSequence(0); IChemModel model3 = seq3.getChemModel(0); IAtomContainer container3 = model3.getMoleculeSet().getMolecule(0); IBioPolymer polymer3 = (IBioPolymer)container3; PDBPolymer moleculePDB3 = (PDBPolymer)polymer3; StringWriter writer3 = new StringWriter(); CMLWriter cmlWriter3 = new CMLWriter(writer3); cmlWriter3.write(moleculePDB3); String cmlContent3 = writer3.toString(); assertEquals(cmlContent1,cmlContent2); assertEquals(cmlContent3,cmlContent2); assertEquals(moleculePDB1,moleculePDB2); for(int i = 0; i < moleculePDB2.getAtomCount() ; i++) assertEquals(((PDBAtom)moleculePDB1.getAtom(i)).getResName(),((PDBAtom)moleculePDB2.getAtom(i)).getResName()); } catch (Exception ex) { fail(ex.getMessage()); } } | 45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/2a939a94486794ee0ca07c58f450714250d67e84/CML2Test.java/buggy/src/org/openscience/cdk/test/io/cml/CML2Test.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
22395,
19865,
21770,
6162,
2138,
67,
21,
1435,
1216,
1185,
288,
202,
202,
780,
1544,
67,
17414,
273,
315,
892,
19,
17414,
19,
21,
3507,
58,
18,
17414,
14432,
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,
918,
1842,
22395,
19865,
21770,
6162,
2138,
67,
21,
1435,
1216,
1185,
288,
202,
202,
780,
1544,
67,
17414,
273,
315,
892,
19,
17414,
19,
21,
3507,
58,
18,
17414,
14432,
202,
2... |
System.getProperties().put(LocationManager.PROP_INSTANCE_AREA, arg); | FrameworkProperties.setProperty(LocationManager.PROP_INSTANCE_AREA, arg); | private static String[] processCommandLine(String[] args) throws Exception { EclipseEnvironmentInfo.setAllArgs(args); if (args.length == 0) { EclipseEnvironmentInfo.setFrameworkArgs(args); EclipseEnvironmentInfo.setAllArgs(args); return args; } int[] configArgs = new int[args.length]; configArgs[0] = -1; // need to initialize the first element to something that could not be an index. int configArgIndex = 0; for (int i = 0; i < args.length; i++) { boolean found = false; // check for args without parameters (i.e., a flag arg) // check if debug should be enabled for the entire platform // If this is the last arg or there is a following arg (i.e., arg+1 has a leading -), // simply enable debug. Otherwise, assume that that the following arg is // actually the filename of an options file. This will be processed below. if (args[i].equalsIgnoreCase(DEBUG) && ((i + 1 == args.length) || ((i + 1 < args.length) && (args[i + 1].startsWith("-"))))) { //$NON-NLS-1$ System.getProperties().put(PROP_DEBUG, ""); //$NON-NLS-1$ debug = true; found = true; } // check if development mode should be enabled for the entire platform // If this is the last arg or there is a following arg (i.e., arg+1 has a leading -), // simply enable development mode. Otherwise, assume that that the following arg is // actually some additional development time class path entries. This will be processed below. if (args[i].equalsIgnoreCase(DEV) && ((i + 1 == args.length) || ((i + 1 < args.length) && (args[i + 1].startsWith("-"))))) { //$NON-NLS-1$ System.getProperties().put(PROP_DEV, ""); //$NON-NLS-1$ found = true; } // look for the initialization arg if (args[i].equalsIgnoreCase(INITIALIZE)) { initialize = true; found = true; } // look for the clean flag. if (args[i].equalsIgnoreCase(CLEAN)) { System.getProperties().put(PROP_CLEAN, "true"); //$NON-NLS-1$ found = true; } // look for the consoleLog flag if (args[i].equalsIgnoreCase(CONSOLE_LOG)) { System.getProperties().put(PROP_CONSOLE_LOG, "true"); //$NON-NLS-1$ found = true; } // look for the console with no port. if (args[i].equalsIgnoreCase(CONSOLE) && ((i + 1 == args.length) || ((i + 1 < args.length) && (args[i + 1].startsWith("-"))))) { //$NON-NLS-1$ System.getProperties().put(PROP_CONSOLE, ""); //$NON-NLS-1$ found = true; } if (args[i].equalsIgnoreCase(NOEXIT)) { System.getProperties().put(PROP_NOSHUTDOWN, "true"); //$NON-NLS-1$ found = true; } if (found) { configArgs[configArgIndex++] = i; continue; } // check for args with parameters. If we are at the last argument or if the next one // has a '-' as the first character, then we can't have an arg with a parm so continue. if (i == args.length - 1 || args[i + 1].startsWith("-")) { //$NON-NLS-1$ continue; } String arg = args[++i]; // look for the console and port. if (args[i - 1].equalsIgnoreCase(CONSOLE)) { System.getProperties().put(PROP_CONSOLE, arg); found = true; } // look for the configuration location . if (args[i - 1].equalsIgnoreCase(CONFIGURATION)) { System.getProperties().put(LocationManager.PROP_CONFIG_AREA, arg); found = true; } // look for the data location for this instance. if (args[i - 1].equalsIgnoreCase(DATA)) { System.getProperties().put(LocationManager.PROP_INSTANCE_AREA, arg); found = true; } // look for the user location for this instance. if (args[i - 1].equalsIgnoreCase(USER)) { System.getProperties().put(LocationManager.PROP_USER_AREA, arg); found = true; } // look for the development mode and class path entries. if (args[i - 1].equalsIgnoreCase(DEV)) { System.getProperties().put(PROP_DEV, arg); found = true; } // look for the debug mode and option file location. if (args[i - 1].equalsIgnoreCase(DEBUG)) { System.getProperties().put(PROP_DEBUG, arg); debug = true; found = true; } // look for the window system. if (args[i - 1].equalsIgnoreCase(WS)) { System.getProperties().put(PROP_WS, arg); found = true; } // look for the operating system if (args[i - 1].equalsIgnoreCase(OS)) { System.getProperties().put(PROP_OS, arg); found = true; } // look for the system architecture if (args[i - 1].equalsIgnoreCase(ARCH)) { System.getProperties().put(PROP_ARCH, arg); found = true; } // look for the nationality/language if (args[i - 1].equalsIgnoreCase(NL)) { System.getProperties().put(PROP_NL, arg); found = true; } // done checking for args. Remember where an arg was found if (found) { configArgs[configArgIndex++] = i - 1; configArgs[configArgIndex++] = i; } } // remove all the arguments consumed by this argument parsing if (configArgIndex == 0) { EclipseEnvironmentInfo.setFrameworkArgs(new String[0]); EclipseEnvironmentInfo.setAppArgs(args); return args; } String[] appArgs = new String[args.length - configArgIndex]; String[] frameworkArgs = new String[configArgIndex]; configArgIndex = 0; int j = 0; int k = 0; for (int i = 0; i < args.length; i++) { if (i == configArgs[configArgIndex]) { frameworkArgs[k++] = args[i]; configArgIndex++; } else appArgs[j++] = args[i]; } EclipseEnvironmentInfo.setFrameworkArgs(frameworkArgs); EclipseEnvironmentInfo.setAppArgs(appArgs); return appArgs; } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/795e339493dd76d146d62fd4fd2526e831c650bd/EclipseStarter.java/buggy/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
514,
8526,
1207,
21391,
12,
780,
8526,
833,
13,
1216,
1185,
288,
202,
202,
23057,
10472,
5494,
966,
18,
542,
1595,
2615,
12,
1968,
1769,
202,
202,
430,
261,
1968,
18,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
514,
8526,
1207,
21391,
12,
780,
8526,
833,
13,
1216,
1185,
288,
202,
202,
23057,
10472,
5494,
966,
18,
542,
1595,
2615,
12,
1968,
1769,
202,
202,
430,
261,
1968,
18,
24... |
MemberEntry me = new MemberEntry(pd.getWebsite().getHandle(), pd.getUser().getUserName(), getUrlPrefix()); me.setPermission(maskToString(pd.getPermissionMask())); | if (pd == null) { throw new NullPointerException("ERROR: Null permission data not allowed"); } MemberEntry me = new MemberEntry(pd.getWebsite().getHandle(), pd.getUser().getUserName(), getUrlPrefix()); me.setPermission(maskToString(pd.getPermissionMask())); | private MemberEntry toMemberEntry(PermissionsData pd) { MemberEntry me = new MemberEntry(pd.getWebsite().getHandle(), pd.getUser().getUserName(), getUrlPrefix()); me.setPermission(maskToString(pd.getPermissionMask())); return me; } | 46431 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46431/eaebdd5c7cdc38fa5ae99dfde71ea15c5592adde/RollerMemberHandler.java/clean/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerMemberHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
8596,
1622,
358,
4419,
1622,
12,
6521,
751,
4863,
13,
288,
3639,
8596,
1622,
1791,
273,
394,
8596,
1622,
12,
22353,
18,
588,
19186,
7675,
588,
3259,
9334,
4863,
18,
588,
1299,
7675,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8596,
1622,
358,
4419,
1622,
12,
6521,
751,
4863,
13,
288,
3639,
8596,
1622,
1791,
273,
394,
8596,
1622,
12,
22353,
18,
588,
19186,
7675,
588,
3259,
9334,
4863,
18,
588,
1299,
7675,... |
method.releaseConnection(); | getMethod.releaseConnection(); | private GetMethod connectInternal(String serverURL) throws LoginException, IOException { WebClientUtil.setupHttpClient(httpClient, proxy, serverURL, htAuthUser, htAuthPass); // httpClient.getParams().setParameter("http.socket.timeout", new // Integer(CONNECT_TIMEOUT)); for (int attempt = 0; attempt < 2; attempt++) { // force authentication if (!authenticated && hasAuthenticationCredentials()) { authenticate(); } GetMethod method = new GetMethod(WebClientUtil.getRequestPath(serverURL)); method.getParams().setSoTimeout(CONNECT_TIMEOUT); method.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset="+characterEncoding); // NOTE! Setting browser compatability breaks Bugzilla // authentication // method.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY); int code; try { code = httpClient.executeMethod(method); } catch (IOException e) { method.releaseConnection(); throw e; } if (code == HttpURLConnection.HTTP_OK) { return method; } else if (code == HttpURLConnection.HTTP_UNAUTHORIZED || code == HttpURLConnection.HTTP_FORBIDDEN) { // login or reauthenticate due to an expired session method.releaseConnection(); authenticated = false; authenticate(); } else { throw new IOException("HttpClient connection error response code: "+code); } } throw new LoginException( "All attempts to connect failed. Please verify connection and authentication information."); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/5e7b10b3a07af4df56025d47f868e5b480be17be/BugzillaClient.java/buggy/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
968,
1305,
3077,
3061,
12,
780,
1438,
1785,
13,
1216,
11744,
503,
16,
1860,
288,
202,
202,
4079,
1227,
1304,
18,
8401,
11895,
12,
2505,
1227,
16,
2889,
16,
1438,
1785,
16,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
968,
1305,
3077,
3061,
12,
780,
1438,
1785,
13,
1216,
11744,
503,
16,
1860,
288,
202,
202,
4079,
1227,
1304,
18,
8401,
11895,
12,
2505,
1227,
16,
2889,
16,
1438,
1785,
16,
14... |
if (action == null) | if (action == null) { | public ActionHandler(final IAction action) { if (action == null) throw new NullPointerException(); this.action = action; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/391f2606b4ea2c1fb5052d938ca90877ee7631f6/ActionHandler.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/commands/ActionHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4382,
1503,
12,
6385,
467,
1803,
1301,
13,
288,
202,
202,
430,
261,
1128,
422,
446,
13,
1082,
202,
12849,
394,
10108,
5621,
202,
202,
2211,
18,
1128,
273,
1301,
31,
202,
97,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
4382,
1503,
12,
6385,
467,
1803,
1301,
13,
288,
202,
202,
430,
261,
1128,
422,
446,
13,
1082,
202,
12849,
394,
10108,
5621,
202,
202,
2211,
18,
1128,
273,
1301,
31,
202,
97,
... |
setErrorMessage("Insufficient privileges to change topic settings"); | setErrorMessage(getResourceBundleString(INSUFFICIENT_PRIVILEGES_NEW_TOPIC)); | public String processActionSaveTopicAsDraft() { LOG.debug("processActionSaveTopicAsDraft()"); if(selectedTopic!=null && selectedTopic.getTopic()!=null && (selectedTopic.getTopic().getShortDescription()!=null) && (selectedTopic.getTopic().getShortDescription().length() > 255)) { setErrorMessage(getResourceBundleString(SHORT_DESC_TOO_LONG)); return null; } setPermissionMode(PERMISSION_MODE_TOPIC); if(selectedTopic!=null && selectedTopic.getTopic()!=null && (selectedTopic.getTopic().getTitle()==null ||selectedTopic.getTopic().getTitle().trim().length()<1 )) { setErrorMessage("Please enter a valid topic title"); return TOPIC_SETTING_REVISE; } if(!uiPermissionsManager.isChangeSettings(selectedTopic.getTopic(),selectedForum.getForum())) { setErrorMessage("Insufficient privileges to change topic settings"); return MAIN; } saveTopicSettings(true); reset(); return MAIN; } | 52248 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52248/daf96dee19a568b9d9699beb307fd7e9e3f46696/DiscussionForumTool.java/clean/messageforums-app/src/java/org/sakaiproject/tool/messageforums/DiscussionForumTool.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
1207,
1803,
4755,
6657,
1463,
12714,
1435,
225,
288,
565,
2018,
18,
4148,
2932,
2567,
1803,
4755,
6657,
1463,
12714,
1435,
8863,
3639,
309,
12,
8109,
6657,
5,
33,
2011,
597,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
1207,
1803,
4755,
6657,
1463,
12714,
1435,
225,
288,
565,
2018,
18,
4148,
2932,
2567,
1803,
4755,
6657,
1463,
12714,
1435,
8863,
3639,
309,
12,
8109,
6657,
5,
33,
2011,
597,
31... |
variables.put("context", this); variables.put("systemScope", System.getProperties()); } | variables.put("context",this); try { variables.put("systemScope", System.getProperties() ); } catch (SecurityException e) { } } | private void init() { variables.put("context", this); variables.put("systemScope", System.getProperties()); } | 51800 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51800/7d784d3480076741b09048578af8fe5cee821556/JellyContext.java/clean/src/java/org/apache/commons/jelly/JellyContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
1435,
288,
3639,
3152,
18,
458,
2932,
2472,
3113,
333,
1769,
3639,
3152,
18,
458,
2932,
4299,
3876,
3113,
2332,
18,
588,
2297,
10663,
565,
289,
377,
2,
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,
377,
3238,
918,
1208,
1435,
288,
3639,
3152,
18,
458,
2932,
2472,
3113,
333,
1769,
3639,
3152,
18,
458,
2932,
4299,
3876,
3113,
2332,
18,
588,
2297,
10663,
565,
289,
377,
2,
-100,
-100,
-100,
... |
IWorkbenchWindow window = WorkbenchPlugin .getDefault() .getWorkbench() .getActiveWorkbenchWindow(); | IWorkbenchWindow window = WorkbenchPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow(); | public void done(IJobChangeEvent event) { JobInfo info = getJobInfo(event.getJob()); if (event.getResult().getSeverity() == IStatus.ERROR) { info.setError(event.getResult()); UIJob job = new UIJob(ProgressMessages.getString("JobProgressManager.OpenProgressJob")) {//$NON-NLS-1$ /* (non-Javadoc) * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor) */ public IStatus runInUIThread(IProgressMonitor monitor) { IWorkbenchWindow window = WorkbenchPlugin .getDefault() .getWorkbench() .getActiveWorkbenchWindow(); if (window == null) return Status.CANCEL_STATUS; ProgressUtil.openProgressView(window); return Status.OK_STATUS; } }; job.schedule(); refresh(info); } else { jobs.remove(event.getJob()); //Only refresh if we are showing it remove(info); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/1a9cecd63f2d83ca30cee9aec5659bf7c2b3803d/JobProgressManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobProgressManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2731,
12,
45,
2278,
20930,
871,
13,
288,
202,
202,
2278,
966,
1123,
273,
13024,
966,
12,
2575,
18,
588,
2278,
10663,
202,
202,
430,
261,
2575,
18,
588,
1253,
7675,
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,
225,
202,
482,
918,
2731,
12,
45,
2278,
20930,
871,
13,
288,
202,
202,
2278,
966,
1123,
273,
13024,
966,
12,
2575,
18,
588,
2278,
10663,
202,
202,
430,
261,
2575,
18,
588,
1253,
7675,
588,
... |
public BranchGroup createSceneGraph(float baz, float ang) { BranchGroup objRoot = new BranchGroup(); BranchGroup Axes = new Axis().getAxisBG(); BranchGroup Surface = new Axis().getSurfaceBG(); BranchGroup Motion = new MotionVector(baz,ang).getMotionBG(); BranchGroup Trace = new Traces(baz,ang).getTraceBG(); Transform3D rotateX = new Transform3D(); Transform3D rotateY = new Transform3D(); Transform3D rotateZ = new Transform3D(); double zRotation = 90.0d; double xRotation = -135.0d; double yRotation = -45.0d; rotateX.rotX(Math.toRadians(xRotation)); rotateZ.rotZ(Math.toRadians(zRotation)); rotateY.rotY(Math.toRadians(yRotation)); Transform3D rotate = new Transform3D(); Transform3D shift = new Transform3D(); Transform3D scale = new Transform3D(); Transform3D PlaceCoordSystem = new Transform3D(); rotate.mul(rotateZ); rotate.mul(rotateY); rotate.mul(rotateX); scale.setScale(0.5d); shift.setTranslation(new Vector3f(0.0f,0.4f,0.00f)); PlaceCoordSystem.mul(shift); PlaceCoordSystem.mul(rotate); PlaceCoordSystem.mul(scale); Transform3D SurfShift = new Transform3D(); SurfShift.setTranslation(new Vector3f(0.0f,0.36f,0.00f)); Transform3D PlaceSurface = new Transform3D(); PlaceSurface.mul(SurfShift); PlaceSurface.mul(rotate); PlaceSurface.mul(scale); /* Text is placed in the global coordinate sytem at locations transformed by the PlaceCoordSystem object. This keeps them facing the viewer, but in the proper location. */ Point3f textpt = new Point3f(1.0f,0.0f,0.0f); PlaceCoordSystem.transform(textpt); Text2D up = new Text2D("Up", textpt, new Color3f(1.0f, 0f, 0.0f), "Helvetica", 16, Font.BOLD); objRoot.addChild(up); textpt = new Point3f(-1.2f,0.0f,0.0f); PlaceCoordSystem.transform(textpt); Text2D down = new Text2D("Down", textpt, new Color3f(1.0f, 0f, 0.0f), "Helvetica", 16, Font.BOLD); objRoot.addChild(down); textpt = new Point3f(0.0f,1.2f,0.0f); PlaceCoordSystem.transform(textpt); Text2D east = new Text2D("East", textpt, new Color3f(0f, 1.0f, 0.2f), "Helvetica", 16, Font.BOLD); objRoot.addChild(east); textpt = new Point3f(0.0f,-1.2f,0.2f); PlaceCoordSystem.transform(textpt); Text2D west = new Text2D("West", textpt, new Color3f(0f, 1.0f, 0.0f), "Helvetica", 16, Font.BOLD); objRoot.addChild(west); textpt = new Point3f(0.0f,0.0f,1.1f); PlaceCoordSystem.transform(textpt); Text2D north = new Text2D("North", textpt, new Color3f(0f, 0f, 1.0f), "Helvetica", 16, Font.BOLD); objRoot.addChild(north); textpt = new Point3f(0.0f,0.0f,-1.2f); PlaceCoordSystem.transform(textpt); Text2D south = new Text2D("South", textpt, new Color3f(0f, 0f, 1.0f), "Helvetica", 16, Font.BOLD); objRoot.addChild(south); textpt = new Point3f(-1.2f,-1.4f,-1.0f); Text2D caption = new Text2D("Press and Hold any key to start animation", textpt, new Color3f(0f, 0f, 0.0f), "TimesRoman", 24, Font.BOLD); objRoot.addChild(caption); /* Set up the animation of the traces */ Alpha alpha = new Alpha(-1, 4000); TransformGroup ZsingAlong = new TransformGroup(); Transform3D ZaxisOfPos = new Transform3D(); ZaxisOfPos.set(new Vector3f(1.0f,0.0f,0.0f)); ZsingAlong.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); TransformGroup NsingAlong = new TransformGroup(); Transform3D NaxisOfPos = new Transform3D(); NaxisOfPos.set(new Vector3f(1.0f,0.0f,0.0f)); NsingAlong.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); TransformGroup EsingAlong = new TransformGroup(); Transform3D EaxisOfPos = new Transform3D(); EaxisOfPos.set(new Vector3f(1.0f,0.0f,0.0f)); EsingAlong.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); int nknots = new Traces(baz,ang).getNumberOfPoints(); Point3f zSing[] = new Point3f[nknots]; Point3f eSing[] = new Point3f[nknots]; Point3f nSing[] = new Point3f[nknots]; float knots[] = new float[nknots]; float zknots[] = new float[nknots]; float knotInc = 1.0f/(nknots-1); int i = 0; while (i < nknots) { knots[i] = i*knotInc; zknots[i] = i*knotInc; i++; } new Traces(baz,ang).getSingAlongPoints(zSing,nSing,eSing); //System.out.println("before tjo interpolator"); tjoInterpolator nSinger = new tjoInterpolator(alpha, NsingAlong, NaxisOfPos, knots, nSing); //System.out.println("after tjo interpolator"); nSinger.setSchedulingBounds(new BoundingSphere()); //System.out.println("after set scheduling bounds"); //System.out.println("before tjo interpolator"); tjoInterpolator eSinger = new tjoInterpolator(alpha, EsingAlong, EaxisOfPos, knots, eSing); //System.out.println("after tjo interpolator"); eSinger.setSchedulingBounds(new BoundingSphere()); //System.out.println("after set scheduling bounds"); //System.out.println("before tjo interpolator"); tjoInterpolator zSinger = new tjoInterpolator(alpha, ZsingAlong, ZaxisOfPos, knots, zSing); //System.out.println("after tjo interpolator"); zSinger.setSchedulingBounds(new BoundingSphere()); //System.out.println("after set scheduling bounds"); int GMknots = 41; Point3f GMpoints[] = new Point3f[41]; Point3f GMzOnly[] = new Point3f[41]; Point3f GMeOnly[] = new Point3f[41]; Point3f GMnOnly[] = new Point3f[41]; new MotionVector(baz,ang).getMotionPoints(GMpoints); float gknots[] = new float[GMknots]; float gnotInc = 1.0f/(GMknots-1); i = 0; while (i < GMknots) { gknots[i] = i*gnotInc; // //System.out.println("GM " + i + " " + GMpoints[i]); float t[] = new float[3]; GMpoints[i].get(t); GMzOnly[i]=new Point3f(t[0],0.0f,0.0f); GMeOnly[i]=new Point3f(0.0f,t[1],0.0f); GMnOnly[i]=new Point3f(0.0f,0.0f,t[2]); PlaceCoordSystem.transform(GMpoints[i]); PlaceCoordSystem.transform(GMzOnly[i]); PlaceCoordSystem.transform(GMeOnly[i]); PlaceCoordSystem.transform(GMnOnly[i]); i++; } TransformGroup GMsingAlong = new TransformGroup(); GMsingAlong.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); TransformGroup GMzOnly_singAlong = new TransformGroup(); GMzOnly_singAlong.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); TransformGroup GMnOnly_singAlong = new TransformGroup(); GMnOnly_singAlong.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); TransformGroup GMeOnly_singAlong = new TransformGroup(); GMeOnly_singAlong.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); Transform3D GMaxisOfPos = new Transform3D(); GMaxisOfPos.set(new Vector3f(0.0f,1.0f,0.0f)); tjoInterpolator gmSinger = new tjoInterpolator(alpha, GMsingAlong, GMaxisOfPos, gknots, GMpoints); gmSinger.setSchedulingBounds(new BoundingSphere()); tjoInterpolator gmZonlySinger = new tjoInterpolator(alpha, GMzOnly_singAlong, GMaxisOfPos, gknots, GMzOnly); gmZonlySinger.setSchedulingBounds(new BoundingSphere()); tjoInterpolator gmNonlySinger = new tjoInterpolator(alpha, GMnOnly_singAlong, GMaxisOfPos, gknots, GMnOnly); gmNonlySinger.setSchedulingBounds(new BoundingSphere()); tjoInterpolator gmEonlySinger = new tjoInterpolator(alpha, GMeOnly_singAlong, GMaxisOfPos, gknots, GMeOnly); gmEonlySinger.setSchedulingBounds(new BoundingSphere()); TransformGroup objPlace3D = new TransformGroup(PlaceCoordSystem); TransformGroup objPlaceSurf = new TransformGroup(PlaceSurface); Background background = new Background(); background.setColor(0.6f, 0.6f, 0.6f); background.setApplicationBounds(new BoundingSphere()); objRoot.addChild(background); objPlace3D.addChild(Axes); objPlace3D.addChild(Motion); objRoot.addChild(objPlace3D); objPlaceSurf.addChild(Surface); objRoot.addChild(objPlaceSurf); /* objPlaceAxesText.addChild(AxesText); objRoot.addChild(objPlaceAxesText); */ objRoot.addChild(Trace); objRoot.addChild(ZsingAlong); objRoot.addChild(zSinger); Appearance zSphere = new Appearance(); ColoringAttributes zCA = new ColoringAttributes(); zCA.setColor(1.0f,0.0f,0.0f); zSphere.setColoringAttributes(zCA); ZsingAlong.addChild(new Sphere(0.02f,zSphere)); objRoot.addChild(NsingAlong); objRoot.addChild(nSinger); Appearance nSphere = new Appearance(); ColoringAttributes nCA = new ColoringAttributes(); nCA.setColor(0.0f,0.0f,1.0f); nSphere.setColoringAttributes(nCA); NsingAlong.addChild(new Sphere(0.02f,nSphere)); objRoot.addChild(EsingAlong); objRoot.addChild(eSinger); Appearance eSphere = new Appearance(); ColoringAttributes eCA = new ColoringAttributes(); eCA.setColor(0.0f,1.0f,0.0f); eSphere.setColoringAttributes(eCA); EsingAlong.addChild(new Sphere(0.02f,eSphere)); objRoot.addChild(GMzOnly_singAlong); objRoot.addChild(gmZonlySinger); Appearance gmZonlySphere = new Appearance(); ColoringAttributes gmZonlyCA = new ColoringAttributes(); gmZonlyCA.setColor(1.0f,0.0f,0.0f); gmZonlySphere.setColoringAttributes(gmZonlyCA); GMzOnly_singAlong.addChild(new Sphere(0.015f,gmZonlySphere)); objRoot.addChild(GMnOnly_singAlong); objRoot.addChild(gmNonlySinger); Appearance gmNonlySphere = new Appearance(); ColoringAttributes gmNonlyCA = new ColoringAttributes(); gmNonlyCA.setColor(0.0f,0.0f,1.0f); gmNonlySphere.setColoringAttributes(gmNonlyCA); GMnOnly_singAlong.addChild(new Sphere(0.015f,gmNonlySphere)); objRoot.addChild(GMeOnly_singAlong); objRoot.addChild(gmEonlySinger); Appearance gmEonlySphere = new Appearance(); ColoringAttributes gmEonlyCA = new ColoringAttributes(); gmEonlyCA.setColor(0.0f,1.0f,0.0f); gmEonlySphere.setColoringAttributes(gmEonlyCA); GMeOnly_singAlong.addChild(new Sphere(0.015f,gmEonlySphere)); objRoot.addChild(GMsingAlong); objRoot.addChild(gmSinger); Appearance gmSphere = new Appearance(); ColoringAttributes gmCA = new ColoringAttributes(); gmCA.setColor(0.4f,0.2f,0.2f); gmSphere.setColoringAttributes(gmCA); GMsingAlong.addChild(new Sphere(0.02f,gmSphere)); // Let Java 3D perform optimizations on this scene graph. objRoot.compile(); //System.out.println("returning from CreaetScene Graph"); return objRoot; } // end of CreateSceneGraph method | 52623 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52623/bfec18e620e46b8f8f851e49301adbf96206cd3b/PartMo.java/buggy/src/edu/sc/seis/fissuresUtil/parmo3d/PartMo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
7108,
1114,
2640,
14370,
4137,
12,
5659,
70,
1561,
16,
5659,
539,
15329,
7108,
1114,
2603,
2375,
33,
2704,
7108,
1114,
5621,
7108,
1114,
26494,
33,
2704,
6558,
7675,
588,
6558,
30098,
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,
1071,
7108,
1114,
2640,
14370,
4137,
12,
5659,
70,
1561,
16,
5659,
539,
15329,
7108,
1114,
2603,
2375,
33,
2704,
7108,
1114,
5621,
7108,
1114,
26494,
33,
2704,
6558,
7675,
588,
6558,
30098,
5621... | ||
public void removePersistentFormComponentValues(final boolean disablePersistence) { // The persistence manager responsible to persist and retrieve // FormComponent data final IValuePersister persister = getValuePersister(); // Search for FormComponents like TextField etc. visitFormComponents(new FormComponent.IVisitor() { public void formComponent(final FormComponent formComponent) { if(formComponent.isVisibleInHierarchy()) { // remove the FormComponent's persisted data persister.clear(formComponent); // Disable persistence if requested. Leave unchanged otherwise. if (formComponent.isPersistent() && disablePersistence) { formComponent.setPersistent(false); } } } }); } | 46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/c3f613a1d24372f28bec4bb387a13fae21585bed/Form.java/clean/wicket/src/java/wicket/markup/html/form/Form.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1206,
11906,
1204,
1841,
1972,
12,
6385,
1250,
4056,
13182,
13,
202,
95,
202,
202,
759,
1021,
9756,
3301,
14549,
358,
3898,
471,
4614,
202,
202,
759,
2748,
1841,
501,
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,
1206,
11906,
1204,
1841,
1972,
12,
6385,
1250,
4056,
13182,
13,
202,
95,
202,
202,
759,
1021,
9756,
3301,
14549,
358,
3898,
471,
4614,
202,
202,
759,
2748,
1841,
501,
202,
... | ||
synchronized( o2 ) | synchronized(o2) | public void run() { ResultSet rs = null; try { rs = stmt.executeQuery("SELECT * FROM #SAfe0003"); assertEquals(null, rs.getWarnings()); assertEquals(null, stmt.getWarnings()); // Synchronize all threads synchronized( o2 ) { synchronized( o1 ) { started++; o1.notify(); } try{ o2.wait(); } catch( InterruptedException e ) {} } assertNotNull("executeQuery should not return null", rs); assertTrue(rs.next()); assertTrue(rs.next()); assertTrue(!rs.next()); assertTrue(rs.previous()); assertTrue(rs.previous()); assertTrue(!rs.previous()); } catch( SQLException e ) { e.printStackTrace(); synchronized (o1) { failed = true; } fail("An SQL Exception occured: "+e); } finally { if( rs != null ) try{ rs.close(); } catch( SQLException e ) {} // Notify that we're done synchronized( o1 ) { done++; o1.notify(); } } } | 2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/d48066e24a9a4b4edf35b9545de98ba05acafd4d/SAfeTest.java/clean/src/test/net/sourceforge/jtds/test/SAfeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
918,
1086,
1435,
7734,
288,
10792,
10842,
3597,
273,
446,
31,
10792,
775,
10792,
288,
13491,
3597,
273,
3480,
18,
8837,
1138,
2932,
4803,
380,
4571,
468,
5233,
3030,
30770,
8863,
134... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1171,
1071,
918,
1086,
1435,
7734,
288,
10792,
10842,
3597,
273,
446,
31,
10792,
775,
10792,
288,
13491,
3597,
273,
3480,
18,
8837,
1138,
2932,
4803,
380,
4571,
468,
5233,
3030,
30770,
8863,
134... |
text = ""; | public String getText() { Node child; String text; // Find the Text nodes contained within this element and return their // concatenated value. Required to go around comments, entities, etc. child = getFirstChild(); text = ""; while ( child != null ) { if ( child instanceof Text ) text = text + ( (Text) child ).getData(); child = child.getNextSibling(); } return text; } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/aae682d9b194fe933388519c2a21dbeb697709ef/HTMLOptionElementImpl.java/buggy/src/org/apache/html/dom/HTMLOptionElementImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
6701,
1435,
565,
288,
3639,
2029,
565,
1151,
31,
3639,
514,
565,
977,
31,
7734,
368,
4163,
326,
3867,
2199,
7542,
3470,
333,
930,
471,
327,
3675,
3639,
368,
22080,
460,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
6701,
1435,
565,
288,
3639,
2029,
565,
1151,
31,
3639,
514,
565,
977,
31,
7734,
368,
4163,
326,
3867,
2199,
7542,
3470,
333,
930,
471,
327,
3675,
3639,
368,
22080,
460,
18,
1... | |
Set names = localAgents.keySet(); Iterator nameList = names.iterator(); while(nameList.hasNext()) { String name = (String)nameList.next(); | Set s = localAgents.keySet(); Object[] allLocalAgents = s.toArray(); for(int i = 0; i < allLocalAgents.length; i++) { String name = (String)allLocalAgents[i]; | public void shutDown() { // Deregister yourself as a container containers.remove(MAIN_CONTAINER_NAME); // Kill every other container Set s = containers.keySet(); Iterator i = s.iterator(); while(i.hasNext()) { String containerName = (String)i.next(); AgentContainer ac = (AgentContainer)containers.get(containerName); APKillContainer(ac); } // Kill all non-system agents Set names = localAgents.keySet(); Iterator nameList = names.iterator(); while(nameList.hasNext()) { String name = (String)nameList.next(); if(name.equalsIgnoreCase(theAMS.getLocalName()) || name.equalsIgnoreCase(theACC.getLocalName()) || name.equalsIgnoreCase(defaultDF.getLocalName())) continue; // Kill agent and wait for its termination Agent a = (Agent)localAgents.get(name); a.doDelete(); a.join(); } // Kill system agents, at last Agent systemAgent = defaultDF; systemAgent.doDelete(); systemAgent.join(); systemAgent = theACC; systemAgent.doDelete(); systemAgent.join(); theAMS.removeCommListener(this); systemAgent = theAMS; systemAgent.doDelete(); systemAgent.join(); // Now, close CORBA link to outside world myORB.disconnect(frontEndACC); } | 5505 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5505/75bbd47edb838914ce2cc8b5daf4d36a456bf229/AgentPlatformImpl.java/clean/src/jade/core/AgentPlatformImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
9171,
4164,
1435,
288,
565,
368,
22621,
3433,
2890,
487,
279,
1478,
565,
8475,
18,
4479,
12,
19803,
67,
21395,
67,
1985,
1769,
565,
368,
20520,
3614,
1308,
1478,
565,
1000,
272... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9171,
4164,
1435,
288,
565,
368,
22621,
3433,
2890,
487,
279,
1478,
565,
8475,
18,
4479,
12,
19803,
67,
21395,
67,
1985,
1769,
565,
368,
20520,
3614,
1308,
1478,
565,
1000,
272... |
ProductDefinitionConstants.LOANPRDFUNDSELECTEDLIST, request); | ProductDefinitionConstants.LOANPRDFUNDSELECTEDLIST, request); | public void testManage() throws Exception { loanOffering = createLoanOfferingBO("Loan Offering", "LOAN"); setRequestPathInfo("/loanproductaction.do"); addRequestParameter("method", "manage"); addRequestParameter("prdOfferingId", loanOffering.getPrdOfferingId() .toString()); addRequestParameter(Constants.CURRENTFLOWKEY, flowKey); actionPerform(); verifyNoActionErrors(); verifyNoActionMessages(); verifyForward(ActionForwards.manage_success.toString()); List<ProductCategoryBO> productCategories = (List<ProductCategoryBO>) SessionUtils .getAttribute( ProductDefinitionConstants.LOANPRODUCTCATEGORYLIST, request); assertEquals("The size of master data for categories", 1, productCategories.size()); for (ProductCategoryBO productCategory : productCategories) { assertNotNull(productCategory.getProductType()); } assertEquals("The size of applicable list", 2, ((List<MasterDataEntity>) SessionUtils.getAttribute( ProductDefinitionConstants.LOANAPPLFORLIST, request)) .size()); assertEquals("The size of grace period types list", 3, ((List<MasterDataEntity>) SessionUtils.getAttribute( ProductDefinitionConstants.LOANGRACEPERIODTYPELIST, request)).size()); assertEquals("The size of interest types list", 2, ((List<MasterDataEntity>) SessionUtils.getAttribute( ProductDefinitionConstants.INTERESTTYPESLIST, request)) .size()); assertEquals("The size of applicable list", 10, ((List<GLCodeEntity>) SessionUtils.getAttribute( ProductDefinitionConstants.LOANPRICIPALGLCODELIST, request)).size()); assertEquals("The size of applicable list", 3, ((List<GLCodeEntity>) SessionUtils.getAttribute( ProductDefinitionConstants.LOANINTERESTGLCODELIST, request)).size()); List<FundBO> funds = (List<FundBO>) SessionUtils.getAttribute( ProductDefinitionConstants.SRCFUNDSLIST, request); assertNotNull(funds); List<FeeView> fees = (List<FeeView>) SessionUtils.getAttribute( ProductDefinitionConstants.LOANFEESLIST, request); assertNull(fees); List<FeeBO> productFees = (List<FeeBO>) SessionUtils.getAttribute( ProductDefinitionConstants.LOANPRDFEE, request); assertNotNull(productFees); List<FeeView> selectedFees = (List<FeeView>) SessionUtils.getAttribute( ProductDefinitionConstants.LOANPRDFEESELECTEDLIST, request); assertNotNull(selectedFees); List<FundBO> selectedFunds = (List<FundBO>) SessionUtils.getAttribute( ProductDefinitionConstants.LOANPRDFUNDSELECTEDLIST, request); assertNotNull(selectedFunds); assertEquals("The size of applicable status list", 2, ((List<PrdStatusEntity>) SessionUtils.getAttribute( ProductDefinitionConstants.LOANPRDSTATUSLIST, request)) .size()); LoanPrdActionForm loanPrdActionForm = (LoanPrdActionForm) request .getSession().getAttribute( ProductDefinitionConstants.LOANPRODUCTACTIONFORM); assertNotNull(loanPrdActionForm); assertEquals(loanOffering.getPrdOfferingId().toString(), loanPrdActionForm.getPrdOfferingId()); assertEquals(loanOffering.getPrdOfferingName(), loanPrdActionForm .getPrdOfferingName()); assertEquals(loanOffering.getPrdOfferingShortName(), loanPrdActionForm .getPrdOfferingShortName()); assertEquals(loanOffering.getPrdCategory().getProductCategoryID() .toString(), loanPrdActionForm.getPrdCategory()); assertEquals(loanOffering.getPrdStatus().getOfferingStatusId() .toString(), loanPrdActionForm.getPrdStatus()); assertEquals(loanOffering.getPrdApplicableMaster().getId().toString(), loanPrdActionForm.getPrdApplicableMaster()); assertEquals(DateHelper.getUserLocaleDate(TestObjectFactory .getContext().getPereferedLocale(), DateHelper .toDatabaseFormat(loanOffering.getStartDate())), loanPrdActionForm.getStartDate()); if (loanOffering.getEndDate() != null) assertEquals(DateHelper.getUserLocaleDate(TestObjectFactory .getContext().getPereferedLocale(), DateHelper .toDatabaseFormat(loanOffering.getEndDate())), loanPrdActionForm.getEndDate()); else assertNull(loanPrdActionForm.getEndDate()); assertEquals(loanOffering.getDescription(), loanPrdActionForm .getDescription()); assertEquals(loanOffering.getGracePeriodType().getId().toString(), loanPrdActionForm.getGracePeriodType()); assertEquals(loanOffering.getGracePeriodDuration().toString(), loanPrdActionForm.getGracePeriodDuration()); assertEquals(loanOffering.getInterestTypes().getId().toString(), loanPrdActionForm.getInterestTypes()); assertEquals(loanOffering.getMaxLoanAmount().toString(), loanPrdActionForm.getMaxLoanAmount()); assertEquals(loanOffering.getMinLoanAmount().toString(), loanPrdActionForm.getMinLoanAmount()); assertEquals(loanOffering.getDefaultLoanAmount().toString(), loanPrdActionForm.getDefaultLoanAmount()); assertEquals(loanOffering.getMaxInterestRate().toString(), loanPrdActionForm.getMaxInterestRate()); assertEquals(loanOffering.getMinInterestRate().toString(), loanPrdActionForm.getMinInterestRate()); assertEquals(loanOffering.getDefInterestRate().toString(), loanPrdActionForm.getDefInterestRate()); assertEquals(loanOffering.getMaxNoInstallments().toString(), loanPrdActionForm.getMaxNoInstallments()); assertEquals(loanOffering.getMinNoInstallments().toString(), loanPrdActionForm.getMinNoInstallments()); assertEquals(loanOffering.getDefNoInstallments().toString(), loanPrdActionForm.getDefNoInstallments()); assertEquals(loanOffering.isIntDedDisbursement(), loanPrdActionForm .isIntDedAtDisbValue()); assertEquals(loanOffering.isPrinDueLastInst(), loanPrdActionForm .isPrinDueLastInstValue()); assertEquals(loanOffering.isIncludeInLoanCounter(), loanPrdActionForm .isLoanCounterValue()); assertEquals(loanOffering.getLoanOfferingMeeting().getMeeting() .getMeetingDetails().getRecurAfter().toString(), loanPrdActionForm.getRecurAfter()); assertEquals(loanOffering.getLoanOfferingMeeting().getMeeting() .getMeetingDetails().getRecurrenceType().getRecurrenceId() .toString(), loanPrdActionForm.getFreqOfInstallments()); assertEquals( loanOffering.getPrincipalGLcode().getGlcodeId().toString(), loanPrdActionForm.getPrincipalGLCode()); assertEquals(loanOffering.getInterestGLcode().getGlcodeId().toString(), loanPrdActionForm.getInterestGLCode()); assertEquals(loanOffering.getLoanOfferingFees().size(), (selectedFees).size()); assertEquals(loanOffering.getLoanOfferingFunds().size(), (selectedFunds).size()); } | 45468 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45468/27d3f3127db1733989f7a0951f74f29e6ece4da7/LoanPrdActionTest.java/buggy/mifos/test/org/mifos/application/productdefinition/struts/action/LoanPrdActionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
21258,
1435,
1216,
1185,
288,
202,
202,
383,
304,
17800,
273,
752,
1504,
304,
17800,
5315,
2932,
1504,
304,
25753,
310,
3113,
315,
1502,
1258,
8863,
202,
202,
542,
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,
918,
1842,
21258,
1435,
1216,
1185,
288,
202,
202,
383,
304,
17800,
273,
752,
1504,
304,
17800,
5315,
2932,
1504,
304,
25753,
310,
3113,
315,
1502,
1258,
8863,
202,
202,
542,
69... |
device.write(__img_border_0_a); | device.print("<img border=\"0\" align=\"middle\" src=\""); | protected void writePopup(final Device device, SPopupMenu menu) throws IOException { String componentId = menu.getName(); String popupId = componentId + "_pop"; device.write(__table_cellpadd); org.wings.plaf.Utils.write(device, popupId); device.write(__class_pdmenu_s); for (int i = 0; i < menu.getMenuComponentCount(); i++) { SComponent menuItem = menu.getMenuComponent(i); if (menuItem.isVisible()) { String itemComponentId = menu.getMenuComponent(i).getName(); String itemHookId = itemComponentId + "_hook"; device.write(__tr_id); org.wings.plaf.Utils.write(device, itemHookId); device.write(__); if (menu.getMenuComponent(i) instanceof SMenu) { if (menuItem.isEnabled()) { String itemParentId = popupId; String itemPopupId = itemComponentId + "_pop"; device.write(__onMouseDown_Me); org.wings.plaf.Utils.write(device, itemParentId); device.write(___1); org.wings.plaf.Utils.write(device, itemHookId); device.write(___1); org.wings.plaf.Utils.write(device, itemPopupId); device.write(___2); device.write(__class_menu); } else { device.write(__class_disabled); } } else { if (menuItem.isEnabled()) { if (menuItem instanceof SMenuItem) { device.write(__onClick_window); writeAnchorAddress(device, (SMenuItem) menuItem); device.write(___3); } device.write(__class_menuitem); } else { device.write(__class_disabled_1); } } device.write(__td); menu.getMenuComponent(i).write(device); device.write(__td_td); if (menu.getMenuComponent(i) instanceof SMenu) { device.write(__img_border_0_a); org.wings.plaf.Utils.write(device, RIGHT_ARROW.getURL()); device.write(__); org.wings.plaf.Utils.optAttribute(device, "width", RIGHT_ARROW.getIconWidth()); org.wings.plaf.Utils.optAttribute(device, "height", RIGHT_ARROW.getIconHeight()); device.write(___4); } device.write(__td_tr); } } device.write(__table); for (int i = 0; i < menu.getMenuComponentCount(); i++) { SComponent menuItem = menu.getMenuComponent(i); if (menuItem.isVisible() && menuItem.isEnabled() && menuItem instanceof SMenu) { writePopup(device, (SPopupMenu) menu.getMenuComponent(i)); } } } | 3911 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3911/49177f429a4513c3098d45a9fe8be3cd90b51ffa/PopupMenuCG.java/buggy/wings2/src/java/org/wings/plaf/css/PopupMenuCG.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1045,
13770,
12,
6385,
6077,
2346,
16,
348,
13770,
4599,
3824,
13,
5411,
1216,
1860,
288,
3639,
514,
29976,
273,
3824,
18,
17994,
5621,
3639,
514,
10431,
548,
273,
29976,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1045,
13770,
12,
6385,
6077,
2346,
16,
348,
13770,
4599,
3824,
13,
5411,
1216,
1860,
288,
3639,
514,
29976,
273,
3824,
18,
17994,
5621,
3639,
514,
10431,
548,
273,
29976,
397,
... |
if (eIsProxy()) return super.toString(); | if (eIsProxy()) return super.toString(); | public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (x: "); if (xESet) result.append(x); else result.append("<unset>"); result.append(", y: "); if (yESet) result.append(y); else result.append("<unset>"); result.append(')'); return result.toString(); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/LocationImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/LocationImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
3639,
309,
261,
73,
2520,
3886,
10756,
327,
2240,
18,
10492,
5621,
3639,
6674,
563,
273,
394,
6674,
12,
9565,
18,
10492,
10663,
3639,
563,
18,
6923,
2932,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
1762,
1435,
565,
288,
3639,
309,
261,
73,
2520,
3886,
10756,
327,
2240,
18,
10492,
5621,
3639,
6674,
563,
273,
394,
6674,
12,
9565,
18,
10492,
10663,
3639,
563,
18,
6923,
2932,... |
int count = 0; while (throwable != null) { count++; throwable = ExceptionUtils.getCause(throwable); } return count; | return getThrowableList(throwable).size(); | public static int getThrowableCount(Throwable throwable) { int count = 0; while (throwable != null) { count++; throwable = ExceptionUtils.getCause(throwable); } return count; } | 4554 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4554/a9f5a6b1886992b35795fe5a3388bcaa53a1df5a/ExceptionUtils.java/clean/src/java/org/apache/commons/lang/exception/ExceptionUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
336,
15155,
1380,
12,
15155,
10132,
13,
288,
3639,
509,
1056,
273,
374,
31,
3639,
1323,
261,
12849,
429,
480,
446,
13,
288,
5411,
1056,
9904,
31,
5411,
10132,
273,
1185,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
377,
1071,
760,
509,
336,
15155,
1380,
12,
15155,
10132,
13,
288,
3639,
509,
1056,
273,
374,
31,
3639,
1323,
261,
12849,
429,
480,
446,
13,
288,
5411,
1056,
9904,
31,
5411,
10132,
273,
1185,
... |
synchronized (obLock) { if (ob == null) { return; } ob.setCreated(false); flushBuffer(true); ob = null; } | flushBuffer(true); | public void close() throws Exception { synchronized (obLock) { if (ob == null) { return; } ob.setCreated(false); flushBuffer(true); ob = null; } // remove all listeners synchronized (sendLock) { for ( Iterator iter = listeners.values().iterator(); iter.hasNext(); ) { OutputListener ol = (OutputListener) iter.next(); if (ol instanceof URLOutputListenerAdapter) { try { ((URLOutputListenerAdapter) ol).close(); } catch (Exception e) { System.err.println(e); } } } listeners.clear(); } // wait for the streams to end stdOutWatcherThread.join(); stdErrWatcherThread.join(); } | 8707 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8707/d632fc505aafc7825bf3831fe44f3154d1dae684/RemoteListenableImpl.java/clean/src/org/cougaar/tools/server/server/RemoteListenableImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1746,
1435,
1216,
1185,
288,
565,
3852,
261,
947,
2531,
13,
288,
1377,
309,
261,
947,
422,
446,
13,
288,
3639,
327,
31,
1377,
289,
1377,
3768,
18,
542,
6119,
12,
5743,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1746,
1435,
1216,
1185,
288,
565,
3852,
261,
947,
2531,
13,
288,
1377,
309,
261,
947,
422,
446,
13,
288,
3639,
327,
31,
1377,
289,
1377,
3768,
18,
542,
6119,
12,
5743,
1769,
... |
public void widgetSelected(SelectionEvent e) { if (slider.getSelection() == topRow) { return; } if (!fireRequestRowChangeEvent()) { slider.setSelection(topRow); return; } deselectCurrentRowIfVisible(); int delta = topRow - slider.getSelection(); int oldCurrentRow = currentRow; currentRow += delta; setTopRow(slider.getSelection()); // If the focused row just became visible, show the focus if (oldCurrentRow < 0 || oldCurrentRow >= getNumRowsVisible()) { if (currentRow >= 0 && currentRow < getNumRowsVisible()) { Control newFocusControl = getControl(currentColumn, currentRow); if (newFocusControl.isFocusControl()) { newFocusControl.notifyListeners(SWT.FocusIn, new Event()); } else { deferredSetFocus(newFocusControl, true); } } } else { // If the new viewport doesn't overlap the old one, hide the focus if (currentRow < 0 || currentRow >= getNumRowsVisible()) {// deleteRowAt(oldCurrentRow);// getControl(currentColumn, oldCurrentRow).getParent().setVisible(false);// getControl(currentColumn, oldCurrentRow).getParent().setVisible(true); getControl(currentColumn, oldCurrentRow).notifyListeners(SWT.FocusOut, new Event()); } } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/330828528b043fe86080032e8f72abb658ce2387/InternalCompositeTable.java/clean/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/compositetable/InternalCompositeTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
1082,
202,
430,
261,
28372,
18,
588,
6233,
1435,
422,
1760,
1999,
13,
288,
9506,
202,
2463,
31,
1082,
202,
97,
1082,
202,
430,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
1082,
202,
430,
261,
28372,
18,
588,
6233,
1435,
422,
1760,
1999,
13,
288,
9506,
202,
2463,
31,
1082,
202,
97,
1082,
202,
430,
... | ||
public static boolean fullyDelete(File dir, Configuration conf) throws IOException { return fullyDelete(new LocalFileSystem(conf), dir); } | public static boolean fullyDelete(File dir, Configuration conf) throws IOException { return fullyDelete(dir); } | public static boolean fullyDelete(File dir, Configuration conf) throws IOException { return fullyDelete(new LocalFileSystem(conf), dir); } | 50331 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50331/ee01fef4b4fb82c7492a4a747793839a4d14cd39/FileUtil.java/buggy/src/java/org/apache/hadoop/fs/FileUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
7418,
2613,
12,
812,
1577,
16,
4659,
2195,
13,
1216,
1860,
288,
3639,
327,
7418,
2613,
12,
2704,
3566,
11785,
12,
3923,
3631,
1577,
1769,
565,
289,
2,
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,
377,
1071,
760,
1250,
7418,
2613,
12,
812,
1577,
16,
4659,
2195,
13,
1216,
1860,
288,
3639,
327,
7418,
2613,
12,
2704,
3566,
11785,
12,
3923,
3631,
1577,
1769,
565,
289,
2,
-100,
-100,
-100,
... |
public static void main(String[] args) { Set flags = new HashSet(); flags.add("h"); flags.add("help"); flags.add("usage"); flags.add("license"); flags.add("version"); flags.add("dl"); flags.add("noupa"); flags.add("nopvr"); flags.add("partial"); CommandLine cl = new CommandLine(args, flags, Collections.EMPTY_SET); if (cl.getOpt("h") != null || cl.getOpt("help") != null || cl.getOpt("usage") != null) { printUsage(); System.exit(0); return; } String[] badopts = cl.getBadOpts(); if (badopts.length > 0) { for (int i = 0; i < badopts.length; i++) System.out.println("Unrecognized option: " + badopts[i]); printUsage(); System.exit(0); return; } if (cl.getOpt("license") != null) { CommandLine.printLicense(); System.exit(0); return; } if (cl.getOpt("version") != null) { CommandLine.printVersion(); System.exit(0); return; } if (cl.args().length == 0) { return; } boolean dl = (cl.getOpt("dl") != null); boolean nopvr = (cl.getOpt("nopvr") != null); boolean noupa = (cl.getOpt("noupa") != null); boolean partial = (cl.getOpt("partial") != null); File[] schemaFiles = cl.filesEndingWith(".xsd"); File[] instanceFiles = cl.filesEndingWith(".xml"); File[] jarFiles = cl.filesEndingWith(".jar"); List sdocs = new ArrayList(); for (int i = 0; i < schemaFiles.length; i++) { try { sdocs.add( XmlObject.Factory.parse( schemaFiles[i], (new XmlOptions()).setLoadLineNumbers().setLoadMessageDigest())); } catch (Exception e) { System.err.println( schemaFiles[i] + " not loadable: " + e ); } } XmlObject[] schemas = (XmlObject[])sdocs.toArray(new XmlObject[0]); SchemaTypeLoader sLoader = null; Collection compErrors = new ArrayList(); XmlOptions schemaOptions = new XmlOptions(); schemaOptions.setErrorListener(compErrors); if (dl) schemaOptions.setCompileDownloadUrls(); if (nopvr) schemaOptions.setCompileNoPvrRule(); if (noupa) schemaOptions.setCompileNoUpaRule(); if (partial) schemaOptions.put("COMPILE_PARTIAL_TYPESYSTEM"); if (jarFiles != null && jarFiles.length > 0) sLoader = XmlBeans.typeLoaderForResource(XmlBeans.resourceLoaderForPath(jarFiles)); try { if (schemas != null && schemas.length > 0) sLoader = XmlBeans.compileXsd(schemas, sLoader, schemaOptions); } catch (Exception e) { if (compErrors.isEmpty() || !(e instanceof XmlException)) { e.printStackTrace(System.err); } System.out.println("Schema invalid:" + (partial ? " couldn't recover from errors" : "")); for (Iterator i = compErrors.iterator(); i.hasNext(); ) System.out.println(i.next()); return; } // recovered from errors, print out errors if (partial && !compErrors.isEmpty()) { System.out.println("Schema invalid: partial schema type system recovered"); for (Iterator i = compErrors.iterator(); i.hasNext(); ) System.out.println(i.next()); } if (sLoader == null) sLoader = XmlBeans.getContextTypeLoader(); for (int i = 0; i < instanceFiles.length; i++) { XmlObject xobj; try { xobj = sLoader.parse( instanceFiles[i], null, (new XmlOptions()).setLoadLineNumbers() ); } catch (Exception e) { System.err.println(instanceFiles[i] + " not loadable: " + e); e.printStackTrace(System.err); continue; } Collection errors = new ArrayList(); if (xobj.schemaType() == XmlObject.type) { System.out.println(instanceFiles[i] + " NOT valid. "); System.out.println(" Document type not found." ); } else if (xobj.validate(new XmlOptions().setErrorListener(errors))) System.out.println(instanceFiles[i] + " valid."); else { System.out.println(instanceFiles[i] + " NOT valid."); for (Iterator it = errors.iterator(); it.hasNext(); ) { System.out.println(it.next()); } } } } | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/001aee1d328098a9a567f5df3cb355c8d26c1c2b/InstanceValidator.java/clean/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
565,
288,
3639,
1000,
2943,
273,
394,
6847,
5621,
3639,
2943,
18,
1289,
2932,
76,
8863,
3639,
2943,
18,
1289,
2932,
5201,
8863,
3639,
2943,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2774,
12,
780,
8526,
833,
13,
565,
288,
3639,
1000,
2943,
273,
394,
6847,
5621,
3639,
2943,
18,
1289,
2932,
76,
8863,
3639,
2943,
18,
1289,
2932,
5201,
8863,
3639,
2943,
... | ||
boolean sf; switch (current) { case '0': sf = false; break; case '1': sf = true; break; default: reportError("character.unexpected", new Object[] { new Integer(current) }); skipSubPath(); return; } | boolean sf; switch (current) { case '0': sf = false; break; case '1': sf = true; break; default: reportError("character.unexpected", new Object[] { new Integer(current) }); skipSubPath(); return; } | protected void parsea() throws ParseException { read(); skipSpaces(); for (;;) { switch (current) { default: return; case '+': case '-': case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': } try { float rx = parseFloat(); skipCommaSpaces(); float ry = parseFloat(); skipCommaSpaces(); float ax = parseFloat(); skipCommaSpaces(); boolean laf; switch (current) { case '0': laf = false; break; case '1': laf = true; break; default: reportError("character.unexpected", new Object[] { new Integer(current) }); skipSubPath(); return; } read(); skipCommaSpaces(); boolean sf; switch (current) { case '0': sf = false; break; case '1': sf = true; break; default: reportError("character.unexpected", new Object[] { new Integer(current) }); skipSubPath(); return; } read(); skipCommaSpaces(); float x = parseFloat(); skipCommaSpaces(); float y = parseFloat(); pathHandler.arcRel(rx, ry, ax, laf, sf, x, y); } catch (NumberFormatException e) { reportError("character.unexpected", new Object[] { new Integer(current) }); skipSubPath(); return; } skipCommaSpaces(); } } | 46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/18cf7f4389e32536616bfa061ce5b22e568000c9/PathParser.java/buggy/sources/org/apache/batik/parser/PathParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1109,
69,
1435,
1216,
10616,
288,
202,
896,
5621,
202,
7457,
12077,
5621,
202,
1884,
261,
25708,
13,
288,
202,
565,
1620,
261,
2972,
13,
288,
202,
565,
805,
30,
202,
202,
246... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
69,
1435,
1216,
10616,
288,
202,
896,
5621,
202,
7457,
12077,
5621,
202,
1884,
261,
25708,
13,
288,
202,
565,
1620,
261,
2972,
13,
288,
202,
565,
805,
30,
202,
202,
246... |
filteredTree.getFilterCombo().setEnabled(false); filteredTree.getFilterCombo().setSelection(new Point(0,0)); | filteredTree.getFilterControl().setEnabled(false); filteredTree.getFilterControl().setSelection(new Point(0,0)); | protected TreeViewer createTreeViewer(Composite parent) { PatternItemFilter filter = new PatternItemFilter(true); int styleBits = SWT.SINGLE | SWT.H_SCROLL; filteredTree = new FilteredComboTree(parent, styleBits, filter); GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true); gd.horizontalIndent = IDialogConstants.HORIZONTAL_MARGIN; filteredTree.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND)); TreeViewer tree = filteredTree.getViewer(); filteredTree.setInitialText(WorkbenchMessages.WorkbenchPreferenceDialog_FilterMessage); setContentAndLabelProviders(tree); tree.setInput(getPreferenceManager()); //if the tree has only one or zero pages, make the combo area disable if(hasAtMostOnePage(tree)){ filteredTree.getFilterCombo().setEnabled(false); filteredTree.getFilterCombo().setSelection(new Point(0,0)); } tree.addFilter(new CapabilityFilter()); tree.addSelectionChangedListener(new ISelectionChangedListener() { /* * (non-Javadoc) * * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent) */ public void selectionChanged(SelectionChangedEvent event) { handleTreeSelectionChanged(event); } }); super.addListeners(filteredTree.getViewer()); return filteredTree.getViewer(); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/8f2e3e8d1ab9e2c2bc260b9772b39b7e10b7db27/FilteredPreferenceDialog.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
4902,
18415,
752,
2471,
18415,
12,
9400,
982,
13,
288,
202,
202,
3234,
1180,
1586,
1034,
273,
394,
6830,
1180,
1586,
12,
3767,
1769,
3196,
202,
474,
2154,
6495,
273,
348,
8588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1117,
4902,
18415,
752,
2471,
18415,
12,
9400,
982,
13,
288,
202,
202,
3234,
1180,
1586,
1034,
273,
394,
6830,
1180,
1586,
12,
3767,
1769,
3196,
202,
474,
2154,
6495,
273,
348,
8588,... |
clove.setId(_context.random().nextLong(I2NPMessage.MAX_ID_VALUE)); | clove.setId(getContext().random().nextLong(I2NPMessage.MAX_ID_VALUE)); | private void buildClove() { PayloadGarlicConfig clove = new PayloadGarlicConfig(); DeliveryInstructions instructions = new DeliveryInstructions(); instructions.setDeliveryMode(DeliveryInstructions.DELIVERY_MODE_DESTINATION); instructions.setDestination(_status.getTo().calculateHash()); instructions.setDelayRequested(false); instructions.setDelaySeconds(0); instructions.setEncrypted(false); clove.setCertificate(new Certificate(Certificate.CERTIFICATE_TYPE_NULL, null)); clove.setDeliveryInstructions(instructions); clove.setExpiration(_overallExpiration); clove.setId(_context.random().nextLong(I2NPMessage.MAX_ID_VALUE)); DataMessage msg = new DataMessage(_context); msg.setData(_status.getMessage().getPayload().getEncryptedData()); clove.setPayload(msg); clove.setRecipientPublicKey(null); clove.setRequestAck(false); _status.setClove(clove); if (_log.shouldLog(Log.DEBUG)) _log.debug(getJobId() + ": Built payload clove with id " + clove.getId()); } | 45677 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45677/e737e5c9507ed0d463dc9e45a8f63657f466b177/OutboundClientMessageJob.java/clean/router/java/src/net/i2p/router/message/OutboundClientMessageJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1361,
4082,
537,
1435,
288,
3639,
11320,
43,
13007,
335,
809,
1219,
537,
273,
394,
11320,
43,
13007,
335,
809,
5621,
7734,
17390,
26712,
12509,
273,
394,
17390,
26712,
5621,
3639... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1361,
4082,
537,
1435,
288,
3639,
11320,
43,
13007,
335,
809,
1219,
537,
273,
394,
11320,
43,
13007,
335,
809,
5621,
7734,
17390,
26712,
12509,
273,
394,
17390,
26712,
5621,
3639... |
send(new CloseCommand()); terminate(null); | synchronized(this) { send(new CloseCommand()); oos.close(); terminate(null); } | public void close() throws IOException { if(closed) return; send(new CloseCommand()); // TODO: would be nice if we can wait for the completion of pending requests terminate(null); } | 33502 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/33502/254d101c656814c8c34d9b7b3935d70123e0ecf1/Channel.java/clean/src/main/java/hudson/remoting/Channel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1746,
1435,
1216,
1860,
288,
3639,
309,
12,
12204,
13,
225,
327,
31,
3639,
1366,
12,
2704,
3527,
2189,
10663,
7734,
368,
2660,
30,
4102,
506,
13752,
309,
732,
848,
2529,
364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1746,
1435,
1216,
1860,
288,
3639,
309,
12,
12204,
13,
225,
327,
31,
3639,
1366,
12,
2704,
3527,
2189,
10663,
7734,
368,
2660,
30,
4102,
506,
13752,
309,
732,
848,
2529,
364,
... |
PortletURLImpl redirectUrl = new PortletURLImpl(servletRequest, servletResponse, portalContext); | /* PortletURLImpl redirectUrl = new PortletURLImpl(servletRequest, servletResponse, portalContext, false); | protected void redirect(HttpServletRequest servletRequest, HttpServletResponse servletResponse, ActionRequest actionRequest, ActionResponse actionResponse, PortalContext portalContext) throws IOException { String location = null; if (actionResponse instanceof ActionResponseImpl) { ActionResponseImpl aResponse = (ActionResponseImpl) actionResponse; location = aResponse.getRedirectLocation(); if (location != null) { /* if (location.indexOf("://") < 0 ) { PortletURLImpl redirectUrl = new PortletURLImpl(servletRequest, servletResponse, portalContext); //TODO: don't send changes in case of exception -> PORTLET:SPEC:17 // get the changings of this portlet entity that might be set during action handling // change portlet mode redirectUrl.setContextPath(actionRequest.getContextPath()); try { if (aResponse.getChangedPortletMode() != null) { redirectUrl.setPortletMode(aResponse.getChangedPortletMode()); } else { redirectUrl.setPortletMode(actionRequest.getPortletMode()); } } catch (PortletModeException e) { e.printStackTrace(); } // change window state try { if (aResponse.getChangedWindowState() != null) { redirectUrl.setWindowState(aResponse.getChangedWindowState()); } else { redirectUrl.setWindowState(actionRequest.getWindowState()); } } catch (WindowStateException e) { e.printStackTrace(); } // get render parameters Map renderParameter = aResponse.getRenderParameters(); redirectUrl.setParameter(SportletProperties.COMPONENT_ID, (String) servletRequest.getParameter(SportletProperties.COMPONENT_ID)); redirectUrl.setParameters(renderParameter); System.err.println("redirecting url " + redirectUrl.toString()); location = servletResponse.encodeRedirectURL(redirectUrl.toString()); } */ javax.servlet.http.HttpServletResponse redirectResponse = servletResponse; while (redirectResponse instanceof javax.servlet.http.HttpServletResponseWrapper) { redirectResponse = (javax.servlet.http.HttpServletResponse) ((javax.servlet.http.HttpServletResponseWrapper) redirectResponse).getResponse(); } System.err.println("redirecting to location= " + location); redirectResponse.sendRedirect(location); } } } | 49343 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49343/2861918d0ec8338012c0300e96bbe5eab6cb0420/PortletServlet.java/buggy/src/org/gridlab/gridsphere/provider/portlet/jsr/PortletServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
3136,
12,
2940,
18572,
8100,
691,
16,
18701,
12446,
8100,
1064,
16,
18701,
4382,
691,
1301,
691,
16,
18701,
4382,
1064,
1301,
1064,
16,
25478,
1042,
11899,
1042,
13,
5411,
1216,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3136,
12,
2940,
18572,
8100,
691,
16,
18701,
12446,
8100,
1064,
16,
18701,
4382,
691,
1301,
691,
16,
18701,
4382,
1064,
1301,
1064,
16,
25478,
1042,
11899,
1042,
13,
5411,
1216,
... |
m_numToSelect = count; | m_calculatedNumToSelect = count; | private void determineNumToSelectFromThreshold(double [][] ranking) { int count = 0; for (int i = 0; i < ranking.length; i++) { if (ranking[i][1] > m_threshold) { count++; } } m_numToSelect = count; } | 6866 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6866/d93755f6979770df3057d1e15407b5416bb322df/ForwardSelection.java/buggy/attributeSelection/ForwardSelection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
4199,
2578,
774,
3391,
1265,
7614,
12,
9056,
5378,
8526,
23087,
13,
288,
565,
509,
1056,
273,
374,
31,
565,
364,
261,
474,
277,
273,
374,
31,
277,
411,
23087,
18,
2469,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
4199,
2578,
774,
3391,
1265,
7614,
12,
9056,
5378,
8526,
23087,
13,
288,
565,
509,
1056,
273,
374,
31,
565,
364,
261,
474,
277,
273,
374,
31,
277,
411,
23087,
18,
2469,
31,
... |
Result result = runQuery( "with" + nl + " member [Product].[All Products].[Drink].[Percent of Alcoholic Drinks] as '[Product].[All Products].[Drink].[Alcoholic Beverages]/[Product].[All Products].[Drink]', format = '#.00%'" + nl + "select" + nl + " { [Product].[All Products].[Drink].[Percent of Alcoholic Drinks] } on columns," + nl + " order([Customers].[All Customers].[USA].[WA].Children, [Product].[All Products].[Drink].[Percent of Alcoholic Drinks],BDESC ) on rows" + nl + "from Sales" + nl + "where ( [Measures].[Unit Sales] )"); | runQueryCheckResult(sampleQueries[6]); | public void testSample6() { Result result = runQuery( "with" + nl + " member [Product].[All Products].[Drink].[Percent of Alcoholic Drinks] as '[Product].[All Products].[Drink].[Alcoholic Beverages]/[Product].[All Products].[Drink]', format = '#.00%'" + nl + "select" + nl + " { [Product].[All Products].[Drink].[Percent of Alcoholic Drinks] } on columns," + nl + " order([Customers].[All Customers].[USA].[WA].Children, [Product].[All Products].[Drink].[Percent of Alcoholic Drinks],BDESC ) on rows" + nl + "from Sales" + nl + "where ( [Measures].[Unit Sales] )"); } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/7509e0f25235fd2cb529aabfa3408833d5f3a58b/FoodMartTestCase.java/buggy/src/main/mondrian/test/FoodMartTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
8504,
26,
1435,
288,
202,
202,
1253,
563,
273,
1086,
1138,
12,
9506,
202,
6,
1918,
6,
397,
7741,
397,
9506,
202,
6,
202,
5990,
306,
4133,
8009,
63,
1595,
8094,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8504,
26,
1435,
288,
202,
202,
1253,
563,
273,
1086,
1138,
12,
9506,
202,
6,
1918,
6,
397,
7741,
397,
9506,
202,
6,
202,
5990,
306,
4133,
8009,
63,
1595,
8094,
87... |
pixType = FormatReader.INT8; | pixType = FormatReader.UINT8; | protected void initFile(String id) throws FormatException, IOException { super.initFile(id); in = new RandomAccessStream(id); littleEndian = true; in.order(littleEndian); // read the first header - 14 bytes byte[] two = new byte[2]; in.read(two); metadata.put("Magic identifier", new String(two)); metadata.put("File size (in bytes)", "" + in.readInt()); in.skipBytes(4); // reserved // read the offset to the image data offset = in.readInt(); // read the second header - 40 bytes in.skipBytes(4); // get the dimensions width = in.readInt(); height = in.readInt(); if (width < 1 || height < 1) { throw new FormatException("Invalid image dimensions: " + width + " x " + height); } metadata.put("Image width", "" + width); metadata.put("Image height", "" + height); metadata.put("Color planes", "" + in.readShort()); bpp = in.readShort(); metadata.put("Bits per pixel", "" + bpp); compression = in.readInt(); String comp = "invalid"; switch (compression) { case 0: comp = "None"; break; case 1: comp = "8 bit run length encoding"; break; case 2: comp = "4 bit run length encoding"; break; case 3: comp = "RGB bitmap with mask"; break; } metadata.put("Compression type", comp); in.skipBytes(4); metadata.put("X resolution", "" + in.readInt()); metadata.put("Y resolution", "" + in.readInt()); int nColors = in.readInt(); in.skipBytes(4); // read the palette, if it exists if (offset != in.getFilePointer()) { palette = new byte[3][nColors]; for (int i=0; i<nColors; i++) { for (int j=palette.length; j>0; j--) { palette[j][i] = (byte) in.read(); } in.read(); } } global = in.getFilePointer(); metadata.put("Indexed color", palette == null ? "false" : "true"); int c = (palette == null & bpp == 8) ? 1 : 3; int tbpp = bpp; if (bpp > 8) tbpp /= 3; while (tbpp % 8 != 0) tbpp++; switch (tbpp) { case 8: pixType = FormatReader.INT8; break; case 16: pixType = FormatReader.INT16; break; case 32: pixType = FormatReader.INT32; break; } sizeX[0] = (width % 2 == 1) ? width + 1 : width; sizeY[0] = height; sizeZ[0] = 1; sizeC[0] = isRGB(id) ? 3 : 1; sizeT[0] = 1; pixelType[0] = pixType; currentOrder[0] = "XYCTZ"; // Populate metadata store. // The metadata store we're working with. MetadataStore store = getMetadataStore(id); store.setPixels( new Integer(width), // sizeX new Integer(height), // sizeY new Integer(1), // sizeZ new Integer(c), // sizeC new Integer(1), // sizeT new Integer(pixType), new Boolean(!littleEndian), // BigEndian "XYCTZ", // Dimension order null); // Use index 0 } | 49800 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49800/db080dd0a46728b8a134dea3f2915320b0ce0482/BMPReader.java/buggy/loci/formats/in/BMPReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
316,
273,
394,
8072,
1862,
1228,
12,
350,
1769,
565,
328,
10609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
316,
273,
394,
8072,
1862,
1228,
12,
350,
1769,
565,
328,
10609,
... |
setEndPrologueOffset(ir.MIRInfo.instAfterPrologue.getmcOffset()); | public final void createFinalMCMap (OPT_IR ir, int machineCodeLength) throws InterruptiblePragma { _mcMap = new VM_OptMachineCodeMap(ir, machineCodeLength); setEndPrologueOffset(ir.MIRInfo.instAfterPrologue.getmcOffset()); } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/6c96d9b18903f7c54f4e447231b0229855b18118/VM_OptCompiledMethod.java/clean/rvm/src/vm/compilers/optimizing/vmInterface/services/VM_OptCompiledMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
752,
7951,
20022,
863,
261,
15620,
67,
7937,
9482,
16,
509,
5228,
1085,
1782,
13,
1216,
3094,
4483,
1523,
2050,
9454,
288,
565,
389,
13952,
863,
273,
394,
8251,
67,
6179,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
752,
7951,
20022,
863,
261,
15620,
67,
7937,
9482,
16,
509,
5228,
1085,
1782,
13,
1216,
3094,
4483,
1523,
2050,
9454,
288,
565,
389,
13952,
863,
273,
394,
8251,
67,
6179,
... | |
return jvmProcess.getClassname(); } | return jvmProcess.getClassname(); } | public String getClassname() { return jvmProcess.getClassname(); } | 50951 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50951/72186abc6d443a4d713da92efc5079c9b125d539/RSHJVMProcess.java/clean/src/org/objectweb/proactive/core/process/rsh/RSHJVMProcess.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
2900,
529,
1435,
288,
565,
327,
13555,
2227,
18,
588,
20531,
5621,
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,
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,
282,
1071,
514,
2900,
529,
1435,
288,
565,
327,
13555,
2227,
18,
588,
20531,
5621,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
VariableValue variable = makeVar("name", "comment", false, 81, "XXVVVVXX", 0, 255, v, null, null); | VariableValue variable = makeVar("label", "comment", false, 81, "XXVVVVXX", 0, 255, v, null, null); | public void testVariableValueRead() { log.debug("testVariableValueRead base starts"); // initialize the system Programmer p = new ProgDebugger(); InstanceManager.setProgrammer(p); Vector v = createCvVector(); CvValue cv = new CvValue(81); v.setElementAt(cv, 81); // create a variable pointed at CV 81, loaded as 5, manually notified VariableValue variable = makeVar("name", "comment", false, 81, "XXVVVVXX", 0, 255, v, null, null); setValue(variable, "5"); variable.read(); // wait for reply (normally, done by callback; will check that later) int i = 0; while ( variable.isBusy() && i++ < 100 ) { try { Thread.sleep(50); } catch (Exception e) { } } if (log.isDebugEnabled()) log.debug("past loop, i="+i+" value="+variable.getValue()+" state="+variable.getState()); if (i==0) log.warn("textVariableValueRead saw an immediate return from isBusy"); Assert.assertTrue("wait time for message",i<100); checkValue(variable, "text var value ", "14"); Assert.assertEquals("var state ", AbstractValue.READ, variable.getState()); Assert.assertEquals("cv value", 123, cv.getValue()); Assert.assertEquals("CV state ", AbstractValue.READ, cv.getState()); } | 213 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/213/e52e40ae4d70a0f2b1516a7d2cf5669b5933a075/VariableValueTest.java/buggy/tests/jmrit/symbolicprog/VariableValueTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3092,
620,
1994,
1435,
288,
202,
202,
1330,
18,
4148,
2932,
3813,
3092,
620,
1994,
1026,
2542,
8863,
202,
202,
759,
4046,
326,
2619,
202,
202,
9459,
6592,
293,
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,
225,
202,
482,
918,
1842,
3092,
620,
1994,
1435,
288,
202,
202,
1330,
18,
4148,
2932,
3813,
3092,
620,
1994,
1026,
2542,
8863,
202,
202,
759,
4046,
326,
2619,
202,
202,
9459,
6592,
293,
273,
... |
if (!attribute.isReadOnly()) { | if (isInternalAttribute(attribute.getID())) { } else if (!attribute.isReadOnly()) { | public static TracTicket getTracTicket(TaskRepository repository, RepositoryTaskData data) throws InvalidTicketException { TracTicket ticket = new TracTicket(Integer.parseInt(data.getId())); List<RepositoryTaskAttribute> attributes = data.getAttributes(); for (RepositoryTaskAttribute attribute : attributes) { if (!attribute.isReadOnly()) { ticket.putValue(attribute.getID(), attribute.getValue()); } } // TODO "1" should not be hard coded here if ("1".equals(data.getAttributeValue(RepositoryTaskAttribute.ADD_SELF_CC))) { String cc = data.getAttributeValue(RepositoryTaskAttribute.USER_CC); ticket.putBuiltinValue(Key.CC, cc + "," + repository.getUserName()); } RepositoryOperation operation = data.getSelectedOperation(); if (operation != null) { String action = operation.getKnobName(); if (!"leave".equals(action)) { if ("accept".equals(action)) { ticket.putValue("status", "assigned"); ticket.putValue("owner", getDisplayUsername(repository)); } else if ("resolve".equals(action)) { ticket.putValue("status", "closed"); ticket.putValue("resolution", operation.getOptionSelection()); } else if ("reopen".equals(action)) { ticket.putValue("status", "reopened"); ticket.putValue("resolution", ""); } else if ("reassign".equals(operation.getKnobName())) { ticket.putValue("status", "new"); ticket.putValue("owner", operation.getInputValue()); } } } return ticket; } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/798765ec7c7c65a6f9c41e03c53463158201d9ab/TracRepositoryConnector.java/clean/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
2197,
71,
13614,
336,
1609,
71,
13614,
12,
2174,
3305,
3352,
16,
6281,
2174,
751,
501,
13,
1216,
1962,
13614,
503,
288,
202,
202,
1609,
71,
13614,
9322,
273,
394,
2197,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2197,
71,
13614,
336,
1609,
71,
13614,
12,
2174,
3305,
3352,
16,
6281,
2174,
751,
501,
13,
1216,
1962,
13614,
503,
288,
202,
202,
1609,
71,
13614,
9322,
273,
394,
2197,
7... |
if(log.isErrorEnabled()) log.error("min_threshold (" + min_threshold + ") has to be less than window_size (" + window_size + ")"); | log.error("min_threshold (" + min_threshold + ") has to be less than window_size (" + window_size + ")"); | public boolean setProperties(Properties props) { String str; long[] tmp; str=props.getProperty("timeout"); if(str != null) { tmp=Util.parseCommaDelimitedLongs(str); if(tmp != null && tmp.length > 0) timeout=tmp; props.remove("timeout"); } str=props.getProperty("window_size"); if(str != null) { window_size=Integer.parseInt(str); props.remove("window_size"); } str=props.getProperty("min_threshold"); if(str != null) { min_threshold=Integer.parseInt(str); props.remove("min_threshold"); } str=props.getProperty("use_gms"); if(str != null) { use_gms=new Boolean(str).booleanValue(); props.remove("use_gms"); } if(props.size() > 0) { System.err.println("UNICAST.setProperties(): these properties are not recognized:"); props.list(System.out); return false; } // Some sanity checks if((window_size > 0 && min_threshold <= 0) || (window_size <= 0 && min_threshold > 0)) { if(log.isErrorEnabled()) log.error("window_size and min_threshold have to be both set if one of them is set"); return false; } if(window_size > 0 && min_threshold > 0 && window_size < min_threshold) { if(log.isErrorEnabled()) log.error("min_threshold (" + min_threshold + ") has to be less than window_size (" + window_size + ")"); return false; } return true; } | 3550 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3550/f4d48c5d12530ffb09ab46034b71d9594b0f1287/UNICAST.java/buggy/src/org/jgroups/protocols/UNICAST.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
23126,
12,
2297,
3458,
13,
288,
3639,
514,
377,
609,
31,
202,
5748,
8526,
377,
1853,
31,
3639,
609,
33,
9693,
18,
588,
1396,
2932,
4538,
8863,
3639,
309,
12,
701,
480,
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,
1250,
23126,
12,
2297,
3458,
13,
288,
3639,
514,
377,
609,
31,
202,
5748,
8526,
377,
1853,
31,
3639,
609,
33,
9693,
18,
588,
1396,
2932,
4538,
8863,
3639,
309,
12,
701,
480,
446,
... |
public void finalize() { | protected void finalize() { | public void finalize() { ArgoEventPump.removeListener(ArgoEventTypes.ANY_NOTATION_EVENT, this); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/f0ef0b849cafdd4df5672896783d59a0c09d37bc/FigEdgeModelElement.java/buggy/src_new/org/argouml/uml/diagram/ui/FigEdgeModelElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
12409,
1435,
288,
3639,
1201,
3240,
1133,
52,
2801,
18,
4479,
2223,
12,
686,
3240,
1133,
2016,
18,
15409,
67,
4400,
2689,
67,
10454,
16,
333,
1769,
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,
4750,
918,
12409,
1435,
288,
3639,
1201,
3240,
1133,
52,
2801,
18,
4479,
2223,
12,
686,
3240,
1133,
2016,
18,
15409,
67,
4400,
2689,
67,
10454,
16,
333,
1769,
565,
289,
2,
-100,
-100,
-... |
if(length < node.usm.getMaxPacketSize() && messageData.length < 256) { | if((length < node.usm.getMaxPacketSize()) && (messageData.length < 256)) { | public void processOutgoingOrRequeue(MessageItem[] messages, PeerNode pn, boolean neverWaitForPacketNumber, boolean dontRequeue) { Logger.minor(this, "processOutgoingOrRequeue "+messages.length+" messages for "+pn+" ("+neverWaitForPacketNumber+")"); byte[][] messageData = new byte[messages.length][]; int[] alreadyReported = new int[messages.length]; MessageItem[] newMsgs = new MessageItem[messages.length]; int length = 1; int callbacksCount = 0; int x = 0; for(int i=0;i<messageData.length;i++) { MessageItem mi = messages[i]; if(mi.formatted) { try { byte[] buf = mi.getData(this, pn); KeyTracker kt = pn.getCurrentKeyTracker(); if(kt == null) { Logger.minor(this, "kt = null"); pn.requeueMessageItems(messages, i, messages.length-i, false, "kt = null"); return; } int packetNumber = kt.allocateOutgoingPacketNumberNeverBlock(); this.processOutgoingPreformatted(buf, 0, buf.length, pn.getCurrentKeyTracker(), packetNumber, mi.cb, mi.alreadyReportedBytes); if(mi.ctrCallback != null) mi.ctrCallback.sentBytes(buf.length + HEADERS_LENGTH_ONE_MESSAGE); } catch (NotConnectedException e) { Logger.minor(this, "Caught "+e+" while sending messages, requeueing"); // Requeue if(!dontRequeue) { pn.requeueMessageItems(messages, 0, x, false, "NotConnectedException"); pn.requeueMessageItems(messages, i, messages.length-i, false, "NotConnectedException"); } return; } catch (WouldBlockException e) { Logger.minor(this, "Caught "+e+" while sending messages, requeueing", e); // Requeue if(!dontRequeue) { pn.requeueMessageItems(messages, 0, x, false, "NotConnectedException"); pn.requeueMessageItems(messages, i, messages.length-i, false, "NotConnectedException"); } return; } catch (KeyChangedException e) { Logger.minor(this, "Caught "+e+" while sending messages, requeueing"); // Requeue if(!dontRequeue) { pn.requeueMessageItems(messages, 0, x, false, "NotConnectedException"); pn.requeueMessageItems(messages, i, messages.length-i, false, "NotConnectedException"); } return; } catch (Throwable e) { Logger.error(this, "Caught "+e+" while sending messages, requeueing", e); // Requeue if(!dontRequeue) { pn.requeueMessageItems(messages, 0, x, false, "NotConnectedException"); pn.requeueMessageItems(messages, i, messages.length-i, false, "NotConnectedException"); } return; } } else { byte[] data = mi.getData(this, pn); messageData[x] = data; newMsgs[x] = mi; alreadyReported[x] = mi.alreadyReportedBytes; x++; if(mi.cb != null) callbacksCount += mi.cb.length; Logger.minor(this, "Sending: "+mi+" length "+data.length+" cb "+mi.cb); length += (data.length + 2); } } if(x != messageData.length) { byte[][] newMessageData = new byte[x][]; System.arraycopy(messageData, 0, newMessageData, 0, x); messageData = newMessageData; } AsyncMessageCallback callbacks[] = new AsyncMessageCallback[callbacksCount]; x=0; int alreadyReportedBytes = 0; for(int i=0;i<messages.length;i++) { if(messages[i].formatted) continue; if(messages[i].cb != null) { alreadyReportedBytes += messages[i].alreadyReportedBytes; System.arraycopy(messages[i].cb, 0, callbacks, x, messages[i].cb.length); x += messages[i].cb.length; } } if(x != callbacksCount) throw new IllegalStateException(); if(length < node.usm.getMaxPacketSize() && messageData.length < 256) { try { innerProcessOutgoing(messageData, 0, messageData.length, length, pn, neverWaitForPacketNumber, callbacks, alreadyReportedBytes); for(int i=0;i<messageData.length;i++) { MessageItem mi = newMsgs[i]; if(mi.ctrCallback != null) { mi.ctrCallback.sentBytes(messageData[i].length + 1 + (HEADERS_LENGTH_MINIMUM / messageData.length)); // FIXME rounding issues } } } catch (NotConnectedException e) { Logger.normal(this, "Caught "+e+" while sending messages, requeueing"); // Requeue if(!dontRequeue) pn.requeueMessageItems(messages, 0, messages.length, false, "NotConnectedException(2)"); return; } catch (WouldBlockException e) { Logger.minor(this, "Caught "+e+" while sending messages, requeueing", e); // Requeue if(!dontRequeue) pn.requeueMessageItems(messages, 0, messages.length, false, "WouldBlockException(2)"); return; } catch (Throwable e) { Logger.error(this, "Caught "+e+" while sending messages, requeueing", e); // Requeue if(!dontRequeue) pn.requeueMessageItems(messages, 0, messages.length, false, "Throwable(2)"); return; } } else { length = 56; int count = 0; int lastIndex = 0; alreadyReportedBytes = 0; for(int i=0;i<=messages.length;i++) { int thisLength; if(i == messages.length) thisLength = 0; else thisLength = (messageData[i].length + 2); int newLength = length + thisLength; if(thisLength > node.usm.getMaxPacketSize()) { Logger.error(this, "Message exceeds packet size: "+messages[i]); // Send the last lot, then send this } count++; if(newLength > node.usm.getMaxPacketSize() || count > 255 || i == messages.length) { // lastIndex up to the message right before this one // e.g. lastIndex = 0, i = 1, we just send message 0 if(lastIndex != i) { try { innerProcessOutgoing(messageData, lastIndex, i-lastIndex, length, pn, neverWaitForPacketNumber, callbacks, alreadyReportedBytes); for(int j=lastIndex;j<i;j++) { MessageItem mi = newMsgs[j]; if(mi.ctrCallback != null) { mi.ctrCallback.sentBytes(messageData[j].length + 1 + (HEADERS_LENGTH_MINIMUM / (i-lastIndex))); // FIXME rounding issues } } } catch (NotConnectedException e) { Logger.normal(this, "Caught "+e+" while sending messages, requeueing remaining messages"); // Requeue if(!dontRequeue) pn.requeueMessageItems(messages, lastIndex, messages.length - lastIndex, false, "NotConnectedException(3)"); return; } catch (WouldBlockException e) { Logger.minor(this, "Caught "+e+" while sending messages, requeueing remaining messages", e); // Requeue if(!dontRequeue) pn.requeueMessageItems(messages, lastIndex, messages.length - lastIndex, false, "WouldBlockException(3)"); return; } catch (Throwable e) { Logger.error(this, "Caught "+e+" while sending messages, requeueing remaining messages", e); // Requeue if(!dontRequeue) pn.requeueMessageItems(messages, lastIndex, messages.length - lastIndex, false, "Throwable(3)"); return; } } lastIndex = i; if(i != messageData.length) length = 1 + (messageData[i].length + 2); count = 0; } else { length = newLength; alreadyReportedBytes += alreadyReported[i]; } } } } | 48807 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48807/ca136843ae9ecb30cadada58a33a5dc2cf8ad064/FNPPacketMangler.java/clean/src/freenet/node/FNPPacketMangler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1207,
24866,
1162,
426,
4000,
12,
1079,
1180,
8526,
2743,
16,
10669,
907,
11059,
16,
1250,
5903,
29321,
6667,
1854,
16,
1250,
14046,
426,
4000,
13,
288,
3639,
4242,
18,
17364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
24866,
1162,
426,
4000,
12,
1079,
1180,
8526,
2743,
16,
10669,
907,
11059,
16,
1250,
5903,
29321,
6667,
1854,
16,
1250,
14046,
426,
4000,
13,
288,
3639,
4242,
18,
17364,
... |
part.setVisible(isVisible); | this.isVisible = isVisible; if (enableInputs) { part.setVisible(isVisible); } | public void setVisible(boolean isVisible) { part.setVisible(isVisible); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/0f9e79f0648392aa2d0092033ea11a0726dd9e8d/PresentablePart.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/PresentablePart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
16697,
12,
6494,
20453,
13,
288,
3639,
333,
18,
291,
6207,
273,
20453,
31,
309,
261,
7589,
10059,
13,
288,
1087,
18,
542,
6207,
12,
291,
6207,
1769,
289,
565,
289,
2,
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,
1,
1,
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,
918,
16697,
12,
6494,
20453,
13,
288,
3639,
333,
18,
291,
6207,
273,
20453,
31,
309,
261,
7589,
10059,
13,
288,
1087,
18,
542,
6207,
12,
291,
6207,
1769,
289,
565,
289,
2,
-100,
... |
classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", | cfw.add(ByteCode.GETSTATIC, "java/lang/Boolean", | private void generateCodeFromNode(Node node, Node parent) { // System.out.println("gen code for " + node.toString()); int type = node.getType(); Node child = node.getFirstChild(); switch (type) { case Token.LOOP: case Token.WITH: case Token.LABEL: visitStatement(node); while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } break; case Token.CASE: case Token.DEFAULT: // XXX shouldn't these be StatementNodes? case Token.SCRIPT: case Token.BLOCK: case Token.EMPTY: case Token.NOP: // no-ops. visitStatement(node); while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } break; case Token.FUNCTION: if (inFunction || parent.getType() != Token.SCRIPT) { int fnIndex = node.getExistingIntProp(Node.FUNCTION_PROP); OptFunctionNode fn; fn = (OptFunctionNode)scriptOrFn.getFunctionNode(fnIndex); int t = fn.getFunctionType(); if (t != FunctionNode.FUNCTION_STATEMENT) { visitFunction(fn, t); } } break; case Token.NAME: visitName(node); break; case Token.NEW: case Token.CALL: visitCall(node, type, child); break; case Token.NUMBER: case Token.STRING: visitLiteral(node); break; case Token.THIS: aload(thisObjLocal); break; case Token.THISFN: classFile.add(ByteCode.ALOAD_0); break; case Token.NULL: addByteCode(ByteCode.ACONST_NULL); break; case Token.TRUE: classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "TRUE", "Ljava/lang/Boolean;"); break; case Token.FALSE: classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "FALSE", "Ljava/lang/Boolean;"); break; case Token.UNDEFINED: pushUndefined(); break; case Token.REGEXP: visitObject(node); break; case Token.TRY: visitTryCatchFinally(node, child); break; case Token.THROW: visitThrow(node, child); break; case Token.RETURN: visitReturn(node, child); break; case Token.SWITCH: visitSwitch(node, child); break; case Token.COMMA: { Node next = child.getNext(); while (next != null) { generateCodeFromNode(child, node); addByteCode(ByteCode.POP); child = next; next = next.getNext(); } generateCodeFromNode(child, node); break; } case Token.NEWSCOPE: addScriptRuntimeInvoke("newScope", "()Lorg/mozilla/javascript/Scriptable;"); break; case Token.ENTERWITH: visitEnterWith(node, child); break; case Token.LEAVEWITH: visitLeaveWith(node, child); break; case Token.ENUMINIT: visitEnumInit(node, child); break; case Token.ENUMNEXT: visitEnumNext(node, child); break; case Token.ENUMDONE: visitEnumDone(node, child); break; case Token.POP: visitStatement(node); if (child.getType() == Token.SETVAR) { /* special case this so as to avoid unnecessary load's & pop's */ visitSetVar(child, child.getFirstChild(), false); } else { while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } if (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1) addByteCode(ByteCode.POP2); else addByteCode(ByteCode.POP); } break; case Token.POPV: visitStatement(node); while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } astore(scriptResultLocal); break; case Token.TARGET: visitTarget(node); break; case Token.JSR: case Token.GOTO: case Token.IFEQ: case Token.IFNE: visitGOTO(node, type, child); break; case Token.NOT: { int trueTarget = acquireLabel(); int falseTarget = acquireLabel(); int beyond = acquireLabel(); generateIfJump(child, node, trueTarget, falseTarget); markLabel(trueTarget); classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "FALSE", "Ljava/lang/Boolean;"); addByteCode(ByteCode.GOTO, beyond); markLabel(falseTarget); classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "TRUE", "Ljava/lang/Boolean;"); markLabel(beyond); classFile.adjustStackTop(-1); break; } case Token.BITNOT: addByteCode(ByteCode.NEW, "java/lang/Double"); addByteCode(ByteCode.DUP); generateCodeFromNode(child, node); addScriptRuntimeInvoke("toInt32", "(Ljava/lang/Object;)I"); push(-1); // implement ~a as (a ^ -1) addByteCode(ByteCode.IXOR); addByteCode(ByteCode.I2D); addDoubleConstructor(); break; case Token.VOID: generateCodeFromNode(child, node); addByteCode(ByteCode.POP); pushUndefined(); break; case Token.TYPEOF: generateCodeFromNode(child, node); addScriptRuntimeInvoke("typeof", "(Ljava/lang/Object;" +")Ljava/lang/String;"); break; case Token.TYPEOFNAME: visitTypeofname(node); break; case Token.INC: visitIncDec(node, true); break; case Token.DEC: visitIncDec(node, false); break; case Token.OR: case Token.AND: { generateCodeFromNode(child, node); addByteCode(ByteCode.DUP); addScriptRuntimeInvoke("toBoolean", "(Ljava/lang/Object;)Z"); int falseTarget = acquireLabel(); if (type == Token.AND) addByteCode(ByteCode.IFEQ, falseTarget); else addByteCode(ByteCode.IFNE, falseTarget); addByteCode(ByteCode.POP); generateCodeFromNode(child.getNext(), node); markLabel(falseTarget); } break; case Token.ADD: { generateCodeFromNode(child, node); generateCodeFromNode(child.getNext(), node); switch (node.getIntProp(Node.ISNUMBER_PROP, -1)) { case Node.BOTH: addByteCode(ByteCode.DADD); break; case Node.LEFT: addOptRuntimeInvoke("add", "(DLjava/lang/Object;)Ljava/lang/Object;"); break; case Node.RIGHT: addOptRuntimeInvoke("add", "(Ljava/lang/Object;D)Ljava/lang/Object;"); break; default: addScriptRuntimeInvoke("add", "(Ljava/lang/Object;" +"Ljava/lang/Object;" +")Ljava/lang/Object;"); } } break; case Token.MUL: visitArithmetic(node, ByteCode.DMUL, child, parent); break; case Token.SUB: visitArithmetic(node, ByteCode.DSUB, child, parent); break; case Token.DIV: case Token.MOD: visitArithmetic(node, type == Token.DIV ? ByteCode.DDIV : ByteCode.DREM, child, parent); break; case Token.BITOR: case Token.BITXOR: case Token.BITAND: case Token.LSH: case Token.RSH: case Token.URSH: visitBitOp(node, type, child); break; case Token.POS: case Token.NEG: addByteCode(ByteCode.NEW, "java/lang/Double"); addByteCode(ByteCode.DUP); generateCodeFromNode(child, node); addScriptRuntimeInvoke("toNumber", "(Ljava/lang/Object;)D"); if (type == Token.NEG) { addByteCode(ByteCode.DNEG); } addDoubleConstructor(); break; case Optimizer.TO_DOUBLE: // cnvt to double (not Double) generateCodeFromNode(child, node); addScriptRuntimeInvoke("toNumber", "(Ljava/lang/Object;)D"); break; case Optimizer.TO_OBJECT: { // convert from double int prop = -1; if (child.getType() == Token.NUMBER) { prop = child.getIntProp(Node.ISNUMBER_PROP, -1); } if (prop != -1) { child.removeProp(Node.ISNUMBER_PROP); generateCodeFromNode(child, node); child.putIntProp(Node.ISNUMBER_PROP, prop); } else { addByteCode(ByteCode.NEW, "java/lang/Double"); addByteCode(ByteCode.DUP); generateCodeFromNode(child, node); addDoubleConstructor(); } break; } case Token.IN: case Token.INSTANCEOF: case Token.LE: case Token.LT: case Token.GE: case Token.GT: // need a result Object visitRelOp(node, child); break; case Token.EQ: case Token.NE: case Token.SHEQ: case Token.SHNE: visitEqOp(node, child); break; case Token.GETPROP: visitGetProp(node, child); break; case Token.GETELEM: while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } aload(variableObjectLocal); if (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1) { addOptRuntimeInvoke( "getElem", "(Ljava/lang/Object;D" +"Lorg/mozilla/javascript/Scriptable;" +")Ljava/lang/Object;"); } else { addScriptRuntimeInvoke( "getElem", "(Ljava/lang/Object;" +"Ljava/lang/Object;" +"Lorg/mozilla/javascript/Scriptable;" +")Ljava/lang/Object;"); } break; case Token.GETVAR: { OptLocalVariable lVar = (OptLocalVariable)(node.getProp(Node.VARIABLE_PROP)); visitGetVar(lVar, node.getIntProp(Node.ISNUMBER_PROP, -1) != -1, node.getString()); } break; case Token.SETVAR: visitSetVar(node, child, true); break; case Token.SETNAME: visitSetName(node, child); break; case Token.SETPROP: visitSetProp(node, child); break; case Token.SETELEM: while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } aload(variableObjectLocal); if (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1) { addOptRuntimeInvoke( "setElem", "(Ljava/lang/Object;" +"D" +"Ljava/lang/Object;" +"Lorg/mozilla/javascript/Scriptable;" +")Ljava/lang/Object;"); } else { addScriptRuntimeInvoke( "setElem", "(Ljava/lang/Object;" +"Ljava/lang/Object;" +"Ljava/lang/Object;" +"Lorg/mozilla/javascript/Scriptable;" +")Ljava/lang/Object;"); } break; case Token.DELPROP: aload(contextLocal); aload(variableObjectLocal); while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } addScriptRuntimeInvoke("delete", "(Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Ljava/lang/Object;" +"Ljava/lang/Object;" +")Ljava/lang/Object;"); break; case Token.BINDNAME: case Token.GETBASE: visitBind(node, type, child); break; case Token.GETTHIS: generateCodeFromNode(child, node); addScriptRuntimeInvoke("getThis", "(Lorg/mozilla/javascript/Scriptable;" +")Lorg/mozilla/javascript/Scriptable;"); break; case Token.PARENT: generateCodeFromNode(child, node); addScriptRuntimeInvoke("getParent", "(Ljava/lang/Object;" +")Lorg/mozilla/javascript/Scriptable;"); break; case Token.NEWTEMP: visitNewTemp(node, child); break; case Token.USETEMP: visitUseTemp(node, child); break; case Token.NEWLOCAL: visitNewLocal(node, child); break; case Token.USELOCAL: visitUseLocal(node, child); break; default: throw new RuntimeException("Unexpected node type "+type); } } | 12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/f4ef5c00b7c63e8fce3655104f541db47ac22d49/Codegen.java/buggy/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
1085,
28570,
12,
907,
756,
16,
2029,
982,
13,
565,
288,
3639,
368,
2332,
18,
659,
18,
8222,
2932,
4507,
981,
364,
315,
397,
756,
18,
10492,
10663,
3639,
509,
618,
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,
2103,
1085,
28570,
12,
907,
756,
16,
2029,
982,
13,
565,
288,
3639,
368,
2332,
18,
659,
18,
8222,
2932,
4507,
981,
364,
315,
397,
756,
18,
10492,
10663,
3639,
509,
618,
273,
... |
printALine("Normal:" + s + "\n"); | printALine("Normal:" + s); | public void printNormal(int i, String s) throws JposException { printALine("Normal:" + s + "\n"); } | 55411 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55411/50e591ea5c95658239a0137ecc83a56e6650655c/NullPosPrinter.java/clean/applications/pos/src/org/ofbiz/pos/jpos/service/NullPosPrinter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1172,
5506,
12,
474,
277,
16,
514,
272,
13,
1216,
804,
917,
503,
288,
3639,
1172,
1013,
558,
2932,
5506,
2773,
397,
272,
1769,
565,
289,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1172,
5506,
12,
474,
277,
16,
514,
272,
13,
1216,
804,
917,
503,
288,
3639,
1172,
1013,
558,
2932,
5506,
2773,
397,
272,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100... |
for (int i = 0; i < files.length; i++) { File f = new File(dir, files[i]); if (f.isDirectory()) { current_jars.insertElementAt(f, 0); } else if (isJarFile(f.getName())) { wsinfoList.addWSInfoItem(f, type); | if(files != null){ for (int i = 0; i < files.length; i++) { File f = new File(dir, files[i]); if (f.isDirectory()) { current_jars.insertElementAt(f, 0); } else if (isJarFile(f.getName())) { wsinfoList.addWSInfoItem(f, type); } | private void searchWS(String folderName, int type) { String files[]; current_jars = new Vector(); File root = new File(folderName); // adding the root folder to the vector current_jars.addElement(root); while (current_jars.size() > 0) { // loop until empty File dir = (File) current_jars.elementAt(0); // get first dir current_jars.remove(0); // remove it files = dir.list(); // get list of files for (int i = 0; i < files.length; i++) { // iterate File f = new File(dir, files[i]); if (f.isDirectory()) { // see if it's a directory current_jars.insertElementAt(f, 0); } // add dir to start of agenda else if (isJarFile(f.getName())) { wsinfoList.addWSInfoItem(f, type); } } } } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/e3d2304c8033291e4333ef6a97cac9b228cba19b/RepositaryListenerImpl.java/clean/dev/scratch/prototype1/src/java/org/apache/axis/deployment/deployEvents/RepositaryListenerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1623,
2651,
12,
780,
31814,
16,
509,
618,
13,
288,
3639,
514,
1390,
8526,
31,
3639,
783,
67,
78,
5913,
273,
394,
5589,
5621,
3639,
1387,
1365,
273,
394,
1387,
12,
5609,
461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1623,
2651,
12,
780,
31814,
16,
509,
618,
13,
288,
3639,
514,
1390,
8526,
31,
3639,
783,
67,
78,
5913,
273,
394,
5589,
5621,
3639,
1387,
1365,
273,
394,
1387,
12,
5609,
461,
... |
map.removeAllLinks(); | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ThreadCategory.setPrefix(LOG4J_CATEGORY); log = ThreadCategory.getInstance(this.getClass()); String elems = request.getParameter("elems"); String action = request.getParameter("action"); log.debug("Received action="+action+" elems="+elems); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(response .getOutputStream())); String strToSend = ""; try { HttpSession session = request.getSession(false); String refreshTime = (String)session.getAttribute("refreshTime"); int refreshtime = 300; if (refreshTime != null) { refreshtime = Integer.parseInt(refreshTime)*60; } Manager m = new Manager(); VMap map = null; List velems = new ArrayList();// List links = new ArrayList(); if (session != null) { map = (VMap) session.getAttribute("sessionMap"); if (map != null) { strToSend = action + "OK"; Integer[] nodeids = null; String TYPE = VElement.NODE_TYPE; boolean actionfound = false; if (action.equals(ADDNODES_ACTION)) { actionfound = true; String[] snodeids = elems.split(","); nodeids = new Integer[snodeids.length]; for (int i = 0; i<snodeids.length;i++) { nodeids[i] = new Integer(snodeids[i]); } } if (action.equals(ADDRANGE_ACTION)) { actionfound = true; nodeids = (Integer[]) NetworkElementFactory.getNodeIdsWithIpLike(elems).toArray(new Integer[0]); } if (action.equals(ADDNODES_NEIG_ACTION)) { actionfound = true; nodeids = (Integer[]) NetworkElementFactory.getLinkedNodeIdOnNode(Integer.parseInt(elems)).toArray(new Integer[0]); } if (action.equals(ADDNODES_WITH_NEIG_ACTION)) { actionfound = true; Set linkednodeids = NetworkElementFactory.getLinkedNodeIdOnNode(Integer.parseInt(elems)); linkednodeids.add(new Integer(elems)); nodeids = (Integer[]) linkednodeids.toArray(new Integer[0]); } if (action.equals(ADDMAPS_ACTION)) { actionfound = true; TYPE = VElement.MAP_TYPE; String[] snodeids = elems.split(","); nodeids = new Integer[snodeids.length]; for (int i = 0; i<snodeids.length;i++) { nodeids[i] = new Integer(snodeids[i]); } } // response for addElement if (actionfound) { log.debug("Before Checking map contains elems"); Connection conn = null; if(nodeids.length>0){ conn = Vault.getDbConnection(); } log.debug("Obtained connection"); for (int i = 0; i < nodeids.length; i++) { int elemId = nodeids[i].intValue(); if (map.containsElement(elemId, TYPE)) { log.debug("Action: " + action + " . Map Contains Element: " + elemId+TYPE); continue; } if (TYPE.equals(VElement.MAP_TYPE) && m.foundLoopOnMaps(map,elemId)) { strToSend += "&loopfound" + elemId; log.debug("Action: " + action + " . Map " + map.getName()+ "Loop Found On Element: " + elemId+TYPE); continue; } VElement curVElem = m.newElement(map.getId(), elemId, TYPE, conn); velems.add(curVElem); } // end for if(nodeids.length>0){ Vault.releaseDbConnection(conn); } log.debug("After Checking map contains elems"); log.debug("Before RefreshElements"); velems = m.refreshElements((VElement[]) velems.toArray(new VElement[0]),false); log.debug("After RefreshElements"); log.debug("Before getting/adding links"); conn = Vault.getDbConnection(); if (velems != null) { Iterator ite = velems.iterator(); while (ite.hasNext()) { // take the VElement object VElement ve = (VElement) ite.next(); // Get the link between ma objects and new Element List vElemLinks = m.getLinksOnElem(map .getAllElements(), ve, conn); // add MapElement to Map map.addElement(ve); // Add correpondant Links to Map map.addLinks((VLink[]) vElemLinks .toArray(new VLink[0])); // Add String to return to client strToSend += "&" + ve.getId() + ve.getType() + "+" + ve.getIcon() + "+" + ve.getLabel(); strToSend += "+" + ve.getRtc() + "+" + ve.getStatus() + "+" + ve.getSeverity(); // add String to return containing Links if (vElemLinks != null) { Iterator sub_ite = vElemLinks.iterator(); while (sub_ite.hasNext()) { VLink vl = (VLink) sub_ite.next(); strToSend += "&" + vl.getFirst().getId() + vl.getFirst().getType() + "+" + vl.getSecond().getId() + vl.getSecond().getType(); } } } // end cicle on element found } Vault.releaseDbConnection(conn); log.debug("After getting/adding links"); //end if velement to add } // and first if action found if (!actionfound) { if (action.equals(DELETENODES_ACTION)) { actionfound = true; TYPE = VElement.NODE_TYPE; String[] snodeids = elems.split(","); nodeids = new Integer[snodeids.length]; for (int i = 0; i<snodeids.length;i++) { nodeids[i] = new Integer(snodeids[i]); } } if (action.equals(DELETEMAPS_ACTION)) { actionfound = true; TYPE = VElement.MAP_TYPE; String[] snodeids = elems.split(","); nodeids = new Integer[snodeids.length]; for (int i = 0; i<snodeids.length;i++) { nodeids[i] = new Integer(snodeids[i]); } } if (actionfound) { for (int i = 0; i < nodeids.length; i++) { int elemId = nodeids[i].intValue(); if (map.containsElement(elemId, TYPE)){ map.removeLinksOnElementList(elemId,TYPE); velems.add(map.removeElement(elemId,TYPE)); strToSend += "&" + elemId + TYPE; } } } } if (action.equals(REFRESH_ACTION)) { actionfound = true; // First refresh Element objects velems = m.refreshElements(map.getAllElements(),true); //checks for only changed velements if (velems != null) { Iterator ite = velems.iterator(); while (ite.hasNext()) { VElement ve = (VElement) ite.next(); strToSend += "&" + ve.getId() + ve.getType() + "+" + ve.getIcon() + "+" + ve.getLabel(); strToSend += "+" + ve.getRtc() + "+" + ve.getStatus() + "+" + ve.getSeverity(); } } // Second Refresh Link Object on Map // Now is done using a very simple way // but really it's slow // the alternativ is anyway to analize all // links, 1 against other. // So with this solution more traffic // less stress on server // more work on client // We are waiting to attempt to mapd map.removeAllLinks(); // get all links on map List links = m.getLinks(map.getAllElements()); // add links to map map.addLinks((VLink[]) links.toArray(new VLink[0])); // write to client if (links != null) { Iterator ite = links.iterator(); while (ite.hasNext()) { VLink vl = (VLink) ite.next(); strToSend += "&" + vl.getFirst().getId() + vl.getFirst().getType() + "+" + vl.getSecond().getId() + vl.getSecond().getType(); } } } if (action.equals(CLEAR_ACTION)) { actionfound = true; map.removeAllLinks(); map.removeAllElements(); } if (actionfound) { session.setAttribute("sessionMap",map); } else { throw new Exception("action " + action + " not exists"); } } else { throw new Exception("Attribute session sessionMap is null"); } } else { throw new Exception("HttpSession not initialized"); } } catch (Exception e) { strToSend = action + "Failed"; log.error("Exception catch " + e); } finally { bw.write(strToSend); bw.close(); log.info("Sending response to the client '" + strToSend + "'"); } } | 25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/069d0e7b3a96289b7c94aecc6c8a14fee3498895/LoadCurrentNodesServlet.java/buggy/opennms-webapp/src/main/java/org/opennms/web/map/LoadCurrentNodesServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
741,
3349,
12,
2940,
18572,
590,
16,
12446,
766,
13,
1082,
202,
15069,
16517,
16,
1860,
288,
202,
202,
3830,
4457,
18,
542,
2244,
12,
4842,
24,
46,
67,
24847,
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,
918,
741,
3349,
12,
2940,
18572,
590,
16,
12446,
766,
13,
1082,
202,
15069,
16517,
16,
1860,
288,
202,
202,
3830,
4457,
18,
542,
2244,
12,
4842,
24,
46,
67,
24847,
1769,
202,
... | |
public synchronized Resource getWSDLResource(WebServiceDescription webService) { | public Resource getWSDLResource(WebServiceDescription webService) { | public synchronized Resource getWSDLResource(WebServiceDescription webService) { if (webService == null) return null; String wsdlFileName = webService.getWsdlFile(); Resource res = null; IVirtualResource[] resources = ComponentCore.createResources(WorkbenchResourceHelper.getFile(webService)); if (resources == null) return res; WSDDArtifactEdit artifactEdit = (WSDDArtifactEdit) getWSArtifactEdits().get(resources[0].getComponent().getProject()); if (artifactEdit!=null) res = artifactEdit.getWsdlResource(wsdlFileName); return res; } | 8196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8196/7e6f7c743cce4571bba8d7771cc2541a12e90e16/WebServicesManager.java/clean/plugins/org.eclipse.jst.j2ee.webservice/webservice/org/eclipse/jst/j2ee/internal/webservice/helper/WebServicesManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
2591,
336,
2651,
8914,
1420,
12,
31946,
3291,
3311,
1179,
13,
288,
202,
202,
430,
261,
4875,
1179,
422,
446,
13,
1082,
202,
2463,
446,
31,
202,
202,
780,
17642,
4771,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
2591,
336,
2651,
8914,
1420,
12,
31946,
3291,
3311,
1179,
13,
288,
202,
202,
430,
261,
4875,
1179,
422,
446,
13,
1082,
202,
2463,
446,
31,
202,
202,
780,
17642,
4771,
27... |
((AbstractElement)n).initializeAttributes(); | ((AbstractElement)n).initializeAttributes(); | protected Node deepExport(Node n, AbstractDocument d) { super.export(n, d); ((AbstractElement)n).initializeAttributes(); super.deepExport(n, d); return n; } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/6cd7a6a45cf75920b5149201c434a76d795b3b89/AbstractElement.java/buggy/sources/org/apache/batik/dom/svg/AbstractElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
2029,
4608,
6144,
12,
907,
290,
16,
4115,
2519,
302,
13,
288,
3639,
2240,
18,
6530,
12,
82,
16,
302,
1769,
2868,
14015,
7469,
1046,
13,
82,
2934,
11160,
2498,
5621,
3639,
2240,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
2029,
4608,
6144,
12,
907,
290,
16,
4115,
2519,
302,
13,
288,
3639,
2240,
18,
6530,
12,
82,
16,
302,
1769,
2868,
14015,
7469,
1046,
13,
82,
2934,
11160,
2498,
5621,
3639,
2240,
18... |
if ( project.hasNature( REPORTPROJECTKID )) | if ( project.hasNature( type ) ) | private IProject[] getInterestProject( ) { List retValue = new ArrayList( ); IProject[] allProjects = ResourcesPlugin.getWorkspace( ).getRoot( ) .getProjects( ); if ( allProjects == null ) { return new IProject[]{}; } int len = allProjects.length; for ( int i = 0; i < len; i++ ) { IProject project = allProjects[i]; try { if ( project.hasNature( REPORTPROJECTKID )) { retValue.add( project ); } } catch ( CoreException e ) { } } IProject[] temp = new IProject[retValue.size( )]; temp = (IProject[]) retValue.toArray( temp ); return temp; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/93f83d28c012c9318e61bf947b01279cec0512a3/ReportAdvancedLauncherTab.java/clean/UI/org.eclipse.birt.report.debug.ui/src/org/eclipse/birt/report/debug/ui/launching/ReportAdvancedLauncherTab.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
4109,
8526,
336,
29281,
4109,
12,
262,
202,
95,
202,
202,
682,
21236,
273,
394,
2407,
12,
11272,
202,
202,
45,
4109,
8526,
777,
15298,
273,
8128,
3773,
18,
588,
8241,
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,
225,
202,
1152,
467,
4109,
8526,
336,
29281,
4109,
12,
262,
202,
95,
202,
202,
682,
21236,
273,
394,
2407,
12,
11272,
202,
202,
45,
4109,
8526,
777,
15298,
273,
8128,
3773,
18,
588,
8241,
12... |
javaModule.defineClassUnder("JavaConstructor", runtime.getClasses().getObjectClass()); | javaModule.defineClassUnder("JavaConstructor", runtime.getObject()); | public static RubyClass createJavaConstructorClass(Ruby runtime, RubyModule javaModule) { RubyClass result = javaModule.defineClassUnder("JavaConstructor", runtime.getClasses().getObjectClass()); CallbackFactory callbackFactory = runtime.callbackFactory(JavaConstructor.class); JavaCallable.registerRubyMethods(runtime, result, JavaConstructor.class); result.defineMethod("arity", callbackFactory.getMethod("arity")); result.defineMethod("inspect", callbackFactory.getMethod("inspect")); result.defineMethod("argument_types", callbackFactory.getMethod("argument_types")); result.defineMethod("new_instance", callbackFactory.getOptMethod("new_instance")); return result; } | 45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/ca6b16e996ea9af83ce593594b9c69b9364a9924/JavaConstructor.java/clean/src/org/jruby/javasupport/JavaConstructor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
5852,
6293,
797,
12,
54,
10340,
3099,
16,
19817,
3120,
2252,
3120,
13,
288,
3639,
19817,
797,
563,
273,
7734,
2252,
3120,
18,
11255,
797,
14655,
2932,
5852,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
797,
752,
5852,
6293,
797,
12,
54,
10340,
3099,
16,
19817,
3120,
2252,
3120,
13,
288,
3639,
19817,
797,
563,
273,
7734,
2252,
3120,
18,
11255,
797,
14655,
2932,
5852,
62... |
if (jj_scan_token(STRICTFP)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; | if (jj_scan_token(THIS)) return true; if (jj_3R_55()) return true; if (jj_scan_token(SEMICOLON)) return true; | final private boolean jj_3R_70() { if (jj_scan_token(STRICTFP)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/d42ce7980bc2030e88ae13be5cf1b864eee291da/JavaParser.java/clean/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
7301,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
30776,
30246,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
11821,
422,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
3238,
1250,
10684,
67,
23,
54,
67,
7301,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
30776,
30246,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
11821,
422,
374,
... |
return writeTo(new StringBuffer()).toString(); } | return writeTo(new StringBuffer()).toString(); } | public String getMessage() { return writeTo(new StringBuffer()).toString(); } | 2796 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2796/a917aff361c58c31c5dce12a5e8052df6803dbe1/DynamicMockError.java/clean/jmock/core/src/org/jmock/core/DynamicMockError.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
2381,
1435,
288,
202,
202,
2463,
12870,
12,
2704,
6674,
1435,
2934,
10492,
5621,
202,
97,
2,
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,
225,
202,
482,
514,
2381,
1435,
288,
202,
202,
2463,
12870,
12,
2704,
6674,
1435,
2934,
10492,
5621,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
System.out.println("IOException occured"); | logger.warning("IOException occured"); | public void addToolbarButton(GrendelToolBar aToolBar, Event aActionListener, String aImageName, String aToolTip) { JButton b = new JButton(); b.setHorizontalTextPosition(JButton.CENTER); b.setVerticalTextPosition(JButton.BOTTOM); b.setToolTipText(aToolTip); // URL iconUrl = getClass().getResource("images/" + gifName + ".gif"); // b.setIcon(new ImageIcon(getClass().getResource(aImageName))); File resourceFile = new File(aImageName); try { if (resourceFile.exists()) { b.setIcon(new ImageIcon(resourceFile.getCanonicalPath())); } } catch (IOException e) { System.out.println("IOException occured"); } // iconUrl = getClass().getResource("images/" + gifName + "-disabled.gif"); // button.setDisabledIcon(ImageIcon.createImageIcon(iconUrl)); // iconUrl = getClass().getResource("images/" + gifName + "-depressed.gif"); // button.setPressedIcon(ImageIcon.createImageIcon(iconUrl)); // iconUrl = getClass().getResource("images/" + gifName + "-rollover.gif"); // button.setRolloverIcon(ImageIcon.createImageIcon(iconUrl)); // JButton b = new JButton(new ImageIcon(aImageName)); b.setToolTipText(aToolTip); // b.setPad(new Insets(3,3,3,3)); if (aActionListener != null) { b.addActionListener(aActionListener);} aToolBar.add(b); } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/dba8c3b6ca55297114840a7e8d6a99e1d87d27cb/AddressBook.java/buggy/grendel/sources/grendel/addressbook/AddressBook.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
527,
17907,
3616,
12,
43,
1187,
3771,
6364,
5190,
279,
6364,
5190,
16,
1171,
9079,
2587,
279,
1803,
2223,
16,
1171,
9079,
514,
279,
2040,
461,
16,
514,
279,
29250,
13,
288,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
17907,
3616,
12,
43,
1187,
3771,
6364,
5190,
279,
6364,
5190,
16,
1171,
9079,
2587,
279,
1803,
2223,
16,
1171,
9079,
514,
279,
2040,
461,
16,
514,
279,
29250,
13,
288,
5... |
return connector.addInvocationHandler(s, h); | subsystemToHandler.put(subsystem, h); return connector.addInvocationHandler(subsystem, h); | public ServerInvocationHandler addInvocationHandler(String s, ServerInvocationHandler h) throws Exception { if (connector != null) { return connector.addInvocationHandler(s, h); } return null; } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/dd372eb936dff623882e6737690eac000e0d9ac3/RemotingJMXWrapper.java/clean/tests/src/org/jboss/test/messaging/tools/jmx/RemotingJMXWrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
3224,
9267,
1503,
527,
9267,
1503,
12,
780,
272,
16,
3224,
9267,
1503,
366,
13,
1377,
1216,
1185,
282,
288,
1377,
309,
261,
23159,
480,
446,
13,
1377,
288,
540,
15359,
774,
1503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
565,
1071,
3224,
9267,
1503,
527,
9267,
1503,
12,
780,
272,
16,
3224,
9267,
1503,
366,
13,
1377,
1216,
1185,
282,
288,
1377,
309,
261,
23159,
480,
446,
13,
1377,
288,
540,
15359,
774,
1503,
... |
public org.quickfix.field.CoveredOrUncovered getCoveredOrUncovered() throws FieldNotFound { org.quickfix.field.CoveredOrUncovered value = new org.quickfix.field.CoveredOrUncovered(); | public quickfix.field.CoveredOrUncovered getCoveredOrUncovered() throws FieldNotFound { quickfix.field.CoveredOrUncovered value = new quickfix.field.CoveredOrUncovered(); | public org.quickfix.field.CoveredOrUncovered getCoveredOrUncovered() throws FieldNotFound { org.quickfix.field.CoveredOrUncovered value = new org.quickfix.field.CoveredOrUncovered(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/NewOrderSingle.java/buggy/src/java/src/quickfix/fix42/NewOrderSingle.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8084,
329,
1162,
984,
16810,
1927,
1643,
329,
1162,
984,
16810,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8084,
329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2358,
18,
19525,
904,
18,
1518,
18,
8084,
329,
1162,
984,
16810,
1927,
1643,
329,
1162,
984,
16810,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8084,
329,
... |
setPatternFromControls( ); | setFmtPatternFromControls( ); | private void updatePreview( ) { markDirty( hasLoaded ); if ( hasLoaded ) {// avoid setting pattern from controls when the typechoicer is selected // before loading. setPatternFromControls( ); } String category = getCategory4DisplayName( typeChoicer.getText( ) ); FormatNumberPattern fmtPattern = getFmtPattern4Category( category ); setCategory( fmtPattern.getCategory( ) ); setPattern( fmtPattern.getPattern( ) ); doPreview( fmtPattern.getPattern( ) ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/a037c90be1076dbd56aea4fca2068d72d718af1c/FormatNumberPage.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/FormatNumberPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1089,
11124,
12,
262,
202,
95,
202,
202,
3355,
10785,
12,
711,
8835,
11272,
202,
202,
430,
261,
711,
8835,
262,
202,
202,
95,
759,
4543,
3637,
1936,
628,
11022,
1347,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
11124,
12,
262,
202,
95,
202,
202,
3355,
10785,
12,
711,
8835,
11272,
202,
202,
430,
261,
711,
8835,
262,
202,
202,
95,
759,
4543,
3637,
1936,
628,
11022,
1347,
32... |
en.crew.setRollsNeeded(0); | private String damageCrew(Entity en, int damage) { String s = new String(); if (!en.crew.isDead()) { en.crew.setHits(en.crew.getHits() + damage); s += " Pilot of " + en.getDisplayName() + " \"" + en.crew.getName() + "\" takes " + damage + " damage."; if (en.crew.getHits() < 6) { en.crew.setRollsNeeded(en.crew.getRollsNeeded() + damage); } else { en.crew.setDoomed(true); en.crew.setRollsNeeded(0); s += "\n*** " + en.getDisplayName() + " PILOT KILLED! ***"; } } return s; } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/b2133f3c815cfdb478b267315c8565de68178150/Server.java/buggy/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
302,
301,
410,
1996,
91,
12,
1943,
570,
16,
509,
302,
301,
410,
13,
288,
3639,
514,
272,
273,
394,
514,
5621,
7734,
309,
16051,
275,
18,
1793,
91,
18,
291,
11852,
10756,
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,
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,
514,
302,
301,
410,
1996,
91,
12,
1943,
570,
16,
509,
302,
301,
410,
13,
288,
3639,
514,
272,
273,
394,
514,
5621,
7734,
309,
16051,
275,
18,
1793,
91,
18,
291,
11852,
10756,
28... | |
_loop422: | _loop151: | public final Expression functionCall(AST _t, PathExpr path ) throws RecognitionException, PermissionDeniedException,EXistException,XPathException { Expression step; org.exist.xquery.parser.XQueryAST functionCall_AST_in = (_t == ASTNULL) ? null : (org.exist.xquery.parser.XQueryAST)_t; org.exist.xquery.parser.XQueryAST fn = null; PathExpr pathExpr; step= null; AST __t420 = _t; fn = _t==ASTNULL ? null :(org.exist.xquery.parser.XQueryAST)_t; match(_t,FUNCTION); _t = _t.getFirstChild(); List params= new ArrayList(2); { _loop422: do { if (_t==null) _t=ASTNULL; if ((_tokenSet_0.member(_t.getType()))) { pathExpr= new PathExpr(context); expr(_t,pathExpr); _t = _retTree; params.add(pathExpr); } else { break _loop422; } } while (true); } _t = __t420; _t = _t.getNextSibling(); step= FunctionFactory.createFunction(context, fn, path, params); _retTree = _t; return step; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/06537933dfbae14c444eb15b44247b312b5f47d7/XQueryTreeParser.java/clean/src/org/exist/xquery/parser/XQueryTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
445,
1477,
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,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
445,
1477,
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,
22... |
AttributeMapping mapping = getMapping((ConcreteMarker) node); return mapping.displayString; | MarkerGroupingEntry groupingEntry = getMapping((ConcreteMarker) node); return groupingEntry.getLabel(); | public String getValue(Object obj) { MarkerNode node = (MarkerNode) obj; if (node.isConcrete()) { AttributeMapping mapping = getMapping((ConcreteMarker) node); return mapping.displayString; } return node.getDescription(); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/fab28e991ab1470bd33550910176a06626d8e707/FieldMarkerGroup.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/FieldMarkerGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
2366,
12,
921,
1081,
13,
288,
202,
202,
7078,
907,
756,
273,
261,
7078,
907,
13,
1081,
31,
202,
202,
430,
261,
2159,
18,
291,
25845,
10756,
288,
1082,
202,
1499,
3233,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2366,
12,
921,
1081,
13,
288,
202,
202,
7078,
907,
756,
273,
261,
7078,
907,
13,
1081,
31,
202,
202,
430,
261,
2159,
18,
291,
25845,
10756,
288,
1082,
202,
1499,
3233,
... |
setProperty( TemplateParameterDefinition.ALLOWED_TYPE_PROP, | setProperty( ITemplateParameterDefinitionModel.ALLOWED_TYPE_PROP, | public void end( ) throws SAXException { DesignElement defaultElement = element.getDefaultElement( ); if ( defaultElement == null ) { // the default element of the template parameter definition must not // be null handler .getErrorHandler( ) .semanticError( new DesignParserException( new String[]{element.getIdentifier( )}, DesignParserException.DESIGN_EXCEPTION_MISSING_TEMPLATE_PARAMETER_DEFAULT ) ); } else { // if allowed type is empty or inconsistent with the default // element, then set it to the type of the default element String allowedType = element.getAllowedType( handler.getModule( ) ); if ( defaultElement instanceof ReportItem ) { if ( !defaultElement.getElementName( ).equals( allowedType ) ) setProperty( TemplateParameterDefinition.ALLOWED_TYPE_PROP, defaultElement.getElementName( ) ); } else if ( defaultElement instanceof SimpleDataSet ) { if ( !DesignChoiceConstants.TEMPLATE_ELEMENT_TYPE_DATA_SET .equals( allowedType ) ) setProperty( TemplateParameterDefinition.ALLOWED_TYPE_PROP, DesignChoiceConstants.TEMPLATE_ELEMENT_TYPE_DATA_SET ); } else { assert false; } } super.end( ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/d802c33711e0d111551ae23575895cd060f085b6/TemplateParameterDefinitionState.java/clean/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/parser/TemplateParameterDefinitionState.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
679,
12,
262,
1216,
14366,
202,
95,
202,
202,
15478,
1046,
805,
1046,
273,
930,
18,
588,
1868,
1046,
12,
11272,
202,
202,
430,
261,
805,
1046,
422,
446,
262,
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,
679,
12,
262,
1216,
14366,
202,
95,
202,
202,
15478,
1046,
805,
1046,
273,
930,
18,
588,
1868,
1046,
12,
11272,
202,
202,
430,
261,
805,
1046,
422,
446,
262,
202,
202,
... |
if (annot.isForm()) { PdfFormField field = (PdfFormField)annot; if (field.getParent() == null) addFormFieldRaw(field); } else annotations.add(annot); | if (annot.isForm()) { PdfFormField field = (PdfFormField)annot; if (field.getParent() == null) addFormFieldRaw(field); } else annotations.add(annot); | void addAnnotation(PdfAnnotation annot) { if (annot.isForm()) { PdfFormField field = (PdfFormField)annot; if (field.getParent() == null) addFormFieldRaw(field); } else annotations.add(annot); } | 3011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3011/6288f051b807f9da0a0f308a00b5851da285b8fb/PdfDocument.java/clean/itext/src/com/lowagie/text/pdf/PdfDocument.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
24145,
12,
18562,
3257,
6545,
13,
288,
3639,
309,
261,
18338,
18,
291,
1204,
10756,
288,
5411,
9989,
27317,
652,
273,
261,
18562,
27317,
13,
18338,
31,
5411,
309,
261,
1518,
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,
377,
918,
24145,
12,
18562,
3257,
6545,
13,
288,
3639,
309,
261,
18338,
18,
291,
1204,
10756,
288,
5411,
9989,
27317,
652,
273,
261,
18562,
27317,
13,
18338,
31,
5411,
309,
261,
1518,
18,
588,... |
"Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), | "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12), | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoableEdit.undoText", "Undo", "AbstractUndoableEdit.redoText", "Redo", "Button.background", new ColorUIResource(Color.LIGHT_GRAY), "Button.border", new UIDefaults.LazyValue() { public Object createValue(UIDefaults table) { return BasicBorders.getButtonBorder(); } }, "Button.darkShadow", new ColorUIResource(Color.BLACK), "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "Button.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Button.foreground", new ColorUIResource(Color.BLACK), "Button.highlight", new ColorUIResource(Color.WHITE), "Button.light", new ColorUIResource(Color.LIGHT_GRAY), "Button.margin", new InsetsUIResource(2, 2, 2, 2), "Button.shadow", new ColorUIResource(Color.GRAY), "Button.textIconGap", new Integer(4), "Button.textShiftOffset", new Integer(0), "CheckBox.background", new ColorUIResource(new Color(204, 204, 204)), "CheckBox.border", new BorderUIResource.CompoundBorderUIResource(null, null), "CheckBox.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBox.foreground", new ColorUIResource(darkShadow), "CheckBox.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return BasicIconFactory.getCheckBoxIcon(); } }, "CheckBox.checkIcon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return BasicIconFactory.getMenuItemCheckIcon(); } }, "CheckBox.margin",new InsetsUIResource(2, 2, 2, 2), "CheckBox.textIconGap", new Integer(4), "CheckBox.textShiftOffset", new Integer(0), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.acceleratorForeground", new ColorUIResource(new Color(16, 16, 16)), "CheckBoxMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "CheckBoxMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "CheckBoxMenuItem.background", new ColorUIResource(light), "CheckBoxMenuItem.border", new BasicBorders.MarginBorder(), "CheckBoxMenuItem.borderPainted", Boolean.FALSE, "CheckBoxMenuItem.checkIcon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return BasicIconFactory.getCheckBoxMenuItemIcon(); } }, "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.foreground", new ColorUIResource(darkShadow), "CheckBoxMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "CheckBoxMenuItem.selectionBackground", new ColorUIResource(Color.black), "CheckBoxMenuItem.selectionForeground", new ColorUIResource(Color.white), "ColorChooser.background", new ColorUIResource(light), "ColorChooser.cancelText", "Cancel", "ColorChooser.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ColorChooser.foreground", new ColorUIResource(darkShadow), "ColorChooser.hsbBlueText", "B", "ColorChooser.hsbBrightnessText", "B", "ColorChooser.hsbGreenText", "G", "ColorChooser.hsbHueText", "H", "ColorChooser.hsbNameText", "HSB", "ColorChooser.hsbRedText", "R", "ColorChooser.hsbSaturationText", "S", "ColorChooser.okText", "OK", "ColorChooser.previewText", "Preview", "ColorChooser.resetText", "Reset", "ColorChooser.rgbBlueMnemonic", new Integer(66), "ColorChooser.rgbBlueText", "Blue", "ColorChooser.rgbGreenMnemonic", new Integer(71), "ColorChooser.rgbGreenText", "Green", "ColorChooser.rgbNameText", "RGB", "ColorChooser.rgbRedMnemonic", new Integer(82), "ColorChooser.rgbRedText", "Red", "ColorChooser.sampleText", "Sample Text Sample Text", "ColorChooser.swatchesDefaultRecentColor", new ColorUIResource(light), "ColorChooser.swatchesNameText", "Swatches", "ColorChooser.swatchesRecentSwatchSize", new Dimension(10, 10), "ColorChooser.swatchesRecentText", "Recent:", "ColorChooser.swatchesSwatchSize", new Dimension(10, 10), "ComboBox.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "hidePopup", "PAGE_UP", "pageUpPassThrough", "PAGE_DOWN", "pageDownPassThrough", "HOME", "homePassThrough", "END", "endPassThrough" }), "ComboBox.background", new ColorUIResource(light), "ComboBox.buttonBackground", new ColorUIResource(light), "ComboBox.buttonDarkShadow", new ColorUIResource(shadow), "ComboBox.buttonHighlight", new ColorUIResource(highLight), "ComboBox.buttonShadow", new ColorUIResource(shadow), "ComboBox.disabledBackground", new ColorUIResource(light), "ComboBox.disabledForeground", new ColorUIResource(Color.gray), "ComboBox.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ComboBox.foreground", new ColorUIResource(Color.black), "ComboBox.selectionBackground", new ColorUIResource(Color.black), "ComboBox.selectionForeground", new ColorUIResource(Color.white), "Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "KP_LEFT", "left", "KP_RIGHT", "right", "ctrl F5", "restore", "LEFT", "left", "ctrl alt F6", "selectNextFrame", "UP", "up", "ctrl F6", "selectNextFrame", "RIGHT", "right", "DOWN", "down", "ctrl F7", "move", "ctrl F8", "resize", "ESCAPE", "escape", "ctrl TAB", "selectNextFrame", "ctrl F9", "minimize", "KP_UP", "up", "ctrl F4", "close", "KP_DOWN", "down", "ctrl F10", "maximize", "ctrl alt shift F6","selectPreviousFrame" }), "DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null, null), "EditorPane.background", new ColorUIResource(Color.white), "EditorPane.border", new BasicBorders.MarginBorder(), "EditorPane.caretBlinkRate", new Integer(500), "EditorPane.caretForeground", new ColorUIResource(Color.black), "EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "EditorPane.foreground", new ColorUIResource(Color.black), "EditorPane.inactiveForeground", new ColorUIResource(Color.gray), "EditorPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "EditorPane.margin", new InsetsUIResource(3, 3, 3, 3), "EditorPane.selectionBackground", new ColorUIResource(Color.black), "EditorPane.selectionForeground", new ColorUIResource(Color.white), "FileChooser.acceptAllFileFilterText", "All Files (*.*)", "FileChooser.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancelSelection" }), "FileChooser.cancelButtonMnemonic", new Integer(67), "FileChooser.cancelButtonText", "Cancel", "FileChooser.cancelButtonToolTipText", "Abort file chooser dialog", // XXX Don't use gif// "FileChooser.detailsViewIcon", new IconUIResource(new ImageIcon("icons/DetailsView.gif")), "FileChooser.directoryDescriptionText", "Directory", "FileChooser.fileDescriptionText", "Generic File", "FileChooser.helpButtonMnemonic", new Integer(72), "FileChooser.helpButtonText", "Help", "FileChooser.helpButtonToolTipText", "FileChooser help", // XXX Don't use gif// "FileChooser.homeFolderIcon", new IconUIResource(new ImageIcon("icons/HomeFolder.gif")), // XXX Don't use gif// "FileChooser.listViewIcon", new IconUIResource(new ImageIcon("icons/ListView.gif")), "FileChooser.newFolderErrorSeparator", ":", "FileChooser.newFolderErrorText", "Error creating new folder", // XXX Don't use gif// "FileChooser.newFolderIcon", new IconUIResource(new ImageIcon("icons/NewFolder.gif")), "FileChooser.openButtonMnemonic", new Integer(79), "FileChooser.openButtonText", "Open", "FileChooser.openButtonToolTipText", "Open selected file", "FileChooser.saveButtonMnemonic", new Integer(83), "FileChooser.saveButtonText", "Save", "FileChooser.saveButtonToolTipText", "Save selected file", // XXX Don't use gif// "FileChooser.upFolderIcon", new IconUIResource(new ImageIcon("icons/UpFolder.gif")), "FileChooser.updateButtonMnemonic", new Integer(85), "FileChooser.updateButtonText", "Update", "FileChooser.updateButtonToolTipText", "Update directory listing", // XXX Don't use gif// "FileView.computerIcon", new IconUIResource(new ImageIcon("icons/Computer.gif")), // XXX Don't use gif// "FileView.directoryIcon", new IconUIResource(new ImageIcon("icons/Directory.gif")), // XXX Don't use gif// "FileView.fileIcon", new IconUIResource(new ImageIcon("icons/File.gif")), // XXX Don't use gif// "FileView.floppyDriveIcon", new IconUIResource(new ImageIcon("icons/Floppy.gif")), // XXX Don't use gif// "FileView.hardDriveIcon", new IconUIResource(new ImageIcon("icons/HardDrive.gif")), "FocusManagerClassName", "TODO", "FormattedTextField.background", new ColorUIResource(light), "FormattedTextField.caretForeground", new ColorUIResource(Color.black), "FormattedTextField.foreground", new ColorUIResource(Color.black), "FormattedTextField.inactiveBackground", new ColorUIResource(light), "FormattedTextField.inactiveForeground", new ColorUIResource(Color.gray), "FormattedTextField.selectionBackground", new ColorUIResource(Color.black), "FormattedTextField.selectionForeground", new ColorUIResource(Color.white), "FormView.resetButtonText", "Reset", "FormView.submitButtonText", "Submit Query", "InternalFrame.activeTitleBackground", new ColorUIResource(0, 0, 128), "InternalFrame.activeTitleForeground", new ColorUIResource(Color.white), "InternalFrame.border", new UIDefaults.LazyValue() { public Object createValue(UIDefaults table) { Color lineColor = new Color(238, 238, 238); Border inner = BorderFactory.createLineBorder(lineColor, 1); Color shadowInner = new Color(184, 207, 229); Color shadowOuter = new Color(122, 138, 153); Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED, Color.WHITE, Color.WHITE, shadowOuter, shadowInner); Border border = new BorderUIResource.CompoundBorderUIResource(outer, inner); return border; } }, "InternalFrame.borderColor", new ColorUIResource(light), "InternalFrame.borderDarkShadow", new ColorUIResource(Color.BLACK), "InternalFrame.borderHighlight", new ColorUIResource(Color.WHITE), "InternalFrame.borderLight", new ColorUIResource(Color.LIGHT_GRAY), "InternalFrame.borderShadow", new ColorUIResource(Color.GRAY), "InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(), // FIXME: Set a nice icon for InternalFrames here. "InternalFrame.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return new IconUIResource(BasicIconFactory.createEmptyFrameIcon()); } }, "InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.inactiveTitleBackground", new ColorUIResource(Color.gray), "InternalFrame.inactiveTitleForeground", new ColorUIResource(Color.lightGray), "InternalFrame.maximizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.minimizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.titleFont", new FontUIResource("Dialog", Font.BOLD, 12), "InternalFrame.windowBindings", new Object[] { "shift ESCAPE", "showSystemMenu", "ctrl SPACE", "showSystemMenu", "ESCAPE", "showSystemMenu" }, "Label.background", new ColorUIResource(light), "Label.disabledForeground", new ColorUIResource(Color.white), "Label.disabledShadow", new ColorUIResource(shadow), "Label.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Label.foreground", new ColorUIResource(darkShadow), "List.background", new ColorUIResource(light), "List.border", new BasicBorders.MarginBorder(), "List.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "ctrl \\", "clearSelection", "PAGE_DOWN", "scrollDown", "shift PAGE_DOWN","scrollDownExtendSelection", "END", "selectLastRow", "HOME", "selectFirstRow", "shift END", "selectLastRowExtendSelection", "shift HOME", "selectFirstRowExtendSelection", "UP", "selectPreviousRow", "ctrl /", "selectAll", "ctrl A", "selectAll", "DOWN", "selectNextRow", "shift UP", "selectPreviousRowExtendSelection", "ctrl SPACE", "selectNextRowExtendSelection", "shift DOWN", "selectNextRowExtendSelection", "KP_UP", "selectPreviousRow", "shift PAGE_UP","scrollUpExtendSelection", "KP_DOWN", "selectNextRow" }), "List.foreground", new ColorUIResource(darkShadow), "List.selectionBackground", new ColorUIResource(Color.black), "List.selectionForeground", new ColorUIResource(Color.white), "List.focusCellHighlightBorder", new BorderUIResource. LineBorderUIResource(new ColorUIResource(Color.yellow)), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.acceleratorForeground", new ColorUIResource(darkShadow), "Menu.acceleratorSelectionForeground", new ColorUIResource(Color.white), "Menu.arrowIcon", BasicIconFactory.getMenuArrowIcon(), "Menu.background", new ColorUIResource(light), "Menu.border", new BasicBorders.MarginBorder(), "Menu.borderPainted", Boolean.FALSE, "Menu.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "Menu.consumesTabs", Boolean.TRUE, "Menu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.foreground", new ColorUIResource(darkShadow), "Menu.margin", new InsetsUIResource(2, 2, 2, 2), "Menu.selectedWindowInputMapBindings", new Object[] { "ESCAPE", "cancel", "DOWN", "selectNext", "KP_DOWN", "selectNext", "UP", "selectPrevious", "KP_UP", "selectPrevious", "LEFT", "selectParent", "KP_LEFT", "selectParent", "RIGHT", "selectChild", "KP_RIGHT", "selectChild", "ENTER", "return", "SPACE", "return" }, "Menu.selectionBackground", new ColorUIResource(Color.black), "Menu.selectionForeground", new ColorUIResource(Color.white), "MenuBar.background", new ColorUIResource(light), "MenuBar.border", new BasicBorders.MenuBarBorder(null, null), "MenuBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuBar.foreground", new ColorUIResource(darkShadow), "MenuBar.highlight", new ColorUIResource(highLight), "MenuBar.shadow", new ColorUIResource(shadow), "MenuBar.windowBindings", new Object[] { "F10", "takeFocus" }, "MenuItem.acceleratorDelimiter", "-", "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "MenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "MenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "MenuItem.background", new ColorUIResource(light), "MenuItem.border", new BasicBorders.MarginBorder(), "MenuItem.borderPainted", Boolean.FALSE, "MenuItem.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "MenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.foreground", new ColorUIResource(darkShadow), "MenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "MenuItem.selectionBackground", new ColorUIResource(Color.black), "MenuItem.selectionForeground", new ColorUIResource(Color.white), "OptionPane.background", new ColorUIResource(light), "OptionPane.border", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.buttonAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.cancelButtonText", "Cancel", // XXX Don't use gif// "OptionPane.errorIcon",// new IconUIResource(new ImageIcon("icons/Error.gif")), "OptionPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "OptionPane.foreground", new ColorUIResource(darkShadow), // XXX Don't use gif// "OptionPane.informationIcon",// new IconUIResource(new ImageIcon("icons/Inform.gif")), "OptionPane.messageAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.messageForeground", new ColorUIResource(darkShadow), "OptionPane.minimumSize", new DimensionUIResource(262, 90), "OptionPane.noButtonText", "No", "OptionPane.okButtonText", "OK", // XXX Don't use gif// "OptionPane.questionIcon",// new IconUIResource(new ImageIcon("icons/Question.gif")), // XXX Don't use gif// "OptionPane.warningIcon",// new IconUIResource(new ImageIcon("icons/Warn.gif")), "OptionPane.windowBindings", new Object[] { "ESCAPE", "close" }, "OptionPane.yesButtonText", "Yes", "Panel.background", new ColorUIResource(light), "Panel.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Panel.foreground", new ColorUIResource(Color.black), "PasswordField.background", new ColorUIResource(light), "PasswordField.border", new BasicBorders.FieldBorder(null, null, null, null), "PasswordField.caretBlinkRate", new Integer(500), "PasswordField.caretForeground", new ColorUIResource(Color.black), "PasswordField.font", new FontUIResource("Dialog", Font.PLAIN, 12), "PasswordField.foreground", new ColorUIResource(Color.black), "PasswordField.inactiveBackground", new ColorUIResource(light), "PasswordField.inactiveForeground", new ColorUIResource(Color.gray), "PasswordField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept")}, "PasswordField.margin", new InsetsUIResource(0, 0, 0, 0), "PasswordField.selectionBackground", new ColorUIResource(Color.black), "PasswordField.selectionForeground", new ColorUIResource(Color.white), "PopupMenu.background", new ColorUIResource(light), "PopupMenu.border", new BorderUIResource.BevelBorderUIResource(0), "PopupMenu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "PopupMenu.foreground", new ColorUIResource(darkShadow), "ProgressBar.background", new ColorUIResource(light), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(Color.darkGray), "ProgressBar.cellLength", new Integer(1), "ProgressBar.cellSpacing", new Integer(0), "ProgressBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ProgressBar.foreground", new ColorUIResource(Color.black), "ProgressBar.selectionBackground", new ColorUIResource(Color.black), "ProgressBar.selectionForeground", new ColorUIResource(light), "ProgressBar.repaintInterval", new Integer(250), "ProgressBar.cycleTime", new Integer(6000), "RadioButton.background", new ColorUIResource(light), "RadioButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "RadioButton.darkShadow", new ColorUIResource(shadow), "RadioButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButton.foreground", new ColorUIResource(darkShadow), "RadioButton.highlight", new ColorUIResource(highLight), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return BasicIconFactory.getRadioButtonIcon(); } }, "RadioButton.light", new ColorUIResource(highLight), "RadioButton.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButton.shadow", new ColorUIResource(shadow), "RadioButton.textIconGap", new Integer(4), "RadioButton.textShiftOffset", new Integer(0), "RadioButtonMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.acceleratorForeground", new ColorUIResource(darkShadow), "RadioButtonMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "RadioButtonMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "RadioButtonMenuItem.background", new ColorUIResource(light), "RadioButtonMenuItem.border", new BasicBorders.MarginBorder(), "RadioButtonMenuItem.borderPainted", Boolean.FALSE, "RadioButtonMenuItem.checkIcon", BasicIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.foreground", new ColorUIResource(darkShadow), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", new ColorUIResource(Color.black), "RadioButtonMenuItem.selectionForeground", new ColorUIResource(Color.white), "RootPane.defaultButtonWindowKeyBindings", new Object[] { "ENTER", "press", "released ENTER", "release", "ctrl ENTER", "press", "ctrl released ENTER", "release" }, "ScrollBar.background", new ColorUIResource(224, 224, 224), "ScrollBar.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "negativeBlockIncrement", "PAGE_DOWN", "positiveBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "positiveUnitIncrement", "KP_UP", "negativeUnitIncrement", "KP_DOWN", "positiveUnitIncrement", "UP", "negativeUnitIncrement", "RIGHT", "negativeUnitIncrement", "KP_LEFT", "positiveUnitIncrement", "DOWN", "positiveUnitIncrement", "KP_RIGHT", "negativeUnitIncrement" }), "ScrollBar.foreground", new ColorUIResource(light), "ScrollBar.maximumThumbSize", new DimensionUIResource(4096, 4096), "ScrollBar.minimumThumbSize", new DimensionUIResource(8, 8), "ScrollBar.thumb", new ColorUIResource(light), "ScrollBar.thumbDarkShadow", new ColorUIResource(shadow), "ScrollBar.thumbHighlight", new ColorUIResource(highLight), "ScrollBar.thumbShadow", new ColorUIResource(shadow), "ScrollBar.track", new ColorUIResource(light), "ScrollBar.trackHighlight", new ColorUIResource(shadow), "ScrollBar.width", new Integer(16), "ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "KP_LEFT", "unitScrollLeft", "ctrl PAGE_DOWN","scrollRight", "PAGE_DOWN", "scrollDown", "KP_RIGHT", "unitScrollRight", "LEFT", "unitScrollLeft", "ctrl END", "scrollEnd", "UP", "unitScrollUp", "RIGHT", "unitScrollRight", "DOWN", "unitScrollDown", "ctrl HOME", "scrollHome", "ctrl PAGE_UP", "scrollLeft", "KP_UP", "unitScrollUp", "KP_DOWN", "unitScrollDown" }), "ScrollPane.background", new ColorUIResource(light), "ScrollPane.border", new BorderUIResource.EtchedBorderUIResource(), "ScrollPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ScrollPane.foreground", new ColorUIResource(darkShadow), "Separator.background", new ColorUIResource(highLight), "Separator.foreground", new ColorUIResource(shadow), "Separator.highlight", new ColorUIResource(highLight), "Separator.shadow", new ColorUIResource(shadow), "Slider.background", new ColorUIResource(light), "Slider.focus", new ColorUIResource(shadow), "Slider.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "positiveBlockIncrement", "PAGE_DOWN", "negativeBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "negativeUnitIncrement", "KP_UP", "positiveUnitIncrement", "KP_DOWN", "negativeUnitIncrement", "UP", "positiveUnitIncrement", "RIGHT", "positiveUnitIncrement", "KP_LEFT", "negativeUnitIncrement", "DOWN", "negativeUnitIncrement", "KP_RIGHT", "positiveUnitIncrement" }), "Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2), "Slider.foreground", new ColorUIResource(light), "Slider.highlight", new ColorUIResource(highLight), "Slider.shadow", new ColorUIResource(shadow), "Slider.thumbHeight", new Integer(20), "Slider.thumbWidth", new Integer(11), "Slider.tickHeight", new Integer(12), "Spinner.background", new ColorUIResource(light), "Spinner.foreground", new ColorUIResource(light), "SplitPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "F6", "toggleFocus", "F8", "startResize", "END", "selectMax", "HOME", "selectMin", "LEFT", "negativeIncremnent", "KP_UP", "negativeIncrement", "KP_DOWN", "positiveIncrement", "UP", "negativeIncrement", "RIGHT", "positiveIncrement", "KP_LEFT", "negativeIncrement", "DOWN", "positiveIncrement", "KP_RIGHT", "positiveIncrement" }), "SplitPane.background", new ColorUIResource(light), "SplitPane.border", new BasicBorders.SplitPaneBorder(null, null), "SplitPane.darkShadow", new ColorUIResource(shadow), "SplitPane.dividerSize", new Integer(10), "SplitPane.highlight", new ColorUIResource(highLight), "SplitPane.shadow", new ColorUIResource(shadow), "TabbedPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ctrl PAGE_DOWN","navigatePageDown", "ctrl PAGE_UP", "navigatePageUp", "ctrl UP", "requestFocus", "ctrl KP_UP", "requestFocus" }), "TabbedPane.background", new ColorUIResource(light), "TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3), "TabbedPane.darkShadow", new ColorUIResource(shadow), "TabbedPane.focus", new ColorUIResource(darkShadow), "TabbedPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "LEFT", "navigateLeft", "KP_UP", "navigateUp", "ctrl DOWN", "requestFocusForVisibleComponent", "UP", "navigateUp", "KP_DOWN", "navigateDown", "RIGHT", "navigateRight", "KP_LEFT", "navigateLeft", "ctrl KP_DOWN", "requestFocusForVisibleComponent", "KP_RIGHT", "navigateRight", "DOWN", "navigateDown" }), "TabbedPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TabbedPane.foreground", new ColorUIResource(darkShadow), "TabbedPane.highlight", new ColorUIResource(highLight), "TabbedPane.light", new ColorUIResource(highLight), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", new ColorUIResource(shadow), "TabbedPane.tabbedPaneTabAreaInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabInsets", new InsetsUIResource(1, 4, 1, 4), "TabbedPane.tabbedPaneContentBorderInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabPadInsets", new InsetsUIResource(1, 1, 1, 1), "TabbedPane.tabRunOverlay", new Integer(2), "TabbedPane.textIconGap", new Integer(4), "Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN","scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLastColumn", "shift END", "selectLastColumnExtendSelection", "HOME", "selectFirstColumn", "ctrl END", "selectLastRow", "ctrl shift END","selectLastRowExtendSelection", "LEFT", "selectPreviousColumn", "shift HOME", "selectFirstColumnExtendSelection", "UP", "selectPreviousRow", "RIGHT", "selectNextColumn", "ctrl HOME", "selectFirstRow", "shift LEFT", "selectPreviousColumnExtendSelection", "DOWN", "selectNextRow", "ctrl shift HOME","selectFirstRowExtendSelection", "shift UP", "selectPreviousRowExtendSelection", "F2", "startEditing", "shift RIGHT", "selectNextColumnExtendSelection", "TAB", "selectNextColumnCell", "shift DOWN", "selectNextRowExtendSelection", "ENTER", "selectNextRowCell", "KP_UP", "selectPreviousRow", "KP_DOWN", "selectNextRow", "KP_LEFT", "selectPreviousColumn", "KP_RIGHT", "selectNextColumn", "shift TAB", "selectPreviousColumnCell", "ctrl A", "selectAll", "shift ENTER", "selectPreviousRowCell", "shift KP_DOWN", "selectNextRowExtendSelection", "shift KP_LEFT", "selectPreviousColumnExtendSelection", "ESCAPE", "cancel", "ctrl shift PAGE_UP", "scrollLeftExtendSelection", "shift KP_RIGHT", "selectNextColumnExtendSelection", "ctrl PAGE_UP", "scrollLeftChangeSelection", "shift PAGE_UP", "scrollUpExtendSelection", "ctrl shift PAGE_DOWN", "scrollRightExtendSelection", "ctrl PAGE_DOWN", "scrollRightChangeSelection", "PAGE_UP", "scrollUpChangeSelection", "ctrl shift LEFT", "selectPreviousColumnExtendSelection", "shift KP_UP", "selectPreviousRowExtendSelection", "ctrl shift UP", "selectPreviousRowExtendSelection", "ctrl shift RIGHT", "selectNextColumnExtendSelection", "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection", "ctrl shift DOWN", "selectNextRowExtendSelection", "ctrl BACK_SLASH", "clearSelection", "ctrl shift KP_UP", "selectPreviousRowExtendSelection", "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection", "ctrl SLASH", "selectAll", "ctrl shift KP_DOWN", "selectNextRowExtendSelection", }), "Table.background", new ColorUIResource(light), "Table.focusCellBackground", new ColorUIResource(light), "Table.focusCellForeground", new ColorUIResource(darkShadow), "Table.focusCellHighlightBorder", new BorderUIResource.LineBorderUIResource( new ColorUIResource(255, 255, 0)), "Table.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Table.foreground", new ColorUIResource(darkShadow), "Table.gridColor", new ColorUIResource(Color.gray), "Table.scrollPaneBorder", new BorderUIResource.BevelBorderUIResource(0), "Table.selectionBackground", new ColorUIResource(Color.black), "Table.selectionForeground", new ColorUIResource(Color.white), "TableHeader.background", new ColorUIResource(light), "TableHeader.cellBorder", new BorderUIResource.BevelBorderUIResource(0), "TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TableHeader.foreground", new ColorUIResource(darkShadow), "TextArea.background", new ColorUIResource(light), "TextArea.border", new BasicBorders.MarginBorder(), "TextArea.caretBlinkRate", new Integer(500), "TextArea.caretForeground", new ColorUIResource(Color.black), "TextArea.font", new FontUIResource("Monospaced", Font.PLAIN, 12), "TextArea.foreground", new ColorUIResource(Color.black), "TextArea.inactiveForeground", new ColorUIResource(Color.gray), "TextArea.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextArea.margin", new InsetsUIResource(0, 0, 0, 0), "TextArea.selectionBackground", new ColorUIResource(Color.black), "TextArea.selectionForeground", new ColorUIResource(Color.white), "TextField.background", new ColorUIResource(light), "TextField.border", new BasicBorders.FieldBorder(null, null, null, null), "TextField.caretBlinkRate", new Integer(500), "TextField.caretForeground", new ColorUIResource(Color.black), "TextField.darkShadow", new ColorUIResource(shadow), "TextField.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "TextField.foreground", new ColorUIResource(Color.black), "TextField.highlight", new ColorUIResource(highLight), "TextField.inactiveBackground", new ColorUIResource(Color.LIGHT_GRAY), "TextField.inactiveForeground", new ColorUIResource(Color.GRAY), "TextField.light", new ColorUIResource(highLight), "TextField.highlight", new ColorUIResource(light), "TextField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.SHIFT_DOWN_MASK), "selection-backward"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.SHIFT_DOWN_MASK), "selection-forward"), }, "TextField.margin", new InsetsUIResource(0, 0, 0, 0), "TextField.selectionBackground", new ColorUIResource(Color.black), "TextField.selectionForeground", new ColorUIResource(Color.white), "TextPane.background", new ColorUIResource(Color.white), "TextPane.border", new BasicBorders.MarginBorder(), "TextPane.caretBlinkRate", new Integer(500), "TextPane.caretForeground", new ColorUIResource(Color.black), "TextPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "TextPane.foreground", new ColorUIResource(Color.black), "TextPane.inactiveForeground", new ColorUIResource(Color.gray), "TextPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextPane.margin", new InsetsUIResource(3, 3, 3, 3), "TextPane.selectionBackground", new ColorUIResource(Color.black), "TextPane.selectionForeground", new ColorUIResource(Color.white), "TitledBorder.border", new BorderUIResource.EtchedBorderUIResource(), "TitledBorder.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TitledBorder.titleColor", new ColorUIResource(darkShadow), "ToggleButton.background", new ColorUIResource(light), "ToggleButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "ToggleButton.darkShadow", new ColorUIResource(shadow), "ToggleButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "ToggleButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToggleButton.foreground", new ColorUIResource(darkShadow), "ToggleButton.highlight", new ColorUIResource(highLight), "ToggleButton.light", new ColorUIResource(light), "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14), "ToggleButton.shadow", new ColorUIResource(shadow), "ToggleButton.textIconGap", new Integer(4), "ToggleButton.textShiftOffset", new Integer(0), "ToolBar.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "UP", "navigateUp", "KP_UP", "navigateUp", "DOWN", "navigateDown", "KP_DOWN", "navigateDown", "LEFT", "navigateLeft", "KP_LEFT", "navigateLeft", "RIGHT", "navigateRight", "KP_RIGHT", "navigateRight" }), "ToolBar.background", new ColorUIResource(light), "ToolBar.border", new BorderUIResource.EtchedBorderUIResource(), "ToolBar.darkShadow", new ColorUIResource(shadow), "ToolBar.dockingBackground", new ColorUIResource(light), "ToolBar.dockingForeground", new ColorUIResource(Color.red), "ToolBar.floatingBackground", new ColorUIResource(light), "ToolBar.floatingForeground", new ColorUIResource(Color.darkGray), "ToolBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolBar.foreground", new ColorUIResource(darkShadow), "ToolBar.highlight", new ColorUIResource(highLight), "ToolBar.light", new ColorUIResource(highLight), "ToolBar.separatorSize", new DimensionUIResource(20, 20), "ToolBar.shadow", new ColorUIResource(shadow), "ToolTip.background", new ColorUIResource(light), "ToolTip.border", new BorderUIResource.LineBorderUIResource(Color.lightGray), "ToolTip.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ToolTip.foreground", new ColorUIResource(darkShadow), "Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancel" }), "Tree.background", new ColorUIResource(light), "Tree.changeSelectionWithFocus", Boolean.TRUE,// "Tree.closedIcon", new IconUIResource(new ImageIcon("icons/TreeClosed.png")),// "Tree.collapsedIcon", new IconUIResource(new ImageIcon("icons/TreeCollapsed.png")), "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE, "Tree.editorBorder", new BorderUIResource.LineBorderUIResource(Color.lightGray), "Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLast", "ctrl KP_UP", "selectPreviousChangeLead", "shift END", "selectLastExtendSelection", "HOME", "selectFirst", "ctrl END", "selectLastChangeLead", "ctrl SLASH", "selectAll", "LEFT", "selectParent", "shift HOME", "selectFirstExtendSelection", "UP", "selectPrevious", "ctrl KP_DOWN", "selectNextChangeLead", "RIGHT", "selectChild", "ctrl HOME", "selectFirstChangeLead", "DOWN", "selectNext", "ctrl KP_LEFT", "scrollLeft", "shift UP", "selectPreviousExtendSelection", "F2", "startEditing", "ctrl LEFT", "scrollLeft", "ctrl KP_RIGHT","scrollRight", "ctrl UP", "selectPreviousChangeLead", "shift DOWN", "selectNextExtendSelection", "ENTER", "toggle", "KP_UP", "selectPrevious", "KP_DOWN", "selectNext", "ctrl RIGHT", "scrollRight", "KP_LEFT", "selectParent", "KP_RIGHT", "selectChild", "ctrl DOWN", "selectNextChangeLead", "ctrl A", "selectAll", "shift KP_UP", "selectPreviousExtendSelection", "shift KP_DOWN","selectNextExtendSelection", "ctrl SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_UP", "scrollUpExtendSelection", "ctrl BACK_SLASH", "clearSelection", "shift SPACE", "extendSelection", "ctrl PAGE_UP", "scrollUpChangeLead", "shift PAGE_UP","scrollUpExtendSelection", "SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_UP", "scrollUpChangeSelection", "ctrl PAGE_DOWN", "scrollDownChangeLead" }), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.foreground", new ColorUIResource(Color.black), "Tree.hash", new ColorUIResource(new Color(128, 128, 128)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), // FIXME "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(Color.black), "Tree.nonSelectionBackground", new ColorUIResource(new Color(239, 235, 231)), "Tree.selectionBorderColor", new ColorUIResource(Color.black), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(new Color(255, 255, 255)), "Tree.textBackground", new ColorUIResource(new Color(255, 255, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Viewport.background", new ColorUIResource(light), "Viewport.foreground", new ColorUIResource(Color.black), "Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12) }; defaults.putDefaults(uiDefaults); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicLookAndFeel.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicLookAndFeel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
1841,
7019,
12,
3060,
73,
643,
87,
3467,
13,
225,
288,
565,
1033,
8526,
5915,
7019,
31,
3639,
5563,
3551,
12128,
273,
394,
5563,
12,
3247,
29,
16,
29460,
16,
4248,
26,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1208,
1841,
7019,
12,
3060,
73,
643,
87,
3467,
13,
225,
288,
565,
1033,
8526,
5915,
7019,
31,
3639,
5563,
3551,
12128,
273,
394,
5563,
12,
3247,
29,
16,
29460,
16,
4248,
26,
... |
if (element.isReadOnly()) { | if (element.getResourceAttributes().isReadOnly()) { | public Object getPropertyValue(Object name) { if (name.equals(IBasicPropertyConstants.P_TEXT)) { return element.getName(); } if (name.equals(IResourcePropertyConstants.P_PATH_RES)) { return element.getFullPath().toString(); } if (name.equals(IResourcePropertyConstants.P_LAST_MODIFIED_RES)) { return getDateStringValue(element); } if (name.equals(IResourcePropertyConstants.P_EDITABLE_RES)) { if (element.isReadOnly()) { return IDEPropertiesMessages.ResourceProperty_false; } else { return IDEPropertiesMessages.ResourceProperty_true; } } if (name.equals(IResourcePropertyConstants.P_DERIVED_RES)) { return String.valueOf(element.isDerived()); } if (name.equals(IResourcePropertyConstants.P_LINKED_RES)) { return String.valueOf(element.isLinked()); } if (name.equals(IResourcePropertyConstants.P_LOCATION_RES)) { return getLocationText(element); } if (name.equals(IResourcePropertyConstants.P_RESOLVED_LOCATION_RES)) { return getResolvedLocationText(element); } return null; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/a1ca365a318b96e23065f4e725ff1528454d7642/ResourcePropertySource.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/properties/ResourcePropertySource.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
21694,
12,
921,
508,
13,
288,
3639,
309,
261,
529,
18,
14963,
12,
45,
8252,
1396,
2918,
18,
52,
67,
5151,
3719,
288,
5411,
327,
930,
18,
17994,
5621,
3639,
289,
3639,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
21694,
12,
921,
508,
13,
288,
3639,
309,
261,
529,
18,
14963,
12,
45,
8252,
1396,
2918,
18,
52,
67,
5151,
3719,
288,
5411,
327,
930,
18,
17994,
5621,
3639,
289,
3639,
309,
... |
if (dx1 == 0) { return new Point2D.Double(p1.getX(), m2 * (p1.getX() - p4.getX()) + p4.getY()); } else if (dx2 == 0) { return new Point2D.Double(p4.getX(), m1 * (p4.getX() - p1.getX()) + p1.getY()); } double x = (-m2 * p4.getX() + p4.getY() + m1 * p1.getX() - p1.getY()) / (m1 - m2); double y = m1 * (x - p1.getX()) + p1.getY(); return new Point2D.Double(x, y); | if (dx1 == 0) { return new Point2D.Double(p1.getX(), m2 * (p1.getX() - p4.getX()) + p4.getY()); } else if (dx2 == 0) { return new Point2D.Double(p4.getX(), m1 * (p4.getX() - p1.getX()) + p1.getY()); } double x = (-m2 * p4.getX() + p4.getY() + m1 * p1.getX() - p1.getY()) / (m1 - m2); double y = m1 * (x - p1.getX()) + p1.getY(); return new Point2D.Double(x, y); | public static Point2D intersect(Point2D p1, Point2D p2, Point2D p3, Point2D p4) { double dx1 = p2.getX() - p1.getX(); double dx2 = p3.getX() - p4.getX(); if ((dx1 == 0) && (dx2 == 0)) return null; double m1 = (p2.getY() - p1.getY()) / dx1; double m2 = (p3.getY() - p4.getY()) / dx2; if (dx1 == 0) { // infinity return new Point2D.Double(p1.getX(), m2 * (p1.getX() - p4.getX()) + p4.getY()); } else if (dx2 == 0) { // infinity return new Point2D.Double(p4.getX(), m1 * (p4.getX() - p1.getX()) + p1.getY()); } double x = (-m2 * p4.getX() + p4.getY() + m1 * p1.getX() - p1.getY()) / (m1 - m2); double y = m1 * (x - p1.getX()) + p1.getY(); return new Point2D.Double(x, y); } | 57341 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57341/f1a2e8bd347e294e5391728379b76d4500a7093d/CubicToQuadPathConstructor.java/clean/freehep-graphicsio/src/main/java/org/freehep/graphicsio/CubicToQuadPathConstructor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
4686,
22,
40,
9136,
12,
2148,
22,
40,
293,
21,
16,
4686,
22,
40,
293,
22,
16,
4686,
22,
40,
293,
23,
16,
4686,
22,
40,
293,
24,
13,
288,
377,
202,
9056,
6633,
21,
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,
1071,
760,
4686,
22,
40,
9136,
12,
2148,
22,
40,
293,
21,
16,
4686,
22,
40,
293,
22,
16,
4686,
22,
40,
293,
23,
16,
4686,
22,
40,
293,
24,
13,
288,
377,
202,
9056,
6633,
21,
273,
... |
else | } else { | private void createRegisteredFilters(Composite bottomComposite) { Composite listArea = new Composite(bottomComposite, SWT.NONE); listArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); listArea.setLayout(new GridLayout()); Label title = new Label(listArea, SWT.NONE); title.setText(MarkerMessages.ProblemFilterDialog_System_Filters_Title); definedList = CheckboxTableViewer.newCheckList(listArea, SWT.BORDER); definedList.setContentProvider(new IStructuredContentProvider() { /* * (non-Javadoc) * * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) */ public Object[] getElements(Object inputElement) { return MarkerSupportRegistry.getInstance() .getRegisteredFilters().toArray(); } /* * (non-Javadoc) * * @see org.eclipse.jface.viewers.IContentProvider#dispose() */ public void dispose() { // Do nothing } /* * (non-Javadoc) * * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, * java.lang.Object, java.lang.Object) */ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { // Do nothing } }); definedList.setLabelProvider(new LabelProvider() { /* * (non-Javadoc) * * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object) */ public String getText(Object element) { return ((MarkerFilter) element).getName(); } }); definedList .addSelectionChangedListener(new ISelectionChangedListener() { /* * (non-Javadoc) * * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent) */ public void selectionChanged(SelectionChangedEvent event) { ISelection selection = event.getSelection(); if (selection instanceof IStructuredSelection) { Object selected = ((IStructuredSelection) selection) .getFirstElement(); if (selected == null) systemSettingsLabel.setText(Util.EMPTY_STRING); else systemSettingsLabel .setText(getSystemFilterString((ProblemFilter) selected)); } else systemSettingsLabel.setText(Util.EMPTY_STRING); showSystemLabel(true); } }); Iterator definedFilters = MarkerSupportRegistry.getInstance() .getRegisteredFilters().iterator(); definedList.setInput(this); while (definedFilters.hasNext()) { MarkerFilter next = (MarkerFilter) definedFilters.next(); definedList.setChecked(next, next.isEnabled()); } definedList.getControl().setLayoutData( new GridData(SWT.FILL, SWT.FILL, true, true)); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/DialogProblemFilter.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogProblemFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
10868,
5422,
12,
9400,
5469,
9400,
13,
288,
202,
202,
9400,
666,
5484,
273,
394,
14728,
12,
9176,
9400,
16,
348,
8588,
18,
9826,
1769,
202,
202,
1098,
5484,
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,
225,
202,
1152,
918,
752,
10868,
5422,
12,
9400,
5469,
9400,
13,
288,
202,
202,
9400,
666,
5484,
273,
394,
14728,
12,
9176,
9400,
16,
348,
8588,
18,
9826,
1769,
202,
202,
1098,
5484,
18,
542... |
if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE) { | else if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE) { | void elementLocallyValidComplexType(QName element, String textContent) { XSComplexTypeDecl ctype = (XSComplexTypeDecl)fCurrentType; // Element Locally Valid (Complex Type) // For an element information item to be locally valid with respect to a complex type definition all of the following must be true: // 1 {abstract} is false. // 2 If clause 3.2 of Element Locally Valid (Element) (3.3.4) did not apply, then the appropriate case among the following must be true: if (!fNil) { // 2.1 If the {content type} is empty, then the element information item has no character or element information item [children]. if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_EMPTY && (fChildCount != 0 || textContent.length() != 0)) { reportSchemaError("cvc-complex-type.2.1", new Object[]{element.rawname}); } // 2.2 If the {content type} is a simple type definition, then the element information item has no element information item [children], and the normalized value of the element information item is valid with respect to that simple type definition as defined by String Valid (3.14.4). if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE) { if (fChildCount != 0) reportSchemaError("cvc-complex-type.2.2", new Object[]{element.rawname}); DatatypeValidator dv = ctype.fDatatypeValidator; // REVISIT: or should the normalize() be called within validate()? String content = XSAttributeChecker.normalize(textContent, dv.getWSFacet()); try { // REVISIT: use XSSimpleTypeDecl.ValidateContext to replace null dv.validate(content, null); } catch (InvalidDatatypeValueException e) { reportSchemaError("cvc-complex-type.2.2", new Object[]{element.rawname}); } } // 2.3 If the {content type} is element-only, then the element information item has no character information item [children] other than those whose [character code] is defined as a white space in [XML 1.0 (Second Edition)]. if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_ELEMENT) { // REVISIT: how to check whether there is any text content? if (fSawCharacters) { reportSchemaError("cvc-complex-type.2.3", new Object[]{element.rawname}); } } // 2.4 If the {content type} is element-only or mixed, then the sequence of the element information item's element information item [children], if any, taken in order, is valid with respect to the {content type}'s particle, as defined in Element Sequence Locally Valid (Particle) (3.9.4). if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_ELEMENT || ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_MIXED) { // if the current state is a valid state, check whether // it's one of the final states. if (DEBUG) { System.out.println(fCurrCMState); } if (fCurrCMState[0] >= 0 && !fCurrentCM.endContentModel(fCurrCMState)) { reportSchemaError("cvc-complex-type.2.4.b", new Object[]{element.rawname, ctype.fParticle.toString()}); } } } } // elementLocallyValidComplexType | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/72406656e676ea499cb2b1f423fd522edd7e8bcc/SchemaValidator.java/clean/src/org/apache/xerces/impl/v2/SchemaValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
930,
1333,
1230,
1556,
12795,
559,
12,
13688,
930,
16,
514,
16655,
13,
288,
3639,
1139,
55,
12795,
559,
3456,
11920,
273,
261,
60,
55,
12795,
559,
3456,
13,
74,
3935,
559,
31,
3639... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
930,
1333,
1230,
1556,
12795,
559,
12,
13688,
930,
16,
514,
16655,
13,
288,
3639,
1139,
55,
12795,
559,
3456,
11920,
273,
261,
60,
55,
12795,
559,
3456,
13,
74,
3935,
559,
31,
3639... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.