rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
public org.quickfix.field.NoTrdRegTimestamps getNoTrdRegTimestamps() throws FieldNotFound { org.quickfix.field.NoTrdRegTimestamps value = new org.quickfix.field.NoTrdRegTimestamps(); | public quickfix.field.NoTrdRegTimestamps getNoTrdRegTimestamps() throws FieldNotFound { quickfix.field.NoTrdRegTimestamps value = new quickfix.field.NoTrdRegTimestamps(); | public org.quickfix.field.NoTrdRegTimestamps getNoTrdRegTimestamps() throws FieldNotFound { org.quickfix.field.NoTrdRegTimestamps value = new org.quickfix.field.NoTrdRegTimestamps(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/TradeCaptureReportAck.java/buggy/src/java/src/quickfix/fix44/TradeCaptureReportAck.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
2279,
1070,
72,
1617,
23761,
336,
2279,
1070,
72,
1617,
23761,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
2279,
1070,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
2279,
1070,
72,
1617,
23761,
336,
2279,
1070,
72,
1617,
23761,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
2279,
1070,
... |
PluginVersionIdentifier version = descriptor.getVersionIdentifier(); if (version.isGreaterThan(buildInfoVersion)) { | if (!isVersionCompatible(descriptor)) { | private static void loadExtensions() throws BuildException { if (extensionTargetsLoaded) return; // Get those extensions IPluginDescriptor descriptor = ManagedBuilderCorePlugin.getDefault().getDescriptor(); // Get the version of the manifest PluginVersionIdentifier version = descriptor.getVersionIdentifier(); if (version.isGreaterThan(buildInfoVersion)) { //The version of the Plug-in is greater than what the manager thinks it understands throw new BuildException(ManagedBuilderCorePlugin.getResourceString("ManagedBuildManager.error.version.higher")); //$NON-NLS-1$ } // We can read the manifest IExtensionPoint extensionPoint = descriptor.getExtensionPoint(EXTENSION_POINT_ID); IExtension[] extensions = extensionPoint.getExtensions(); // First call the constructors for (int i = 0; i < extensions.length; ++i) { IExtension extension = extensions[i]; IConfigurationElement[] elements = extension.getConfigurationElements(); loadConfigElements(DefaultManagedConfigElement.convertArray(elements)); } // Then call resolve. Iterator toolIter = getExtensionToolMap().values().iterator(); while (toolIter.hasNext()) { try { Tool tool = (Tool)toolIter.next(); tool.resolveReferences(); } catch (Exception ex) { // TODO: log ex.printStackTrace(); } } Iterator targetIter = getExtensionTargetMap().values().iterator(); while (targetIter.hasNext()) { try { Target target = (Target)targetIter.next(); target.resolveReferences(); } catch (Exception ex) { // TODO: log ex.printStackTrace(); } } // Let's never do that again extensionTargetsLoaded = true; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/ecdbf0cd6e722adddf5f9906c55b0b0d61654bf9/ManagedBuildManager.java/clean/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
1262,
7513,
1435,
1216,
18463,
288,
202,
202,
430,
261,
6447,
9432,
8835,
13,
1082,
202,
2463,
31,
9506,
202,
759,
968,
5348,
4418,
202,
202,
45,
3773,
3187,
4950,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
1262,
7513,
1435,
1216,
18463,
288,
202,
202,
430,
261,
6447,
9432,
8835,
13,
1082,
202,
2463,
31,
9506,
202,
759,
968,
5348,
4418,
202,
202,
45,
3773,
3187,
4950,
... |
PowerPointExtractor pptExtractor = new PowerPointExtractor( contentResource.streamContent()); | contentStream = contentResource.streamContent(); PowerPointExtractor pptExtractor = new PowerPointExtractor(contentStream); | public String getContent(ContentResource contentResource) { try { PowerPointExtractor pptExtractor = new PowerPointExtractor( contentResource.streamContent()); StringBuffer sb = new StringBuffer(); sb.append(pptExtractor.getText()).append(" ").append( pptExtractor.getNotes()); return sb.toString(); } catch (Exception e) { throw new RuntimeException("Failed to read content for indexing ",e); } } | 2021 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2021/eda279bb1a62c9f63ca9d053c4d6a4fcf94463bd/PPTContentDigester.java/clean/search/search-impl/impl/src/java/org/sakaiproject/search/component/adapter/contenthosting/PPTContentDigester.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
5154,
12,
1350,
1420,
913,
1420,
13,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
13788,
2148,
10958,
293,
337,
10958,
273,
394,
23783,
2148,
10958,
12,
6862,
202,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
5154,
12,
1350,
1420,
913,
1420,
13,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
13788,
2148,
10958,
293,
337,
10958,
273,
394,
23783,
2148,
10958,
12,
6862,
202,
17... |
setEnabled(true); setToolTipText(null); | setEnabled(true); setToolTipText(null); | protected void configurePropertiesFromAction(Action action) { if (action != null) { setEnabled(action.isEnabled()); setToolTipText((String) action.getValue(Action.SHORT_DESCRIPTION)); } else { setEnabled(true); setToolTipText(null); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTextField.java/clean/core/src/classpath/javax/javax/swing/JTextField.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
5068,
2297,
1265,
1803,
12,
1803,
1301,
13,
225,
288,
565,
309,
261,
1128,
480,
446,
13,
1377,
288,
202,
542,
1526,
12,
1128,
18,
291,
1526,
10663,
202,
542,
29250,
1528,
124... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
5068,
2297,
1265,
1803,
12,
1803,
1301,
13,
225,
288,
565,
309,
261,
1128,
480,
446,
13,
1377,
288,
202,
542,
1526,
12,
1128,
18,
291,
1526,
10663,
202,
542,
29250,
1528,
124... |
/* Set table to point to this room */ table.set_room(this); | /* Set table to point to this room */ table.set_room(this); | void add_table(Table table) { log.fine("Adding table " + table.get_id()); /* Set table to point to this room */ table.set_room(this); /* Create the list if it doesn't exist yet */ if (this.tables == null) { this.tables = new ArrayList(); } this.tables.add(table); event(RoomEvent.GGZ_TABLE_UPDATE, null); } | 45800 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45800/23297b98c08218eabfb0ce50651df65538ee0abb/Room.java/buggy/java/src/ggz/client/core/Room.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
527,
67,
2121,
12,
1388,
1014,
13,
288,
202,
202,
1330,
18,
74,
558,
2932,
13962,
1014,
315,
397,
1014,
18,
588,
67,
350,
10663,
202,
202,
20308,
1000,
1014,
358,
1634,
358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
527,
67,
2121,
12,
1388,
1014,
13,
288,
202,
202,
1330,
18,
74,
558,
2932,
13962,
1014,
315,
397,
1014,
18,
588,
67,
350,
10663,
202,
202,
20308,
1000,
1014,
358,
1634,
358,
... |
return BirtResources.getString( ResourceConstants.PARAMETER_DIALOG_TITLE ); | return BirtResources .getString( ResourceConstants.PARAMETER_DIALOG_TITLE ); | public String getTitle( ) { return BirtResources.getString( ResourceConstants.PARAMETER_DIALOG_TITLE ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/6f200516dd6e313325dd2c5637ad596549bf99c5/ParameterDialogFragment.java/clean/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/presentation/aggregation/dialog/ParameterDialogFragment.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
10786,
12,
262,
202,
95,
202,
202,
2463,
605,
2714,
3805,
18,
588,
780,
12,
2591,
2918,
18,
9819,
67,
2565,
18683,
67,
14123,
11272,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
514,
10786,
12,
262,
202,
95,
202,
202,
2463,
605,
2714,
3805,
18,
588,
780,
12,
2591,
2918,
18,
9819,
67,
2565,
18683,
67,
14123,
11272,
202,
97,
2,
-100,
-100,
-100,
-100,
... |
if (extension != null) { | if ( extension != null && uri.indexOf( "." + extension + '?') == -1 ) { | public String getUriFromActionMapping(ActionMapping mapping) { StringBuffer uri = new StringBuffer(); uri.append(mapping.getNamespace()); if(!"/".equals(mapping.getNamespace())) { uri.append("/"); } uri.append(mapping.getName()); if (null != mapping.getMethod() && !"".equals(mapping.getMethod())) { uri.append("!").append(mapping.getMethod()); } String extension = getDefaultExtension(); if (extension != null) { uri.append(".").append(extension); } return uri.toString(); } | 22725 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/22725/3eb8df091004f081e71592ce3b01549611859d31/DefaultActionMapper.java/buggy/src/java/com/opensymphony/webwork/dispatcher/mapper/DefaultActionMapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
9713,
1265,
1803,
3233,
12,
1803,
3233,
2874,
13,
288,
3639,
6674,
2003,
273,
394,
6674,
5621,
3639,
2003,
18,
6923,
12,
6770,
18,
588,
3402,
10663,
3639,
309,
12,
4442,
4898,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9713,
1265,
1803,
3233,
12,
1803,
3233,
2874,
13,
288,
3639,
6674,
2003,
273,
394,
6674,
5621,
3639,
2003,
18,
6923,
12,
6770,
18,
588,
3402,
10663,
3639,
309,
12,
4442,
4898,
... |
MessageDialog.openError(Display.getDefault().getActiveShell(), "Report Download Failed", "Ensure proper repository configuration in " + TaskRepositoriesView.NAME + "."); } | ((ApplicationWindow) PlatformUI.getWorkbench().getActiveWorkbenchWindow()) .setStatus("Download of bug: " + bugzillaTask + " failed due to I/O exception"); } | public void run() { MessageDialog.openError(Display.getDefault().getActiveShell(), "Report Download Failed", "Ensure proper repository configuration in " + TaskRepositoriesView.NAME + "."); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/3bf6adb12db8a09df2fa26add6a4af4dda9ac003/BugzillaRepositoryConnector.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
918,
1086,
1435,
288,
6862,
202,
1079,
6353,
18,
3190,
668,
12,
4236,
18,
588,
1868,
7675,
588,
3896,
13220,
9334,
315,
4820,
13059,
11175,
3113,
6862,
1082,
202,
6,
12512,
533... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4697,
202,
482,
918,
1086,
1435,
288,
6862,
202,
1079,
6353,
18,
3190,
668,
12,
4236,
18,
588,
1868,
7675,
588,
3896,
13220,
9334,
315,
4820,
13059,
11175,
3113,
6862,
1082,
202,
6,
12512,
533... |
new JarOptionsDialog(MainFrame.this, MainFrame.this.getModel()).setVisible(true); | initJarOptionsDialog(); _jarOptionsDialog.setVisible(true); | public void actionPerformed(ActionEvent ae) { new SwingWorker() { public Object construct() { new JarOptionsDialog(MainFrame.this, MainFrame.this.getModel()).setVisible(true); return null; } }.start(); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/7fcdc5820c7f1c50a17a282e38bc904783e87e7f/MainFrame.java/clean/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
14221,
13,
288,
1377,
394,
26145,
6671,
1435,
288,
3639,
1071,
1033,
4872,
1435,
288,
1850,
1208,
10813,
1320,
6353,
5621,
389,
11930,
1320,
6353,
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
14221,
13,
288,
1377,
394,
26145,
6671,
1435,
288,
3639,
1071,
1033,
4872,
1435,
288,
1850,
1208,
10813,
1320,
6353,
5621,
389,
11930,
1320,
6353,
18,
542,... |
VALUE rb_str_new(String s, int len) { | RubyObject rb_str_new(String s, int len) { | VALUE rb_str_new(String s, int len) { return new RubyString(ruby, s.substring(0, len)); } | 45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/a2024bddc1b8e83f4e8075d2080935c221a833fe/parse.java/clean/org/jruby/parser/parse.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
19817,
921,
7138,
67,
701,
67,
2704,
12,
780,
272,
16,
509,
562,
13,
288,
3639,
327,
394,
19817,
780,
12,
27768,
16,
272,
18,
28023,
12,
20,
16,
562,
10019,
565,
289,
2,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
19817,
921,
7138,
67,
701,
67,
2704,
12,
780,
272,
16,
509,
562,
13,
288,
3639,
327,
394,
19817,
780,
12,
27768,
16,
272,
18,
28023,
12,
20,
16,
562,
10019,
565,
289,
2,
-100,
-100,
... |
public ExprVec checkGuardedVec(FieldDecl fd) { ExprVec g = ExprVec.make(); guardDecoration.set(fd, g); TypeSig s = TypeSig.getSig(fd.parent); Assert.precondition(s.state >= TypeSig.PREPPED); // Set up variables for entire traversal sig = s; rootSEnv = makeEnvForTypeSig(s, true); //@ nowarn Invariant rootIEnv = makeEnvForTypeSig(s, false); //@ nowarn Invariant boolean staticContext = Modifiers.isStatic(fd.modifiers); // 10/28 Env env = addGhosts(sig, staticContext ? rootSEnv : rootIEnv); TypeDecl d = s.getTypeDecl(); // Process ModifierPragmas checkModifierPragmaVec( d.pmodifiers, d, env ); super.checkModifierPragmaVec( fd.pmodifiers, fd, env ); if (rcc.Main.prg) { if (checkDuplicateExpressions(g)) { ErrorMsg.print(sig, "Modifiers", fd.getStartLoc(),"field '"+fd.id+"' has redundant guard annotations. Guards are: '" + PrettyPrint.inst.toString(g)+"'", Location.NULL); } } return g; } | 46634 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46634/da3049db1eb4330268b3c4bcabb61e7ecd42804f/FlowInsensitiveChecks.java/buggy/src/escjava/trunk/ESCTools/Rcc/java/rcc/tc/FlowInsensitiveChecks.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8074,
12991,
225,
866,
6099,
17212,
12991,
12,
974,
3456,
5194,
13,
288,
3639,
8074,
12991,
314,
273,
8074,
12991,
18,
6540,
5621,
3639,
11026,
7859,
367,
18,
542,
12,
8313,
16,
314... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8074,
12991,
225,
866,
6099,
17212,
12991,
12,
974,
3456,
5194,
13,
288,
3639,
8074,
12991,
314,
273,
8074,
12991,
18,
6540,
5621,
3639,
11026,
7859,
367,
18,
542,
12,
8313,
16,
314... | ||
name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; | String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; | public static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, NativeFunction fnOrScript, InterpreterData theData) throws JavaScriptException { if (cx.interpreterSecurityDomain != theData.securityDomain) { // If securityDomain is different, update domain in Cotext // and call self under new domain Object savedDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = theData.securityDomain; try { return interpret(cx, scope, thisObj, args, fnOrScript, theData); } finally { cx.interpreterSecurityDomain = savedDomain; } } int i; Object lhs; final int maxStack = theData.itsMaxStack; final int maxVars = (fnOrScript.argNames == null) ? 0 : fnOrScript.argNames.length; final int maxLocals = theData.itsMaxLocals; final int maxTryDepth = theData.itsMaxTryDepth; final int VAR_SHFT = maxStack; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int TRY_SCOPE_SHFT = LOCAL_SHFT + maxLocals;// stack[0 <= i < VAR_SHFT]: stack data// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_SCOPE_SHFT]: used for newtemp/usetemp// stack[TRY_SCOPE_SHFT <= i]: try scopes// when 0 <= i < LOCAL_SHFT and stack[x] == DBL_MRK,// sDbl[i] gives the number value final Object DBL_MRK = Interpreter.DBL_MRK; Object[] stack = new Object[TRY_SCOPE_SHFT + maxTryDepth]; double[] sDbl = new double[TRY_SCOPE_SHFT]; int stackTop = -1; byte[] iCode = theData.itsICode; String[] strings = theData.itsStringTable; int pc = 0; int iCodeLength = theData.itsICodeTop; final Scriptable undefined = Undefined.instance; if (maxVars != 0) { int definedArgs = fnOrScript.argCount; if (definedArgs != 0) { if (definedArgs > args.length) { definedArgs = args.length; } for (i = 0; i != definedArgs; ++i) { stack[VAR_SHFT + i] = args[i]; } } for (i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } } if (theData.itsNestedFunctions != null) { for (i = 0; i < theData.itsNestedFunctions.length; i++) createFunctionObject(theData.itsNestedFunctions[i], scope); } Object id; Object rhs, val; double valDbl; boolean valBln; int count; int slot; String name = null; Object[] outArgs; int lIntValue; double lDbl; int rIntValue; double rDbl;// tryStack[2 * i]: starting pc of catch block// tryStack[2 * i + 1]: starting pc of finally block int[] tryStack = null; int tryStackTop = 0; InterpreterFrame frame = null; if (cx.debugger != null) { frame = new InterpreterFrame(scope, theData, fnOrScript); cx.pushFrame(frame); } Object result = undefined; int pcPrevBranch = pc; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; while (pc < iCodeLength) { try { switch (iCode[pc] & 0xff) { case TokenStream.ENDTRY : tryStackTop--; break; case TokenStream.TRY : if (tryStackTop == 0) { tryStack = new int[maxTryDepth * 2]; } i = getTarget(iCode, pc + 1); if (i == pc) i = 0; tryStack[tryStackTop * 2] = i; i = getTarget(iCode, pc + 3); if (i == (pc + 2)) i = 0; tryStack[tryStackTop * 2 + 1] = i; stack[TRY_SCOPE_SHFT + tryStackTop] = scope; ++tryStackTop; pc += 4; break; case TokenStream.GE : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl <= lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.LE : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl <= rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.GT : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl < lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.LT : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl < rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.IN : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.INSTANCEOF : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); valBln = ScriptRuntime.instanceOf(scope, lhs, rhs); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.EQ : --stackTop; valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.NE : --stackTop; valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.SHEQ : --stackTop; valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.SHNE : --stackTop; valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.IFNE : val = stack[stackTop]; if (val != DBL_MRK) { valBln = !ScriptRuntime.toBoolean(val); } else { valDbl = sDbl[stackTop]; valBln = !(valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount (instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.IFEQ : val = stack[stackTop]; if (val != DBL_MRK) { valBln = ScriptRuntime.toBoolean(val); } else { valDbl = sDbl[stackTop]; valBln = (valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount (instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.GOTO : if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.GOSUB : sDbl[++stackTop] = pc + 3; if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.RETSUB : slot = (iCode[pc + 1] & 0xFF); if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = (int)sDbl[LOCAL_SHFT + slot]; continue; case TokenStream.POP : stackTop--; break; case TokenStream.DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; break; case TokenStream.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break; case TokenStream.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; pc = getTarget(iCode, pc + 1); break; case TokenStream.BITNOT : rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; break; case TokenStream.BITAND : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; break; case TokenStream.BITOR : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; break; case TokenStream.BITXOR : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; break; case TokenStream.LSH : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; break; case TokenStream.RSH : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; break; case TokenStream.URSH : rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; break; case TokenStream.ADD : --stackTop; do_add(stack, sDbl, stackTop); break; case TokenStream.SUB : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; break; case TokenStream.NEG : rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; break; case TokenStream.POS : rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; break; case TokenStream.MUL : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; break; case TokenStream.DIV : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; break; case TokenStream.MOD : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; break; case TokenStream.BINDNAME : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.bind(scope, name); pc += 2; break; case TokenStream.GETBASE : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.getBase(scope, name); pc += 2; break; case TokenStream.SETNAME : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; // what about class cast exception here for lhs? stack[stackTop] = ScriptRuntime.setName ((Scriptable)lhs, rhs, scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.DELPROP : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(lhs, rhs); break; case TokenStream.GETPROP : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; case TokenStream.SETPROP : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; case TokenStream.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; break; case TokenStream.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; break; case TokenStream.PROPINC : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrement(lhs, name, scope); break; case TokenStream.PROPDEC : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrement(lhs, name, scope); break; case TokenStream.ELEMINC : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrementElem(lhs, rhs, scope); break; case TokenStream.ELEMDEC : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrementElem(lhs, rhs, scope); break; case TokenStream.GETTHIS : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getThis((Scriptable)lhs); break; case TokenStream.NEWTEMP : slot = (iCode[++pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; break; case TokenStream.USETEMP : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; break; case TokenStream.CALLSPECIAL : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int lineNum = getShort(iCode, pc + 1); name = strings[getShort(iCode, pc + 3)]; count = getShort(iCode, pc + 5); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, lhs, rhs, outArgs, thisObj, scope, name, lineNum); pc += 6; instructionCount = cx.instructionCount; break; case TokenStream.CALL : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } cx.instructionCount = instructionCount; count = getShort(iCode, pc + 3); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); if (lhs == undefined) { i = getShort(iCode, pc + 1); if (i != -1) lhs = strings[i]; } Scriptable calleeScope = scope; if (theData.itsNeedsActivation) { calleeScope = ScriptableObject. getTopLevelScope(scope); } stack[stackTop] = ScriptRuntime.call(cx, lhs, rhs, outArgs, calleeScope); pc += 4; instructionCount = cx.instructionCount; break; case TokenStream.NEW : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } count = getShort(iCode, pc + 3); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); if (lhs == undefined && getShort(iCode, pc + 1) != -1) { // special code for better error message for call // to undefined lhs = strings[getShort(iCode, pc + 1)]; } stack[stackTop] = ScriptRuntime.newObject(cx, lhs, outArgs, scope); pc += 4; instructionCount = cx.instructionCount; break; case TokenStream.TYPEOF : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); break; case TokenStream.TYPEOFNAME : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; case TokenStream.STRING : stack[++stackTop] = strings[getShort(iCode, pc + 1)]; pc += 2; break; case SHORTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc + 1); pc += 2; break; case INTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc + 1); pc += 4; break; case TokenStream.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = theData. itsDoubleTable[getShort(iCode, pc + 1)]; pc += 2; break; case TokenStream.NAME : stack[++stackTop] = ScriptRuntime.name (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.NAMEINC : stack[++stackTop] = ScriptRuntime.postIncrement (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.NAMEDEC : stack[++stackTop] = ScriptRuntime.postDecrement (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.SETVAR : slot = (iCode[++pc] & 0xFF); stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; break; case TokenStream.GETVAR : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; break; case TokenStream.VARINC : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) + 1.0; break; case TokenStream.VARDEC : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) - 1.0; break; case TokenStream.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; break; case TokenStream.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; break; case TokenStream.NULL : stack[++stackTop] = null; break; case TokenStream.THIS : stack[++stackTop] = thisObj; break; case TokenStream.THISFN : stack[++stackTop] = fnOrScript; break; case TokenStream.FALSE : stack[++stackTop] = Boolean.FALSE; break; case TokenStream.TRUE : stack[++stackTop] = Boolean.TRUE; break; case TokenStream.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case TokenStream.THROW : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; throw new JavaScriptException(result); case TokenStream.JTHROW : result = stack[stackTop]; // No need to check for DBL_MRK: result is Exception --stackTop; if (result instanceof JavaScriptException) throw (JavaScriptException)result; else throw (RuntimeException)result; case TokenStream.ENTERWITH : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); break; case TokenStream.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); break; case TokenStream.NEWSCOPE : stack[++stackTop] = ScriptRuntime.newScope(); break; case TokenStream.ENUMINIT : slot = (iCode[++pc] & 0xFF); lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.initEnum(lhs, scope); break; case TokenStream.ENUMNEXT : slot = (iCode[++pc] & 0xFF); val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = ScriptRuntime. nextEnum((Enumeration)val); break; case TokenStream.GETPROTO : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProto(lhs, scope); break; case TokenStream.GETPARENT : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs); break; case TokenStream.GETSCOPEPARENT : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs, scope); break; case TokenStream.SETPROTO : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProto(lhs, rhs, scope); break; case TokenStream.SETPARENT : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setParent(lhs, rhs, scope); break; case TokenStream.SCOPE : stack[++stackTop] = scope; break; case TokenStream.CLOSURE : i = getShort(iCode, pc + 1); stack[++stackTop] = new InterpretedFunction( theData.itsNestedFunctions[i], scope, cx); createFunctionObject( (InterpretedFunction)stack[stackTop], scope); pc += 2; break; case TokenStream.OBJECT : i = getShort(iCode, pc + 1); stack[++stackTop] = theData.itsRegExpLiterals[i]; pc += 2; break; case SOURCEFILE_ICODE : cx.interpreterSourceFile = theData.itsSourceFile; break; case LINE_ICODE : case BREAKPOINT_ICODE : i = getShort(iCode, pc + 1); cx.interpreterLine = i; if (frame != null) frame.setLineNumber(i); if ((iCode[pc] & 0xff) == BREAKPOINT_ICODE || cx.inLineStepMode) { cx.getDebuggableEngine(). getDebugger().handleBreakpointHit(cx); } pc += 2; break; default : dumpICode(theData); throw new RuntimeException("Unknown icode : " + (iCode[pc] & 0xff) + " @ pc : " + pc); } pc++; } catch (Throwable ex) { if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } } final int SCRIPT_THROW = 0, ECMA = 1, RUNTIME = 2, OTHER = 3; int exType; Object errObj; // Object seen by catch for (;;) { if (ex instanceof JavaScriptException) { errObj = ScriptRuntime. unwrapJavaScriptException((JavaScriptException)ex); exType = SCRIPT_THROW; } else if (ex instanceof EcmaError) { // an offical ECMA error object, errObj = ((EcmaError)ex).getErrorObject(); exType = ECMA; } else if (ex instanceof WrappedException) { Object w = ((WrappedException) ex).unwrap(); if (w instanceof Throwable) { ex = (Throwable) w; continue; } errObj = ex; exType = RUNTIME; } else if (ex instanceof RuntimeException) { errObj = ex; exType = RUNTIME; } else { errObj = ex; // Error instance exType = OTHER; } break; } if (exType != OTHER && cx.debugger != null) { cx.debugger.handleExceptionThrown(cx, errObj); } boolean rethrow = true; if (exType != OTHER && tryStackTop > 0) { --tryStackTop; if (exType == SCRIPT_THROW || exType == ECMA) { // Check for catch only for // JavaScriptException and EcmaError pc = tryStack[tryStackTop * 2]; if (pc != 0) { // Has catch block rethrow = false; } } if (rethrow) { pc = tryStack[tryStackTop * 2 + 1]; if (pc != 0) { // has finally block rethrow = false; errObj = ex; } } } if (rethrow) { if (frame != null) cx.popFrame(); if (exType == SCRIPT_THROW) throw (JavaScriptException)ex; if (exType == ECMA || exType == RUNTIME) throw (RuntimeException)ex; throw (Error)ex; } // We caught an exception, // Notify instruction observer if necessary // and point pcPrevBranch to start of catch/finally block if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { // Note: this can throw Error cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc; // prepare stack and restore this function's security domain. scope = (Scriptable)stack[TRY_SCOPE_SHFT + tryStackTop]; stackTop = 0; stack[0] = errObj; } } if (frame != null) cx.popFrame(); if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } return result; } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/052726b68e684efc593535d50a73767571084837/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
282,
22780,
15261,
16,
1033,
8526,
833,
16,
4766,
282,
16717,
2083,
2295,
1162,
3651,
16,
4766,
282,
5294,
11599,
751,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
282,
22780,
15261,
16,
1033,
8526,
833,
16,
4766,
282,
16717,
2083,
2295,
1162,
3651,
16,
4766,
282,
5294,
11599,
751,
3... |
String identifier = HTMLDecoder.decode(request.getParam("identifier")); | String identifier = request.getParam("identifier"); | public void handlePost(URI uri, Bucket data, ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { HTTPRequest request = new HTTPRequest(uri, data, ctx); try { if ((data.size() > 1024 * 1024) && (request.getPartAsString("insert", 128).length() == 0)) { this.writeReply(ctx, 400, "text/plain", "Too big", "Data exceeds 1MB limit"); return; } String pass = request.getParam("formPassword"); if (pass.length() == 0) { pass = request.getPartAsString("formPassword", 128); } if ((pass.length() == 0) || !pass.equals(node.formPassword)) { MultiValueTable headers = new MultiValueTable(); headers.put("Location", "/queue/"); ctx.sendReplyHeaders(302, "Found", headers, null, 0); return; } if(request.isParameterSet("remove_request") && (request.getParam("remove_request").length() > 0)) { String identifier = HTMLDecoder.decode(request.getParam("identifier")); Logger.minor(this, "Removing "+identifier); try { fcp.removeGlobalRequest(identifier); } catch (MessageInvalidException e) { this.sendErrorPage(ctx, 200, "Failed to remove request", "Failed to remove "+HTMLEncoder.encode(identifier)+" : "+HTMLEncoder.encode(e.getMessage())); } writePermanentRedirect(ctx, "Done", "/queue/"); return; }else if(request.isParameterSet("remove_AllRequests") && (request.getParam("remove_AllRequests").length() > 0)) { ClientRequest[] reqs = fcp.getGlobalRequests(); Logger.minor(this, "Request count: "+reqs.length); for(int i=0; i<reqs.length ; i++){ String identifier = HTMLDecoder.decode(reqs[i].getIdentifier()); Logger.minor(this, "Removing "+identifier); try { fcp.removeGlobalRequest(identifier); } catch (MessageInvalidException e) { this.sendErrorPage(ctx, 200, "Failed to remove request", "Failed to remove "+HTMLEncoder.encode(identifier)+" : "+HTMLEncoder.encode(e.getMessage())); } } writePermanentRedirect(ctx, "Done", "/queue/"); return; }else if(request.isParameterSet("download")) { // Queue a download if(!request.isParameterSet("key")) { writeError("No key specified to download", "You did not specify a key to download.", ctx); return; } String expectedMIMEType = null; if(request.isParameterSet("type")) { expectedMIMEType = request.getParam("type"); } FreenetURI fetchURI; try { fetchURI = new FreenetURI(HTMLDecoder.decode(request.getParam("key"))); } catch (MalformedURLException e) { writeError("Invalid URI to download", "The URI is invalid and can not be downloaded.", ctx); return; } String persistence = request.getParam("persistence"); String returnType = request.getParam("return-type"); fcp.makePersistentGlobalRequest(fetchURI, expectedMIMEType, persistence, returnType); writePermanentRedirect(ctx, "Done", "/queue/"); return; } else if (request.isParameterSet("change_priority")) { String identifier = HTMLDecoder.decode(request.getParam("identifier")); short newPriority = Short.parseShort(request.getParam("priority")); ClientRequest[] clientRequests = fcp.getGlobalRequests(); for (int requestIndex = 0, requestCount = clientRequests.length; requestIndex < requestCount; requestIndex++) { ClientRequest clientRequest = clientRequests[requestIndex]; if (clientRequest.getIdentifier().equals(identifier)) { clientRequest.setPriorityClass(newPriority); } } writePermanentRedirect(ctx, "Done", "/queue/"); return; } else if (request.getPartAsString("insert", 128).length() > 0) { FreenetURI insertURI; String keyType = request.getPartAsString("keytype", 3); if ("chk".equals(keyType)) { insertURI = new FreenetURI("CHK@"); } else if ("ksk".equals(keyType)) { try { insertURI = new FreenetURI(HTMLDecoder.decode(request.getPartAsString("key", 128))); } catch (MalformedURLException mue1) { writeError("Invalid URI to insert", "You did not specify a valid URI to insert the file to.", ctx); return; } } else { writeError("Invalid URI to insert", "You fooled around with the POST request. Shame on you.", ctx); return; } HTTPRequest.File file = request.getUploadedFile("filename"); if (file.getFilename().trim().length() == 0) { writeError("No file selected", "You did not select a file to upload.", ctx); return; } boolean dontCompress = request.getPartAsString("dontCompress", 128).length() > 0; String identifier = file.getFilename() + "-fred-" + System.currentTimeMillis(); /* copy bucket data */ Bucket copiedBucket = node.persistentEncryptedTempBucketFactory.makeBucket(file.getData().size()); BucketTools.copy(file.getData(), copiedBucket); try { ClientPut clientPut = new ClientPut(fcp.getGlobalClient(), insertURI, identifier, Integer.MAX_VALUE, RequestStarter.BULK_SPLITFILE_PRIORITY_CLASS, ClientRequest.PERSIST_FOREVER, null, false, dontCompress, -1, ClientPutMessage.UPLOAD_FROM_DIRECT, new File(file.getFilename()), file.getContentType(), copiedBucket, null); clientPut.start(); fcp.forceStorePersistentRequests(); } catch (IdentifierCollisionException e) { e.printStackTrace(); } writePermanentRedirect(ctx, "Done", "/queue/"); return; } else if (request.isParameterSet("insert-local")) { String filename = request.getParam("filename"); try { filename = new String(filename.getBytes("ISO-8859-1"), "UTF-8"); } catch (Throwable t) { } File file = new File(filename); String identifier = file.getName() + "-fred-" + System.currentTimeMillis(); String contentType = DefaultMIMETypes.guessMIMEType(filename); try { ClientPut clientPut = new ClientPut(fcp.getGlobalClient(), new FreenetURI("CHK@"), identifier, Integer.MAX_VALUE, RequestStarter.BULK_SPLITFILE_PRIORITY_CLASS, ClientRequest.PERSIST_FOREVER, null, false, false, -1, ClientPutMessage.UPLOAD_FROM_DISK, file, contentType, new FileBucket(file, true, false, false, false), null); clientPut.start(); fcp.forceStorePersistentRequests(); } catch (IdentifierCollisionException e) { e.printStackTrace(); } writePermanentRedirect(ctx, "Done", "/queue/"); return; } } finally { request.freeParts(); } this.handleGet(uri, ctx); } | 50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/144c6fa8b4af3023cb6f0c50203b29af750a73e7/QueueToadlet.java/clean/src/freenet/clients/http/QueueToadlet.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,
16,
9942,
503,
288,
202,
202,
23891,
590... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
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,
16,
9942,
503,
288,
202,
202,
23891,
590... |
final boolean isSubUnit= rewrite.getCu().equals(unit.getPrimary()); if (isSubUnit) currentRewrite= rewrite; | final CompilationUnitRewrite existingRewrite= (CompilationUnitRewrite) fCompilationUnitRewrites.get(unit.getPrimary()); final boolean isTouched= existingRewrite != null; if (isTouched) currentRewrite= existingRewrite; | protected void rewriteTypeOccurrences(final TextChangeManager manager, final ASTRequestor requestor, final CompilationUnitRewrite rewrite, final ICompilationUnit unit, final CompilationUnit node, final Set replacements) throws CoreException { CompilationUnitRewrite currentRewrite= null; // TODO: Is this check valid? final boolean isSubUnit= rewrite.getCu().equals(unit.getPrimary()); if (isSubUnit) currentRewrite= rewrite; else currentRewrite= new CompilationUnitRewrite(fOwner, unit, node); final Collection collection= (Collection) fTypeOccurrences.get(unit); if (collection != null && !collection.isEmpty()) { TType estimate= null; ISourceConstraintVariable variable= null; ITypeConstraintVariable constraint= null; for (final Iterator iterator= collection.iterator(); iterator.hasNext();) { variable= (ISourceConstraintVariable) iterator.next(); if (variable instanceof ITypeConstraintVariable) { constraint= (ITypeConstraintVariable) variable; estimate= (TType) constraint.getData(SuperTypeConstraintsSolver.DATA_TYPE_ESTIMATE); if (estimate != null) { final CompilationUnitRange range= constraint.getRange(); if (isSubUnit) rewriteTypeOccurrence(range, estimate, requestor, currentRewrite, node, replacements, currentRewrite.createCategorizedGroupDescription(RefactoringCoreMessages.SuperTypeRefactoringProcessor_update_type_occurrence, SET_SUPER_TYPE)); else { final ASTNode result= NodeFinder.perform(node, range.getSourceRange()); if (result != null) rewriteTypeOccurrence(estimate, currentRewrite, result, currentRewrite.createCategorizedGroupDescription(RefactoringCoreMessages.SuperTypeRefactoringProcessor_update_type_occurrence, SET_SUPER_TYPE)); } } } } } if (!isSubUnit) { final TextChange change= currentRewrite.createChange(); if (change != null) manager.manage(unit, change); } } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/02a4b41f40b2ec9c37f185ccfe5cfa3af140ac61/PullUpRefactoringProcessor.java/buggy/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PullUpRefactoringProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
10738,
559,
12397,
12228,
12,
6385,
3867,
3043,
1318,
3301,
16,
727,
9183,
691,
280,
590,
280,
16,
727,
22416,
2802,
19618,
10738,
16,
727,
467,
19184,
2802,
2836,
16,
727... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
10738,
559,
12397,
12228,
12,
6385,
3867,
3043,
1318,
3301,
16,
727,
9183,
691,
280,
590,
280,
16,
727,
22416,
2802,
19618,
10738,
16,
727,
467,
19184,
2802,
2836,
16,
727... |
reportSchemaError("s4s-elt-must-match", new Object[]{"identity constraint", "(annotation?, selector, field+)"}, sElem); | reportSchemaError("s4s-elt-must-match.2", new Object[]{"identity constraint", "(annotation?, selector, field+)"}, sElem); | void traverseIdentityConstraint(IdentityConstraint ic, Element icElem, XSDocumentInfo schemaDoc, Object [] icElemAttrs) { // General Attribute Checking will have been done on icElem by caller // check for <annotation> and get selector Element sElem = DOMUtil.getFirstChildElement(icElem); if(sElem == null) { reportSchemaError("s4s-elt-must-match", new Object[]{"identity constraint", "(annotation?, selector, field+)"}, icElem); return; } // General Attribute Checking on sElem // first child could be an annotation if (DOMUtil.getLocalName(sElem).equals(SchemaSymbols.ELT_ANNOTATION)) { traverseAnnotationDecl(sElem, icElemAttrs, false, schemaDoc); sElem = DOMUtil.getNextSiblingElement(sElem); } // if no more children report an error if(sElem == null) { reportSchemaError("s4s-elt-must-match", new Object[]{"identity constraint", "(annotation?, selector, field+)"}, icElem); return; } Object [] attrValues = fAttrChecker.checkAttributes(sElem, false, schemaDoc); // if more than one annotation report an error if(!DOMUtil.getLocalName(sElem).equals(SchemaSymbols.ELT_SELECTOR)) { reportSchemaError("s4s-elt-must-match", new Object[]{"identity constraint", "(annotation?, selector, field+)"}, sElem); } // and make sure <selector>'s content is fine: Element selChild = DOMUtil.getFirstChildElement(sElem); if (selChild !=null) { // traverse annotation if any if (DOMUtil.getLocalName(selChild).equals(SchemaSymbols.ELT_ANNOTATION)) { traverseAnnotationDecl(selChild, attrValues, false, schemaDoc); selChild = DOMUtil.getNextSiblingElement(selChild); } else { reportSchemaError("s4s-elt-must-match", new Object[]{"identity constraint", "(annotation?, selector, field+)"}, selChild); } if (selChild != null) { reportSchemaError("src-identity-constraint.1", new Object [] {icElemAttrs[XSAttributeChecker.ATTIDX_NAME]}, selChild); } } String sText = ((String)attrValues[XSAttributeChecker.ATTIDX_XPATH]); if(sText == null) { reportSchemaError("s4s-att-must-appear", new Object [] {SchemaSymbols.ELT_SELECTOR, SchemaSymbols.ATT_XPATH}, sElem); return; } sText = sText.trim(); Selector.XPath sXpath = null; try { sXpath = new Selector.XPath(sText, fSymbolTable, schemaDoc.fNamespaceSupport); Selector selector = new Selector(sXpath, ic); ic.setSelector(selector); } catch (XPathException e) { reportSchemaError(e.getKey(), new Object[]{sText}, sElem); // put back attr values... fAttrChecker.returnAttrArray(attrValues, schemaDoc); return; } // put back attr values... fAttrChecker.returnAttrArray(attrValues, schemaDoc); // get fields Element fElem = DOMUtil.getNextSiblingElement(sElem); if(fElem == null) { reportSchemaError("s4s-elt-must-match", new Object[]{"identity constraint", "(annotation?, selector, field+)"}, sElem); } while (fElem != null) { // General Attribute Checking attrValues = fAttrChecker.checkAttributes(fElem, false, schemaDoc); if(!DOMUtil.getLocalName(fElem).equals(SchemaSymbols.ELT_FIELD)) reportSchemaError("s4s-elt-must-match", new Object[]{"identity constraint", "(annotation?, selector, field+)"}, fElem); // and make sure <field>'s content is fine: Element fieldChild = DOMUtil.getFirstChildElement(fElem); if (fieldChild != null) { // traverse annotation if (DOMUtil.getLocalName(fieldChild).equals(SchemaSymbols.ELT_ANNOTATION)) { traverseAnnotationDecl(fieldChild, attrValues, false, schemaDoc); fieldChild = DOMUtil.getNextSiblingElement(fieldChild); } } if (fieldChild != null) { reportSchemaError("src-identity-constraint.1", new Object [] {icElemAttrs[XSAttributeChecker.ATTIDX_NAME]}, fieldChild); } String fText = ((String)attrValues[XSAttributeChecker.ATTIDX_XPATH]); if(fText == null) { reportSchemaError("s4s-att-must-appear", new Object [] {SchemaSymbols.ELT_FIELD, SchemaSymbols.ATT_XPATH}, fElem); return; } fText = fText.trim(); try { Field.XPath fXpath = new Field.XPath(fText, fSymbolTable, schemaDoc.fNamespaceSupport); Field field = new Field(fXpath, ic); ic.addField(field); } catch (XPathException e) { reportSchemaError(e.getKey(), new Object[]{fText}, fElem); // put back attr values... fAttrChecker.returnAttrArray(attrValues, schemaDoc); return; } fElem = DOMUtil.getNextSiblingElement(fElem); // put back attr values... fAttrChecker.returnAttrArray(attrValues, schemaDoc); } } // traverseIdentityConstraint(IdentityConstraint,Element, XSDocumentInfo) | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/08452497d5ddc107ce0c88dafa4af418a8162487/XSDAbstractIDConstraintTraverser.java/buggy/src/org/apache/xerces/impl/xs/traversers/XSDAbstractIDConstraintTraverser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
10080,
4334,
5806,
12,
4334,
5806,
13579,
16,
5411,
3010,
13579,
7498,
16,
1139,
55,
2519,
966,
1963,
1759,
16,
1033,
5378,
13579,
7498,
8262,
13,
288,
3639,
368,
9544,
3601,
24471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
10080,
4334,
5806,
12,
4334,
5806,
13579,
16,
5411,
3010,
13579,
7498,
16,
1139,
55,
2519,
966,
1963,
1759,
16,
1033,
5378,
13579,
7498,
8262,
13,
288,
3639,
368,
9544,
3601,
24471,
... |
void moveToNoCheck ( Xobj x, int p ) { if (_state == EMBEDDED && x != _xobj) { _xobj._embedded = listRemove( _xobj._embedded ); _locale._registered = listInsert( _locale._registered ); _state = REGISTERED; } _xobj = x; _pos = p; } | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/1be242f8d9d59b11549779cf24462c628e5a0f51/Cur.java/clean/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cur.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
13863,
2279,
1564,
261,
1139,
2603,
619,
16,
509,
293,
262,
565,
288,
3639,
309,
261,
67,
2019,
422,
7141,
22235,
7660,
597,
619,
480,
389,
92,
2603,
13,
3639,
288,
5411,
389,
92,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
13863,
2279,
1564,
261,
1139,
2603,
619,
16,
509,
293,
262,
565,
288,
3639,
309,
261,
67,
2019,
422,
7141,
22235,
7660,
597,
619,
480,
389,
92,
2603,
13,
3639,
288,
5411,
389,
92,
... | ||
System.arraycopy(this.withoutUnicodeBuffer, 1, this.completionIdentifier = new char[this.withoutUnicodePtr], 0, this.withoutUnicodePtr); | int length = this.cursorLocation + 1 - this.startPosition - this.unicodeCharSize; System.arraycopy(this.withoutUnicodeBuffer, 1, this.completionIdentifier = new char[length], 0, length); | public char[] getCurrentIdentifierSource() { if (this.completionIdentifier == null){ if (this.cursorLocation < this.startPosition && this.currentPosition == this.startPosition){ // fake empty identifier got issued // remember actual identifier positions this.completedIdentifierStart = this.startPosition; this.completedIdentifierEnd = this.completedIdentifierStart - 1; return this.completionIdentifier = EmptyCompletionIdentifier; } if (this.cursorLocation+1 >= this.startPosition && this.cursorLocation < this.currentPosition){ // remember actual identifier positions this.completedIdentifierStart = this.startPosition; this.completedIdentifierEnd = this.currentPosition - 1; if (this.withoutUnicodePtr != 0){ // check unicode scenario System.arraycopy(this.withoutUnicodeBuffer, 1, this.completionIdentifier = new char[this.withoutUnicodePtr], 0, this.withoutUnicodePtr); } else { int length = this.cursorLocation + 1 - this.startPosition; // no char[] sharing around completionIdentifier, we want it to be unique so as to use identity checks System.arraycopy(this.source, this.startPosition, (this.completionIdentifier = new char[length]), 0, length); } return this.completionIdentifier; } } return super.getCurrentIdentifierSource();} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/6ac711ffe783cf5d3cc0858a241df9f5f87b2270/CompletionScanner.java/buggy/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionScanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1149,
8526,
5175,
3004,
1830,
1435,
288,
202,
430,
261,
2211,
18,
11469,
3004,
422,
446,
15329,
202,
202,
430,
261,
2211,
18,
9216,
2735,
411,
333,
18,
1937,
2555,
597,
333,
18,
2972,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1149,
8526,
5175,
3004,
1830,
1435,
288,
202,
430,
261,
2211,
18,
11469,
3004,
422,
446,
15329,
202,
202,
430,
261,
2211,
18,
9216,
2735,
411,
333,
18,
1937,
2555,
597,
333,
18,
2972,
... |
boolean retValue = canContainInRom( slotId, defn ); if ( !retValue ) | if ( !canContainTemplateElement( module, slotId, element ) ) | public final boolean canContain( Module module, int slotId, IElementDefn defn ) { assert defn != null; boolean retValue = canContainInRom( slotId, defn ); if ( !retValue ) return false; // if the root of element is included by report/library. Do not allow // drop. if ( isRootIncludedByModule( ) ) return false; if ( !canContainTemplateElement( module, slotId, defn ) ) return false; // Can not change structure of child element or a virtual element( // inside the child ). if ( isVirtualElement( ) || getExtendsName( ) != null ) return false; // special cases check table header containment. DesignElement tmpContainer = this; while ( tmpContainer != null ) { if ( tmpContainer instanceof ListingElement || tmpContainer instanceof MasterPage ) { List errors = tmpContainer.checkContent( module, this, slotId, defn ); return errors.isEmpty( ); } tmpContainer = tmpContainer.getContainer( ); } return retValue; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/13807447c2b92e5c2c0d1067fa8f2de960030f4b/DesignElement.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/core/DesignElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
1250,
848,
22928,
12,
5924,
1605,
16,
509,
4694,
548,
16,
1082,
202,
45,
1046,
3262,
82,
1652,
82,
262,
202,
95,
202,
202,
11231,
1652,
82,
480,
446,
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,
727,
1250,
848,
22928,
12,
5924,
1605,
16,
509,
4694,
548,
16,
1082,
202,
45,
1046,
3262,
82,
1652,
82,
262,
202,
95,
202,
202,
11231,
1652,
82,
480,
446,
31,
202,
202,
6494... |
return instanceValue == null ? null : instanceValue.toString( ); | return convertDateFormatDetailToString( eDataType, instanceValue ); | public String convertToString( EDataType eDataType, Object instanceValue ) { switch ( eDataType.getClassifierID( ) ) { case AttributePackage.ACTION_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.ANCHOR : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.ANGLE_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.AXIS_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.CHART_DIMENSION : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.CHART_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.DATA_POINT_COMPONENT_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.DATA_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.DATE_FORMAT_DETAIL : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.DATE_FORMAT_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.DIRECTION : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.GROUPING_UNIT_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.HORIZONTAL_ALIGNMENT : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.INTERSECTION_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.LEADER_LINE_STYLE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.LEGEND_BEHAVIOR_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.LEGEND_ITEM_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.LINE_DECORATOR : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.LINE_STYLE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.MARKER_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.ORIENTATION : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.POSITION : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.RISER_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.RULE_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.SCALE_UNIT_TYPE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.SORT_OPTION : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.STRETCH : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.STYLED_COMPONENT : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.TICK_STYLE : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.TRIGGER_CONDITION : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.TRIGGER_FLOW : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.UNITS_OF_MEASUREMENT : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.VERTICAL_ALIGNMENT : return instanceValue == null ? null : instanceValue.toString( ); case AttributePackage.ACTION_TYPE_OBJECT : return convertActionTypeObjectToString( eDataType, instanceValue ); case AttributePackage.ANCHOR_OBJECT : return convertAnchorObjectToString( eDataType, instanceValue ); case AttributePackage.ANGLE_TYPE_OBJECT : return convertAngleTypeObjectToString( eDataType, instanceValue ); case AttributePackage.AXIS_TYPE_OBJECT : return convertAxisTypeObjectToString( eDataType, instanceValue ); case AttributePackage.CHART_DIMENSION_OBJECT : return convertChartDimensionObjectToString( eDataType, instanceValue ); case AttributePackage.CHART_TYPE_OBJECT : return convertChartTypeObjectToString( eDataType, instanceValue ); case AttributePackage.DATA_POINT_COMPONENT_TYPE_OBJECT : return convertDataPointComponentTypeObjectToString( eDataType, instanceValue ); case AttributePackage.DATA_TYPE_OBJECT : return convertDataTypeObjectToString( eDataType, instanceValue ); case AttributePackage.DATE_FORMAT_DETAIL_OBJECT : return convertDateFormatDetailObjectToString( eDataType, instanceValue ); case AttributePackage.DATE_FORMAT_TYPE_OBJECT : return convertDateFormatTypeObjectToString( eDataType, instanceValue ); case AttributePackage.DIRECTION_OBJECT : return convertDirectionObjectToString( eDataType, instanceValue ); case AttributePackage.GROUPING_UNIT_TYPE_OBJECT : return convertGroupingUnitTypeObjectToString( eDataType, instanceValue ); case AttributePackage.HORIZONTAL_ALIGNMENT_OBJECT : return convertHorizontalAlignmentObjectToString( eDataType, instanceValue ); case AttributePackage.ID : return convertIDToString( eDataType, instanceValue ); case AttributePackage.INTERSECTION_TYPE_OBJECT : return convertIntersectionTypeObjectToString( eDataType, instanceValue ); case AttributePackage.LEADER_LINE_STYLE_OBJECT : return convertLeaderLineStyleObjectToString( eDataType, instanceValue ); case AttributePackage.LEGEND_BEHAVIOR_TYPE_OBJECT : return convertLegendBehaviorTypeObjectToString( eDataType, instanceValue ); case AttributePackage.LEGEND_ITEM_TYPE_OBJECT : return convertLegendItemTypeObjectToString( eDataType, instanceValue ); case AttributePackage.LINE_DECORATOR_OBJECT : return convertLineDecoratorObjectToString( eDataType, instanceValue ); case AttributePackage.LINE_STYLE_OBJECT : return convertLineStyleObjectToString( eDataType, instanceValue ); case AttributePackage.MARKER_TYPE_OBJECT : return convertMarkerTypeObjectToString( eDataType, instanceValue ); case AttributePackage.ORIENTATION_OBJECT : return convertOrientationObjectToString( eDataType, instanceValue ); case AttributePackage.PERCENTAGE : return convertPercentageToString( eDataType, instanceValue ); case AttributePackage.PERCENTAGE_OBJECT : return convertPercentageObjectToString( eDataType, instanceValue ); case AttributePackage.POSITION_OBJECT : return convertPositionObjectToString( eDataType, instanceValue ); case AttributePackage.RGB_VALUE : return convertRGBValueToString( eDataType, instanceValue ); case AttributePackage.RGB_VALUE_OBJECT : return convertRGBValueObjectToString( eDataType, instanceValue ); case AttributePackage.RISER_TYPE_OBJECT : return convertRiserTypeObjectToString( eDataType, instanceValue ); case AttributePackage.RULE_TYPE_OBJECT : return convertRuleTypeObjectToString( eDataType, instanceValue ); case AttributePackage.SCALE_UNIT_TYPE_OBJECT : return convertScaleUnitTypeObjectToString( eDataType, instanceValue ); case AttributePackage.SORT_OPTION_OBJECT : return convertSortOptionObjectToString( eDataType, instanceValue ); case AttributePackage.STRETCH_OBJECT : return convertStretchObjectToString( eDataType, instanceValue ); case AttributePackage.STYLED_COMPONENT_OBJECT : return convertStyledComponentObjectToString( eDataType, instanceValue ); case AttributePackage.TICK_STYLE_OBJECT : return convertTickStyleObjectToString( eDataType, instanceValue ); case AttributePackage.TRIGGER_CONDITION_OBJECT : return convertTriggerConditionObjectToString( eDataType, instanceValue ); case AttributePackage.TRIGGER_FLOW_OBJECT : return convertTriggerFlowObjectToString( eDataType, instanceValue ); case AttributePackage.UNITS_OF_MEASUREMENT_OBJECT : return convertUnitsOfMeasurementObjectToString( eDataType, instanceValue ); case AttributePackage.VERTICAL_ALIGNMENT_OBJECT : return convertVerticalAlignmentObjectToString( eDataType, instanceValue ); default : throw new IllegalArgumentException( "The datatype '" + eDataType.getName( ) + "' is not a valid classifier" ); //$NON-NLS-1$ //$NON-NLS-2$ } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/036e8c78765730b146e5854b9d6c397a296fed86/AttributeFactoryImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/AttributeFactoryImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1765,
5808,
12,
20807,
11479,
16,
1033,
13523,
262,
202,
95,
202,
202,
9610,
261,
11479,
18,
588,
13860,
734,
12,
262,
262,
202,
202,
95,
1082,
202,
3593,
3601,
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,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1765,
5808,
12,
20807,
11479,
16,
1033,
13523,
262,
202,
95,
202,
202,
9610,
261,
11479,
18,
588,
13860,
734,
12,
262,
262,
202,
202,
95,
1082,
202,
3593,
3601,
2261,
18,... |
boolean isStructureOK(IMolecule molecule) { | public boolean isStructureOK(IMolecule molecule) { | boolean isStructureOK(IMolecule molecule) { for (int i = 0; i <= molecule.getAtomCount() - 1; i++) { //System.out.println(mj.getBondOrderSum(mj.getAtomAt(i))); try { // Note: valencyHybridChecker.couldMatchAtomType shouldnt check Hybridization to get it to work for non carbon atoms valencyChecker.isSaturated(molecule.getAtom(i), molecule); //valencyChecker.allSaturated didnt seem to work so did it this way } catch (Exception e) { logger.debug(i + "\t" + "atom " + (i + 1) + " is not saturated"); return false; } } try { AllRingsFinder arf = new AllRingsFinder(); IRingSet ringSet = arf.findAllRings(molecule);// IRingSet rs=this.RemoveExtraRings(m); for (int i = 0; i <= molecule.getAtomCount() - 1; i++) { molecule.getAtom(i).setFlag(CDKConstants.ISAROMATIC, false); } for (int i = 0; i <= ringSet.getAtomContainerCount() - 1; i++) { Ring r = (Ring) ringSet.getAtomContainer(i); r.setFlag(CDKConstants.ISAROMATIC, false); } //System.out.println("Rs size= "+rs.size()); // do it multiple times to catch all the aromatic rings // this problem is that the aromaticity detector relies on // the aromaticity of the individual atoms in the ring // these wont be picked up until you do it multiple times // for example pyrene 129-00-0 for (int i = 0; i <= ringSet.getAtomContainerCount() - 1; i++) { HueckelAromaticityDetector.detectAromaticity(molecule, ringSet, false); }// Figure out which rings we want to make sure are aromatic: boolean [] Check = this.findRingsToCheck(molecule, ringSet);// for (int i=0;i<=Check.length-1;i++) {// System.out.println(i+"\t"+rs.getAtomContainer(i).getAtomCount()+"\t"+Check[i]);// } for (int i = 0; i <= ringSet.getAtomContainerCount() - 1; i++) { Ring ring = (Ring) ringSet.getAtomContainer(i); //System.out.println(k+"\t"+r.getAtomCount()+"\t"+r.getFlag(CDKConstants.ISAROMATIC)); if (Check[i]) { if (!ring.getFlag(CDKConstants.ISAROMATIC)) {// System.out.println(counter+"\t"+"ring not aromatic"+"\t"+r.getAtomCount()); return false; } } } return true; } catch (Exception e) { logger.debug(e.toString()); return false; } } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/2b36ab3de769d925ab5e01751e878f653a1b942a/DeduceBondSystemTool.java/buggy/src/org/openscience/cdk/smiles/DeduceBondSystemTool.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
6999,
3141,
12,
3445,
10545,
13661,
13,
288,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
1648,
13661,
18,
588,
3641,
1380,
1435,
300,
404,
31,
277,
27245,
288,
5411,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
6999,
3141,
12,
3445,
10545,
13661,
13,
288,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
1648,
13661,
18,
588,
3641,
1380,
1435,
300,
404,
31,
277,
27245,
288,
5411,
3... |
req.setContentLength(-1); | public void action(ActionCode actionCode, Object param) { if( actionCode==ActionCode.ACTION_COMMIT ) { if( log.isDebugEnabled() ) log.debug("COMMIT " ); Response res=(Response)param; if( res.isCommitted() ) { if( log.isDebugEnabled() ) log.debug("Response already committed " ); } else { try { jkIS.appendHead( res ); } catch(IOException iex) { log.warn("Unable to send headers",iex); setStatus(JK_STATUS_ERROR); } } } else if( actionCode==ActionCode.ACTION_RESET ) { if( log.isDebugEnabled() ) log.debug("RESET " ); } else if( actionCode==ActionCode.ACTION_CLIENT_FLUSH ) { if( log.isDebugEnabled() ) log.debug("CLIENT_FLUSH " ); try { source.flush( null, this ); } catch(IOException iex) { // This is logged elsewhere, so debug only here log.debug("Error during flush",iex); Response res = (Response)param; res.setErrorException(iex); setStatus(JK_STATUS_ERROR); } } else if( actionCode==ActionCode.ACTION_CLOSE ) { if( log.isDebugEnabled() ) log.debug("CLOSE " ); Response res=(Response)param; if( getStatus()== JK_STATUS_CLOSED || getStatus() == JK_STATUS_ERROR) { // Double close - it may happen with forward if( log.isDebugEnabled() ) log.debug("Double CLOSE - forward ? " + res.getRequest().requestURI() ); return; } if( !res.isCommitted() ) this.action( ActionCode.ACTION_COMMIT, param ); try { jkIS.endMessage(); } catch(IOException iex) { log.warn("Error sending end packet",iex); setStatus(JK_STATUS_ERROR); } if(getStatus() != JK_STATUS_ERROR) { setStatus(JK_STATUS_CLOSED ); } if( logTime.isDebugEnabled() ) logTime(res.getRequest(), res); } else if( actionCode==ActionCode.ACTION_REQ_SSL_ATTRIBUTE ) { Request req=(Request)param; // Extract SSL certificate information (if requested) MessageBytes certString = (MessageBytes)req.getNote(WorkerEnv.SSL_CERT_NOTE); if( certString != null && !certString.isNull() ) { ByteChunk certData = certString.getByteChunk(); ByteArrayInputStream bais = new ByteArrayInputStream(certData.getBytes(), certData.getStart(), certData.getLength()); // Fill the first element. X509Certificate jsseCerts[] = null; try { CertificateFactory cf = CertificateFactory.getInstance("X.509"); X509Certificate cert = (X509Certificate) cf.generateCertificate(bais); jsseCerts = new X509Certificate[1]; jsseCerts[0] = cert; } catch(java.security.cert.CertificateException e) { log.error("Certificate convertion failed" , e ); return; } req.setAttribute(SSLSupport.CERTIFICATE_KEY, jsseCerts); } } else if( actionCode==ActionCode.ACTION_REQ_HOST_ATTRIBUTE ) { Request req=(Request)param; // If remoteHost not set by JK, get it's name from it's remoteAddr if( req.remoteHost().isNull()) { try { req.remoteHost().setString(InetAddress.getByName( req.remoteAddr().toString()). getHostName()); } catch(IOException iex) { if(log.isDebugEnabled()) log.debug("Unable to resolve "+req.remoteAddr()); } } } else if( actionCode==ActionCode.ACTION_ACK ) { if( log.isTraceEnabled() ) log.trace("ACK " ); } else if ( actionCode == ActionCode.ACTION_REQ_SET_BODY_REPLAY ) { if( log.isTraceEnabled() ) log.trace("Replay "); req.setContentLength(-1); // reset content length ByteChunk bc = (ByteChunk)param; jkIS.setReplay(bc); } } | 48155 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48155/648e2d5e178f9384b3e99ba56c637731fe0155ee/MsgContext.java/buggy/java/org/apache/jk/core/MsgContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1301,
12,
1803,
1085,
1301,
1085,
16,
1033,
579,
13,
288,
3639,
309,
12,
1301,
1085,
631,
1803,
1085,
18,
12249,
67,
18658,
262,
288,
5411,
309,
12,
613,
18,
291,
2829,
1526,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1301,
12,
1803,
1085,
1301,
1085,
16,
1033,
579,
13,
288,
3639,
309,
12,
1301,
1085,
631,
1803,
1085,
18,
12249,
67,
18658,
262,
288,
5411,
309,
12,
613,
18,
291,
2829,
1526,... | |
private void transportConfigurationPOST( MessageContext msgContext, OMElement dataout, URL url, String soapActionString) throws MalformedURLException, AxisFault, IOException { //execuite the HtttpMethodBase - a connection manager can be given for handle multiple httpClient = new HttpClient(); //hostConfig handles the socket functions.. HostConfiguration hostConfig = getHostConfiguration(msgContext, url); PostMethod postMethod = new PostMethod(); postMethod.setPath(url.getFile()); msgContext.setProperty(HTTP_METHOD, postMethod); String charEncoding = (String) msgContext.getProperty( MessageContext.CHARACTER_SET_ENCODING); if(charEncoding == null){ charEncoding = MessageContext.DEFAULT_CHAR_SET_ENCODING; } postMethod.setRequestEntity( new AxisRequestEntity( dataout, chuncked, msgContext.isDoingMTOM(), charEncoding)); if (!httpVersion.equals(HTTPConstants.HEADER_PROTOCOL_10) && chuncked) { postMethod.setContentChunked(true); } postMethod.setRequestHeader( HTTPConstants.HEADER_USER_AGENT, "Axis/2.0"); if (!msgContext.isDoingREST()) { postMethod.setRequestHeader( HTTPConstants.HEADER_SOAP_ACTION, soapActionString); } postMethod.setRequestHeader(HTTPConstants.HEADER_HOST, url.getHost()); if (httpVersion != null) { if (httpVersion.equals(HTTPConstants.HEADER_PROTOCOL_10)) { //postMethod.setHttp11(false); todo method to findout the transport version... //allowing keep-alive for 1.0 postMethod.setRequestHeader( HTTPConstants.HEADER_CONNECTION, HTTPConstants.HEADER_CONNECTION_KEEPALIVE); } else { // allowing keep-alive for 1.1 postMethod.setRequestHeader( HTTPConstants.HEADER_CONNECTION, HTTPConstants.HEADER_CONNECTION_KEEPALIVE); postMethod.setRequestHeader( HTTPConstants.HEADER_EXPECT, HTTPConstants.HEADER_EXPECT_100_Continue); } } this.httpClient.executeMethod(hostConfig, postMethod); if (postMethod.getStatusCode() == HttpStatus.SC_OK) { obatainHTTPHeaderInformation(postMethod, msgContext); InputStream in = postMethod.getResponseBodyAsStream(); if (in == null) { throw new AxisFault( Messages.getMessage("canNotBeNull", "InputStream")); } msgContext.getOperationContext().setProperty( MessageContext.TRANSPORT_IN, in); } else if (postMethod.getStatusCode() == HttpStatus.SC_ACCEPTED) { return; } else { throw new AxisFault( Messages.getMessage( "transportError", String.valueOf(postMethod.getStatusCode()), postMethod.getResponseBodyAsString())); } } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/8db68d050e68b9e6daecbb5fd07885046c23eb02/CommonsHTTPTransportSender.java/buggy/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4736,
1750,
3798,
12,
3639,
2350,
1042,
1234,
1042,
16,
3639,
531,
12310,
501,
659,
16,
3639,
1976,
880,
16,
3639,
514,
9930,
1803,
780,
13,
3639,
1216,
20710,
16,
15509,
7083,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4736,
1750,
3798,
12,
3639,
2350,
1042,
1234,
1042,
16,
3639,
531,
12310,
501,
659,
16,
3639,
1976,
880,
16,
3639,
514,
9930,
1803,
780,
13,
3639,
1216,
20710,
16,
15509,
7083,... | ||
public JParameter getParameter(int index) { | public JParameter getParameter(final int index) { | public JParameter getParameter(int index) { return _signature.getParameter(index); } //-- getParameter | 3614 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3614/34c708e3c0e8dd4b42534f5834f9a280e0c9968b/JMethod.java/buggy/castor/trunk/src/main/java/org/exolab/javasource/JMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
804,
1662,
5575,
12,
6385,
509,
770,
13,
288,
3639,
327,
389,
8195,
18,
588,
1662,
12,
1615,
1769,
565,
289,
368,
413,
5575,
2,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
804,
1662,
5575,
12,
6385,
509,
770,
13,
288,
3639,
327,
389,
8195,
18,
588,
1662,
12,
1615,
1769,
565,
289,
368,
413,
5575,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
return (ProtocolData[])mProtocolStack.toArray(new ProtocolData[mProtocolStack.size()]); | return mProtocolStack.toArray(new ProtocolData[mProtocolStack.size()]); | public ProtocolData[] getProtocolStack() { return (ProtocolData[])mProtocolStack.toArray(new ProtocolData[mProtocolStack.size()]); } | 49475 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49475/ed68b47fb250ec26b74431c8f7bbad36be301668/XmlConfigurator.java/clean/src/org/jgroups/conf/XmlConfigurator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4547,
751,
8526,
18648,
2624,
1435,
288,
3639,
327,
312,
5752,
2624,
18,
31447,
12,
2704,
4547,
751,
63,
81,
5752,
2624,
18,
1467,
1435,
19226,
565,
289,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4547,
751,
8526,
18648,
2624,
1435,
288,
3639,
327,
312,
5752,
2624,
18,
31447,
12,
2704,
4547,
751,
63,
81,
5752,
2624,
18,
1467,
1435,
19226,
565,
289,
2,
-100,
-100,
-100,
-100,
... |
public RubyObject execute(RubyObject recv, RubyObject args[], Ruby ruby) { return recv.m_to_s(); } | public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { return ruby.getNil(); } | public RubyObject execute(RubyObject recv, RubyObject args[], Ruby ruby) { return recv.m_to_s(); } | 1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RBKernel.java/clean/org/jruby/core/RBKernel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
19817,
921,
1836,
12,
54,
10340,
921,
10665,
16,
19817,
921,
833,
63,
6487,
19817,
22155,
13,
288,
10792,
327,
10665,
18,
81,
67,
869,
67,
87,
5621,
7734,
289,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
19817,
921,
1836,
12,
54,
10340,
921,
10665,
16,
19817,
921,
833,
63,
6487,
19817,
22155,
13,
288,
10792,
327,
10665,
18,
81,
67,
869,
67,
87,
5621,
7734,
289,
2,
-100,
-100,
-10... |
private void resize() { | private final void resize() { | private void resize() { // length must be power of two for fast "&" hashing, // otherwise we would use "%" InstanceStats[] oldTable = objs; if (oldTable == null) { objs = new InstanceStats[8]; objs_threshold = objs.length * 7; return; } int oldCapacity = oldTable.length; int newCapacity = (oldCapacity << 1); InstanceStats[] newTable = new InstanceStats[newCapacity]; for (int i = 0; i < oldCapacity; i++) { InstanceStats next = null; for (InstanceStats is = oldTable[i]; is != null; is = next) { next = is.next; is.next = null; Object o = is.get(); if (o == null) { gc(is); objs_size--; continue; } int h = hash(o, newCapacity); InstanceStats new_is = newTable[h]; if (new_is != null) { is.next = new_is; } newTable[h] = is; } } objs = newTable; objs_threshold = newCapacity * 7; } | 10688 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10688/1d14349b46f4d57f1262d289891f1194920c84c0/InstancesTable.java/buggy/profiler_impl/src/org/cougaar/profiler/InstancesTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
727,
918,
7041,
1435,
288,
565,
368,
769,
1297,
506,
7212,
434,
2795,
364,
4797,
16347,
24641,
16,
565,
368,
3541,
732,
4102,
999,
20880,
565,
5180,
4195,
8526,
1592,
1388,
273,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
727,
918,
7041,
1435,
288,
565,
368,
769,
1297,
506,
7212,
434,
2795,
364,
4797,
16347,
24641,
16,
565,
368,
3541,
732,
4102,
999,
20880,
565,
5180,
4195,
8526,
1592,
1388,
273,
127... |
alt1=11;} break; case ',': alt1=12; break; case '{': alt1=13; break; case '}': alt1=14; break; case '[': alt1=15; break; case ']': alt1=16; break; case '=': switch ( input.LA(2) ) { case '+': alt1=31; break; case '-': alt1=33; break; case '=': alt1=29; break; case '/': alt1=37; break; case '*': alt1=35; break; default: alt1=17;} break; case '/': int LA1_18 = input.LA(2); if ( LA1_18=='=' ) { alt1=36; } else { alt1=18;} | alt1=19;} | public void mMISC() throws RecognitionException { int MISC_StartIndex = input.index(); try { int type = MISC; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; if ( backtracking>0 && alreadyParsedRule(input, 48) ) { return ; } // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:17: ( '!' | '@' | '$' | '%' | '^' | '&' | '*' | '_' | '-' | '+' | '|' | ',' | '{' | '}' | '[' | ']' | '=' | '/' | '(' | ')' | '\'' | '\\' | '||' | '&&' | '<<<' | '++' | '--' | '>>>' | '==' | '+=' | '=+' | '-=' | '=-' | '*=' | '=*' | '/=' | '=/' | '>>=' ) int alt1=38; switch ( input.LA(1) ) { case '!': alt1=1; break; case '@': alt1=2; break; case '$': alt1=3; break; case '%': alt1=4; break; case '^': alt1=5; break; case '&': int LA1_6 = input.LA(2); if ( LA1_6=='&' ) { alt1=24; } else { alt1=6;} break; case '*': int LA1_7 = input.LA(2); if ( LA1_7=='=' ) { alt1=34; } else { alt1=7;} break; case '_': alt1=8; break; case '-': switch ( input.LA(2) ) { case '-': alt1=27; break; case '=': alt1=32; break; default: alt1=9;} break; case '+': switch ( input.LA(2) ) { case '+': alt1=26; break; case '=': alt1=30; break; default: alt1=10;} break; case '|': int LA1_11 = input.LA(2); if ( LA1_11=='|' ) { alt1=23; } else { alt1=11;} break; case ',': alt1=12; break; case '{': alt1=13; break; case '}': alt1=14; break; case '[': alt1=15; break; case ']': alt1=16; break; case '=': switch ( input.LA(2) ) { case '+': alt1=31; break; case '-': alt1=33; break; case '=': alt1=29; break; case '/': alt1=37; break; case '*': alt1=35; break; default: alt1=17;} break; case '/': int LA1_18 = input.LA(2); if ( LA1_18=='=' ) { alt1=36; } else { alt1=18;} break; case '(': alt1=19; break; case ')': alt1=20; break; case '\'': alt1=21; break; case '\\': alt1=22; break; case '<': alt1=25; break; case '>': int LA1_24 = input.LA(2); if ( LA1_24=='>' ) { int LA1_45 = input.LA(3); if ( LA1_45=='=' ) { alt1=38; } else if ( LA1_45=='>' ) { alt1=28; } else { if (backtracking>0) {failed=true; return ;} NoViableAltException nvae = new NoViableAltException("1011:1: MISC : ( \'!\' | \'@\' | \'$\' | \'%\' | \'^\' | \'&\' | \'*\' | \'_\' | \'-\' | \'+\' | \'|\' | \',\' | \'{\' | \'}\' | \'[\' | \']\' | \'=\' | \'/\' | \'(\' | \')\' | \'\\\'\' | \'\\\\\' | \'||\' | \'&&\' | \'<<<\' | \'++\' | \'--\' | \'>>>\' | \'==\' | \'+=\' | \'=+\' | \'-=\' | \'=-\' | \'*=\' | \'=*\' | \'/=\' | \'=/\' | \'>>=\' );", 1, 45, input); throw nvae; } } else { if (backtracking>0) {failed=true; return ;} NoViableAltException nvae = new NoViableAltException("1011:1: MISC : ( \'!\' | \'@\' | \'$\' | \'%\' | \'^\' | \'&\' | \'*\' | \'_\' | \'-\' | \'+\' | \'|\' | \',\' | \'{\' | \'}\' | \'[\' | \']\' | \'=\' | \'/\' | \'(\' | \')\' | \'\\\'\' | \'\\\\\' | \'||\' | \'&&\' | \'<<<\' | \'++\' | \'--\' | \'>>>\' | \'==\' | \'+=\' | \'=+\' | \'-=\' | \'=-\' | \'*=\' | \'=*\' | \'/=\' | \'=/\' | \'>>=\' );", 1, 24, input); throw nvae; } break; default: if (backtracking>0) {failed=true; return ;} NoViableAltException nvae = new NoViableAltException("1011:1: MISC : ( \'!\' | \'@\' | \'$\' | \'%\' | \'^\' | \'&\' | \'*\' | \'_\' | \'-\' | \'+\' | \'|\' | \',\' | \'{\' | \'}\' | \'[\' | \']\' | \'=\' | \'/\' | \'(\' | \')\' | \'\\\'\' | \'\\\\\' | \'||\' | \'&&\' | \'<<<\' | \'++\' | \'--\' | \'>>>\' | \'==\' | \'+=\' | \'=+\' | \'-=\' | \'=-\' | \'*=\' | \'=*\' | \'/=\' | \'=/\' | \'>>=\' );", 1, 0, input); throw nvae; } switch (alt1) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:17: '!' { match('!'); if (failed) return ; } break; case 2 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:23: '@' { match('@'); if (failed) return ; } break; case 3 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:29: '$' { match('$'); if (failed) return ; } break; case 4 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:35: '%' { match('%'); if (failed) return ; } break; case 5 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:41: '^' { match('^'); if (failed) return ; } break; case 6 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:47: '&' { match('&'); if (failed) return ; } break; case 7 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:53: '*' { match('*'); if (failed) return ; } break; case 8 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:59: '_' { match('_'); if (failed) return ; } break; case 9 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:65: '-' { match('-'); if (failed) return ; } break; case 10 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1012:71: '+' { match('+'); if (failed) return ; } break; case 11 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:19: '|' { match('|'); if (failed) return ; } break; case 12 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:25: ',' { match(','); if (failed) return ; } break; case 13 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:31: '{' { match('{'); if (failed) return ; } break; case 14 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:37: '}' { match('}'); if (failed) return ; } break; case 15 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:43: '[' { match('['); if (failed) return ; } break; case 16 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:49: ']' { match(']'); if (failed) return ; } break; case 17 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:55: '=' { match('='); if (failed) return ; } break; case 18 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:61: '/' { match('/'); if (failed) return ; } break; case 19 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:67: '(' { match('('); if (failed) return ; } break; case 20 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:73: ')' { match(')'); if (failed) return ; } break; case 21 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:79: '\'' { match('\''); if (failed) return ; } break; case 22 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1013:86: '\\' { match('\\'); if (failed) return ; } break; case 23 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:19: '||' { match("||"); if (failed) return ; } break; case 24 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:26: '&&' { match("&&"); if (failed) return ; } break; case 25 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:33: '<<<' { match("<<<"); if (failed) return ; } break; case 26 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:41: '++' { match("++"); if (failed) return ; } break; case 27 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:48: '--' { match("--"); if (failed) return ; } break; case 28 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:55: '>>>' { match(">>>"); if (failed) return ; } break; case 29 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:63: '==' { match("=="); if (failed) return ; } break; case 30 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:70: '+=' { match("+="); if (failed) return ; } break; case 31 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:77: '=+' { match("=+"); if (failed) return ; } break; case 32 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:84: '-=' { match("-="); if (failed) return ; } break; case 33 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:91: '=-' { match("=-"); if (failed) return ; } break; case 34 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:97: '*=' { match("*="); if (failed) return ; } break; case 35 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1014:104: '=*' { match("=*"); if (failed) return ; } break; case 36 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1015:19: '/=' { match("/="); if (failed) return ; } break; case 37 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1015:26: '=/' { match("=/"); if (failed) return ; } break; case 38 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1015:33: '>>=' { match(">>="); if (failed) return ; } break; } if ( token==null ) {emit(type,line,charPosition,channel,start,getCharIndex()-1);} } finally { if ( backtracking>0 ) { memoize(input, 48, MISC_StartIndex); } } } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/cb210a30853642e270a3bba6ce570409f6046852/RuleParserLexer.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
7492,
2312,
1435,
1216,
9539,
288,
3639,
509,
20806,
2312,
67,
16792,
273,
810,
18,
1615,
5621,
3639,
775,
288,
5411,
509,
618,
273,
20806,
2312,
31,
5411,
509,
787,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
7492,
2312,
1435,
1216,
9539,
288,
3639,
509,
20806,
2312,
67,
16792,
273,
810,
18,
1615,
5621,
3639,
775,
288,
5411,
509,
618,
273,
20806,
2312,
31,
5411,
509,
787,
273,
... |
Method m = null; | private Object processResolution(Object obj, int handle) throws IOException { if (obj instanceof Serializable) { Method m = null; try { Class classArgs[] = {}; m = getMethod(obj.getClass(), "readResolve", classArgs); obj = m.invoke(obj, new Object[] {}); } catch (NoSuchMethodException ignore) { } catch (IllegalAccessException ignore) { } catch (InvocationTargetException ignore) { } } if (this.resolveEnabled) obj = resolveObject(obj); this.objectLookupTable.put(new Integer(handle), new ObjectIdentityWrapper(obj)); return obj; } | 13625 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13625/287ecb3eab399e579158e4cbd037261f67ffbc1b/ObjectInputStream.java/clean/libjava/java/io/ObjectInputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1033,
1207,
11098,
12,
921,
1081,
16,
509,
1640,
13,
565,
1216,
1860,
225,
288,
565,
309,
261,
2603,
1276,
13687,
13,
1377,
288,
540,
202,
698,
202,
225,
288,
202,
565,
1659,
667,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
1207,
11098,
12,
921,
1081,
16,
509,
1640,
13,
565,
1216,
1860,
225,
288,
565,
309,
261,
2603,
1276,
13687,
13,
1377,
288,
540,
202,
698,
202,
225,
288,
202,
565,
1659,
667,... | |
if (changeSupport != null) changeSupport.firePropertyChange(propertyName, new Boolean(oldValue), new Boolean(newValue)); | public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) { //Reports a bound property change. } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/0788b89b7368770a1157f825d60dd8c5a9df183e/JComponent.java/buggy/core/src/classpath/javax/javax/swing/JComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
430,
261,
3427,
6289,
480,
446,
13,
2549,
6289,
18,
12179,
1396,
3043,
12,
4468,
461,
16,
394,
3411,
12,
1673,
620,
3631,
394,
3411,
12,
2704,
620,
10019,
918,
430,
261,
3427,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
430,
261,
3427,
6289,
480,
446,
13,
2549,
6289,
18,
12179,
1396,
3043,
12,
4468,
461,
16,
394,
3411,
12,
1673,
620,
3631,
394,
3411,
12,
2704,
620,
10019,
918,
430,
261,
3427,... | |
return (String) getAttributes().get("Dbxref"); | if (getAttributes().containsKey("Dbxref")) { return (String) ((List) getAttributes().get("Dbxref")).get(0); } else { return null; } | public String getDbxref () { return (String) getAttributes().get("Dbxref"); } | 7196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7196/53585784207cc13f317ffd109ae7ac6ccf818d8c/GFF3Record.java/buggy/flymine/src/java/org/flymine/io/gff3/GFF3Record.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
11188,
22044,
1832,
288,
3639,
309,
261,
588,
2498,
7675,
12298,
653,
2932,
4331,
22044,
6,
3719,
288,
327,
261,
780,
13,
14015,
682,
13,
10183,
7675,
588,
2932,
4331,
22044,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
11188,
22044,
1832,
288,
3639,
309,
261,
588,
2498,
7675,
12298,
653,
2932,
4331,
22044,
6,
3719,
288,
327,
261,
780,
13,
14015,
682,
13,
10183,
7675,
588,
2932,
4331,
22044,
7... |
slot = slotAvailableDueToAlignment; slotAvailableDueToAlignment = 0; } else | slot = slotAvailableDueToAlignment; slotAvailableDueToAlignment = 0; } else | public static synchronized int allocateSlot(byte description) { int slot = nextSlot; if (slot > slots.length - 2) { // !!TODO: enlarge slots[] and descriptions[], and modify jtoc register to // point to newly enlarged slots[] // NOTE: very tricky on IA32 because opt uses 32 bit literal address to access jtoc. VM.sysFail("VM_Statics.allocateSlot: jtoc is full"); } // allocate two slots for long or double ////-#if RVM_FOR_64_ADDR if ((description & WIDE_TAG) == 0 && slotAvailableDueToAlignment != 0) { slot = slotAvailableDueToAlignment; slotAvailableDueToAlignment = 0; } else //-#endif if ((description & WIDE_TAG) != 0) { nextSlot += 2; } else {//-#if RVM_FOR_64_ADDR slotAvailableDueToAlignment = nextSlot + 1; descriptions[slotAvailableDueToAlignment] = EMPTY; nextSlot += 2;//-#else nextSlot += 1;//-#endif } descriptions[slot] = description; if (VM.TraceStatics) VM.sysWrite("VM_Statics: allocated jtoc slot " + slot + " for " + getSlotDescriptionAsString(slot) + "\n"); return slot; } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/4d43d71de6946e911af26443f095a3da8c15700a/VM_Statics.java/buggy/rvm/src/vm/runtime/VM_Statics.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
3852,
509,
10101,
8764,
12,
7229,
2477,
13,
288,
565,
509,
4694,
273,
1024,
8764,
31,
565,
309,
261,
14194,
405,
12169,
18,
2469,
300,
576,
13,
288,
1377,
368,
401,
5,
6241,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
509,
10101,
8764,
12,
7229,
2477,
13,
288,
565,
509,
4694,
273,
1024,
8764,
31,
565,
309,
261,
14194,
405,
12169,
18,
2469,
300,
576,
13,
288,
1377,
368,
401,
5,
6241,
... |
createSite(componentEditor, desc, input); | private IEditorReference openEditorFromInput(IEditorReference ref,IFileEditorInput input, boolean setVisible) throws PartInitException { IFile file = input.getFile(); // If there is a registered editor for the file use it. EditorDescriptor desc = (EditorDescriptor) getEditorRegistry().getDefaultEditor(file); if (desc != null) { return openEditorFromDescriptor(ref,desc, input); } // Try to open an OLE editor. IEditorPart componentEditor = ComponentSupport.getComponentEditor(file); if (componentEditor != null) { ((Editor)ref).setPart(componentEditor); createSite(componentEditor, desc, input); createEditorTab(ref, null, input, setVisible); Workbench wb = (Workbench) window.getWorkbench(); wb.getEditorHistory().add(input, desc); return ref; } // Try to open a system editor. if (testForSystemEditor(file)) { openSystemEditor(file); Workbench wb = (Workbench) window.getWorkbench(); wb.getEditorHistory().add(input, desc); return null; } // There is no registered editor. // Use the default text editor. desc = (EditorDescriptor) getEditorRegistry().getDefaultEditor(); return openEditorFromDescriptor(ref,desc, input); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/4dbfd3e0d6618a684db4fe66cd6486ba3c39862f/EditorManager.java/clean/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/EditorManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
6946,
2404,
1696,
6946,
1265,
1210,
12,
45,
6946,
2404,
1278,
16,
45,
812,
6946,
1210,
810,
16,
1250,
16697,
13,
1216,
6393,
2570,
503,
288,
202,
202,
45,
812,
585,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
6946,
2404,
1696,
6946,
1265,
1210,
12,
45,
6946,
2404,
1278,
16,
45,
812,
6946,
1210,
810,
16,
1250,
16697,
13,
1216,
6393,
2570,
503,
288,
202,
202,
45,
812,
585,
273,... | |
myEnv.alwaysHasNativeFrame = true; myEnv.JNITopJavaFP = VM_Address.fromInt(VM_Constants.STACKFRAME_SENTINAL_FP); myEnv.savedPRreg = nativeVP; myEnv.savedTIreg = VM_Magic.getThreadId(); | myEnv.setFromNative( VM_Address.fromInt(VM_Constants.STACKFRAME_SENTINAL_FP), nativeVP, VM_Magic.getThreadId()); | public void run() //- overrides VM_Thread { if (VM.TraceThreads) VM_Scheduler.trace("VM_JNIStartUp", "run"); if (trace) { System.out.println("VM_JNIStartUp: Java thread " + VM.intAsHexString(VM_Magic.objectAsAddress(VM_Thread.getCurrentThread()).toInt()) + " attaching external pthread " + pthreadID + "\n"); System.out.println("JNIEnv to be placed at " + VM.intAsHexString(externalJNIEnvAddress.toInt())); } // before executing the following code, bind ourselves to the current processor VM_Processor currentVP = VM_Processor.getCurrentProcessor(); VM_Thread.getCurrentThread().processorAffinity = currentVP; // Set up the JNICleanUpThread that will signal the external pthread // it will also be bound to the same processor VM_JNICreateVMFinishThread cleanupThread = new VM_JNICreateVMFinishThread(VM_Thread.getCurrentThread(), externalJNIEnvAddress, currentVP); // get it going cleanupThread.start(currentVP.readyQueue); // wait for it to come up if (trace) { System.out.println("VM_JNIStartUp: AttachCurrentThread waiting for clean up thread"); } while (!cleanupThread.ready) { VM_Thread.getCurrentThread().yield(); } /*************************************************************************** * Now we prepare the data structure to create the appearance that the Java main * thread has made a native method call and is executing in the native pthread */ // Set up the native VM_Processor to associate with the external pthread VM_Processor nativeVP = VM_Processor.createNativeProcessorForExistingOSThread(VM_Thread.getCurrentThread()); VM_Thread.getCurrentThread().nativeAffinity = nativeVP; // register the vpStatusAddress for this thread in the VM_JNIEnvironment.JNIFunctionPointers // this is normally done in the prolog of the native method on the Java to C transition VM_JNIEnvironment.JNIFunctionPointers[(VM_Thread.getCurrentThread().getIndex() * 2) + 1] = nativeVP.vpStatusAddress.toInt(); // normally done by StartupThread nativeVP.pthread_id = pthreadID; ++nativeVP.threadSwitchingEnabledCount; // Set up the JNI environment for this thread for the external pthread // to make JNI calls VM_JNIEnvironment myEnv = VM_Thread.getCurrentThread().getJNIEnv(); myEnv.alwaysHasNativeFrame = true; // indicate that no stack resize should occur myEnv.JNITopJavaFP = VM_Address.fromInt(VM_Constants.STACKFRAME_SENTINAL_FP); // indicate to GC that no Java stack frame below this point myEnv.savedPRreg = nativeVP; // make sure no locking is done after this point or lock info may be lost myEnv.savedTIreg = VM_Magic.getThreadId(); // set affinity so JNI calls will get scheduled on this VM_Processor VM_Thread.getCurrentThread().returnAffinity = VM_Processor.getCurrentProcessor(); if (trace) { System.out.println("VM_JNIStartUp: attach done, moving thread to native VM_Processor ... "); } // take this main thread off the current VM_Processor // from this point, it exists on the native VM_Processor and will // only resume execution when the associated pthread make a JNI call VM_Thread.getCurrentThread().beingDispatched = true; cleanupThread.proceedToFinish = true; VM_Thread.morph(); // Resume execution here when the associated pthread attempts to detach // The thread state is restored here by JNIServiceThread // We are now running on the original Java stack instead of the pthread stack if (trace) { System.out.println("VM_JNIStartUp: attached thread terminated, " + Thread.currentThread().getName() + ", " + VM.intAsHexString(VM_Magic.objectAsAddress(VM_Thread.getCurrentThread()).toInt())); } // remove the VP data structure from the list maintained for GC if (VM_Processor.unregisterAttachedProcessor(nativeVP)==0) VM.sysWrite("ERROR: VM_Processor for JNI_CreateJavaVM was not registered\n"); VM_Thread.terminate(); } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/66bf0388b8c9d935e76afce0f4f488ab54ce6b40/VM_JNIStartUp.java/buggy/rvm/src/vm/scheduler/VM_JNIStartUp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1086,
1435,
368,
17,
9515,
8251,
67,
3830,
225,
288,
565,
309,
261,
7397,
18,
3448,
13233,
13,
8251,
67,
11870,
18,
5129,
2932,
7397,
67,
46,
50,
45,
1685,
1211,
3113,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
1435,
368,
17,
9515,
8251,
67,
3830,
225,
288,
565,
309,
261,
7397,
18,
3448,
13233,
13,
8251,
67,
11870,
18,
5129,
2932,
7397,
67,
46,
50,
45,
1685,
1211,
3113,
315,
... |
public Method getIndexedReadMethod() { | public Method getIndexedReadMethod() { | public Method getIndexedReadMethod() { return getIndex; } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/cfc66449c23ffe38c77e15d3ba7c3a3a19b7ff5c/IndexedPropertyDescriptor.java/buggy/core/src/classpath/java/java/beans/IndexedPropertyDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2985,
8088,
329,
1994,
1305,
1435,
288,
202,
202,
2463,
8088,
31,
202,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2985,
8088,
329,
1994,
1305,
1435,
288,
202,
202,
2463,
8088,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
this.constant = new Float(constantSource); | constant = new Float(constantSource); | public Object getConstant() throws JavaModelException { if (this.constant != null) { return this.constant; } SourceFieldElementInfo info = (SourceFieldElementInfo) getElementInfo(); if (info.initializationSource == null) { return null; } String constantSource = new String(info.initializationSource); String signature = info.getTypeSignature(); if (signature.equals(Signature.SIG_INT)) { this.constant = new Integer(constantSource); } else if (signature.equals(Signature.SIG_SHORT)) { this.constant = new Short(constantSource); } else if (signature.equals(Signature.SIG_BYTE)) { this.constant = new Byte(constantSource); } else if (signature.equals(Signature.SIG_BOOLEAN)) { this.constant = new Boolean(constantSource); } else if (signature.equals(Signature.SIG_CHAR)) { this.constant = new Character(constantSource.charAt(0)); } else if (signature.equals(Signature.SIG_DOUBLE)) { this.constant = new Double(constantSource); } else if (signature.equals(Signature.SIG_FLOAT)) { this.constant = new Float(constantSource); } else if (signature.equals(Signature.SIG_LONG)) { this.constant = new Long(constantSource); } else if (signature.equals("QString;")) {//$NON-NLS-1$ this.constant = constantSource; } return this.constant;} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/7acc82a1aa09d7f270cc2a9bb108a01a76d98132/SourceField.java/buggy/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceField.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1033,
24337,
1435,
1216,
5110,
1488,
503,
288,
202,
430,
261,
2211,
18,
14384,
480,
446,
13,
288,
202,
202,
2463,
333,
18,
14384,
31,
202,
97,
202,
1830,
974,
1046,
966,
1123,
273,
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,
1071,
1033,
24337,
1435,
1216,
5110,
1488,
503,
288,
202,
430,
261,
2211,
18,
14384,
480,
446,
13,
288,
202,
202,
2463,
333,
18,
14384,
31,
202,
97,
202,
1830,
974,
1046,
966,
1123,
273,
261... |
z0 = z0 << 9 | z0 >>> -9; | z0 = z0 << 9 | z0 >>> (32 - 9); | private void block(final int p, final int x0, final int x1) { if (DEBUG) { debug("block ("+block+") x0="+x0+" x1="+x1+" p="+p); } z0 += z3; z3 = z3 << 15 | z3 >>> -15; z1 += z4; z4 = z4 << 25 | z4 >>> -25; z2 ^= z0; z0 = z0 << 9 | z0 >>> -9; z3 ^= z1; z1 = z1 << 10 | z1 >>> -10; z4 += z2; z2 = z2 << 17 | z2 >>> -17; z0 ^= z3 + x0; z3 = z3 << 30 | z3 >>> -30; z1 ^= z4; z4 = z4 << 13 | z4 >>> -13; z2 += z0; z0 = z0 << 20 | z0 >>> -20; z3 += z1; z1 = z1 << 11 | z1 >>> -11; z4 ^= z2; z2 = z2 << 5 | z2 >>> -5; z0 += z3 ^ p; z3 = z3 << 15 | z3 >>> -15; z1 += z4; z4 = z4 << 25 | z4 >>> -25; z2 ^= z0; z0 = z0 << 9 | z0 >>> -9; z3 ^= z1; z1 = z1 << 10 | z1 >>> -10; z4 += z2; z2 = z2 << 17 | z2 >>> -17; z0 ^= z3 + x1; z3 = z3 << 30 | z3 >>> -30; z1 ^= z4; z4 = z4 << 13 | z4 >>> -13; z2 += z0; z0 = z0 << 20 | z0 >>> -20; z3 += z1; z1 = z1 << 11 | z1 >>> -11; z4 ^= z2; z2 = z2 << 5 | z2 >>> -5; } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/fc02ca698d90e3be595a4ac315bc39890c8510f1/Helix.java/buggy/libraries/javalib/gnu/crypto/exp/Helix.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
918,
1203,
12,
6385,
509,
293,
16,
727,
509,
619,
20,
16,
727,
509,
619,
21,
13,
288,
1377,
309,
261,
9394,
13,
288,
540,
1198,
2932,
2629,
7566,
15,
2629,
15,
7923,
619,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1203,
12,
6385,
509,
293,
16,
727,
509,
619,
20,
16,
727,
509,
619,
21,
13,
288,
1377,
309,
261,
9394,
13,
288,
540,
1198,
2932,
2629,
7566,
15,
2629,
15,
7923,
619,
20,
... |
int iStyle = ( fdCurrent.isSetBold( ) && fdCurrent.isBold( ) ) ? SWT.BOLD : SWT.NORMAL; iStyle |= ( fdCurrent.isSetItalic( ) && fdCurrent.isItalic( ) ) ? SWT.ITALIC : iStyle; | int iStyle = ( fdCurrent.isSetBold( ) && fdCurrent.isBold( ) ) ? SWT.BOLD : SWT.NORMAL; iStyle |= ( fdCurrent.isSetItalic( ) && fdCurrent.isItalic( ) ) ? SWT.ITALIC : iStyle; | public void paintControl( PaintEvent pe ) { Font fSize = null; Font fCurrent = null; Color cFore = null; Color cBack = null; GC gc = pe.gc; Font fOld = gc.getFont( ); if ( !this.isEnabled( ) ) { cFore = Display.getCurrent( ).getSystemColor( SWT.COLOR_DARK_GRAY ); cBack = Display.getCurrent( ) .getSystemColor( SWT.COLOR_WIDGET_BACKGROUND ); } else { cBack = Display.getCurrent( ) .getSystemColor( SWT.COLOR_LIST_BACKGROUND ); if ( cdCurrent != null && bUseColor && cdCurrent.getTransparency( ) > 0 ) { cFore = new Color( this.getDisplay( ), cdCurrent.getRed( ), cdCurrent.getGreen( ), cdCurrent.getBlue( ) ); } else { cFore = new Color( this.getDisplay( ), 0, 0, 0 ); } } gc.setForeground( cFore ); gc.setBackground( cBack ); gc.fillRectangle( 0, 0, this.getSize( ).x, this.getSize( ).y ); if ( fdCurrent != null ) { // Handle styles int iStyle = ( fdCurrent.isSetBold( ) && fdCurrent.isBold( ) ) ? SWT.BOLD : SWT.NORMAL; iStyle |= ( fdCurrent.isSetItalic( ) && fdCurrent.isItalic( ) ) ? SWT.ITALIC : iStyle; String sFontName = ChartUIUtil.getFontName( fdCurrent ); if ( !bUseSize ) { gc.setClipping( 2, 2, this.getSize( ).x - 40, 26 ); fCurrent = new Font( this.getDisplay( ), ChartUIUtil.getFontName( fdCurrent ), fOld.getFontData( )[0].getHeight( ), iStyle ); } else { fCurrent = new Font( this.getDisplay( ), ChartUIUtil.getFontName( fdCurrent ), fdCurrent.isSetSize( ) ? (int) fdCurrent.getSize( ) : 9, iStyle ); } gc.setFont( fCurrent ); // Calculate the location to render text int iStartX = 5; int iStartY = 3; if ( bUseAlignment ) { if ( ChartUIUtil.getFontTextAlignment( fdCurrent ) .getHorizontalAlignment( ) .equals( HorizontalAlignment.LEFT_LITERAL ) ) { iStartX = 5; } else if ( ChartUIUtil.getFontTextAlignment( fdCurrent ) .getHorizontalAlignment( ) .equals( HorizontalAlignment.CENTER_LITERAL ) ) { iStartX = this.getSize( ).x / 2 - ( getStringWidth( gc, sFontName ).x / 2 ); } else if ( ChartUIUtil.getFontTextAlignment( fdCurrent ) .getHorizontalAlignment( ) .equals( HorizontalAlignment.RIGHT_LITERAL ) ) { iStartX = this.getSize( ).x - getStringWidth( gc, sFontName ).x - 5; } if ( ChartUIUtil.getFontTextAlignment( fdCurrent ) .getVerticalAlignment( ) .equals( VerticalAlignment.TOP_LITERAL ) ) { iStartY = 3; } else if ( ChartUIUtil.getFontTextAlignment( fdCurrent ) .getVerticalAlignment( ) .equals( VerticalAlignment.CENTER_LITERAL ) ) { iStartY = ( this.getSize( ).y / 2 ); if ( bUseSize ) { iStartY -= ( getStringWidth( gc, sFontName ).y / 2 ); } else { iStartY -= 15; } } else if ( ChartUIUtil.getFontTextAlignment( fdCurrent ) .getVerticalAlignment( ) .equals( VerticalAlignment.BOTTOM_LITERAL ) ) { iStartY = this.getSize( ).y; if ( bUseSize ) { iStartY -= ( getStringWidth( gc, sFontName ).y ) + 5; } else { iStartY -= 30; } } } gc.drawText( sFontName, iStartX, iStartY ); if ( fdCurrent.isUnderline( ) ) { gc.drawLine( iStartX, iStartY + getStringWidth( gc, sFontName ).y - gc.getFontMetrics( ).getDescent( ), iStartX + getStringWidth( gc, sFontName ).x - gc.getFontMetrics( ).getDescent( ), iStartY + getStringWidth( gc, sFontName ).y - gc.getFontMetrics( ).getDescent( ) ); } if ( fdCurrent.isStrikethrough( ) ) { gc.drawLine( iStartX, iStartY + ( getStringWidth( gc, sFontName ).y / 2 ) + 1, iStartX + getStringWidth( gc, sFontName ).x, iStartY + ( getStringWidth( gc, sFontName ).y / 2 ) + 1 ); } if ( !bUseSize ) { gc.setClipping( 1, 1, this.getSize( ).x, this.getSize( ).y ); fSize = new Font( this.getDisplay( ), "Sans-Serif", fOld.getFontData( )[0].getHeight( ), SWT.NORMAL ); //$NON-NLS-1$ gc.setFont( fSize ); String sizeString = "(" + ( fdCurrent.isSetSize( ) ? String.valueOf( (int) fdCurrent.getSize( ) ) : "Auto" ) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ Point pt = gc.textExtent( sizeString ); gc.drawText( sizeString, this.getSize( ).x - pt.x - this.getBorderWidth( ) - 2, ( this.getSize( ).y - pt.y ) / 2 - 1 ); fSize.dispose( ); } fCurrent.dispose( ); } if ( this.isEnabled( ) ) { cFore.dispose( ); } gc.setFont( fOld ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/cd5c8813518e43fa93c7914cef141f1d45fc4d06/FontCanvas.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/FontCanvas.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
12574,
3367,
12,
30001,
1133,
2804,
262,
202,
95,
202,
202,
5711,
284,
1225,
273,
446,
31,
202,
202,
5711,
284,
3935,
273,
446,
31,
202,
202,
2957,
276,
13573,
273,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
12574,
3367,
12,
30001,
1133,
2804,
262,
202,
95,
202,
202,
5711,
284,
1225,
273,
446,
31,
202,
202,
5711,
284,
3935,
273,
446,
31,
202,
202,
2957,
276,
13573,
273,
446,
... |
for (Iterator it=issues.iterator(); it.hasNext();) { | for (Iterator it = issues.iterator(); it.hasNext();) { | public void evaluate(Set issues) { for (Iterator it=issues.iterator(); it.hasNext();) { Issue issue = (Issue)it.next(); Resolution resolution = issue.getResolutionObject(); // If at least one issue is resolved. if (resolution != null) { throw new AcceptanceException(issue.getKey() + " issue must be in UNRESOLVED."); } } } | 58796 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58796/3a12b316e4266ecc9fb2b36be6a7239a85be389a/AreIssuesUnresolvedPredicate.java/buggy/src/java/com/atlassian/jira/ext/commitacceptance/server/evaluator/predicate/AreIssuesUnresolvedPredicate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
5956,
12,
694,
8296,
13,
288,
202,
202,
1884,
261,
3198,
518,
33,
9618,
18,
9838,
5621,
518,
18,
5332,
2134,
5621,
13,
288,
1082,
202,
12956,
5672,
273,
261,
12956,
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,
225,
202,
482,
918,
5956,
12,
694,
8296,
13,
288,
202,
202,
1884,
261,
3198,
518,
33,
9618,
18,
9838,
5621,
518,
18,
5332,
2134,
5621,
13,
288,
1082,
202,
12956,
5672,
273,
261,
12956,
13,
... |
jsFunction_setMonth(args)); | makeDate(args, 2, true)); | public Object execMethod (int methodId, IdFunction f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { if (prototypeFlag) { switch (methodId) { case ConstructorId_UTC: return wrap_double(jsStaticFunction_UTC(args)); case ConstructorId_parse: return wrap_double(jsStaticFunction_parse (ScriptRuntime.toString(args, 0))); case Id_constructor: return jsConstructor(args, thisObj == null); case Id_toString: return realThis(thisObj, f, true). jsFunction_toString(); case Id_toTimeString: return realThis(thisObj, f, true). jsFunction_toTimeString(); case Id_toDateString: return realThis(thisObj, f, true). jsFunction_toDateString(); case Id_toLocaleString: return realThis(thisObj, f, true). jsFunction_toLocaleString(); case Id_toLocaleTimeString: return realThis(thisObj, f, true). jsFunction_toLocaleTimeString(); case Id_toLocaleDateString: return realThis(thisObj, f, true). jsFunction_toLocaleDateString(); case Id_toGMTString: case Id_toUTCString: return realThis(thisObj, f, true). jsFunction_toUTCString(); case Id_valueOf: return wrap_double(realThis(thisObj, f, true). jsFunction_valueOf()); case Id_getTime: return wrap_double(realThis(thisObj, f, true). jsFunction_getTime()); case Id_getYear: return wrap_double(realThis(thisObj, f, true). jsFunction_getYear(cx)); case Id_getFullYear: return wrap_double(realThis(thisObj, f, true). jsFunction_getFullYear()); case Id_getUTCFullYear: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCFullYear()); case Id_getMonth: return wrap_double(realThis(thisObj, f, true). jsFunction_getMonth()); case Id_getUTCMonth: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCMonth()); case Id_getDate: return wrap_double(realThis(thisObj, f, true). jsFunction_getDate()); case Id_getUTCDate: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCDate()); case Id_getDay: return wrap_double(realThis(thisObj, f, true). jsFunction_getDay()); case Id_getUTCDay: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCDay()); case Id_getHours: return wrap_double(realThis(thisObj, f, true). jsFunction_getHours()); case Id_getUTCHours: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCHours()); case Id_getMinutes: return wrap_double(realThis(thisObj, f, true). jsFunction_getMinutes()); case Id_getUTCMinutes: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCMinutes()); case Id_getSeconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getSeconds()); case Id_getUTCSeconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCSeconds()); case Id_getMilliseconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getMilliseconds()); case Id_getUTCMilliseconds: return wrap_double(realThis(thisObj, f, true). jsFunction_getUTCMilliseconds()); case Id_getTimezoneOffset: return wrap_double(realThis(thisObj, f, true). jsFunction_getTimezoneOffset()); case Id_setTime: return wrap_double(realThis(thisObj, f, true). jsFunction_setTime(ScriptRuntime.toNumber(args, 0))); case Id_setMilliseconds: return wrap_double(realThis(thisObj, f, false). jsFunction_setMilliseconds(args)); case Id_setUTCMilliseconds: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCMilliseconds(args)); case Id_setSeconds: return wrap_double(realThis(thisObj, f, false). jsFunction_setSeconds(args)); case Id_setUTCSeconds: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCSeconds(args)); case Id_setMinutes: return wrap_double(realThis(thisObj, f, false). jsFunction_setMinutes(args)); case Id_setUTCMinutes: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCMinutes(args)); case Id_setHours: return wrap_double(realThis(thisObj, f, false). jsFunction_setHours(args)); case Id_setUTCHours: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCHours(args)); case Id_setDate: return wrap_double(realThis(thisObj, f, false). jsFunction_setDate(args)); case Id_setUTCDate: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCDate(args)); case Id_setMonth: return wrap_double(realThis(thisObj, f, false). jsFunction_setMonth(args)); case Id_setUTCMonth: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCMonth(args)); case Id_setFullYear: return wrap_double(realThis(thisObj, f, false). jsFunction_setFullYear(args)); case Id_setUTCFullYear: return wrap_double(realThis(thisObj, f, false). jsFunction_setUTCFullYear(args)); case Id_setYear: return wrap_double(realThis(thisObj, f, true). jsFunction_setYear(ScriptRuntime.toNumber(args, 0))); } } return super.execMethod(methodId, f, cx, scope, thisObj, args); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/fb69c14ae4e860dfb5b5df7d866e510acca73ed9/NativeDate.java/clean/js/rhino/src/org/mozilla/javascript/NativeDate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
284,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
284,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
... |
values[i] = runtime.getNil(); | values[i] = getRuntime().getNil(); | public IRubyObject initialize(IRubyObject[] args) { modify(); int size = RubyNumeric.fix2int(getInstanceVariable(getMetaClass(), "__size__")); if (args.length > size) { throw new ArgumentError(runtime, "struct size differs (" + args.length +" for " + size + ")"); } for (int i = 0; i < args.length; i++) { values[i] = args[i]; } for (int i = args.length; i < size; i++) { values[i] = runtime.getNil(); } return runtime.getNil(); } | 49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyStruct.java/clean/src/org/jruby/RubyStruct.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
4046,
12,
7937,
10340,
921,
8526,
833,
13,
288,
3639,
5612,
5621,
3639,
509,
963,
273,
19817,
9902,
18,
904,
22,
474,
12,
588,
1442,
3092,
12,
588,
2781,
797,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15908,
10340,
921,
4046,
12,
7937,
10340,
921,
8526,
833,
13,
288,
3639,
5612,
5621,
3639,
509,
963,
273,
19817,
9902,
18,
904,
22,
474,
12,
588,
1442,
3092,
12,
588,
2781,
797,
9... |
if (log.isTraceEnabled()) { log.trace("creating new non-durable subscription on " + coreDestination); } subscription = new Subscription(topic, selector, ms); } else { | public ConsumerDelegate createConsumerDelegate(Destination jmsDestination, String selector, boolean noLocal, String subscriptionName, boolean isCC) throws JMSException { if (closed) { throw new IllegalStateException("Session is closed"); } if ("".equals(selector)) { selector = null; } JBossDestination d = (JBossDestination)jmsDestination; if (log.isTraceEnabled()) { log.trace("creating consumer endpoint for " + d + ", selector " + selector + ", " + (noLocal ? "noLocal, " : "") + "subscription " + subscriptionName); } if (d.isTemporary()) { // Can only create a consumer for a temporary destination on the same connection // that created it if (!this.connectionEndpoint.temporaryDestinations.contains(d)) { String msg = "Cannot create a message consumer on a different connection " + "to that which created the temporary destination"; throw new IllegalStateException(msg); } } // look-up destination DestinationManagerImpl dm = serverPeer.getDestinationManager(); Distributor destination = dm.getCoreDestination(jmsDestination); if (destination == null) { throw new InvalidDestinationException("No such destination: " + jmsDestination); } String consumerID = new GUID().toString(); if (callbackHandler == null) { throw new JMSException("null callback handler"); } Subscription subscription = null; if (d.isTopic()) { MessageStore ms = connectionEndpoint.getServerPeer().getMessageStore(); Topic topic = (Topic)destination; if (subscriptionName != null) { // look-up the durable subscription String clientID = connectionEndpoint.getClientID(); if (clientID == null) { throw new JMSException("Cannot create durable subscriber without having set client ID"); } // it's a durable subscription - have we already got one with that name? DurableSubscriptionStoreDelegate dsd = serverPeer.getDurableSubscriptionStoreDelegate(); subscription = dsd.getDurableSubscription(clientID, subscriptionName); if (subscription == null) { if (log.isTraceEnabled()) { log.trace("creating new durable subscription on " + destination); } subscription = dsd. createDurableSubscription(d.getName(), clientID, subscriptionName, selector); } else { if (log.isTraceEnabled()) { log.trace("subscription " + subscriptionName + " already exists"); } // From javax.jms.Session Javadoc: // A client can change an existing durable subscription by creating a durable // TopicSubscriber with the same name and a new topic and/or message selector. // Changing a durable subscriber is equivalent to unsubscribing (deleting) the old // one and creating a new one. // has the selector changed? boolean selectorChanged = (selector == null && subscription.getSelector() != null) || (subscription.getSelector() == null && selector != null) || (subscription.getSelector() != null && selector != null && !subscription.getSelector().equals(selector)); if (log.isTraceEnabled()) { log.trace("selector " + (selectorChanged ? "has" : "has NOT") + " changed"); } // has the Topic changed? boolean topicChanged = subscription.getTopic() != destination; if (log.isTraceEnabled()) { log.trace("topic " + (topicChanged ? "has" : "has NOT") + " changed"); } if (selectorChanged || topicChanged) { if (log.isTraceEnabled()) { log.trace("topic or selector changed so deleting old subscription"); } boolean removed = dsd. removeDurableSubscription(this.connectionEndpoint.clientID, subscriptionName); if (!removed) { throw new InvalidDestinationException("Cannot find durable subscription " + subscriptionName + " to unsubscribe"); } subscription.unsubscribe(); subscription = null; } } } else { // Non durable subscription if (log.isTraceEnabled()) { log.trace("creating new non-durable subscription on " + destination); } subscription = new Subscription(topic, selector, ms); } } ServerConsumerEndpoint ep = new ServerConsumerEndpoint(consumerID, subscription == null ? (Channel)destination : subscription, callbackHandler, this, selector, noLocal); Dispatcher.singleton.registerTarget(consumerID, new ConsumerAdvised(ep)); ClientConsumerDelegate stub = new ClientConsumerDelegate(consumerID); if (subscription != null) { subscription.subscribe(); } putConsumerDelegate(consumerID, ep); connectionEndpoint.consumers.put(consumerID, ep); log.debug("created and registered " + ep); return stub; } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/0dc5c61313332fb885ca364ec8475d5fc9c37d61/ServerSessionEndpoint.java/clean/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
9326,
9586,
752,
5869,
9586,
12,
5683,
23007,
5683,
16,
309,
261,
1330,
18,
291,
3448,
1526,
10756,
288,
613,
18,
5129,
2932,
23799,
394,
1661,
17,
72,
7463,
4915,
603,
315,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
9326,
9586,
752,
5869,
9586,
12,
5683,
23007,
5683,
16,
309,
261,
1330,
18,
291,
3448,
1526,
10756,
288,
613,
18,
5129,
2932,
23799,
394,
1661,
17,
72,
7463,
4915,
603,
315,
3... | |
criteriaList.add("@f:" + getName() + "!='" + value + "'"); | criteriaList.add("@xp:" + getName() + "!='" + value + "'"); | public void makeQuery(Map map, String prefix, XWikiCriteria query, List criteriaList) { String value = (String)map.get(prefix); if ((value!=null)&&(!value.equals(""))) { String startsWith = (String)map.get(prefix + "startswith"); String endsWith = (String)map.get(prefix + "endswith"); if( "1".equals(startsWith)) criteriaList.add("jcr:like(@f:" + getName() + ", '" + value + "%')"); else if("1".equals(endsWith)) criteriaList.add("jcr:like(@f:" + getName() + ", '%" + value + "')"); else criteriaList.add("jcr:like(@f:" + getName() + ", '%" + value + "%')"); return; } value = (String)map.get(prefix + "exact"); if ((value!=null)&&(!value.equals(""))) { criteriaList.add("@f:" + getName() + "='" + value + "'"); return; } value = (String)map.get(prefix + "not"); if ((value!=null)&&(!value.equals(""))) { criteriaList.add("@f:" + getName() + "!='" + value + "'"); return; } } | 52380 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52380/7062e0263efe566c07676c37ba0c25f530967372/StringClass.java/clean/src/main/java/com/xpn/xwiki/objects/classes/StringClass.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1221,
1138,
12,
863,
852,
16,
514,
1633,
16,
1139,
25438,
7231,
843,
16,
987,
3582,
682,
13,
288,
3639,
514,
460,
273,
261,
780,
13,
1458,
18,
588,
12,
3239,
1769,
3639,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1221,
1138,
12,
863,
852,
16,
514,
1633,
16,
1139,
25438,
7231,
843,
16,
987,
3582,
682,
13,
288,
3639,
514,
460,
273,
261,
780,
13,
1458,
18,
588,
12,
3239,
1769,
3639,
30... |
public Ruleset( org.w3c.dom.css.CSSStyleRule rule, int orig ) { this( orig ); pullPropertiesFromDOMRule( rule ); pullSelectorsFromDOMRule( rule ); | public Ruleset(org.w3c.dom.css.CSSStyleRule rule, int orig) { this(orig); pullPropertiesFromDOMRule(rule); pullSelectorsFromDOMRule(rule); | public Ruleset( org.w3c.dom.css.CSSStyleRule rule, int orig ) { this( orig ); pullPropertiesFromDOMRule( rule ); pullSelectorsFromDOMRule( rule ); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/0bcb35d367c0f0b2a89eb6aabedfe9807525ad3a/Ruleset.java/buggy/src/java/org/xhtmlrenderer/css/sheet/Ruleset.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15718,
278,
12,
2358,
18,
91,
23,
71,
18,
9859,
18,
5212,
18,
10276,
2885,
2175,
1720,
16,
509,
1647,
262,
288,
3639,
333,
12,
1647,
11272,
3639,
6892,
2297,
1265,
8168,
2175,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15718,
278,
12,
2358,
18,
91,
23,
71,
18,
9859,
18,
5212,
18,
10276,
2885,
2175,
1720,
16,
509,
1647,
262,
288,
3639,
333,
12,
1647,
11272,
3639,
6892,
2297,
1265,
8168,
2175,
12,... |
if (obj instanceof Replaceable) obj = ((Replaceable)obj).writeReplace (); | if (obj instanceof Serializable) { Method m = null; try { Class classArgs[] = {}; m = obj.getClass ().getDeclaredMethod ("writeReplace", classArgs); obj = m.invoke (obj, new Object[] {}); } catch (NoSuchMethodException ignore) { } catch (IllegalAccessException ignore) { } catch (InvocationTargetException ignore) { } } | public final void writeObject (Object obj) throws IOException { if (useSubclassMethod) { writeObjectOverride (obj); return; } boolean was_serializing = isSerializing; if (! was_serializing) setBlockDataMode (false); try { isSerializing = true; boolean replaceDone = false; drain (); while (true) { if (obj == null) { realOutput.writeByte (TC_NULL); break; } Integer handle = findHandle (obj); if (handle != null) { realOutput.writeByte (TC_REFERENCE); realOutput.writeInt (handle.intValue ()); break; } if (obj instanceof Class) { realOutput.writeByte (TC_CLASS); writeObject (ObjectStreamClass.lookup ((Class)obj)); assignNewHandle (obj); break; } if (obj instanceof ObjectStreamClass) { ObjectStreamClass osc = (ObjectStreamClass)obj; realOutput.writeByte (TC_CLASSDESC); realOutput.writeUTF (osc.getName ()); realOutput.writeLong (osc.getSerialVersionUID ()); assignNewHandle (obj); int flags = osc.getFlags (); if (protocolVersion == PROTOCOL_VERSION_2 && osc.isExternalizable ()) flags |= SC_BLOCK_DATA; realOutput.writeByte (flags); ObjectStreamField[] fields = osc.fields; realOutput.writeShort (fields.length); ObjectStreamField field; for (int i=0; i < fields.length; i++) { field = fields[i]; realOutput.writeByte (field.getTypeCode ()); realOutput.writeUTF (field.getName ()); if (! field.isPrimitive ()) writeObject (field.getTypeString ()); } setBlockDataMode (true); annotateClass (osc.forClass ()); setBlockDataMode (false); realOutput.writeByte (TC_ENDBLOCKDATA); if (osc.isSerializable ()) writeObject (osc.getSuper ()); else writeObject (null); break; } Object replacedObject = null; if ((replacementEnabled || obj instanceof Replaceable) && ! replaceDone) { replacedObject = obj; if (obj instanceof Replaceable) obj = ((Replaceable)obj).writeReplace (); if (replacementEnabled) obj = replaceObject (obj); replaceDone = true; continue; } if (obj instanceof String) { realOutput.writeByte (TC_STRING); assignNewHandle (obj); realOutput.writeUTF ((String)obj); break; } Class clazz = obj.getClass (); ObjectStreamClass osc = ObjectStreamClass.lookup (clazz); if (osc == null) throw new NotSerializableException (clazz.getName ()); if (clazz.isArray ()) { realOutput.writeByte (TC_ARRAY); writeObject (osc); assignNewHandle (obj); writeArraySizeAndElements (obj, clazz.getComponentType ()); break; } realOutput.writeByte (TC_OBJECT); writeObject (osc); if (replaceDone) assignNewHandle (replacedObject); else assignNewHandle (obj); if (obj instanceof Externalizable) { if (protocolVersion == PROTOCOL_VERSION_2) setBlockDataMode (true); ((Externalizable)obj).writeExternal (this); if (protocolVersion == PROTOCOL_VERSION_2) { setBlockDataMode (false); drain (); } break; } if (obj instanceof Serializable) { currentObject = obj; ObjectStreamClass[] hierarchy = ObjectStreamClass.getObjectStreamClasses (clazz); boolean has_write; for (int i=0; i < hierarchy.length; i++) { currentObjectStreamClass = hierarchy[i]; fieldsAlreadyWritten = false; has_write = currentObjectStreamClass.hasWriteMethod (); writeFields (obj, currentObjectStreamClass.fields, has_write); if (has_write) { drain (); realOutput.writeByte (TC_ENDBLOCKDATA); } } currentObject = null; currentObjectStreamClass = null; currentPutField = null; break; } throw new NotSerializableException (clazz.getName ()); } // end pseudo-loop } catch (IOException e) { realOutput.writeByte (TC_EXCEPTION); reset (true); try { writeObject (e); } catch (IOException ioe) { throw new StreamCorruptedException ("Exception " + ioe + " thrown while exception was being written to stream."); } reset (true); } finally { isSerializing = was_serializing; if (! was_serializing) setBlockDataMode (true); } } | 13625 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13625/f7ce7e1e7ea220277a849d860fa470f665b84a9c/ObjectOutputStream.java/clean/libjava/java/io/ObjectOutputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
16306,
261,
921,
1081,
13,
1216,
1860,
225,
288,
565,
309,
261,
1202,
1676,
1106,
1305,
13,
565,
288,
1377,
16306,
6618,
261,
2603,
1769,
1377,
327,
31,
565,
289,
565,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
16306,
261,
921,
1081,
13,
1216,
1860,
225,
288,
565,
309,
261,
1202,
1676,
1106,
1305,
13,
565,
288,
1377,
16306,
6618,
261,
2603,
1769,
1377,
327,
31,
565,
289,
565,
1... |
GroovyClassLoader gcl = new GroovyClassLoader(); Class dc = gcl.parseClass("class Test { Long id; Long version; }"); GrailsApplication app = new DefaultGrailsApplication(new Class[0], gcl ); MockApplicationContext parent = new MockApplicationContext(); parent.registerMockBean(GrailsApplication.APPLICATION_ID, app); GrailsRuntimeConfigurator conf = new GrailsRuntimeConfigurator(app,parent); GrailsWebApplicationContext ctx = (GrailsWebApplicationContext)conf.configure(new MockServletContext()); assertNotNull(ctx); ctx.registerSingleton("Test", dc); GroovyObject testInstance = (GroovyObject)ctx.getBean("Test"); assertNotNull(testInstance); gcl = new GroovyClassLoader(); dc = gcl.parseClass("class Test { Long id; Long version;String updatedProp = 'hello'; }"); ctx.registerSingleton("Test",dc); testInstance = (GroovyObject)ctx.getBean("Test"); assertNotNull(testInstance); assertEquals("hello",testInstance.getProperty("updatedProp")); } | GroovyClassLoader gcl = new GroovyClassLoader(); Class dc = gcl.parseClass("class Test { Long id; Long version; }"); GrailsApplication app = new DefaultGrailsApplication(new Class[0], gcl ); MockApplicationContext parent = new MockApplicationContext(); parent.registerMockBean(GrailsApplication.APPLICATION_ID, app); GrailsRuntimeConfigurator conf = new GrailsRuntimeConfigurator(app,parent); GrailsWebApplicationContext ctx = (GrailsWebApplicationContext)conf.configure(new MockServletContext()); assertNotNull(ctx); ctx.registerSingleton("Test", dc); GroovyObject testInstance = (GroovyObject)ctx.getBean("Test"); assertNotNull(testInstance); gcl = new GroovyClassLoader(); dc = gcl.parseClass("class Test { Long id; Long version;String updatedProp = 'hello'; }"); ctx.registerSingleton("Test",dc); testInstance = (GroovyObject)ctx.getBean("Test"); assertNotNull(testInstance); assertEquals("hello",testInstance.getProperty("updatedProp")); } | public void testRegisterAdditionalBean() throws Exception { GroovyClassLoader gcl = new GroovyClassLoader(); Class dc = gcl.parseClass("class Test { Long id; Long version; }"); GrailsApplication app = new DefaultGrailsApplication(new Class[0], gcl ); MockApplicationContext parent = new MockApplicationContext(); parent.registerMockBean(GrailsApplication.APPLICATION_ID, app); GrailsRuntimeConfigurator conf = new GrailsRuntimeConfigurator(app,parent); GrailsWebApplicationContext ctx = (GrailsWebApplicationContext)conf.configure(new MockServletContext()); assertNotNull(ctx); ctx.registerSingleton("Test", dc); GroovyObject testInstance = (GroovyObject)ctx.getBean("Test"); assertNotNull(testInstance); // now test override bean gcl = new GroovyClassLoader(); dc = gcl.parseClass("class Test { Long id; Long version;String updatedProp = 'hello'; }"); ctx.registerSingleton("Test",dc); testInstance = (GroovyObject)ctx.getBean("Test"); assertNotNull(testInstance); assertEquals("hello",testInstance.getProperty("updatedProp")); } | 50831 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50831/075145e116446e23fd77adcfc25dab01feb4a27e/GrailsRuntimeConfiguratorTests.java/clean/test/commons/org/codehaus/groovy/grails/commons/spring/GrailsRuntimeConfiguratorTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3996,
10552,
3381,
1435,
1216,
1185,
288,
202,
202,
43,
12859,
7805,
314,
830,
273,
394,
20841,
7805,
5621,
202,
202,
797,
6744,
273,
314,
830,
18,
2670,
797,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3996,
10552,
3381,
1435,
1216,
1185,
288,
202,
202,
43,
12859,
7805,
314,
830,
273,
394,
20841,
7805,
5621,
202,
202,
797,
6744,
273,
314,
830,
18,
2670,
797,
2932,
... |
for (int i = 0; i < bufferLength; i++) { | for (int i = 0, max = bufferLength>>2; i < max; i++) { | public void updateColorBuffer() { if (color == null) { return; } int bufferLength = vertex.length * 4; if (colorBuf == null) { colorBuf = ByteBuffer.allocateDirect(4 * bufferLength).order( ByteOrder.nativeOrder()).asFloatBuffer(); } colorBuf.clear(); ColorRGBA tempColor; for (int i = 0; i < bufferLength; i++) { tempColor = color[i]; if (tempColor != null) { colorBuf.put(tempColor.r).put(tempColor.g) .put(tempColor.b).put(tempColor.a); } } colorBuf.flip(); } | 19503 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19503/1778dd87c7e1608ef68190a2b6ac1e1f6d15ff09/Geometry.java/buggy/src/com/jme/scene/Geometry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
2957,
1892,
1435,
288,
3639,
309,
261,
3266,
422,
446,
13,
288,
327,
31,
289,
3639,
509,
1613,
1782,
273,
5253,
18,
2469,
380,
1059,
31,
3639,
309,
261,
3266,
5503,
422... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
2957,
1892,
1435,
288,
3639,
309,
261,
3266,
422,
446,
13,
288,
327,
31,
289,
3639,
509,
1613,
1782,
273,
5253,
18,
2469,
380,
1059,
31,
3639,
309,
261,
3266,
5503,
422... |
createType(types, elements[j]); | createType(newTypes, elements[j]); | protected synchronized void refreshFileSystemTypes() { types.clear(); final Extension[] extensions = typesEP.getExtensions(); for (int i = 0; i < extensions.length; i++) { final Extension ext = extensions[i]; final ConfigurationElement[] elements = ext.getConfigurationElements(); for (int j = 0; j < elements.length; j++) { createType(types, elements[j]); } } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/db375ff26e46c7f1767dc5d096c5f8866c265859/FileSystemTypeManager.java/clean/fs/src/fs/org/jnode/fs/service/def/FileSystemTypeManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
3852,
918,
4460,
11785,
2016,
1435,
288,
202,
202,
2352,
18,
8507,
5621,
9506,
202,
6385,
10021,
8526,
4418,
273,
1953,
10541,
18,
588,
7513,
5621,
202,
202,
1884,
261,
474,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
3852,
918,
4460,
11785,
2016,
1435,
288,
202,
202,
2352,
18,
8507,
5621,
9506,
202,
6385,
10021,
8526,
4418,
273,
1953,
10541,
18,
588,
7513,
5621,
202,
202,
1884,
261,
474,
27... |
protected void handleFailedPushOperation(PushOperation operation, Exception error) { logger_.warn("handle failed pushoperation", error); if (isDestroyed()) { operation.dispose(); return; } StringWriter out = new StringWriter(); error.printStackTrace(new PrintWriter(out)); sendNotification(NOTIFY_PUSH_FAILED, "Push Operation failed", out.toString()); pushErrors_.getAndIncrement(); incErrorCounter(); if (AbstractRetryStrategy.isFatalException(error)) { // push operation caused a fatal exception // destroy the ProxySupplier if (logger_.isWarnEnabled()) { logger_.warn("push raised " + error + ": will destroy ProxySupplier, " + "disconnect Consumer", error); } operation.dispose(); destroy(); } else if (!isRetryAllowed()) { operation.dispose(); destroy(); } else if (!isDestroyed()) { final RetryStrategy _retry = newRetryStrategy(this, operation); try { _retry.retry(); } catch (RetryException e) { logger_.error("retry failed", e); _retry.dispose(); destroy(); } } else { // retry allowed && isDestroyed throw new IllegalStateException("should not happen"); } } | 46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/b3247913ea78985fecd1d4233c7be300876c3290/AbstractProxyPushSupplier.java/buggy/src/org/jacorb/notification/servant/AbstractProxyPushSupplier.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1640,
2925,
7621,
2988,
12,
7621,
2988,
1674,
16,
1185,
555,
13,
565,
288,
3639,
1194,
27799,
8935,
2932,
4110,
2535,
1817,
7624,
3113,
555,
1769,
7734,
309,
261,
291,
28414,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1640,
2925,
7621,
2988,
12,
7621,
2988,
1674,
16,
1185,
555,
13,
565,
288,
3639,
1194,
27799,
8935,
2932,
4110,
2535,
1817,
7624,
3113,
555,
1769,
7734,
309,
261,
291,
28414,
1... | ||
{ final boolean previousRequiredState = inheritedInstanceData.getPreviousRequiredState(); final boolean newRequiredState = inheritedInstanceData.getRequired().get(); if ((valueChanged || previousRequiredState) && !newRequiredState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsOptionalEvent((XFormsEventTarget) i.next())); } else if ((valueChanged || !previousRequiredState) && newRequiredState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsRequiredEvent((XFormsEventTarget) i.next())); } } { final boolean previousRelevantState = inheritedInstanceData.getPreviousRelevantState(); final boolean newRelevantState = inheritedInstanceData.getRelevant().get(); if ((valueChanged || previousRelevantState) && !newRelevantState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsDisabledEvent((XFormsEventTarget) i.next())); } else if ((valueChanged || !previousRelevantState) && newRelevantState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsEnabledEvent((XFormsEventTarget) i.next())); } } { final boolean previousReadonlyState = inheritedInstanceData.getPreviousReadonlyState(); final boolean newReadonlyState = inheritedInstanceData.getReadonly().get(); if ((valueChanged || previousReadonlyState) && !newReadonlyState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsReadwriteEvent((XFormsEventTarget) i.next())); } else if ((valueChanged || !previousReadonlyState) && newReadonlyState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsReadonlyEvent((XFormsEventTarget) i.next())); } } { final boolean previousValidState = inheritedInstanceData.getPreviousValidState(); final boolean newValidState = inheritedInstanceData.getValid().get(); if ((valueChanged || previousValidState) && !newValidState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsInvalidEvent((XFormsEventTarget) i.next())); } else if ((valueChanged || !previousValidState) && newValidState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsValidEvent((XFormsEventTarget) i.next())); } } | public void performDefaultAction(final PipelineContext pipelineContext, XFormsEvent event) { final String eventName = event.getEventName(); if (XFormsEvents.XXFORMS_INITIALIZE_STATE.equals(eventName)) { // Internal event to restore state loadSchemasIfNeeded(pipelineContext); applyComputedExpressionBinds(pipelineContext, false); containingDocument.dispatchEvent(pipelineContext, new XFormsRevalidateEvent(this, false)); clearInstanceDataEventState(); } else if (XFormsEvents.XFORMS_MODEL_CONSTRUCT.equals(eventName)) { // 4.2.1 The xforms-model-construct Event // Bubbles: Yes / Cancelable: No / Context Info: None final Element modelElement = modelDocument.getRootElement(); // 1. All XML Schemas loaded (throws xforms-link-exception) // TODO: support multiple schemas // Get schema URI loadSchemasIfNeeded(pipelineContext); // TODO: throw exception event // 2. Create XPath data model from instance (inline or external) (throws xforms-link-exception) // Instance may not be specified. if (instances == null) { // Build initial instance document List instanceContainers = modelElement.elements(new QName("instance", XFormsConstants.XFORMS_NAMESPACE)); if (instanceContainers.size() > 0) { // Support multiple instances int instancePosition = 0; for (Iterator i = instanceContainers.iterator(); i.hasNext(); instancePosition++) { final Element instanceContainer = (Element) i.next(); final String srcAttribute = instanceContainer.attributeValue("src"); final Document instanceDocument; //= ProcessorUtils.createDocumentFromEmbeddedOrHref(Element element, String urlString) { if (srcAttribute == null) { // Inline instance final List children = instanceContainer.elements(); if (children == null || children.size() == 0) throw new OXFException("xforms:instance element must contain exactly one child element");// TODO: Throw XForms event? instanceDocument = Dom4jUtils.createDocumentCopyParentNamespaces((Element) children.get(0)); } else { // External instance // TODO: Handle relative URLs// if (serverSideRelative) {//// } else {//// }////// xxx final LocationData locationData = (LocationData) instanceContainer.getData(); final URL srcURL = ProcessorUtils.createRelativeURL(locationData, srcAttribute); final URLGenerator urlGenerator = new URLGenerator(srcURL); final DOMSerializer domSerializer = new DOMSerializer(); PipelineUtils.connect(urlGenerator, ProcessorImpl.OUTPUT_DATA, domSerializer, ProcessorImpl.INPUT_DATA); domSerializer.start(pipelineContext); instanceDocument = domSerializer.getDocument(pipelineContext); } setInstanceDocument(pipelineContext, instancePosition, instanceDocument); } } } // TODO: throw exception event // Call special listener to update instance if (instanceConstructListener != null) { for (Iterator i = getInstances().iterator(); i.hasNext();) { instanceConstructListener.updateInstance((XFormsInstance) i.next()); } } // 3. P3P (N/A) // 4. Instance data is constructed. Evaluate binds: // a. Evaluate nodeset // b. Apply model item properties on nodes // c. Throws xforms-binding-exception if the node has already model item property with same name // TODO: a, b, c xxx // 5. xforms-rebuild, xforms-recalculate, xforms-revalidate containingDocument.dispatchEvent(pipelineContext, new XFormsRebuildEvent(this)); containingDocument.dispatchEvent(pipelineContext, new XFormsRecalculateEvent(this, false)); containingDocument.dispatchEvent(pipelineContext, new XFormsRevalidateEvent(this, false));// clearInstanceDataEventState(); } else if (XFormsEvents.XFORMS_MODEL_CONSTRUCT_DONE.equals(eventName)) { // 4.2.2 The xforms-model-construct-done Event // Bubbles: Yes / Cancelable: No / Context Info: None // TODO: if instance exists (for now it does!), check that controls can bind, otherwise control must be "irrelevant" // TODO: implicit lazy instance construction } else if (XFormsEvents.XFORMS_REBUILD.equals(eventName)) { // 4.3.7 The xforms-rebuild Event // Bubbles: Yes / Cancelable: Yes / Context Info: None // TODO: rebuild computational dependency data structures } else if (XFormsEvents.XFORMS_RECALCULATE.equals(eventName)) { // 4.3.6 The xforms-recalculate Event // Bubbles: Yes / Cancelable: Yes / Context Info: None if (instances != null) { // Update computed expression binds applyComputedExpressionBinds(pipelineContext, true); } } else if (XFormsEvents.XFORMS_REVALIDATE.equals(eventName)) { // 4.3.5 The xforms-revalidate Event // Bubbles: Yes / Cancelable: Yes / Context Info: None if (instances != null) { // Clear validation state for (Iterator i = instances.iterator(); i.hasNext();) { XFormsUtils.iterateInstanceData(((XFormsInstance) i.next()).getDocument(), new XFormsUtils.InstanceWalker() { public void walk(Node node, InstanceData localInstanceData, InstanceData inheritedInstanceData) { if (localInstanceData != null) { localInstanceData.clearValidationState(); } } }); } // Run validation applySchemasIfNeeded(); applyBinds(new BindRunner() { public void applyBind(ModelBind modelBind, DocumentWrapper documentWrapper) { handleValidationBind(pipelineContext, modelBind, documentWrapper, this); } }); } } else if (XFormsEvents.XFORMS_REFRESH.equals(eventName)) { // 4.3.4 The xforms-refresh Event // Bubbles: Yes / Cancelable: Yes / Context Info: None // "1. All UI bindings should be reevaluated as necessary." // "2. A node can be changed by confirmed user input to a form control, by // xforms-recalculate (section 4.3.6) or by the setvalue (section 10.1.9) action. If the // value of an instance data node was changed, then the node must be marked for // dispatching the xforms-value-changed event." // "3. If the xforms-value-changed event is marked for dispatching, then all of the // appropriate model item property notification events must also be marked for // dispatching (xforms-optional or xforms-required, xforms-readwrite or xforms-readonly, // and xforms-enabled or xforms-disabled)." // "4. For each form control, each notification event that is marked for dispatching on // the bound node must be dispatched (xforms-value-changed, xforms-valid, // xforms-invalid, xforms-optional, xforms-required, xforms-readwrite, xforms-readonly, // and xforms-enabled, xforms-disabled). The notification events xforms-out-of-range or // xforms-in-range must also be dispatched as appropriate. This specification does not // specify an ordering for the events." final XFormsControls xformsControls = containingDocument.getXFormsControls(); if (xformsControls != null) { // Build list of events to send final List eventsToDispatch = new ArrayList(); for (Iterator i = instances.iterator(); i.hasNext();) { XFormsUtils.iterateInstanceData(((XFormsInstance) i.next()).getDocument(), new BoundNodeInstanceWalker(pipelineContext, xformsControls) { public void walk(Node node, InstanceData localInstanceData, InstanceData inheritedInstanceData) { setNode(node); // Check if value has changed final boolean valueChanged = inheritedInstanceData.isValueChanged(); // Dispatch xforms-optional/xforms-required { final boolean previousRequiredState = inheritedInstanceData.getPreviousRequiredState(); final boolean newRequiredState = inheritedInstanceData.getRequired().get(); if ((valueChanged || previousRequiredState) && !newRequiredState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsOptionalEvent((XFormsEventTarget) i.next())); } else if ((valueChanged || !previousRequiredState) && newRequiredState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsRequiredEvent((XFormsEventTarget) i.next())); } } // Dispatch xforms-enabled/xforms-disabled { final boolean previousRelevantState = inheritedInstanceData.getPreviousRelevantState(); final boolean newRelevantState = inheritedInstanceData.getRelevant().get(); if ((valueChanged || previousRelevantState) && !newRelevantState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsDisabledEvent((XFormsEventTarget) i.next())); } else if ((valueChanged || !previousRelevantState) && newRelevantState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsEnabledEvent((XFormsEventTarget) i.next())); } } // Dispatch xforms-readonly/xforms-readwrite { final boolean previousReadonlyState = inheritedInstanceData.getPreviousReadonlyState(); final boolean newReadonlyState = inheritedInstanceData.getReadonly().get(); if ((valueChanged || previousReadonlyState) && !newReadonlyState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsReadwriteEvent((XFormsEventTarget) i.next())); } else if ((valueChanged || !previousReadonlyState) && newReadonlyState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsReadonlyEvent((XFormsEventTarget) i.next())); } } // Dispatch xforms-valid/xforms-invalid // NOTE: There is no mention in the spec that these events should be // displatched automatically when the value has changed, contrary to the // other events above. { final boolean previousValidState = inheritedInstanceData.getPreviousValidState(); final boolean newValidState = inheritedInstanceData.getValid().get(); if ((valueChanged || previousValidState) && !newValidState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsInvalidEvent((XFormsEventTarget) i.next())); } else if ((valueChanged || !previousValidState) && newValidState) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsValidEvent((XFormsEventTarget) i.next())); } } // Dispatch xforms-value-changed // NOTE: deferred behavior is broken in XForms 1.0; 1.1 should // introduce better behavior; howver, with the 1.0 behavior, it works // better for us for now to send xforms-value-changed last if (valueChanged) { for (Iterator i = getBoundControlsIterator(); i.hasNext();) eventsToDispatch.add(new XFormsValueChangeEvent((XFormsEventTarget) i.next())); } } }); } // Clear InstanceData event state clearInstanceDataEventState(); // Send events for (Iterator i = eventsToDispatch.iterator(); i.hasNext();) { containingDocument.dispatchEvent(pipelineContext, (XFormsEvent) i.next()); } // "5. The user interface reflects the state of the model, which means that all forms // controls reflect for their corresponding bound instance data:" if (xformsControls != null) { containingDocument.getXFormsControls().refreshForModel(pipelineContext, this); } } } else if (XFormsEvents.XFORMS_RESET.equals(eventName)) { // 4.3.8 The xforms-reset Event // Bubbles: Yes / Cancelable: Yes / Context Info: None // TODO // "The instance data is reset to the tree structure and values it had immediately // after having processed the xforms-ready event." // "Then, the events xforms-rebuild, xforms-recalculate, xforms-revalidate and // xforms-refresh are dispatched to the model element in sequence." containingDocument.dispatchEvent(pipelineContext, new XFormsRebuildEvent(XFormsModel.this)); containingDocument.dispatchEvent(pipelineContext, new XFormsRecalculateEvent(XFormsModel.this, true)); containingDocument.dispatchEvent(pipelineContext, new XFormsRevalidateEvent(XFormsModel.this, true)); containingDocument.dispatchEvent(pipelineContext, new XFormsRefreshEvent(XFormsModel.this)); } else if (XFormsEvents.XFORMS_COMPUTE_EXCEPTION.equals(eventName)) { // 4.5.4 The xforms-compute-exception Event // Bubbles: Yes / Cancelable: No / Context Info: Implementation-specific error string. // The default action for this event results in the following: Fatal error. // TODO } } | 54445 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54445/08765f5dfa47c92ad95accd37caf0de0bfbf351e/XFormsModel.java/buggy/src/java/org/orbeon/oxf/xforms/XFormsModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3073,
1868,
1803,
12,
6385,
13671,
1042,
5873,
1042,
16,
1139,
18529,
1133,
871,
13,
288,
3639,
727,
514,
7933,
273,
871,
18,
588,
24320,
5621,
3639,
309,
261,
60,
18529,
3783,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3073,
1868,
1803,
12,
6385,
13671,
1042,
5873,
1042,
16,
1139,
18529,
1133,
871,
13,
288,
3639,
727,
514,
7933,
273,
871,
18,
588,
24320,
5621,
3639,
309,
261,
60,
18529,
3783,... | |
BlockBox block = (BlockBox) box; | Box block = box; | public Box layoutChildren(Context c, Box box) { /* resolved by ContentUtil if (LayoutUtil.isHiddenNode(box.getElement(), c)) { return box; }*/ List contentList = box.content.getChildContent(c); if (contentList.size() == 0) return box;//we can do this if there is no content, right? BlockBox block = (BlockBox) box;//I think this should work - tobe 2004-12-11 if (ContentUtil.isBlockContent(contentList)) {//this should be block layed out //BoxLayout.layoutContent(c, box, contentList, block); super.layoutChildren(c, box); } else { layoutContent(c, box, contentList, block); } return block; } | 8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/5ae86d99f9d4c15ae44feb4a759289dfb63751cc/InlineLayout.java/buggy/src/java/org/xhtmlrenderer/layout/InlineLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8549,
3511,
4212,
12,
1042,
276,
16,
8549,
3919,
13,
288,
3639,
1748,
4640,
635,
3697,
1304,
309,
261,
3744,
1304,
18,
291,
9345,
907,
12,
2147,
18,
21336,
9334,
276,
3719,
288,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8549,
3511,
4212,
12,
1042,
276,
16,
8549,
3919,
13,
288,
3639,
1748,
4640,
635,
3697,
1304,
309,
261,
3744,
1304,
18,
291,
9345,
907,
12,
2147,
18,
21336,
9334,
276,
3719,
288,
5... |
public void update(long time) { | public void update() { | public void update(long time) { // TODO: alles ganz haesslich: this.statusBar.updateTime(time); this.update(); } | 49082 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49082/4e53e83e3f23adc1a2250ea87a518daf9600e1f3/CtSimFrame.java/buggy/ctSim/view/CtSimFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1089,
12,
5748,
813,
13,
288,
9506,
202,
759,
2660,
30,
777,
281,
314,
304,
94,
10677,
403,
80,
1354,
30,
202,
202,
2211,
18,
2327,
5190,
18,
2725,
950,
12,
957,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1089,
12,
5748,
813,
13,
288,
9506,
202,
759,
2660,
30,
777,
281,
314,
304,
94,
10677,
403,
80,
1354,
30,
202,
202,
2211,
18,
2327,
5190,
18,
2725,
950,
12,
957,
1769,
... |
return createLoop(LOOP_DO_WHILE, body, cond, null, null, lineno); | return createLoop((Node.Jump)loop, LOOP_DO_WHILE, body, cond, null, null); | Node createDoWhile(Node body, Node cond, int lineno) { return createLoop(LOOP_DO_WHILE, body, cond, null, null, lineno); } | 19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/78e835470e0a90ae1ee62618c62f364ed850bede/IRFactory.java/clean/src/org/mozilla/javascript/IRFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
2029,
752,
3244,
15151,
12,
907,
1417,
16,
2029,
6941,
16,
509,
7586,
13,
565,
288,
3639,
327,
752,
6452,
12443,
907,
18,
26743,
13,
6498,
16,
1806,
3665,
67,
3191,
67,
12557,
13578,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
2029,
752,
3244,
15151,
12,
907,
1417,
16,
2029,
6941,
16,
509,
7586,
13,
565,
288,
3639,
327,
752,
6452,
12443,
907,
18,
26743,
13,
6498,
16,
1806,
3665,
67,
3191,
67,
12557,
13578,
16... |
return 0; } | return 0; } | public int getType() throws SQLException { return 0; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/cb88ccf91092199f5dd4fc4fd03d021643a6e0ec/SCR20557.java/clean/testData/refactoring/inheritanceToDelegation/scr20557/after/xxx/SCR20557.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
3130,
1435,
1216,
6483,
288,
1377,
327,
374,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
3130,
1435,
1216,
6483,
288,
1377,
327,
374,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (result == null && policy != null) result = policy.doBuddyResourcesLoading(name); | if (policy != null) { Enumeration buddyResult = policy.doBuddyResourcesLoading(name); if (buddyResult == null) return result; if (result == null) return buddyResult; Vector compoundResults = new Vector(); while (result.hasMoreElements()) compoundResults.add(result.nextElement()); while (buddyResult.hasMoreElements()) { Object url = buddyResult.nextElement(); if (!compoundResults.contains(url)) compoundResults.add(url); } result = compoundResults.elements(); } | public Enumeration findResources(String name) throws IOException { // do not delegate to parent because ClassLoader#getResources already did and it is final!! if ((name.length() > 1) && (name.charAt(0) == '/')) /* if name has a leading slash */ name = name.substring(1); /* remove leading slash before search */ String pkgName = getResourcePackageName(name); Enumeration result = null; // start at step 3 because of the comment above about ClassLoader#getResources // 3) search the imported packages PackageSource source = findImportedSource(pkgName); if (source != null) // 3) found import source terminate search at the source return source.getResources(name); // 4) search the required bundles source = findRequiredSource(pkgName); if (source != null) // 4) attempt to load from source but continue on failure result = source.getResources(name); // 5) search the local bundle if (result == null) result = findLocalResources(name); else { //compound the required source results with the local ones Enumeration localResults = findLocalResources(name); if (localResults != null) { Vector compoundResults = new Vector(); while (result.hasMoreElements()) compoundResults.add(result.nextElement()); while (localResults.hasMoreElements()) compoundResults.add(localResults.nextElement()); result = compoundResults.elements(); } } if (result != null) return result; // 6) attempt to find a dynamic import source; only do this if a required source was not found if (source == null) { source = findDynamicSource(pkgName); if (source != null) result = source.getResources(name); } if (result == null && policy != null) result = policy.doBuddyResourcesLoading(name); return result; } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/435ca9a3b533f7147a1ed5d8fc94fccae01c4556/BundleLoader.java/clean/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/BundleLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
13864,
1104,
3805,
12,
780,
508,
13,
1216,
1860,
288,
202,
202,
759,
741,
486,
7152,
358,
982,
2724,
9403,
7,
588,
3805,
1818,
5061,
471,
518,
353,
727,
8548,
202,
202,
430,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
13864,
1104,
3805,
12,
780,
508,
13,
1216,
1860,
288,
202,
202,
759,
741,
486,
7152,
358,
982,
2724,
9403,
7,
588,
3805,
1818,
5061,
471,
518,
353,
727,
8548,
202,
202,
430,
... |
public String generateCode(Node tree, Hashtable results, | public String generateCode(Node tree, Vector names, Vector classFiles, | public String generateCode(Node tree, Hashtable results, ClassNameHelper nameHelper) { this.itsNameHelper = (OptClassNameHelper) nameHelper; this.results = results; Context cx = Context.getCurrentContext(); itsSourceFile = null; if (cx.isGeneratingDebug()) itsSourceFile = (String) tree.getProp(Node.SOURCENAME_PROP); version = cx.getLanguageVersion(); optLevel = cx.getOptimizationLevel(); debugLevel = cx.getDebugLevel(); inFunction = tree.getType() == TokenStream.FUNCTION; if (debugLevel >= 3) { superClassName = inFunction ? debugFunctionSuperClassName : debugScriptSuperClassName; } else { superClassName = inFunction ? normalFunctionSuperClassName : normalScriptSuperClassName; } superClassSlashName = superClassName.replace('.', '/'); Node codegenBase; if (inFunction) { OptFunctionNode fnNode = (OptFunctionNode) tree; inDirectCallFunction = fnNode.isTargetOfDirectCall(); vars = (OptVariableTable) fnNode.getVariableTable(); this.name = fnNode.getClassName(); classFile = new ClassFileWriter(name, superClassName, itsSourceFile); Node args = tree.getFirstChild(); String name = fnNode.getFunctionName(); generateInit(cx, "<init>", tree, name, args); if (fnNode.isTargetOfDirectCall()) { classFile.startMethod("call", "(Lorg/mozilla/javascript/Context;" + "Lorg/mozilla/javascript/Scriptable;" + "Lorg/mozilla/javascript/Scriptable;" + "[Ljava/lang/Object;)Ljava/lang/Object;", (short)(ClassFileWriter.ACC_PUBLIC + ClassFileWriter.ACC_FINAL)); addByteCode(ByteCode.ALOAD_0); addByteCode(ByteCode.ALOAD_1); addByteCode(ByteCode.ALOAD_2); addByteCode(ByteCode.ALOAD_3); for (int i = 0; i < vars.getParameterCount(); i++) { push(i); addByteCode(ByteCode.ALOAD, 4); addByteCode(ByteCode.ARRAYLENGTH); int undefArg = acquireLabel(); int beyond = acquireLabel(); addByteCode(ByteCode.IF_ICMPGE, undefArg); addByteCode(ByteCode.ALOAD, 4); push(i); addByteCode(ByteCode.AALOAD); push(0.0); addByteCode(ByteCode.GOTO, beyond); markLabel(undefArg); pushUndefined(); push(0.0); markLabel(beyond); } addByteCode(ByteCode.ALOAD, 4); addVirtualInvoke(this.name, "callDirect", fnNode.getDirectCallParameterSignature(), "Ljava/lang/Object;"); addByteCode(ByteCode.ARETURN); classFile.stopMethod((short)5, null); // 1 for this, 1 for js this, 1 for args[] emitDirectConstructor(fnNode); startNewMethod("callDirect", fnNode.getDirectCallParameterSignature() + "Ljava/lang/Object;", 1, false, true); vars.assignParameterJRegs(); if (!fnNode.getParameterNumberContext()) { // make sure that all parameters are objects itsForcedObjectParameters = true; for (int i = 0; i < vars.getParameterCount(); i++) { OptLocalVariable lVar = (OptLocalVariable) vars.get(i); aload(lVar.getJRegister()); classFile.add(ByteCode.GETSTATIC, "java/lang/Void", "TYPE", "Ljava/lang/Class;"); int isObjectLabel = acquireLabel(); addByteCode(ByteCode.IF_ACMPNE, isObjectLabel); addByteCode(ByteCode.NEW,"java/lang/Double"); addByteCode(ByteCode.DUP); dload((short)(lVar.getJRegister() + 1)); addDoubleConstructor(); astore(lVar.getJRegister()); markLabel(isObjectLabel); } } generatePrologue(cx, tree, true, vars.getParameterCount()); } else { startNewMethod("call", "(Lorg/mozilla/javascript/Context;" + "Lorg/mozilla/javascript/Scriptable;" + "Lorg/mozilla/javascript/Scriptable;" + "[Ljava/lang/Object;)Ljava/lang/Object;", 1, false, true); generatePrologue(cx, tree, true, -1); } codegenBase = tree.getLastChild(); } else { // better be a script if (tree.getType() != TokenStream.SCRIPT) badTree(); vars = (OptVariableTable) tree.getProp(Node.VARS_PROP); boolean isPrimary = itsNameHelper.getTargetExtends() == null && itsNameHelper.getTargetImplements() == null; this.name = itsNameHelper.getJavaScriptClassName(null, isPrimary); classFile = new ClassFileWriter(name, superClassName, itsSourceFile); classFile.addInterface("org/mozilla/javascript/Script"); generateScriptCtor(cx, tree); generateMain(cx); generateInit(cx, "initScript", tree, "", null); generateExecute(cx); startNewMethod("call", "(Lorg/mozilla/javascript/Context;" + "Lorg/mozilla/javascript/Scriptable;" + "Lorg/mozilla/javascript/Scriptable;" + "[Ljava/lang/Object;)Ljava/lang/Object;", 1, false, true); generatePrologue(cx, tree, false, -1); tree.addChildToBack(new Node(TokenStream.RETURN)); codegenBase = tree; } generateCodeFromNode(codegenBase, null, -1, -1); generateEpilogue(); finishMethod(cx, debugVars); emitConstantDudeInitializers(); // this needs to be done after the primary code generation is done if (debugLevel >= 1) generateDebugInit(cx, tree); ByteArrayOutputStream out = new ByteArrayOutputStream(512); try { classFile.write(out); } catch (IOException ioe) { throw new RuntimeException("unexpected IOException"); } byte[] bytes = out.toByteArray(); results.put(name, bytes); classFile = null; return name; } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/aec69cc2f4416d8d6975ff766d0f4f330d8b7696/Codegen.java/buggy/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2103,
1085,
12,
907,
2151,
16,
5589,
1257,
16,
5589,
667,
2697,
16,
27573,
19811,
2276,
508,
2276,
13,
377,
288,
3639,
333,
18,
1282,
461,
2276,
273,
261,
6179,
3834,
2276,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2103,
1085,
12,
907,
2151,
16,
5589,
1257,
16,
5589,
667,
2697,
16,
27573,
19811,
2276,
508,
2276,
13,
377,
288,
3639,
333,
18,
1282,
461,
2276,
273,
261,
6179,
3834,
2276,
1... |
Wizard wizard = new Wizard(getIdManager().createId(), agent, siteId, | Wizard wizard = new Wizard(getIdManager().createId(), agent, siteId, toolId, | public Wizard createNew(String owner, String siteId, Id securityQualifier, String securityViewFunction, String securityEditFunction) { Agent agent = getAgentManager().getAgent(owner); Wizard wizard = new Wizard(getIdManager().createId(), agent, siteId, securityQualifier, securityViewFunction, securityEditFunction);// (Agent owner, String siteId, Id securityQualifier,// String securityViewFunction, String securityEditFunction) { return wizard; } | 48996 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48996/f4f624d804b1543b04decdc26c1a774cfbbe49b9/WizardManagerImpl.java/clean/wizard/api-impl/src/java/org/theospi/portfolio/wizard/mgt/impl/WizardManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
678,
13412,
15291,
12,
780,
3410,
16,
514,
17749,
16,
3124,
4373,
16185,
16,
514,
4373,
1767,
2083,
16,
514,
4373,
4666,
2083,
13,
288,
1377,
8669,
4040,
273,
336,
3630,
1318,
7675,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
678,
13412,
15291,
12,
780,
3410,
16,
514,
17749,
16,
3124,
4373,
16185,
16,
514,
4373,
1767,
2083,
16,
514,
4373,
4666,
2083,
13,
288,
1377,
8669,
4040,
273,
336,
3630,
1318,
7675,... |
this( path, conf.getLong( "dfs.df.interval", DF.DF_INTERVAL_DEFAULT )); | this( new File(path), conf ); | public DF(String path, Configuration conf ) throws IOException { this( path, conf.getLong( "dfs.df.interval", DF.DF_INTERVAL_DEFAULT )); } | 55137 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55137/2855c1a1d7fad0c6f71a62a2135df2c6dece1f03/DF.java/buggy/src/java/org/apache/hadoop/fs/DF.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
463,
42,
12,
780,
589,
16,
4659,
2195,
262,
1216,
1860,
288,
565,
333,
12,
394,
1387,
12,
803,
3631,
2195,
11272,
225,
289,
2,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
463,
42,
12,
780,
589,
16,
4659,
2195,
262,
1216,
1860,
288,
565,
333,
12,
394,
1387,
12,
803,
3631,
2195,
11272,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Element clauseElem=(Element) nl.item(i); BooleanClause.Occur occurs=getOccursValue(clauseElem); Element clauseQuery=DOMUtils.getFirstChildOrFail(clauseElem); Query q=factory.getQuery(clauseQuery); bq.add(new BooleanClause(q,occurs)); | Node node = nl.item(i); if(node.getNodeName().equals("Clause")) { Element clauseElem=(Element) node; BooleanClause.Occur occurs=getOccursValue(clauseElem); Element clauseQuery=DOMUtils.getFirstChildOrFail(clauseElem); Query q=factory.getQuery(clauseQuery); bq.add(new BooleanClause(q,occurs)); } | public Query getQuery(Element e) throws ParserException { BooleanQuery bq=new BooleanQuery(DOMUtils.getAttribute(e,"disableCoord",false)); bq.setMinimumNumberShouldMatch(DOMUtils.getAttribute(e,"minimumNumberShouldMatch",0)); bq.setBoost(DOMUtils.getAttribute(e,"boost",1.0f)); NodeList nl = e.getElementsByTagName("Clause"); for(int i=0;i<nl.getLength();i++) { Element clauseElem=(Element) nl.item(i); BooleanClause.Occur occurs=getOccursValue(clauseElem); Element clauseQuery=DOMUtils.getFirstChildOrFail(clauseElem); Query q=factory.getQuery(clauseQuery); bq.add(new BooleanClause(q,occurs)); } return bq; } | 50125 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50125/6c53bc3c4977c1e48099e15cfa7346fc40682f71/BooleanQueryBuilder.java/buggy/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BooleanQueryBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2770,
6041,
12,
1046,
425,
13,
1216,
27990,
288,
202,
202,
5507,
1138,
324,
85,
33,
2704,
3411,
1138,
12,
8168,
1989,
18,
588,
1499,
12,
73,
10837,
8394,
5401,
3113,
5743,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2770,
6041,
12,
1046,
425,
13,
1216,
27990,
288,
202,
202,
5507,
1138,
324,
85,
33,
2704,
3411,
1138,
12,
8168,
1989,
18,
588,
1499,
12,
73,
10837,
8394,
5401,
3113,
5743,
100... |
tiProp.setBackground( color ); | tiProp.setBackground( getSelectionColor( ) ); | private void populateTable( ) { Iterator keys = propMap.keySet( ).iterator( ); while ( keys.hasNext( ) ) { Object oKey = keys.next( ); Object oValue = propMap.get( oKey ); String[] sProperty = new String[2]; sProperty[0] = oKey.toString( ); sProperty[1] = oValue.toString( ); TableItem tiProp = new TableItem( table, SWT.NONE ); tiProp.setBackground( color ); tiProp.setText( sProperty ); } if ( table.getItemCount( ) > 0 ) { table.select( 0 ); } else { txtNewKey.forceFocus( ); } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/fbee4c942a7bbe1ba8902e111f37d31fb3ee622a/ExtendedPropertyEditorComposite.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/ExtendedPropertyEditorComposite.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
6490,
1388,
12,
262,
202,
95,
202,
202,
3198,
1311,
273,
2270,
863,
18,
856,
694,
12,
262,
18,
9838,
12,
11272,
202,
202,
17523,
261,
1311,
18,
5332,
2134,
12,
262,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
6490,
1388,
12,
262,
202,
95,
202,
202,
3198,
1311,
273,
2270,
863,
18,
856,
694,
12,
262,
18,
9838,
12,
11272,
202,
202,
17523,
261,
1311,
18,
5332,
2134,
12,
262,
26... |
MylarTaskListPlugin.getMylarCorePrefs().setValue(TaskListPreferenceConstants.SELECTED_PRIORITY, Task.PriorityLevel.P1.toString()); | MylarTaskListPlugin.getMylarCorePrefs().setValue(TaskListPreferenceConstants.SELECTED_PRIORITY, Task.PriorityLevel.P1.toString()); | public void addActionsToMenu() { Action P1 = new Action("", AS_CHECK_BOX) { @Override public void run() { MylarTaskListPlugin.getMylarCorePrefs().setValue(TaskListPreferenceConstants.SELECTED_PRIORITY, Task.PriorityLevel.P1.toString());// MylarTaskListPlugin.setCurrentPriorityLevel(Task.PriorityLevel.P1); FILTER_PRIORITY.displayPrioritiesAbove(PRIORITY_LEVELS[0]); getViewer().refresh(); } }; P1.setEnabled(true); P1.setText(Task.PriorityLevel.P1.getDescription()); P1.setImageDescriptor(TaskListImages.PRIORITY_1); ActionContributionItem item = new ActionContributionItem(P1); item.fill(dropDownMenu, -1); Action P2 = new Action("", AS_CHECK_BOX) { @Override public void run() { MylarTaskListPlugin.getMylarCorePrefs().setValue(TaskListPreferenceConstants.SELECTED_PRIORITY, Task.PriorityLevel.P2.toString());// MylarTaskListPlugin.setCurrentPriorityLevel(Task.PriorityLevel.P2); FILTER_PRIORITY.displayPrioritiesAbove(PRIORITY_LEVELS[1]); getViewer().refresh(); } }; P2.setEnabled(true); P2.setText(Task.PriorityLevel.P2.getDescription()); P2.setImageDescriptor(TaskListImages.PRIORITY_2); item = new ActionContributionItem(P2); item.fill(dropDownMenu, -1); Action P3 = new Action("", AS_CHECK_BOX) { @Override public void run() { MylarTaskListPlugin.getMylarCorePrefs().setValue(TaskListPreferenceConstants.SELECTED_PRIORITY, Task.PriorityLevel.P3.toString());// MylarTaskListPlugin.setCurrentPriorityLevel(Task.PriorityLevel.P3); FILTER_PRIORITY.displayPrioritiesAbove(PRIORITY_LEVELS[2]); getViewer().refresh(); } }; P3.setEnabled(true); P3.setText(Task.PriorityLevel.P3.getDescription()); P3.setImageDescriptor(TaskListImages.PRIORITY_3); item = new ActionContributionItem(P3); item.fill(dropDownMenu, -1); Action P4 = new Action("", AS_CHECK_BOX) { @Override public void run() { MylarTaskListPlugin.getMylarCorePrefs().setValue(TaskListPreferenceConstants.SELECTED_PRIORITY, Task.PriorityLevel.P4.toString());// MylarTaskListPlugin.setCurrentPriorityLevel(Task.PriorityLevel.P4); FILTER_PRIORITY.displayPrioritiesAbove(PRIORITY_LEVELS[3]); getViewer().refresh(); } }; P4.setEnabled(true); P4.setText(Task.PriorityLevel.P4.getDescription()); P4.setImageDescriptor(TaskListImages.PRIORITY_4); item = new ActionContributionItem(P4); item.fill(dropDownMenu, -1); Action P5 = new Action("", AS_CHECK_BOX) { @Override public void run() { MylarTaskListPlugin.getMylarCorePrefs().setValue(TaskListPreferenceConstants.SELECTED_PRIORITY, Task.PriorityLevel.P5.toString());// MylarTaskListPlugin.setCurrentPriorityLevel(Task.PriorityLevel.P5); FILTER_PRIORITY.displayPrioritiesAbove(PRIORITY_LEVELS[4]); getViewer().refresh(); } }; P5.setEnabled(true); P5.setImageDescriptor(TaskListImages.PRIORITY_5); P5.setText(Task.PriorityLevel.P5.getDescription()); item = new ActionContributionItem(P5); item.fill(dropDownMenu, -1); String priority = getCurrentPriorityLevel(); if (priority.equals(PRIORITY_LEVELS[0])) { P1.setChecked(true); } else if (priority.equals(PRIORITY_LEVELS[1])) { P1.setChecked(true); P2.setChecked(true); } else if (priority.equals(PRIORITY_LEVELS[2])) { P1.setChecked(true); P2.setChecked(true); P3.setChecked(true); } else if (priority.equals(PRIORITY_LEVELS[3])) { P1.setChecked(true); P2.setChecked(true); P3.setChecked(true); P4.setChecked(true); } else if (priority.equals(PRIORITY_LEVELS[4])) { P1.setChecked(true); P2.setChecked(true); P3.setChecked(true); P4.setChecked(true); P5.setChecked(true); } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/ce7a489ec9613c6185f89fe8f8b92d62803284f9/TaskListView.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskListView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
527,
6100,
774,
4599,
1435,
288,
1082,
202,
1803,
453,
21,
273,
394,
4382,
2932,
3113,
5355,
67,
10687,
67,
16876,
13,
288,
9506,
202,
36,
6618,
9506,
202,
482,
918,
108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
527,
6100,
774,
4599,
1435,
288,
1082,
202,
1803,
453,
21,
273,
394,
4382,
2932,
3113,
5355,
67,
10687,
67,
16876,
13,
288,
9506,
202,
36,
6618,
9506,
202,
482,
918,
108... |
isUndoableChange = false; | isUndoableChange = false; | public void mousePressed(MouseEvent event) { isUndoableChange = false; int[] screenCoords = {event.getX(), event.getY()}; int[] mouseCoords = getWorldCoordinates(screenCoords); int mouseX = mouseCoords[0]; int mouseY = mouseCoords[1]; logger.debug("MousePressed Event Props: mode=", c2dm.getDrawModeString()); if (logger.isDebugEnabled()) { logger.debug(" trigger=" + event.isPopupTrigger() + /* ", Button number: " + event.getButton() + */ ", Click count: " + event.getClickCount()); } int startX = 0; int startY = 0; r2dm.setPointerVectorStart(null); r2dm.setPointerVectorEnd(null); Atom atomInRange = getAtomInRange(mouseX, mouseY); Bond bondInRange = getBondInRange(mouseX, mouseY); if (atomInRange != null) { startX = (int) atomInRange.getX2d(); startY = (int) atomInRange.getY2d(); r2dm.setPointerVectorStart(new Point(startX, startY)); } else { r2dm.setPointerVectorStart(new Point(mouseX, mouseY)); } if (c2dm.getDrawMode() == c2dm.MOVE) { selectNearestChemObjectIfNoneSelected(mouseX, mouseY); dragMode = DRAG_MOVING_SELECTED; } else if (c2dm.getDrawMode() == c2dm.DRAWBOND) { if (bondInRange != null && atomInRange == null) { // make sure we are not dragging a bond } else { dragMode = DRAG_DRAWING_PROPOSED_BOND; } } else if (c2dm.getDrawMode() == c2dm.MAPATOMATOM ) { dragMode = DRAG_DRAWING_PROPOSED_ATOMATOMMAP; } else if (c2dm.getDrawMode() == c2dm.SELECT) { dragMode = DRAG_MAKING_SQUARE_SELECTION; } else if (c2dm.getDrawMode() == c2dm.LASSO) { dragMode = DRAG_MAKING_LASSO_SELECTION; } else if (c2dm.getDrawMode() == c2dm.RING || c2dm.getDrawMode() == c2dm.BENZENERING) { dragMode = DRAG_DRAWING_PROPOSED_RING; } } | 45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/81f64c41697e064b62e064b62677261a78168623/Controller2D.java/clean/src/org/openscience/cdk/controller/Controller2D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
7644,
24624,
12,
9186,
1133,
871,
13,
202,
95,
565,
20488,
2896,
429,
3043,
273,
629,
31,
202,
202,
474,
8526,
5518,
13089,
273,
288,
2575,
18,
588,
60,
9334,
871,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
7644,
24624,
12,
9186,
1133,
871,
13,
202,
95,
565,
20488,
2896,
429,
3043,
273,
629,
31,
202,
202,
474,
8526,
5518,
13089,
273,
288,
2575,
18,
588,
60,
9334,
871,
18,
... |
if (element1.hasCorrespondingActivatableTask() && element2.hasCorrespondingActivatableTask()) { ITask task1 = element1.getOrCreateCorrespondingTask(); ITask task2 = element2.getOrCreateCorrespondingTask(); if (task1.isCompleted()) return 1; if (task2.isCompleted()) return -1; } | if (element1.isCompleted() && element2.isCompleted()) { return element1.getPriority().compareTo(element2.getPriority()); } if (element1.isCompleted()) return 1; if (element2.isCompleted()) return -1; | public int compare(Viewer compareViewer, Object o1, Object o2) { if (o1 instanceof AbstractCategory) { if (o2 instanceof AbstractCategory) { return ((AbstractCategory)o1).getDescription(false).compareTo( ((AbstractCategory)o2).getDescription(false)); } else { return -1; } } else if(o1 instanceof ITaskListElement){ if (o2 instanceof AbstractCategory) { return -1; } else if(o2 instanceof ITaskListElement) { ITaskListElement element1 = (ITaskListElement) o1; ITaskListElement element2 = (ITaskListElement) o2; if (element1.hasCorrespondingActivatableTask() && element2.hasCorrespondingActivatableTask()) { ITask task1 = element1.getOrCreateCorrespondingTask(); ITask task2 = element2.getOrCreateCorrespondingTask(); if (task1.isCompleted()) return 1; if (task2.isCompleted()) return -1; } if (column == columnNames[1]) { return 0; } else if (column == columnNames[2]) { return element1.getPriority().compareTo(element2.getPriority()); } else if (column == columnNames[3]) { return element1.getDescription(true).compareTo(element2.getDescription(true)); } else { return 0; } } } else{ return 0; } return 0; } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/ecf292179e351767b769b55486300acee935084c/TaskListView.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
509,
3400,
12,
18415,
3400,
18415,
16,
1033,
320,
21,
16,
1033,
320,
22,
13,
288,
540,
202,
430,
261,
83,
21,
1276,
4115,
4457,
13,
288,
540,
202,
202,
430,
261,
83,
22,
1276,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
3400,
12,
18415,
3400,
18415,
16,
1033,
320,
21,
16,
1033,
320,
22,
13,
288,
540,
202,
430,
261,
83,
21,
1276,
4115,
4457,
13,
288,
540,
202,
202,
430,
261,
83,
22,
1276,
... |
private static boolean isLargeType(int type) { | private static boolean isLargeType(int type) { | private static boolean isLargeType(int type) { return type == SYBNCHAR || type > 128; } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/36d7d34eb620f32e386322a293eaf58cf253a3a6/Tds.java/buggy/src/main/net/sourceforge/jtds/jdbc/Tds.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
353,
20020,
559,
12,
474,
618,
13,
565,
288,
3639,
327,
618,
422,
7068,
15388,
7305,
747,
618,
405,
8038,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
353,
20020,
559,
12,
474,
618,
13,
565,
288,
3639,
327,
618,
422,
7068,
15388,
7305,
747,
618,
405,
8038,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
return 0; } | return verticalScrollBarPolicy; } | public int getVerticalScrollBarPolicy() { return 0; // TODO } // getVerticalScrollBarPolicy() | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/0788b89b7368770a1157f825d60dd8c5a9df183e/ScrollPaneLayout.java/buggy/core/src/classpath/javax/javax/swing/ScrollPaneLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
336,
15704,
6806,
5190,
2582,
1435,
288,
202,
202,
2463,
374,
31,
368,
2660,
202,
97,
368,
336,
15704,
6806,
5190,
2582,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
336,
15704,
6806,
5190,
2582,
1435,
288,
202,
202,
2463,
374,
31,
368,
2660,
202,
97,
368,
336,
15704,
6806,
5190,
2582,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
&& level.fSecondPosition.offset == level.fFirstPosition.offset) { | && level.fSecondPosition.offset == level.fFirstPosition.offset) { | public void perform(IDocument d, IDocumentListener owner) { if ((level.fFirstPosition.isDeleted || level.fFirstPosition.length == 0) && !level.fSecondPosition.isDeleted && level.fSecondPosition.offset == level.fFirstPosition.offset) { try { document.replace(level.fSecondPosition.offset, level.fSecondPosition.length, null); } catch (BadLocationException e) { //JavaPlugin.log(e); } } if (fBracketLevelStack.size() == 0) { document.removePositionUpdater(fUpdater); try { document.removePositionCategory(CATEGORY); } catch (BadPositionCategoryException e) { //JavaPlugin.log(e); } } } | 50059 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50059/c6ce0d2ef70b0da6aec0b63e50eb94c476831d9c/BracketInserter.java/buggy/sub/source/net/sourceforge/texlipse/editor/BracketInserter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
918,
3073,
12,
734,
504,
650,
302,
16,
1599,
504,
650,
2223,
3410,
13,
288,
6862,
202,
430,
14015,
2815,
18,
74,
3759,
2555,
18,
291,
7977,
747,
1801,
18,
74,
3759,
2555,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
3073,
12,
734,
504,
650,
302,
16,
1599,
504,
650,
2223,
3410,
13,
288,
6862,
202,
430,
14015,
2815,
18,
74,
3759,
2555,
18,
291,
7977,
747,
1801,
18,
74,
3759,
2555,
1... |
public void tearDown() { } | 50160 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50160/dd6282cd73f50a476093653aab3a8de52fc1c5c4/InterruptTest.java/buggy/tests/junit/org/jgroups/tests/InterruptTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
268,
2091,
4164,
1435,
288,
202,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
377,
1071,
918,
268,
2091,
4164,
1435,
288,
202,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | ||
this(namenodePort, conf, 1, dataNodeFirst); | this(namenodePort, conf, 1, dataNodeFirst, true); | public MiniDFSCluster(int namenodePort, Configuration conf, boolean dataNodeFirst) throws IOException { this(namenodePort, conf, 1, dataNodeFirst); } | 51718 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51718/deb847a38bd76eb53616a3aec840d49fd5694131/MiniDFSCluster.java/buggy/src/test/org/apache/hadoop/dfs/MiniDFSCluster.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
27987,
31999,
3629,
12,
474,
15135,
20680,
2617,
16,
7682,
4659,
2195,
16,
13491,
1250,
501,
907,
3759,
13,
1216,
1860,
288,
565,
333,
12,
17808,
20680,
2617,
16,
2195,
16,
404,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
27987,
31999,
3629,
12,
474,
15135,
20680,
2617,
16,
7682,
4659,
2195,
16,
13491,
1250,
501,
907,
3759,
13,
1216,
1860,
288,
565,
333,
12,
17808,
20680,
2617,
16,
2195,
16,
404,
16,... |
public static FileLoggerHook setupStdoutLogging(int level, String detail) { | public static FileLoggerHook setupStdoutLogging(int level, String detail) throws InvalidThresholdException { | public static FileLoggerHook setupStdoutLogging(int level, String detail) { setupChain(); logger.setThreshold(level); logger.setDetailedThresholds(detail); FileLoggerHook fh; fh = new FileLoggerHook(System.out, "d (c, t, p): m", "MMM dd, yyyy HH:mm:ss:SSS", level); if(detail != null) fh.setDetailedThresholds(detail); ((LoggerHookChain) logger).addHook(fh); fh.start(); return fh; } | 50287 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50287/01c14cd48d872bfb5d34b94395d44bb4bf44316e/Logger.java/buggy/src/freenet/support/Logger.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1387,
3328,
5394,
3875,
27334,
7735,
12,
474,
1801,
16,
514,
7664,
13,
288,
202,
565,
3875,
3893,
5621,
202,
565,
1194,
18,
542,
7614,
12,
2815,
1769,
202,
565,
1194,
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,
1387,
3328,
5394,
3875,
27334,
7735,
12,
474,
1801,
16,
514,
7664,
13,
288,
202,
565,
3875,
3893,
5621,
202,
565,
1194,
18,
542,
7614,
12,
2815,
1769,
202,
565,
1194,
18,... |
drawable.setGL(new DebugGL(drawable.getGL())); | if (!(drawable.getGL() instanceof DebugGL)) { drawable.setGL(new DebugGL(drawable.getGL())); } | public void init(GLDrawable drawable) { System.out.println("Listener.init()"); drawable.setGL(new DebugGL(drawable.getGL())); GL gl = drawable.getGL(); float pos[] = { 5.0f, 5.0f, 10.0f, 0.0f }; gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, pos); gl.glEnable(GL.GL_CULL_FACE); gl.glEnable(GL.GL_LIGHTING); gl.glEnable(GL.GL_LIGHT0); gl.glEnable(GL.GL_DEPTH_TEST); initializeDisplayList(gl); gl.glEnable(GL.GL_NORMALIZE); Dimension d = drawable.getSize(); reshape(drawable, 0, 0, d.width, d.height); } | 49209 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49209/e9d9b9561c05ab8819ffff7c4b32ed9b1f8a2333/TestContextDestruction.java/buggy/src/demos/testContextDestruction/TestContextDestruction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
12,
11261,
16149,
19021,
13,
288,
1377,
2332,
18,
659,
18,
8222,
2932,
2223,
18,
2738,
1435,
8863,
540,
309,
16051,
12,
9446,
429,
18,
588,
11261,
1435,
1276,
4015,
11261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
11261,
16149,
19021,
13,
288,
1377,
2332,
18,
659,
18,
8222,
2932,
2223,
18,
2738,
1435,
8863,
540,
309,
16051,
12,
9446,
429,
18,
588,
11261,
1435,
1276,
4015,
11261... |
plugin.stopPlugin(); plugin.startPlugin(); | pluginManager.removePlugin(plugin); pluginManager.addPlugin(plugin.getClass().getName()); | public void handleGet(URI uri, ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { HTTPRequest httpRequest = new HTTPRequest(uri, null, ctx); String uriPath = uri.getPath(); String pluginName = uriPath.substring(uriPath.lastIndexOf('/') + 1); if (pluginName.length() > 0) { Plugin plugin = findPlugin(pluginName); if (plugin != null) { if (plugin instanceof HttpPlugin) { ((HttpPlugin) plugin).handleGet(httpRequest, ctx); } else { writeReply(ctx, 220, "text/html; charset=utf-8", "OK", createBox(ctx, "Plugin has no web interface", "The plugin does not have a web interface, so there is nothing to show.").toString()); } return; } writeReply(ctx, 220, "text/html; charset=utf-8", "OK", createBox(ctx, "Plugin not found", "The requested plugin could not be found.").toString()); } String action = httpRequest.getParam("action"); if (action.length() == 0) { writePermanentRedirect(ctx, "Plugin list", "?action=list"); return; } StringBuffer replyBuffer = new StringBuffer(); if ("list".equals(action)) { replyBuffer.append(listPlugins(ctx)); } else if ("add".equals(action)) { pluginName = httpRequest.getParam("pluginName"); boolean added = false; try { pluginManager.addPlugin(pluginName); added = true; } catch (IllegalArgumentException iae1) { } if (added) { writePermanentRedirect(ctx, "Plugin list", "?action=list"); return; } replyBuffer.append(createBox(ctx, "Plugin was not loaded", "The plugin you requested could not be loaded. Please verify the name of the plugin’s class and the URL, if you gave one.")); } else if ("reload".equals(action)) { pluginName = httpRequest.getParam("pluginName"); Plugin plugin = findPlugin(pluginName); plugin.stopPlugin(); plugin.startPlugin(); writePermanentRedirect(ctx, "Plugin list", "?action=list"); } else if ("unload".equals(action)) { pluginName = httpRequest.getParam("pluginName"); Plugin plugin = findPlugin(pluginName); pluginManager.removePlugin(plugin); writePermanentRedirect(ctx, "Plugin list", "?action=list"); } writeReply(ctx, 220, "text/html; charset=utf-8", "OK", replyBuffer.toString()); } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/cb61d3f2edc46ce1d7aab1eff60a457b2c6a4434/PluginToadlet.java/clean/src/freenet/clients/http/PluginToadlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
1216,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
202,
202,
23891,
12189,
273,
394,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
1216,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
202,
202,
23891,
12189,
273,
394,
25... |
if ((FEATURE + "namespaces").equals (featureId)) return namespaces; | if ((FEATURE + "lexical-handler/parameter-entities").equals(featureId)) { return true; } | public boolean getFeature (String featureId) throws SAXNotRecognizedException, SAXNotSupportedException { if ((FEATURE + "validation").equals (featureId)) return false; // external entities (both types) are optionally included if ((FEATURE + "external-general-entities").equals (featureId)) return extGE; if ((FEATURE + "external-parameter-entities") .equals (featureId)) return extPE; // element/attribute names are as written in document; no mangling if ((FEATURE + "namespace-prefixes").equals (featureId)) return xmlNames; // report element/attribute namespaces? if ((FEATURE + "namespaces").equals (featureId)) return namespaces; // all PEs and GEs are reported if ((FEATURE + "lexical-handler/parameter-entities").equals (featureId)) return true; // default is true if ((FEATURE + "string-interning").equals (featureId)) return stringInterning; // EXTENSIONS 1.1 // always returns isSpecified info if ((FEATURE + "use-attributes2").equals (featureId)) return true; // meaningful between startDocument/endDocument if ((FEATURE + "is-standalone").equals (featureId)) { if (parser == null) throw new SAXNotSupportedException (featureId); return parser.isStandalone (); } // optionally don't absolutize URIs in declarations if ((FEATURE + "resolve-dtd-uris").equals (featureId)) return resolveAll; // optionally use resolver2 interface methods, if possible if ((FEATURE + "use-entity-resolver2").equals (featureId)) return useResolver2; throw new SAXNotRecognizedException (featureId); } | 25352 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25352/7fb7568e63c3fe14af521de4699cb37898923ca7/SAXDriver.java/buggy/libjava/gnu/xml/aelfred2/SAXDriver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
17961,
261,
780,
2572,
548,
13,
565,
1216,
10168,
1248,
5650,
9367,
503,
16,
10168,
25482,
565,
288,
202,
430,
14015,
18257,
397,
315,
8685,
20387,
14963,
261,
7238,
548,
3719,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17961,
261,
780,
2572,
548,
13,
565,
1216,
10168,
1248,
5650,
9367,
503,
16,
10168,
25482,
565,
288,
202,
430,
14015,
18257,
397,
315,
8685,
20387,
14963,
261,
7238,
548,
3719,
... |
currentRow = (ColData[])rowData.get(rowNum-1); | currentRow = (Object[])rowData.get(rowNum-1); | private boolean cursorFetch(int rowNum) throws SQLException { savedRow = null; rowUpdated = false; if (rowsInResult == 0) { pos = POS_BEFORE_FIRST; currentRow = null; return false; } if (rowNum == pos) { // On current row if (resultSetType == ResultSet.TYPE_SCROLL_SENSITIVE) { refreshRow(); } return true; } if (rowNum < 1) { currentRow = null; pos = POS_BEFORE_FIRST; return false; } if (rowNum > rowsInResult) { currentRow = null; pos = POS_AFTER_LAST; return false; } pos = rowNum; currentRow = (ColData[])rowData.get(rowNum-1); rowDeleted = currentRow == null; if (resultSetType == ResultSet.TYPE_SCROLL_SENSITIVE && currentRow != null) { refreshRow(); } return true; } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/280391932d64190b4ee42f49e5f8b60382f2fa03/CachedResultSet.java/buggy/src/main/net/sourceforge/jtds/jdbc/CachedResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
3347,
5005,
12,
474,
1027,
2578,
13,
5411,
1216,
6483,
288,
3639,
5198,
1999,
273,
446,
31,
3639,
1027,
7381,
273,
629,
31,
3639,
309,
261,
3870,
382,
1253,
422,
374,
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,
377,
3238,
1250,
3347,
5005,
12,
474,
1027,
2578,
13,
5411,
1216,
6483,
288,
3639,
5198,
1999,
273,
446,
31,
3639,
1027,
7381,
273,
629,
31,
3639,
309,
261,
3870,
382,
1253,
422,
374,
13,
28... |
int len = dst.capacity() - dst.position(); | int len = dst.remaining(); | public SocketAddress receive (ByteBuffer dst) throws IOException { if (!isOpen()) throw new ClosedChannelException(); try { DatagramPacket packet; int len = dst.capacity() - dst.position(); if (dst.hasArray()) { packet = new DatagramPacket (dst.array(), dst.arrayOffset() + dst.position(), len); } else { packet = new DatagramPacket (new byte [len], len); } boolean completed = false; try { begin(); setInChannelOperation(true); socket.receive (packet); completed = true; } finally { end (completed); setInChannelOperation(false); } if (!dst.hasArray()) { dst.put (packet.getData(), packet.getOffset(), packet.getLength()); } else { dst.position (dst.position() + packet.getLength()); } return packet.getSocketAddress(); } catch (SocketTimeoutException e) { return null; } } | 27835 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27835/7e4c56ed992fe3bf715b82b1e3e8fda2e6772688/DatagramChannelImpl.java/buggy/libjava/gnu/java/nio/DatagramChannelImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
8758,
1887,
6798,
261,
12242,
3046,
13,
565,
1216,
1860,
225,
288,
565,
309,
16051,
291,
3678,
10756,
1377,
604,
394,
25582,
2909,
503,
5621,
3639,
775,
1377,
288,
3639,
6168,
17049,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8758,
1887,
6798,
261,
12242,
3046,
13,
565,
1216,
1860,
225,
288,
565,
309,
16051,
291,
3678,
10756,
1377,
604,
394,
25582,
2909,
503,
5621,
3639,
775,
1377,
288,
3639,
6168,
17049,
... |
public void testCallableStatementExec4() throws Exception { CallableStatement cstmt = con.prepareCall("EXECUTE sp_who"); makeTestTables(cstmt); makeObjects(cstmt, 8); ResultSet rs = cstmt.executeQuery(); dump(rs); cstmt.close(); rs.close(); } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/31239e9062bef524a204bbd17ef75857ed26f1f9/CallableStatementTest.java/buggy/src/test/net/sourceforge/jtds/test/CallableStatementTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
3813,
11452,
3406,
1905,
24,
1435,
15069,
503,
95,
11452,
3406,
71,
10589,
33,
591,
18,
9366,
1477,
2932,
15271,
9099,
1752,
67,
3350,
83,
8863,
6540,
4709,
6905,
12,
71,
10589,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
3813,
11452,
3406,
1905,
24,
1435,
15069,
503,
95,
11452,
3406,
71,
10589,
33,
591,
18,
9366,
1477,
2932,
15271,
9099,
1752,
67,
3350,
83,
8863,
6540,
4709,
6905,
12,
71,
10589,
17... | ||
set(children, position, cat); | this.set(children, position, cat); | public void loadChildCategories(Vector children) { ResultSet result; String query; query = "SELECT id, name, positionInTree, modifiableIndexes FROM indexCategories"; if(id < 0) query = query + " WHERE parent IS NULL"; else query = query + " WHERE parent = "+Integer.toString(id); if(modifiables) { query = query + " AND modifiableIndexes = TRUE"; } else { query = query + " AND modifiableIndexes = FALSE"; } query = query + " ORDER BY positionInTree DESC"; try { result = db.executeQuery(query); if(result == null) { Logger.error(this, "Unable to get child categories for '"+toString()+"'"); return; } while(result.next()) { int id = result.getInt("id"); int position = result.getInt("positionInTree"); String name = result.getString("name"); IndexCategory cat = new IndexCategory(db, queueManager, id, this, name, modifiables); cat.loadChildren(); set(children, position, cat); } } catch (java.sql.SQLException e) { Logger.error(this, "SQLException while getting child of index category '"+name+"': "+e.toString()); } } | 47012 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47012/88402a3bc59123261d50a7cfed0ac20de2b772f6/IndexCategory.java/clean/src/thaw/plugins/index/IndexCategory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1262,
1763,
10487,
12,
5018,
2325,
13,
288,
9506,
202,
13198,
563,
31,
9506,
202,
780,
843,
31,
202,
202,
2271,
273,
315,
4803,
612,
16,
508,
16,
1754,
382,
2471,
16,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1262,
1763,
10487,
12,
5018,
2325,
13,
288,
9506,
202,
13198,
563,
31,
9506,
202,
780,
843,
31,
202,
202,
2271,
273,
315,
4803,
612,
16,
508,
16,
1754,
382,
2471,
16,
6... |
throw Kit.badTypeJS(val); | warnAboutNonJSObject(val); return true; | public static boolean toBoolean(Object val) { if (val == null) return false; if (val instanceof Boolean) return ((Boolean) val).booleanValue(); if (val instanceof Scriptable) { if (Context.getContext().isVersionECMA1()) { // pure ECMA return val != Undefined.instance; } // ECMA extension val = ((Scriptable) val).getDefaultValue(BooleanClass); if (val instanceof Scriptable) throw errorWithClassName("msg.primitive.expected", val); if (val instanceof Boolean) return ((Boolean) val).booleanValue(); // fall through } if (val instanceof String) return ((String) val).length() != 0; if (val instanceof Number) { double d = ((Number) val).doubleValue(); return (d == d && d != 0.0); } throw Kit.badTypeJS(val); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/0689482587578830da02b53dc2c9f2d2db4fa0b3/ScriptRuntime.java/buggy/js/rhino/src/org/mozilla/javascript/ScriptRuntime.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
358,
5507,
12,
921,
1244,
13,
288,
3639,
309,
261,
1125,
422,
446,
13,
5411,
327,
629,
31,
3639,
309,
261,
1125,
1276,
3411,
13,
5411,
327,
14015,
5507,
13,
1244,
2934,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
358,
5507,
12,
921,
1244,
13,
288,
3639,
309,
261,
1125,
422,
446,
13,
5411,
327,
629,
31,
3639,
309,
261,
1125,
1276,
3411,
13,
5411,
327,
14015,
5507,
13,
1244,
2934,... |
return pruned; } | return pruned; } | private boolean pruneStaleJobs() { Object[] jobsToCheck = jobs.keySet().toArray(); boolean pruned = false; for (int i = 0; i < jobsToCheck.length; i++) { Job job = (Job) jobsToCheck[i]; if(checkForStaleness(job)){ if (Policy.DEBUG_STALE_JOBS) { WorkbenchPlugin.log("Stale Job " + job.getName()); //$NON-NLS-1$ } pruned = true; } } return pruned; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/0e7fbc26f7d1b7769a0721c71fd17572c8432fd5/ProgressManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
13293,
19155,
7276,
1435,
288,
3639,
1033,
8526,
6550,
18126,
273,
6550,
18,
856,
694,
7675,
31447,
5621,
3639,
1250,
27843,
273,
629,
31,
3639,
364,
261,
474,
277,
273,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
13293,
19155,
7276,
1435,
288,
3639,
1033,
8526,
6550,
18126,
273,
6550,
18,
856,
694,
7675,
31447,
5621,
3639,
1250,
27843,
273,
629,
31,
3639,
364,
261,
474,
277,
273,
374,
... |
actionBar.setCursor(normalCursor); | actionBar.setCursor(getDisplay().getSystemCursor( SWT.CURSOR_ARROW)); | protected void createChildren() { normalCursor = new Cursor(getDisplay(), SWT.CURSOR_ARROW); FormLayout layout = new FormLayout(); setLayout(layout); jobImageLabel = new Label(this, SWT.NONE); jobImageLabel.setImage(getInfoImage()); FormData imageData = new FormData(); imageData.top = new FormAttachment(IDialogConstants.VERTICAL_SPACING); imageData.left = new FormAttachment( IDialogConstants.HORIZONTAL_SPACING / 2); jobImageLabel.setLayoutData(imageData); progressLabel = new Label(this, SWT.NONE); progressLabel.setFont(JFaceResources.getFontRegistry().getBold( JFaceResources.DEFAULT_FONT)); progressLabel.setText(getMainTitle()); actionBar = new ToolBar(this, SWT.FLAT); actionBar.setCursor(normalCursor); // set cursor to overwrite any busy // cursor we might have actionButton = new ToolItem(actionBar, SWT.NONE); actionButton .setToolTipText(ProgressMessages.NewProgressView_CancelJobToolTip); actionButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { actionButton.setEnabled(false); cancelOrRemove(); } }); actionBar.addListener(SWT.Traverse, new Listener() { /* * (non-Javadoc) * * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event) */ public void handleEvent(Event event) { if (indexListener == null) return; int detail = event.detail; if (detail == SWT.TRAVERSE_ARROW_NEXT) indexListener.selectNext(); if (detail == SWT.TRAVERSE_ARROW_PREVIOUS) indexListener.selectPrevious(); } }); setToolBarImages(); FormData progressData = new FormData(); progressData.top = new FormAttachment(IDialogConstants.VERTICAL_SPACING); progressData.left = new FormAttachment(jobImageLabel, IDialogConstants.HORIZONTAL_SPACING / 2); progressData.right = new FormAttachment(actionBar, IDialogConstants.HORIZONTAL_SPACING); progressLabel.setLayoutData(progressData); mouseListener = new MouseAdapter(){ /* (non-Javadoc) * @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent) */ public void mouseDown(MouseEvent e){ if(indexListener != null) indexListener.select(); } }; addMouseListener(mouseListener); jobImageLabel.addMouseListener(mouseListener); progressLabel.addMouseListener(mouseListener); setLayoutsForNoProgress(); refresh(); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/2d4042b70069b0517c760095b3fa69546ade5458/ProgressInfoItem.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressInfoItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
4212,
1435,
288,
202,
202,
6130,
6688,
273,
394,
13949,
12,
588,
4236,
9334,
348,
8588,
18,
7509,
55,
916,
67,
985,
11226,
1769,
202,
202,
1204,
3744,
3511,
273,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
4212,
1435,
288,
202,
202,
6130,
6688,
273,
394,
13949,
12,
588,
4236,
9334,
348,
8588,
18,
7509,
55,
916,
67,
985,
11226,
1769,
202,
202,
1204,
3744,
3511,
273,
39... |
MondrianJolapDimension dimension = (MondrianJolapDimension) getDimensionStepManager().getDimensionView().getDimension(); return new FunCall( getFunName(getOp()), | MondrianJolapDimension dimension = (MondrianJolapDimension) getDimensionStepManager().getDimensionView().getDimension(); return new FunCall( getFunName(getOp()), | Exp getCondition() throws OLAPException { MondrianJolapDimension dimension = (MondrianJolapDimension) getDimensionStepManager().getDimensionView().getDimension(); return new FunCall( getFunName(getOp()), getFunSyntacticType(getOp()), new Exp[] { new FunCall("CurrentMember", Syntax.Property, new Exp[] {dimension.dimension} ), getExp(rhs)} ); } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/b5b5168edc3af09cb74945a80b0c36e6630ed502/MondrianAttributeFilter.java/buggy/src/main/mondrian/jolap/MondrianAttributeFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
2966,
26659,
1435,
1216,
531,
48,
2203,
503,
288,
202,
202,
49,
1434,
566,
304,
46,
355,
438,
8611,
4968,
273,
261,
49,
1434,
566,
304,
46,
355,
438,
8611,
13,
9506,
202,
588,
86... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2966,
26659,
1435,
1216,
531,
48,
2203,
503,
288,
202,
202,
49,
1434,
566,
304,
46,
355,
438,
8611,
4968,
273,
261,
49,
1434,
566,
304,
46,
355,
438,
8611,
13,
9506,
202,
588,
86... |
return portletPrefences; | return portletPreferences; | public PortletPreferences updatePreferences( PortletPreferencesPK pk, PortletPreferencesImpl prefs) throws PortalException, SystemException { PortletPreferences portletPrefences = PortletPreferencesUtil.findByPrimaryKey(pk); String xml = PortletPreferencesSerializer.toXML(prefs); portletPrefences.setPreferences(xml); PortletPreferencesUtil.update(portletPrefences); PortletPreferencesLocalUtil.clearPreferencesPool(pk.ownerId); return portletPrefences; } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/b3f0f43276fb70ce2b136b81f254c16dfb379c96/PortletPreferencesLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portal/service/impl/PortletPreferencesLocalServiceImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
21305,
12377,
1089,
12377,
12,
1082,
202,
18566,
12377,
8784,
2365,
16,
21305,
12377,
2828,
15503,
13,
202,
202,
15069,
25478,
503,
16,
26731,
288,
202,
202,
18566,
12377,
13114,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21305,
12377,
1089,
12377,
12,
1082,
202,
18566,
12377,
8784,
2365,
16,
21305,
12377,
2828,
15503,
13,
202,
202,
15069,
25478,
503,
16,
26731,
288,
202,
202,
18566,
12377,
13114,
... |
SVNLocationEntry sEntry = FSReader.copiedFrom(myReposRootDir, croot, cpath, myRevNodesPool); | SVNLocationEntry sEntry = FSReader.copiedFrom(myReposRootDir, FSRoot.createRevisionRoot(croot.getId().getRevision(), croot), cpath, myRevNodesPool); | public int getLocations(String path, long pegRevision, long[] revisions, ISVNLocationEntryHandler handler) throws SVNException { assertValidRevision(pegRevision); for (int i = 0; i < revisions.length; i++) { assertValidRevision(revisions[i]); } try{ openRepository(); path = getRepositoryPath(path); ArrayList locationEntries = new ArrayList(0); long[] locationRevs = new long[revisions.length]; long revision; FSRevisionNode root = null; //Sort revisions from greatest downward Arrays.sort(revisions); for(int i = 0; i < revisions.length; ++i){ locationRevs[i] = revisions[revisions.length - (i + 1)]; } //Ignore revisions R that are younger than the pegRevisions where //path@pegRevision is not an ancestor of path@R. int count = 0; boolean isAncestor = false; for(count = 0; count < locationRevs.length && locationRevs[count] > pegRevision; ++count){ isAncestor = FSNodeHistory.checkAncestryOfPegPath(myReposRootDir, path, pegRevision, locationRevs[count], myRevNodesPool); if(isAncestor){ break; } } if(count >= locationRevs.length){ return 0; } revision = isAncestor ? locationRevs[count] : pegRevision; while(count < revisions.length){ //Find the target of the innermost copy relevant to path@revision. //The copy may be of path itself, or of a parent directory. root = FSReader.getRootRevNode(myReposRootDir, revision); FSClosestCopy tempClCopy = closestCopy(FSRoot.createRevisionRoot(revision, root), path); if(tempClCopy == null){ break; } FSRevisionNode croot = tempClCopy.getRevisionNode(); if(croot == null){ break; } String cpath = tempClCopy.getPath(); //Assign the current path to all younger revisions until we reach //the copy target rev long crev = croot.getId().isTxn() ? FSConstants.SVN_INVALID_REVNUM : croot.getId().getRevision(); while((count < revisions.length) && (locationRevs[count] >= crev)){ locationEntries.add(new SVNLocationEntry(locationRevs[count], path)); ++count; } // Follow the copy to its source. Ignore all revs between the // copy target rev and the copy source rev (non-inclusive). SVNLocationEntry sEntry = FSReader.copiedFrom(myReposRootDir, croot, cpath, myRevNodesPool); /*!!here is inconsitance with code of svn: they write locationRevs[count] > sEntry.getRevision()*/ while((count < revisions.length) && locationRevs[count] > sEntry.getRevision()){ ++count; } /* Ultimately, it's not the path of the closest copy's source * that we care about -- it's our own path's location in the * copy source revision. So we'll tack the relative path that * expresses the difference between the copy destination and our * path in the copy revision onto the copy source path to * determine this information. * In other words, if our path is "/branches/my-branch/foo/bar", * and we know that the closest relevant copy was a copy of * "/trunk" to "/branches/my-branch", then that relative path * under the copy destination is "/foo/bar". Tacking that onto * the copy source path tells us that our path was located at * "/trunk/foo/bar" before the copy. */ String remainder = path.equals(cpath) ? "" : SVNPathUtil.pathIsChild(cpath, path); path = SVNPathUtil.concatToAbs(sEntry.getPath(), remainder); revision = sEntry.getRevision(); } /* There are no copies relevant to path@revision. So any remaining * revisions either predate the creation of path@revision or have * the node existing at the same path. We will look up path@lrev * for each remaining location-revision and make sure it is related * to path@revision. */ root = myRevNodesPool.getRootRevisionNode(revision, myReposRootDir);//FSReader.getRootRevNode(myReposRootDir, revision); FSRevisionNode curNode = myRevNodesPool.getRevisionNode(root, path, myReposRootDir);//FSReader.getRevisionNode(myReposRootDir, path, root, 0); while(count < revisions.length){ root = myRevNodesPool.getRootRevisionNode(locationRevs[count], myReposRootDir);//FSReader.getRootRevNode(myReposRootDir, locationRevs[count]); SVNNodeKind kind = checkNodeKind(path, FSRoot.createRevisionRoot(locationRevs[count], root)); if(kind == SVNNodeKind.NONE){ break; } FSRevisionNode currentNode = myRevNodesPool.getRevisionNode(root, path, myReposRootDir);//FSReader.getRevisionNode(myReposRootDir, path, root, 0); if(!FSID.checkIdsRelated(curNode.getId(), currentNode.getId())){ break; } /* The node exists at the same path; record that and advance. */ locationEntries.add(new SVNLocationEntry(locationRevs[count], path)); ++count; } for(count = 0; count < locationEntries.size(); count++){ /* make sure we have a handler */ if(handler != null){ handler.handleLocationEntry((SVNLocationEntry)locationEntries.get(count)); } } return count; }finally{ closeRepository(); } } | 5695 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5695/e7ad048caa889ec811131785dd8fbd2c7886af28/FSRepository.java/buggy/javasvn/src/org/tmatesoft/svn/core/internal/io/fs/FSRepository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
336,
10985,
12,
780,
589,
16,
1525,
29231,
7939,
16,
1525,
8526,
18325,
16,
4437,
58,
50,
2735,
1622,
1503,
1838,
13,
1216,
29537,
50,
503,
288,
3639,
1815,
1556,
7939,
12,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
336,
10985,
12,
780,
589,
16,
1525,
29231,
7939,
16,
1525,
8526,
18325,
16,
4437,
58,
50,
2735,
1622,
1503,
1838,
13,
1216,
29537,
50,
503,
288,
3639,
1815,
1556,
7939,
12,
9... |
try{ callback.templateDeclarationEnd( templateDeclaration ); } catch( Exception e ) {} | try{ callback.templateDeclarationEnd( templateDeclaration, lastToken ); } catch( Exception e ) {} | protected void templateDeclaration( Object container ) throws Backtrack { boolean export = false; if( LT(1) == Token.t_export ) { consume( Token.t_export ); export = true; } consume( Token.t_template ); if( LT(1) != Token.tLT ) { // explicit-instantiation Object instantiation = null; try { instantiation = callback.explicitInstantiationBegin( container ); } catch( Exception e ) { } declaration( instantiation ); try { callback.explicitInstantiationEnd( instantiation ); } catch( Exception e ) { } return; } else { consume( Token.tLT ); if( LT(1) == Token.tGT ) { consume( Token.tGT ); // explicit-specialization Object specialization = null; try{ specialization = callback.explicitSpecializationBegin( container ); } catch( Exception e ) { } declaration( specialization ); try{ callback.explicitSpecializationEnd( specialization ); } catch( Exception e ) { } return; } } Object templateDeclaration = null; try { try{ templateDeclaration = callback.templateDeclarationBegin( container, export ); } catch ( Exception e ) {} templateParameterList( templateDeclaration ); consume( Token.tGT ); declaration( templateDeclaration ); try{ callback.templateDeclarationEnd( templateDeclaration ); } catch( Exception e ) {} } catch( Backtrack bt ) { try { callback.templateDeclarationAbort( templateDeclaration ); } catch( Exception e ) {} } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/938a074dd8962c326220efab64196bd8a4dcef54/Parser.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1542,
6094,
12,
1033,
1478,
262,
1216,
4297,
4101,
202,
95,
202,
202,
6494,
3359,
273,
629,
31,
3196,
202,
430,
12,
11807,
12,
21,
13,
422,
3155,
18,
88,
67,
6530,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1542,
6094,
12,
1033,
1478,
262,
1216,
4297,
4101,
202,
95,
202,
202,
6494,
3359,
273,
629,
31,
3196,
202,
430,
12,
11807,
12,
21,
13,
422,
3155,
18,
88,
67,
6530,
262... |
public org.quickfix.field.EncodedTextLen getEncodedTextLen() throws FieldNotFound { org.quickfix.field.EncodedTextLen value = new org.quickfix.field.EncodedTextLen(); | public quickfix.field.EncodedTextLen getEncodedTextLen() throws FieldNotFound { quickfix.field.EncodedTextLen value = new quickfix.field.EncodedTextLen(); | public org.quickfix.field.EncodedTextLen getEncodedTextLen() throws FieldNotFound { org.quickfix.field.EncodedTextLen value = new org.quickfix.field.EncodedTextLen(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/Email.java/buggy/src/java/src/quickfix/fix44/Email.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
1528,
2891,
28799,
1528,
2891,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
1528,
2891,
460,
273,
394,
235... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
1528,
2891,
28799,
1528,
2891,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
1528,
2891,
460,
273,
394,
235... |
URI uri = baseURI.resolve("4.1.1.1/empty-title.xml"); | IRI uri = baseURI.resolve("4.1.1.1/empty-title.xml"); | public static void testSection4111EmptyTitle() throws Exception { //http://feedvalidator.org/testcases/atom/4.1.1.1/empty-title.xml URI uri = baseURI.resolve("4.1.1.1/empty-title.xml"); Document<Feed> doc = get(uri); assertNotNull(doc); assertEquals(doc.getRoot().getEntries().get(0).getTitle(),""); } | 46425 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46425/a7724f57b1ed9f7e36f7b511e06e7dbc231182d4/FeedValidatorTest.java/clean/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
1842,
5285,
24,
20227,
1921,
4247,
1435,
1216,
1185,
288,
565,
368,
2505,
2207,
7848,
7357,
18,
3341,
19,
3813,
22186,
19,
7466,
19,
24,
18,
21,
18,
21,
18,
21,
19,
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,
282,
1071,
760,
918,
1842,
5285,
24,
20227,
1921,
4247,
1435,
1216,
1185,
288,
565,
368,
2505,
2207,
7848,
7357,
18,
3341,
19,
3813,
22186,
19,
7466,
19,
24,
18,
21,
18,
21,
18,
21,
19,
55... |
true, true, true, true); InitLibraryFrame(); | true, true, true, true); initLibraryFrame(); | public SceneFrame(File file) { super(file.getName(), true, //resizable true, //closable true, //maximizable true);//iconifiable InitLibraryFrame(); } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/c8c2f2d41919d6587858edc131d215f4eebaeb4b/SceneFrame.java/buggy/JSynthLib/core/SceneFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
29347,
3219,
12,
812,
585,
13,
288,
3639,
2240,
12,
768,
18,
17994,
9334,
3639,
638,
16,
368,
455,
6934,
3639,
638,
16,
368,
7550,
87,
429,
3639,
638,
16,
368,
1896,
381,
6934,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
29347,
3219,
12,
812,
585,
13,
288,
3639,
2240,
12,
768,
18,
17994,
9334,
3639,
638,
16,
368,
455,
6934,
3639,
638,
16,
368,
7550,
87,
429,
3639,
638,
16,
368,
1896,
381,
6934,
... |
.append(" and iu."); | .append(" and "); | public Integer ejbFindUserFromEmail(String emailAddress) throws FinderException, RemoteException { StringBuffer sql = new StringBuffer("select iu.* "); sql.append(" from ").append(this.getTableName()).append(" iu ,"); sql.append(EmailBMPBean.SQL_TABLE_NAME).append(" ie ,"); sql.append(SQL_RELATION_EMAIL).append(" iue "); sql.append(" where ie.").append(EmailBMPBean.SQL_TABLE_NAME).append("_ID = "); sql.append("iue.").append(EmailBMPBean.SQL_TABLE_NAME).append("_ID and "); sql.append("iue.").append(getIDColumnName()).append(" = iu.").append(getIDColumnName()); sql.append(" and ie.").append(EmailBMPBean.SQL_COLUMN_EMAIL).append(" = '"); sql.append(emailAddress).append("'"); // append is not deleted sql .append(" and iu."); appendIsNotDeleted(sql); return (Integer) super.idoFindOnePKBySQL(sql.toString()); } | 52001 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52001/bf912f8c226096d6d6bdaae2b7d648826f3cc8c0/UserBMPBean.java/buggy/src/java/com/idega/user/data/UserBMPBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2144,
18024,
3125,
1299,
1265,
4134,
12,
780,
28748,
13,
1216,
19307,
503,
16,
18361,
288,
202,
202,
780,
1892,
1847,
273,
394,
6674,
2932,
4025,
277,
89,
4509,
315,
1769,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2144,
18024,
3125,
1299,
1265,
4134,
12,
780,
28748,
13,
1216,
19307,
503,
16,
18361,
288,
202,
202,
780,
1892,
1847,
273,
394,
6674,
2932,
4025,
277,
89,
4509,
315,
1769,
202,
... |
java.sql.ResultSet rs = connection.ExecSQL("SELECT c.relname,c2.relname," + "t.tgconstrname,ic.relname," + "t.tgdeferrable,t.tginitdeferred," + "t.tgnargs,t.tgargs,p.proname " + "FROM pg_trigger t,pg_class c,pg_class c2," + "pg_class ic,pg_proc p, pg_index i " + "WHERE t.tgrelid=c.oid AND t.tgconstrrelid=c2.oid " + "AND t.tgfoid=p.oid AND tgisconstraint " + ((primaryTable != null) ? "AND c.relname='" + primaryTable + "' " : "") + ((foreignTable != null) ? "AND c2.relname='" + foreignTable + "' " : "") + "AND i.indrelid=c.oid " + "AND i.indexrelid=ic.oid AND i.indisprimary " + "ORDER BY c.relname,c2.relname" ); | java.sql.ResultSet rs = connection.ExecSQL( "SELECT " + "c.relname as prelname, " + "c2.relname as frelname, " + "t.tgconstrname, " + "a.attnum as keyseq, " + "ic.relname as fkeyname, " + "t.tgdeferrable, " + "t.tginitdeferred, " + "t.tgnargs,t.tgargs, " + "p1.proname as updaterule, " + "p2.proname as deleterule " + "FROM " + "pg_trigger t, " + "pg_trigger t1, " + "pg_class c, " + "pg_class c2, " + "pg_class ic, " + "pg_proc p1, " + "pg_proc p2, " + "pg_index i, " + "pg_attribute a " + "WHERE " + "(t.tgrelid=c.oid " + "AND t.tgisconstraint " + "AND t.tgconstrrelid=c2.oid " + "AND t.tgfoid=p1.oid " + "and p1.proname like '%%upd') " + "and " + "(t1.tgrelid=c.oid " + "and t1.tgisconstraint " + "and t1.tgconstrrelid=c2.oid " + "AND t1.tgfoid=p2.oid " + "and p2.proname like '%%del') " + ((primaryTable != null) ? "AND c.relname='" + primaryTable + "' " : "") + ((foreignTable != null) ? "AND c2.relname='" + foreignTable + "' " : "") + "AND i.indrelid=c.oid " + "AND i.indexrelid=ic.oid " + "AND ic.oid=a.attrelid " + "AND i.indisprimary " + "ORDER BY " + (primaryTable != null ? "frelname" : "prelname") + ",keyseq"); | private java.sql.ResultSet getImportedExportedKeys(String catalog, String schema, String primaryTable, String foreignTable) throws SQLException { Field f[] = new Field[14]; f[0] = new Field(connection, "PKTABLE_CAT", iVarcharOid, 32); f[1] = new Field(connection, "PKTABLE_SCHEM", iVarcharOid, 32); f[2] = new Field(connection, "PKTABLE_NAME", iVarcharOid, 32); f[3] = new Field(connection, "PKCOLUMN_NAME", iVarcharOid, 32); f[4] = new Field(connection, "FKTABLE_CAT", iVarcharOid, 32); f[5] = new Field(connection, "FKTABLE_SCHEM", iVarcharOid, 32); f[6] = new Field(connection, "FKTABLE_NAME", iVarcharOid, 32); f[7] = new Field(connection, "FKCOLUMN_NAME", iVarcharOid, 32); f[8] = new Field(connection, "KEY_SEQ", iInt2Oid, 2); f[9] = new Field(connection, "UPDATE_RULE", iInt2Oid, 2); f[10] = new Field(connection, "DELETE_RULE", iInt2Oid, 2); f[11] = new Field(connection, "FK_NAME", iVarcharOid, 32); f[12] = new Field(connection, "PK_NAME", iVarcharOid, 32); f[13] = new Field(connection, "DEFERRABILITY", iInt2Oid, 2); java.sql.ResultSet rs = connection.ExecSQL("SELECT c.relname,c2.relname," + "t.tgconstrname,ic.relname," + "t.tgdeferrable,t.tginitdeferred," + "t.tgnargs,t.tgargs,p.proname " + "FROM pg_trigger t,pg_class c,pg_class c2," + "pg_class ic,pg_proc p, pg_index i " + "WHERE t.tgrelid=c.oid AND t.tgconstrrelid=c2.oid " + "AND t.tgfoid=p.oid AND tgisconstraint " + ((primaryTable != null) ? "AND c.relname='" + primaryTable + "' " : "") + ((foreignTable != null) ? "AND c2.relname='" + foreignTable + "' " : "") + "AND i.indrelid=c.oid " + "AND i.indexrelid=ic.oid AND i.indisprimary " + "ORDER BY c.relname,c2.relname" ); Vector tuples = new Vector(); short seq = 0; if (rs.next()) { boolean hasMore; do { byte tuple[][] = new byte[14][0]; for (int k = 0;k < 14;k++) tuple[k] = null; String fKeyName = rs.getString(3); boolean foundRule = false; do { String proname = rs.getString(9); if (proname != null && proname.startsWith("RI_FKey_")) { int col = -1; if (proname.endsWith("_upd")) col = 9; // UPDATE_RULE else if (proname.endsWith("_del")) col = 10; // DELETE_RULE if (col > -1) { String rule = proname.substring(8, proname.length() - 4); int action = importedKeyNoAction; if ("cascade".equals(rule)) action = importedKeyCascade; else if ("setnull".equals(rule)) action = importedKeySetNull; else if ("setdefault".equals(rule)) action = importedKeySetDefault; tuple[col] = Integer.toString(action).getBytes(); if (!foundRule) { tuple[2] = rs.getBytes(1); //PKTABLE_NAME tuple[6] = rs.getBytes(2); //FKTABLE_NAME // Parse the tgargs data StringBuffer fkeyColumns = new StringBuffer(); StringBuffer pkeyColumns = new StringBuffer(); int numColumns = (rs.getInt(7) >> 1) - 2; String s = rs.getString(8); int pos = s.lastIndexOf("\\000"); for (int c = 0;c < numColumns;c++) { if (pos > -1) { int pos2 = s.lastIndexOf("\\000", pos - 1); if (pos2 > -1) { if (pkeyColumns.length() > 0) pkeyColumns.insert(0, ','); pkeyColumns.insert(0, s.substring(pos2 + 4, pos)); //PKCOLUMN_NAME pos = s.lastIndexOf("\\000", pos2 - 1); if (pos > -1) { if (fkeyColumns.length() > 0) fkeyColumns.insert(0, ','); fkeyColumns.insert(0, s.substring(pos + 4, pos2)); //FKCOLUMN_NAME } } } } tuple[3] = pkeyColumns.toString().getBytes(); //PKCOLUMN_NAME tuple[7] = fkeyColumns.toString().getBytes(); //FKCOLUMN_NAME tuple[8] = Integer.toString(seq++).getBytes(); //KEY_SEQ tuple[11] = fKeyName.getBytes(); //FK_NAME tuple[12] = rs.getBytes(4); //PK_NAME // DEFERRABILITY int deferrability = importedKeyNotDeferrable; boolean deferrable = rs.getBoolean(5); boolean initiallyDeferred = rs.getBoolean(6); if (deferrable) { if (initiallyDeferred) deferrability = importedKeyInitiallyDeferred; else deferrability = importedKeyInitiallyImmediate; } tuple[13] = Integer.toString(deferrability).getBytes(); foundRule = true; } } } } while ((hasMore = rs.next()) && fKeyName.equals(rs.getString(3))); if(foundRule) tuples.addElement(tuple); } while (hasMore); } return new ResultSet(connection, f, tuples, "OK", 1); } | 52628 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52628/520695701ca6ef6ad5e5a984a98f89b3ede31e3c/DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
2252,
18,
4669,
18,
13198,
336,
24934,
31140,
2396,
12,
780,
6222,
16,
514,
1963,
16,
514,
3354,
1388,
16,
514,
5523,
1388,
13,
1216,
6483,
202,
95,
202,
202,
974,
284,
8526,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2252,
18,
4669,
18,
13198,
336,
24934,
31140,
2396,
12,
780,
6222,
16,
514,
1963,
16,
514,
3354,
1388,
16,
514,
5523,
1388,
13,
1216,
6483,
202,
95,
202,
202,
974,
284,
8526,... |
dumpFillerDictFile(); | public boolean compute() throws Exception{ System.out.println("Preparing voice database for labelling"); /* get the directories of sphinxtrain and edinburgh speech tools */ sphinxtraindir = System.getProperty("SPHINXTRAINDIR"); if ( sphinxtraindir == null ) { System.out.println( "Warning: The environment variable SPHINXTRAINDIR was not found on your system." ); System.out.println( " Defaulting SPHINXTRAINDIR to [ /project/mary/anna/sphinx/SphinxTrain/ ]." ); sphinxtraindir = "/project/mary/anna/sphinx/SphinxTrain/"; } estdir = System.getProperty("ESTDIR"); if ( estdir == null ) { System.out.println( "Warning: The environment variable ESTDIR was not found on your system." ); System.out.println( " Defaulting ESTDIR to [ /project/mary/Festival/speech_tools/ ]." ); estdir = "/project/mary/Festival/speech_tools/"; } //get the root dir and the voicename rootDir = new File(dbLayout.rootDirName()); voicename = rootDir.getName(); //make new directories st and lab st = new File(rootDir.getAbsolutePath()+"/st"); // get the output directory of files used by sphinxtrain outputDir = st.getAbsolutePath()+"/etc"; //get the filenames filenames = baseNames.getListAsArray(); /* setup the Sphinx directory */ System.out.println("Setting up sphinx directory ..."); setup(); System.out.println(" ... done."); /* dump the filenames */ System.out.println("Dumping the filenames ..."); dumpFilenames(); System.out.println(" ... done."); /* read in the transcriptions, * build up dictionary and phone set; * dump the transcriptions */ //dictionary Map dictionary = new HashMap(); //set of phones Set phones = new HashSet(); //fill dictionary and phone set, dump transcriptions System.out.println("Building dictionary, phone set and dumping transcriptions ..."); //buildDictAndDumpTrans(dictionary,phones); System.out.println(" ... done."); /* dump phone file */ System.out.println("Dumping phone set ..."); //dumpPhoneFile(phones); System.out.println(" ... done."); /* dump dictionary file */ System.out.println("Dumping dictionary ..."); //dumpDictFile(dictionary); System.out.println(" ... done."); /* dump filler dictionary file */ System.out.println("Dumping filler dictionary ..."); //dumpFillerDictFile(); System.out.println(" ... done."); /* Convert MFCCs for Sphinxtrain */ System.out.println("Converting MFCCs ..."); convertMFCCs(); System.out.println(" ... done."); /* rewrite the config file */ System.out.println("Rewriting config file ..."); rewriteConfigFile(); System.out.println(" ... done."); //exit System.out.println("All done!"); return true; } | 18648 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/18648/08cf95f8cfb2a58fcbed670081c984325c57d384/SphinxLabelingPreparator.java/buggy/java/de/dfki/lt/mary/unitselection/voiceimport/SphinxLabelingPreparator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4657,
8026,
264,
5014,
812,
5621,
4657,
8026,
264,
5014,
812,
5621,
4657,
8026,
264,
5014,
812,
5621,
4657,
8026,
264,
5014,
812,
5621,
1071,
8481,
8026,
264,
5014,
812,
5621,
800,
790,
464,
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,
4657,
8026,
264,
5014,
812,
5621,
4657,
8026,
264,
5014,
812,
5621,
4657,
8026,
264,
5014,
812,
5621,
4657,
8026,
264,
5014,
812,
5621,
1071,
8481,
8026,
264,
5014,
812,
5621,
800,
790,
464,
2... | |
WorkbenchMessages.getString("CreateLinkedResourceGroup.linkTargetNotFile")); | NewWizardMessages.getString("CreateLinkedResourceGroup.linkTargetNotFile")); | private IStatus validateFileType(File linkTargetFile) { if (type == IResource.FILE && linkTargetFile.isFile() == false) { return createStatus( IStatus.ERROR, WorkbenchMessages.getString("CreateLinkedResourceGroup.linkTargetNotFile")); //$NON-NLS-1$ } else if (type == IResource.FOLDER && linkTargetFile.isDirectory() == false) { return createStatus( IStatus.ERROR, WorkbenchMessages.getString("CreateLinkedResourceGroup.linkTargetNotFolder")); //$NON-NLS-1$ } return createStatus(IStatus.OK, ""); //$NON-NLS-1$ } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/727981016342909a60563ab3a2643b578ab380e3/LinkToFileGroup.java/clean/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/LinkToFileGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
1482,
1954,
28941,
12,
812,
1692,
2326,
812,
13,
288,
202,
202,
430,
261,
723,
422,
467,
1420,
18,
3776,
597,
1692,
2326,
812,
18,
291,
812,
1435,
422,
629,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
1482,
1954,
28941,
12,
812,
1692,
2326,
812,
13,
288,
202,
202,
430,
261,
723,
422,
467,
1420,
18,
3776,
597,
1692,
2326,
812,
18,
291,
812,
1435,
422,
629,
13,
288,
1... |
try { Class testClass = ClassLoader.getSystemClassLoader().loadClass("org.openscience.cdk.test.qsar.model.QSARRModelTests"); suite.addTest(new TestSuite(testClass)); } catch (Exception exception) { System.out.println("Could not load QSAR R based model tests:" + exception.getMessage()); } | suite.addTest(QSARRModelTests.suite()); | public static Test suite( ) { TestSuite suite= new TestSuite("All CDK Tests"); // Package Test Suites suite.addTest(ConfigTests.suite()); suite.addTest(DataClassesTests.suite()); suite.addTest(CoreClassesTests.suite()); suite.addTest(IOTests.suite()); suite.addTest(ToolsTests.suite()); // Individual Tests // from cdk.test.applications suite.addTest(APIVersionTesterTest.suite()); // from cdk.test.aromaticity suite.addTest(HueckelAromaticityDetectorTest.suite()); // from cdk.test.atomtype suite.addTest(HybridizationStateATMatcherTest.suite()); // from cdk.test.charges suite.addTest(GasteigerMarsiliPartialChargesTest.suite()); // from cdk.test.charges suite.addTest(MMFF94PartialChargesTest.suite()); // from cdk.test.charges suite.addTest(InductivePartialChargesTest.suite()); // from cdk.test.modeling suite.addTest(ModelBuilder3dTest.suite()); // from cdk.test.fingerprint suite.addTest(FingerprinterTest.suite()); // from cdk.test.geometry suite.addTest(GeometryToolsTest.suite()); suite.addTest(CrystalGeometryToolsTest.suite()); suite.addTest(RDFCalculatorTest.suite()); // from cdk.test.geometry.align suite.addTest(KabschAlignmentTest.suite()); // from cdk.test.graph suite.addTest(GraphTests.suite()); // from cdk.test.index suite.addTest(CASNumberTest.suite()); // from cdk.test.isomorphism suite.addTest(IsomorphismTests.suite()); // from cdk.test.layout suite.addTest(StructureDiagramGeneratorTest.suite()); suite.addTest(HydrogenPlacerTest.suite()); suite.addTest(OverlapResolverTest.suite()); suite.addTest(TemplateHandlerTest.suite()); // from cdk.test.math suite.addTest(MathToolsTest.suite()); // from cdk.test.qsar suite.addTest(QSARDescriptorTests.suite()); // from cdk.test.reaction suite.addTest(ReactionBalancerTest.suite()); // from cdk.test.ringsearch suite.addTest(AllRingsFinderTest.suite()); suite.addTest(RingSearchTest.suite()); // from cdk.test.smiles suite.addTest(SmilesGeneratorTest.suite()); suite.addTest(SmilesParserTest.suite()); // from cdk.test.structgen suite.addTest(RandomStructureGeneratorTest.suite()); // from cdk.test.modeling.forcefield suite.addTest(ForceFieldTests.suite()); // Below are the tests that are not always possible to execute, because // the class might not be compiled (depeding on Ant and Java VM versions). // from cdk.test.iupac try { Class testClass = ClassLoader.getSystemClassLoader().loadClass("org.openscience.cdk.test.iupac.ParserTest"); suite.addTest(new TestSuite(testClass)); } catch (Exception exception) { // ok, do without. Probably compiled with Ant < 1.6 System.out.println("Could not load the IUPAC Parser test: " + exception.getMessage()); } // from cdk.test.qsar.model try { Class testClass = ClassLoader.getSystemClassLoader().loadClass("org.openscience.cdk.test.qsar.model.QSARRModelTests"); suite.addTest(new TestSuite(testClass)); } catch (Exception exception) { System.out.println("Could not load QSAR R based model tests:" + exception.getMessage()); } return suite; } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/d0898c55e3f751c3edeb7ed1426d69c69a748bdb/CDKTests.java/buggy/src/org/openscience/cdk/test/CDKTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
7766,
11371,
12,
262,
565,
288,
3639,
7766,
13587,
11371,
33,
394,
7766,
13587,
2932,
1595,
15257,
7766,
87,
8863,
7734,
368,
7508,
7766,
348,
89,
2997,
3639,
11371,
18,
1289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7766,
11371,
12,
262,
565,
288,
3639,
7766,
13587,
11371,
33,
394,
7766,
13587,
2932,
1595,
15257,
7766,
87,
8863,
7734,
368,
7508,
7766,
348,
89,
2997,
3639,
11371,
18,
1289,
... |
if (target != null && weaponId != -1) { | if (target != null && weaponId != -1 && ce() != null && !ce().usedTag()) { | protected void updateTarget() { setFireEnabled(false); // make sure we're showing the current entity in the mech display if (ce() != null && !ce().equals(clientgui.mechD.getCurrentEntity())) { clientgui.mechD.displayEntity(ce()); } // update target panel final int weaponId = clientgui.mechD.wPan.getSelectedWeaponNum(); if (target != null && weaponId != -1) { ToHitData toHit; if (ash.inAimingMode()) { Mounted weapon = (Mounted) ce().getEquipment(weaponId); boolean aiming = ash.isAimingAtLocation() && ash.allowAimedShotWith(weapon); ash.setEnableAll(aiming); if (aiming) { toHit = WeaponAttackAction.toHit(client.game, cen, target, weaponId, ash.getAimingAt(), ash.getAimingMode()); clientgui.mechD.wPan.wTargetR.setText(target.getDisplayName() + " (" + ash.getAimingLocation() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ } else { toHit = WeaponAttackAction.toHit(client.game, cen, target, weaponId, Mech.LOC_NONE, IAimingModes.AIM_MODE_NONE); clientgui.mechD.wPan.wTargetR.setText(target.getDisplayName()); } ash.setPartialCover(toHit.getCover()); } else { toHit = WeaponAttackAction.toHit(client.game, cen, target, weaponId, Mech.LOC_NONE, IAimingModes.AIM_MODE_NONE); clientgui.mechD.wPan.wTargetR.setText(target.getDisplayName()); } clientgui.mechD.wPan.wRangeR.setText("" + ce().getPosition().distance(target.getPosition())); //$NON-NLS-1$ Mounted m = ce().getEquipment(weaponId); if (m.isUsedThisRound()) { clientgui.mechD.wPan.wToHitR.setText(Messages.getString("FiringDisplay.alreadyFired")); //$NON-NLS-1$ setFireEnabled(false); } else if (m.getType().hasFlag(WeaponType.F_AUTO_TARGET)) { clientgui.mechD.wPan.wToHitR.setText(Messages.getString("FiringDisplay.autoFiringWeapon")); //$NON-NLS-1$ setFireEnabled(false); } else if (toHit.getValue() == ToHitData.IMPOSSIBLE) { clientgui.mechD.wPan.wToHitR.setText(toHit.getValueAsString()); setFireEnabled(false); } else if (toHit.getValue() == ToHitData.AUTOMATIC_FAIL) { clientgui.mechD.wPan.wToHitR.setText(toHit.getValueAsString()); setFireEnabled(true); } else { clientgui.mechD.wPan.wToHitR.setText(toHit.getValueAsString() + " (" + Compute.oddsAbove(toHit.getValue()) + "%)"); //$NON-NLS-1$ //$NON-NLS-2$ setFireEnabled(true); } clientgui.mechD.wPan.toHitText.setText(toHit.getDesc()); setSkipEnabled(true); } else { clientgui.mechD.wPan.wTargetR.setText("---"); //$NON-NLS-1$ clientgui.mechD.wPan.wRangeR.setText("---"); //$NON-NLS-1$ clientgui.mechD.wPan.wToHitR.setText("---"); //$NON-NLS-1$ clientgui.mechD.wPan.toHitText.setText(""); //$NON-NLS-1$ } } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/12e49099bfb7c3fa59ef4230398e5f125312be47/FiringDisplay.java/buggy/megamek/src/megamek/client/ui/AWT/FiringDisplay.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1089,
2326,
1435,
288,
3639,
444,
9723,
1526,
12,
5743,
1769,
7734,
368,
1221,
3071,
732,
4565,
17253,
326,
783,
1522,
316,
326,
1791,
343,
2562,
3639,
309,
261,
311,
1435,
480... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1089,
2326,
1435,
288,
3639,
444,
9723,
1526,
12,
5743,
1769,
7734,
368,
1221,
3071,
732,
4565,
17253,
326,
783,
1522,
316,
326,
1791,
343,
2562,
3639,
309,
261,
311,
1435,
480... |
RubyTime newTime = new RubyTime(runtime, getMetaClass()); | RubyTime newTime = new RubyTime(getRuntime(), getMetaClass()); | public IRubyObject op_minus(IRubyObject other) { long time = getTimeInMillis(); if (other instanceof RubyTime) { time -= ((RubyTime) other).getTimeInMillis(); return RubyFloat.newFloat(runtime, time * 10e-4); } time -= ((RubyNumeric) other).getDoubleValue() * 1000; RubyTime newTime = new RubyTime(runtime, getMetaClass()); newTime.cal = Calendar.getInstance(); newTime.cal.setTime(new Date(time)); return newTime; } | 49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyTime.java/buggy/src/org/jruby/RubyTime.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
1061,
67,
19601,
12,
7937,
10340,
921,
1308,
13,
288,
3639,
1525,
813,
273,
6135,
16620,
5621,
3639,
309,
261,
3011,
1276,
19817,
950,
13,
288,
5411,
813,
3947,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15908,
10340,
921,
1061,
67,
19601,
12,
7937,
10340,
921,
1308,
13,
288,
3639,
1525,
813,
273,
6135,
16620,
5621,
3639,
309,
261,
3011,
1276,
19817,
950,
13,
288,
5411,
813,
3947,
1... |
ToolConfiguration fromSynTool = fromSite.getToolForCommonId("sakai.synoptic.chat"); Properties fromSynProp = fromSynTool.getPlacementConfig(); ToolConfiguration toSynTool = toSite.getToolForCommonId("sakai.synoptic.chat"); Properties toSynProp = toSynTool.getPlacementConfig(); if (fromSynProp != null && !fromSynProp.isEmpty()) { Set synPropSet = fromSynProp.keySet(); Iterator propIter = synPropSet.iterator(); while (propIter.hasNext()) { String propName = ((String)propIter.next()); String propValue = fromSynProp.getProperty(propName); if (propValue != null && propValue.length() > 0) { if (propName.equals(CHANNEL_PROP)) { int index = propValue.lastIndexOf(Entity.SEPARATOR); propValue = propValue.substring(index + 1); if (propValue != null && propValue.length() > 0) { String channelRef = channelReference(toContext, propValue); toSynProp.setProperty(propName, channelRef.toString()); } } else { toSynProp.setProperty(propName, propValue); } } } SiteService.save(toSite); } | transferSynopticOptions(fromContext, toContext); | public void transferCopyEntities(String fromContext, String toContext, List ids) { try { // get the "from" site's user-set options Site fromSite = SiteService.getSite(fromContext); ToolConfiguration fromTool = fromSite.getToolForCommonId("sakai.chat"); Properties fromProp = fromTool.getPlacementConfig(); Site toSite = SiteService.getSite(toContext); ToolConfiguration tool = toSite.getToolForCommonId("sakai.chat"); if (fromProp != null && !fromProp.isEmpty()) { String preferredChannel = fromProp.getProperty(CHANNEL_PROP); String filterType = fromProp.getProperty(FILTER_TYPE_PROP); String filterParam = fromProp.getProperty(FILTER_PARAM_PROP); //set these properties in the "to" site Properties toProp = tool.getPlacementConfig(); if (preferredChannel != null) { int index = preferredChannel.lastIndexOf(Entity.SEPARATOR) + 1; preferredChannel = preferredChannel.substring(index); if (preferredChannel != null && preferredChannel.length() > 0) { String channelRef = channelReference(toContext, preferredChannel); toProp.setProperty(CHANNEL_PROP, channelRef); } } if (filterType != null && filterType.length() > 0) { toProp.setProperty(FILTER_TYPE_PROP, filterType); } if (filterParam != null) { toProp.setProperty(FILTER_PARAM_PROP, filterParam); } SiteService.save(toSite); } // retrieve all of the chat rooms List oChannelIdList = getChannelIds(fromContext); if (oChannelIdList != null && !oChannelIdList.isEmpty()) { Iterator idIterator = oChannelIdList.iterator(); while (idIterator.hasNext()) { String oChannelId = (String)idIterator.next(); ChatChannel nChannel = null; String nChannelRef = channelReference(toContext, oChannelId); try { nChannel = (ChatChannel) getChannel(nChannelRef); } catch (IdUnusedException e) { try { commitChannel(addChatChannel(nChannelRef)); try { nChannel = (ChatChannel) getChannel(nChannelRef); } catch (IdUnusedException eee) { M_log.warn("IdUnusedException while getting channel with reference " + nChannelRef + ": " + eee); } } catch (Exception ee) { M_log.warn("Exception while committing channel with reference " + nChannelRef + ": " + ee); } } } } // transfer the synoptic tool options ToolConfiguration fromSynTool = fromSite.getToolForCommonId("sakai.synoptic.chat"); Properties fromSynProp = fromSynTool.getPlacementConfig(); ToolConfiguration toSynTool = toSite.getToolForCommonId("sakai.synoptic.chat"); Properties toSynProp = toSynTool.getPlacementConfig(); if (fromSynProp != null && !fromSynProp.isEmpty()) { Set synPropSet = fromSynProp.keySet(); Iterator propIter = synPropSet.iterator(); while (propIter.hasNext()) { String propName = ((String)propIter.next()); String propValue = fromSynProp.getProperty(propName); if (propValue != null && propValue.length() > 0) { if (propName.equals(CHANNEL_PROP)) { int index = propValue.lastIndexOf(Entity.SEPARATOR); propValue = propValue.substring(index + 1); if (propValue != null && propValue.length() > 0) { String channelRef = channelReference(toContext, propValue); toSynProp.setProperty(propName, channelRef.toString()); } } else { toSynProp.setProperty(propName, propValue); } } } SiteService.save(toSite); } scheduleTopRefresh(); } catch (Exception any) { M_log.warn(".transferCopyEntities(): exception in handling " + serviceName() + " : ", any); } } | 2021 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2021/267b16f4aa399b299107fcfdbaecd1441838c22f/BaseChatService.java/clean/chat/chat-impl/impl/src/java/org/sakaiproject/chat/impl/BaseChatService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
7412,
2951,
8108,
12,
780,
628,
1042,
16,
514,
358,
1042,
16,
987,
3258,
13,
225,
202,
95,
202,
202,
698,
202,
202,
95,
6862,
1082,
202,
759,
336,
326,
315,
2080,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
7412,
2951,
8108,
12,
780,
628,
1042,
16,
514,
358,
1042,
16,
987,
3258,
13,
225,
202,
95,
202,
202,
698,
202,
202,
95,
6862,
1082,
202,
759,
336,
326,
315,
2080,
6,
... |
a.drawAxis(g); a.set_drawgrid (false); a.set_drawzero (false); | axis.draw(g); axis.set_drawgrid (false); axis.set_drawzero (false); | protected Rectangle drawAxis(Graphics g, Rectangle r) { Axis a; int waxis; Rectangle dr; int x; int y; int width; int height; if(square) r = ForceSquare(g,r); dr = getDataRectangle(g,r); x = dr.x; y = dr.y; width = dr.width; height = dr.height; if(clearAll ) { Color c = g.getColor(); g.setColor(DataBackground); g.fillRect(x,y,width,height); g.setColor(c); } // Draw a frame around the data area (If requested) if(frame) drawFrame(g,x,y,width,height); // Now draw the axis in the order specified aligning them // with the final data area. for (int i=0; i<axis.size(); i++) { a = ((Axis)axis.get(i)); a.set_data_window(new Dimension(width,height)); switch (a.getAxisPos()) { case Axis.LEFT: r.x += a.width(); r.width -= a.width(); a.positionAxis(r.x,r.x,y,y+height); if(r.x == x ) { a.set_gridcolor(gridcolor); a.set_drawgrid (drawgrid); a.set_zerocolor(zerocolor); a.set_drawzero (drawzero); } a.drawAxis(g); a.set_drawgrid (false); a.set_drawzero (false); break; case Axis.RIGHT: r.width -= a.width(); a.positionAxis(r.x+r.width,r.x+r.width,y,y+height); if(r.x+r.width == x+width ) { a.set_gridcolor(gridcolor); a.set_drawgrid (drawgrid); a.set_zerocolor(zerocolor); a.set_drawzero (drawzero); } a.drawAxis(g); a.set_drawgrid (false); a.set_drawzero (false); break; case Axis.TOP: r.y += a.width(); r.height -= a.width(); a.positionAxis(x,x+width,r.y,r.y); if(r.y == y) { a.set_gridcolor(gridcolor); a.set_drawgrid (drawgrid); a.set_zerocolor(zerocolor); a.set_drawzero (drawzero); } a.drawAxis(g); a.set_drawgrid (false); a.set_drawzero (false); break; case Axis.BOTTOM: r.height -= a.width(); a.positionAxis(x,x+width,r.y+r.height,r.y+r.height); if(r.y +r.height == y+height ) { a.set_gridcolor(gridcolor); a.set_drawgrid (drawgrid); a.set_zerocolor(zerocolor); a.set_drawzero (drawzero); } a.drawAxis(g); a.set_drawgrid (false); a.set_drawzero (false); break; } } return r; } | 13245 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13245/37f8cebca3b3404864c466e7456eb7a6bbd1debe/Graph.java/clean/src/clients/graph/Graph.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
13264,
3724,
6558,
12,
17558,
314,
16,
13264,
436,
13,
288,
202,
202,
6558,
279,
31,
202,
202,
474,
341,
4890,
31,
202,
202,
19463,
5081,
31,
202,
202,
474,
619,
31,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
13264,
3724,
6558,
12,
17558,
314,
16,
13264,
436,
13,
288,
202,
202,
6558,
279,
31,
202,
202,
474,
341,
4890,
31,
202,
202,
19463,
5081,
31,
202,
202,
474,
619,
31,
202,
2... |
while (pat.search(this, start) != -1) { | while (pattern.search(this, start) != -1) { | public IRubyObject scan(IRubyObject arg) { RubyRegexp pat = RubyRegexp.regexpValue(arg); int start = 0; if (!getRuntime().getCurrentContext().isBlockGiven()) { RubyArray ary = getRuntime().newArray(); while (pat.search(this, start) != -1) { RubyMatchData md = (RubyMatchData) getRuntime().getCurrentContext().getBackref(); if (md.getSize() == 1) { ary.append(md.group(0)); } else { ary.append(md.subseq(1, md.getSize())); } if (md.matchEndPosition() == md.matchStartPosition()) { start++; } else { start = md.matchEndPosition(); } } return ary; } while (pat.search(this, start) != -1) { RubyMatchData md = (RubyMatchData) getRuntime().getCurrentContext().getBackref(); if (md.getSize() == 1) { getRuntime().getCurrentContext().yield(md.group(0)); } else { getRuntime().getCurrentContext().yield(md.subseq(1, md.getSize())); } if (md.matchEndPosition() == md.matchStartPosition()) { start++; } else { start = md.matchEndPosition(); } } return this; } | 49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/9f2efc63a858fa0507245b207025eab027840a04/RubyString.java/buggy/src/org/jruby/RubyString.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
15908,
10340,
921,
4135,
12,
7937,
10340,
921,
1501,
13,
288,
202,
202,
54,
10340,
14621,
9670,
273,
19817,
14621,
18,
17745,
620,
12,
3175,
1769,
202,
202,
474,
787,
273,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
15908,
10340,
921,
4135,
12,
7937,
10340,
921,
1501,
13,
288,
202,
202,
54,
10340,
14621,
9670,
273,
19817,
14621,
18,
17745,
620,
12,
3175,
1769,
202,
202,
474,
787,
273,
374,
... |
static void checkDir() { if (speed<MIN_SPEED) { direction = DIR_UNKNOWN; return; } Flash.Point p = Flash.getPoint(Status.melNr); if (p==null) return; int dold = dist(p.lat-old_lat, p.lon-old_lon); int dnew = dist(p.lat-last_lat, p.lon-last_lon); if (dnew > dold + MIN_DIR_DIST) {if (direction==DIR_BACK) { System.out.print("direction change - diff="); System.out.println(dnew-dold);} direction = DIR_FORWARD;// Dbg.wr("forward\n"); } else if (dold > dnew + MIN_DIR_DIST) {if (direction==DIR_FORWARD) { System.out.print("direction change - diff="); System.out.println(dold-dnew);} direction = DIR_BACK;// Dbg.wr("back\n"); } else { direction = DIR_UNKNOWN;// Dbg.wr("undecided\n"); } } | 45850 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45850/260782d756331fe791d094e4ac16600ce81f8492/Gps.java/clean/java/target/src/app/oebb/Gps.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3845,
6459,
1893,
1621,
1435,
95,
9506,
202,
430,
12,
13871,
32,
6236,
67,
23810,
2056,
15329,
1082,
202,
9855,
33,
4537,
67,
14737,
31,
1082,
202,
2463,
31,
202,
202,
97,
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,
3845,
6459,
1893,
1621,
1435,
95,
9506,
202,
430,
12,
13871,
32,
6236,
67,
23810,
2056,
15329,
1082,
202,
9855,
33,
4537,
67,
14737,
31,
1082,
202,
2463,
31,
202,
202,
97,
202,
202... | ||
float maxBid = 0; | float maxBid = 0; | public float getItemMaxBid(Integer itemId) throws RemoteException { Connection conn = null; PreparedStatement stmt = null; float maxBid = 0; try { conn = dataSource.getConnection(); stmt = conn.prepareStatement("SELECT MAX(bid) AS bid FROM bids WHERE item_id=?"); stmt.setInt(1, itemId.intValue()); ResultSet rs = stmt.executeQuery(); // Get the max if (rs.next()) maxBid = rs.getFloat("bid"); } catch (SQLException e) { throw new EJBException("Failed to executeQuery " +e); } finally { try { if (stmt != null) stmt.close(); // close statement if (conn != null) conn.close(); // release connection } catch (Exception ignore) { } } return maxBid; } | 5750 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5750/3d57ae5a342bc10d6c418636c07193a0289ffd6b/QueryBean.java/clean/EJB_EntityBean_id_BMP/edu/rice/rubis/beans/QueryBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1431,
8143,
2747,
17763,
12,
4522,
18424,
13,
1216,
18361,
225,
288,
565,
4050,
3639,
1487,
273,
446,
31,
565,
16913,
3480,
273,
446,
31,
565,
1431,
943,
17763,
273,
374,
31,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1431,
8143,
2747,
17763,
12,
4522,
18424,
13,
1216,
18361,
225,
288,
565,
4050,
3639,
1487,
273,
446,
31,
565,
16913,
3480,
273,
446,
31,
565,
1431,
943,
17763,
273,
374,
31,
565,
... |
super( lhs, rhs ); | super( lhs, rhs ); | public DefaultEqualityExpr(Expr lhs, Expr rhs) { super( lhs, rhs ); } | 47110 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47110/d40b6bd75cb1cad7381ebb031c84b901f9f9e37f/DefaultEqualityExpr.java/clean/jaxen/src/java/main/org/jaxen/expr/DefaultEqualityExpr.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2989,
20273,
4742,
12,
4742,
8499,
16,
1171,
9079,
8074,
7711,
13,
565,
288,
3639,
2240,
12,
8499,
16,
9079,
7711,
11272,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2989,
20273,
4742,
12,
4742,
8499,
16,
1171,
9079,
8074,
7711,
13,
565,
288,
3639,
2240,
12,
8499,
16,
9079,
7711,
11272,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
public ClientPut getParent() { | public ClientPutter getParent() { | public ClientPut getParent() { return parent; } | 45341 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45341/d32229c02576d531c915059f111c468591f30e84/SplitFileInserter.java/clean/src/freenet/client/async/SplitFileInserter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2445,
6426,
5089,
1435,
288,
202,
202,
2463,
982,
31,
202,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2445,
6426,
5089,
1435,
288,
202,
202,
2463,
982,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
_numRuns++; _totalTime += runTime; if ( (_maxTime < 0) || (runTime > _maxTime) ) _maxTime = runTime; if ( (_minTime < 0) || (runTime < _minTime) ) _minTime = runTime; _totalPendingTime += lag; if ( (_maxPendingTime < 0) || (lag > _maxPendingTime) ) _maxPendingTime = lag; if ( (_minPendingTime < 0) || (lag < _minPendingTime) ) _minPendingTime = lag; | _numRuns++; _totalTime += runTime; if ( (_maxTime < 0) || (runTime > _maxTime) ) _maxTime = runTime; if ( (_minTime < 0) || (runTime < _minTime) ) _minTime = runTime; _totalPendingTime += lag; if ( (_maxPendingTime < 0) || (lag > _maxPendingTime) ) _maxPendingTime = lag; if ( (_minPendingTime < 0) || (lag < _minPendingTime) ) _minPendingTime = lag; | public void jobRan(long runTime, long lag) { _numRuns++; _totalTime += runTime; if ( (_maxTime < 0) || (runTime > _maxTime) ) _maxTime = runTime; if ( (_minTime < 0) || (runTime < _minTime) ) _minTime = runTime; _totalPendingTime += lag; if ( (_maxPendingTime < 0) || (lag > _maxPendingTime) ) _maxPendingTime = lag; if ( (_minPendingTime < 0) || (lag < _minPendingTime) ) _minPendingTime = lag; } | 27433 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27433/303e257841e46576c3053d40c6b4c7a07ca8245b/JobStats.java/buggy/router/java/src/net/i2p/router/JobStats.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1719,
54,
304,
12,
5748,
1086,
950,
16,
1525,
17241,
13,
288,
202,
67,
2107,
9361,
9904,
31,
202,
67,
4963,
950,
1011,
1086,
950,
31,
202,
430,
261,
261,
67,
1896,
950,
411... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1719,
54,
304,
12,
5748,
1086,
950,
16,
1525,
17241,
13,
288,
202,
67,
2107,
9361,
9904,
31,
202,
67,
4963,
950,
1011,
1086,
950,
31,
202,
430,
261,
261,
67,
1896,
950,
411... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.