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 |
|---|---|---|---|---|---|---|
componentSpecification = defaultPicoContainer.getComponentSpecification(componentKey); | componentSpecification = componentRegistry.getComponentSpec(componentKey); | public Object resolve(PicoContainer picoContainer, ComponentSpecification compSpec, Class requestedType) throws PicoInitializationException { // TODO figure out a way to remove this ugly cast? DefaultPicoContainer defaultPicoContainer = (DefaultPicoContainer) picoContainer; Object componentInstance; ComponentSpecification componentSpecification = null; if (componentKey != null) { // is specified dependency already instantiated? componentInstance = picoContainer.getComponent(componentKey); if (componentInstance == null) { // try to find the component based on the key componentSpecification = defaultPicoContainer.getComponentSpecification(componentKey); } } else { // try to find it directly using the requestType as the key componentInstance = picoContainer.getComponent(requestedType); if (componentInstance == null) { // is there already an instantiated instance that satisfies the dependency? componentInstance = defaultPicoContainer.findImplementingComponent(requestedType); if (componentInstance == null) { // try to find components that satisfy the interface (implements the component service asked for) componentSpecification = defaultPicoContainer.findImplementingComponentSpecification(requestedType); } } } if (componentSpecification != null) { // if the component does not exist yet, instantiate it componentInstance = defaultPicoContainer.createComponent(componentSpecification); } if (componentInstance == null) { throw new UnsatisfiedDependencyInstantiationException(compSpec.getComponentImplementation(), componentKey, requestedType); } return componentInstance; } | 14040 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14040/47b2a79a3e2bb19b97ea7736273df40b79ab5472/ComponentParameter.java/buggy/java/picocontainer/src/java/org/picocontainer/defaults/ComponentParameter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
2245,
12,
52,
10764,
2170,
293,
10764,
2170,
16,
5435,
8615,
1161,
1990,
16,
1659,
3764,
559,
13,
5411,
1216,
453,
10764,
17701,
503,
288,
3639,
368,
2660,
7837,
596,
279,
403... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2245,
12,
52,
10764,
2170,
293,
10764,
2170,
16,
5435,
8615,
1161,
1990,
16,
1659,
3764,
559,
13,
5411,
1216,
453,
10764,
17701,
503,
288,
3639,
368,
2660,
7837,
596,
279,
403... |
return RubyFixnum.newFixnum(getRuntime(), length()); | return getRuntime().newFixnum(length()); | public RubyFixnum size() { return RubyFixnum.newFixnum(getRuntime(), length()); } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyHash.java/clean/src/org/jruby/RubyHash.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
8585,
2107,
963,
1435,
288,
3639,
327,
18814,
7675,
2704,
8585,
2107,
12,
2469,
10663,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
19817,
8585,
2107,
963,
1435,
288,
3639,
327,
18814,
7675,
2704,
8585,
2107,
12,
2469,
10663,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
throws IllegalResidueException, IOException; | throws SeqException, IllegalResidueException, IOException; | Sequence readSequence(StreamReader.Context context, ResidueParser resParser, SequenceFactory sf) throws IllegalResidueException, IOException; | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/168290afa5c9ea48df9499ba45c2d66d69197f4a/SequenceFormat.java/buggy/src/org/biojava/bio/seq/io/SequenceFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
8370,
855,
4021,
12,
31495,
18,
1042,
819,
16,
13491,
1124,
23965,
2678,
400,
2678,
16,
13491,
8370,
1733,
9033,
13,
540,
1216,
2141,
607,
23965,
503,
16,
1860,
31,
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,
282,
8370,
855,
4021,
12,
31495,
18,
1042,
819,
16,
13491,
1124,
23965,
2678,
400,
2678,
16,
13491,
8370,
1733,
9033,
13,
540,
1216,
2141,
607,
23965,
503,
16,
1860,
31,
2,
-100,
-100,
-100,
... |
return (MemberSignature[]) nonPrivateMethods.toArray(new MemberSignature[nonPrivateMethods.size()]); | return nonPrivateMethods.toArray(new MemberSignature[nonPrivateMethods.size()]); | public MemberSignature[] getNonPrivateMethodSignatures() { init(); return (MemberSignature[]) nonPrivateMethods.toArray(new MemberSignature[nonPrivateMethods.size()]); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/2d46d291193579a7564649b4881c7ea8e02eda5b/SerialVersionUIDBuilder.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/fixes/SerialVersionUIDBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8596,
5374,
8526,
28207,
6014,
1305,
23918,
1435,
565,
288,
3639,
1208,
5621,
3639,
327,
261,
4419,
5374,
63,
5717,
3639,
1661,
6014,
4712,
18,
31447,
12,
2704,
8596,
5374,
63,
5836,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8596,
5374,
8526,
28207,
6014,
1305,
23918,
1435,
565,
288,
3639,
1208,
5621,
3639,
327,
261,
4419,
5374,
63,
5717,
3639,
1661,
6014,
4712,
18,
31447,
12,
2704,
8596,
5374,
63,
5836,
... |
new DefaultHighlighter.DefaultHighlightPainter(sourceTextArea.getSelectionColor()) { public Shape paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view) { try { Shape extent = view.modelToView(offs0, Position.Bias.Forward, offs1, Position.Bias.Backward, bounds); Rectangle rect = extent.getBounds(); rect.x = 0; rect.width = bounds.getBounds().width; g.setColor(getColor()); g.fillRect(rect.x, rect.y, rect.width, rect.height); return rect; } catch (BadLocationException e) { return null; } | new DefaultHighlighter.DefaultHighlightPainter(sourceTextArea.getSelectionColor()) { public Shape paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view) { try { Shape extent = view.modelToView(offs0, Position.Bias.Forward, offs1, Position.Bias.Backward, bounds); Rectangle rect = extent.getBounds(); rect.x = 0; rect.width = bounds.getBounds().width; g.setColor(getColor()); g.fillRect(rect.x, rect.y, rect.width, rect.height); return rect; } catch (BadLocationException e) { return null; | private void postInitComponents() { logger = new ConsoleLogger(this); viewPanelLayout = (CardLayout) viewPanel.getLayout(); // Console starts out disabled consoleSplitter.setDividerLocation(1.0); // List of bug group tabs. // This must be in the same order as GROUP_BY_ORDER_LIST! bugTreeList = new JTree[]{byClassBugTree, byPackageBugTree, byBugTypeBugTree}; // Configure bug trees for (int i = 0; i < bugTreeList.length; ++i) { JTree bugTree = bugTreeList[i]; bugTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); bugTree.setCellRenderer(bugCellRenderer); bugTree.setRootVisible(false); bugTree.setShowsRootHandles(true); bugTree.addTreeSelectionListener(new TreeSelectionListener() { public void valueChanged(TreeSelectionEvent e) { bugTreeSelectionChanged(e); } }); } jarFileList.setModel(new DefaultListModel()); sourceDirList.setModel(new DefaultListModel()); classpathEntryList.setModel(new DefaultListModel()); // We use a special highlight painter to ensure that the highlights cover // complete source lines, even though the source text doesn't // fill the lines completely. final Highlighter.HighlightPainter painter = new DefaultHighlighter.DefaultHighlightPainter(sourceTextArea.getSelectionColor()) { public Shape paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view) { try { Shape extent = view.modelToView(offs0, Position.Bias.Forward, offs1, Position.Bias.Backward, bounds); Rectangle rect = extent.getBounds(); rect.x = 0; rect.width = bounds.getBounds().width; g.setColor(getColor()); g.fillRect(rect.x, rect.y, rect.width, rect.height); return rect; } catch (BadLocationException e) { return null; } } }; Highlighter sourceHighlighter = new DefaultHighlighter() { public Object addHighlight(int p0, int p1, Highlighter.HighlightPainter p) throws BadLocationException { return super.addHighlight(p0, p1, painter); } }; sourceTextArea.setHighlighter(sourceHighlighter); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/a6faccf1f33035b730d9878d13d0da9fa199f1f8/FindBugsFrame.java/clean/findbugs/src/java/edu/umd/cs/findbugs/gui/FindBugsFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1603,
2570,
7171,
1435,
288,
202,
4901,
273,
394,
9657,
3328,
12,
2211,
1769,
202,
202,
1945,
5537,
3744,
273,
261,
6415,
3744,
13,
1476,
5537,
18,
588,
3744,
5621,
3639,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1603,
2570,
7171,
1435,
288,
202,
4901,
273,
394,
9657,
3328,
12,
2211,
1769,
202,
202,
1945,
5537,
3744,
273,
261,
6415,
3744,
13,
1476,
5537,
18,
588,
3744,
5621,
3639,
368,
... |
preferenceTransfers = new ArrayList(); IExtensionRegistry registry = Platform.getExtensionRegistry(); readRegistry(registry, WorkbenchPlugin.PI_WORKBENCH, pluginPoint); } | preferenceTransfers = new ArrayList(); IExtensionRegistry registry = Platform.getExtensionRegistry(); readRegistry(registry, WorkbenchPlugin.PI_WORKBENCH, pluginPoint); } | protected void readPreferenceTransfers() { preferenceTransfers = new ArrayList(); IExtensionRegistry registry = Platform.getExtensionRegistry(); readRegistry(registry, WorkbenchPlugin.PI_WORKBENCH, pluginPoint); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/0c824a572640b8871fefdcfaf3031b6370d525a6/PreferenceTransferRegistryReader.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PreferenceTransferRegistryReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
855,
9624,
1429,
18881,
1435,
288,
3639,
11555,
1429,
18881,
273,
394,
2407,
5621,
3639,
467,
3625,
4243,
4023,
273,
11810,
18,
588,
3625,
4243,
5621,
3639,
855,
4243,
12,
9893,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4750,
918,
855,
9624,
1429,
18881,
1435,
288,
3639,
11555,
1429,
18881,
273,
394,
2407,
5621,
3639,
467,
3625,
4243,
4023,
273,
11810,
18,
588,
3625,
4243,
5621,
3639,
855,
4243,
12,
9893,
... |
} else if (type.typeParams().length > 0 && !isPrimitive(symbol)) { | } else if (type.typeParams().length > 0 && !monoPrimitive(symbol)) { | public Type transformInfo(Symbol symbol, Type type) { if (symbol.isClass()) { NewMember[] toAdd = membersToAdd(symbol); if (toAdd.length == 0) return type; else { Scope newMembers = new Scope(symbol.members()); for (int i = 0; i < toAdd.length; ++i) newMembers.enterOrOverload(toAdd[i].symbolToAdd()); return Type.compoundType(type.parents(), newMembers, symbol); } } else if (type.typeParams().length > 0 && !isPrimitive(symbol)) { // Polymorphic method/constructor: // - add a value parameter for every type parameter. switch (type) { case PolyType(Symbol[] tparams, // : Type.MethodType(Symbol[] vparams, Type result)): List newVParams = new LinkedList(Arrays.asList(paramsToAdd(symbol))); newVParams.addAll(Arrays.asList(vparams)); Symbol[] newVParamsA = (Symbol[]) newVParams.toArray(new Symbol[newVParams.size()]); return new Type.PolyType(tparams, new Type.MethodType(newVParamsA, result)); default: throw Debug.abort("unexpected type: ", type); } } else return type; } | 10130 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10130/272ebd92493d51a38ef9068a7201d6f8abc3a1a1/TypesAsValuesPhase.java/buggy/sources/scalac/transformer/TypesAsValuesPhase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1412,
2510,
966,
12,
5335,
3273,
16,
1412,
618,
13,
288,
3639,
309,
261,
7175,
18,
291,
797,
10756,
288,
5411,
1166,
4419,
8526,
25607,
273,
4833,
13786,
12,
7175,
1769,
5411,
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,
1412,
2510,
966,
12,
5335,
3273,
16,
1412,
618,
13,
288,
3639,
309,
261,
7175,
18,
291,
797,
10756,
288,
5411,
1166,
4419,
8526,
25607,
273,
4833,
13786,
12,
7175,
1769,
5411,
309,
... |
AST __t992 = _t; AST tmp2187_AST_in = (AST)_t; | AST __t996 = _t; AST tmp2191_AST_in = (AST)_t; | public final void menu_opt(AST _t) throws RecognitionException { AST menu_opt_AST_in = (_t == ASTNULL) ? null : (AST)_t; if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case BGCOLOR: case DCOLOR: case FGCOLOR: case PFCOLOR: { color_expr(_t); _t = _retTree; break; } case FONT: { AST __t989 = _t; AST tmp2184_AST_in = (AST)_t; match(_t,FONT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t989; _t = _t.getNextSibling(); break; } case LIKE: { AST __t990 = _t; AST tmp2185_AST_in = (AST)_t; match(_t,LIKE); _t = _t.getFirstChild(); field(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case VALIDATE: { AST tmp2186_AST_in = (AST)_t; match(_t,VALIDATE); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t990; _t = _t.getNextSibling(); break; } case TITLE: { AST __t992 = _t; AST tmp2187_AST_in = (AST)_t; match(_t,TITLE); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t992; _t = _t.getNextSibling(); break; } case MENUBAR: { AST tmp2188_AST_in = (AST)_t; match(_t,MENUBAR); _t = _t.getNextSibling(); break; } case PINNABLE: { AST tmp2189_AST_in = (AST)_t; match(_t,PINNABLE); _t = _t.getNextSibling(); break; } case SUBMENUHELP: { AST tmp2190_AST_in = (AST)_t; match(_t,SUBMENUHELP); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/JPTreeParser.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparserbase/JPTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
3824,
67,
3838,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
3824,
67,
3838,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
3824,
67,
3838,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
3824,
67,
3838,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
... |
if ( LogWriter.needsLogging && this instanceof SIPClientTransaction) { sipStack.getLogWriter().logMessage("fireTimer " + this + " retransmissionTicks " + retransmissionTimerTicksLeft); } | /* * if (sipStack.isLoggingEnabled()) { sipStack.getLogWriter().logDebug( * "fireTimer " + this + " retransmissionTicks " + * retransmissionTimerTicksLeft); } */ | final void fireTimer() { // If the timeout timer is enabled, if ( LogWriter.needsLogging && this instanceof SIPClientTransaction) { sipStack.getLogWriter().logMessage("fireTimer " + this + " retransmissionTicks " + retransmissionTimerTicksLeft); } if (timeoutTimerTicksLeft != -1) { // Count down the timer, and if it has run out, if (--timeoutTimerTicksLeft == 0) { // Fire the timeout timer fireTimeoutTimer(); } } // If the retransmission timer is enabled, if (retransmissionTimerTicksLeft != -1) { // Count down the timer, and if it has run out, if (--retransmissionTimerTicksLeft == 0) { // Enable this timer to fire again after // twice the original time enableRetransmissionTimer(retransmissionTimerLastTickCount * 2); // Fire the timeout timer fireRetransmissionTimer(); } } } | 3364 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3364/68c0ca844a7d5fe4a7744cbf9898184966ce0680/SIPTransaction.java/clean/src/gov/nist/javax/sip/stack/SIPTransaction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6385,
918,
4452,
6777,
1435,
288,
202,
202,
759,
971,
326,
2021,
5441,
353,
3696,
16,
202,
565,
309,
261,
1827,
2289,
18,
20600,
7735,
597,
333,
1276,
348,
2579,
1227,
3342,
13,
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,
225,
202,
6385,
918,
4452,
6777,
1435,
288,
202,
202,
759,
971,
326,
2021,
5441,
353,
3696,
16,
202,
565,
309,
261,
1827,
2289,
18,
20600,
7735,
597,
333,
1276,
348,
2579,
1227,
3342,
13,
28... |
System.out.println (" " + info.getName() + " [" + clientMap.get(cNum) +"]"); | String cName = (String)clientMap.get(cNum); System.out.println (" " + info.getName() + " [" + cName +"]"); if (cName.indexOf("UM-1") != -1) selectedInfo = info; | public static void main(String[] args) { MidiDevice.Info[] infos = MidiSystem.getMidiDeviceInfo(); if (infos.length == 0) { System.out.println( "No MIDI devices found. Exiting." ); System.exit(1); } /* Find ALSA MIDI ports */ List midiports = new ArrayList(); for(int i = 0; i<infos.length; i++) { if (infos[i].getName().startsWith("ALSA MIDI")) { midiports.add(infos[i]); } } if (midiports.size() == 0) { System.out.println("No (ALSA) MIDI ports found. Exiting." ); System.exit(1); } Map clientMap = Qualm.parseALSAClients(); System.out.println("ALSA MIDI ports:"); Iterator i = midiports.iterator(); while (i.hasNext()) { MidiDevice.Info info = (MidiDevice.Info)i.next(); String dev = info.getName(); dev = dev.substring(dev.indexOf('(')+1); dev = dev.substring(0, dev.lastIndexOf( ':' )); Integer cNum = new Integer(dev); System.out.println (" " + info.getName() + " [" + clientMap.get(cNum) +"]"); } System.exit(0); } | 48962 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48962/cfc37b1ed16aaed9b1f0a7a66c786506fba602cb/Qualm.java/clean/Qualm.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
565,
490,
350,
77,
3654,
18,
966,
8526,
10626,
273,
490,
350,
77,
3163,
18,
588,
20711,
77,
3654,
966,
5621,
565,
309,
261,
18227,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
565,
490,
350,
77,
3654,
18,
966,
8526,
10626,
273,
490,
350,
77,
3163,
18,
588,
20711,
77,
3654,
966,
5621,
565,
309,
261,
18227,
1... |
return _asString.hashCode(); | return _calendar.hashCode(); | public int hashCode() { return _asString.hashCode(); } | 45757 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45757/112ea299458389f727394c555992fbb42954ddee/Date.java/buggy/src/java-common/org/xins/common/types/standard/Date.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
509,
13374,
1435,
288,
540,
327,
389,
11650,
18,
2816,
1085,
5621,
1377,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
509,
13374,
1435,
288,
540,
327,
389,
11650,
18,
2816,
1085,
5621,
1377,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Assertions.assertTrue( variableContract.getValue("user.home").equals("/home/userprogram")); | Assertions.assertTrue( variableContract.getValue("user.home").equals(System.getProperty("user.home"))); | public void action() throws Exception { VariableContract variableContract= new VariableContract(); //Setting from Program HashMap map = new HashMap(); map.put("user.home", "/home/userprogram"); variableContract.setVariableFromProgram(map, VariableContractType.getType(ProActiveDescriptorConstants.VARIABLES_JAVAPROPERTY_PROGRAM_TAG)); Assertions.assertTrue( variableContract.getValue("user.home").equals("/home/userprogram")); boolean bogus=false; try{ variableContract.setVariableFromProgram("bogus.property", "", VariableContractType.getType(ProActiveDescriptorConstants.VARIABLES_JAVAPROPERTY_PROGRAM_TAG)); bogus=true; //shouldn't reach this line }catch(Exception e){} Assertions.assertTrue(!bogus); variableContract.setVariableFromProgram("bogus.property", "bogus_value", VariableContractType.getType(ProActiveDescriptorConstants.VARIABLES_JAVAPROPERTY_PROGRAM_TAG)); Assertions.assertTrue( variableContract.getValue("bogus.property").equals("bogus_value")); //Setting from Descriptor variableContract.setDescriptorVariable("user.home", "/home/userdesc", VariableContractType.getType(ProActiveDescriptorConstants.VARIABLES_JAVAPROPERTY_PROGRAM_TAG)); Assertions.assertTrue( variableContract.getValue("user.home").equals("/home/userprogram")); try{ bogus=false; variableContract.setDescriptorVariable("${ilegal.var.name}", "ilegalvariablename", VariableContractType.getType(ProActiveDescriptorConstants.VARIABLES_JAVAPROPERTY_PROGRAM_TAG)); bogus=true; //shouldn't reach this line }catch(Exception e){} Assertions.assertTrue(!bogus); //Setting bogus from program variableContract.setDescriptorVariable("bogus.property", "", VariableContractType.getType(ProActiveDescriptorConstants.VARIABLES_JAVAPROPERTY_PROGRAM_TAG)); Assertions.assertTrue( variableContract.getValue("bogus.property").equals("bogus_value")); pad = ProActive.getProactiveDescriptor(XML_LOCATION, variableContract); variableContract = pad.getVariableContract(); variableContract.getValue("user.home").equals(System.getProperty("user.home")); //Empty value in descriptor should have less priority, and not set to empty Assertions.assertTrue(variableContract.isClosed()); } | 14315 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14315/91fcb54dcad7ac2c8c4cc89a2761dbf8a4a96ee2/Test.java/clean/src/nonregressiontest/descriptor/variablecontract/javapropertiesProgram/Test.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1301,
1435,
1216,
1185,
288,
9506,
202,
3092,
8924,
2190,
8924,
33,
394,
7110,
8924,
5621,
9506,
202,
759,
5568,
628,
13586,
202,
202,
8658,
852,
273,
394,
4317,
5621,
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,
1301,
1435,
1216,
1185,
288,
9506,
202,
3092,
8924,
2190,
8924,
33,
394,
7110,
8924,
5621,
9506,
202,
759,
5568,
628,
13586,
202,
202,
8658,
852,
273,
394,
4317,
5621,
202,... |
Iterator i = parse( "A anA; int x = c; class A {}; A * anotherA = &anA; int b;", false ).getDeclarations(); | Iterator i = parse( "A anA; int x = c; class A {}; A * anotherA = &anA; int b;", false ).getDeclarations(); | public void testErrorHandling_1() throws Exception { Iterator i = parse( "A anA; int x = c; class A {}; A * anotherA = &anA; int b;", false ).getDeclarations(); IASTVariable x = (IASTVariable)i.next(); assertEquals( x.getName(), "x"); IASTClassSpecifier A = (IASTClassSpecifier)((IASTAbstractTypeSpecifierDeclaration)i.next()).getTypeSpecifier(); assertEquals( A.getName(), "A"); IASTVariable anotherA = (IASTVariable)i.next(); assertEquals( anotherA.getName(), "b"); assertFalse(i.hasNext()); // should be true } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/3a6ffef8f855652606f74a14d4b15478c81e5db4/CompleteParseASTTest.java/clean/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
668,
14701,
67,
21,
1435,
1216,
1185,
202,
95,
202,
202,
3198,
277,
273,
1109,
12,
315,
37,
392,
37,
31,
509,
619,
273,
276,
31,
667,
432,
2618,
31,
432,
380,
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,
225,
202,
482,
918,
1842,
668,
14701,
67,
21,
1435,
1216,
1185,
202,
95,
202,
202,
3198,
277,
273,
1109,
12,
315,
37,
392,
37,
31,
509,
619,
273,
276,
31,
667,
432,
2618,
31,
432,
380,
4... |
if(!WellFormednessUtils.isWellFormed(expression)){ | if(!(expression.getROperand() != null)){ | public void visitBinaryExpression(@NotNull PsiBinaryExpression expression){ super.visitBinaryExpression(expression); if(!WellFormednessUtils.isWellFormed(expression)){ return; } if(!ComparisonUtils.isEqualityComparison(expression)){ return; } final PsiType expressionType = expression.getType(); if(expressionType == null){ return; } final PsiExpression rhs = expression.getROperand(); final PsiExpression strippedRhs = stripExpression(rhs); if(strippedRhs == null){ return; } final PsiExpression lhs = expression.getLOperand(); final PsiExpression strippedLhs = stripExpression(lhs); if(strippedLhs == null){ return; } if(isConstantMask(strippedLhs) && PsiUtil.isConstantExpression(strippedRhs)){ if(isIncompatibleMask((PsiBinaryExpression) strippedLhs, strippedRhs)){ registerError(expression); } } else if(isConstantMask(strippedRhs) && PsiUtil.isConstantExpression(strippedLhs)){ if(isIncompatibleMask((PsiBinaryExpression) strippedRhs, strippedLhs)){ registerError(expression); } } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/10dfc0821a579a6a0ff949a64d378572f57a4625/IncompatibleMaskInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/bitwise/IncompatibleMaskInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
5905,
2300,
26964,
5962,
453,
7722,
5905,
2300,
2652,
15329,
5411,
2240,
18,
11658,
5905,
2300,
12,
8692,
1769,
5411,
309,
12,
5,
12,
8692,
18,
588,
1457,
457,
464,
1435,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
5905,
2300,
26964,
5962,
453,
7722,
5905,
2300,
2652,
15329,
5411,
2240,
18,
11658,
5905,
2300,
12,
8692,
1769,
5411,
309,
12,
5,
12,
8692,
18,
588,
1457,
457,
464,
1435,... |
stub._put(WSSHandlerConstants.INFLOW_SECURITY, inflowConfig.getProperty()); | stub._getClientOptions().setProperty(WSSHandlerConstants.INFLOW_SECURITY, inflowConfig.getProperty()); | public void invokeWithGivenConfig(String clientRepo, String url, OutflowConfiguration outflowConfig, InflowConfiguration inflowConfig) throws Exception { TicketType ticket = TicketType.Factory.newInstance(); ticket.setId("My ticket Id"); Ping ping = Ping.Factory.newInstance(); ping.setText("Testing axis2-wss4j module"); ping.setTicket(ticket); PingDocument pingDoc = PingDocument.Factory.newInstance(); pingDoc.setPing(ping); PingPortStub stub = new PingPortStub(clientRepo,url); //Enable MTOM to those scenarios where they are configured using: //<optimizeParts>xpathExpression</optimizeParts> stub._put(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); //Engage the security module stub.engageModule("security"); if(outflowConfig !=null){ stub._put(WSSHandlerConstants.OUTFLOW_SECURITY, outflowConfig.getProperty()); } if(inflowConfig != null) { stub._put(WSSHandlerConstants.INFLOW_SECURITY, inflowConfig.getProperty()); } PingResponseDocument pingResDoc = stub.Ping(pingDoc); PingResponse pingRes = pingResDoc.getPingResponse(); System.out.println(pingRes.getText()); } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/e2e08d1472bc0bded7bc6bf6d30dcb53fa25bf5e/InteropScenarioClient.java/buggy/modules/security/interop/org/apache/axis2/security/InteropScenarioClient.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4356,
1190,
6083,
809,
12,
780,
1004,
8791,
16,
514,
880,
16,
2976,
2426,
1750,
596,
2426,
809,
16,
657,
2426,
1750,
316,
2426,
809,
13,
1216,
1185,
288,
3639,
22023,
559,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4356,
1190,
6083,
809,
12,
780,
1004,
8791,
16,
514,
880,
16,
2976,
2426,
1750,
596,
2426,
809,
16,
657,
2426,
1750,
316,
2426,
809,
13,
1216,
1185,
288,
3639,
22023,
559,
93... |
public static final JobEntryLoader getInstance() | public static final JobEntryLoader getInstance(String pluginDirectory[]) | public static final JobEntryLoader getInstance() { if (jobEntryLoader!=null) return jobEntryLoader; jobEntryLoader = new JobEntryLoader( new String[] { Const.PLUGIN_JOBENTRIES_DIRECTORY_PUBLIC, Const.PLUGIN_JOBENTRIES_DIRECTORY_PRIVATE } ); return jobEntryLoader; } | 58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/90d1bb3006f4994f15681525054baace2e7e4d8b/JobEntryLoader.java/buggy/kettle/src/be/ibridge/kettle/job/JobEntryLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
727,
3956,
1622,
2886,
3694,
1435,
202,
95,
202,
202,
430,
261,
4688,
1622,
2886,
5,
33,
2011,
13,
327,
1719,
1622,
2886,
31,
9506,
202,
4688,
1622,
2886,
273,
394,
3956,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
727,
3956,
1622,
2886,
3694,
1435,
202,
95,
202,
202,
430,
261,
4688,
1622,
2886,
5,
33,
2011,
13,
327,
1719,
1622,
2886,
31,
9506,
202,
4688,
1622,
2886,
273,
394,
3956,... |
time += cal.get(Calendar.MILLISECOND) * 300 / 1000; | time += Math.round(cal.get(Calendar.MILLISECOND) * 300f / 1000); | private static void putDateTimeValue(RequestStream out, Object value) throws IOException { int daysSince1900; int time; if (value == null) { out.write((byte) 0); return; } synchronized (cal) { out.write((byte) 8); cal.setTime((java.util.Date) value); if (!Driver.JDBC3) { // Not Running under 1.4 so need to add milliseconds cal.set(Calendar.MILLISECOND, ((java.sql.Timestamp)value).getNanos() / 1000000); } if (value instanceof java.sql.Time) { daysSince1900 = 0; } else { daysSince1900 = calendarToSybase(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH)+1, cal.get(Calendar.DAY_OF_MONTH)); } time = cal.get(Calendar.HOUR_OF_DAY) * 1080000; time += cal.get(Calendar.MINUTE) * 18000; time += cal.get(Calendar.SECOND) * 300; if (value instanceof java.sql.Timestamp) { time += cal.get(Calendar.MILLISECOND) * 300 / 1000; } out.write((int) daysSince1900); out.write((int) time); } } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/934d3f73f62b99f71d8f48ffbb2d02bb406aa576/TdsData.java/buggy/trunk/jtds/src/main/net/sourceforge/jtds/jdbc/TdsData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
1378,
5096,
620,
12,
691,
1228,
596,
16,
1033,
460,
13,
565,
1216,
1860,
288,
3639,
509,
4681,
9673,
3657,
713,
31,
3639,
509,
813,
31,
3639,
309,
261,
1132,
422,
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,
3238,
760,
918,
1378,
5096,
620,
12,
691,
1228,
596,
16,
1033,
460,
13,
565,
1216,
1860,
288,
3639,
509,
4681,
9673,
3657,
713,
31,
3639,
509,
813,
31,
3639,
309,
261,
1132,
422,
446,
... |
public static void resolve(final SReference reference){ if (reference instanceof ExternalReference) return; CommandProcessor.instance().executeCommand(new Runnable() { public void run() { String role = reference.getRole(); SNode sourceNode = reference.getSourceNode(); SModel model = sourceNode.getModel(); String packageName = sourceNode.getClass().getPackage().getName(); Class cls = sourceNode.getClass(); SNode oldTarget = reference.getTargetNode(); //reference.setBad(); while (cls != SNode.class) { try { String className = cls.getName(); className = className.substring(className.lastIndexOf('.') + 1); //if method exists but can't resolve we'll mark our reference as a bad one Class resolveClass = Class.forName(packageName+".resolve.Resolver", true, ClassLoaderManager.getInstance().getClassLoader()); Method m = resolveClass.getMethod("resolveForRole"+role+"In"+className, SReference.class, Class.class); // model.setLoading(true); boolean success = (Boolean)m.invoke(null, reference, cls); // model.setLoading(false); if (success) { sourceNode.removeReference(reference); /* reference.setGood(); reference.setResolveInfo(null); reference.setTargetClassResolveInfo((String)null);*/ } else { reference.setBad(); } return; } catch (NullPointerException e) { // model.setLoading(false); return; } catch (Exception e) { // model.setLoading(false); } cls = cls.getSuperclass(); } reference.setGood(); reference.setResolveInfo(null); } } , "resolve" ); } | 14939 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14939/7e92e11639cb34b47146f9c91e74e4a0dea2eb0c/Resolver.java/buggy/source/jetbrains/mps/resolve/Resolver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2245,
12,
6385,
348,
2404,
2114,
15329,
565,
309,
261,
6180,
1276,
11352,
2404,
13,
327,
31,
565,
3498,
5164,
18,
1336,
7675,
8837,
2189,
12,
2704,
10254,
1435,
288,
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,
1071,
760,
918,
2245,
12,
6385,
348,
2404,
2114,
15329,
565,
309,
261,
6180,
1276,
11352,
2404,
13,
327,
31,
565,
3498,
5164,
18,
1336,
7675,
8837,
2189,
12,
2704,
10254,
1435,
288,
1377,... | ||
throw (Throwable)t; | throw (Throwable) t; | public PyObject _jcallexc(Object[] args) throws Throwable { PyObject[] pargs = new PyObject[args.length]; try { int n = args.length; for (int i=0; i<n; i++) pargs[i] = Py.java2py(args[i]); return __call__(pargs); } catch (PyException e) { if (e.value instanceof PyJavaInstance) { Object t = e.value.__tojava__(Throwable.class); if (t != null && t != Py.NoConversion) { throw (Throwable)t; } } else { ThreadState ts = Py.getThreadState(); if (ts.frame == null) { Py.maybeSystemExit(e); } if (Options.showPythonProxyExceptions) { Py.stderr.println( "Exception in Python proxy returning to Java:"); Py.printException(e); } } throw e; } } | 6527 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6527/f1a14fc2e5b8633379ef5db31fa9e36925099543/PyObject.java/clean/org/python/core/PyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4707,
921,
389,
78,
771,
4149,
71,
12,
921,
8526,
833,
13,
1216,
4206,
288,
3639,
4707,
921,
8526,
779,
564,
273,
394,
4707,
921,
63,
1968,
18,
2469,
15533,
3639,
775,
288,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4707,
921,
389,
78,
771,
4149,
71,
12,
921,
8526,
833,
13,
1216,
4206,
288,
3639,
4707,
921,
8526,
779,
564,
273,
394,
4707,
921,
63,
1968,
18,
2469,
15533,
3639,
775,
288,
5411,
... |
public boolean eIsSet( EStructuralFeature eFeature ) | public boolean eIsSet( int featureID ) | public boolean eIsSet( EStructuralFeature eFeature ) { switch ( eDerivedStructuralFeatureID( eFeature ) ) { case ModelPackage.DIAL_CHART__VERSION : return isSetVersion( ); case ModelPackage.DIAL_CHART__TYPE : return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals( type ); case ModelPackage.DIAL_CHART__SUB_TYPE : return SUB_TYPE_EDEFAULT == null ? subType != null : !SUB_TYPE_EDEFAULT.equals( subType ); case ModelPackage.DIAL_CHART__DESCRIPTION : return description != null; case ModelPackage.DIAL_CHART__BLOCK : return block != null; case ModelPackage.DIAL_CHART__DIMENSION : return isSetDimension( ); case ModelPackage.DIAL_CHART__SCRIPT : return SCRIPT_EDEFAULT == null ? script != null : !SCRIPT_EDEFAULT.equals( script ); case ModelPackage.DIAL_CHART__UNITS : return UNITS_EDEFAULT == null ? units != null : !UNITS_EDEFAULT.equals( units ); case ModelPackage.DIAL_CHART__SERIES_THICKNESS : return isSetSeriesThickness( ); case ModelPackage.DIAL_CHART__GRID_COLUMN_COUNT : return isSetGridColumnCount( ); case ModelPackage.DIAL_CHART__EXTENDED_PROPERTIES : return extendedProperties != null && !extendedProperties.isEmpty( ); case ModelPackage.DIAL_CHART__SAMPLE_DATA : return sampleData != null; case ModelPackage.DIAL_CHART__STYLES : return styles != null && !styles.isEmpty( ); case ModelPackage.DIAL_CHART__INTERACTIVITY : return interactivity != null; case ModelPackage.DIAL_CHART__SERIES_DEFINITIONS : return seriesDefinitions != null && !seriesDefinitions.isEmpty( ); case ModelPackage.DIAL_CHART__MIN_SLICE : return isSetMinSlice( ); case ModelPackage.DIAL_CHART__MIN_SLICE_PERCENT : return isSetMinSlicePercent( ); case ModelPackage.DIAL_CHART__MIN_SLICE_LABEL : return MIN_SLICE_LABEL_EDEFAULT == null ? minSliceLabel != null : !MIN_SLICE_LABEL_EDEFAULT.equals( minSliceLabel ); case ModelPackage.DIAL_CHART__DIAL_SUPERIMPOSITION : return isSetDialSuperimposition( ); } return eDynamicIsSet( eFeature ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/036e8c78765730b146e5854b9d6c397a296fed86/DialChartImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/impl/DialChartImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
20372,
12,
512,
14372,
4595,
425,
4595,
262,
202,
95,
202,
202,
9610,
261,
425,
21007,
14372,
4595,
734,
12,
425,
4595,
262,
262,
202,
202,
95,
1082,
202,
3593,
3164,
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,
1250,
20372,
12,
512,
14372,
4595,
425,
4595,
262,
202,
95,
202,
202,
9610,
261,
425,
21007,
14372,
4595,
734,
12,
425,
4595,
262,
262,
202,
202,
95,
1082,
202,
3593,
3164,
22... |
assertNull( sink ); | assertNotNull( sink ); | public void testAttach() throws Exception { final MockObjectSource source = new MockObjectSource( 15 ); final LeftInputAdapterNode liaNode = new LeftInputAdapterNode( 1, source ); final Field field = ObjectSource.class.getDeclaredField( "sink" ); field.setAccessible( true ); ObjectSinkPropagator sink = (ObjectSinkPropagator) field.get( source ); assertEquals( 1, liaNode.getId() ); assertNull( sink ); liaNode.attach(); sink = (ObjectSinkPropagator) field.get( source ); assertEquals( 1, sink.getSinks().length ); assertSame( liaNode, sink.getSinks()[0] ); } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/bb3b37a32ee8885caf989363d622839eccaf39d1/LeftInputAdapterNodeTest.java/buggy/drools-core/src/test/java/org/drools/reteoo/LeftInputAdapterNodeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4761,
1435,
1216,
1185,
288,
3639,
727,
7867,
921,
1830,
1084,
273,
394,
7867,
921,
1830,
12,
4711,
11272,
3639,
727,
13338,
1210,
4216,
907,
328,
1155,
907,
273,
394,
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,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4761,
1435,
1216,
1185,
288,
3639,
727,
7867,
921,
1830,
1084,
273,
394,
7867,
921,
1830,
12,
4711,
11272,
3639,
727,
13338,
1210,
4216,
907,
328,
1155,
907,
273,
394,
13... |
public void write_octet_array(byte[] value, int offset, int length) { | public void write_octet_array(byte[] value, int offset, int length) { | public void write_octet_array(byte[] value, int offset, int length) { write_align(1, length); System.arraycopy(value, offset, _buffer, _offset, length); _offset += length; } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/9d2c39c906c6955e17daf4ac239b85d4727ddc83/CdrOutputStream.java/buggy/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/CdrOutputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
67,
17909,
67,
1126,
12,
7229,
8526,
460,
16,
509,
1384,
16,
509,
769,
13,
288,
3639,
1045,
67,
7989,
12,
21,
16,
769,
1769,
3639,
2332,
18,
1126,
3530,
12,
1132,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
67,
17909,
67,
1126,
12,
7229,
8526,
460,
16,
509,
1384,
16,
509,
769,
13,
288,
3639,
1045,
67,
7989,
12,
21,
16,
769,
1769,
3639,
2332,
18,
1126,
3530,
12,
1132,
16,... |
Dimension d = getImageBounds(base).getSize(); d.width *= scale; d.height *= scale; | MediaTracker tracker = new MediaTracker(this); if(base.getWidth(null) == -1 || base.getHeight(null) == -1) { tracker.addImage(base,0); try { tracker.waitForID(0); } catch (InterruptedException e) { e.printStackTrace(); } tracker.removeImage(base); } int width = (int)(base.getWidth( null ) * scale); int height = (int)(base.getHeight( null ) * scale); | private Image getScaledImage(Image base) { if (base == null) { return null; } if ( zoomIndex == BASE_ZOOM_INDEX ) { return base; } Image scaled = scaledImageCache.get(base); if (scaled == null) { Dimension d = getImageBounds(base).getSize(); d.width *= scale; d.height *= scale; // This causes errors. // I don't know why. // Happens with zoomed main maps, and seems to relate to morphing terrain and roads //FIXME if ((d.width != 0) && (d.height != 0)) scaled = scale(base, d.width, d.height); else scaled = base; MediaTracker tracker = new MediaTracker(this); tracker.addImage( scaled, 1 ); // Wait for image to load try{ tracker.waitForID( 1 ); } catch (InterruptedException e) { e.printStackTrace(); } tracker.removeImage(scaled); scaledImageCache.put(base, scaled); } return scaled; } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/05380d6b223ff7ae7763b7dc01ea128a53f559a2/BoardView1.java/buggy/megamek/src/megamek/client/ui/AWT/BoardView1.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3421,
1322,
12825,
2040,
12,
2040,
1026,
13,
288,
3639,
309,
261,
1969,
422,
446,
13,
288,
5411,
327,
446,
31,
3639,
289,
3639,
309,
261,
7182,
1016,
422,
10250,
67,
62,
51,
1872,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3421,
1322,
12825,
2040,
12,
2040,
1026,
13,
288,
3639,
309,
261,
1969,
422,
446,
13,
288,
5411,
327,
446,
31,
3639,
289,
3639,
309,
261,
7182,
1016,
422,
10250,
67,
62,
51,
1872,... |
initRecent(); | initRecent(); GUIUtilities.advanceProgress(); | public static void main(String[] args) { // Parse command line boolean endOpts = false; boolean readOnly = false; boolean reuseView = false; settingsDirectory = MiscUtilities.constructPath( System.getProperty("user.home"),".jedit"); String portFile = "server"; boolean defaultSession = true; session = "default"; boolean showSplash = true; for(int i = 0; i < args.length; i++) { String arg = args[i]; if(arg.startsWith("-") && !endOpts) { if(arg.equals("--")) endOpts = true; else if(arg.equals("-usage")) { version(); System.err.println(); usage(); System.exit(1); } else if(arg.equals("-version")) { version(); System.exit(1); } else if(arg.equals("-nosettings")) settingsDirectory = null; else if(arg.startsWith("-settings=")) settingsDirectory = arg.substring(10); else if(arg.startsWith("-noserver")) portFile = null; else if(arg.startsWith("-server=")) portFile = arg.substring(8); else if(arg.equals("-nosession")) session = null; else if(arg.startsWith("-session=")) { session = arg.substring(9); defaultSession = false; } else if(arg.equals("-nosplash")) showSplash = false; else if(arg.equals("-readonly")) readOnly = true; else if(arg.equals("-reuseview")) reuseView = true; else { System.err.println("Unknown option: " + arg); usage(); System.exit(1); } args[i] = null; } } if(settingsDirectory != null && portFile != null) portFile = MiscUtilities.constructPath(settingsDirectory,portFile); else portFile = null; if(session != null) session = Sessions.createSessionFileName(session); // Connect to server String userDir = System.getProperty("user.dir"); if(portFile != null && new File(portFile).exists()) { int port, key; try { BufferedReader in = new BufferedReader(new FileReader(portFile)); port = Integer.parseInt(in.readLine()); key = Integer.parseInt(in.readLine()); in.close(); Socket socket = new Socket(InetAddress.getLocalHost(),port); Writer out = new OutputStreamWriter(socket.getOutputStream()); out.write(String.valueOf(key)); out.write('\n'); if(!defaultSession && session != null) out.write("session=" + session + "\n"); if(readOnly) out.write("readonly\n"); if(reuseView) out.write("reuseview\n"); out.write("parent=" + userDir + "\n"); out.write("--\n"); for(int i = 0; i < args.length; i++) { if(args[i] != null) { out.write(args[i]); out.write('\n'); } } out.close(); System.exit(0); } catch(Exception e) { System.err.println("Error connecting to server:"); e.printStackTrace(); } } // GUIUtilities.static() adds a listener to our list, // so it must be available before GUIUtilities is first used listenerList = new EventListenerList(); // Show the kool splash screen if(showSplash) GUIUtilities.showSplashScreen(); // Get things rolling initMisc(); initSystemProperties(); initPlugins(); initUserProperties(); initActions(); initModes(); initPLAF(); initKeyBindings(); propertiesChanged(); initRecent(); if(settingsDirectory != null) { HistoryModel.loadHistory(MiscUtilities.constructPath( settingsDirectory,"history")); } SearchAndReplace.load(); // Start plugins JARClassLoader.initPlugins(); // Start server if(portFile != null) server = new EditServer(portFile); // Load files specified on the command line Buffer buffer = null; for(int i = 0; i < args.length; i++) { if(args[i] == null) continue; buffer = openFile(null,userDir,args[i],readOnly,false); } if(buffer == null) { if(defaultSession) { if("on".equals(getProperty("saveDesktop"))) buffer = Sessions.loadSession(session,true); } else buffer = Sessions.loadSession(session,false); } if(buffer == null) buffer = newFile(null); // Create the view and hide the splash screen. // Paranoid thread safety courtesy of Sun. final Buffer _buffer = buffer; SwingUtilities.invokeLater(new Runnable() { public void run() { newView(null,_buffer); GUIUtilities.hideSplashScreen(); } }); } | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/f069d2ff351bbe01259f5df8f7a594a981c218e6/jEdit.java/clean/org/gjt/sp/jedit/jEdit.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
202,
95,
202,
202,
759,
2884,
1296,
980,
202,
202,
6494,
679,
5476,
273,
629,
31,
202,
202,
6494,
15075,
273,
629,
31,
202,
202,
6494... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
202,
95,
202,
202,
759,
2884,
1296,
980,
202,
202,
6494,
679,
5476,
273,
629,
31,
202,
202,
6494,
15075,
273,
629,
31,
202,
202,
6494... |
cookie.setMaxAge(validDays * 24 * 60 * 60); | cookie.setMaxAge(validHours * 60 * 60); | public static Cookie createCookie(final String cookieName, final String cookieValue, final int validDays) { /* Validate parameters. */ if (cookieName == null || cookieName.equals("")) { throw new IllegalArgumentException("cookieName must be a non-empty string."); } if (cookieValue == null || cookieValue.equals("")) { throw new IllegalArgumentException("cookieValue must be a non-empty string."); } if (validDays < 0) { throw new IllegalArgumentException("validDays must be a >= 0."); } Cookie cookie = new Cookie(cookieName, cookieValue); cookie.setMaxAge(validDays * 24 * 60 * 60); // Days to seconds cookie.setVersion(0); return cookie; } | 1637 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1637/ddac9d650f74ce3b6836f2052872fd989387bbdc/RequestUtil.java/clean/moria2/modules/moria-web/src/java/no/feide/moria/servlet/RequestUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
10201,
752,
6151,
12,
6385,
514,
25960,
16,
727,
514,
3878,
620,
16,
727,
509,
923,
9384,
13,
288,
3639,
1748,
3554,
1472,
18,
1195,
3639,
309,
261,
8417,
461,
422,
446,
747,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10201,
752,
6151,
12,
6385,
514,
25960,
16,
727,
514,
3878,
620,
16,
727,
509,
923,
9384,
13,
288,
3639,
1748,
3554,
1472,
18,
1195,
3639,
309,
261,
8417,
461,
422,
446,
747,... |
public void insertAttribute ( String localName ) { if (preCheck()) { _cur._locale.enter(); try { _insertAttribute( localName ); } finally { _cur._locale.exit(); } } else synchronized ( _cur._locale ) { _cur._locale.enter(); try { _insertAttribute( localName ); } finally { _cur._locale.exit(); } } } | public void insertAttribute(String localName) { if (preCheck()) { _cur._locale.enter(); try { _insertAttribute(localName); } finally { _cur._locale.exit(); } } else synchronized (_cur._locale) { _cur._locale.enter(); try { _insertAttribute(localName); } finally { _cur._locale.exit(); } } } | public void insertAttribute ( String localName ) { if (preCheck()) { _cur._locale.enter(); try { _insertAttribute( localName ); } finally { _cur._locale.exit(); } } else synchronized ( _cur._locale ) { _cur._locale.enter(); try { _insertAttribute( localName ); } finally { _cur._locale.exit(); } } } | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/8883179236b87db476131da6fa70580fac43da83/Cursor.java/clean/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cursor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2243,
1499,
261,
514,
11927,
262,
288,
309,
261,
1484,
1564,
10756,
288,
389,
1397,
6315,
6339,
18,
2328,
5621,
775,
288,
389,
6387,
1499,
12,
11927,
11272,
289,
3095,
288,
389... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2243,
1499,
261,
514,
11927,
262,
288,
309,
261,
1484,
1564,
10756,
288,
389,
1397,
6315,
6339,
18,
2328,
5621,
775,
288,
389,
6387,
1499,
12,
11927,
11272,
289,
3095,
288,
389... |
System.arraycopy((new ZipShort(getUserId())).getBytes(), 0, data, 6, 2); System.arraycopy((new ZipShort(getGroupId())).getBytes(), 0, data, 8, 2); | System.arraycopy( ( new ZipShort( getUserId() ) ).getBytes(), 0, data, 6, 2 ); System.arraycopy( ( new ZipShort( getGroupId() ) ).getBytes(), 0, data, 8, 2 ); | public byte[] getLocalFileDataData() { // CRC will be added later byte[] data = new byte[getLocalFileDataLength().getValue() - 4]; System.arraycopy((new ZipShort(getMode())).getBytes(), 0, data, 0, 2); byte[] linkArray = getLinkedFile().getBytes(); System.arraycopy((new ZipLong(linkArray.length)).getBytes(), 0, data, 2, 4); System.arraycopy((new ZipShort(getUserId())).getBytes(), 0, data, 6, 2); System.arraycopy((new ZipShort(getGroupId())).getBytes(), 0, data, 8, 2); System.arraycopy(linkArray, 0, data, 10, linkArray.length); crc.reset(); crc.update(data); long checksum = crc.getValue(); byte[] result = new byte[data.length + 4]; System.arraycopy((new ZipLong(checksum)).getBytes(), 0, result, 0, 4); System.arraycopy(data, 0, result, 4, data.length); return result; } | 10884 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10884/8348e0b29d34f62b8f140a99598373fb0cbf7fcb/AsiExtraField.java/buggy/src/main/java/org/codehaus/plexus/archiver/zip/AsiExtraField.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1160,
8526,
6993,
812,
751,
751,
1435,
288,
3639,
368,
21773,
903,
506,
3096,
5137,
3639,
1160,
8526,
501,
273,
394,
1160,
63,
588,
2042,
812,
751,
1782,
7675,
24805,
1435,
300,
105... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1160,
8526,
6993,
812,
751,
751,
1435,
288,
3639,
368,
21773,
903,
506,
3096,
5137,
3639,
1160,
8526,
501,
273,
394,
1160,
63,
588,
2042,
812,
751,
1782,
7675,
24805,
1435,
300,
105... |
throw new PSQLException("postgresql.con.misc", pgStream.ReceiveString(encoding)); | throw new PSQLException("postgresql.con.misc", PSQLState.CONNECTION_REJECTED, pgStream.ReceiveString(encoding)); | private void openConnectionV3(String p_host, int p_port, Properties p_info, String p_database, String p_url, Driver p_d, String p_password) throws SQLException { PGProtocolVersionMajor = 3; if (Driver.logDebug) Driver.debug("Using Protocol Version3"); // Now we need to construct and send an ssl startup packet try { if (useSSL) { if (Driver.logDebug) Driver.debug("Asking server if it supports ssl"); pgStream.SendInteger(8,4); pgStream.SendInteger(80877103,4); // now flush the ssl packets to the backend pgStream.flush(); // Now get the response from the backend, either an error message // or an authentication request int beresp = pgStream.ReceiveChar(); if (Driver.logDebug) Driver.debug("Server response was (S=Yes,N=No): "+(char)beresp); switch (beresp) { case 'E': // An error occured, so pass the error message to the // user. // // The most common one to be thrown here is: // "User authentication failed" // throw new PSQLException("postgresql.con.misc", pgStream.ReceiveString(encoding)); case 'N': // Server does not support ssl throw new PSQLException("postgresql.con.sslnotsupported"); case 'S': // Server supports ssl if (Driver.logDebug) Driver.debug("server does support ssl"); Driver.makeSSL(pgStream); break; default: throw new PSQLException("postgresql.con.sslfail"); } } } catch (IOException e) { throw new PSQLException("postgresql.con.failed", e); } // Now we need to construct and send a startup packet try { new StartupPacket(PGProtocolVersionMajor, PGProtocolVersionMinor, PG_USER, p_database).writeTo(pgStream); // now flush the startup packets to the backend pgStream.flush(); // Now get the response from the backend, either an error message // or an authentication request int areq = -1; // must have a value here do { int beresp = pgStream.ReceiveChar(); String salt = null; byte [] md5Salt = new byte[4]; switch (beresp) { case 'E': // An error occured, so pass the error message to the // user. // // The most common one to be thrown here is: // "User authentication failed" // int l_elen = pgStream.ReceiveIntegerR(4); if (l_elen > 30000) { //if the error length is > than 30000 we assume this is really a v2 protocol //server so try again with a v2 connection //need to create a new connection and try again try { pgStream = new PGStream(p_host, p_port); } catch (ConnectException cex) { // Added by Peter Mount <peter@retep.org.uk> // ConnectException is thrown when the connection cannot be made. // we trap this an return a more meaningful message for the end user throw new PSQLException ("postgresql.con.refused"); } catch (IOException e) { throw new PSQLException ("postgresql.con.failed", e); } openConnectionV2(p_host, p_port, p_info, p_database, p_url, p_d, p_password); return; } throw new PSQLException("postgresql.con.misc",encoding.decode(pgStream.Receive(l_elen-4))); case 'R': // Get the message length int l_msgLen = pgStream.ReceiveIntegerR(4); // Get the type of request areq = pgStream.ReceiveIntegerR(4); // Get the crypt password salt if there is one if (areq == AUTH_REQ_CRYPT) { byte[] rst = new byte[2]; rst[0] = (byte)pgStream.ReceiveChar(); rst[1] = (byte)pgStream.ReceiveChar(); salt = new String(rst, 0, 2); if (Driver.logDebug) Driver.debug("Crypt salt=" + salt); } // Or get the md5 password salt if there is one if (areq == AUTH_REQ_MD5) { md5Salt[0] = (byte)pgStream.ReceiveChar(); md5Salt[1] = (byte)pgStream.ReceiveChar(); md5Salt[2] = (byte)pgStream.ReceiveChar(); md5Salt[3] = (byte)pgStream.ReceiveChar(); salt = new String(md5Salt, 0, 4); if (Driver.logDebug) Driver.debug("MD5 salt=" + salt); } // now send the auth packet switch (areq) { case AUTH_REQ_OK: break; case AUTH_REQ_KRB4: if (Driver.logDebug) Driver.debug("postgresql: KRB4"); throw new PSQLException("postgresql.con.kerb4"); case AUTH_REQ_KRB5: if (Driver.logDebug) Driver.debug("postgresql: KRB5"); throw new PSQLException("postgresql.con.kerb5"); case AUTH_REQ_SCM: if (Driver.logDebug) Driver.debug("postgresql: SCM"); throw new PSQLException("postgresql.con.scm"); case AUTH_REQ_PASSWORD: if (Driver.logDebug) Driver.debug("postgresql: PASSWORD"); pgStream.SendChar('p'); pgStream.SendInteger(5 + p_password.length(), 4); pgStream.Send(p_password.getBytes()); pgStream.SendChar(0); pgStream.flush(); break; case AUTH_REQ_CRYPT: if (Driver.logDebug) Driver.debug("postgresql: CRYPT"); String crypted = UnixCrypt.crypt(salt, p_password); pgStream.SendChar('p'); pgStream.SendInteger(5 + crypted.length(), 4); pgStream.Send(crypted.getBytes()); pgStream.SendChar(0); pgStream.flush(); break; case AUTH_REQ_MD5: if (Driver.logDebug) Driver.debug("postgresql: MD5"); byte[] digest = MD5Digest.encode(PG_USER, p_password, md5Salt); pgStream.SendChar('p'); pgStream.SendInteger(5 + digest.length, 4); pgStream.Send(digest); pgStream.SendChar(0); pgStream.flush(); break; default: throw new PSQLException("postgresql.con.auth", new Integer(areq)); } break; default: throw new PSQLException("postgresql.con.authfail"); } } while (areq != AUTH_REQ_OK); } catch (IOException e) { throw new PSQLException("postgresql.con.failed", e); } int beresp; do { beresp = pgStream.ReceiveChar(); switch (beresp) { case 'Z': //ready for query break; case 'K': int l_msgLen = pgStream.ReceiveIntegerR(4); if (l_msgLen != 12) throw new PSQLException("postgresql.con.setup"); pid = pgStream.ReceiveIntegerR(4); ckey = pgStream.ReceiveIntegerR(4); break; case 'E': int l_elen = pgStream.ReceiveIntegerR(4); throw new PSQLException("postgresql.con.backend",encoding.decode(pgStream.Receive(l_elen-4))); case 'N': int l_nlen = pgStream.ReceiveIntegerR(4); addWarning(encoding.decode(pgStream.Receive(l_nlen-4))); break; case 'S': //TODO: handle parameter status messages int l_len = pgStream.ReceiveIntegerR(4); String l_pStatus = encoding.decode(pgStream.Receive(l_len-4)); if (Driver.logDebug) Driver.debug("ParameterStatus="+ l_pStatus); break; default: if (Driver.logDebug) Driver.debug("invalid state="+ (char)beresp); throw new PSQLException("postgresql.con.setup"); } } while (beresp != 'Z'); // read ReadyForQuery if (pgStream.ReceiveIntegerR(4) != 5) throw new PSQLException("postgresql.con.setup"); //TODO: handle transaction status char l_tStatus = (char)pgStream.ReceiveChar(); // "pg_encoding_to_char(1)" will return 'EUC_JP' for a backend compiled with multibyte, // otherwise it's hardcoded to 'SQL_ASCII'. // If the backend doesn't know about multibyte we can't assume anything about the encoding // used, so we denote this with 'UNKNOWN'. //Note: begining with 7.2 we should be using pg_client_encoding() which //is new in 7.2. However it isn't easy to conditionally call this new //function, since we don't yet have the information as to what server //version we are talking to. Thus we will continue to call //getdatabaseencoding() until we drop support for 7.1 and older versions //or until someone comes up with a conditional way to run one or //the other function depending on server version that doesn't require //two round trips to the server per connection final String encodingQuery = "case when pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end"; // Set datestyle and fetch db encoding in a single call, to avoid making // more than one round trip to the backend during connection startup. BaseResultSet resultSet = execSQL("set datestyle to 'ISO'; select version(), " + encodingQuery + ";"); if (! resultSet.next()) { throw new PSQLException("postgresql.con.failed", "failed getting backend encoding"); } String version = resultSet.getString(1); dbVersionNumber = extractVersionNumber(version); String dbEncoding = resultSet.getString(2); encoding = Encoding.getEncoding(dbEncoding, p_info.getProperty("charSet")); //In 7.3 we are forced to do a second roundtrip to handle the case //where a database may not be running in autocommit mode //jdbc by default assumes autocommit is on until setAutoCommit(false) //is called. Therefore we need to ensure a new connection is //initialized to autocommit on. //We also set the client encoding so that the driver only needs //to deal with utf8. We can only do this in 7.3 because multibyte //support is now always included if (haveMinimumServerVersion("7.3")) { BaseResultSet acRset = //TODO: if protocol V3 we can set the client encoding in startup execSQL("set client_encoding = 'UNICODE'"); //set encoding to be unicode encoding = Encoding.getEncoding("UNICODE", null); } // Initialise object handling initObjectTypes(); // Mark the connection as ok, and cleanup PG_STATUS = CONNECTION_OK; } | 46312 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46312/0378a269f3ab3c44e67b14f96414b6ca95263263/AbstractJdbc1Connection.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
24982,
58,
23,
12,
780,
293,
67,
2564,
16,
509,
293,
67,
655,
16,
6183,
293,
67,
1376,
16,
514,
293,
67,
6231,
16,
514,
293,
67,
718,
16,
9396,
293,
67,
72,
16,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24982,
58,
23,
12,
780,
293,
67,
2564,
16,
509,
293,
67,
655,
16,
6183,
293,
67,
1376,
16,
514,
293,
67,
6231,
16,
514,
293,
67,
718,
16,
9396,
293,
67,
72,
16,
51... |
if (fContentType == null || fRules == null) | if (fContentType == null || fRules == null) { if (resume) fOffset= fPartitionOffset; | public IToken nextToken() { if (fContentType == null || fRules == null) return super.nextToken(); fTokenOffset= fOffset; fColumn= UNDEFINED; boolean resume= (fPartitionOffset < fOffset); IPredicateRule rule; IToken token; for (int i= 0; i < fRules.length; i++) { rule= (IPredicateRule) fRules[i]; token= rule.getSuccessToken(); if (fContentType.equals(token.getData())) { if (resume) fTokenOffset= fPartitionOffset; token= rule.evaluate(this, resume); if (!token.isUndefined()) { fContentType= null; return token; } } } fContentType= null; return super.nextToken(); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/dae691b2264e050f5207c17f85c0984110c69f33/RuleBasedPartitionScanner.java/buggy/bundles/org.eclipse.ui/Eclipse JFace Text/org/eclipse/jface/text/rules/RuleBasedPartitionScanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
1345,
9617,
1435,
288,
9506,
202,
430,
261,
74,
8046,
422,
446,
747,
284,
4478,
422,
446,
13,
1082,
202,
2463,
2240,
18,
4285,
1345,
5621,
9506,
202,
74,
1345,
2335,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
467,
1345,
9617,
1435,
288,
9506,
202,
430,
261,
74,
8046,
422,
446,
747,
284,
4478,
422,
446,
13,
1082,
202,
2463,
2240,
18,
4285,
1345,
5621,
9506,
202,
74,
1345,
2335,
33,
... |
dropTable("#t0017"); | dropTable("#t0017"); | public void testDatatypes0017() throws Exception { Connection cx = getConnection(); Statement stmt = cx.createStatement(); dropTable("#t0017"); /* remove ( ), convert , to _ myXXXX, mynullXXXX // Insert a row without nulls via a Statement // Insert a row with nulls via a Statement // Insert a row without nulls via a PreparedStatement // Insert a row with nulls via a PreparedStatement // Now verify that the database has the same data as we put in. */ } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/d456535dc5bca0bbf54c0b9c6730e782aa275787/TimestampTest.java/clean/src.old/test/freetds/TimestampTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
5139,
13373,
713,
4033,
1435,
1216,
1185,
202,
95,
202,
202,
1952,
9494,
273,
6742,
5621,
202,
202,
3406,
3480,
273,
9494,
18,
2640,
3406,
5621,
202,
202,
7285,
1388,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5139,
13373,
713,
4033,
1435,
1216,
1185,
202,
95,
202,
202,
1952,
9494,
273,
6742,
5621,
202,
202,
3406,
3480,
273,
9494,
18,
2640,
3406,
5621,
202,
202,
7285,
1388,... |
java.util.TreeMap ent = (TreeMap) itr.next(); | SnmpTableEntry ent = (SnmpTableEntry) itr.next(); | public static void main(String[] a) throws UnknownHostException { //String localhost = "127.0.0.1"; String localhost = "10.3.2.216"; InetAddress ip = InetAddress.getByName(localhost); SnmpAgentConfig peer = new SnmpAgentConfig(ip); SnmpCollection snmpCollector = new SnmpCollection(peer); snmpCollector.run(); java.util.Iterator itr = snmpCollector.getVlanTable().iterator(); System.out.println("number of vlan entities = " + snmpCollector.m_vlanTable.getEntries().size()); while (itr.hasNext()) { java.util.TreeMap ent = (TreeMap) itr.next(); System.out.println("Vlan found: Vlan Index = " + ent.get(VlanCollectorEntry.VLAN_INDEX).toString() + " Vlan name = " + ent.get(VlanCollectorEntry.VLAN_NAME).toString()); } } | 11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/f3e13aa5f29f79fb74c5975bb7cf59814d4d4cb1/SnmpCollection.java/clean/opennms-services/src/main/java/org/opennms/netmgt/linkd/SnmpCollection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
279,
13,
1216,
30592,
288,
202,
202,
759,
780,
17365,
273,
315,
14260,
18,
20,
18,
20,
18,
21,
14432,
202,
202,
780,
17365,
273,
315,
2163,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
279,
13,
1216,
30592,
288,
202,
202,
759,
780,
17365,
273,
315,
14260,
18,
20,
18,
20,
18,
21,
14432,
202,
202,
780,
17365,
273,
315,
2163,
18... |
if (scope.equals(ON_SELECTED_ONLY)) | } if (scope.equals(ON_SELECTED_ONLY)) { | private int getScopeValue(IConfigurationElement element) { String scope = element.getAttribute(SCOPE); if (scope == null) return -1; if (scope.equals(ON_ANY)) return MarkerFilter.ON_ANY; if (scope.equals(ON_SELECTED_ONLY)) return MarkerFilter.ON_SELECTED_ONLY; if (scope.equals(ON_SELECTED_AND_CHILDREN)) return MarkerFilter.ON_SELECTED_AND_CHILDREN; if (scope.equals(ON_ANY_IN_SAME_CONTAINER)) return MarkerFilter.ON_ANY_IN_SAME_CONTAINER; return -1; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/MarkerSupportRegistry.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerSupportRegistry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
509,
19203,
620,
12,
45,
1750,
1046,
930,
13,
288,
202,
202,
780,
2146,
273,
930,
18,
588,
1499,
12,
19444,
1769,
202,
202,
430,
261,
4887,
422,
446,
13,
1082,
202,
2463,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
509,
19203,
620,
12,
45,
1750,
1046,
930,
13,
288,
202,
202,
780,
2146,
273,
930,
18,
588,
1499,
12,
19444,
1769,
202,
202,
430,
261,
4887,
422,
446,
13,
1082,
202,
2463,
3... |
case BOND : if (!stereoGiven) bondStereo.addElement(""); break; case MOLECULE : storeData(); cdo.endObject("Frame"); cdo.endObject("Molecule"); break; | case BOND : if (!stereoGiven) bondStereo.addElement(""); break; case MOLECULE : storeData(); cdo.endObject("Frame"); cdo.endObject("Molecule"); break; case COORDINATE3: if (BUILTIN.equals("xyz3")) { logger.debug("New coord3 xyz3 found: " + currentChars); try { StringTokenizer st = new StringTokenizer(currentChars); x3.addElement(st.nextToken()); y3.addElement(st.nextToken()); z3.addElement(st.nextToken()); logger.debug("coord3 x3.length: " + x3.size()); logger.debug("coord3 y3.length: " + y3.size()); logger.debug("coord3 z3.length: " + z3.size()); } catch (Exception e) { logger.error("CMLParsing error while setting coordinate3!"); } } else { logger.warn("Unknown coordinate3 BUILTIN: " + BUILTIN); } break; | public void endElement(String uri, String local, String raw) { String name = raw; logger.debug("EndElement"); setCurrentElement(name); BUILTIN = ""; switch (CurrentElement) { case BOND : if (!stereoGiven) bondStereo.addElement(""); break; case MOLECULE : storeData(); cdo.endObject("Frame"); cdo.endObject("Molecule"); break; } } | 45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/8f9b8d4786fbeb6ba3b5913f1e5c5a9ebf157701/Convention.java/clean/org/openscience/cdk/io/cml/Convention.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
14840,
12,
780,
2003,
16,
514,
1191,
16,
514,
1831,
13,
288,
202,
780,
508,
273,
1831,
31,
202,
4901,
18,
4148,
2932,
1638,
1046,
8863,
202,
542,
3935,
1046,
12,
529,
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,
377,
1071,
918,
14840,
12,
780,
2003,
16,
514,
1191,
16,
514,
1831,
13,
288,
202,
780,
508,
273,
1831,
31,
202,
4901,
18,
4148,
2932,
1638,
1046,
8863,
202,
542,
3935,
1046,
12,
529,
1769,
... |
public BrowserMenuBar(final Browser browser) { | public BrowserMenuBar(final Browser browser, final Boolean maximized) { | public BrowserMenuBar(final Browser browser) { super(); this.browser = browser; this.localization = new JFrameLocalization("BrowserWindow.Menu"); this.popupItemFactory = PopupItemFactory.getInstance(); this.resizer = new Resizer(browser, this, Boolean.TRUE, Resizer.ResizeEdges.TOP); // Create JMenus final JMenu newMenu = MenuFactory.create(localization.getString("New"), new Integer(localization.getString("NewMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(6,0))); this.add(newMenu); final JMenu profileMenu = MenuFactory.create(localization.getString("Profile"), new Integer(localization.getString("ProfileMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(profileMenu); final JMenu helpMenu = MenuFactory.create(localization.getString("Help"), new Integer(localization.getString("HelpMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(helpMenu); // Create the New popup menu newMenu.add(popupItemFactory.createMenuPopupItem(ActionId.CONTAINER_CREATE, Data.emptyData())); newMenu.add(popupItemFactory.createMenuPopupItem(ActionId.CONTACT_CREATE_INCOMING_INVITATION, Data.emptyData())); // Create the Profile menu final Data updateProfileData = new Data(1); updateProfileData.set(Update.DataKey.DISPLAY_AVATAR, Boolean.TRUE); profileMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PROFILE_UPDATE, updateProfileData)); // Create the OpenHelp menu helpMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PLATFORM_BROWSER_OPEN_HELP, Data.emptyData())); helpMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PLATFORM_BROWSER_DISPLAY_INFO, Data.emptyData())); // Create the Sign-Up button this.add(Box.createRigidArea(new Dimension(5,0))); final JLabel label = new JLabel("Sign-Up"); label.setForeground(new Color(249, 162, 94, 255)); final String orig = label.getText(); label.setFont(Fonts.DefaultFontBold); label.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { final String text = label.getText(); label.setText(MessageFormat.format("<html><u>{0}</u></html>", text)); } @Override public void mouseExited(final MouseEvent e) { label.setText(MessageFormat.format("<html>{0}</html>", orig)); } }); this.add(label); //this.add(ButtonFactory.create(ActionId.PROFILE_SIGN_UP, Data.emptyData())); this.add(Box.createHorizontalGlue()); // Add minimize, maximize and close buttons this.add(getMinimizeButton()); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(getMaximizeButton()); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(getCloseButton()); this.add(Box.createRigidArea(new Dimension(4,0))); } | 53635 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53635/5df2e6a8f48a4687ecb1808669030ad1f9cc6e45/BrowserMenuBar.java/buggy/client-ui/src/main/java/com/thinkparity/ophelia/browser/application/browser/BrowserMenuBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15408,
4599,
5190,
12,
6385,
15408,
4748,
16,
727,
3411,
30547,
1235,
13,
288,
3639,
2240,
5621,
3639,
333,
18,
11213,
273,
4748,
31,
3639,
333,
18,
3729,
1588,
273,
394,
804,
3219,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15408,
4599,
5190,
12,
6385,
15408,
4748,
16,
727,
3411,
30547,
1235,
13,
288,
3639,
2240,
5621,
3639,
333,
18,
11213,
273,
4748,
31,
3639,
333,
18,
3729,
1588,
273,
394,
804,
3219,... |
public IStatus run(IProgressMonitor monitor) { try { monitor.beginTask(LABEL_SYNCHRONIZE_TASK, repositoryTasks.size()); setProperty(IProgressConstants.ICON_PROPERTY, TaskListImages.REPOSITORY_SYNCHRONIZE); for (AbstractRepositoryTask repositoryTask : repositoryTasks) { if (monitor.isCanceled()) throw new OperationCanceledException(); if(isDirty(repositoryTask)) { MylarStatusHandler.log(repositoryTask.getDescription()+" editor dirty. Skipping synchronization.", this); continue; } // TODO: refactor conditions boolean canNotSynch = repositoryTask.isDirty() || repositoryTask.isSynchronizing(); boolean hasLocalChanges = repositoryTask.getSyncState() == RepositoryTaskSyncState.OUTGOING || repositoryTask.getSyncState() == RepositoryTaskSyncState.CONFLICT; if (forceSync || (!canNotSynch && !hasLocalChanges) || !repositoryTask.isDownloaded()) { monitor.setTaskName(LABEL_SYNCHRONIZING+repositoryTask.getDescription()); repositoryTask.setCurrentlyDownloading(true); MylarTaskListPlugin.getTaskListManager().getTaskList().notifyRepositoryInfoChanged(repositoryTask); this.connector.updateOfflineState(repositoryTask, forceSync); repositoryTask.setCurrentlyDownloading(false);// if (repositoryTask.getSyncState() == RepositoryTaskSyncState.INCOMING) {// repositoryTask.setSyncState(RepositoryTaskSyncState.SYNCHRONIZED);// } else if (repositoryTask.getSyncState() == RepositoryTaskSyncState.CONFLICT) {// repositoryTask.setSyncState(RepositoryTaskSyncState.OUTGOING);// } MylarTaskListPlugin.getTaskListManager().getTaskList().notifyRepositoryInfoChanged(repositoryTask); } monitor.worked(1); } } catch (Exception e) { MylarStatusHandler.fail(e, "Could not download report", false); } finally { monitor.done(); } // this.connector.removeRefreshingTask(repositoryTask); return new Status(IStatus.OK, MylarPlugin.PLUGIN_ID, IStatus.OK, "", null); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/d5ac49cfa9b03216cd984a4823cace7a63fded8b/SynchronizeTaskJob.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/provisional/tasklist/SynchronizeTaskJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
1482,
1086,
12,
45,
5491,
7187,
6438,
13,
288,
202,
202,
698,
288,
1082,
202,
10259,
18,
10086,
2174,
12,
13545,
67,
7474,
50,
1792,
19359,
15641,
67,
15580,
16,
3352,
66... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
467,
1482,
1086,
12,
45,
5491,
7187,
6438,
13,
288,
202,
202,
698,
288,
1082,
202,
10259,
18,
10086,
2174,
12,
13545,
67,
7474,
50,
1792,
19359,
15641,
67,
15580,
16,
3352,
66... | ||
unsetCRef(); | popCRef(); | public void postExecuteUnder() { popFrame(); popRubyClass(); unsetCRef(); } | 45827 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45827/805d73b7462174e9e5c095eed22a09140bb79b5e/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1603,
5289,
14655,
1435,
288,
3639,
1843,
3219,
5621,
3639,
1843,
54,
10340,
797,
5621,
3639,
1843,
39,
1957,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
1603,
5289,
14655,
1435,
288,
3639,
1843,
3219,
5621,
3639,
1843,
54,
10340,
797,
5621,
3639,
1843,
39,
1957,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Modifier result = targetAst.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD); if (parented) { TypeDeclaration pd = targetAst.newTypeDeclaration(); pd.modifiers().add(result); } return result; | Type result = targetAst.newSimpleType(targetAst.newSimpleName("foo")); if (parented) { targetAst.newArrayType(result); | public ASTNode sample(AST targetAst, boolean parented) { Modifier result = targetAst.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD); if (parented) { TypeDeclaration pd = targetAst.newTypeDeclaration(); pd.modifiers().add(result); } return result; } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/0e6d4fe5469565f21baa2fd0ec88d178818c619b/ASTTest.java/buggy/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
9183,
907,
3296,
12,
9053,
1018,
21385,
16,
1250,
982,
329,
13,
288,
6862,
202,
9829,
563,
273,
1018,
21385,
18,
2704,
9829,
12,
9829,
18,
9829,
8736,
18,
14939,
67,
28813,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4697,
202,
482,
9183,
907,
3296,
12,
9053,
1018,
21385,
16,
1250,
982,
329,
13,
288,
6862,
202,
9829,
563,
273,
1018,
21385,
18,
2704,
9829,
12,
9829,
18,
9829,
8736,
18,
14939,
67,
28813,
1... |
print("int i, count = -1;\n"); | print("int i;\n"); | private void printCircularWorkHeader() { print("{\n"); if (filter.getPeekInt() > 0) { print("int i, count = -1;\n"); if (filter instanceof SIRTwoStageFilter) printCircularTwoStageInitWork(); else { int buffersize = nextPow2(filter.getPeekInt()); print ("#define BUFFERSIZE " + buffersize + "\n"); print ("#define BITS " + (buffersize - 1) + "\n"); print(filter.getInputType() + " buffer[BUFFERSIZE];\n"); print(" for (i = 0; i < " + filter.getPeekInt() + "; i++)\n"); print(" buffer[i] = "); if (filter.getInputType().equals(CStdType.Float)) print("static_receive_f();\n"); else print("static_receive();\n"); } } print(" while (1) {\n"); if (debug) print(" print_int("+ Layout.getTileNumber(filter) + ");\n"); } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/f3a49ff86c6e264213cc9a62388ec04976e6414e/FlatIRToC.java/buggy/streams/src/at/dms/kjc/raw/FlatIRToC.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1172,
25858,
2421,
1864,
1435,
377,
288,
202,
1188,
2932,
23241,
82,
8863,
202,
430,
261,
2188,
18,
588,
30950,
1702,
1435,
405,
374,
13,
288,
202,
565,
1172,
2932,
474,
277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1172,
25858,
2421,
1864,
1435,
377,
288,
202,
1188,
2932,
23241,
82,
8863,
202,
430,
261,
2188,
18,
588,
30950,
1702,
1435,
405,
374,
13,
288,
202,
565,
1172,
2932,
474,
277,
... |
configuration = new Configuration("localhost", 7856); configurationContents = configuration.getConfiguration(); | protected void setUp() throws Exception { super.setUp(); getTestContext().setBaseUrl("http://localhost:7854"); configuration = new Configuration("localhost", 7856); configurationContents = configuration.getConfiguration(); } | 52149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52149/3fa7363651b69ef3895466771838fa22a79e4de5/ProjectConfigurationPageWebTest.java/buggy/webtest/net/sourceforge/cruisecontrol/ProjectConfigurationPageWebTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24292,
1435,
1216,
1185,
288,
3639,
2240,
18,
542,
1211,
5621,
3639,
29384,
1042,
7675,
542,
14074,
2932,
2505,
2207,
13014,
30,
8285,
6564,
8863,
7734,
1664,
273,
394,
4659,
293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24292,
1435,
1216,
1185,
288,
3639,
2240,
18,
542,
1211,
5621,
3639,
29384,
1042,
7675,
542,
14074,
2932,
2505,
2207,
13014,
30,
8285,
6564,
8863,
7734,
1664,
273,
394,
4659,
293... | |
complexContentChild, PROCESSING_ALL); | complexContentChild, PROCESSING_ALL_GP); | private void processComplexContent(int typeNameIndex, Element complexContentChild, ComplexTypeInfo typeInfo, QName baseName, boolean isMixed) throws Exception { Element attrNode = null; int index=-2; String typeName = fStringPool.toString(typeNameIndex); if (complexContentChild != null) { // ------------------------------------------------------------- // GROUP, ALL, SEQUENCE or CHOICE, followed by attributes, if specified. // Note that it's possible that only attributes are specified. // ------------------------------------------------------------- String childName = complexContentChild.getLocalName(); if (childName.equals(SchemaSymbols.ELT_GROUP)) { GroupInfo grpInfo = traverseGroupDecl(complexContentChild); int groupIndex = (grpInfo != null) ? grpInfo.contentSpecIndex:-2; index = handleOccurrences(groupIndex, complexContentChild, hasAllContent(groupIndex) ? GROUP_REF_WITH_ALL : NOT_ALL_CONTEXT); attrNode = XUtil.getNextSiblingElement(complexContentChild); } else if (childName.equals(SchemaSymbols.ELT_SEQUENCE)) { index = handleOccurrences(traverseSequence(complexContentChild), complexContentChild); attrNode = XUtil.getNextSiblingElement(complexContentChild); } else if (childName.equals(SchemaSymbols.ELT_CHOICE)) { index = handleOccurrences(traverseChoice(complexContentChild), complexContentChild); attrNode = XUtil.getNextSiblingElement(complexContentChild); } else if (childName.equals(SchemaSymbols.ELT_ALL)) { index = handleOccurrences(traverseAll(complexContentChild), complexContentChild, PROCESSING_ALL); attrNode = XUtil.getNextSiblingElement(complexContentChild); } else if (isAttrOrAttrGroup(complexContentChild)) { // reset the contentType typeInfo.contentType = XMLElementDecl.TYPE_ANY; attrNode = complexContentChild; } else { throw new ComplexTypeRecoverableError( "Invalid child '"+ childName +"' in the complex type"); } } typeInfo.contentSpecHandle = index; // ----------------------------------------------------------------------- // Merge in information from base, if it exists // ----------------------------------------------------------------------- if (typeInfo.baseComplexTypeInfo != null) { int baseContentSpecHandle = typeInfo.baseComplexTypeInfo.contentSpecHandle; //------------------------------------------------------------- // RESTRICTION //------------------------------------------------------------- if (typeInfo.derivedBy == SchemaSymbols.RESTRICTION) { // check to see if the baseType permits derivation by restriction if((typeInfo.baseComplexTypeInfo.finalSet & SchemaSymbols.RESTRICTION) != 0) throw new ComplexTypeRecoverableError("Derivation by restriction is forbidden by either the base type " + fStringPool.toString(baseName.localpart) + " or the schema"); // if the content is EMPTY, check that the base is correct // according to derivation-ok-restriction 5.2 if (typeInfo.contentSpecHandle==-2) { if (!(typeInfo.baseComplexTypeInfo.contentType==XMLElementDecl.TYPE_EMPTY || particleEmptiable(baseContentSpecHandle))) { throw new ComplexTypeRecoverableError("derivation-ok-restrictoin.5.2 Content type of complexType is EMPTY but base is not EMPTY or does not have a particle which is emptiable"); } } // // The hairy derivation by restriction particle constraints // derivation-ok-restriction 5.3 // else { try { checkParticleDerivationOK(typeInfo.contentSpecHandle,fCurrentScope, baseContentSpecHandle,typeInfo.baseComplexTypeInfo.scopeDefined, typeInfo.baseComplexTypeInfo); } catch (ParticleRecoverableError e) { String message = e.getMessage(); throw new ComplexTypeRecoverableError(message); } } } //------------------------------------------------------------- // EXTENSION //------------------------------------------------------------- else { // check to see if the baseType permits derivation by extension if((typeInfo.baseComplexTypeInfo.finalSet & SchemaSymbols.EXTENSION) != 0) throw new ComplexTypeRecoverableError("cos-ct-extends.1.1: Derivation by extension is forbidden by either the base type " + fStringPool.toString(baseName.localpart) + " or the schema"); // // Check if the contentType of the base is consistent with the new type // cos-ct-extends.1.4.2.2 if (typeInfo.baseComplexTypeInfo.contentType != XMLElementDecl.TYPE_EMPTY) { if (((typeInfo.baseComplexTypeInfo.contentType == XMLElementDecl.TYPE_CHILDREN) && isMixed) || ((typeInfo.baseComplexTypeInfo.contentType == XMLElementDecl.TYPE_MIXED_COMPLEX) && !isMixed)) { throw new ComplexTypeRecoverableError("cos-ct-extends.1.4.2.2.2.1: The content type of the base type " + fStringPool.toString(baseName.localpart) + " and derived type " + typeName + " must both be mixed or element-only"); } } // // Compose the final content model by concatenating the base and the // current in sequence // if (baseFromAnotherSchema(baseName)) { String baseSchemaURI = fStringPool.toString(baseName.uri); SchemaGrammar aGrammar= (SchemaGrammar) fGrammarResolver.getGrammar( baseSchemaURI); baseContentSpecHandle = importContentSpec(aGrammar, baseContentSpecHandle); } if (typeInfo.contentSpecHandle == -2) { typeInfo.contentSpecHandle = baseContentSpecHandle; } else if (baseContentSpecHandle > -1) { if (typeInfo.contentSpecHandle > -1 && (hasAllContent(typeInfo.contentSpecHandle) || hasAllContent(baseContentSpecHandle))) { throw new ComplexTypeRecoverableError("cos-all-limited: An \"all\" model group that is part of a complex type definition must constitute the entire {content type} of the definition."); } typeInfo.contentSpecHandle = fSchemaGrammar.addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_SEQ, baseContentSpecHandle, typeInfo.contentSpecHandle, false); } // // Check that there is a particle in the final content // cos-ct-extends.1.4.2.1 // LM - commented out until I get a clarification from HT // if (typeInfo.contentSpecHandle <0) { throw new ComplexTypeRecoverableError("cos-ct-extends.1.4.2.1: The content of a type derived by EXTENSION must contain a particle"); } } } else { typeInfo.derivedBy = 0; } // ------------------------------------------------------------- // Set the content type // ------------------------------------------------------------- if (isMixed) { // if there are no children, detect an error // See the definition of content type in Structures 3.4.1 // This is commented out for now, until I get a clarification from schema WG // LM. if (typeInfo.contentSpecHandle == -2) { //throw new ComplexTypeRecoverableError("Type '" + typeName + "': The content of a mixed complexType must not be empty"); typeInfo.contentType = XMLElementDecl.TYPE_MIXED_SIMPLE; } else typeInfo.contentType = XMLElementDecl.TYPE_MIXED_COMPLEX; } else if (typeInfo.contentSpecHandle == -2) typeInfo.contentType = XMLElementDecl.TYPE_EMPTY; else typeInfo.contentType = XMLElementDecl.TYPE_CHILDREN; // ------------------------------------------------------------- // add a template element to the grammar element decl pool. // ------------------------------------------------------------- int templateElementNameIndex = fStringPool.addSymbol("$"+typeName); typeInfo.templateElementIndex = fSchemaGrammar.addElementDecl( new QName(-1, templateElementNameIndex,typeNameIndex,fTargetNSURI), (fTargetNSURI==StringPool.EMPTY_STRING) ? StringPool.EMPTY_STRING : fCurrentScope, typeInfo.scopeDefined, typeInfo.contentType, typeInfo.contentSpecHandle, -1, typeInfo.datatypeValidator); typeInfo.attlistHead = fSchemaGrammar.getFirstAttributeDeclIndex( typeInfo.templateElementIndex); // ------------------------------------------------------------- // Now, check attributes and handle // ------------------------------------------------------------- if (attrNode !=null) { if (!isAttrOrAttrGroup(attrNode)) { throw new ComplexTypeRecoverableError( "Invalid child "+ attrNode.getLocalName() + " in the complexType or complexContent"); } else processAttributes(attrNode,baseName,typeInfo); } else if (typeInfo.baseComplexTypeInfo != null) processAttributes(null,baseName,typeInfo); } // end processComplexContent | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/1813e417969028dc870714c567e13675903bd993/TraverseSchema.java/clean/src/org/apache/xerces/validators/schema/TraverseSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
12795,
1350,
12,
474,
8173,
1016,
16,
9079,
3010,
7233,
1350,
1763,
16,
16060,
17305,
23112,
16,
16723,
16162,
16,
9079,
1250,
15707,
3960,
13,
1216,
1185,
288,
4202,
3010,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
12795,
1350,
12,
474,
8173,
1016,
16,
9079,
3010,
7233,
1350,
1763,
16,
16060,
17305,
23112,
16,
16723,
16162,
16,
9079,
1250,
15707,
3960,
13,
1216,
1185,
288,
4202,
3010,... |
return new Vector(periodsToDate( evaluator, evaluator.getCube().getQuarterLevel(), getMemberArg(evaluator, args, 0, false))); | Level level = getLevelArg(evaluator, args, 0, false); Member member = getMemberArg(evaluator, args, 1, false); return new Vector(periodsToDate(evaluator, level, member)); | public Object evaluate(Evaluator evaluator, Exp[] args) { return new Vector(periodsToDate( evaluator, evaluator.getCube().getQuarterLevel(), getMemberArg(evaluator, args, 0, false))); } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/b51b7f4f6bfd44a884afd7801c1f0f8b9351674c/BuiltinFunTable.java/buggy/src/main/mondrian/olap/fun/BuiltinFunTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
25083,
202,
2463,
394,
5589,
12,
6908,
11634,
1626,
12,
6862,
9506,
202,
14168,
639,
16,
6862,
9506,
202,
14168,
639... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4405,
202,
482,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
25083,
202,
2463,
394,
5589,
12,
6908,
11634,
1626,
12,
6862,
9506,
202,
14168,
639,
16,
6862,
9506,
202,
14168,
639... |
char last = pattern.charAt(length - 1); if (pattern.indexOf('*') != -1 || pattern.indexOf('?') != -1) { matchKind = R_PATTERN_MATCH; switch (last) { case END_SYMBOL: fPattern = pattern.substring(0, length - 1); break; case BLANK: fPattern = pattern.trim(); break; case ANY_STRING: fPattern = pattern; break; default: fPattern = pattern + ANY_STRING; } return; } if (last == END_SYMBOL) { matchKind = R_EXACT_MATCH; fPattern = pattern.substring(0, length - 1); return; } if (last == BLANK) { matchKind = R_EXACT_MATCH; fPattern = pattern.trim(); return; } if (validateMatchRule(pattern, R_CAMELCASE_MATCH) == R_CAMELCASE_MATCH) { matchKind = R_CAMELCASE_MATCH; fPattern = pattern; return; } matchKind = R_PREFIX_MATCH; fPattern = pattern; } | private void initializePatternAndMatchKind(String pattern) { int length = pattern.length(); if (length == 0) { matchKind = R_EXACT_MATCH; fPattern = pattern; return; } char last = pattern.charAt(length - 1); if (pattern.indexOf('*') != -1 || pattern.indexOf('?') != -1) { matchKind = R_PATTERN_MATCH; switch (last) { case END_SYMBOL: fPattern = pattern.substring(0, length - 1); break; case BLANK: fPattern = pattern.trim(); break; case ANY_STRING: fPattern = pattern; break; default: fPattern = pattern + ANY_STRING; } return; } if (last == END_SYMBOL) { matchKind = R_EXACT_MATCH; fPattern = pattern.substring(0, length - 1); return; } if (last == BLANK) { matchKind = R_EXACT_MATCH; fPattern = pattern.trim(); return; } if (validateMatchRule(pattern, R_CAMELCASE_MATCH) == R_CAMELCASE_MATCH) { matchKind = R_CAMELCASE_MATCH; fPattern = pattern; return; } matchKind = R_PREFIX_MATCH; fPattern = pattern;} | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/ea0718e0ea8d8a7b8c1c9d464be2b2219d8be426/SearchPattern.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SearchPattern.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
4046,
3234,
1876,
2060,
5677,
12,
780,
1936,
13,
288,
202,
474,
769,
273,
1936,
18,
2469,
5621,
202,
430,
261,
2469,
422,
374,
13,
288,
202,
202,
1916,
5677,
273,
534,
67,
2294,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
918,
4046,
3234,
1876,
2060,
5677,
12,
780,
1936,
13,
288,
202,
474,
769,
273,
1936,
18,
2469,
5621,
202,
430,
261,
2469,
422,
374,
13,
288,
202,
202,
1916,
5677,
273,
534,
67,
2294,
... | |
if (selections.size() == 0) | if (selections.size() == 0) { | public void run() { Iterator keyIterator = items.keySet().iterator(); //Update the store before the hierarchy to prevent updating parents before all of the children are done while (keyIterator.hasNext()) { Object key = keyIterator.next(); //Replace the items in the checked state store with those from the supplied items List selections = (List) items.get(key); if (selections.size() == 0) //If it is empty remove it from the list checkedStateStore.remove(key); else { checkedStateStore.put(key, selections); // proceed up the tree element hierarchy Object parent = treeContentProvider .getParent(key); if (parent != null) { addToHierarchyToCheckedStore(parent); } } } //Now update hierarchies keyIterator = items.keySet().iterator(); while (keyIterator.hasNext()) { Object key = keyIterator.next(); updateHierarchy(key); if (currentTreeSelection != null && currentTreeSelection.equals(key)) { listViewer.setAllChecked(false); listViewer.setCheckedElements(((List) items .get(key)).toArray()); } } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/CheckboxTreeAndListGroup.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/CheckboxTreeAndListGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
5397,
1071,
918,
1086,
1435,
288,
13491,
4498,
498,
3198,
273,
1516,
18,
856,
694,
7675,
9838,
5621,
13491,
368,
1891,
326,
1707,
1865,
326,
9360,
358,
5309,
9702,
6298,
1865,
777,
434,
326,
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,
5397,
1071,
918,
1086,
1435,
288,
13491,
4498,
498,
3198,
273,
1516,
18,
856,
694,
7675,
9838,
5621,
13491,
368,
1891,
326,
1707,
1865,
326,
9360,
358,
5309,
9702,
6298,
1865,
777,
434,
326,
2... |
if (count == Short.MAX_VALUE) { | if (nextCount == Short.MAX_VALUE) { | public UID() { synchronized (lock) { if (count == Short.MAX_VALUE) { long newtime; for (;;) { newtime = System.currentTimeMillis(); if (newtime - baseTime > 1000) { break; } try { Thread.sleep(1000); } catch (InterruptedException _) { } } baseTime = newtime; nextCount = Short.MIN_VALUE; } count = nextCount++; unique = uniqueNr; time = baseTime; }} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50dc6879c9be89f646fdff68c58f785e3dc0b90e/UID.java/clean/core/src/classpath/java/java/rmi/server/UID.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
10034,
1435,
288,
202,
22043,
261,
739,
13,
288,
202,
202,
430,
261,
1883,
422,
7925,
18,
6694,
67,
4051,
13,
288,
1082,
202,
5748,
394,
957,
31,
1082,
202,
1884,
261,
25708,
13,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
10034,
1435,
288,
202,
22043,
261,
739,
13,
288,
202,
202,
430,
261,
1883,
422,
7925,
18,
6694,
67,
4051,
13,
288,
1082,
202,
5748,
394,
957,
31,
1082,
202,
1884,
261,
25708,
13,
288,
... |
new NoViableAltException("900:2: fact_expression[String id] returns [BaseDescr pd] : ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact );", 28, 0, input); | new NoViableAltException("900:2: fact_expression[String id] returns [BaseDescr pd] : ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact );", 27, 0, input); | public BaseDescr fact_expression(String id) throws RecognitionException { BaseDescr pd = null; BaseDescr fe = null; BaseDescr f = null; pd = null; boolean multi = false; try { // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:905:5: ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact ) int alt28=2; int LA28_0 = input.LA(1); if ( (LA28_0==LEFT_PAREN) ) { alt28=1; } else if ( (LA28_0==ID) ) { alt28=2; } else { if (backtracking>0) {failed=true; return pd;} NoViableAltException nvae = new NoViableAltException("900:2: fact_expression[String id] returns [BaseDescr pd] : ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact );", 28, 0, input); throw nvae; } switch (alt28) { case 1 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:905:5: ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' { match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact_expression1771); if (failed) return pd; pushFollow(FOLLOW_fact_expression_in_paren_in_fact_expression1775); fe=fact_expression_in_paren(id); _fsp--; if (failed) return pd; match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_fact_expression1778); if (failed) return pd; if ( backtracking==0 ) { pd=fe; } } break; case 2 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:906:6: f= fact { pushFollow(FOLLOW_fact_in_fact_expression1789); f=fact(); _fsp--; if (failed) return pd; if ( backtracking==0 ) { ((ColumnDescr)f).setIdentifier( id ); pd = f; } } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return pd; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/afea9f80e7c11e7b76df18f232d3b5ca5ad21e72/DRLParser.java/clean/drools-compiler/src/main/java/org/drools/lang/DRLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3360,
16198,
5410,
67,
8692,
12,
780,
612,
13,
1216,
9539,
288,
6647,
3360,
16198,
4863,
273,
446,
31,
3639,
3360,
16198,
1656,
273,
446,
31,
3639,
3360,
16198,
284,
273,
446,
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,
377,
1071,
3360,
16198,
5410,
67,
8692,
12,
780,
612,
13,
1216,
9539,
288,
6647,
3360,
16198,
4863,
273,
446,
31,
3639,
3360,
16198,
1656,
273,
446,
31,
3639,
3360,
16198,
284,
273,
446,
31,
... |
{ if (active) throw new IllegalStateException ("already parsing"); if (getProperty (propertyId) != value) filter.setProperty (propertyId, value); } | { if (active) { throw new IllegalStateException("already parsing"); } if (getProperty(propertyId) != value) { filter.setProperty(propertyId, value); } } | public void setProperty (String propertyId, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { if (active) throw new IllegalStateException ("already parsing"); if (getProperty (propertyId) != value) filter.setProperty (propertyId, value); } | 27835 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27835/7fb7568e63c3fe14af521de4699cb37898923ca7/XmlReader.java/buggy/libjava/gnu/xml/aelfred2/XmlReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7486,
261,
780,
31894,
16,
1033,
460,
13,
565,
1216,
10168,
1248,
5650,
9367,
503,
16,
10168,
25482,
565,
288,
202,
430,
261,
3535,
13,
202,
565,
604,
394,
5477,
7566,
17583,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7486,
261,
780,
31894,
16,
1033,
460,
13,
565,
1216,
10168,
1248,
5650,
9367,
503,
16,
10168,
25482,
565,
288,
202,
430,
261,
3535,
13,
202,
565,
604,
394,
5477,
7566,
17583,
... |
public EntityResolver2Wrapper(EntityResolver2 entityResolver) { setEntityResolver(entityResolver); } | public EntityResolver2Wrapper() {} | public EntityResolver2Wrapper(EntityResolver2 entityResolver) { setEntityResolver(entityResolver); } // <init>(EntityResolver2) | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/c7c7140fbc0baf115a90871a337515ebc33c7265/EntityResolver2Wrapper.java/buggy/src/org/apache/xerces/util/EntityResolver2Wrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3887,
4301,
22,
3611,
12,
1943,
4301,
22,
1522,
4301,
13,
288,
3639,
20739,
4301,
12,
1096,
4301,
1769,
565,
289,
368,
411,
2738,
34,
12,
1943,
4301,
22,
13,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3887,
4301,
22,
3611,
12,
1943,
4301,
22,
1522,
4301,
13,
288,
3639,
20739,
4301,
12,
1096,
4301,
1769,
565,
289,
368,
411,
2738,
34,
12,
1943,
4301,
22,
13,
2,
-100,
-100,
-100,
... |
return getWorksiteManager().getUserSites(); | return getWorksiteManager().getUserSites(null, siteTypes); | public List getObjects() { return getWorksiteManager().getUserSites(); } | 48996 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48996/54d36f1be956f33b2e355a545b0bfddc7871ea55/WorksiteListGenerator.java/buggy/common/api-impl/src/java/org/theospi/portfolio/worksite/mgt/impl/WorksiteListGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
987,
336,
4710,
1435,
288,
1377,
327,
29026,
4256,
1318,
7675,
588,
1299,
17055,
12,
2011,
16,
2834,
2016,
1769,
282,
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,
565,
1071,
987,
336,
4710,
1435,
288,
1377,
327,
29026,
4256,
1318,
7675,
588,
1299,
17055,
12,
2011,
16,
2834,
2016,
1769,
282,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
jPanel1.add(jUploading, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0 | jContentPanel.add(jUploading, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0 | private void jbInit() { this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); this.getContentPane().add(jPanel1, BorderLayout.CENTER); jPanel1.setLayout(new GridBagLayout()); jComputer1.setIcon(GalleryRemote.iComputer); jComputer2.setIcon(GalleryRemote.iComputer); jUploading.setIcon(GalleryRemote.iUploading); jLabelGlobal.setText(GRI18n.getString(MODULE, "upImgNM")); jLabelDetail.setText(GRI18n.getString(MODULE, "upImgGif")); jCancel.setText(GRI18n.getString("Common", "Cancel")); jCancel.addActionListener(this); jCancel.setActionCommand("Cancel"); jShutdown.setToolTipText(GRI18n.getString(MODULE, "shutDownTip")); jShutdown.setText(GRI18n.getString(MODULE, "shutDown")); jPanel1.add(jComputer1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 , GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(10, 10, 0, 0), 0, 0)); jPanel1.add(jUploading, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0 , GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(10, 0, 0, 0), 0, 0)); jPanel1.add(jComputer2, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0 , GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(10, 0, 0, 10), 0, 0)); jPanel1.add(jLabelGlobal, new GridBagConstraints(0, 1, 3, 1, 1.0, 0.0 , GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(10, 10, 0, 0), 0, 0)); jPanel1.add(jProgressGlobal, new GridBagConstraints(0, 2, 3, 1, 1.0, 0.0 , GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 15, 0, 15), 0, 0)); jPanel1.add(jLabelDetail, new GridBagConstraints(0, 3, 3, 1, 1.0, 0.0 , GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 10, 0, 0), 0, 0)); jPanel1.add(jProgressDetail, new GridBagConstraints(0, 4, 3, 1, 1.0, 0.0 , GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 15, 0, 15), 0, 0)); jPanel1.add(jPanel2, new GridBagConstraints(0, 5, 3, 1, 0.0, 0.0 , GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); try { Class osShutdown = Class.forName("com.gallery.GalleryRemote.util.OsShutdown"); Method canShutdown = osShutdown.getMethod("canShutdown", null); if (((Boolean) canShutdown.invoke(null, null)).booleanValue()) { jPanel2.add(jShutdown, null); } } catch (Exception e) { Log.log(Log.LEVEL_TRACE, MODULE, "OsShutdown not supported, hiding checkbox"); } jPanel2.add(jCancel, null); } | 9402 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9402/85fcb80ab7b07a38400646288f4ba103a8ec961b/UploadProgress.java/clean/com/gallery/GalleryRemote/UploadProgress.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
20515,
2570,
1435,
288,
202,
202,
2211,
18,
542,
1868,
4605,
2988,
12,
3829,
2918,
18,
3191,
67,
4400,
44,
1360,
67,
673,
67,
13384,
1769,
202,
202,
2211,
18,
588,
1350,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20515,
2570,
1435,
288,
202,
202,
2211,
18,
542,
1868,
4605,
2988,
12,
3829,
2918,
18,
3191,
67,
4400,
44,
1360,
67,
673,
67,
13384,
1769,
202,
202,
2211,
18,
588,
1350,... |
logger.info("Filter " + thisFilter.getInternalName() + " returned for " + lastWord + " has field " + thisField + "\n"); | logger.info( "Filter " + thisFilter.getInternalName() + " returned for " + lastWord + " has field " + thisField + "\n"); | public void SetModeForLine(String currentCommand) { if (lastLine == null || !(lastLine.equals(currentCommand))) { if (currentCommand.indexOf(DESCRIBE) >= 0) SetDescribeMode(); else if (currentCommand.indexOf(HELP) >= 0) SetHelpMode(); else if (currentCommand.indexOf(USE) >= 0) SetDatasetMode(); else { int usingInd = currentCommand.lastIndexOf(MartShellLib.USINGQSTART); if (usingInd >= 0) { usingLocalDataset = true; //set currentDataset String testString = currentCommand.substring(usingInd); Matcher qModeMatcher = qModePattern.matcher(testString); if (qModeMatcher.matches()) { String datasetName = qModeMatcher.group(1); if (martconf.containsDataset(datasetName)) currentDataset = martconf.getDatasetByName(datasetName); else currentDataset = null; // if not contained, no dataset should be set } } String[] lineWords = currentCommand.split(" "); // split on single space // determine which mode to be in during a query int getInd = currentCommand.lastIndexOf(MartShellLib.GETQSTART); int seqInd = currentCommand.lastIndexOf(MartShellLib.QSEQUENCE); int whereInd = currentCommand.lastIndexOf(MartShellLib.QWHERE); int limitInd = currentCommand.lastIndexOf(MartShellLib.QLIMIT); if ((usingInd > seqInd) && (usingInd > getInd) && (usingInd > whereInd) && (usingInd > limitInd)) SetDatasetMode(); if ((seqInd > usingInd) && (seqInd > getInd) && (seqInd > whereInd) && (seqInd > limitInd)) SetSequenceMode(); if ((getInd > usingInd) && (getInd > seqInd) && (getInd > whereInd) && (getInd > limitInd)) attributeMode = true; if ((whereInd > usingInd) && (whereInd > seqInd) && (whereInd > getInd) && (whereInd > limitInd)) { attributeMode = false; whereMode = true; } if ((limitInd > usingInd) && (limitInd > getInd) && (limitInd > seqInd) && (limitInd > whereInd)) { attributeMode = false; whereMode = false; SetEmptyMode(); } // if none of the key placeholders are present, may still need to further refine the mode if (attributeMode) { if (lineWords.length > 0) { String lastWord = lineWords[lineWords.length - 1]; if (!(lastWord.equals(MartShellLib.GETQSTART))) { if (lastWord.endsWith(",")) { lastAttributeName = lastWord.substring(0, lastWord.length() - 1); pruneAttributePages(); } } SetAttributeNames(); } } if (whereMode) { if (! (whereNamesMode || whereQualifiersMode || whereValuesMode) ) { //first time in whereNamesMode = true; whereQualifiersMode = false; whereValuesMode = true; SetWhereNames(); } if (lineWords.length > 0) { String lastWord = lineWords[lineWords.length - 1]; if (lastWord.equals(MartShellLib.QWHERE)) { lastFilterName = null; whereNamesMode = true; whereQualifiersMode = false; whereValuesMode = true; SetWhereNames(); } if (whereNamesMode) { logger.info("Still in whereNamesMode\n"); if (currentDataset != null) { if (currentDataset.containsFilterDescription(lastWord)) { String thisField = currentDataset.getFilterDescriptionByInternalName(lastWord).getField(lastWord); if (thisField != null && thisField.length() > 0) { lastFilterName = lastWord; pruneFilterPages(); logger.info(lastWord + " appears to be a filter, going to whereQualifiersMode\n"); whereNamesMode = false; whereQualifiersMode = true; whereValuesMode = false; SetWhereQualifiers(); } } } else if (!usingLocalDataset && envDataset != null) { if (envDataset.containsFilterDescription(lastWord)) { logger.info(lastWord + " is part of dataset, but is it a real filter?\n"); FilterDescription thisFilter = envDataset.getFilterDescriptionByInternalName(lastWord); String thisField = thisFilter.getField(lastWord); logger.info("Filter " + thisFilter.getInternalName() + " returned for " + lastWord + " has field " + thisField + "\n"); if (thisField != null && thisField.length() > 0) { lastFilterName = lastWord; pruneFilterPages(); logger.info(lastWord + " appears to be a filter, going to whereQualifiersMode\n"); whereNamesMode = false; whereQualifiersMode = true; whereValuesMode = false; SetWhereQualifiers(); } } } else SetNoDatasetMode(); } else if (whereQualifiersMode) { logger.info("Still in whereQualifiersMode\n"); if (MartShellLib.ALLQUALIFIERS.contains(lastWord)) { logger.info(lastWord + " appears to be a qualifier"); if (lineWords.length > 1) { lastFilterName = lineWords[lineWords.length - 2]; pruneFilterPages(); } if (MartShellLib.BOOLEANQUALIFIERS.contains(lastWord)) { logger.info(" staying in whereQualifiers Mode after boolean qualifier\n"); SetEmptyMode(); } else { logger.info(" going to whereValuesMode\n"); whereQualifiersMode = false; whereValuesMode = true; SetWhereValues(); } } else if (lastWord.equalsIgnoreCase(MartShellLib.FILTERDELIMITER)) { whereNamesMode = true; whereQualifiersMode = false; whereValuesMode = false; logger.info("and encountered after boolean qualifier, going to whereNamesMode\n"); pruneFilterPages(); SetWhereNames(); } } else if (whereValuesMode) { logger.info("Still in whereValuesMode\n"); if (lastWord.equalsIgnoreCase(MartShellLib.FILTERDELIMITER)) { whereNamesMode = true; whereQualifiersMode = false; whereValuesMode = false; logger.info("and encountered after value, going to whereNamesMode\n"); pruneFilterPages(); SetWhereNames(); } } } } } lastLine = currentCommand; } } | 2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/a7fdb0c76c1e35ce769ae06a1fa50dbd342639d8/MartCompleter.java/clean/src/java/org/ensembl/mart/shell/MartCompleter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1000,
2309,
1290,
1670,
12,
780,
783,
2189,
13,
288,
202,
202,
430,
261,
2722,
1670,
422,
446,
747,
401,
12,
2722,
1670,
18,
14963,
12,
2972,
2189,
20349,
288,
1082,
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,
1000,
2309,
1290,
1670,
12,
780,
783,
2189,
13,
288,
202,
202,
430,
261,
2722,
1670,
422,
446,
747,
401,
12,
2722,
1670,
18,
14963,
12,
2972,
2189,
20349,
288,
1082,
202,... |
RubyFrame frame = getRuby().getRubyFrame(); frame.push(); frame.setLastFunc(id); frame.setLastClass(noSuper ? null : this); frame.setSelf(recv); frame.setArgs(args); | RubyFrame frame = getRuby().getRubyFrame(); frame.push(); frame.setLastFunc(id); frame.setLastClass(noSuper ? null : this); frame.setSelf(recv); frame.setArgs(args); | public RubyObject call0( RubyObject recv, RubyId id, RubyPointer args, Node body, boolean noSuper) { // ... if (getRuby().getIter().getIter() == RubyIter.ITER_PRE) { getRuby().getIter().push(RubyIter.ITER_CUR); } else { getRuby().getIter().push(RubyIter.ITER_NOT); } RubyFrame frame = getRuby().getRubyFrame(); frame.push(); frame.setLastFunc(id); frame.setLastClass(noSuper ? null : this); frame.setSelf(recv); frame.setArgs(args); RubyObject result = ((CallableNode) body).call(getRuby(), recv, id, args, noSuper); getRuby().getRubyFrame().pop(); getRuby().getIter().pop(); return result; } | 48072 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48072/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/clean/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
745,
20,
12,
202,
202,
54,
10340,
921,
10665,
16,
202,
202,
54,
10340,
548,
612,
16,
202,
202,
54,
10340,
4926,
833,
16,
202,
202,
907,
1417,
16,
202,
202,
6494,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19817,
921,
745,
20,
12,
202,
202,
54,
10340,
921,
10665,
16,
202,
202,
54,
10340,
548,
612,
16,
202,
202,
54,
10340,
4926,
833,
16,
202,
202,
907,
1417,
16,
202,
202,
6494,... |
if (resourcesToExport == null) totalWork = countChildrenOf(resource); else totalWork = countSelectedResources(); | if (resourcesToExport == null) { totalWork = countChildrenOf(resource); } else { totalWork = countSelectedResources(); } | public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException { this.monitor = progressMonitor; try { initialize(); } catch (IOException e) { throw new InvocationTargetException(e, NLS.bind(DataTransferMessages.ZipExport_cannotOpen, e.getMessage())); } try { // ie.- a single resource for recursive export was specified int totalWork = IProgressMonitor.UNKNOWN; try { if (resourcesToExport == null) totalWork = countChildrenOf(resource); else totalWork = countSelectedResources(); } catch (CoreException e) { // Should not happen } monitor.beginTask(DataTransferMessages.DataTransfer_exportingTitle, totalWork); if (resourcesToExport == null) { exportResource(resource); } else { // ie.- a list of specific resources to export was specified exportSpecifiedResources(); } try { exporter.finished(); } catch (IOException e) { throw new InvocationTargetException( e, NLS.bind(DataTransferMessages.ZipExport_cannotClose, e.getMessage())); } } finally { monitor.done(); } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/ArchiveFileExportOperation.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ArchiveFileExportOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
12,
45,
5491,
7187,
4007,
7187,
13,
5411,
1216,
15342,
16,
7558,
288,
3639,
333,
18,
10259,
273,
4007,
7187,
31,
3639,
775,
288,
5411,
4046,
5621,
3639,
289,
1044,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
12,
45,
5491,
7187,
4007,
7187,
13,
5411,
1216,
15342,
16,
7558,
288,
3639,
333,
18,
10259,
273,
4007,
7187,
31,
3639,
775,
288,
5411,
4046,
5621,
3639,
289,
1044,
261,
... |
private void parse_gAMA_chunk(PNGChunk chunk) { // If an sRGB chunk exists, ignore gAMA chunks if (sRGBRenderingIntent != -1) { return; } fileGamma = chunk.getInt4(0)/100000.0F; float exp = performGammaCorrection ? displayExponent/userExponent : 1.0F; if (encodeParam != null) { encodeParam.setGamma(fileGamma*exp); } if (emitProperties) { properties.put("gamma", new Float(fileGamma*exp)); } } | 46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/4d3a99ba25df78f76a0cd7a624ef8aca67e45c6d/PNGRed.java/clean/sources/org/apache/batik/ext/awt/image/codec/PNGRed.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1109,
67,
75,
2192,
37,
67,
6551,
12,
23092,
5579,
2441,
13,
288,
3639,
368,
971,
392,
272,
11343,
2441,
1704,
16,
2305,
314,
2192,
37,
6055,
3639,
309,
261,
87,
11343,
14261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
67,
75,
2192,
37,
67,
6551,
12,
23092,
5579,
2441,
13,
288,
3639,
368,
971,
392,
272,
11343,
2441,
1704,
16,
2305,
314,
2192,
37,
6055,
3639,
309,
261,
87,
11343,
14261... | ||
return new CommandCvsHandler(com.intellij.CvsBundle.message("operation.name.import"), new ImportOperation(details), FileSetToBeUpdated.EMTPY); | return new CommandCvsHandler(CvsBundle.message("operation.name.import"), new ImportOperation(details), FileSetToBeUpdated.EMTPY); | public static CvsHandler createImportHandler(ImportDetails details) { return new CommandCvsHandler(com.intellij.CvsBundle.message("operation.name.import"), new ImportOperation(details), FileSetToBeUpdated.EMTPY); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/056c036c52b28c619268f3abf50617cf57f28824/CommandCvsHandler.java/clean/plugins/cvs2/source/com/intellij/cvsSupport2/cvshandlers/CommandCvsHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
385,
6904,
1503,
752,
5010,
1503,
12,
5010,
3790,
3189,
13,
288,
565,
327,
394,
3498,
39,
6904,
1503,
12,
39,
6904,
3405,
18,
2150,
2932,
7624,
18,
529,
18,
5666,
6,
3631,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
385,
6904,
1503,
752,
5010,
1503,
12,
5010,
3790,
3189,
13,
288,
565,
327,
394,
3498,
39,
6904,
1503,
12,
39,
6904,
3405,
18,
2150,
2932,
7624,
18,
529,
18,
5666,
6,
3631,
... |
warn("Bond: order " + s.trim()); | logger.debug("Bond: order " + s.trim()); | public void characterData (char ch[], int start, int length) { // warn("CD"); String s = toString(ch, start, length).trim(); switch (CurrentElement) { case STRING : warn("Builtin: " + BUILTIN); if (BUILTIN.equals("elementType")) { warn("Element: " + s.trim()); elsym.addElement(s); } else if (BUILTIN.equals("atomRef")) { curRef++; warn("Bond: ref #" + curRef); if (curRef == 1) { bondARef1.addElement(s.trim()); } else if (curRef == 2) { bondARef2.addElement(s.trim()); } } else if (BUILTIN.equals("order")) { warn("Bond: order " + s.trim()); order.addElement(s.trim()); } else if (BUILTIN.equals("formalCharge")) { warn("Charge: " + s.trim()); elcharge.addElement(s.trim()); } break; case FLOAT : if (BUILTIN.equals("x3")) { x3.addElement(s.trim()); } else if (BUILTIN.equals("y3")) { y3.addElement(s.trim()); } else if (BUILTIN.equals("z3")) { z3.addElement(s.trim()); } else if (BUILTIN.equals("x2")) { x2.addElement(s.trim()); } else if (BUILTIN.equals("y2")) { y2.addElement(s.trim()); } break; case COORDINATE2 : if (BUILTIN.equals("xy2")) { warn("New coord found." + s); try { StringTokenizer st = new StringTokenizer(s); x2.addElement(st.nextToken()); y2.addElement(st.nextToken()); } catch (Exception e) { notify("CMLParsing error: " + e, SYSTEMID, 175,1); } } break; case COORDINATE3 : if (BUILTIN.equals("xyz3")) { warn("New coord found." + s); try { StringTokenizer st = new StringTokenizer(s); x3.addElement(st.nextToken()); y3.addElement(st.nextToken()); z3.addElement(st.nextToken()); } catch (Exception e) { notify("CMLParsing error: " + e, SYSTEMID, 175,1); } } break; case STRINGARRAY : if (BUILTIN.equals("id")) { try { StringTokenizer st = new StringTokenizer(s); while (st.hasMoreTokens()) { String token = st.nextToken(); warn("StringArray (Token): " + token); elid.addElement(token); } } catch (Exception e) { notify("CMLParsing error: " + e, SYSTEMID, 186,1); } } else if (BUILTIN.equals("elementType")) { try { StringTokenizer st = new StringTokenizer(s); while (st.hasMoreTokens()) elsym.addElement(st.nextToken()); } catch (Exception e) { notify("CMLParsing error: " + e, SYSTEMID, 194,1); } } else if (BUILTIN.equals("atomRefs")) { curRef++; warn("New atomRefs found: " + curRef); try { StringTokenizer st = new StringTokenizer(s); while (st.hasMoreTokens()) { String token = st.nextToken(); warn("Token: " + token); if (curRef == 1) { bondARef1.addElement(token); } else if (curRef == 2) { bondARef2.addElement(token); } } } catch (Exception e) { notify("CMLParsing error: " + e, SYSTEMID, 194,1); } } else if (BUILTIN.equals("order")) { warn("New bond order found."); try { StringTokenizer st = new StringTokenizer(s); while (st.hasMoreTokens()) { String token = st.nextToken(); warn("Token: " + token); order.addElement(token); } } catch (Exception e) { notify("CMLParsing error: " + e, SYSTEMID, 194,1); } } break; case INTEGERARRAY : System.out.println("IntegerArray: builtin = " + BUILTIN); if (BUILTIN.equals("formalCharge")) { try { StringTokenizer st = new StringTokenizer(s); while (st.hasMoreTokens()) { String token = st.nextToken(); System.out.println("Charge added: " + token); elcharge.addElement(token); } } catch (Exception e) { notify("CMLParsing error: " + e, SYSTEMID, 205,1); } } case FLOATARRAY : if (BUILTIN.equals("x3")) { try { StringTokenizer st = new StringTokenizer(s); while (st.hasMoreTokens()) x3.addElement(st.nextToken()); } catch (Exception e) { notify("CMLParsing error: " + e, SYSTEMID, 205,1); } } else if (BUILTIN.equals("y3")) { try { StringTokenizer st = new StringTokenizer(s); while (st.hasMoreTokens()) y3.addElement(st.nextToken()); } catch (Exception e) { notify("CMLParsing error: " + e, SYSTEMID, 213,1); } } else if (BUILTIN.equals("z3")) { try { StringTokenizer st = new StringTokenizer(s); while (st.hasMoreTokens()) z3.addElement(st.nextToken()); } catch (Exception e) { notify("CMLParsing error: " + e, SYSTEMID, 221,1); } } else if (BUILTIN.equals("x2")) { warn("New floatArray found."); try { StringTokenizer st = new StringTokenizer(s); while (st.hasMoreTokens()) x2.addElement(st.nextToken()); } catch (Exception e) { notify("CMLParsing error: " + e, SYSTEMID, 205,1); } } else if (BUILTIN.equals("y2")) { warn("New floatArray found."); try { StringTokenizer st = new StringTokenizer(s); while (st.hasMoreTokens()) y2.addElement(st.nextToken()); } catch (Exception e) { notify("CMLParsing error: " + e, SYSTEMID, 213,1); } } break; } } | 45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/e04a2bbd6afdac34488441c1ce22ad5f73d254ff/Convention.java/clean/org/openscience/cdk/io/cml/Convention.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3351,
751,
261,
3001,
462,
63,
6487,
509,
787,
16,
509,
769,
13,
288,
202,
759,
1894,
2932,
10160,
8863,
202,
780,
272,
273,
1762,
12,
343,
16,
787,
16,
769,
2934,
5290,
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,
377,
1071,
918,
3351,
751,
261,
3001,
462,
63,
6487,
509,
787,
16,
509,
769,
13,
288,
202,
759,
1894,
2932,
10160,
8863,
202,
780,
272,
273,
1762,
12,
343,
16,
787,
16,
769,
2934,
5290,
56... |
Upgrader upgrader = new Upgrader(); XMLOutputter outputter = new XMLOutputter(); try { assertEquals(modset, outputter.outputString(upgrader.findModificationSet(buildFileElement))); assertEquals(modset, outputter.outputString(upgrader.findModificationSet(buildFileElement2))); } catch (CruiseControlException e) { e.printStackTrace(); assertTrue(false); } | SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser"); buildFileElement = builder.build(new StringReader(xml)).getRootElement(); buildFileElement2 = builder.build(new StringReader(xml2)).getRootElement(); buildFileElement3 = builder.build(new StringReader(xml3)).getRootElement(); | public void testFindModificationSet() { String xml = "<project><taskdef name=\"modset\" classname=\"net.sourceforge.cruisecontrol.ModificationSet\"/><target><modset quietperiod=\"15\"><element att1=\"value1\" /></modset></target></project>"; String xml2 = "<project><target><taskdef name=\"modset\" classname=\"net.sourceforge.cruisecontrol.ModificationSet\"/><modset quietperiod=\"15\"><element att1=\"value1\" /></modset></target></project>"; String xml3 = "<project><target></target></project>"; String modset = "<modset quietperiod=\"15\"><element att1=\"value1\" /></modset>"; //get xml string to element Element buildFileElement = null; Element buildFileElement2 = null; Element buildFileElement3 = null; try { SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser"); buildFileElement = builder.build(new StringReader(xml)).getRootElement(); buildFileElement2 = builder.build(new StringReader(xml2)).getRootElement(); buildFileElement3 = builder.build(new StringReader(xml3)).getRootElement(); } catch (JDOMException e) { e.printStackTrace(); } Upgrader upgrader = new Upgrader(); XMLOutputter outputter = new XMLOutputter(); try { assertEquals(modset, outputter.outputString(upgrader.findModificationSet(buildFileElement))); assertEquals(modset, outputter.outputString(upgrader.findModificationSet(buildFileElement2))); } catch (CruiseControlException e) { e.printStackTrace(); assertTrue(false); } try { assertEquals(modset, outputter.outputString(upgrader.findModificationSet(buildFileElement3))); assertTrue(false); } catch (CruiseControlException e) { assertEquals("Could not find a modification set.", e.getMessage()); } } | 52149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52149/e6d55c9fadaa09c2852e7534c83941d93ecaf05b/UpgraderTest.java/clean/main/test/net/sourceforge/cruisecontrol/util/UpgraderTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
3125,
13467,
694,
1435,
288,
3639,
514,
2025,
225,
273,
3532,
4406,
4438,
4146,
536,
508,
5189,
1711,
542,
2412,
7479,
5189,
2758,
18,
3168,
1884,
908,
18,
3353,
89,
291,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
3125,
13467,
694,
1435,
288,
3639,
514,
2025,
225,
273,
3532,
4406,
4438,
4146,
536,
508,
5189,
1711,
542,
2412,
7479,
5189,
2758,
18,
3168,
1884,
908,
18,
3353,
89,
291,... |
for (closeWin = false ; !closeWin ; ) { | for (this.closeWin = false ; !this.closeWin ; ) { | public String askForAnIndexURI(Hsqldb db) { frame = new JFrame(I18n.getMessage("thaw.plugin.index.selectIndex")); frame.setVisible(false); upPanel = new JPanel(); Logger.info(this, "indexes"); localIndexes = new IndexTree(I18n.getMessage("thaw.plugin.index.yourIndexes"), true, true, null, db); otherIndexes = new IndexTree(I18n.getMessage("thaw.plugin.index.indexes"), false, true, null, db); Logger.info(this, "plus indexes"); fieldPanel = new JPanel(); keyField = new JTextField(""); downPanel = new JPanel(); cancelButton = new JButton(I18n.getMessage("thaw.common.cancel")); okButton = new JButton(I18n.getMessage("thaw.common.ok")); upPanel.setLayout(new BorderLayout()); downPanel.setLayout(new GridLayout(1, 2)); fieldPanel.setLayout(new BorderLayout()); indexPanel = new JPanel(); indexPanel.setLayout(new GridLayout(1, 2)); indexPanel.add(new JScrollPane(localIndexes.getPanel())); indexPanel.add(new JScrollPane(otherIndexes.getPanel())); upPanel.add(indexPanel, BorderLayout.CENTER); fieldPanel.add(new JLabel(I18n.getMessage("thaw.plugin.index.indexKey")), BorderLayout.WEST); fieldPanel.add(keyField, BorderLayout.CENTER); upPanel.add(fieldPanel, BorderLayout.SOUTH); downPanel.add(okButton); downPanel.add(cancelButton); frame.getContentPane().setLayout(new BorderLayout(10, 10)); frame.getContentPane().add(upPanel, BorderLayout.CENTER); frame.getContentPane().add(downPanel, BorderLayout.SOUTH); frame.setSize(500, 400); cancelButton.addActionListener(this); okButton.addActionListener(this); localIndexes.addObserver(this); otherIndexes.addObserver(this); frame.setVisible(true); for (closeWin = false ; !closeWin ; ) { try { Thread.sleep(500); } catch(java.lang.InterruptedException e) { /* \_o< \_o< \_o< */ } } frame.setVisible(false); frame = null; upPanel = null; localIndexes = null; otherIndexes = null; fieldPanel = null; keyField = null; downPanel = null; cancelButton = null; okButton = null; return selectedIndexKey; } | 47012 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47012/88402a3bc59123261d50a7cfed0ac20de2b772f6/IndexSelecter.java/buggy/src/thaw/plugins/index/IndexSelecter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
6827,
1290,
979,
1016,
3098,
12,
44,
4669,
1966,
1319,
13,
288,
202,
202,
3789,
273,
394,
804,
3219,
12,
45,
2643,
82,
18,
24906,
2932,
451,
2219,
18,
4094,
18,
1615,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6827,
1290,
979,
1016,
3098,
12,
44,
4669,
1966,
1319,
13,
288,
202,
202,
3789,
273,
394,
804,
3219,
12,
45,
2643,
82,
18,
24906,
2932,
451,
2219,
18,
4094,
18,
1615,
1... |
getUniLoc(uniformVar.name), | getUniLoc(uniformVar), | public void apply() { if (isSupported()) { if (isEnabled()) { if (programID != -1) { // Apply the shader... ARBShaderObjects.glUseProgramObjectARB(programID); // Assign uniforms... if (!uniforms.isEmpty()) { for (Iterator iterator = uniforms.keySet().iterator(); iterator .hasNext();) { ShaderUniform uniformVar = (ShaderUniform) uniforms .get((String) iterator.next()); switch (uniformVar.type) { case ShaderUniform.SU_INT: ARBShaderObjects.glUniform1iARB( getUniLoc(uniformVar.name), uniformVar.vint[0]); break; case ShaderUniform.SU_INT2: ARBShaderObjects.glUniform2iARB( getUniLoc(uniformVar.name), uniformVar.vint[0], uniformVar.vint[1]); break; case ShaderUniform.SU_INT3: ARBShaderObjects.glUniform3iARB( getUniLoc(uniformVar.name), uniformVar.vint[0], uniformVar.vint[1], uniformVar.vint[2]); break; case ShaderUniform.SU_INT4: ARBShaderObjects.glUniform4iARB( getUniLoc(uniformVar.name), uniformVar.vint[0], uniformVar.vint[1], uniformVar.vint[2], uniformVar.vint[3]); break; case ShaderUniform.SU_FLOAT: ARBShaderObjects.glUniform1fARB( getUniLoc(uniformVar.name), uniformVar.vfloat[0]); break; case ShaderUniform.SU_FLOAT2: ARBShaderObjects.glUniform2fARB( getUniLoc(uniformVar.name), uniformVar.vfloat[0], uniformVar.vfloat[1]); break; case ShaderUniform.SU_FLOAT3: ARBShaderObjects.glUniform3fARB( getUniLoc(uniformVar.name), uniformVar.vfloat[0], uniformVar.vfloat[1], uniformVar.vfloat[2]); break; case ShaderUniform.SU_FLOAT4: ARBShaderObjects.glUniform4fARB( getUniLoc(uniformVar.name), uniformVar.vfloat[0], uniformVar.vfloat[1], uniformVar.vfloat[2], uniformVar.vfloat[3]); break; case ShaderUniform.SU_MATRIX2: final java.nio.FloatBuffer matrix2f = org.lwjgl.BufferUtils .createFloatBuffer(4); matrix2f.clear(); matrix2f.put(uniformVar.matrix2f); matrix2f.rewind(); ARBShaderObjects.glUniformMatrix2ARB( getUniLoc(uniformVar.name), uniformVar.transpose, matrix2f); break; case ShaderUniform.SU_MATRIX3: ARBShaderObjects.glUniformMatrix3ARB( getUniLoc(uniformVar.name), uniformVar.transpose, uniformVar.matrix3f.toFloatBuffer()); break; case ShaderUniform.SU_MATRIX4: ARBShaderObjects.glUniformMatrix4ARB( getUniLoc(uniformVar.name), uniformVar.transpose, uniformVar.matrix4f.toFloatBuffer()); break; default: // Sould never happen. break; } } } } } else { ARBShaderObjects.glUseProgramObjectARB(0); } } } | 19503 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19503/659e52f5de42957aa9f2bf22a2d6fac9a3f6dc0b/LWJGLShaderObjectsState.java/clean/src/com/jme/scene/state/lwjgl/LWJGLShaderObjectsState.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2230,
1435,
288,
3639,
309,
261,
291,
7223,
10756,
288,
5411,
309,
261,
291,
1526,
10756,
288,
7734,
309,
261,
12890,
734,
480,
300,
21,
13,
288,
10792,
368,
5534,
326,
16700,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2230,
1435,
288,
3639,
309,
261,
291,
7223,
10756,
288,
5411,
309,
261,
291,
1526,
10756,
288,
7734,
309,
261,
12890,
734,
480,
300,
21,
13,
288,
10792,
368,
5534,
326,
16700,
... |
public SkeletonMismatchException(String s) { super(s); } | public SkeletonMismatchException(String s) { super(s); } | public SkeletonMismatchException(String s) { super(s);} | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/a3f60f71365174676e1302f0b201f5772849ffd3/SkeletonMismatchException.java/clean/java/rmi/server/SkeletonMismatchException.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
10362,
12143,
16901,
503,
12,
780,
272,
13,
288,
202,
9565,
12,
87,
1769,
97,
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,
... | [
1,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
10362,
12143,
16901,
503,
12,
780,
272,
13,
288,
202,
9565,
12,
87,
1769,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
jj_la1_1 = new int[] {0x0,0x0,0x0,0x2e1c00,0x2e1c00,0x2e1c00,0x0,0x10,0xf,0x20,0x80000,0x7fc00,0x600000,0x80000,0x61c00,0x0,0xf8000000,0x0,0x0,0x600000,0x600000,0x0,0x8,0x7,0x40000,0x3fc00,0x40000,0x21c00,0x0,0xf8000000,}; | jj_la1_1 = new int[] {0x0,0x0,0x0,0x2e1c00,0x2e1c00,0x2e1c00,0x0,0xf,0x20,0x7fc00,0x600000,0x61c00,0xf8000000,0x0,0x0,0x600000,0x600000,0x0,0x8,0x40000,0x0,0x8,0x7,0x40000,0x3fc00,0x40000,0x21c00,0x0,0xf8000000,}; | private static void jj_la1_1() { jj_la1_1 = new int[] {0x0,0x0,0x0,0x2e1c00,0x2e1c00,0x2e1c00,0x0,0x10,0xf,0x20,0x80000,0x7fc00,0x600000,0x80000,0x61c00,0x0,0xf8000000,0x0,0x0,0x600000,0x600000,0x0,0x8,0x7,0x40000,0x3fc00,0x40000,0x21c00,0x0,0xf8000000,}; } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/726c24ef410f918a103c7ce911931e76cc280894/ExpressionParser.java/clean/aspectwerkz4/src/main/org/codehaus/aspectwerkz/expression/ast/ExpressionParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
760,
918,
10684,
67,
11821,
21,
67,
21,
1435,
288,
1377,
10684,
67,
11821,
21,
67,
21,
273,
394,
509,
8526,
288,
20,
92,
20,
16,
20,
92,
20,
16,
20,
92,
20,
16,
20,
92,
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,
565,
3238,
760,
918,
10684,
67,
11821,
21,
67,
21,
1435,
288,
1377,
10684,
67,
11821,
21,
67,
21,
273,
394,
509,
8526,
288,
20,
92,
20,
16,
20,
92,
20,
16,
20,
92,
20,
16,
20,
92,
22,
... |
s.defaultReadObject(); String key = (String) s.readObject(); | s.defaultReadObject(); String key = (String) s.readObject(); | private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException { s.defaultReadObject(); String key = (String) s.readObject(); while (key != null) { Object listener = s.readObject(); if ("componentL".equals(key)) addComponentListener((ComponentListener) listener); else if ("focusL".equals(key)) addFocusListener((FocusListener) listener); else if ("keyL".equals(key)) addKeyListener((KeyListener) listener); else if ("mouseL".equals(key)) addMouseListener((MouseListener) listener); else if ("mouseMotionL".equals(key)) addMouseMotionListener((MouseMotionListener) listener); else if ("inputMethodL".equals(key)) addInputMethodListener((InputMethodListener) listener); else if ("hierarchyL".equals(key)) addHierarchyListener((HierarchyListener) listener); else if ("hierarchyBoundsL".equals(key)) addHierarchyBoundsListener((HierarchyBoundsListener) listener); else if ("mouseWheelL".equals(key)) addMouseWheelListener((MouseWheelListener) listener); key = (String) s.readObject(); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/566e4ab93ebc97794094572536829e581d565b11/Component.java/buggy/core/src/classpath/java/java/awt/Component.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
17362,
12,
921,
4348,
272,
13,
565,
1216,
10403,
16,
1860,
225,
288,
202,
202,
87,
18,
1886,
1994,
921,
5621,
202,
202,
780,
498,
273,
261,
780,
13,
272,
18,
896,
921,
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,
282,
3238,
918,
17362,
12,
921,
4348,
272,
13,
565,
1216,
10403,
16,
1860,
225,
288,
202,
202,
87,
18,
1886,
1994,
921,
5621,
202,
202,
780,
498,
273,
261,
780,
13,
272,
18,
896,
921,
5621... |
return scalar ? convertToScalar(exp) : exp; | return scalar ? convertToScalar(resolved) : resolved; | public Exp validate(Exp exp, boolean scalar) { if (!resolvedNodes.add(exp)) { // Expression has already been resolved. return scalar ? convertToScalar(exp) : exp; } stack.push(exp); try { Exp resolved = exp.accept(this); if (scalar) { resolved = convertToScalar(resolved); } resolvedNodes.add(resolved); return resolved; } finally { stack.pop(); } } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/741b8f38514a4115aaffc6385b4687db63fe334b/Query.java/buggy/src/main/mondrian/olap/Query.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
7784,
1954,
12,
2966,
1329,
16,
1250,
4981,
13,
288,
5411,
309,
16051,
11792,
3205,
18,
1289,
12,
2749,
3719,
288,
7734,
368,
5371,
711,
1818,
2118,
4640,
18,
7734,
327,
4981,
692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
7784,
1954,
12,
2966,
1329,
16,
1250,
4981,
13,
288,
5411,
309,
16051,
11792,
3205,
18,
1289,
12,
2749,
3719,
288,
7734,
368,
5371,
711,
1818,
2118,
4640,
18,
7734,
327,
4981,
692,
... |
return StateMachinesHelper.getHelper().getSource((MTransition) edge); | return StateMachinesHelper.getHelper() .getSource((MTransition) edge); | public Object getSourcePort(Object edge) { if (edge instanceof MTransition) { return StateMachinesHelper.getHelper().getSource((MTransition) edge); } cat.debug("TODO getSourcePort of MTransition"); return null; } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/23464f9cbc3169e9d2f1919998cae2c59b514985/StateDiagramGraphModel.java/buggy/src_new/org/argouml/uml/diagram/state/StateDiagramGraphModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
7889,
2617,
12,
921,
3591,
13,
288,
202,
430,
261,
7126,
1276,
490,
8850,
13,
288,
202,
565,
327,
3287,
25222,
2276,
18,
588,
2276,
7675,
588,
1830,
12443,
49,
8850,
13,
359... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7889,
2617,
12,
921,
3591,
13,
288,
202,
430,
261,
7126,
1276,
490,
8850,
13,
288,
202,
565,
327,
3287,
25222,
2276,
18,
588,
2276,
7675,
588,
1830,
12443,
49,
8850,
13,
359... |
String ref = (String)ctx.getHeaders().get("Referer"); if(ref!=null) buf.append("<br><a href=\""+ref+"\" title=\"Back\" Back</a>\n"); else buf.append("<br><a href=\"javascript:back()\" title=\"Back\">Back</a>\n"); | ctx.getPageMaker().makeBackLink(buf,ctx); | public void handlePost(URI uri, Bucket data, ToadletContext ctx) throws ToadletContextClosedException, IOException { if(data.size() > 1024*1024) { this.writeReply(ctx, 400, "text/plain", "Too big", "Data exceeds 1MB limit"); return; } HTTPRequest request = new HTTPRequest(uri,data,ctx); if(request==null) return; StringBuffer buf = new StringBuffer(); if (request.getParam("shutdownconfirm").length() > 0) { // false for no navigation bars, because that would be very silly ctx.getPageMaker().makeHead(buf, "Node Shutdown", false); buf.append("<div class=\"infobox infobox-information\">\n"); buf.append("<div class=\"infobox-header\">\n"); buf.append("The Freenet node has been successfully shut down\n"); buf.append("</div>\n"); buf.append("<div class=\"infobox-content\">\n"); buf.append("Thank you for using Freenet\n"); buf.append("</div>\n"); buf.append("</div>\n"); ctx.getPageMaker().makeTail(buf); writeReply(ctx, 200, "text/html", "OK", buf.toString()); this.node.exit(); } else if (request.getParam("exit").equalsIgnoreCase("true")) { ctx.getPageMaker().makeHead(buf, "Node Shutdown"); buf.append("<div class=\"infobox infobox-query\">\n"); buf.append("<div class=\"infobox-header\">\n"); buf.append("Node Shutdown?\n"); buf.append("</div>\n"); buf.append("<div class=\"infobox-content\">\n"); buf.append("Are you sure you wish to shut down your Freenet node?\n"); buf.append("<form action=\"/\" method=\"post\">\n"); buf.append("<input type=\"submit\" name=\"cancel\" value=\"Cancel\" />\n"); buf.append("<input type=\"submit\" name=\"shutdownconfirm\" value=\"Shut down\" />\n"); buf.append("</form>\n"); buf.append("</div>\n"); buf.append("</div>\n"); ctx.getPageMaker().makeTail(buf); writeReply(ctx, 200, "text/html", "OK", buf.toString()); } else if (request.isParameterSet("addbookmark")) { try { bookmarks.addBookmark(new Bookmark(request.getParam("key"), request.getParam("name"))); node.config.store(); } catch (MalformedURLException mue) { this.sendBookmarkEditPage(ctx, MODE_ADD, null, request.getParam("key"), request.getParam("name"), "Given key does not appear to be a valid Freenet key."); return; } try { this.handleGet(new URI("/welcome/?managebookmarks"), ctx); } catch (URISyntaxException ex) { } } else if (request.isParameterSet("managebookmarks")) { Enumeration e = bookmarks.getBookmarks(); while (e.hasMoreElements()) { Bookmark b = (Bookmark)e.nextElement(); if (request.isParameterSet("delete_"+b.hashCode())) { bookmarks.removeBookmark(b); node.config.store(); } else if (request.isParameterSet("edit_"+b.hashCode())) { this.sendBookmarkEditPage(ctx, b); return; } else if (request.isParameterSet("update_"+b.hashCode())) { // removing it and adding means that any USK subscriptions are updated properly try { Bookmark newbkmk = new Bookmark(request.getParam("key"), request.getParam("name")); bookmarks.removeBookmark(b); bookmarks.addBookmark(newbkmk); node.config.store(); } catch (MalformedURLException mue) { this.sendBookmarkEditPage(ctx, MODE_EDIT, b, request.getParam("key"), request.getParam("name"), "Given key does not appear to be a valid freenet key."); return; } try { this.handleGet(new URI("/welcome/?managebookmarks"), ctx); } catch (URISyntaxException ex) { } } } try { this.handleGet(new URI("/welcome/?managebookmarks"), ctx); } catch (URISyntaxException ex) { } }else if(request.isParameterSet("disable")){ UserAlert[] alerts=node.alerts.getAlerts(); for(int i=0;i<alerts.length;i++){ if(request.getIntParam("disable")==alerts[i].hashCode()){ // Won't be dismissed if it's not allowed anyway Logger.normal(this,"Disabling the userAlert "+alerts[i].hashCode()); alerts[i].isValid(false); ctx.getPageMaker().makeHead(buf, "Configuration Applied"); buf.append("<div class=\"infobox infobox-success\">\n"); buf.append("<div class=\"infobox-header\">\n"); buf.append("Configuration Applied\n"); buf.append("</div>\n"); buf.append("<div class=\"infobox-content\">\n"); buf.append("Your configuration changes were applied successfully<br />\n"); buf.append("<a href=\"/\" title=\"Node Homepage\">Homepage</a>\n"); buf.append("</div>\n"); ctx.getPageMaker().makeTail(buf); writeReply(ctx, 200, "text/html", "OK", buf.toString()); } } }else if(request.isPartSet("key")&&request.isPartSet("filename")){ FreenetURI key = new FreenetURI(request.getPartAsString("key",128)); String type = request.getPartAsString("content-type",128); if(type==null) type = "text/plain"; ClientMetadata contentType = new ClientMetadata(type); Bucket bucket = request.getPart("filename"); InsertBlock block = new InsertBlock(bucket, contentType, key); try { ctx.getPageMaker().makeHead(buf, "Insertion"); key = this.insert(block, false); buf.append("<div class=\"infobox infobox-success\">\n"); buf.append("<div class=\"infobox-header\">\n"); buf.append("Insert Succeeded\n"); buf.append("</div>\n"); buf.append("<div class=\"infobox-content\">\n"); buf.append("The key : <a href=\"/" + key.getKeyType() + "@" + key.getGuessableKey() + "\">" + key.getKeyType() + "@" + key.getGuessableKey() +"</a> has been inserted successfully.<br>"); } catch (InserterException e) { buf.append("<div class=\"infobox infobox-error\">\n"); buf.append("<div class=\"infobox-header\">\n"); buf.append("Insert Failed\n"); buf.append("</div>\n"); buf.append("<div class=\"infobox-content\">\n"); buf.append("Error: "+e.getMessage()+"<br>"); if(e.uri != null) buf.append("URI would have been: "+e.uri+"<br>"); int mode = e.getMode(); if(mode == InserterException.FATAL_ERRORS_IN_BLOCKS || mode == InserterException.TOO_MANY_RETRIES_IN_BLOCKS) { buf.append("Splitfile-specific error:\n"+e.errorCodes.toVerboseString()+"<br>"); } } // My browser sends it with one 'r' String ref = (String)ctx.getHeaders().get("Referer"); if(ref!=null) buf.append("<br><a href=\""+ref+"\" title=\"Back\" Back</a>\n"); else buf.append("<br><a href=\"javascript:back()\" title=\"Back\">Back</a>\n"); buf.append("<br><a href=\"/\" title=\"Node Homepage\">Homepage</a>\n"); buf.append("</div>\n"); buf.append("</div>\n"); ctx.getPageMaker().makeTail(buf); writeReply(ctx, 200, "text/html", "OK", buf.toString()); request.freeParts(); bucket.free(); }else { this.handleGet(uri, ctx); } } | 50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/043d0a52b75a79205f6af6f536a20a7db87fd08b/WelcomeToadlet.java/clean/src/freenet/clients/http/WelcomeToadlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
3349,
12,
3098,
2003,
16,
7408,
501,
16,
2974,
361,
1810,
1042,
1103,
13,
1216,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
288,
9506,
202,
430,
12,
892,
18,
1467,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
3349,
12,
3098,
2003,
16,
7408,
501,
16,
2974,
361,
1810,
1042,
1103,
13,
1216,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
288,
9506,
202,
430,
12,
892,
18,
1467,
... |
public TagArgument () { //empty } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/9b13568a17c8f2a84cd6be1ce54c3553c8dde181/Javadoc.java/buggy/src/main/org/apache/tools/ant/taskdefs/Javadoc.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
4034,
1379,
1832,
288,
7734,
368,
5531,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
4034,
1379,
1832,
288,
7734,
368,
5531,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | ||
private void importZipResource(ZipInputStream zipStreamIn, String importPath, boolean noSubFolder) throws Exception { boolean isFolder = false; boolean exit = false; int j, r, stop, charsRead, size; int entries = 0; int totalBytes = 0; int offset = 0; byte[] buffer = null; boolean resourceExists; while (true) { // handle the single entries ... j = 0; stop = 0; charsRead = 0; totalBytes = 0; // open the entry ... ZipEntry entry = zipStreamIn.getNextEntry(); if (entry == null) { break; } entries++; // count number of entries in zip String actImportPath = importPath; String filename = m_cms.getRequestContext().getFileTranslator().translateResource(entry.getName()); // separete path in direcotries an file name ... StringTokenizer st = new StringTokenizer(filename, "/\\"); int count = st.countTokens(); String[] path = new String[count]; if (filename.endsWith("\\") || filename.endsWith("/")) { isFolder = true; // last entry is a folder } else { isFolder = false; // last entry is a file } while (st.hasMoreTokens()) { // store the files and folder names in array ... path[j] = st.nextToken(); j++; } stop = isFolder?path.length:(path.length - 1); if (noSubFolder) { stop = 0; } // now write the folders ... for (r = 0; r < stop; r++) { try { m_cms.createResource(actImportPath + path[r], CmsResourceTypeFolder.C_RESOURCE_TYPE_ID); } catch (CmsException e) { // of course some folders did already exist! } actImportPath += path[r]; actImportPath += "/"; } if (! isFolder) { // import file into cms int type = OpenCms.getResourceManager().getDefaultTypeForName(path[path.length - 1]).getTypeId(); size = new Long(entry.getSize()).intValue(); if (size == -1) { Vector v = new Vector(); while (true) { buffer = new byte[512]; offset = 0; while (offset < buffer.length) { charsRead = zipStreamIn.read(buffer, offset, buffer.length - offset); if (charsRead == -1) { exit = true; break; // end of stream } offset += charsRead; totalBytes += charsRead; } if (offset > 0) { v.addElement(buffer); } if (exit) { exit = false; break; } } buffer = new byte[totalBytes]; offset = 0; byte[] act = null; for (int z = 0; z < v.size() - 1; z++) { act = (byte[])v.elementAt(z); System.arraycopy(act, 0, buffer, offset, act.length); offset += act.length; } act = (byte[])v.lastElement(); if ((totalBytes > act.length) && (totalBytes % act.length != 0)) { totalBytes = totalBytes % act.length; } else if ((totalBytes > act.length) && (totalBytes % act.length == 0)) { totalBytes = act.length; } System.arraycopy(act, 0, buffer, offset, totalBytes); // handle empty files ... if (totalBytes == 0) { buffer = " ".getBytes(); } } else { // size was read clearly ... buffer = new byte[size]; while (charsRead < size) { charsRead += zipStreamIn.read(buffer, charsRead, size - charsRead); } // handle empty files ... if (size == 0) { buffer = " ".getBytes(); } } filename = actImportPath + path[path.length - 1]; try { m_cms.lockResource(filename); m_cms.readResource(filename); resourceExists = true; } catch (CmsException e) { resourceExists = false; } if (resourceExists) { CmsResource res = m_cms.readResource(filename, CmsResourceFilter.ALL); //m_cms.deleteAllProperties(filename); //m_cms.replaceResource(filename, type, Collections.EMPTY_MAP, buffer); m_cms.replaceResource(filename, res.getTypeId(), buffer, Collections.EMPTY_LIST); OpenCms.fireCmsEvent(new CmsEvent(I_CmsEventListener.EVENT_RESOURCE_AND_PROPERTIES_MODIFIED, Collections.singletonMap("resource", res))); } else { m_cms.createResource(actImportPath + path[path.length - 1], type, buffer, Collections.EMPTY_LIST); } } // close the entry ... zipStreamIn.closeEntry(); } zipStreamIn.close(); if (entries > 0) { // at least one entry, got a valid zip file ... m_validZipFile = true; } } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/ffc41838b2d111ebeb91e9a4f240187165ad24d5/CmsImportFolder.java/buggy/src/org/opencms/db/CmsImportFolder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1930,
9141,
1420,
12,
9141,
4348,
3144,
1228,
382,
16,
514,
30336,
16,
1250,
1158,
1676,
3899,
13,
1216,
1185,
288,
3639,
1250,
31137,
273,
629,
31,
3639,
1250,
2427,
273,
629,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1930,
9141,
1420,
12,
9141,
4348,
3144,
1228,
382,
16,
514,
30336,
16,
1250,
1158,
1676,
3899,
13,
1216,
1185,
288,
3639,
1250,
31137,
273,
629,
31,
3639,
1250,
2427,
273,
629,... | ||
if (c == '\\') if (! ((i + 5) < length) && (s.charAt(i + 1) == 'u') && isXDigit(s.charAt(i + 2)) && isXDigit(s.charAt(i + 3)) && isXDigit(s.charAt(i + 4)) && isXDigit(s.charAt(i + 5))) | if (c == '\\') if (! ((i + 5) < length) && (s.charAt(i + 1) == 'u') && 0 <= xDigitToInt(s.charAt(i + 2)) && 0 <= xDigitToInt(s.charAt(i + 3)) && 0 <= xDigitToInt(s.charAt(i + 4)) && 0 <= xDigitToInt(s.charAt(i + 5))) | protected static boolean isJSIdentifier(String s) { int length = s.length(); if (length == 0 || !Character.isJavaIdentifierStart(s.charAt(0))) return false; for (int i=1; i<length; i++) { char c = s.charAt(i); if (!Character.isJavaIdentifierPart(c)) if (c == '\\') if (! ((i + 5) < length) && (s.charAt(i + 1) == 'u') && isXDigit(s.charAt(i + 2)) && isXDigit(s.charAt(i + 3)) && isXDigit(s.charAt(i + 4)) && isXDigit(s.charAt(i + 5))) return false; } return true; } | 12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/889deca9d42b29b8f50dd401225c3d441fb89da3/TokenStream.java/buggy/js/rhino/src/org/mozilla/javascript/TokenStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
760,
1250,
353,
6479,
3004,
12,
780,
272,
13,
288,
3639,
509,
769,
273,
272,
18,
2469,
5621,
3639,
309,
261,
2469,
422,
374,
747,
401,
7069,
18,
291,
5852,
3004,
1685,
12,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
760,
1250,
353,
6479,
3004,
12,
780,
272,
13,
288,
3639,
509,
769,
273,
272,
18,
2469,
5621,
3639,
309,
261,
2469,
422,
374,
747,
401,
7069,
18,
291,
5852,
3004,
1685,
12,
87,
1... |
AST __t778 = _t; | AST __t763 = _t; | public final void forstate(AST _t) throws RecognitionException { AST forstate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST f = null; AST __t778 = _t; f = _t==ASTNULL ? null :(AST)_t; match(_t,FOR); _t = _t.getFirstChild(); if ( inputState.guessing==0 ) { action.blockBegin(f); action.frameBlockCheck(f); } for_record_spec(_t,CQ.INITWEAK); _t = _retTree; { _loop780: do { if (_t==null) _t=ASTNULL; if ((_tokenSet_20.member(_t.getType()))) { block_opt(_t); _t = _retTree; } else { break _loop780; } } while (true); } block_colon(_t); _t = _retTree; if ( inputState.guessing==0 ) { action.frameStatementEnd(); } code_block(_t); _t = _retTree; block_end(_t); _t = _retTree; if ( inputState.guessing==0 ) { action.blockEnd(); } _t = __t778; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
364,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
364,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
364,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
364,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
... |
assertTrue("incorrect sign", result.signum() == -1); | assertEquals("incorrect sign", -1, result.signum()); | public void testSetBitLeftmostNegative() { byte aBytes[] = {1, -128, 56, 100, -15, 35, 26}; int aSign = -1; int number = 48; byte rBytes[] = {-1, 127, -57, -101, 14, -36, -26, 49}; BigInteger aNumber = new BigInteger(aSign, aBytes); BigInteger result = aNumber.setBit(number); byte resBytes[] = new byte[rBytes.length]; resBytes = result.toByteArray(); for(int i = 0; i < resBytes.length; i++) { assertTrue(resBytes[i] == rBytes[i]); } assertTrue("incorrect sign", result.signum() == -1); } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/2de6e235697acde9baa71a0268d4d3752d10bdf6/BigIntegerOperateBitsTest.java/buggy/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerOperateBitsTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
694,
5775,
3910,
10329,
14959,
1435,
288,
3639,
1160,
279,
2160,
8526,
273,
288,
21,
16,
300,
10392,
16,
13850,
16,
2130,
16,
300,
3600,
16,
13191,
16,
10659,
20451,
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,
1071,
918,
1842,
694,
5775,
3910,
10329,
14959,
1435,
288,
3639,
1160,
279,
2160,
8526,
273,
288,
21,
16,
300,
10392,
16,
13850,
16,
2130,
16,
300,
3600,
16,
13191,
16,
10659,
20451,
3639... |
HTMLNode priorityForm = priorityCell.addChild("form", new String[] { "action", "method" }, new String[] { "/queue/", "post" }); | HTMLNode priorityForm = priorityCell.addChild("form", new String[] { "action", "method", "enctype", "encoding" }, new String[] { "/queue/", "post", "UTF-8", "multipart/form-data" }); | private HTMLNode createPriorityCell(PageMaker pageMaker, String identifier, short priorityClass) { HTMLNode priorityCell = new HTMLNode("td", "class", "request-priority nowrap"); HTMLNode priorityForm = priorityCell.addChild("form", new String[] { "action", "method" }, new String[] { "/queue/", "post" }); priorityForm.addChild(pageMaker.createFormPasswordInput(core.formPassword)); priorityForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "identifier", identifier }); HTMLNode prioritySelect = priorityForm.addChild("select", "name", "priority"); for (int p = 0; p < RequestStarter.NUMBER_OF_PRIORITY_CLASSES; p++) { if (p == priorityClass) { prioritySelect.addChild("option", new String[] { "value", "selected" }, new String[] { String.valueOf(p), "selected" }, priorityClasses[p]); } else { prioritySelect.addChild("option", "value", String.valueOf(p), priorityClasses[p]); } } priorityForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "change_priority", "Change" }); return priorityCell; } | 49933 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49933/0d8d196255a0e85fa26937433ceabd0ce4f72943/QueueToadlet.java/clean/src/freenet/clients/http/QueueToadlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
3982,
907,
752,
8183,
4020,
12,
1964,
12373,
1363,
12373,
16,
514,
2756,
16,
3025,
4394,
797,
13,
288,
202,
202,
4870,
907,
4394,
4020,
273,
394,
3982,
907,
2932,
4465,
3113,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3982,
907,
752,
8183,
4020,
12,
1964,
12373,
1363,
12373,
16,
514,
2756,
16,
3025,
4394,
797,
13,
288,
202,
202,
4870,
907,
4394,
4020,
273,
394,
3982,
907,
2932,
4465,
3113,
... |
return null; | if (portletBufferedReader != null) return portletBufferedReader; if (portletInputStream != null) throw new IllegalStateException("getReader() cannot be called if getPortletInputStream() already called"); String encoding = getCharacterEncoding(); if (encoding == null) encoding = "iso-8859-1"; portletBufferedReader = new BufferedReader(new InputStreamReader(request.getInputStream(), encoding)); return portletBufferedReader; | public BufferedReader getReader() throws UnsupportedEncodingException, IOException { return null; } | 57229 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57229/ae1d0661cd6881846f830d97929a07c4ee98d979/ActionRequestImpl.java/clean/src/java/org/orbeon/oxf/portlet/ActionRequestImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10633,
27173,
1435,
1216,
15367,
16,
1860,
288,
540,
309,
261,
655,
1810,
17947,
2514,
480,
446,
13,
327,
13114,
17947,
2514,
31,
282,
309,
261,
655,
1810,
4348,
480,
446,
13,
604,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10633,
27173,
1435,
1216,
15367,
16,
1860,
288,
540,
309,
261,
655,
1810,
17947,
2514,
480,
446,
13,
327,
13114,
17947,
2514,
31,
282,
309,
261,
655,
1810,
4348,
480,
446,
13,
604,
... |
status + " " + getPeer()+" "+myName+" "+currentLocation.getValue()+" "+getVersion()+" backoff: "+routingBackoffLength+" ("+(Math.max(routingBackedOffUntil - System.currentTimeMillis(),0))+")"; | (isConnected ? "CONNECTED " : "DISCONNECTED") + " " + getPeer()+" "+myName+" "+currentLocation.getValue()+" "+getVersion()+" backoff: "+routingBackoffLength+" ("+(Math.max(routingBackedOffUntil - System.currentTimeMillis(),0))+")"; | public String getStatus() { String status; if(isReallyConnected()) status = new String("CONNECTED"); else if(isConnected()) status = new String("INCOMPATIBLE"); else status = new String("DISCONNECTED"); return status + " " + getPeer()+" "+myName+" "+currentLocation.getValue()+" "+getVersion()+" backoff: "+routingBackoffLength+" ("+(Math.max(routingBackedOffUntil - System.currentTimeMillis(),0))+")"; } | 52909 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52909/f18d01b1fb86ddf4053d90e1f337f99ccd2ec255/PeerNode.java/clean/src/freenet/node/PeerNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
5870,
1435,
288,
377,
202,
780,
1267,
31,
377,
202,
430,
12,
291,
426,
1230,
8932,
10756,
377,
202,
202,
2327,
273,
394,
514,
2932,
29011,
8863,
377,
202,
12107,
309,
12,
291... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5870,
1435,
288,
377,
202,
780,
1267,
31,
377,
202,
430,
12,
291,
426,
1230,
8932,
10756,
377,
202,
202,
2327,
273,
394,
514,
2932,
29011,
8863,
377,
202,
12107,
309,
12,
291... |
setRow(((Integer)newValue).intValue()); | setRow(((Integer) newValue).intValue()); | public void eSet(EStructuralFeature eFeature, Object newValue) { switch (eDerivedStructuralFeatureID(eFeature)) { case LayoutPackage.TITLE_BLOCK__CHILDREN: getChildren().clear(); getChildren().addAll((Collection)newValue); return; case LayoutPackage.TITLE_BLOCK__BOUNDS: setBounds((Bounds)newValue); return; case LayoutPackage.TITLE_BLOCK__ANCHOR: setAnchor((Anchor)newValue); return; case LayoutPackage.TITLE_BLOCK__STRETCH: setStretch((Stretch)newValue); return; case LayoutPackage.TITLE_BLOCK__INSETS: setInsets((Insets)newValue); return; case LayoutPackage.TITLE_BLOCK__ROW: setRow(((Integer)newValue).intValue()); return; case LayoutPackage.TITLE_BLOCK__COLUMN: setColumn(((Integer)newValue).intValue()); return; case LayoutPackage.TITLE_BLOCK__ROWSPAN: setRowspan(((Integer)newValue).intValue()); return; case LayoutPackage.TITLE_BLOCK__COLUMNSPAN: setColumnspan(((Integer)newValue).intValue()); return; case LayoutPackage.TITLE_BLOCK__MIN_SIZE: setMinSize((Size)newValue); return; case LayoutPackage.TITLE_BLOCK__OUTLINE: setOutline((LineAttributes)newValue); return; case LayoutPackage.TITLE_BLOCK__BACKGROUND: setBackground((Fill)newValue); return; case LayoutPackage.TITLE_BLOCK__VISIBLE: setVisible(((Boolean)newValue).booleanValue()); return; case LayoutPackage.TITLE_BLOCK__TRIGGERS: getTriggers().clear(); getTriggers().addAll((Collection)newValue); return; case LayoutPackage.TITLE_BLOCK__LABEL: setLabel((Label)newValue); return; } eDynamicSet(eFeature, newValue); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/TitleBlockImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/layout/impl/TitleBlockImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
20199,
12,
41,
14372,
4595,
425,
4595,
16,
1033,
6129,
13,
565,
288,
3639,
1620,
261,
73,
21007,
14372,
4595,
734,
12,
73,
4595,
3719,
3639,
288,
5411,
648,
9995,
2261,
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,
918,
20199,
12,
41,
14372,
4595,
425,
4595,
16,
1033,
6129,
13,
565,
288,
3639,
1620,
261,
73,
21007,
14372,
4595,
734,
12,
73,
4595,
3719,
3639,
288,
5411,
648,
9995,
2261,
18,
1... |
if (VM.VerifyAssertions) VM.assert(isLoaded()); | if (VM.VerifyAssertions) VM._assert(isLoaded()); | final VM_Class[] getSubClasses() throws VM_PragmaUninterruptible { if (VM.VerifyAssertions) VM.assert(isLoaded()); return subClasses; } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/f852e312fd5d6396bdeff809dda7a5e06d3d3bed/VM_Class.java/clean/rvm/src/vm/classLoader/VM_Class.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
8251,
67,
797,
8526,
7040,
4818,
1435,
1216,
8251,
67,
2050,
9454,
984,
31847,
1523,
288,
565,
309,
261,
7397,
18,
8097,
8213,
1115,
13,
8251,
6315,
11231,
12,
291,
8835,
10663,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
8251,
67,
797,
8526,
7040,
4818,
1435,
1216,
8251,
67,
2050,
9454,
984,
31847,
1523,
288,
565,
309,
261,
7397,
18,
8097,
8213,
1115,
13,
8251,
6315,
11231,
12,
291,
8835,
10663,
565,... |
Result result = runQuery( "with member [Measures].[Store Profit Rate] as '([Measures].[Store Sales]-[Measures].[Store Cost])/[Measures].[Store Cost]', format = '#.00%'" + nl + "select" + nl + " {[Measures].[Store Cost],[Measures].[Store Sales],[Measures].[Store Profit Rate]} on columns," + nl + " Order([Product].[Product Department].members, [Measures].[Store Profit Rate], BDESC) on rows" + nl + "from Sales" + nl + "where ([Time].[1997])"); | runQueryCheckResult(sampleQueries[5]); | public void testSample5() { Result result = runQuery( "with member [Measures].[Store Profit Rate] as '([Measures].[Store Sales]-[Measures].[Store Cost])/[Measures].[Store Cost]', format = '#.00%'" + nl + "select" + nl + " {[Measures].[Store Cost],[Measures].[Store Sales],[Measures].[Store Profit Rate]} on columns," + nl + " Order([Product].[Product Department].members, [Measures].[Store Profit Rate], BDESC) on rows" + nl + "from Sales" + nl + "where ([Time].[1997])"); } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/7509e0f25235fd2cb529aabfa3408833d5f3a58b/FoodMartTestCase.java/buggy/src/main/mondrian/test/FoodMartTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
8504,
25,
1435,
288,
202,
202,
1253,
563,
273,
1086,
1138,
12,
9506,
202,
6,
1918,
3140,
306,
23177,
1823,
8009,
63,
2257,
1186,
7216,
13025,
65,
487,
296,
3816,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25,
1435,
288,
202,
202,
1253,
563,
273,
1086,
1138,
12,
9506,
202,
6,
1918,
3140,
306,
23177,
1823,
8009,
63,
2257,
1186,
7216,
13025,
65,
487,
296,
3816,
23... |
} else { | } else { | private PresentationObject doUpdate(IWContext iwc, TariffGroup group) throws java.rmi.RemoteException ,FinderException{ //Map mapOfIndices = Finder.mapOfIndicesByTypes(Finder.listOfTypeGroupedIndices()); Map mapOfIndices = getFinanceService().mapOfTariffIndicesByTypes(); int tariffCount = Integer.parseInt(iwc.getParameter("te_count")); String sName, sInfo, sDel, sPrice,sOldPrice, sAtt, sAK, sIndex, sIndexStamp; Integer ID; boolean bIndex; Integer tariffGroupID = Integer.valueOf(iwc.getParameter(prmGroup)); for (int i = 1; i < tariffCount + 1; i++) { ID = Integer.valueOf(iwc.getParameter("te_idinput" + i)); //System.out.println("processing "+ID); sName = iwc.getParameter("te_nameinput" + i); sPrice = (iwc.getParameter("te_priceinput" + i)); sOldPrice = (iwc.getParameter("te_oldprice"+i)); sDel = iwc.getParameter("te_delcheck" + i); sIndex = (iwc.getParameter("te_ixdrp" + i)); sIndexStamp = iwc.getParameter("te_ixdate" + i); IWTimestamp stamp = sIndexStamp != null ? new IWTimestamp(sIndexStamp) : null; if (stamp == null && sIndex != null && mapOfIndices != null && mapOfIndices.containsKey(sIndex)) { stamp = new IWTimestamp(((TariffIndex) mapOfIndices.get(sIndex)).getDate()); } // SHALL WE DELETE ? if (sDel != null ) { //System.err.println("deletion"); try { getFinanceService().removeTariff(ID); } catch (RemoteException e) { e.printStackTrace(); } catch (FinderException e) { e.printStackTrace(); } catch (RemoveException e) { e.printStackTrace(); } //FinanceBusiness.deleteTariff(ID); } // IF SINGLE EDIT LINE, THEN UPDATE else if(sName !=null && !"".equals(sName)){ //System.err.println("full form save"); sInfo = iwc.getParameter("te_infoinput" + i); sAtt = iwc.getParameter("te_attdrp" + i); sAK = (iwc.getParameter("te_akdrp" + i)); if (sIndex != null && !sIndex.equals("-1")) { bIndex = true; } else { bIndex = false; sIndex = ""; } java.sql.Timestamp indexStamp = stamp != null ? stamp.getTimestamp() : null; try { //FinanceBusiness.saveTariff( ID,sName, sInfo,sAtt,sIndex,bIndex,indexStamp,Float.parseFloat(sPrice),Integer.parseInt(sAK), tariffGroupID); getFinanceService().createOrUpdateTariff(ID,sName, sInfo,sAtt,sIndex,bIndex,indexStamp,Float.parseFloat(sPrice),Integer.valueOf(sAK), tariffGroupID); } catch (NumberFormatException e) { e.printStackTrace(); } catch (RemoteException e) { e.printStackTrace(); } catch (FinderException e) { e.printStackTrace(); } catch (CreateException e) { e.printStackTrace(); } } // IF PRICE UPDATE else if(sPrice!=null && sOldPrice!=null){ //System.out.println("prices not null"); if(!sPrice.equals(sOldPrice)){ //System.out.println("prices not same"); java.sql.Timestamp indexStamp = stamp != null ? stamp.getTimestamp() : null; getFinanceService().updateTariffPrice(ID,Float.valueOf(sPrice),indexStamp); //FinanceBusiness.updateTariffPrice(ID,Float.parseFloat(sPrice),indexStamp); } } } // for loop return getSingleLineChange(iwc, false, false, group); } | 57001 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57001/33e5c85ca31478329116ab80b95fd07320394530/TariffEditor.java/clean/src/java/com/idega/block/finance/presentation/TariffEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
25130,
367,
921,
741,
1891,
12,
45,
59,
1042,
25522,
71,
16,
20334,
3048,
1114,
1041,
13,
202,
202,
15069,
2252,
18,
8864,
77,
18,
5169,
503,
269,
8441,
503,
95,
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,
1152,
25130,
367,
921,
741,
1891,
12,
45,
59,
1042,
25522,
71,
16,
20334,
3048,
1114,
1041,
13,
202,
202,
15069,
2252,
18,
8864,
77,
18,
5169,
503,
269,
8441,
503,
95,
202,
202,
... |
case ARRAYLIT: return "ARRAYLIT"; case OBJLIT: return "OBJLIT"; | public static String name(int token) { if (printNames) { switch (token) { case ERROR: return "ERROR"; case EOF: return "EOF"; case EOL: return "EOL"; case POPV: return "POPV"; case ENTERWITH: return "ENTERWITH"; case LEAVEWITH: return "LEAVEWITH"; case RETURN: return "RETURN"; case GOTO: return "GOTO"; case IFEQ: return "IFEQ"; case IFNE: return "IFNE"; case SETNAME: return "SETNAME"; case BITOR: return "BITOR"; case BITXOR: return "BITXOR"; case BITAND: return "BITAND"; case EQ: return "EQ"; case NE: return "NE"; case LT: return "LT"; case LE: return "LE"; case GT: return "GT"; case GE: return "GE"; case LSH: return "LSH"; case RSH: return "RSH"; case URSH: return "URSH"; case ADD: return "ADD"; case SUB: return "SUB"; case MUL: return "MUL"; case DIV: return "DIV"; case MOD: return "MOD"; case NOT: return "NOT"; case BITNOT: return "BITNOT"; case POS: return "POS"; case NEG: return "NEG"; case NEW: return "NEW"; case DELPROP: return "DELPROP"; case TYPEOF: return "TYPEOF"; case GETPROP: return "GETPROP"; case SETPROP: return "SETPROP"; case GETELEM: return "GETELEM"; case SETELEM: return "SETELEM"; case CALL: return "CALL"; case NAME: return "NAME"; case NUMBER: return "NUMBER"; case STRING: return "STRING"; case ZERO: return "ZERO"; case ONE: return "ONE"; case NULL: return "NULL"; case THIS: return "THIS"; case FALSE: return "FALSE"; case TRUE: return "TRUE"; case SHEQ: return "SHEQ"; case SHNE: return "SHNE"; case REGEXP: return "OBJECT"; case POP: return "POP"; case BINDNAME: return "BINDNAME"; case THROW: return "THROW"; case IN: return "IN"; case INSTANCEOF: return "INSTANCEOF"; case LOCAL_SAVE: return "LOCAL_SAVE"; case LOCAL_LOAD: return "LOCAL_LOAD"; case GETVAR: return "GETVAR"; case SETVAR: return "SETVAR"; case UNDEFINED: return "UNDEFINED"; case TRY: return "TRY"; case CATCH_SCOPE: return "CATCH_SCOPE"; case ENUM_INIT: return "ENUM_INIT"; case ENUM_NEXT: return "ENUM_NEXT"; case ENUM_ID: return "ENUM_ID"; case THISFN: return "THISFN"; case RETURN_POPV: return "RETURN_POPV"; case SEMI: return "SEMI"; case LB: return "LB"; case RB: return "RB"; case LC: return "LC"; case RC: return "RC"; case LP: return "LP"; case RP: return "RP"; case COMMA: return "COMMA"; case ASSIGN: return "ASSIGN"; case ASSIGNOP: return "ASSIGNOP"; case HOOK: return "HOOK"; case COLON: return "COLON"; case OR: return "OR"; case AND: return "AND"; case INC: return "INC"; case DEC: return "DEC"; case DOT: return "DOT"; case FUNCTION: return "FUNCTION"; case EXPORT: return "EXPORT"; case IMPORT: return "IMPORT"; case IF: return "IF"; case ELSE: return "ELSE"; case SWITCH: return "SWITCH"; case CASE: return "CASE"; case DEFAULT: return "DEFAULT"; case WHILE: return "WHILE"; case DO: return "DO"; case FOR: return "FOR"; case BREAK: return "BREAK"; case CONTINUE: return "CONTINUE"; case VAR: return "VAR"; case WITH: return "WITH"; case CATCH: return "CATCH"; case FINALLY: return "FINALLY"; case RESERVED: return "RESERVED"; case EMPTY: return "EMPTY"; case BLOCK: return "BLOCK"; case ARRAYLIT: return "ARRAYLIT"; case OBJLIT: return "OBJLIT"; case LABEL: return "LABEL"; case TARGET: return "TARGET"; case LOOP: return "LOOP"; case EXPRSTMT: return "EXPRSTMT"; case JSR: return "JSR"; case SCRIPT: return "SCRIPT"; case TYPEOFNAME: return "TYPEOFNAME"; case USE_STACK: return "USE_STACK"; case SETPROP_OP: return "SETPROP_OP"; case SETELEM_OP: return "SETELEM_OP"; case INIT_LIST: return "INIT_LIST"; case LOCAL_BLOCK: return "LOCAL_BLOCK"; } return "<unknown="+token+">"; } return null; } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/6d458931ee3299fbfab0e9840614ad9b93413dd4/Token.java/clean/src/org/mozilla/javascript/Token.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
508,
12,
474,
1147,
13,
565,
288,
3639,
309,
261,
1188,
1557,
13,
288,
5411,
1620,
261,
2316,
13,
288,
7734,
648,
5475,
30,
6647,
327,
315,
3589,
14432,
7734,
648,
6431,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
508,
12,
474,
1147,
13,
565,
288,
3639,
309,
261,
1188,
1557,
13,
288,
5411,
1620,
261,
2316,
13,
288,
7734,
648,
5475,
30,
6647,
327,
315,
3589,
14432,
7734,
648,
6431,... | |
CmsDbContext dbc = m_dbContextFactory.getDbContext(context); | CmsDbContext dbc = m_dbContextFactory.getDbContext(context); | public void resetPassword(CmsRequestContext context, String username, String oldPassword, String newPassword) throws CmsException, CmsSecurityException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { m_driverManager.resetPassword(dbc, username, oldPassword, newPassword); } catch (Exception e) { dbc.report(null, null, e); } finally { dbc.clear(); } } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/a7ffa3c192d7068f584b0a3a844b88bdb2d3145a/CmsSecurityManager.java/buggy/src/org/opencms/db/CmsSecurityManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2715,
3913,
12,
4747,
21426,
819,
16,
514,
2718,
16,
514,
1592,
3913,
16,
514,
394,
3913,
13,
565,
1216,
11228,
16,
2149,
24918,
288,
3639,
30670,
9881,
273,
312,
67,
1966,
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,
377,
1071,
918,
2715,
3913,
12,
4747,
21426,
819,
16,
514,
2718,
16,
514,
1592,
3913,
16,
514,
394,
3913,
13,
565,
1216,
11228,
16,
2149,
24918,
288,
3639,
30670,
9881,
273,
312,
67,
1966,
2... |
new Label( cSetting, SWT.NONE ).setText( Messages.getString( "FormatNumberPreferencePage.symbolPosition.label" ) ); | new Label( cSetting, SWT.NONE ).setText( LABEL_SYMBOL_POSITION ); | private Composite getCurrencyPage( Composite parent ) { if ( currencyPage == null ) { currencyPage = new Composite( parent, SWT.NULL ); currencyPage.setLayout( new GridLayout( 1, false ) ); Group cSetting = new Group( currencyPage, SWT.NONE ); cSetting.setText( Messages.getString( "FormatNumberPreferencePage.currencySetting.groupLabel" ) ); //$NON-NLS-1$ cSetting.setLayoutData( createGridData4Group( ) ); cSetting.setLayout( new GridLayout( 2, false ) ); new Label( cSetting, SWT.NONE ).setText( Messages.getString( "FormatNumberPreferencePage.currencySetting.decimalPlaces" ) ); //$NON-NLS-1$ cPlacesChoice = new Combo( cSetting, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL ); cPlacesChoice.setItems( new String[]{ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ } ); GridData data = new GridData( GridData.FILL_HORIZONTAL ); data.heightHint = 20; cPlacesChoice.setLayoutData( data ); cPlacesChoice.addSelectionListener( mySelectionListener ); cPlacesChoice.addModifyListener( myModifyListener ); cPlacesChoice.select( 2 ); cUseSep = new Button( cSetting, SWT.CHECK ); cUseSep.setText( Messages.getString( "FormatNumberPreferencePage.use1000sSeparator.label" ) ); //$NON-NLS-1$ data = new GridData( ); data.horizontalSpan = 2; cUseSep.setLayoutData( data ); cUseSep.addSelectionListener( mySelectionListener ); new Label( cSetting, SWT.NONE ).setText( Messages.getString( "FormatNumberPreferencePage.symbol.label" ) ); //$NON-NLS-1$ cSymbolChoice = new Combo( cSetting, SWT.DROP_DOWN | SWT.READ_ONLY ); cSymbolChoice.setLayoutData( new GridData( GridData.HORIZONTAL_ALIGN_FILL ) ); cSymbolChoice.setItems( symbols ); cSymbolChoice.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { if ( cSymbolChoice.getSelectionIndex( ) == 0 ) { cSymPosChoice.deselectAll( ); cSymPosChoice.setEnabled( false ); } else { if ( !cSymPosChoice.isEnabled( ) ) { cSymPosChoice.setEnabled( true ); cSymPosChoice.select( 1 ); } } updatePreview( ); } } ); cSymbolChoice.select( 0 ); new Label( cSetting, SWT.NONE ).setText( Messages.getString( "FormatNumberPreferencePage.symbolPosition.label" ) ); //$NON-NLS-1$ cSymPosChoice = new Combo( cSetting, SWT.DROP_DOWN | SWT.READ_ONLY ); cSymPosChoice.setItems( new String[]{ SYMBOL_POSITION_AFTER, SYMBOL_POSITION_BEFORE } ); cSymPosChoice.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); cSymPosChoice.addSelectionListener( mySelectionListener ); cSymPosChoice.setEnabled( false ); Label label = new Label( cSetting, SWT.NONE ); label.setLayoutData( new GridData( GridData.VERTICAL_ALIGN_BEGINNING ) ); label.setText( Messages.getString( "FormatNumberPreferencePage.negativeNum.label" ) ); //$NON-NLS-1$ cNegNumChoice = new List( cSetting, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL ); cNegNumChoice.add( "-1234.56" ); //$NON-NLS-1$ cNegNumChoice.add( "(-1234.56)" ); //$NON-NLS-1$ data = new GridData( GridData.FILL_HORIZONTAL ); cNegNumChoice.setLayoutData( data ); cNegNumChoice.addSelectionListener( mySelectionListener ); cNegNumChoice.select( 0 ); cPreviewLabel = createPreviewText( currencyPage, DEFAULT_WITH ); } return currencyPage; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/ed52f1732ec1c1eef0fd79e44d2e45f78973153a/FormatNumberPage.java/clean/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,
14728,
17910,
1964,
12,
14728,
982,
262,
202,
95,
202,
202,
430,
261,
5462,
1964,
422,
446,
262,
202,
202,
95,
1082,
202,
7095,
1964,
273,
394,
14728,
12,
982,
16,
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,
1152,
14728,
17910,
1964,
12,
14728,
982,
262,
202,
95,
202,
202,
430,
261,
5462,
1964,
422,
446,
262,
202,
202,
95,
1082,
202,
7095,
1964,
273,
394,
14728,
12,
982,
16,
348,
8588,... |
case 23: | case 23: /* reduce AIdValOrSid */ | public Start parse() throws ParserException, LexerException, IOException { push(0, null); List ign = null; while(true) { while(index(lexer.peek()) == -1) { if(ign == null) { ign = new TypedLinkedList(NodeCast.instance); } ign.add(lexer.next()); } if(ign != null) { ignoredTokens.setIn(lexer.peek(), ign); ign = null; } last_pos = lexer.peek().getPos(); last_line = lexer.peek().getLine(); last_token = lexer.peek(); int index = index(lexer.peek()); action[0] = actionTable[state()][0][1]; action[1] = actionTable[state()][0][2]; int low = 1; int high = actionTable[state()].length - 1; while(low <= high) { int middle = (low + high) / 2; if(index < actionTable[state()][middle][0]) { high = middle - 1; } else if(index > actionTable[state()][middle][0]) { low = middle + 1; } else { action[0] = actionTable[state()][middle][1]; action[1] = actionTable[state()][middle][2]; break; } } switch(action[0]) { case SHIFT: { ArrayList list = new ArrayList(); list.add(lexer.next()); push(action[1], list); last_shift = action[1]; } break; case REDUCE: switch(action[1]) { case 0: { ArrayList list = new0(); push(goTo(0), list); } break; case 1: { ArrayList list = new1(); push(goTo(0), list); } break; case 2: { ArrayList list = new2(); push(goTo(0), list); } break; case 3: { ArrayList list = new3(); push(goTo(0), list); } break; case 4: { ArrayList list = new4(); push(goTo(1), list); } break; case 5: { ArrayList list = new5(); push(goTo(1), list); } break; case 6: { ArrayList list = new6(); push(goTo(1), list); } break; case 7: { ArrayList list = new7(); push(goTo(1), list); } break; case 8: { ArrayList list = new8(); push(goTo(1), list); } break; case 9: { ArrayList list = new9(); push(goTo(1), list); } break; case 10: { ArrayList list = new10(); push(goTo(1), list); } break; case 11: { ArrayList list = new11(); push(goTo(1), list); } break; case 12: { ArrayList list = new12(); push(goTo(2), list); } break; case 13: { ArrayList list = new13(); push(goTo(2), list); } break; case 14: { ArrayList list = new14(); push(goTo(2), list); } break; case 15: { ArrayList list = new15(); push(goTo(2), list); } break; case 16: { ArrayList list = new16(); push(goTo(3), list); } break; case 17: { ArrayList list = new17(); push(goTo(4), list); } break; case 18: { ArrayList list = new18(); push(goTo(4), list); } break; case 19: { ArrayList list = new19(); push(goTo(5), list); } break; case 20: { ArrayList list = new20(); push(goTo(5), list); } break; case 21: { ArrayList list = new21(); push(goTo(5), list); } break; case 22: { ArrayList list = new22(); push(goTo(5), list); } break; case 23: { ArrayList list = new23(); push(goTo(5), list); } break; case 24: { ArrayList list = new24(); push(goTo(5), list); } break; case 25: { ArrayList list = new25(); push(goTo(6), list); } break; case 26: { ArrayList list = new26(); push(goTo(7), list); } break; case 27: { ArrayList list = new27(); push(goTo(7), list); } break; case 28: { ArrayList list = new28(); push(goTo(8), list); } break; case 29: { ArrayList list = new29(); push(goTo(8), list); } break; case 30: { ArrayList list = new30(); push(goTo(9), list); } break; case 31: { ArrayList list = new31(); push(goTo(9), list); } break; case 32: { ArrayList list = new32(); push(goTo(10), list); } break; case 33: { ArrayList list = new33(); push(goTo(10), list); } break; } break; case ACCEPT: { EOF node2 = (EOF) lexer.next(); PBibtex node1 = (PBibtex) ((ArrayList)pop()).get(0); Start node = new Start(node1, node2); return node; } case ERROR: throw new ParserException(last_token, "[" + last_line + "," + last_pos + "] " + errorMessages[errors[action[1]]]); } } } | 50059 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50059/a343b73e05abe516d42c4d6672f63a8325be4a98/Parser.java/buggy/sub/source/net/sourceforge/texlipse/bibparser/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3603,
1109,
1435,
1216,
27990,
16,
14234,
503,
16,
1860,
565,
288,
3639,
1817,
12,
20,
16,
446,
1769,
3639,
987,
9750,
273,
446,
31,
3639,
1323,
12,
3767,
13,
3639,
288,
5411,
132... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3603,
1109,
1435,
1216,
27990,
16,
14234,
503,
16,
1860,
565,
288,
3639,
1817,
12,
20,
16,
446,
1769,
3639,
987,
9750,
273,
446,
31,
3639,
1323,
12,
3767,
13,
3639,
288,
5411,
132... |
/** * Run the runnable as an asyncExec. * * @param runnable */ private void runAsync(Runnable runnable) { Shell currentShell = getShell(); if (currentShell == null || currentShell.isDisposed()) return; currentShell.getDisplay().asyncExec(runnable); } | private IProgressMonitorWithBlocking getBlockingProgressMonitor() { return new IProgressMonitorWithBlocking() { /** * Run the runnable as an asyncExec. * * @param runnable */ private void runAsync(Runnable runnable) { Shell currentShell = getShell(); if (currentShell == null || currentShell.isDisposed()) return; currentShell.getDisplay().asyncExec(runnable); } /* * (non-Javadoc) * * @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String, * int) */ public void beginTask(String name, int totalWork) { final String finalName = name; final int finalWork = totalWork; runAsync(new Runnable() { /* * (non-Javadoc) * * @see java.lang.Runnable#run() */ public void run() { getProgressMonitor().beginTask(finalName, finalWork); } }); } /* * (non-Javadoc) * * @see org.eclipse.core.runtime.IProgressMonitorWithBlocking#clearBlocked() */ public void clearBlocked() { runAsync(new Runnable() { /* * (non-Javadoc) * * @see java.lang.Runnable#run() */ public void run() { ((IProgressMonitorWithBlocking) getProgressMonitor()) .clearBlocked(); } }); } /* * (non-Javadoc) * * @see org.eclipse.core.runtime.IProgressMonitor#done() */ public void done() { runAsync(new Runnable() { /* * (non-Javadoc) * * @see java.lang.Runnable#run() */ public void run() { getProgressMonitor().done(); } }); } /* * (non-Javadoc) * * @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double) */ public void internalWorked(double work) { final double finalWork = work; runAsync(new Runnable() { /* * (non-Javadoc) * * @see java.lang.Runnable#run() */ public void run() { getProgressMonitor().internalWorked(finalWork); } }); } /* * (non-Javadoc) * * @see org.eclipse.core.runtime.IProgressMonitor#isCanceled() */ public boolean isCanceled() { return getProgressMonitor().isCanceled(); } /* * (non-Javadoc) * * @see org.eclipse.core.runtime.IProgressMonitorWithBlocking#setBlocked(org.eclipse.core.runtime.IStatus) */ public void setBlocked(IStatus reason) { final IStatus finalReason = reason; runAsync(new Runnable() { /* * (non-Javadoc) * * @see java.lang.Runnable#run() */ public void run() { ((IProgressMonitorWithBlocking) getProgressMonitor()) .setBlocked(finalReason); } }); } /* * (non-Javadoc) * * @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean) */ public void setCanceled(boolean value) { // Just a listener - doesn't matter. } /* * (non-Javadoc) * * @see org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String) */ public void setTaskName(String name) { final String finalName = name; runAsync(new Runnable() { /* * (non-Javadoc) * * @see java.lang.Runnable#run() */ public void run() { getProgressMonitor().setTaskName(finalName); } }); } /* * (non-Javadoc) * * @see org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String) */ public void subTask(String name) { final String finalName = name; runAsync(new Runnable() { /* * (non-Javadoc) * * @see java.lang.Runnable#run() */ public void run() { getProgressMonitor().subTask(finalName); } }); } /* * (non-Javadoc) * * @see org.eclipse.core.runtime.IProgressMonitor#worked(int) */ public void worked(int work) { internalWorked(work); } }; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/011a48b8ec747a10e36868931da0ff7e7880bf98/ProgressMonitorFocusJobDialog.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressMonitorFocusJobDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
5491,
7187,
1190,
8728,
336,
8728,
5491,
7187,
1435,
288,
202,
202,
2463,
394,
467,
5491,
7187,
1190,
8728,
1435,
288,
1082,
202,
26873,
9506,
380,
1939,
326,
14685,
487,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5491,
7187,
1190,
8728,
336,
8728,
5491,
7187,
1435,
288,
202,
202,
2463,
394,
467,
5491,
7187,
1190,
8728,
1435,
288,
1082,
202,
26873,
9506,
380,
1939,
326,
14685,
487,
... | |
private void importResource( | private CmsResource importResource( | private void importResource( String source, String destination, String type, String user, String group, String access, long lastmodified, Map properties, String launcherStartClass, Vector writtenFilenames, Vector fileCodes ) { boolean success = true; byte[] content = null; String fullname = null; try { if (m_importingChannelData) { m_cms.setContextToCos(); // try to read an existing channel to get the channel id String channelId = null; try { if ((type.equalsIgnoreCase(C_TYPE_FOLDER_NAME)) && (! destination.endsWith(C_FOLDER_SEPARATOR))) { destination += C_FOLDER_SEPARATOR; } CmsResource res = m_cms.readFileHeader(C_ROOT + destination); channelId = m_cms.readProperty(res.getAbsolutePath(), I_CmsConstants.C_PROPERTY_CHANNELID); } catch (Exception e) { // ignore the exception, a new channel id will be generated } if (channelId == null) { // the channel id does not exist, so generate a new one int newChannelId = com.opencms.db.CmsIdGenerator.nextId(C_TABLE_CHANNELID); channelId = "" + newChannelId; } properties.put(I_CmsConstants.C_PROPERTY_CHANNELID, channelId); } // get the file content if (source != null) { content = getFileBytes(source); } // check and convert old import files if (m_importVersion < 2) { // convert content from pre 5.x must be activated if ("page".equals(type) || ("plain".equals(type)) || ("XMLTemplate".equals(type))) { if (DEBUG > 0){ System.err.println("#########################"); System.err.println("["+this.getClass().getName()+".importResource()]: starting conversion of \""+type+"\" resource "+source+"."); } // change the filecontent for encoding if necessary content = convertFile(source, content); } // only check the file type if the version of the export is 0 if(m_importVersion == 0){ // ok, a (very) old system exported this, check if the file is ok if(!(new CmsCompatibleCheck()).isTemplateCompatible(m_importPath + destination, content, type)){ type = C_TYPE_COMPATIBLEPLAIN_NAME; m_report.print(m_report.key("report.must_set_to") + C_TYPE_COMPATIBLEPLAIN_NAME + " ", I_CmsReport.C_FORMAT_WARNING); } } } // version 2.0 import (since OpenCms 5.0), no content conversion required CmsResource res = m_cms.importResource(source, destination, type, user, group, access, lastmodified, properties, launcherStartClass, content, m_importPath); if(res != null){ fullname = res.getAbsolutePath(); if(C_TYPE_PAGE_NAME.equals(type)){ m_importedPages.add(fullname); } } m_report.println(m_report.key("report.ok"), I_CmsReport.C_FORMAT_OK); } catch (Exception exc) { // an error while importing the file success = false; m_report.println(exc); try { // Sleep some time after an error so that the report output has a chance to keep up Thread.sleep(1000); } catch (Exception e) {}; } finally { if (m_importingChannelData) m_cms.setContextToVfs(); } byte[] digestContent = {0}; if (content != null) { digestContent = m_digest.digest(content); } if (success && (fullname != null)){ if (writtenFilenames != null){ writtenFilenames.addElement(fullname); } if (fileCodes != null){ fileCodes.addElement(new String(digestContent)); } } } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/d3e3de3a0825215c4681bbdf431c4c579b548527/CmsImport.java/buggy/src/com/opencms/file/CmsImport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
7630,
1930,
1420,
12,
3639,
514,
1084,
16,
540,
514,
2929,
16,
540,
514,
618,
16,
540,
514,
729,
16,
540,
514,
1041,
16,
540,
514,
2006,
16,
540,
1525,
1142,
7342,
16,
540,
1635... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7630,
1930,
1420,
12,
3639,
514,
1084,
16,
540,
514,
2929,
16,
540,
514,
618,
16,
540,
514,
729,
16,
540,
514,
1041,
16,
540,
514,
2006,
16,
540,
1525,
1142,
7342,
16,
540,
1635... |
} else result.add(aStatus); | } else { result.add(aStatus); } | protected static List flatten(IStatus aStatus) { List result = new ArrayList(); if (aStatus.isMultiStatus()) { IStatus[] children = aStatus.getChildren(); for (int i = 0; i < children.length; i++) { IStatus currentChild = children[i]; if (currentChild.isMultiStatus()) { Iterator childStatiiEnum = flatten(currentChild).iterator(); while (childStatiiEnum.hasNext()) result.add(childStatiiEnum.next()); } else result.add(currentChild); } } else result.add(aStatus); return result; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/StatusUtil.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/StatusUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
760,
987,
5341,
12,
45,
1482,
279,
1482,
13,
288,
3639,
987,
563,
273,
394,
2407,
5621,
3639,
309,
261,
69,
1482,
18,
291,
5002,
1482,
10756,
288,
5411,
467,
1482,
8526,
2325,
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,
4750,
760,
987,
5341,
12,
45,
1482,
279,
1482,
13,
288,
3639,
987,
563,
273,
394,
2407,
5621,
3639,
309,
261,
69,
1482,
18,
291,
5002,
1482,
10756,
288,
5411,
467,
1482,
8526,
2325,
273... |
super.setProperty(o, name, value); | super.setProperty(comp, name, value); | public void setProperty(Object o, String name, String value) { STextArea c = (STextArea)o; if ( name.equals("COLS") ) c.setColumns(Integer.parseInt(value)); else if ( name.equals("ROWS") ) c.setRows(Integer.parseInt(value)); else super.setProperty(o, name, value); } | 3911 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3911/ebd6930dd9efb2a999e05f9084a09053efc0db36/STextAreaPropertyManager.java/clean/wings/src/org/wings/template/STextAreaPropertyManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7486,
12,
921,
320,
16,
514,
508,
16,
514,
460,
13,
288,
3639,
348,
1528,
5484,
276,
273,
261,
882,
408,
5484,
13,
83,
31,
3639,
309,
261,
508,
18,
14963,
2932,
4935,
55,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7486,
12,
921,
320,
16,
514,
508,
16,
514,
460,
13,
288,
3639,
348,
1528,
5484,
276,
273,
261,
882,
408,
5484,
13,
83,
31,
3639,
309,
261,
508,
18,
14963,
2932,
4935,
55,
... |
RubyFixnum.newFixnum(runtime, IOModes.EXCL)); | runtime.newFixnum(IOModes.EXCL)); | public static RubyClass createFileClass(Ruby runtime) { RubyClass fileClass = runtime.defineClass("File", runtime.getClasses().getIoClass()); RubyString separator = RubyString.newString(runtime, separator()); separator.freeze(); fileClass.defineConstant("SEPARATOR", separator); fileClass.defineConstant("Separator", separator); RubyString altSeparator = RubyString.newString(runtime, File.separatorChar == '/' ? "\\" : "/"); altSeparator.freeze(); fileClass.defineConstant("ALT_SEPARATOR", altSeparator); RubyString pathSeparator = RubyString.newString(runtime, File.pathSeparator); pathSeparator.freeze(); fileClass.defineConstant("PATH_SEPARATOR", pathSeparator); // Create constants for open flags fileClass.setConstant("RDONLY", RubyFixnum.newFixnum(runtime, IOModes.RDONLY)); fileClass.setConstant("WRONLY", RubyFixnum.newFixnum(runtime, IOModes.WRONLY)); fileClass.setConstant("RDWR", RubyFixnum.newFixnum(runtime, IOModes.RDWR)); fileClass.setConstant("CREAT", RubyFixnum.newFixnum(runtime, IOModes.CREAT)); fileClass.setConstant("EXCL", RubyFixnum.newFixnum(runtime, IOModes.EXCL)); fileClass.setConstant("NOCTTY", RubyFixnum.newFixnum(runtime, IOModes.NOCTTY)); fileClass.setConstant("TRUNC", RubyFixnum.newFixnum(runtime, IOModes.TRUNC)); fileClass.setConstant("APPEND", RubyFixnum.newFixnum(runtime, IOModes.APPEND)); fileClass.setConstant("NONBLOCK", RubyFixnum.newFixnum(runtime, IOModes.NONBLOCK)); CallbackFactory callbackFactory = runtime.callbackFactory(); fileClass.extendObject(runtime.getClasses().getFileTestModule()); fileClass.defineSingletonMethod("new", callbackFactory.getOptSingletonMethod(RubyFile.class, "newInstance")); fileClass.defineSingletonMethod("open", callbackFactory.getOptSingletonMethod(RubyFile.class, "open")); fileClass.defineSingletonMethod("chmod", callbackFactory.getOptSingletonMethod(RubyFile.class, "chmod", RubyInteger.class)); fileClass.defineSingletonMethod("lstat", callbackFactory.getSingletonMethod(RubyFile.class, "lstat", RubyString.class)); fileClass.defineSingletonMethod("expand_path", callbackFactory.getOptSingletonMethod(RubyFile.class, "expand_path")); fileClass.defineSingletonMethod("unlink", callbackFactory.getOptSingletonMethod(RubyFile.class, "unlink")); fileClass.defineSingletonMethod("rename", callbackFactory.getSingletonMethod(RubyFile.class, "rename", IRubyObject.class, IRubyObject.class)); fileClass.defineSingletonMethod("delete", callbackFactory.getOptSingletonMethod(RubyFile.class, "unlink")); fileClass.defineSingletonMethod("dirname", callbackFactory.getSingletonMethod(RubyFile.class, "dirname", RubyString.class)); fileClass.defineSingletonMethod("join", callbackFactory.getOptSingletonMethod(RubyFile.class, "join")); fileClass.defineSingletonMethod("basename", callbackFactory.getOptSingletonMethod(RubyFile.class, "basename")); fileClass.defineSingletonMethod("truncate", callbackFactory.getSingletonMethod(RubyFile.class, "truncate", RubyString.class, RubyFixnum.class)); fileClass.defineMethod("initialize", callbackFactory.getOptMethod(RubyFile.class, "initialize")); fileClass.defineMethod("truncate", callbackFactory.getMethod(RubyFile.class, "truncate", RubyFixnum.class)); // Works around a strange-ish implementation that uses a static method on the superclass. // It broke when moved to indexed callbacks, so added this line: fileClass.defineMethod("print", callbackFactory.getOptSingletonMethod(RubyIO.class, "print")); return fileClass; } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyFile.java/clean/src/org/jruby/RubyFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
21266,
797,
12,
54,
10340,
3099,
13,
288,
3639,
19817,
797,
585,
797,
273,
3099,
18,
11255,
797,
2932,
812,
3113,
1171,
3099,
18,
588,
4818,
7675,
588,
15963,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21266,
797,
12,
54,
10340,
3099,
13,
288,
3639,
19817,
797,
585,
797,
273,
3099,
18,
11255,
797,
2932,
812,
3113,
1171,
3099,
18,
588,
4818,
7675,
588,
15963,
797,
... |
setOnchange(null); | private void evaluateExpressions() throws JspException { try { setAccesskey((String) evalAttr("accessKey", getAccesskey(), String.class)); } catch (NullAttributeException ex) { setAccesskey(null); } try { setAlt((String) evalAttr("alt", getAlt(), String.class)); } catch (NullAttributeException ex) { setAlt(null); } try { setAltKey((String) evalAttr("altKey", getAltKey(), String.class)); } catch (NullAttributeException ex) { setAltKey(null); } try { setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { setDisabled(false); } try { setIdName((String) evalAttr("idName", getIdName(), String.class)); } catch (NullAttributeException ex) { setIdName(null); } try { setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { setIndexed(false); } try { setName((String) evalAttr("name", getName(), String.class)); } catch (NullAttributeException ex) { setName(null); } try { setOnblur((String) evalAttr("onblur", getOnblur(), String.class)); } catch (NullAttributeException ex) { setOnblur(null); } try { setOnchange((String) evalAttr("onchange", getOnchange(), String.class)); } catch (NullAttributeException ex) { setOnchange(null); } try { setOnclick((String) evalAttr("onclick", getOnclick(), String.class)); } catch (NullAttributeException ex) { setOnclick(null); } try { setOndblclick((String) evalAttr("ondblclick", getOndblclick(), String.class)); } catch (NullAttributeException ex) { setOndblclick(null); } try { setOnfocus((String) evalAttr("onfocus", getOnfocus(), String.class)); } catch (NullAttributeException ex) { setOnfocus(null); } try { setOnkeydown((String) evalAttr("onkeydown", getOnkeydown(), String.class)); } catch (NullAttributeException ex) { setOnkeydown(null); } try { setOnkeypress((String) evalAttr("onkeypress", getOnkeypress(), String.class)); } catch (NullAttributeException ex) { setOnkeypress(null); } try { setOnkeyup((String) evalAttr("onkeyup", getOnkeyup(), String.class)); } catch (NullAttributeException ex) { setOnkeyup(null); } try { setOnmousedown((String) evalAttr("onmousedown", getOnmousedown(), String.class)); } catch (NullAttributeException ex) { setOnmousedown(null); } try { setOnmousemove((String) evalAttr("onmousemove", getOnmousemove(), String.class)); } catch (NullAttributeException ex) { setOnmousemove(null); } try { setOnmouseout((String) evalAttr("onmouseout", getOnmouseout(), String.class)); } catch (NullAttributeException ex) { setOnmouseout(null); } try { setOnmouseover((String) evalAttr("onmouseover", getOnmouseover(), String.class)); } catch (NullAttributeException ex) { setOnmouseover(null); } try { setOnmouseup((String) evalAttr("onmouseup", getOnmouseup(), String.class)); } catch (NullAttributeException ex) { setOnmouseup(null); } try { setProperty((String) evalAttr("property", getProperty(), String.class)); } catch (NullAttributeException ex) { setProperty(null); } try { setStyle((String) evalAttr("style", getStyle(), String.class)); } catch (NullAttributeException ex) { setStyle(null); } try { setStyleClass((String) evalAttr("styleClass", getStyleClass(), String.class)); } catch (NullAttributeException ex) { setStyleClass(null); } try { setStyleId((String) evalAttr("styleId", getStyleId(), String.class)); } catch (NullAttributeException ex) { setStyleId(null); } try { setTabindex((String) evalAttr("tabindex", getTabindex(), String.class)); } catch (NullAttributeException ex) { setTabindex(null); } try { setTitle((String) evalAttr("title", getTitle(), String.class)); } catch (NullAttributeException ex) { setTitle(null); } try { setTitleKey((String) evalAttr("titleKey", getTitleKey(), String.class)); } catch (NullAttributeException ex) { setTitleKey(null); } try { setValue((String) evalAttr("value", getValue(), String.class)); } catch (NullAttributeException ex) { setValue(null); } } | 48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/db064e19656421b94aaf753550935d95f44bd5f9/ELRadioTag.java/buggy/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELRadioTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
1862,
856,
12443,
780,
13,
5302,
3843,
2932,
3860,
653,
3113,
21909,
856,
9334,
4766,
6647,
514,
18,
1106,
10019,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
1862,
856,
12443,
780,
13,
5302,
3843,
2932,
3860,
653,
3113,
21909,
856,
9334,
4766,
6647,
514,
18,
1106,
10019,
... | |
JavaScriptViewer( ) | JavaScriptViewer( Composite parent, int style ) | JavaScriptViewer( ) { final PluginSettings ps = PluginSettings.instance( ); try { idr = ps.getDevice( "dv.SWT" );//$NON-NLS-1$ } catch ( ChartException pex ) { logger.log( pex ); } cm = ScriptCharts.createChart_Axis( ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/ef9ad0cebcee59b4b447430acdbf2355afecf441/JavaScriptViewer.java/buggy/chart/org.eclipse.birt.chart.examples/src/org/eclipse/birt/chart/examples/api/script/JavaScriptViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
16634,
18415,
12,
262,
202,
95,
202,
202,
6385,
6258,
2628,
4250,
273,
6258,
2628,
18,
1336,
12,
11272,
202,
202,
698,
202,
202,
95,
1082,
202,
350,
86,
273,
4250,
18,
588,
3654,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16634,
18415,
12,
262,
202,
95,
202,
202,
6385,
6258,
2628,
4250,
273,
6258,
2628,
18,
1336,
12,
11272,
202,
202,
698,
202,
202,
95,
1082,
202,
350,
86,
273,
4250,
18,
588,
3654,
... |
shapeLayerProps.put("shapeFile", "edu/sc/seis/fissuresUtil/data/maps/dcwpo-browse.shp"); shapeLayerProps.put("spatialIndex", "edu/sc/seis/fissuresUtil/data/maps/dcwpo-browse.ssx"); | shapeLayerProps.put("shapeFile", "edu/sc/seis/vsnexplorer/data/maps/dcwpo-browse.shp"); shapeLayerProps.put("spatialIndex", "edu/sc/seis/vsnexplorer/data/maps/dcwpo-browse.ssx"); | public OpenMap(EventTableModel etm, ListSelectionModel lsm){ try{ mapHandler = new MapHandler(); mapHandler.add(this); // Create a MapBean mapBean = new MapBean(); //get the projection and set its background color and center point Proj proj = new CADRG(new LatLonPoint(mapBean.DEFAULT_CENTER_LAT, mapBean.DEFAULT_CENTER_LON), 200000000f, mapBean.DEFAULT_WIDTH, mapBean.DEFAULT_HEIGHT); proj.setBackgroundColor(WATER); mapBean.setProjection(proj); mapBean.setCenter(20, 200); mapHandler.add(mapBean); // Create and add a LayerHandler to the MapHandler. The // LayerHandler manages Layers, whether they are part of the // map or not. layer.setVisible(true) will add it to the map. // The LayerHandler has methods to do this, too. The // LayerHandler will find the MapBean in the MapHandler. lh = new LayerHandler(); mapHandler.add(lh); if(etm != null){ EventLayer el = new EventLayer(etm, lsm, mapBean); mapHandler.add(el); lh.addLayer(el, 1); } // Create a ShapeLayer to show world political boundaries. ShapeLayer shapeLayer = new ShapeLayer(); //Create shape layer properties Properties shapeLayerProps = new Properties(); shapeLayerProps.put("prettyName", "Political Solid"); shapeLayerProps.put("lineColor", "000000"); shapeLayerProps.put("fillColor", "39DA87"); shapeLayerProps.put("shapeFile", "edu/sc/seis/fissuresUtil/data/maps/dcwpo-browse.shp"); shapeLayerProps.put("spatialIndex", "edu/sc/seis/fissuresUtil/data/maps/dcwpo-browse.ssx"); shapeLayer.setProperties(shapeLayerProps); shapeLayer.setVisible(true); mapHandler.add(shapeLayer); // Create the directional and zoom control tool OMToolSet omts = new OMToolSet(); // Create an OpenMap toolbar ToolPanel toolBar = new ToolPanel(); // Add the ToolPanel and the OMToolSet to the MapHandler. The // OpenMapFrame will find the ToolPanel and attach it to the // top part of its content pane, and the ToolPanel will find // the OMToolSet and add it to itself. mapHandler.add(omts); mapHandler.add(toolBar); mapHandler.add(new MouseDelegator()); mapHandler.add(new SelectMouseMode()); mapHandler.add(new InformationDelegator()); } catch (MultipleSoloMapComponentException msmce) { // The MapHandler is only allowed to have one of certain // items. These items implement the SoloMapComponent // interface. The MapHandler can have a policy that // determines what to do when duplicate instances of the // same type of object are added - replace or ignore. // In this class, this will never happen, since we are // controlling that one MapBean, LayerHandler, // MouseDelegator, etc is being added to the MapHandler. } } | 52623 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52623/65f98e737cf60cfb8d708e1da14adde3175de7d0/OpenMap.java/clean/src/edu/sc/seis/fissuresUtil/map/OpenMap.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3502,
863,
12,
1133,
1388,
1488,
3393,
81,
16,
987,
6233,
1488,
328,
4808,
15329,
202,
202,
698,
95,
1082,
202,
1458,
1503,
273,
394,
1635,
1503,
5621,
1082,
202,
1458,
1503,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3502,
863,
12,
1133,
1388,
1488,
3393,
81,
16,
987,
6233,
1488,
328,
4808,
15329,
202,
202,
698,
95,
1082,
202,
1458,
1503,
273,
394,
1635,
1503,
5621,
1082,
202,
1458,
1503,
18,
... |
formData.setCategoryTypeToEdit(categoryTypeToEdit); formData.setCategoryToEdit(categoryToEdit1); formData.setDocumentsOfOneCategory(documentsOfOneCategory); | formData.setCategoryTypeToEdit( categoryTypeToEdit ); formData.setCategoryToEdit( categoryToEdit1 ); formData.setDocumentsOfOneCategory( documentsOfOneCategory ); | private void deleteCategory(CategoryDomainObject categoryToEdit, IMCServiceInterface service, HttpServletRequest req, CategoryTypeDomainObject categoryTypeToEdit, FormData formData) { CategoryDomainObject categoryToEdit1 = categoryToEdit; StringBuffer msg = new StringBuffer(""); String[] documentsOfOneCategory = null; if (categoryToEdit1 != null) { documentsOfOneCategory = service.getDocumentMapper().getAllDocumentsOfOneCategory(categoryToEdit1); if (req.getParameter("category_delete") != null) { DocumentDomainObject document; for (int i = 0; i < documentsOfOneCategory.length; i++) { document = service.getDocumentMapper().getDocument(Integer.parseInt(documentsOfOneCategory[i])); service.getDocumentMapper().deleteOneCategoryFromDocument(document, categoryToEdit1); } service.getDocumentMapper().deleteCategoryFromDb(categoryToEdit1); categoryToEdit1 = null; documentsOfOneCategory = null; } } formData.setCategoryTypeToEdit(categoryTypeToEdit); formData.setCategoryToEdit(categoryToEdit1); formData.setDocumentsOfOneCategory(documentsOfOneCategory); categoryToEdit = categoryToEdit1; } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/8daae426d68b0b35f1c6a010bf9e8f05942fe712/AdminCategories.java/buggy/server/src/com/imcode/imcms/servlet/superadmin/AdminCategories.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1430,
4457,
12,
4457,
3748,
921,
3150,
774,
4666,
16,
6246,
39,
18348,
1156,
16,
9984,
1111,
16,
9856,
559,
3748,
921,
3150,
559,
774,
4666,
16,
2748,
751,
14224,
13,
288,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1430,
4457,
12,
4457,
3748,
921,
3150,
774,
4666,
16,
6246,
39,
18348,
1156,
16,
9984,
1111,
16,
9856,
559,
3748,
921,
3150,
559,
774,
4666,
16,
2748,
751,
14224,
13,
288,
36... |
if ((!exiting) && (keyTimeout > System.currentTimeMillis())) { listener.failOverInProgress(); reconnecting = true; try { Thread.sleep(connWaitMS); } catch (InterruptedException e) { } connect(umanager); } else { connected = false; listener.disconnected(); } | if ((!exiting) && (keyTimeout > System.currentTimeMillis())) { listener.failOverInProgress(); reconnecting = true; try { Thread.sleep(connWaitMS); } catch (InterruptedException e) { } connect(umanager); } else { connected = false; listener.disconnected(); } | public void disconnected() { if (connected == false) { // not yet connected if (connAttemptCounter < connAttempts) { // try again try { Thread.sleep(connWaitMS); } catch (InterruptedException e) { e.printStackTrace(); } connect(umanager); } else { listener.disconnected(); } } else { // lost connection if ((!exiting) && (keyTimeout > System.currentTimeMillis())) { // valid reconn key listener.failOverInProgress(); reconnecting = true; try { Thread.sleep(connWaitMS); } catch (InterruptedException e) { // doesn't matter. } connect(umanager); } else { // we cant fail over connected = false; listener.disconnected(); } } } | 55380 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55380/20099edd8aca08cc31e94e748a04d1f1a7e558ee/ClientConnectionManagerImpl.java/clean/src/com/sun/gi/comm/users/client/impl/ClientConnectionManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
17853,
1435,
288,
3639,
309,
261,
8537,
422,
629,
13,
288,
368,
486,
4671,
5840,
5411,
309,
261,
4646,
7744,
4789,
411,
1487,
10113,
13,
288,
368,
775,
3382,
7734,
775,
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,
17853,
1435,
288,
3639,
309,
261,
8537,
422,
629,
13,
288,
368,
486,
4671,
5840,
5411,
309,
261,
4646,
7744,
4789,
411,
1487,
10113,
13,
288,
368,
775,
3382,
7734,
775,
288,
... |
xformsControls.rebuildCurrentControlsState(pipelineContext); xformsControls.getCurrentControlsState().visitControlInfoFollowRepeats(pipelineContext, xformsControls, new XFormsControls.ControlInfoVisitorListener() { public void startVisitControl(XFormsControls.ControlInfo controlInfo) { if (controlInfo instanceof XFormsControls.RepeatControlInfo) { final XFormsControls.RepeatControlInfo repeatControlInfo = (XFormsControls.RepeatControlInfo) controlInfo; final String repeatId = repeatControlInfo.getOriginalId(); if (nestedRepeatIndexUpdates.get(repeatId) != null) { final List repeatNodeSet = xformsControls.getCurrentNodeset(); if (repeatNodeSet != null && repeatNodeSet.size() > 0) { int newIndex = repeatControlInfo.getStartIndex(); if (newIndex < 1) newIndex = 1; if (newIndex > repeatNodeSet.size()) newIndex = repeatNodeSet.size(); xformsControls.getCurrentControlsState().updateRepeatIndex(repeatId, newIndex); } } } } public void endVisitControl(XFormsControls.ControlInfo controlInfo) { } }); | public void runAction(final PipelineContext pipelineContext, String targetId, XFormsEventHandlerContainer eventHandlerContainer, Element actionElement, ActionContext actionContext) { // Check that we understand the action element final String actionNamespaceURI = actionElement.getNamespaceURI(); if (!XFormsConstants.XFORMS_NAMESPACE_URI.equals(actionNamespaceURI)) { throw new OXFException("Invalid action namespace: " + actionNamespaceURI); } // Set binding context setBindingContext(pipelineContext, eventHandlerContainer.getId(), actionElement); final String actionEventName = actionElement.getName(); if (XFormsServer.logger.isDebugEnabled()) XFormsServer.logger.debug("XForms - executing action: " + actionEventName); if (XFormsActions.XFORMS_SETVALUE_ACTION.equals(actionEventName)) { // 10.1.9 The setvalue Element // xforms:setvalue final String value = actionElement.attributeValue("value"); final String content = actionElement.getStringValue(); final XFormsInstance currentInstance = xformsControls.getCurrentInstance(); final String valueToSet; if (value != null) { // Value to set is computed with an XPath expression Map namespaceContext = Dom4jUtils.getNamespaceContextNoDefault(actionElement); valueToSet = currentInstance.evaluateXPathAsString(pipelineContext, xformsControls.getCurrentNodeset(), xformsControls.getCurrentPosition(), value, namespaceContext, null, xformsControls.getFunctionLibrary(), null); } else { // Value to set is static content valueToSet = content; } // Set value on current node final Node currentNode = xformsControls.getCurrentSingleNode(); XFormsInstance.setValueForNode(pipelineContext, currentNode, valueToSet, null); if (actionContext != null) { // "XForms Actions that change only the value of an instance node results in setting // the flags for recalculate, revalidate, and refresh to true and making no change to // the flag for rebuild". actionContext.recalculate = true; actionContext.revalidate = true; actionContext.refresh = true; } else { // Send events directly final XFormsModel model = xformsControls.getCurrentModel(); containingDocument.dispatchEvent(pipelineContext, new XFormsRecalculateEvent(model, true)); containingDocument.dispatchEvent(pipelineContext, new XFormsRevalidateEvent(model, true)); containingDocument.dispatchEvent(pipelineContext, new XFormsRefreshEvent(model)); } } else if (XFormsActions.XFORMS_RESET_ACTION.equals(actionEventName)) { // 10.1.11 The reset Element final String modelId = actionElement.attributeValue("model"); final Object modelObject = containingDocument.getObjectById(pipelineContext, modelId); if (modelObject instanceof XFormsModel) { final XFormsModel model = (XFormsModel) modelObject; containingDocument.dispatchEvent(pipelineContext, new XFormsResetEvent(model)); } else { throw new OXFException("xforms:reset model attribute must point to an xforms:model element."); } // "the reset action takes effect immediately and clears all of the flags." if (actionContext != null) actionContext.setAll(false); } else if (XFormsActions.XFORMS_ACTION_ACTION.equals(actionEventName)) { // 10.1.1 The action Element final ActionContext newActionContext = (actionContext == null) ? new ActionContext() : null; for (Iterator i = actionElement.elementIterator(); i.hasNext();) { final Element embeddedActionElement = (Element) i.next(); runAction(pipelineContext, targetId, eventHandlerContainer, embeddedActionElement, (newActionContext == null) ? actionContext : newActionContext ); } if (newActionContext != null) { // Binding context has to be reset as it may have been modified by sub-actions setBindingContext(pipelineContext, eventHandlerContainer.getId(), actionElement); final XFormsModel model = xformsControls.getCurrentModel(); // Process deferred behavior if (newActionContext.rebuild) containingDocument.dispatchEvent(pipelineContext, new XFormsRebuildEvent(model)); if (newActionContext.recalculate) containingDocument.dispatchEvent(pipelineContext, new XFormsRecalculateEvent(model, true)); if (newActionContext.revalidate) containingDocument.dispatchEvent(pipelineContext, new XFormsRevalidateEvent(model, true)); if (newActionContext.refresh) containingDocument.dispatchEvent(pipelineContext, new XFormsRefreshEvent(model)); } } else if (XFormsActions.XFORMS_REBUILD_ACTION.equals(actionEventName)) { // 10.1.3 The rebuild Element final XFormsModel model = xformsControls.getCurrentModel(); containingDocument.dispatchEvent(pipelineContext, new XFormsRebuildEvent(model)); // "Actions that directly invoke rebuild, recalculate, revalidate, or refresh always // have an immediate effect, and clear the corresponding flag." if (actionContext != null) actionContext.rebuild = false; } else if (XFormsActions.XFORMS_RECALCULATE_ACTION.equals(actionEventName)) { // 10.1.4 The recalculate Element final XFormsModel model = xformsControls.getCurrentModel(); containingDocument.dispatchEvent(pipelineContext, new XFormsRecalculateEvent(model, true)); // "Actions that directly invoke rebuild, recalculate, revalidate, or refresh always // have an immediate effect, and clear the corresponding flag." if (actionContext != null) actionContext.recalculate = false; } else if (XFormsActions.XFORMS_REVALIDATE_ACTION.equals(actionEventName)) { // 10.1.5 The revalidate Element final XFormsModel model = xformsControls.getCurrentModel(); containingDocument.dispatchEvent(pipelineContext, new XFormsRevalidateEvent(model, true)); // "Actions that directly invoke rebuild, recalculate, revalidate, or refresh always // have an immediate effect, and clear the corresponding flag." if (actionContext != null) actionContext.revalidate = false; } else if (XFormsActions.XFORMS_REFRESH_ACTION.equals(actionEventName)) { // 10.1.6 The refresh Element final XFormsModel model = xformsControls.getCurrentModel(); containingDocument.dispatchEvent(pipelineContext, new XFormsRefreshEvent(model)); // "Actions that directly invoke rebuild, recalculate, revalidate, or refresh always // have an immediate effect, and clear the corresponding flag." if (actionContext != null) actionContext.refresh = false; } else if (XFormsActions.XFORMS_TOGGLE_ACTION.equals(actionEventName)) { // 9.2.3 The toggle Element // TODO: Handle repeat controls, AKA "switch within repeat" final String caseId = actionElement.attributeValue("case"); // Update xforms:switch info and dispatch events xformsControls.updateSwitchInfo(pipelineContext, caseId); } else if (XFormsActions.XFORMS_INSERT_ACTION.equals(actionEventName)) { // 9.3.5 The insert Element final String atAttribute = actionElement.attributeValue("at"); final String positionAttribute = actionElement.attributeValue("position"); // Set current binding in order to evaluate the current nodeset // "1. The homogeneous collection to be updated is determined by evaluating the Node Set Binding." final List collectionToBeUpdated = xformsControls.getCurrentNodeset(); if (collectionToBeUpdated.size() > 0) { // "If the collection is empty, the insert action has no effect." // "2. The node-set binding identifies a homogeneous collection in the instance // data. The final member of this collection is cloned to produce the node that will // be inserted." final Element clonedElement; { final Element lastElement = (Element) collectionToBeUpdated.get(collectionToBeUpdated.size() - 1); clonedElement = (Element) lastElement.createCopy(); XFormsUtils.setInitialDecoration(clonedElement); } // "Finally, this newly created node is inserted into the instance data at the location // specified by attributes position and at." final XFormsInstance currentInstance = xformsControls.getCurrentInstance(); final String insertionIndexString = currentInstance.evaluateXPathAsString(pipelineContext, xformsControls.getCurrentNodeset(), xformsControls.getCurrentPosition(), "round(" + atAttribute + ")", Dom4jUtils.getNamespaceContextNoDefault(actionElement), null, xformsControls.getFunctionLibrary(), null); // Don't think we will get NaN with XPath 2.0... int insertionIndex = "NaN".equals(insertionIndexString) ? collectionToBeUpdated.size() : Integer.parseInt(insertionIndexString) ; // Adjust index to be in range if (insertionIndex > collectionToBeUpdated.size()) insertionIndex = collectionToBeUpdated.size(); if (insertionIndex < 1) insertionIndex = 1; // Find actual insertion point and insert final Element indexElement = (Element) collectionToBeUpdated.get(insertionIndex - 1); final Element parentElement = indexElement.getParent(); final List siblingElements = parentElement.elements(); final int actualIndex = siblingElements.indexOf(indexElement); // Prepare insertion of new element final int actualInsertionIndex; if ("after".equals(positionAttribute) || "NaN".equals(insertionIndexString)) { actualInsertionIndex = actualIndex + 1; } else if ("before".equals(positionAttribute)) { actualInsertionIndex = actualIndex; } else { throw new OXFException("Invalid 'position' attribute: " + positionAttribute + ". Must be either 'before' or 'after'."); } // "3. The index for any repeating sequence that is bound to the homogeneous // collection where the node was added is updated to point to the newly added node. // The indexes for inner nested repeat collections are re-initialized to // startindex." // Perform the insertion siblingElements.add(actualInsertionIndex, clonedElement); // Rebuild ControlsState xformsControls.rebuildCurrentControlsState(pipelineContext); final XFormsControls.ControlsState currentControlsState = xformsControls.getCurrentControlsState(); // Update repeat indexes // NOTE: The code below assumes that there are no nested repeats bound to node-sets that intersect currentControlsState.visitControlInfoFollowRepeats(pipelineContext, xformsControls, new XFormsControls.ControlInfoVisitorListener() { private XFormsControls.ControlInfo foundControl; public void startVisitControl(XFormsControls.ControlInfo controlInfo) { if (controlInfo instanceof XFormsControls.RepeatControlInfo) { // Found an xforms:repeat final XFormsControls.RepeatControlInfo repeatControlInfo = (XFormsControls.RepeatControlInfo) controlInfo; final String repeatId = repeatControlInfo.getOriginalId(); final List repeatNodeSet = xformsControls.getCurrentNodeset(); if (foundControl == null) { // We are not yet inside a matching xforms:repeat if (repeatNodeSet != null && repeatNodeSet.size() > 0) { // Find whether one node of the repeat node-set contains the inserted node int index = 1; for (Iterator i = repeatNodeSet.iterator(); i.hasNext(); index++) { final Element currentNode = (Element) i.next(); if (currentNode == clonedElement) { // Found xforms:repeat affected by the change // "The index for any repeating sequence that is bound // to the homogeneous collection where the node was // added is updated to point to the newly added node." currentControlsState.updateRepeatIndex(repeatId, index); // First step: set all children indexes to 0 final List nestedRepeatIds = currentControlsState.getNestedRepeatIds(xformsControls, repeatId); if (nestedRepeatIds != null) { for (Iterator j = nestedRepeatIds.iterator(); j.hasNext();) { final String nestedRepeatId = (String) j.next(); currentControlsState.updateRepeatIndex(nestedRepeatId, 0); } } foundControl = controlInfo; break; } } } } else { // This is a child xforms:repeat of a matching xforms:repeat // Second step: update non-empty repeat indexes to the appropriate value // "The indexes for inner nested repeat collections are re-initialized to startindex." // NOTE: We do this, but we also adjust the index: // "The index for this repeating structure is initialized to the // value of startindex. If the initial startindex is less than 1 it // defaults to 1. If the index is greater than the initial node-set // then it defaults to the size of the node-set." if (repeatNodeSet != null && repeatNodeSet.size() > 0) { int newIndex = repeatControlInfo.getStartIndex(); if (newIndex < 1) newIndex = 1; if (newIndex > repeatNodeSet.size()) newIndex = repeatNodeSet.size(); currentControlsState.updateRepeatIndex(repeatId, newIndex); } } } } public void endVisitControl(XFormsControls.ControlInfo controlInfo) { if (controlInfo instanceof XFormsControls.RepeatControlInfo) { if (foundControl == controlInfo) foundControl = null; } } }); // Adjust controls ids that could have gone out of bounds adjustRepeatIndexes(pipelineContext, xformsControls); // "4. If the insert is successful, the event xforms-insert is dispatched." containingDocument.dispatchEvent(pipelineContext, new XFormsInsertEvent(currentInstance, atAttribute)); if (actionContext != null) { // "XForms Actions that change the tree structure of instance data result in setting all four flags to true" actionContext.setAll(true); } else { // Binding context has to be reset as the controls have been updated setBindingContext(pipelineContext, eventHandlerContainer.getId(), actionElement); final XFormsModel model = xformsControls.getCurrentModel(); // Send events directly containingDocument.dispatchEvent(pipelineContext, new XFormsRebuildEvent(model)); containingDocument.dispatchEvent(pipelineContext, new XFormsRecalculateEvent(model, true)); containingDocument.dispatchEvent(pipelineContext, new XFormsRevalidateEvent(model, true)); containingDocument.dispatchEvent(pipelineContext, new XFormsRefreshEvent(model)); } } } else if (XFormsActions.XFORMS_DELETE_ACTION.equals(actionEventName)) { // 9.3.6 The delete Element final String atAttribute = actionElement.attributeValue("at"); // Set current binding in order to evaluate the current nodeset // "1. The homogeneous collection to be updated is determined by evaluating the Node Set Binding." final List collectionToUpdate = xformsControls.getCurrentNodeset(); if (collectionToUpdate.size() > 0) { // "If the collection is empty, the delete action has no effect." final XFormsInstance currentInstance = xformsControls.getCurrentInstance(); final Element elementToRemove; final List siblingElements; final int actualIndexInCollection; { final String deletionIndexString = currentInstance.evaluateXPathAsString(pipelineContext, xformsControls.getCurrentNodeset(), xformsControls.getCurrentPosition(), "round(" + atAttribute + ")", Dom4jUtils.getNamespaceContextNoDefault(actionElement), null, xformsControls.getFunctionLibrary(), null); // We will not get NaN with XPath 2.0... int tempDeletionIndex = "NaN".equals(deletionIndexString) ? collectionToUpdate.size() : Integer.parseInt(deletionIndexString) ; // Adjust index to be in range if (tempDeletionIndex > collectionToUpdate.size()) tempDeletionIndex = collectionToUpdate.size(); if (tempDeletionIndex < 1) tempDeletionIndex = 1; // Find actual deletion point elementToRemove = (Element) collectionToUpdate.get(tempDeletionIndex - 1); final Element parentElement = elementToRemove.getParent(); siblingElements = parentElement.elements(); actualIndexInCollection = siblingElements.indexOf(elementToRemove); } // Get current repeat indexes final Map previousRepeatIdToIndex = xformsControls.getCurrentControlsState().getRepeatIdToIndex(); // Rebuild ControlsState xformsControls.rebuildCurrentControlsState(pipelineContext); // Find updates to repeat indexes final Map repeatIndexUpdates = new HashMap(); final Map nestedRepeatIndexUpdates = new HashMap(); // NOTE: The code below assumes that there are no nested repeats bound to node-sets that intersect xformsControls.getCurrentControlsState().visitControlInfoFollowRepeats(pipelineContext, xformsControls, new XFormsControls.ControlInfoVisitorListener() { private XFormsControls.ControlInfo foundControl; private boolean reinitializeInner; public void startVisitControl(XFormsControls.ControlInfo controlInfo) { if (controlInfo instanceof XFormsControls.RepeatControlInfo) { // Found an xforms:repeat final XFormsControls.RepeatControlInfo repeatControlInfo = (XFormsControls.RepeatControlInfo) controlInfo; final String repeatId = repeatControlInfo.getOriginalId(); final List repeatNodeSet = xformsControls.getCurrentNodeset(); if (foundControl == null) { // We are not yet inside a matching xforms:repeat if (repeatNodeSet != null && repeatNodeSet.size() > 0) { // Find whether one node of the repeat node-set contains the inserted node for (Iterator i = repeatNodeSet.iterator(); i.hasNext();) { final Element currentNode = (Element) i.next(); if (currentNode == elementToRemove) { // Found xforms:repeat affected by the change final int newIndex; if (repeatNodeSet.size() == 1) { // Delete the last element of the collection: the index must be set to 0 newIndex = 0; reinitializeInner = false; } else { // Current index for this repeat final int currentIndex = ((Integer) previousRepeatIdToIndex.get(repeatId)).intValue(); // Index of deleted element for this repeat final int deletionIndexInRepeat = repeatNodeSet.indexOf(elementToRemove) + 1; if (currentIndex == deletionIndexInRepeat) { if (deletionIndexInRepeat == repeatNodeSet.size()) { // o "When the last remaining item in the collection is removed, // the index position becomes 0." // o "When the index was pointing to the deleted node, which was // the last item in the collection, the index will point to the new // last node of the collection and the index of inner repeats is // reinitialized." newIndex = currentIndex - 1; reinitializeInner = true; } else { // o "When the index was pointing to the deleted node, which was // not the last item in the collection, the index position is not // changed and the index of inner repeats is re-initialized." newIndex = currentIndex; reinitializeInner = true; } } else { // "The index should point to the same node // after a delete as it did before the delete" if (currentIndex < deletionIndexInRepeat) { newIndex = currentIndex; } else { newIndex = currentIndex - 1; } reinitializeInner = false; } } repeatIndexUpdates.put(repeatId, new Integer(newIndex)); // Handle children if (reinitializeInner) { // First step: set all children indexes to 0 final List nestedRepeatIds = xformsControls.getCurrentControlsState().getNestedRepeatIds(xformsControls, repeatId); if (nestedRepeatIds != null) { for (Iterator j = nestedRepeatIds.iterator(); j.hasNext();) { final String nestedRepeatId = (String) j.next(); repeatIndexUpdates.put(nestedRepeatId, new Integer(0)); nestedRepeatIndexUpdates.put(nestedRepeatId, ""); } } } foundControl = controlInfo; break; } } } } } } public void endVisitControl(XFormsControls.ControlInfo controlInfo) { if (controlInfo instanceof XFormsControls.RepeatControlInfo) { if (foundControl == controlInfo) foundControl = null; } } }); // Then only perform the deletion siblingElements.remove(actualIndexInCollection); // Update affected repeat index information if (repeatIndexUpdates.size() > 0) { for (Iterator i = repeatIndexUpdates.entrySet().iterator(); i.hasNext();) { final Map.Entry currentEntry = (Map.Entry) i.next(); xformsControls.getCurrentControlsState().updateRepeatIndex((String) currentEntry.getKey(), ((Integer) currentEntry.getValue()).intValue()); } } // Rebuild ControlsState xformsControls.rebuildCurrentControlsState(pipelineContext); // Handle children - second step xformsControls.getCurrentControlsState().visitControlInfoFollowRepeats(pipelineContext, xformsControls, new XFormsControls.ControlInfoVisitorListener() { public void startVisitControl(XFormsControls.ControlInfo controlInfo) { if (controlInfo instanceof XFormsControls.RepeatControlInfo) { // Found an xforms:repeat final XFormsControls.RepeatControlInfo repeatControlInfo = (XFormsControls.RepeatControlInfo) controlInfo; final String repeatId = repeatControlInfo.getOriginalId(); if (nestedRepeatIndexUpdates.get(repeatId) != null) { // Found nested repeat id to update final List repeatNodeSet = xformsControls.getCurrentNodeset(); if (repeatNodeSet != null && repeatNodeSet.size() > 0) { int newIndex = repeatControlInfo.getStartIndex(); if (newIndex < 1) newIndex = 1; if (newIndex > repeatNodeSet.size()) newIndex = repeatNodeSet.size(); xformsControls.getCurrentControlsState().updateRepeatIndex(repeatId, newIndex); //currentControlsState.updateRepeatIndex(repeatId, 1); // NOTE: XForms 1.0 2nd edition actually says "To re-initialize // a repeat means to change the index to 0 if it is empty, // otherwise 1." However, for, xforms:insert, we are supposed to // update to startindex. Here, for now, we decide to use // startindex for consistency. } } } } public void endVisitControl(XFormsControls.ControlInfo controlInfo) { } }); // Adjust controls ids that could have gone out of bounds adjustRepeatIndexes(pipelineContext, xformsControls); // "4. If the delete is successful, the event xforms-delete is dispatched." containingDocument.dispatchEvent(pipelineContext, new XFormsDeleteEvent(currentInstance, atAttribute)); if (actionContext != null) { // "XForms Actions that change the tree structure of instance data result in setting all four flags to true" actionContext.setAll(true); } else { // Binding context has to be reset as the controls have been updated setBindingContext(pipelineContext, eventHandlerContainer.getId(), actionElement); final XFormsModel model = xformsControls.getCurrentModel(); // Send events directly containingDocument.dispatchEvent(pipelineContext, new XFormsRebuildEvent(model)); containingDocument.dispatchEvent(pipelineContext, new XFormsRecalculateEvent(model, true)); containingDocument.dispatchEvent(pipelineContext, new XFormsRevalidateEvent(model, true)); containingDocument.dispatchEvent(pipelineContext, new XFormsRefreshEvent(model)); } } } else if (XFormsActions.XFORMS_SETINDEX_ACTION.equals(actionEventName)) { // 9.3.7 The setindex Element final String repeatId = actionElement.attributeValue("repeat"); final String indexXPath = actionElement.attributeValue("index"); final XFormsInstance currentInstance = xformsControls.getCurrentInstance(); final String indexString = currentInstance.evaluateXPathAsString(pipelineContext, xformsControls.getCurrentNodeset(), xformsControls.getCurrentPosition(), "string(number(" + indexXPath + "))", Dom4jUtils.getNamespaceContextNoDefault(actionElement), null, xformsControls.getFunctionLibrary(), null); executeSetindexAction(pipelineContext, containingDocument, repeatId, indexString); } else if (XFormsActions.XFORMS_SEND_ACTION.equals(actionEventName)) { // 10.1.10 The send Element // Find submission object final String submissionId = actionElement.attributeValue("submission"); if (submissionId == null) throw new OXFException("Missing mandatory submission attribute on xforms:send element."); final Object submission = containingDocument.getObjectById(pipelineContext, submissionId); if (submission == null || !(submission instanceof XFormsModelSubmission)) throw new OXFException("submission attribute on xforms:send element does not refer to existing xforms:submission element."); // Dispatch event to submission object containingDocument.dispatchEvent(pipelineContext, new XFormsSubmitEvent((XFormsEventTarget) submission)); } else if (XFormsActions.XFORMS_DISPATCH_ACTION.equals(actionEventName)) { // 10.1.2 The dispatch Element // Mandatory attributes final String newEventName = actionElement.attributeValue("name"); if (newEventName == null) throw new OXFException("Missing mandatory name attribute on xforms:dispatch element."); final String newEventTargetId = actionElement.attributeValue("target"); if (newEventTargetId == null) throw new OXFException("Missing mandatory target attribute on xforms:dispatch element."); // Optional attributes final boolean newEventBubbles; { final String newEventBubblesString = actionElement.attributeValue("bubbles"); // "The default value depends on the definition of a custom event. For predefined events, this attribute has no effect." // The event factory makes sure that those values are ignored for predefined events newEventBubbles = Boolean.valueOf((newEventBubblesString == null) ? "true" : newEventBubblesString).booleanValue(); } final boolean newEventCancelable; { // "The default value depends on the definition of a custom event. For predefined events, this attribute has no effect." // The event factory makes sure that those values are ignored for predefined events final String newEventCancelableString = actionElement.attributeValue("cancelable"); newEventCancelable = Boolean.valueOf((newEventCancelableString == null) ? "true" : newEventCancelableString).booleanValue(); } // Find actual target final String newEventTargetEffectiveId = xformsControls.getCurrentControlsState().findEffectiveControlId(newEventTargetId); if (newEventTargetEffectiveId == null) throw new OXFException("Could not find actual event target on xforms:dispatch element for id: " + newEventTargetId); final Object newTargetObject = containingDocument.getObjectById(pipelineContext, newEventTargetEffectiveId); if (newTargetObject instanceof XFormsEventTarget) { // This can be anything containingDocument.dispatchEvent(pipelineContext, XFormsEventFactory.createEvent(newEventName, (XFormsEventTarget) newTargetObject, newEventBubbles, newEventCancelable)); } else { throw new OXFException("Invalid event target for id: " + newEventTargetId); } } else if (XFormsActions.XFORMS_MESSAGE_ACTION.equals(actionEventName)) { // 10.1.12 The message Element final String level; { final String levelAttribute = actionElement.attributeValue("level");; if (levelAttribute == null) throw new OXFException("xforms:message element is missing mandatory 'level' attribute."); final QName levelQName = Dom4jUtils.extractAttributeValueQName(actionElement, "level"); if (levelQName.getNamespacePrefix().equals("")) { if (!("ephemeral".equals(levelAttribute) || "modeless".equals(levelAttribute) || "modal".equals(levelAttribute))) { throw new OXFException("xforms:message element's 'level' attribute must have value: 'ephemeral'|'modeless'|'modal'|QName-but-not-NCName."); } level = levelAttribute; } else { level = "{" + levelQName.getNamespaceURI() + "}" + levelQName.getName(); } } final String src = actionElement.attributeValue("src"); final String ref = actionElement.attributeValue("ref"); String message = null; // Try to get message from single-node binding if any if (ref != null) { final Node currentNode = xformsControls.getCurrentSingleNode(); if (currentNode != null) message = XFormsInstance.getValueForNode(currentNode); } // Try to get message from linking attribute boolean linkException = false; if (message == null && src != null) { try { message = XFormsUtils.retrieveSrcValue(src); } catch (IOException e) { containingDocument.dispatchEvent(pipelineContext, new XFormsLinkErrorEvent(xformsControls.getCurrentModel(), src, null, e)); linkException = true; } } if (!linkException) { // Try to get inline message if (message == null) { message = actionElement.getStringValue(); } if (message != null) { // Store message for sending to client containingDocument.addClientMessage(message, level); // NOTE: In the future, we *may* want to save and resume the event state before and // after displaying a message, in order to possibly provide a behavior which is more // consistent with what users may expect regarding actions executed after // xforms:message. } } } else if (XFormsActions.XFORMS_SETFOCUS_ACTION.equals(actionEventName)) { // 10.1.7 The setfocus Element final String controlId = actionElement.attributeValue("control"); if (controlId == null) throw new OXFException("Missing mandatory 'control' attribute on xforms:control element."); final String effectiveControlId = xformsControls.getCurrentControlsState().findEffectiveControlId(controlId); if (effectiveControlId == null) throw new OXFException("Could not find actual control on xforms:setfocus element for control: " + controlId); final Object controlObject = containingDocument.getObjectById(pipelineContext, effectiveControlId); if (!(controlObject instanceof XFormsControls.ControlInfo)) throw new OXFException("xforms:setfocus attribute 'control' must refer to a control: " + controlId); containingDocument.dispatchEvent(pipelineContext, new XFormsFocusEvent((XFormsEventTarget) controlObject)); } else if (XFormsActions.XFORMS_LOAD_ACTION.equals(actionEventName)) { // 10.1.8 The load Element final String ref = actionElement.attributeValue("ref"); final String resource = actionElement.attributeValue("resource"); final String showAttribute; { final String rawShowAttribute = actionElement.attributeValue("show"); showAttribute = (rawShowAttribute == null) ? "replace" : rawShowAttribute; if (!("replace".equals(showAttribute) || "new".equals(showAttribute))) throw new OXFException("Invalid value for 'show' attribute on xforms:load element: " + showAttribute); } final boolean doReplace = "replace".equals(showAttribute); final String target = actionElement.attributeValue(XFormsConstants.XXFORMS_TARGET_QNAME); if (ref != null && resource != null) { // "If both are present, the action has no effect." // NOP } else if (ref != null) { // Use single-node binding final Node currentNode = xformsControls.getCurrentSingleNode(); if (currentNode != null) { final String value = XFormsInstance.getValueForNode(currentNode); resolveLoadValue(containingDocument, pipelineContext, actionElement, doReplace, value, target); } else { // Should we do this here? containingDocument.dispatchEvent(pipelineContext, new XFormsLinkErrorEvent(xformsControls.getCurrentModel(), "", null, null)); } // NOTE: We are supposed to throw an xforms-link-error in case of failure. Can we do it? } else if (resource != null) { // Use linking attribute resolveLoadValue(containingDocument, pipelineContext, actionElement, doReplace, resource, target); // NOTE: We are supposed to throw an xforms-link-error in case of failure. Can we do it? } else { // "Either the single node binding attributes, pointing to a URI in the instance // data, or the linking attributes are required." throw new OXFException("Missing 'resource' or 'ref' attribute on xforms:load element."); } } else { throw new OXFException("Invalid action requested: " + actionEventName); } } | 54445 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54445/fedf9c6e89ac7805c8f9d6c2e0a7c44094259d0f/XFormsActionInterpreter.java/clean/src/java/org/orbeon/oxf/xforms/action/XFormsActionInterpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1803,
12,
6385,
13671,
1042,
5873,
1042,
16,
514,
27729,
16,
1139,
18529,
16402,
2170,
30441,
2170,
16,
3010,
1301,
1046,
16,
4382,
1042,
1301,
1042,
13,
288,
3639,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
1803,
12,
6385,
13671,
1042,
5873,
1042,
16,
514,
27729,
16,
1139,
18529,
16402,
2170,
30441,
2170,
16,
3010,
1301,
1046,
16,
4382,
1042,
1301,
1042,
13,
288,
3639,
368,
... | |
item = ((CPElement)item).getParent(); | item = ((CPElement) item).getParent(); | private CPElementGroup getSelectedGroup() { List selected = fIncludeSymPathsList.getSelectedElements(); if (!selected.isEmpty()) { Object item = selected.get(0); if (item instanceof CPElement) { item = ((CPElement)item).getParent(); } if (item instanceof CPElementGroup) { return (CPElementGroup)item; } } return null; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/948279d05523860240b0b395f826ad17e53e390c/CPathIncludeSymbolEntryPage.java/buggy/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
5181,
1046,
1114,
16625,
1114,
1435,
288,
202,
202,
682,
3170,
273,
284,
8752,
11901,
4466,
682,
18,
588,
7416,
3471,
5621,
202,
202,
430,
16051,
8109,
18,
291,
1921,
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,
225,
202,
1152,
5181,
1046,
1114,
16625,
1114,
1435,
288,
202,
202,
682,
3170,
273,
284,
8752,
11901,
4466,
682,
18,
588,
7416,
3471,
5621,
202,
202,
430,
16051,
8109,
18,
291,
1921,
10756,
28... |
if ((p=project.getProperty("ant.netrexxc.suppressDeprecation"))!=null) { this.suppressDeprecation=Project.toBoolean(p); | if ((p = project.getProperty("ant.netrexxc.suppressDeprecation")) != null) { this.suppressDeprecation = Project.toBoolean(p); | public void init() { String p; if ((p=project.getProperty("ant.netrexxc.binary"))!=null) { this.binary=Project.toBoolean(p); } // classpath makes no sense if ((p=project.getProperty("ant.netrexxc.comments"))!=null) { this.comments=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.compact"))!=null) { this.compact=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.compile"))!=null) { this.compile=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.console"))!=null) { this.console=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.crossref"))!=null) { this.crossref=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.decimal"))!=null) { this.decimal=Project.toBoolean(p); // destDir } if ((p=project.getProperty("ant.netrexxc.diag"))!=null) { this.diag=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.explicit"))!=null) { this.explicit=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.format"))!=null) { this.format=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.java"))!=null) { this.java=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.keep"))!=null) { this.keep=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.logo"))!=null) { this.logo=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.replace"))!=null) { this.replace=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.savelog"))!=null) { this.savelog=Project.toBoolean(p); // srcDir } if ((p=project.getProperty("ant.netrexxc.sourcedir"))!=null) { this.sourcedir=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.strictargs"))!=null) { this.strictargs=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.strictassign"))!=null) { this.strictassign=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.strictcase"))!=null) { this.strictcase=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.strictimport"))!=null) { this.strictimport=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.strictprops"))!=null) { this.strictprops=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.strictsignal"))!=null) { this.strictsignal=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.symbols"))!=null) { this.symbols=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.time"))!=null) { this.time=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.trace"))!=null) { setTrace(p); } if ((p=project.getProperty("ant.netrexxc.utf8"))!=null) { this.utf8=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.verbose"))!=null) { setVerbose(p); } if ((p=project.getProperty("ant.netrexxc.suppressMethodArgumentNotUsed"))!=null) { this.suppressMethodArgumentNotUsed=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.suppressPrivatePropertyNotUsed"))!=null) { this.suppressPrivatePropertyNotUsed=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.suppressVariableNotUsed"))!=null) { this.suppressVariableNotUsed=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.suppressExceptionNotSignalled"))!=null) { this.suppressExceptionNotSignalled=Project.toBoolean(p); } if ((p=project.getProperty("ant.netrexxc.suppressDeprecation"))!=null) { this.suppressDeprecation=Project.toBoolean(p); } } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/c7b5b643b25b20f5c96097b2c54e2e26a054f212/NetRexxC.java/buggy/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
1435,
288,
3639,
514,
293,
31,
3639,
309,
14015,
84,
33,
4406,
18,
588,
1396,
2932,
970,
18,
2758,
266,
5279,
71,
18,
8578,
6,
3719,
5,
33,
2011,
13,
288,
5411,
333,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
1435,
288,
3639,
514,
293,
31,
3639,
309,
14015,
84,
33,
4406,
18,
588,
1396,
2932,
970,
18,
2758,
266,
5279,
71,
18,
8578,
6,
3719,
5,
33,
2011,
13,
288,
5411,
333,
... |
MutableTreeNode node = tree.treeAgent.createNewNode(name, 0); tree.treeAgent.addContainerNode((AgentTree.ContainerNode)node,"FIPACONTAINER",addr); | tree.treeAgent.addContainerNode(name, addr); | public void addContainer(final String name, final InetAddress addr) { Runnable addIt = new Runnable() { public void run() { MutableTreeNode node = tree.treeAgent.createNewNode(name, 0); tree.treeAgent.addContainerNode((AgentTree.ContainerNode)node,"FIPACONTAINER",addr); containerNames.add(name); manageDlg.setData(containerNames, addresses); } }; SwingUtilities.invokeLater(addIt); } | 5505 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5505/85403d3055632c199ddf5bc8ab1884237c9ca7e0/MainWindow.java/buggy/src/jade/tools/rma/MainWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
527,
2170,
12,
6385,
514,
508,
16,
727,
14218,
3091,
13,
288,
565,
10254,
527,
7193,
273,
394,
10254,
1435,
288,
1377,
1071,
918,
1086,
1435,
288,
3639,
10960,
12513,
756,
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,
282,
1071,
918,
527,
2170,
12,
6385,
514,
508,
16,
727,
14218,
3091,
13,
288,
565,
10254,
527,
7193,
273,
394,
10254,
1435,
288,
1377,
1071,
918,
1086,
1435,
288,
3639,
10960,
12513,
756,
273,... |
private void createFontList(Composite firstColumn) { Font font = firstColumn.getFont(); Composite parent = new Composite(firstColumn, SWT.NULL); GridLayout layout = new GridLayout(); layout.marginWidth = 0; layout.marginHeight = 0; parent.setLayout(layout); GridData data = new GridData(GridData.FILL_BOTH); data.grabExcessHorizontalSpace = true; parent.setLayoutData(data); Label label = new Label(parent, SWT.LEFT); label.setText(WorkbenchMessages.getString("FontsPreference.fonts")); //$NON-NLS-1$ label.setFont(font); fontList = new List(parent, SWT.BORDER); data = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_BOTH); data.grabExcessHorizontalSpace = true; fontList.setLayoutData(data); fontList.setFont(font); fontList.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { String selectedFontId = getSelectedFontId(); if (selectedFontId == null){ changeFontButton.setEnabled(false); useDefaultsButton.setEnabled(false); } else{ changeFontButton.setEnabled(true); useDefaultsButton.setEnabled(true); updateForFont((FontData[]) idsToFontData.get(selectedFontId)); } } }); Set names = namesToIds.keySet(); int nameSize = names.size(); String[] unsortedItems = new String[nameSize]; names.toArray(unsortedItems); Sorter sorter = new Sorter() { private Collator collator = Collator.getInstance(); public boolean compare(Object o1, Object o2) { String s1 = (String) o1; String s2 = (String) o2; return collator.compare(s1, s2) < 0; } }; Object[] sortedItems = sorter.sort(unsortedItems); String[] listItems = new String[nameSize]; System.arraycopy(sortedItems, 0, listItems, 0, nameSize); fontList.setItems(listItems); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/1bba6e68027322eb4457204fdeda19454e06701c/FontPreferencePage.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FontPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
5711,
682,
12,
9400,
1122,
1494,
13,
288,
9506,
202,
5711,
3512,
273,
1122,
1494,
18,
588,
5711,
5621,
9506,
202,
9400,
982,
273,
394,
14728,
12,
3645,
1494,
16,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5711,
682,
12,
9400,
1122,
1494,
13,
288,
9506,
202,
5711,
3512,
273,
1122,
1494,
18,
588,
5711,
5621,
9506,
202,
9400,
982,
273,
394,
14728,
12,
3645,
1494,
16,
34... | ||
assertTrue("the property value returned for keyTest was not correct", Security.getProperty("keyTest").equals( "permission to set property")); | assertEquals("the property value returned for keyTest was not correct", "permission to set property", Security.getProperty("keyTest")); | public void test_setPropertyLjava_lang_StringLjava_lang_String() { // Test for method void // java.security.Security.setProperty(java.lang.String, // java.lang.String) Security.setProperty("keyTest", "permission to set property"); assertTrue("the property value returned for keyTest was not correct", Security.getProperty("keyTest").equals( "permission to set property")); } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/6ea88de4900c210afcf8547ad5a91899abec9801/SecurityTest.java/clean/modules/security/src/test/java/common/tests/api/java/security/SecurityTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
67,
542,
1396,
21159,
67,
4936,
67,
780,
21159,
67,
4936,
67,
780,
1435,
288,
202,
202,
759,
7766,
364,
707,
918,
202,
202,
759,
2252,
18,
7462,
18,
4368,
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,
482,
918,
1842,
67,
542,
1396,
21159,
67,
4936,
67,
780,
21159,
67,
4936,
67,
780,
1435,
288,
202,
202,
759,
7766,
364,
707,
918,
202,
202,
759,
2252,
18,
7462,
18,
4368,
18,
542... |
message = new String(data); | messageString = new String(data); | public boolean read(ByteBuffer buffer) throws MessageParseException { for (;;) { try { if (state == SEEKING_HEADER) { if (buffer.remaining() < headerBytes.length) { break; } // TODO PERFORMANCE this can be optimized in recognizer messageStartPosition = indexOf(buffer, buffer.position(), headerBytes); if (messageStartPosition == -1) { throw new MessageParseException("inconsistent header recognization" + " between message recognizer and parser"); } log.debug("found header"); position = messageStartPosition + headerBytes.length; state = PARSING_LENGTH; } if (state == PARSING_LENGTH) { if (position >= buffer.limit()) { break; } bodyLength = 0; byte ch = buffer.get(position++); while (Character.isDigit((char) ch)) { bodyLength = bodyLength * 10 + (ch - '0'); if (position < buffer.limit()) { ch = buffer.get(position++); } else { break; } } if (position >= buffer.limit()) { break; } if (ch != '\001') { handleError(buffer, "Error in message length", false); break; } bodyStartPosition = position; state = READING_BODY; log.debug("reading body, length = " + bodyLength); } if (state == READING_BODY) { if ((buffer.limit() - position) < bodyLength) { break; } position += bodyLength; state = PARSING_CHECKSUM; } if (state == PARSING_CHECKSUM) { if (startsWith(buffer, position, checksumBytes)) { log.debug("parsing checksum"); position += checksumBytes.length; } else { if (position + checksumBytes.length < buffer.limit()) { handleError(buffer, "did not find checksum field, bad length?", isLogon(buffer, messageStartPosition)); if (buffer.remaining() > 0) { continue; } else { break; } } else { break; } } byte[] data = new byte[position - messageStartPosition]; buffer.position(messageStartPosition); buffer.get(data); message = new String(data); if (log.isTraceEnabled()) { log.trace("extracted message: " + message + ", remaining=" + buffer.remaining()); } return true; } } catch (Throwable t) { state = SEEKING_HEADER; throw new MessageParseException(t); } } return false; } | 52211 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52211/3e49a041b7e90f63143c57eb6023671affc3fd0c/FIXMessageData.java/clean/src/quickfix/netty/FIXMessageData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
855,
12,
12242,
1613,
13,
1216,
2350,
13047,
288,
3639,
364,
261,
25708,
13,
288,
5411,
775,
288,
7734,
309,
261,
2019,
422,
19201,
1360,
67,
7557,
13,
288,
10792,
309,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
855,
12,
12242,
1613,
13,
1216,
2350,
13047,
288,
3639,
364,
261,
25708,
13,
288,
5411,
775,
288,
7734,
309,
261,
2019,
422,
19201,
1360,
67,
7557,
13,
288,
10792,
309,
261,
... |
.newInstance(); | .newInstance(); | private static void buildParseTree() { try { String name="/grendel/renderer/tools"; // Get a File object for the package String s=Renderer.class.getResource(name).getFile(); s=s.replace("%20", " "); File directory=new File(s); System.out.println("dir: "+directory.toString()); if (directory.exists()) { // Get the list of the files contained in the package String[] files=directory.list(); for (int i=0; i<files.length; i++) { // we are only interested in .class files if (files[i].endsWith(".class")) { // removes the .class extension String classname=files[i].substring(0, files[i].length()-6); try { // Try to create an instance of the object Object o=Class.forName("grendel.renderer.tools."+classname) .newInstance(); if (o instanceof ObjectRender) { ObjectRender or=(ObjectRender) o; renderers.put(or.acceptable(), or); } } catch (ClassNotFoundException cnfex) { System.err.println(cnfex); } catch (InstantiationException iex) { // We try to instantiate an interface // or an object that does not have a // default constructor } catch (IllegalAccessException iaex) { // The class is not public } } } } } catch (Exception e) { e.printStackTrace(); } } | 13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/b13c667b376deb4a8f2c235ffd847b57616d23c4/Renderer.java/buggy/grendel/sources/grendel/renderer/Renderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
1361,
3201,
2471,
1435,
225,
288,
565,
775,
288,
1377,
514,
508,
1546,
19,
75,
1187,
3771,
19,
14374,
19,
6642,
14432,
1377,
368,
968,
279,
1387,
733,
364,
326,
2181,
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,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
1361,
3201,
2471,
1435,
225,
288,
565,
775,
288,
1377,
514,
508,
1546,
19,
75,
1187,
3771,
19,
14374,
19,
6642,
14432,
1377,
368,
968,
279,
1387,
733,
364,
326,
2181,
13... |
f[0] = new Field(connection, "TYPE_NAME", iVarcharOid, NAME_SIZE); f[1] = new Field(connection, "DATA_TYPE", iInt2Oid, 2); f[2] = new Field(connection, "PRECISION", iInt4Oid, 4); f[3] = new Field(connection, "LITERAL_PREFIX", iVarcharOid, NAME_SIZE); f[4] = new Field(connection, "LITERAL_SUFFIX", iVarcharOid, NAME_SIZE); f[5] = new Field(connection, "CREATE_PARAMS", iVarcharOid, NAME_SIZE); f[6] = new Field(connection, "NULLABLE", iInt2Oid, 2); f[7] = new Field(connection, "CASE_SENSITIVE", iBoolOid, 1); f[8] = new Field(connection, "SEARCHABLE", iInt2Oid, 2); f[9] = new Field(connection, "UNSIGNED_ATTRIBUTE", iBoolOid, 1); f[10] = new Field(connection, "FIXED_PREC_SCALE", iBoolOid, 1); f[11] = new Field(connection, "AUTO_INCREMENT", iBoolOid, 1); f[12] = new Field(connection, "LOCAL_TYPE_NAME", iVarcharOid, NAME_SIZE); f[13] = new Field(connection, "MINIMUM_SCALE", iInt2Oid, 2); f[14] = new Field(connection, "MAXIMUM_SCALE", iInt2Oid, 2); f[15] = new Field(connection, "SQL_DATA_TYPE", iInt4Oid, 4); f[16] = new Field(connection, "SQL_DATETIME_SUB", iInt4Oid, 4); f[17] = new Field(connection, "NUM_PREC_RADIX", iInt4Oid, 4); | Field f[] = new Field[18]; ResultSet r; Vector v = new Vector(); | public java.sql.ResultSet getTypeInfo() throws SQLException { java.sql.ResultSet rs = connection.ExecSQL("select typname from pg_type"); if (rs != null) { Field f[] = new Field[18]; ResultSet r; // ResultSet for the SQL query that we need to do Vector v = new Vector(); // The new ResultSet tuple stuff f[0] = new Field(connection, "TYPE_NAME", iVarcharOid, NAME_SIZE); f[1] = new Field(connection, "DATA_TYPE", iInt2Oid, 2); f[2] = new Field(connection, "PRECISION", iInt4Oid, 4); f[3] = new Field(connection, "LITERAL_PREFIX", iVarcharOid, NAME_SIZE); f[4] = new Field(connection, "LITERAL_SUFFIX", iVarcharOid, NAME_SIZE); f[5] = new Field(connection, "CREATE_PARAMS", iVarcharOid, NAME_SIZE); f[6] = new Field(connection, "NULLABLE", iInt2Oid, 2); f[7] = new Field(connection, "CASE_SENSITIVE", iBoolOid, 1); f[8] = new Field(connection, "SEARCHABLE", iInt2Oid, 2); f[9] = new Field(connection, "UNSIGNED_ATTRIBUTE", iBoolOid, 1); f[10] = new Field(connection, "FIXED_PREC_SCALE", iBoolOid, 1); f[11] = new Field(connection, "AUTO_INCREMENT", iBoolOid, 1); f[12] = new Field(connection, "LOCAL_TYPE_NAME", iVarcharOid, NAME_SIZE); f[13] = new Field(connection, "MINIMUM_SCALE", iInt2Oid, 2); f[14] = new Field(connection, "MAXIMUM_SCALE", iInt2Oid, 2); f[15] = new Field(connection, "SQL_DATA_TYPE", iInt4Oid, 4); f[16] = new Field(connection, "SQL_DATETIME_SUB", iInt4Oid, 4); f[17] = new Field(connection, "NUM_PREC_RADIX", iInt4Oid, 4); // cache some results, this will keep memory useage down, and speed // things up a little. byte b9[] = "9".getBytes(); byte b10[] = "10".getBytes(); byte bf[] = "f".getBytes(); byte bnn[] = Integer.toString(java.sql.DatabaseMetaData.typeNoNulls).getBytes(); byte bts[] = Integer.toString(java.sql.DatabaseMetaData.typeSearchable).getBytes(); while (rs.next()) { byte[][] tuple = new byte[18][]; String typname = rs.getString(1); tuple[0] = typname.getBytes(); tuple[1] = Integer.toString(connection.getSQLType(typname)).getBytes(); tuple[2] = b9; // for now tuple[6] = bnn; // for now tuple[7] = bf; // false for now - not case sensitive tuple[8] = bts; tuple[9] = bf; // false for now - it's signed tuple[10] = bf; // false for now - must handle money tuple[11] = bf; // false for now - handle autoincrement // 12 - LOCAL_TYPE_NAME is null // 13 & 14 ? // 15 & 16 are unused so we return null tuple[17] = b10; // everything is base 10 v.addElement(tuple); } rs.close(); return connection.getResultSet(null, f, v, "OK", 1); } throw new PSQLException("postgresql.metadata.unavailable"); } | 45534 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45534/7c553901d7ab010ad1cb5bf44f9ca2fdae83909a/AbstractJdbc1DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
3130,
966,
1435,
1216,
6483,
202,
95,
202,
202,
6290,
18,
4669,
18,
13198,
3597,
273,
1459,
18,
1905,
3997,
2932,
4025,
3815,
529,
628,
7184,
67,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2252,
18,
4669,
18,
13198,
3130,
966,
1435,
1216,
6483,
202,
95,
202,
202,
6290,
18,
4669,
18,
13198,
3597,
273,
1459,
18,
1905,
3997,
2932,
4025,
3815,
529,
628,
7184,
67,
72... |
digester.addCallMethod("employee", "setActive", 1, new Class[] {Boolean.class}); | digester.addCallMethod("employee", "setActive", 1, new Class[] {boolean.class}); | public void testCallMethod2() throws Exception { //I was preparing this test case to fix another bug // i'll uncomment it once i've fixed it // Configure the digester as required digester.addObjectCreate("employee", Employee.class); // try all syntax permutations digester.addCallMethod("employee", "setLastName", 1, new String[] {"java.lang.String"}); digester.addCallParam("employee/lastName", 0); // Parse our test input Object root1 = null; try { // an exception will be thrown if the method can't be found root1 = digester.parse(getInputStream("Test5.xml")); Employee employee = (Employee) root1; assertEquals("Failed to call Employee.setLastName", "Last Name", employee.getLastName()); } catch (Throwable t) { // this means that the method can't be found and so the test fails fail("Digester threw Exception: " + t); } digester = new Digester(); // Configure the digester as required digester.addObjectCreate("employee", Employee.class); // try out primitive convertion digester.addCallMethod("employee", "setAge", 1, new Class[] {Integer.class}); digester.addCallParam("employee/age", 0); // Parse our test input root1 = null; try { // an exception will be thrown if the method can't be found root1 = digester.parse(getInputStream("Test5.xml")); Employee employee = (Employee) root1; assertEquals("Failed to call Employee.setAge", 21, employee.getAge()); } catch (Throwable t) { // this means that the method can't be found and so the test fails fail("Digester threw Exception: " + t); } digester = new Digester(); // Configure the digester as required digester.addObjectCreate("employee", Employee.class); digester.addCallMethod("employee", "setActive", 1, new Class[] {Boolean.class}); digester.addCallParam("employee/active", 0); // Parse our test input root1 = null; try { // an exception will be thrown if the method can't be found root1 = digester.parse(getInputStream("Test5.xml")); Employee employee = (Employee) root1; assertEquals("Failed to call Employee.setActive", true, employee.isActive()); } catch (Throwable t) { // this means that the method can't be found and so the test fails fail("Digester threw Exception: " + t); } digester = new Digester(); // Configure the digester as required digester.addObjectCreate("employee", Employee.class); digester.addCallMethod("employee", "setSalary", 1, new Class[] {Float.class}); digester.addCallParam("employee/salary", 0); // Parse our test input root1 = null; try { // an exception will be thrown if the method can't be found root1 = digester.parse(getInputStream("Test5.xml")); Employee employee = (Employee) root1; assertEquals("Failed to call Employee.setSalary", 1000000.0f, employee.getSalary(), 0.1f); } catch (Throwable t) { // this means that the method can't be found and so the test fails fail("Digester threw Exception: " + t); } } | 53914 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53914/1c50b2e36b906ab55e88861cd7796fe9b8c1b4ee/RuleTestCase.java/buggy/src/test/org/apache/commons/digester/RuleTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1477,
1305,
22,
1435,
1216,
1185,
288,
7734,
368,
45,
1703,
675,
12583,
333,
1842,
648,
358,
2917,
4042,
7934,
3639,
368,
565,
277,
5614,
12704,
475,
518,
3647,
277,
8081... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1477,
1305,
22,
1435,
1216,
1185,
288,
7734,
368,
45,
1703,
675,
12583,
333,
1842,
648,
358,
2917,
4042,
7934,
3639,
368,
565,
277,
5614,
12704,
475,
518,
3647,
277,
8081... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.