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 |
|---|---|---|---|---|---|---|
ret += "\n" + spellDifference + " spells from lower levels are using slots for this level."; | ret += "\n" + spellDifference + " spells from lower levels are using slots for this level."; | public String addSpell(CharacterSpell acs, final List aFeatList, final String className, final String bookName, final int adjSpellLevel, final int spellLevel) { if (acs == null) { return "Invalid parameter to add spell"; } PCClass aClass = null; final Spell aSpell = acs.getSpell(); if ((bookName == null) || (bookName.length() == 0)) { return "Invalid spell list/book name."; } SpellBook spellBook = getSpellBookByName(bookName); if (spellBook == null) { return "Could not find spell list/book " + bookName; } if (className != null) { aClass = getClassNamed(className); if ((aClass == null) && (className.lastIndexOf('(') >= 0)) { aClass = getClassNamed(className.substring(0, className.lastIndexOf('(')).trim()); } } // If this is a spellbook, the class doesn;t have to be one the PC has already. if (aClass == null && spellBook.getType() == SpellBook.TYPE_SPELL_BOOK) { aClass = Globals.getClassNamed(className); if ((aClass == null) && (className.lastIndexOf('(') >= 0)) { aClass = Globals.getClassNamed(className.substring(0, className.lastIndexOf('(')).trim()); } } if (aClass == null) { return "No class named " + className; } if (!aClass.getMemorizeSpells() && !bookName.equals(Globals.getDefaultSpellBook())) { return aClass.getName() + " can only add to " + Globals.getDefaultSpellBook(); } // Divine spellcasters get no bonus spells at level 0 // TODO: allow classes to define how many bonus spells they get each level! //int numSpellsFromSpecialty = aClass.getNumSpellsFromSpecialty(); //if (spellLevel == 0 && "Divine".equalsIgnoreCase(aClass.getSpellType())) //{ //numSpellsFromSpecialty = 0; //} // all the exists checks are done. // now determine how many specialtySpells // of this level for this class in this book int spellsFromSpecialty = 0; // TODO: value never used // first we check this spell being added if (acs.isSpecialtySpell()) { ++spellsFromSpecialty; } // now all the rest of the already known spells final List sList = aClass.getSpellSupport().getCharacterSpell(null, bookName, adjSpellLevel); if (!sList.isEmpty()) { for (Iterator i = sList.iterator(); i.hasNext();) { final CharacterSpell cs = (CharacterSpell) i.next(); if (!cs.equals(acs) && cs.isSpecialtySpell()) { ++spellsFromSpecialty; } } } // don't allow adding spells which are prohibited to known // or prepared lists // But if a spell is both prohibited and in a specialty // which can be the case for some spells, then allow it. if (spellBook.getType() != SpellBook.TYPE_SPELL_BOOK && !acs.isSpecialtySpell() && aClass.isProhibited(aSpell, this)) { return acs.getSpell().getName() + " is prohibited."; } // Now let's see if they should be able to add this spell // first check for known/cast/threshold final int known = aClass.getKnownForLevel(aClass.getLevel(), spellLevel, this); int specialKnown = 0; final int cast = aClass.getCastForLevel(aClass.getLevel(), adjSpellLevel, bookName, true, true, this); aClass.memorizedSpellForLevelBook(adjSpellLevel, bookName); final boolean isDefault = bookName.equals(Globals.getDefaultSpellBook()); if (isDefault) { specialKnown = aClass.getSpecialtyKnownForLevel(aClass.getLevel(), spellLevel, this); } int numPages = 0; // known is the maximun spells that can be known this level // listNum is the current spells already memorized this level // cast is the number of spells that can be cast at this level // Modified this to use new availableSpells() method so you can "blow" higher-level slots on // lower-level spells // in re BUG [569517] // sk4p 13 Dec 2002 if (spellBook.getType() == SpellBook.TYPE_SPELL_BOOK) { // If this is a spellbook rather than known spells // or prepared spells, then let them add spells up to // the page limit of the book. setSpellLevelTemp(spellLevel); numPages = getVariableValue(acs.getSpell(), spellBook.getPageFormula(), "").intValue(); // Check number of pages remaining in the book if (numPages+spellBook.getNumPagesUsed() > spellBook.getNumPages()) { return "There are not enough pages left to add this spell to the spell book."; } spellBook.setNumPagesUsed(numPages+spellBook.getNumPagesUsed()); spellBook.setNumSpells(spellBook.getNumSpells() + 1); } else if (!aClass.getMemorizeSpells() && !availableSpells(adjSpellLevel, aClass, bookName, true, acs.isSpecialtySpell(), this)) { // If this were a specialty spell, would there be room? // if (!acs.isSpecialtySpell() && availableSpells(adjSpellLevel, aClass, bookName, true, true, this)) { return "Your remaining slot(s) must be filled with your specialty"; } int memTot = aClass.memorizedSpellForLevelBook(adjSpellLevel, bookName); int spellDifference = (known + specialKnown) - memTot; String ret = "You can only learn " + (known + specialKnown) + " spells for level " + adjSpellLevel + "\nand there are no higher-level slots available"; if (spellDifference > 0) { ret += "\n" + spellDifference + " spells from lower levels are using slots for this level."; } return ret; } else if (aClass.getMemorizeSpells() && !isDefault && !availableSpells(adjSpellLevel, aClass, bookName, false, acs.isSpecialtySpell(), this)) { if (!acs.isSpecialtySpell() && availableSpells(adjSpellLevel, aClass, bookName, false, true, this)) { return "Your remaining slot(s) must be filled with your specialty or domain"; } return "You can only prepare " + cast + " spells for level " + adjSpellLevel + "\nand there are no higher-level slots available"; } // determine if this spell already exists // for this character in this book at this level SpellInfo si = null; final List acsList = aClass.getSpellSupport().getCharacterSpell(acs.getSpell(), bookName, adjSpellLevel); if (!acsList.isEmpty()) { for (int x=acsList.size()-1; x>=0; x--) { final CharacterSpell c = (CharacterSpell)acsList.get(x); if (!c.equals(acs)) { acsList.remove(x); } } } final boolean isEmpty = acsList.isEmpty(); if (!isEmpty) { // I am not sure why this code is set up like this but it is // bogus. I am trying to break as little as possible so if // I have one matching spell I will use it otherwise I will // use the passed in spell. if (acsList.size() == 1) { final CharacterSpell tcs = (CharacterSpell)acsList.get(0); si = tcs.getSpellInfoFor(bookName, adjSpellLevel, -1, aFeatList); } else { si = acs.getSpellInfoFor(bookName, adjSpellLevel, -1, aFeatList); } } if (si != null) { // ok, we already known this spell, so if they are // trying to add it to the default spellBook, barf // otherwise increment the number of times memorized if (isDefault) { return "The Known Spells spellbook contains all spells of this level that you know. You cannot place spells in multiple times."; } si.setTimes(si.getTimes() + 1); } else { if (isEmpty) { acs = new CharacterSpell(acs.getOwner(), acs.getSpell()); aClass.getSpellSupport().addCharacterSpell(acs); } si = acs.addInfo(adjSpellLevel, 1, bookName, aFeatList); // // if (Spell.hasPPCost()) { final Spell theSpell = acs.getSpell(); int ppCost = theSpell.getPPCost(); for (Iterator fi = aFeatList.iterator(); fi.hasNext(); ) { final Ability aFeat = (Ability) fi.next(); ppCost += (int)aFeat.bonusTo("PPCOST", theSpell.getName(), this, this); } si.setActualPPCost(ppCost); } } // Set number of pages on the spell si.setNumPages(si.getNumPages()+numPages); setDirty(true); return ""; } | 48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/8ce24dae71e590a1255ba1449adf8b06f5a2b1b9/PlayerCharacter.java/buggy/code/src/java/pcgen/core/PlayerCharacter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
527,
3389,
1165,
12,
7069,
3389,
1165,
1721,
87,
16,
727,
987,
279,
11667,
682,
16,
727,
514,
2658,
16,
727,
514,
6978,
461,
16,
727,
509,
8307,
3389,
1165,
2355,
16,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
527,
3389,
1165,
12,
7069,
3389,
1165,
1721,
87,
16,
727,
987,
279,
11667,
682,
16,
727,
514,
2658,
16,
727,
514,
6978,
461,
16,
727,
509,
8307,
3389,
1165,
2355,
16,
2... |
StringBuilder buf = new StringBuilder(1000); | StringBuffer buf = new StringBuffer(1000); | private void printDSpaceInfoRecords(List bitstreams, OutputStreamWriter osw) throws IOException { Iterator iter = bitstreams.iterator(); while (iter.hasNext()) { DSpaceBitstreamInfo info = (DSpaceBitstreamInfo) iter.next(); StringBuilder buf = new StringBuilder(1000); buf.append("------------------------------------------------ \n"); buf.append(msg("format-id")).append(" = ").append( info.getBitstreamFormatId()).append("\n"); buf.append(msg("deleted")).append(" = ").append(info.getDeleted()) .append("\n"); buf.append(msg("bitstream-id")).append(" = ").append( info.getBitstreamId()).append("\n"); buf.append(msg("checksum-algorithm")).append(" = ").append( info.getChecksumAlgorithm()).append("\n"); buf.append(msg("internal-id")).append(" = ").append( info.getInternalId()).append("\n"); buf.append(msg("name")).append(" = ").append(info.getName()) .append("\n"); buf.append(msg("size")).append(" = ").append(info.getSize()) .append("\n"); buf.append(msg("source")).append(" = ").append(info.getSource()) .append("\n"); buf.append(msg("checksum")).append(" = ").append( info.getStoredChecksum()).append("\n"); buf.append(msg("store-number")).append(" = ").append( info.getStoreNumber()).append("\n"); buf.append(msg("description")).append(" = ").append( info.getUserFormatDescription()).append("\n"); buf.append("----------------------------------------------- \n\n"); osw.write(buf.toString()); } } | 47214 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47214/7b13cb9f8850c8f6be9672186092f81def7e5d61/SimpleReporterImpl.java/buggy/dspace/src/org/dspace/checker/SimpleReporterImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1172,
40,
3819,
966,
6499,
12,
682,
2831,
16320,
16,
24248,
1140,
91,
13,
5411,
1216,
1860,
565,
288,
3639,
4498,
1400,
273,
2831,
16320,
18,
9838,
5621,
3639,
1323,
261,
2165,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1172,
40,
3819,
966,
6499,
12,
682,
2831,
16320,
16,
24248,
1140,
91,
13,
5411,
1216,
1860,
565,
288,
3639,
4498,
1400,
273,
2831,
16320,
18,
9838,
5621,
3639,
1323,
261,
2165,... |
execute(getProgramFromContextMenuActionEvent(evt)); | execute(program); | public void actionPerformed(ActionEvent evt) { execute(getProgramFromContextMenuActionEvent(evt)); } | 9266 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9266/48241b59b1b5bf02af634666e505861e67019783/Plugin.java/buggy/tvbrowser/src/devplugin/Plugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
26100,
12,
1803,
1133,
6324,
13,
288,
1850,
1836,
12,
12890,
1769,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
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,
540,
1071,
918,
26100,
12,
1803,
1133,
6324,
13,
288,
1850,
1836,
12,
12890,
1769,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
} catch (ReturnJump rExcptn) { return rExcptn.getReturnValue(); | } catch (BreakJump rExcptn) { throw new ReturnJump(ruby.getNil()); | public IRubyObject yield(IRubyObject value, IRubyObject self, RubyModule klass, boolean checkArguments) { if (! ruby.isBlockGiven()) { throw new RaiseException(ruby, ruby.getExceptions().getLocalJumpError(), "yield called out of block"); } pushDynamicVars(); Block currentBlock = getBlockStack().getCurrent(); getFrameStack().push(currentBlock.getFrame()); Namespace oldNamespace = ruby.getNamespace(); ruby.setNamespace(getCurrentFrame().getNamespace()); Scope oldScope = (Scope) getScopeStack().getTop(); getScopeStack().setTop(currentBlock.getScope()); getBlockStack().pop(); getDynamicVarsStack().push(currentBlock.getDynamicVariables()); ruby.pushClass((klass != null) ? klass : currentBlock.getKlass()); if (klass == null) { self = currentBlock.getSelf(); } if (value == null) { value = RubyArray.newArray(ruby, 0); } ICallable method = currentBlock.getMethod(); if (method == null) { return ruby.getNil(); } getIterStack().push(currentBlock.getIter()); IRubyObject[] args = prepareArguments(value, self, currentBlock.getVar(), checkArguments); try { while (true) { try { return method.call(ruby, self, null, args, false); } catch (RedoJump rExcptn) { } } } catch (NextJump nExcptn) { return ruby.getNil(); } catch (ReturnJump rExcptn) { return rExcptn.getReturnValue(); } finally { getIterStack().pop(); ruby.popClass(); getDynamicVarsStack().pop(); getBlockStack().setCurrent(currentBlock); getFrameStack().pop(); ruby.setNamespace(oldNamespace); getScopeStack().setTop(oldScope); getDynamicVarsStack().pop(); } } | 48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/7677ca971349ae5011a3a094c25cc087b47cfaa4/ThreadContext.java/clean/org/jruby/runtime/ThreadContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
2824,
12,
7937,
10340,
921,
460,
16,
15908,
10340,
921,
365,
16,
19817,
3120,
7352,
16,
1250,
866,
4628,
13,
288,
3639,
309,
16051,
22155,
18,
291,
1768,
6083,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
2824,
12,
7937,
10340,
921,
460,
16,
15908,
10340,
921,
365,
16,
19817,
3120,
7352,
16,
1250,
866,
4628,
13,
288,
3639,
309,
16051,
22155,
18,
291,
1768,
6083,
10... |
List<Integer> ids; if(this.randomSampleSize >= 0) { ids = db.randomSample(this.randomSampleSize,1); | } } Matrix solution = gaussJordan.gaussJordanElimination(); if (isVerbose()) { System.out.println("Solution:"); System.out.println(solution.toString(NF)); } this.solution = new CorrelationAnalysisSolution(solution, NF); long end = System.currentTimeMillis(); if (isTime()) { long elapsedTime = end - start; System.out.println(this.getClass().getName() + " runtime: " + elapsedTime + " milliseconds."); } } /** * @see Algorithm#getResult() */ public Result getResult() { return solution; } /** * @see de.lmu.ifi.dbs.utilities.optionhandling.Parameterizable#setParameters(String[]) */ public String[] setParameters(String[] args) throws IllegalArgumentException { String[] remainingParameters = super.setParameters(args); try { if (optionHandler.isSet(ALPHA_P)) { alpha = Double.parseDouble(optionHandler.getOptionValue(ALPHA_P)); } else { alpha = ALPHA_DEFAULT; } } catch (NumberFormatException e) { throw new IllegalArgumentException("Parameter " + ALPHA_P + " is of invalid format: " + optionHandler.getOptionValue(ALPHA_P) + ". Must be parseable as double-value."); } try { int accuracy = OUTPUT_ACCURACY_DEFAULT; if (optionHandler.isSet(OUTPUT_ACCURACY_P)) { accuracy = Integer.parseInt(optionHandler.getOptionValue(OUTPUT_ACCURACY_P)); if (accuracy < 0) { throw new NumberFormatException("Accuracy negative: " + optionHandler.getOptionValue(OUTPUT_ACCURACY_P)); | public void run(Database<DoubleVector> db) throws IllegalStateException { long start = System.currentTimeMillis(); if(isVerbose()) { System.out.println("retrieving database objects..."); } List<Integer> ids; if(this.randomSampleSize >= 0) { ids = db.randomSample(this.randomSampleSize,1); } else { ids = new ArrayList<Integer>(); for(Iterator<Integer> idIter = db.iterator(); idIter.hasNext();) { ids.add(idIter.next()); } } if(isVerbose()) { System.out.println("PCA..."); } CorrelationPCA pca = new LinearCorrelationPCA(); pca.run(ids, db, alpha); Matrix weakEigenvectors = pca.getEigenvectors().times(pca.getSelectionMatrixOfWeakEigenvectors()); Matrix transposedWeakEigenvectors = weakEigenvectors.transpose(); if(isVerbose()) { System.out.println("transposed weak Eigenvectors:"); System.out.println(transposedWeakEigenvectors); System.out.println("Eigenvalues:"); System.out.println(Util.format(pca.getEigenvalues(), " , ", 2)); } Matrix centroid = Util.centroid(db, ids).getVector(); Matrix B = transposedWeakEigenvectors.times(centroid); if(isVerbose()) { System.out.println("Centroid:"); System.out.println(centroid); System.out.println("tEV * Centroid"); System.out.println(B); } Matrix gaussJordan = new Matrix(transposedWeakEigenvectors.getRowDimension(), transposedWeakEigenvectors.getColumnDimension() + B.getColumnDimension()); gaussJordan.setMatrix(0, transposedWeakEigenvectors.getRowDimension() - 1, 0, transposedWeakEigenvectors.getColumnDimension() - 1, transposedWeakEigenvectors); gaussJordan.setMatrix(0, gaussJordan.getRowDimension() - 1, transposedWeakEigenvectors.getColumnDimension(), gaussJordan.getColumnDimension() - 1, B); if(isVerbose()) { System.out.println("Gauss-Jordan-Elimination of " + gaussJordan); } Matrix solution = gaussJordan.gaussJordanElimination(); if(isVerbose()) { System.out.println("Solution:"); System.out.println(solution.toString(NF)); } this.solution = new CorrelationAnalysisSolution(solution, NF); long end = System.currentTimeMillis(); if(isTime()) { long elapsedTime = end - start; System.out.println(this.getClass().getName() + " runtime: " + elapsedTime + " milliseconds."); } } | 5508 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5508/58f97a800c5bedc06c5a523ca0bc3f2bbb44e6d8/DependencyDerivator.java/buggy/src/de/lmu/ifi/dbs/algorithm/DependencyDerivator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
12,
4254,
32,
27047,
34,
1319,
13,
1216,
5477,
565,
288,
3639,
1525,
787,
273,
2332,
18,
2972,
28512,
5621,
3639,
309,
12,
291,
14489,
10756,
3639,
288,
5411,
2332,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
12,
4254,
32,
27047,
34,
1319,
13,
1216,
5477,
565,
288,
3639,
1525,
787,
273,
2332,
18,
2972,
28512,
5621,
3639,
309,
12,
291,
14489,
10756,
3639,
288,
5411,
2332,
18,
... |
bound.wait(5000); | if (!proxy.started) bound.wait(5000); | public void testUsingProxySelector() throws Exception { // Regression for HARMONY-570 MockServer server = new MockServer("server"); MockServer proxy = new MockServer("proxy"); URL url = new URL("http://localhost:" + server.port()); // keep default proxy selector ProxySelector defPS = ProxySelector.getDefault(); // replace selector ProxySelector.setDefault( new TestProxySelector(server.port(), proxy.port())); try { HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setConnectTimeout(2000); connection.setReadTimeout(2000); server.start(); synchronized(bound) { bound.wait(5000); } proxy.start(); synchronized(bound) { bound.wait(5000); } connection.connect(); // wait while server and proxy run server.join(); proxy.join(); assertTrue("Connection does not use proxy", connection.usingProxy()); assertTrue("Proxy server was not used", proxy.accepted); } finally { // restore default proxy selector ProxySelector.setDefault(defPS); } } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/3f58dc27a365fd77ec7a16b7f766f3d45872337b/HttpURLConnectionTest.java/buggy/modules/luni/src/test/java/org/apache/harmony/tests/internal/net/www/protocol/http/HttpURLConnectionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
7736,
3886,
4320,
1435,
1216,
1185,
288,
3639,
368,
868,
2329,
285,
364,
670,
985,
17667,
61,
17,
25,
7301,
3639,
7867,
2081,
1438,
273,
394,
7867,
2081,
2932,
3567,
8863... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
7736,
3886,
4320,
1435,
1216,
1185,
288,
3639,
368,
868,
2329,
285,
364,
670,
985,
17667,
61,
17,
25,
7301,
3639,
7867,
2081,
1438,
273,
394,
7867,
2081,
2932,
3567,
8863... |
urlcon.setIfModifiedSince(dateLastModified); | urlcon.setIfModifiedSince(dateLastModified); if (OpenCms.getLog(this).isDebugEnabled()) { OpenCms.getLog(this).debug("req "+exportFile.getName()+" [Timestamp="+(dateLastModified / 1000) *1000+"]"); } | private void exportTemplateResources(CmsObject cms, I_CmsReport report) throws CmsException { String rfsName; String url; // get all template resources which are potential candidates for an static export List publishedTemplateResources = cms.readStaticExportResources(false); int size = publishedTemplateResources.size(); int count = 1; if (OpenCms.getLog(this).isDebugEnabled()) { OpenCms.getLog(this).debug("Starting export of template resources. "+size+" possible canditates in list."); } report.println(report.key("report.staticexport.templateresources_begin"), I_CmsReport.C_FORMAT_HEADLINE); // now loop through all of them and request them from the server Iterator i = publishedTemplateResources.iterator(); try { cms.getRequestContext().saveSiteRoot(); cms.getRequestContext().setSiteRoot("/"); while (i.hasNext()) { rfsName = (String)i.next(); report.print("(" + count++ + " / " + size + ") ", I_CmsReport.C_FORMAT_NOTE); report.print(report.key("report.exporting"), I_CmsReport.C_FORMAT_NOTE); report.print(rfsName); report.print(report.key("report.dots")); url = getExportUrl() + getRfsPrefix() + rfsName; if (OpenCms.getLog(this).isDebugEnabled()) { OpenCms.getLog(this).debug("Sending request for "+rfsName+" with url ("+url+")..."); } // we have created an url, so request the resource if (url != null) { try { // setup connections URL export = new URL(url); HttpURLConnection.setFollowRedirects(false); HttpURLConnection urlcon = (HttpURLConnection)export.openConnection(); // set request type to GET urlcon.setRequestMethod("GET"); // add special export header urlcon.setRequestProperty(I_CmsConstants.C_HEADER_OPENCMS_EXPORT, "true"); // get the last modified date and add it to the request String exportFileName = CmsLinkManager.normalizeRfsPath(getExportPath() + rfsName.substring(1)); File exportFile = new File(exportFileName); if (exportFile != null) { long dateLastModified = exportFile.lastModified(); urlcon.setIfModifiedSince(dateLastModified); } // now perform the request urlcon.connect(); int status = urlcon.getResponseCode(); urlcon.disconnect(); if (OpenCms.getLog(this).isInfoEnabled()) { OpenCms.getLog(this).info("Requested "+rfsName+" with url ("+url+") [STATUS"+status+"]"); } // write the report if (status == HttpServletResponse.SC_OK) { report.println(report.key("report.ok"), I_CmsReport.C_FORMAT_OK); } else if (status == HttpServletResponse.SC_NOT_MODIFIED) { report.println(report.key("report.skipped"), I_CmsReport.C_FORMAT_NOTE); } else if (status == HttpServletResponse.SC_SEE_OTHER) { report.println(report.key("report.ignored"), I_CmsReport.C_FORMAT_NOTE); } else { report.println(String.valueOf(status), I_CmsReport.C_FORMAT_OK); } } catch (IOException e) { report.println(e); } } } } finally { cms.getRequestContext().restoreSiteRoot(); } report.println(report.key("report.staticexport.templateresources_end"), I_CmsReport.C_FORMAT_HEADLINE); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/493446e022a0906ed7ce05a14c6f26a9288df528/CmsStaticExportManager.java/buggy/src/org/opencms/staticexport/CmsStaticExportManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3359,
2283,
3805,
12,
4747,
921,
6166,
16,
467,
67,
25702,
2605,
13,
1216,
11228,
288,
3639,
514,
436,
2556,
461,
31,
3639,
514,
880,
31,
3639,
368,
336,
777,
1542,
2703,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3359,
2283,
3805,
12,
4747,
921,
6166,
16,
467,
67,
25702,
2605,
13,
1216,
11228,
288,
3639,
514,
436,
2556,
461,
31,
3639,
514,
880,
31,
3639,
368,
336,
777,
1542,
2703,
149... |
final ISwingContainerPeer containerPeer = getContainerPeer(component); if (containerPeer != null) { containerPeer.addAWTComponent(component, peer); } } | final ISwingContainerPeer containerPeer = getContainerPeer(component); if (containerPeer != null) { containerPeer.addAWTComponent(component, peer); } } | public static void add(Component component, JComponent peer) { final ISwingContainerPeer containerPeer = getContainerPeer(component); if (containerPeer != null) { containerPeer.addAWTComponent(component, peer); } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/3fecc4797b433a10203c51309b9d8626f7783895/SwingToolkit.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingToolkit.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
527,
12,
1841,
1794,
16,
29058,
4261,
13,
288,
3639,
727,
4437,
91,
310,
2170,
6813,
1478,
6813,
273,
9272,
6813,
12,
4652,
1769,
3639,
309,
261,
3782,
6813,
480,
446,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
527,
12,
1841,
1794,
16,
29058,
4261,
13,
288,
3639,
727,
4437,
91,
310,
2170,
6813,
1478,
6813,
273,
9272,
6813,
12,
4652,
1769,
3639,
309,
261,
3782,
6813,
480,
446,
1... |
try { in = new FileInputStream(infile); load(in); in.close(); } catch (IOException e) { e.printStackTrace(); | if (infile.exists() && infile.canRead() && infile.canWrite()) { try { in = new FileInputStream(infile); load(in); in.close(); } catch (IOException e) { e.printStackTrace(); } } else { try { RandomAccessFile newPrefsFile = new RandomAccessFile(infile, "rw"); newPrefsFile.close(); } catch (IOException e) { e.printStackTrace(); } | PreferencesBase() { super(); // create the dir if it doesn't exist gPrefsPath.mkdirs(); File infile = new File(gPrefsPath, gPrefsFile); InputStream in = null; try { in = new FileInputStream(infile); load(in); in.close(); } catch (IOException e) { e.printStackTrace(); } } | 13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/dcbed3ebf86ee76e937fc8b43e03508e901b2596/PreferencesBase.java/clean/grendel/calypso/util/PreferencesBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
28310,
2171,
1435,
288,
565,
2240,
5621,
565,
368,
752,
326,
1577,
309,
518,
3302,
1404,
1005,
565,
314,
1386,
2556,
743,
18,
24816,
8291,
5621,
565,
1387,
14568,
273,
394,
1387,
12,
75,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28310,
2171,
1435,
288,
565,
2240,
5621,
565,
368,
752,
326,
1577,
309,
518,
3302,
1404,
1005,
565,
314,
1386,
2556,
743,
18,
24816,
8291,
5621,
565,
1387,
14568,
273,
394,
1387,
12,
75,
... |
checkRemote(p.getAddress(), p.getPort()); | public void send(DatagramPacket p) throws IOException { synchronized (p) { if (this.address == null) { // not connected if (p.getAddress() == null || p.getPort() == -1) { throw new IOException("no destination"); } //checkRemote(p.getAddress(), p.getPort()); } else if (p.getAddress() == null) { p.setAddress(this.address); p.setPort(this.port); } else { if (!p.getAddress().equals(this.address) || this.port != p.getPort()) { throw new IllegalArgumentException("address mismatch"); } } impl.send(p); }} | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/c69d482b4d19601999295a7d6c03dd0832689ea8/DatagramSocket.java/buggy/libraries/javalib/java/net/DatagramSocket.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1893,
5169,
12,
84,
18,
588,
1887,
9334,
293,
18,
588,
2617,
10663,
918,
1893,
5169,
12,
84,
18,
588,
1887,
9334,
293,
18,
588,
2617,
10663,
1366,
12,
5139,
17049,
4420,
1593,
762,
516... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1893,
5169,
12,
84,
18,
588,
1887,
9334,
293,
18,
588,
2617,
10663,
918,
1893,
5169,
12,
84,
18,
588,
1887,
9334,
293,
18,
588,
2617,
10663,
1366,
12,
5139,
17049,
4420,
1593,
762,
516... | |
return v.subseq(start, end); | throw new ConditionThrowable(new TypeError(args[0], "positive integer or positive float")); | public LispObject execute(LispObject first, LispObject second, LispObject third) throws ConditionThrowable { AbstractVector v = checkVector(first); int start = Fixnum.getValue(second); int end = third != NIL ? Fixnum.getValue(third) : v.length(); if (start > end) { StringBuffer sb = new StringBuffer("start ("); sb.append(start); sb.append(") is greater than end ("); sb.append(end); sb.append(')'); throw new ConditionThrowable(new TypeError(sb.toString())); } return v.subseq(start, end); } | 8279 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8279/e15bb4df9c5817583e4227bb9a7c8cb68d23e4f3/Primitives.java/clean/j/src/org/armedbear/lisp/Primitives.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
511,
23831,
921,
1836,
12,
48,
23831,
921,
1122,
16,
511,
23831,
921,
2205,
16,
21394,
511,
23831,
921,
12126,
13,
5411,
1216,
7949,
15155,
3639,
288,
5411,
4115,
5018,
331,
273,
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,
540,
1071,
511,
23831,
921,
1836,
12,
48,
23831,
921,
1122,
16,
511,
23831,
921,
2205,
16,
21394,
511,
23831,
921,
12126,
13,
5411,
1216,
7949,
15155,
3639,
288,
5411,
4115,
5018,
331,
273,
86... |
protected Control createContents(Composite parent) { Composite container = new Composite(parent, SWT.NONE); GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); container.setLayoutData(gridData); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 1; gridLayout.horizontalSpacing = 0; gridLayout.marginWidth = 0; gridLayout.marginHeight = 0; gridLayout.verticalSpacing = 0; container.setLayout(gridLayout); Composite progressArea = new Composite(container, SWT.NONE); super.createContents(progressArea); // making the margins the same in each direction gridLayout = (GridLayout) progressArea.getLayout(); gridLayout.marginHeight = gridLayout.marginWidth; return container; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/ec38e8e79bb481591eda5b282cb65b6e12c4ed99/StartupProgressMonitorDialog.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/StartupProgressMonitorDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
3367,
2640,
6323,
12,
799,
1724,
881,
817,
15329,
202,
202,
799,
1724,
31313,
1521,
33,
2704,
9400,
12,
2938,
16,
55,
8588,
18,
9826,
1769,
202,
202,
6313,
5139,
22239,
751,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3367,
2640,
6323,
12,
799,
1724,
881,
817,
15329,
202,
202,
799,
1724,
31313,
1521,
33,
2704,
9400,
12,
2938,
16,
55,
8588,
18,
9826,
1769,
202,
202,
6313,
5139,
22239,
751,
... | ||
Namespace constructNamespace(Context cx) | Namespace constructNamespace(Context cx, Object uriValue) | Namespace constructNamespace(Context cx) { return new Namespace(this, "", ""); } | 12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/45600b4578761ce844b56f522c2da35af3b559c0/XMLLibImpl.java/buggy/js/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
6005,
4872,
3402,
12,
1042,
9494,
16,
1033,
2003,
620,
13,
565,
288,
3639,
327,
394,
6005,
12,
2211,
16,
23453,
1408,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6005,
4872,
3402,
12,
1042,
9494,
16,
1033,
2003,
620,
13,
565,
288,
3639,
327,
394,
6005,
12,
2211,
16,
23453,
1408,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (log.isDebugEnabled()) { log.debug("selectExptFromDB after cmtDialog.processResults with new name/id: " + cmtDialog.getExperimentName() + "/" + cmtDialog.getExperimentId() + " trialID: " + trialId + " and orig name: " + originalExperimentName); } if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperimentId(), trialId); if (experiment != null) addExperimentAndComponentsToWorkspace(experiment, getSelectedNode()); } } GUIUtils.timeConsumingTaskEnd(organizer); } | Experiment experiment = helper.createExperiment(originalExperimentName, expName, expId, trialId); if (experiment != null) addExperimentAndComponentsToWorkspace(experiment, getSelectedNode()); GUIUtils.timeConsumingTaskEnd(organizer); } | public void run() { // a potentially long process if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (log.isDebugEnabled()) { log.debug("selectExptFromDB after cmtDialog.processResults with new name/id: " + cmtDialog.getExperimentName() + "/" + cmtDialog.getExperimentId() + " trialID: " + trialId + " and orig name: " + originalExperimentName); } if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperimentId(), trialId); if (experiment != null) addExperimentAndComponentsToWorkspace(experiment, getSelectedNode()); } } GUIUtils.timeConsumingTaskEnd(organizer); } | 9368 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9368/af184b188ea31a0f0d53806376705e9151cb40f9/Organizer.java/clean/csmart/src/org/cougaar/tools/csmart/ui/viewer/Organizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
6647,
1071,
918,
1086,
1435,
288,
5411,
368,
279,
13935,
1525,
1207,
5411,
309,
261,
71,
1010,
6353,
18,
2567,
3447,
10756,
288,
2868,
727,
514,
12950,
548,
273,
276,
1010,
6353,
18,
588,
6251... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
6647,
1071,
918,
1086,
1435,
288,
5411,
368,
279,
13935,
1525,
1207,
5411,
309,
261,
71,
1010,
6353,
18,
2567,
3447,
10756,
288,
2868,
727,
514,
12950,
548,
273,
276,
1010,
6353,
18,
588,
6251... |
Attribute resolvedAttribute = new Attribute(BugReport.ATTR_STATUS); if (completed) { resolvedAttribute.setValue(BugReport.VAL_STATUS_RESOLVED); | AbstractRepositoryReportAttribute resolvedAttribute = new BugzillaReportAttribute( BugzillaReportElement.BUG_STATUS); if (completed) { resolvedAttribute.setValue(BugzillaReport.VAL_STATUS_RESOLVED); Comment comment = new Comment(report, 1); AbstractRepositoryReportAttribute attribute = new BugzillaReportAttribute(BugzillaReportElement.CREATION_TS); attribute.setValue(Comment.creation_ts_date_format.format(new Date())); comment.addAttribute(BugzillaReportElement.CREATION_TS, attribute); report.addComment(comment); | public static void setBugTaskCompleted(BugzillaTask bugzillaTask, boolean completed) { BugReport report = new BugReport(1, IBugzillaConstants.ECLIPSE_BUGZILLA_URL); bugzillaTask.setBugReport(report); Attribute resolvedAttribute = new Attribute(BugReport.ATTR_STATUS); if (completed) { resolvedAttribute.setValue(BugReport.VAL_STATUS_RESOLVED); } else { resolvedAttribute.setValue(BugReport.VAL_STATUS_NEW); } report.addAttribute(resolvedAttribute); Date now = new Date(); report.addComment(new Comment(report, 1, now, "author", "author-name")); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/83cf0584c09e67ead32e09ae9585eafa8dce592e/TaskTestUtil.java/buggy/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskTestUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
15268,
637,
2174,
9556,
12,
19865,
15990,
2174,
7934,
15990,
2174,
16,
1250,
5951,
13,
288,
202,
202,
19865,
4820,
2605,
273,
394,
16907,
4820,
12,
21,
16,
467,
19865,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
15268,
637,
2174,
9556,
12,
19865,
15990,
2174,
7934,
15990,
2174,
16,
1250,
5951,
13,
288,
202,
202,
19865,
4820,
2605,
273,
394,
16907,
4820,
12,
21,
16,
467,
19865,... |
field.setShort(obj, val); | field.setShort(obj, val); | final void setShortField(Object obj, short val) { try { field.setShort(obj, val); } catch(IllegalAccessException x) { throw new InternalError(x.getMessage()); } } | 13625 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13625/126d7770c7bb5b9c74598afb0864a336d457fd92/ObjectStreamField.java/clean/libjava/java/io/ObjectStreamField.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
918,
444,
4897,
974,
12,
921,
1081,
16,
3025,
1244,
13,
225,
288,
1377,
775,
1377,
288,
202,
225,
652,
18,
542,
4897,
12,
2603,
16,
1244,
1769,
1377,
289,
1377,
1044,
12,
12195,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
918,
444,
4897,
974,
12,
921,
1081,
16,
3025,
1244,
13,
225,
288,
1377,
775,
1377,
288,
202,
225,
652,
18,
542,
4897,
12,
2603,
16,
1244,
1769,
1377,
289,
1377,
1044,
12,
12195,
... |
case XMLStreamConstants.END_ENTITY: | case END_ENTITY: | public static void main(String[] args) throws Exception { boolean xIncludeAware = false; if (args.length > 1 && "-x".equals(args[1])) xIncludeAware = true; XMLParser p = new XMLParser(new java.io.FileInputStream(args[0]), absolutize(null, args[0]), true, // validating true, // namespaceAware true, // coalescing, true, // replaceERefs true, // externalEntities true, // supportDTD true, // baseAware true, // stringInterning null, null); XMLStreamReader reader = p; if (xIncludeAware) reader = new XIncludeFilter(p, args[0], true, true, true); try { int event; //do while (reader.hasNext()) { event = reader.next(); Location loc = reader.getLocation(); System.out.print(loc.getLineNumber()+":"+loc.getColumnNumber()+" "); switch (event) { case XMLStreamConstants.START_DOCUMENT: System.out.println("START_DOCUMENT version="+reader.getVersion()+ " encoding="+reader.getEncoding()); break; case XMLStreamConstants.END_DOCUMENT: System.out.println("END_DOCUMENT"); break; case XMLStreamConstants.START_ELEMENT: System.out.println("START_ELEMENT "+reader.getName()); int l = reader.getNamespaceCount(); for (int i = 0; i < l; i++) System.out.println("\tnamespace "+reader.getNamespacePrefix(i)+ "='"+reader.getNamespaceURI(i)+"'"); l = reader.getAttributeCount(); for (int i = 0; i < l; i++) System.out.println("\tattribute "+reader.getAttributeQName(i)+ "='"+reader.getAttributeValue(i)+"'"); break; case XMLStreamConstants.END_ELEMENT: System.out.println("END_ELEMENT "+reader.getName()); break; case XMLStreamConstants.CHARACTERS: System.out.println("CHARACTERS '"+encodeText(reader.getText())+"'"); break; case XMLStreamConstants.CDATA: System.out.println("CDATA '"+encodeText(reader.getText())+"'"); break; case XMLStreamConstants.SPACE: System.out.println("SPACE '"+encodeText(reader.getText())+"'"); break; case XMLStreamConstants.DTD: System.out.println("DTD "+reader.getText()); break; case XMLStreamConstants.ENTITY_REFERENCE: System.out.println("ENTITY_REFERENCE "+reader.getText()); break; case XMLStreamConstants.COMMENT: System.out.println("COMMENT '"+encodeText(reader.getText())+"'"); break; case XMLStreamConstants.PROCESSING_INSTRUCTION: System.out.println("PROCESSING_INSTRUCTION "+reader.getPITarget()+ " "+reader.getPIData()); break; case XMLStreamConstants.START_ENTITY: System.out.println("START_ENTITY "+reader.getText()); break; case XMLStreamConstants.END_ENTITY: System.out.println("END_ENTITY "+reader.getText()); break; default: System.out.println("Unknown event: "+event); } } } catch (XMLStreamException e) { Location l = reader.getLocation(); System.out.println("At line "+l.getLineNumber()+ ", column "+l.getColumnNumber()+ " of "+l.getLocationURI()); throw e; } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/89208158729137f73c8259a059fc5845c4da3e56/XMLParser.java/clean/core/src/classpath/gnu/gnu/xml/stream/XMLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
565,
1216,
1185,
225,
288,
565,
1250,
619,
8752,
10155,
273,
629,
31,
565,
309,
261,
1968,
18,
2469,
405,
404,
597,
3701,
92,
9654,
14963,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
565,
1216,
1185,
225,
288,
565,
1250,
619,
8752,
10155,
273,
629,
31,
565,
309,
261,
1968,
18,
2469,
405,
404,
597,
3701,
92,
9654,
14963,
... |
public void startElement( String namespaceURI, String localName, String rawName, Attributes attrs ) { int i; boolean preserveSpace; ElementState state; String name; String value; boolean addNSAttr = false; if ( _printer == null ) throw new IllegalStateException( "SER002 No writer supplied for serializer" ); state = getElementState(); if ( isDocumentState() ) { // If this is the root element handle it differently. // If the first root element in the document, serialize // the document's DOCTYPE. Space preserving defaults // to that of the output format. if ( ! _started ) startDocument( localName == null ? rawName : localName ); } else { // For any other element, if first in parent, then // close parent's opening tag and use the parnet's // space preserving. if ( state.empty ) _printer.printText( '>' ); // Indent this element on a new line if the first // content of the parent element or immediately // following an element. if ( _indenting && ! state.preserveSpace && ( state.empty || state.afterElement ) ) _printer.breakLine(); } preserveSpace = state.preserveSpace; // Do not change the current element state yet. // This only happens in endElement(). if ( rawName == null ) { rawName = localName; if ( namespaceURI != null ) { String prefix; prefix = getPrefix( namespaceURI ); if ( prefix.length() > 0 ) rawName = prefix + ":" + localName; } addNSAttr = true; } _printer.printText( '<' ); _printer.printText( rawName ); _printer.indent(); // For each attribute print it's name and value as one part, // separated with a space so the element can be broken on // multiple lines. if ( attrs != null ) { for ( i = 0 ; i < attrs.getLength() ; ++i ) { _printer.printSpace(); name = attrs.getQName( i ); if ( name == null ) { String prefix; String attrURI; name = attrs.getLocalName( i ); attrURI = attrs.getURI( i ); if ( attrURI != null && ( namespaceURI == null || ! attrURI.equals( namespaceURI ) ) ) { prefix = getPrefix( attrURI ); if ( prefix != null && prefix.length() > 0 ) name = prefix + ":" + name; } } value = attrs.getValue( i ); if ( value == null ) value = ""; _printer.printText( name ); _printer.printText( "=\"" ); printEscaped( value ); _printer.printText( '"' ); // If the attribute xml:space exists, determine whether // to preserve spaces in this and child nodes based on // its value. if ( name.equals( "xml:space" ) ) { if ( value.equals( "preserve" ) ) preserveSpace = true; else preserveSpace = _format.getPreserveSpace(); } } } if ( addNSAttr ) { Enumeration enum; enum = _prefixes.keys(); while ( enum.hasMoreElements() ) { _printer.printSpace(); value = (String) enum.nextElement(); name = (String) _prefixes.get( value ); if ( name.length() == 0 ) { _printer.printText( "xmlns=\"" ); printEscaped( value ); _printer.printText( '"' ); } else { _printer.printText( "xmlns:" ); _printer.printText( name ); _printer.printText( "=\"" ); printEscaped( value ); _printer.printText( '"' ); } } } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/dd948484b263b86cdb338f54e5dc5dc2f91af666/XMLSerializer.java/buggy/src/org/apache/xml/serialize/XMLSerializer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
13591,
12,
514,
19421,
16,
514,
11927,
16,
17311,
514,
1831,
461,
16,
9055,
3422,
262,
565,
288,
3639,
509,
1850,
277,
31,
3639,
1250,
1377,
9420,
3819,
31,
3639,
3010,
1119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13591,
12,
514,
19421,
16,
514,
11927,
16,
17311,
514,
1831,
461,
16,
9055,
3422,
262,
565,
288,
3639,
509,
1850,
277,
31,
3639,
1250,
1377,
9420,
3819,
31,
3639,
3010,
1119,
... | ||
public double jsFunction_getUTCFullYear() { | private double jsFunction_getUTCFullYear() { | public double jsFunction_getUTCFullYear() { if (this.date != this.date) return this.date; return YearFromTime(this.date); } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/1f40b84b6c54487dd6f26829d1ebda36a7567a38/NativeDate.java/clean/js/rhino/org/mozilla/javascript/NativeDate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1645,
3828,
2083,
67,
588,
11471,
5080,
5593,
1435,
288,
3639,
309,
261,
2211,
18,
712,
480,
333,
18,
712,
13,
5411,
327,
333,
18,
712,
31,
3639,
327,
16666,
1265,
950,
12,
2211,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1645,
3828,
2083,
67,
588,
11471,
5080,
5593,
1435,
288,
3639,
309,
261,
2211,
18,
712,
480,
333,
18,
712,
13,
5411,
327,
333,
18,
712,
31,
3639,
327,
16666,
1265,
950,
12,
2211,
... |
this.sendErrorPage(ctx, 200, "Failed to remove request", "Failed to remove "+HTMLEncoder.encode(identifier)+" : "+HTMLEncoder.encode(e.getMessage())); | this.sendErrorPage(ctx, 200, "Failed to remove request", "Failed to remove " + identifier + ": " + e.getMessage()); | 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); } | 45341 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45341/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... |
scanlines[j % 3][(width * i) + (j / 3)] = | scanlines[j % 3][(width * i) + (j / 3)] = | public BufferedImage mjpbUncompress(byte[] input) throws FormatException { byte[] raw = null; byte[] raw2 = null; int pt = 16; // pointer into the compressed data // official documentation at // http://developer.apple.com/documentation/QuickTime/QTFF/QTFFChap3/ // chapter_4_section_2.html // information on SOF, SOS, and SOD headers found at // http://www.obrador.com/essentialjpeg/headerinfo.htm // a brief overview for those who would rather not read the specifications: // MJPEG-B (or Motion JPEG) is a variant of the JPEG compression standard, // with one major difference. In JPEG files (technically JFIF), important // blocks are denoted by a 'marker' - the byte '0xff' followed by a byte // identifying the type of data to follow. According to JPEG standards, // all '0xff' bytes in the stream of compressed pixel data are to be // followed by a null byte (0x00), so that the reader knows not to // interpret the '0xff' as the beginning of a marker. MJPEG-B does not // support markers, thus the null byte is not included after '0xff' bytes // in the data stream. Also, an insufficient number of quantization // and Huffman tables are provided, so we must use the defaults obtained // from the JPEG documentation. Finally, MJPEG-B allows for the data to // be spread across multiple fields, effectively forcing the reader to // interlace the scanlines. // // further aside - // http://lists.apple.com/archives/quicktime-talk/2000/Nov/msg00269.html // contains some interesting notes on why Apple chose to define this codec pt += 4; if (pt >= input.length) pt = 0; // most MJPEG-B planes don't have this identifier if (!(input[pt] != 'm' || input[pt+1] != 'j' || input[pt+2] != 'p' || input[pt+3] != 'g')) { pt += 4; // number of compressed bytes (minus padding) int size = DataTools.bytesToInt(input, pt, 4, little); pt += 4; // number of compressed bytes (including padding) int padSize = DataTools.bytesToInt(input, pt, 4, little); pt += 4; // offset to second field int offset = DataTools.bytesToInt(input, pt, 4, little) + 16; pt += 4; // offset to quantization table int quantOffset = DataTools.bytesToInt(input, pt, 4, little) + 16; pt += 4; // offset to Huffman table int huffmanOffset = DataTools.bytesToInt(input, pt, 4, little) + 16; pt += 4; // offset to start of frame int sof = DataTools.bytesToInt(input, pt, 4, little) + 16; pt += 4; // offset to start of scan int sos = DataTools.bytesToInt(input, pt, 4, little) + 16; pt += 4; // offset to start of data int sod = DataTools.bytesToInt(input, pt, 4, little) + 16; pt += 4; // skip over the quantization table, if it exists if (quantOffset != 0) { pt = quantOffset; int length = DataTools.bytesToInt(input, pt, 2, little); pt += length; } // skip over the Huffman table, if it exists if (huffmanOffset != 0) { pt = huffmanOffset; int length = DataTools.bytesToInt(input, pt, 2, little); pt += length; } // skip to the frame header pt = sof; // read sof header // we can skip over the first 7 bytes (length, bps, height, width) pt += 7; // number of channels int channels = DataTools.bytesToInt(input, pt, 1, little); pt++; int[] sampling = new int[channels]; for (int i=0; i<channels; i++) { pt++; sampling[i] = DataTools.bytesToInt(input, pt, 1, little); pt += 2; } // skip to scan header pt = sos; // we can skip over the first 3 bytes (length, number of channels) pt += 3; int[] tables = new int[channels]; for (int i=0; i<channels; i++) { pt++; tables[i] = DataTools.bytesToInt(input, pt, 1, little); pt++; } pt += 3; // now we can finally read this field's data pt = sod; int numBytes = offset - pt; if (offset == 0) numBytes = input.length - pt; raw = new byte[numBytes]; System.arraycopy(input, pt, raw, 0, raw.length); // get the second field // from the specs: // "Each QuickTime sample consists of two distinct compressed images, // each coding one field: the field with the topmost scan-line, T, and // the other field, B. Each field is half the height of the overall // image, as declared in the height field of the sample description. // To be precise, if the height field contains the value H, then the // field T has ((H+1) div 2) lines, and field B has (H div 2) lines." if (offset != 0) { pt = offset; pt += 4; // reserved = 0 pt += 4; // 'mjpg' tag pt += 4; // field size pt += 4; // padded field size pt += 4; // offset to next field = 0 pt += 4; // quantization table offset pt += 4; // Huffman table offset pt += 4; // sof offset pt += 4; // sos offset pt += DataTools.bytesToInt(input, pt, 4, little); pt -= 36; // HACK numBytes = input.length - pt; raw2 = new byte[numBytes]; System.arraycopy(input, pt, raw2, 0, raw2.length); } } if (raw == null) raw = input; // "Because Motion-JPEG format B does not support markers, the JPEG // bitstream does not have null bytes (0x00) inserted after data bytes // that are set to 0xFF." // Thus quoth the specifications. ByteVector b = new ByteVector(); int tempPt = 0; for (int i=0; i<raw.length; i++) { b.add((byte) raw[i]); if (raw[i] == (byte) 0xff) { b.add((byte) 0x00); } } if (raw2 == null) raw2 = new byte[0]; ByteVector b2 = new ByteVector(); tempPt = 0; for (int i=0; i<raw2.length; i++) { b2.add((byte) raw2[i]); if (raw2[i] == (byte) 0xff) { b2.add((byte) 0x00); } } // assemble a fake JFIF plane ByteVector v = new ByteVector(1000); v.add(HEADER); // add quantization tables v.add(new byte[] {(byte) 0xff, (byte) 0xdb}); int length = LUM_QUANT.length + CHROM_QUANT.length + 4; v.add((byte) ((length >>> 8) & 0xff)); v.add((byte) (length & 0xff)); v.add((byte) 0x00); v.add(LUM_QUANT); v.add((byte) 0x01); v.add(CHROM_QUANT); // add Huffman tables v.add(new byte[] {(byte) 0xff, (byte) 0xc4}); length = LUM_DC_BITS.length + LUM_DC.length + CHROM_DC_BITS.length + CHROM_DC.length + LUM_AC_BITS.length + LUM_AC.length + CHROM_AC_BITS.length + CHROM_AC.length + 6; v.add((byte) ((length >>> 8) & 0xff)); v.add((byte) (length & 0xff)); // the ordering of these tables matters v.add((byte) 0x00); v.add(LUM_DC_BITS); v.add(LUM_DC); v.add((byte) 0x01); v.add(CHROM_DC_BITS); v.add(CHROM_DC); v.add((byte) 0x10); v.add(LUM_AC_BITS); v.add(LUM_AC); v.add((byte) 0x11); v.add(CHROM_AC_BITS); v.add(CHROM_AC); // add start-of-frame header v.add((byte) 0xff); v.add((byte) 0xc0); length = (bitsPerPixel >= 40) ? 11 : 17; v.add((byte) ((length >>> 8) & 0xff)); v.add((byte) (length & 0xff)); int fieldHeight = height; if (interlaced) fieldHeight /= 2; int c = bitsPerPixel == 24 ? 3 : (bitsPerPixel == 32 ? 4 : 1); v.add(bitsPerPixel >= 40 ? (byte) (bitsPerPixel - 32) : (byte) (bitsPerPixel / c)); // bits per sample v.add((byte) ((fieldHeight >>> 8) & 0xff)); v.add((byte) (fieldHeight & 0xff)); v.add((byte) ((width >>> 8) & 0xff)); v.add((byte) (width & 0xff)); v.add((bitsPerPixel >= 40) ? (byte) 0x01 : (byte) 0x03); // channel information v.add((byte) 0x01); // channel id v.add((byte) 0x21); // sampling factors v.add((byte) 0x00); // quantization table number if (bitsPerPixel < 40) { v.add((byte) 0x02); v.add((byte) 0x11); v.add((byte) 0x01); v.add((byte) 0x03); v.add((byte) 0x11); v.add((byte) 0x01); } // add start-of-scan header v.add((byte) 0xff); v.add((byte) 0xda); length = (bitsPerPixel >= 40) ? 8 : 12; v.add((byte) ((length >>> 8) & 0xff)); v.add((byte) (length & 0xff)); // number of channels v.add((bitsPerPixel >= 40) ? (byte) 0x01 : (byte) 0x03); v.add((byte) 0x01); // channel id v.add((byte) 0x00); // DC and AC table numbers if (bitsPerPixel < 40) { v.add((byte) 0x02); // channel id v.add((byte) 0x01); // DC and AC table numbers v.add((byte) 0x03); // channel id v.add((byte) 0x01); // DC and AC table numbers } v.add((byte) 0x00); v.add((byte) 0x3f); v.add((byte) 0x00); // as if everything we had to do up to this point wasn't enough of a pain, // the MJPEG-B specifications allow for interlaced frames // so now we have to reorder the scanlines...*stabs self in eye* if (interlaced) { ByteVector v2 = new ByteVector(v.size()); v2.add(v.toByteArray()); v.add(b.toByteArray()); v.add((byte) 0xff); v.add((byte) 0xd9); v2.add(b2.toByteArray()); v2.add((byte) 0xff); v2.add((byte) 0xd9); // this takes less time than it used to, but may not be the // most intelligent way of doing things BufferedImage top = bufferedJPEG(v.toByteArray()); BufferedImage bottom = bufferedJPEG(v2.toByteArray()); byte[][] scanlines = new byte[(bitsPerPixel >= 40) ? 1 : 3][width * height]; WritableRaster topRaster = top.getWritableTile(0, 0); WritableRaster bottomRaster = bottom.getWritableTile(0, 0); byte[] topPixs = (byte[]) topRaster.getDataElements(0, 0, top.getWidth(), top.getHeight(), null); byte[] bottomPixs = (byte[]) bottomRaster.getDataElements(0, 0, bottom.getWidth(), bottom.getHeight(), null); top.releaseWritableTile(0, 0); bottom.releaseWritableTile(0, 0); int topLine = 0; int bottomLine = 0; if (bitsPerPixel >= 40) { for (int i=0; i<height; i++) { if ((i % 2) == 0) { System.arraycopy(topPixs, topLine*width, scanlines[0], width*i, width); topLine++; } else { System.arraycopy(bottomPixs, bottomLine*width, scanlines[0], width*i, width); bottomLine++; } } } else { for (int i=0; i<height; i++) { if ((i % 2) == 0) { for (int j=0; j<3*width; j++) { scanlines[j % 3][(width * i) + (j / 3)] = topPixs[topLine*width*3 + j]; } topLine++; } else { for (int j=0; j<3*width; j++) { scanlines[j % 3][(width * i) + (j / 3)] = topPixs[bottomLine*width*3 + j]; } bottomLine++; } } } RescaleOp darken = new RescaleOp(1.5f, -128f, null); return darken.filter( ImageTools.makeImage(scanlines, width, height), null); } else { v.add(b.toByteArray()); v.add((byte) 0xff); v.add((byte) 0xd9); return bufferedJPEG(v.toByteArray()); } } | 46826 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46826/f8fea5aec2de454fd84e68759019ac47d99be52a/QTReader.java/buggy/loci/formats/QTReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
12362,
312,
78,
5733,
984,
14706,
12,
7229,
8526,
810,
13,
1216,
4077,
503,
288,
565,
1160,
8526,
1831,
273,
446,
31,
565,
1160,
8526,
1831,
22,
273,
446,
31,
565,
509,
5818,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
12362,
312,
78,
5733,
984,
14706,
12,
7229,
8526,
810,
13,
1216,
4077,
503,
288,
565,
1160,
8526,
1831,
273,
446,
31,
565,
1160,
8526,
1831,
22,
273,
446,
31,
565,
509,
5818,
273,... |
return super.transform(tree, enclosing); | return super.transform(tree); | public Node transform(Node tree, Node enclosing) { // Collect all of the contained functions into a hashtable // so that the call optimizer can access the class name & parameter // count for any call it encounters collectContainedFunctions(tree.getFirstChild()); return super.transform(tree, enclosing); } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/3abddeba71ba7a501cb802a83ea2023698be5bfc/OptTransformer.java/buggy/js/rhino/src/org/mozilla/javascript/optimizer/OptTransformer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2029,
2510,
12,
907,
2151,
16,
2029,
16307,
13,
288,
3639,
368,
9302,
777,
434,
326,
7542,
4186,
1368,
279,
711,
14544,
3639,
368,
1427,
716,
326,
745,
13066,
848,
2006,
326,
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,
377,
1071,
2029,
2510,
12,
907,
2151,
16,
2029,
16307,
13,
288,
3639,
368,
9302,
777,
434,
326,
7542,
4186,
1368,
279,
711,
14544,
3639,
368,
1427,
716,
326,
745,
13066,
848,
2006,
326,
667,
... |
protected void executeTask() throws MojoExecutionException { try { getReleaseProgress().checkpoint( basedir, ReleaseProgressTracker.CP_INITIALIZED ); } catch ( IOException e ) { getLog().warn( "Error writing checkpoint.", e ); } if ( !getReleaseProgress().verifyCheckpoint( ReleaseProgressTracker.CP_PREPARED_RELEASE ) ) { checkForLocalModifications(); for ( Iterator it = reactorProjects.iterator(); it.hasNext(); ) { MavenProject project = (MavenProject) it.next(); getVersionResolver().resolveVersion( project ); getScmRewriter().rewriteScmInfo( project, getTagLabel() ); } for ( Iterator it = reactorProjects.iterator(); it.hasNext(); ) { MavenProject project = (MavenProject) it.next(); checkForPresenceOfSnapshots( project ); transformPomToReleaseVersionPom( project ); } generateReleasePoms(); checkInRelease(); tagRelease(); for ( Iterator it = reactorProjects.iterator(); it.hasNext(); ) { MavenProject project = (MavenProject) it.next(); getVersionResolver().incrementVersion( project ); getScmRewriter().restoreScmInfo( project ); } for ( Iterator it = reactorProjects.iterator(); it.hasNext(); ) { MavenProject project = (MavenProject) it.next(); transformPomToSnapshotVersionPom( project ); } removeReleasePoms(); checkInNextSnapshot(); try { getReleaseProgress().checkpoint( basedir, ReleaseProgressTracker.CP_PREPARED_RELEASE ); } catch ( IOException e ) { getLog().warn( "Error writing checkpoint.", e ); } } } | 11530 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11530/8c97337f8b1e7590b5b50936679ff46b9845de63/PrepareReleaseMojo.java/buggy/maven-plugins/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
90,
11359,
561,
557,
624,
2174,
1435,
15069,
49,
10007,
14576,
95,
698,
95,
588,
7391,
5491,
7675,
25414,
12,
31722,
16,
7391,
5491,
8135,
18,
4258,
67,
12919,
25991,
1769,
97,
14683,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
90,
11359,
561,
557,
624,
2174,
1435,
15069,
49,
10007,
14576,
95,
698,
95,
588,
7391,
5491,
7675,
25414,
12,
31722,
16,
7391,
5491,
8135,
18,
4258,
67,
12919,
25991,
1769,
97,
14683,
12... | ||
return ((Short)rs.row[numCol]).shortValue(); | return XSQLVAR.decodeShort(rs.row[numCol]); | short getShort() throws SQLException { if (rs.row[numCol]==null) return SHORT_NULL_VALUE; return ((Short)rs.row[numCol]).shortValue(); } | 6960 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6960/6d280b185bdd30f8356c739f865606941fcf330e/FBShortField.java/buggy/src/main/org/firebirdsql/jdbc/FBShortField.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3025,
13157,
1435,
1216,
6483,
288,
3639,
309,
261,
5453,
18,
492,
63,
2107,
914,
65,
631,
2011,
13,
327,
20079,
67,
8560,
67,
4051,
31,
3639,
327,
1139,
3997,
7716,
18,
3922,
4897,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3025,
13157,
1435,
1216,
6483,
288,
3639,
309,
261,
5453,
18,
492,
63,
2107,
914,
65,
631,
2011,
13,
327,
20079,
67,
8560,
67,
4051,
31,
3639,
327,
1139,
3997,
7716,
18,
3922,
4897,
12,... |
double scale = getRscale(); int rwidth = (int)((getX()+getWidth())*scale)-getRx(); int height = (int)(getY()*scale+Constants.TEMPLATE_INITIAL_HEIGHT)-getRy(); | VDBTemplate tmpl = (VDBTemplate)VDBData.getTemplates().get(getTemplateData().getTemplate().getId()); if (tmpl!=getTemplateData().getTemplate()) { getTemplateData().setTemplate(tmpl); synchronizeLinkFields(); } else { if (getTemplateData().getTemplate().getPortsGeneratedID()!=portsID) synchronizePortLinkFields(); if (getTemplateData().getTemplate().getMacrosGeneratedID()!=macrosID) synchronizeMacroLinkFields(); } revalidatePosition(); | protected void validate() { // template change check VDBTemplate tmpl = (VDBTemplate)VDBData.getTemplates().get(getTemplateData().getTemplate().getId()); if (tmpl!=getTemplateData().getTemplate()) { getTemplateData().setTemplate(tmpl); synchronizeLinkFields(); } else { if (getTemplateData().getTemplate().getPortsGeneratedID()!=portsID) synchronizePortLinkFields(); if (getTemplateData().getTemplate().getMacrosGeneratedID()!=macrosID) synchronizeMacroLinkFields(); } revalidatePosition(); double scale = getRscale(); int rwidth = (int)((getX()+getWidth())*scale)-getRx(); int height = (int)(getY()*scale+Constants.TEMPLATE_INITIAL_HEIGHT)-getRy(); initY = height; int rheight = validateFont(scale, rwidth, height); setHeight((int)(rheight/scale)); setRwidth(rwidth); setRheight(rheight); // sub-components revalidatePosition(); validateFields(); } | 8177 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8177/eaaab1b587521fe886d498a3c021e7b7af480986/Template.java/buggy/src/com/cosylab/vdct/graphics/objects/Template.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1954,
1435,
202,
95,
6862,
225,
368,
1542,
2549,
866,
1082,
225,
776,
2290,
2283,
10720,
273,
261,
58,
2290,
2283,
13,
58,
2290,
751,
18,
588,
8218,
7675,
588,
12,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1954,
1435,
202,
95,
6862,
225,
368,
1542,
2549,
866,
1082,
225,
776,
2290,
2283,
10720,
273,
261,
58,
2290,
2283,
13,
58,
2290,
751,
18,
588,
8218,
7675,
588,
12,
588,
... |
return new OneTouchButton(/* left */ true); | int dir = SwingConstants.WEST; if (orientation == JSplitPane.VERTICAL_SPLIT) dir = SwingConstants.NORTH; JButton button = new BasicArrowButton(dir); button.setBorderPainted(false); return button; | protected JButton createLeftOneTouchButton() { return new OneTouchButton(/* left */ true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/49e488b8530051383b90b1357fa767c87c9ff7f5/BasicSplitPaneDivider.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicSplitPaneDivider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
28804,
752,
3910,
3335,
10491,
3616,
1435,
225,
288,
565,
509,
1577,
273,
26145,
2918,
18,
31285,
31,
309,
261,
19235,
422,
804,
5521,
8485,
18,
21654,
10109,
67,
17482,
13,
1577,
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,
282,
4750,
28804,
752,
3910,
3335,
10491,
3616,
1435,
225,
288,
565,
509,
1577,
273,
26145,
2918,
18,
31285,
31,
309,
261,
19235,
422,
804,
5521,
8485,
18,
21654,
10109,
67,
17482,
13,
1577,
2... |
public void testIndentGrowTabAtStart() throws BadLocationException, OperationCanceledException { | public void testIndentGrowTabAtStart() throws BadLocationException, OperationCanceledException { | public void testIndentGrowTabAtStart() throws BadLocationException, OperationCanceledException { OpenDefinitionsDocument openDoc = _getOpenDoc(); openDoc.insertString(0, FOO_EX_1, null); openDoc.insertString(FOO_EX_1.length(), " " + FOO_EX_2, null); openDoc.setCurrentLocation(FOO_EX_1.length()); int loc = openDoc.getCurrentLocation(); openDoc.indentLines(loc, loc, Indenter.OTHER, null); _assertContents(FOO_EX_1 + " " + FOO_EX_2, openDoc); _assertLocation(FOO_EX_1.length() + 2, openDoc); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/4e9024f79382344df7a15499ea8826062a420a5f/GlobalIndentTest.java/buggy/drjava/src/edu/rice/cs/drjava/model/GlobalIndentTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
7790,
30948,
5661,
861,
1685,
1435,
1377,
1216,
6107,
2735,
503,
16,
4189,
23163,
503,
288,
565,
3502,
7130,
2519,
1696,
1759,
273,
389,
588,
3678,
1759,
5621,
3639,
1696,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
7790,
30948,
5661,
861,
1685,
1435,
1377,
1216,
6107,
2735,
503,
16,
4189,
23163,
503,
288,
565,
3502,
7130,
2519,
1696,
1759,
273,
389,
588,
3678,
1759,
5621,
3639,
1696,
... |
public BigInteger modInverse(BigInteger mod) { BigInteger r = new BigInteger(); r.modinv0(this, mod); return (r); } | public BigInteger modInverse(BigInteger y) { if (y.isNegative() || y.isZero()) throw new ArithmeticException("non-positive modulo"); if (y.isOne()) return ZERO; if (isOne()) return ONE; BigInteger result = new BigInteger(); boolean swapped = false; if (y.words == null) { int xval = (words != null || isNegative()) ? mod(y).ival : ival; int yval = y.ival; if (yval > xval) { int tmp = xval; xval = yval; yval = tmp; swapped = true; } result.ival = euclidInv(yval, xval % yval, xval / yval)[swapped ? 0 : 1]; if (result.ival < 0) result.ival += y.ival; } else { BigInteger x = isNegative() ? this.mod(y) : this; if (x.compareTo(y) < 0) { result = x; x = y; y = result; swapped = true; } BigInteger rem = new BigInteger(); BigInteger quot = new BigInteger(); divide(x, y, quot, rem, FLOOR); rem.canonicalize(); quot.canonicalize(); BigInteger[] xy = new BigInteger[2]; euclidInv(y, rem, quot, xy); result = swapped ? xy[0] : xy[1]; if (result.isNegative()) result = add(result, swapped ? x : y, 1); } return result; } | public BigInteger modInverse(BigInteger mod) { BigInteger r = new BigInteger(); r.modinv0(this, mod); return (r);} | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/68b80747f6ef61fa252b04c040ea0702ced2f387/BigInteger.java/buggy/libraries/javalib/java/math/BigInteger.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
10246,
681,
16376,
12,
24198,
681,
13,
288,
202,
24198,
436,
273,
394,
10246,
5621,
202,
86,
18,
1711,
5768,
20,
12,
2211,
16,
681,
1769,
202,
2463,
261,
86,
1769,
97,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
10246,
681,
16376,
12,
24198,
681,
13,
288,
202,
24198,
436,
273,
394,
10246,
5621,
202,
86,
18,
1711,
5768,
20,
12,
2211,
16,
681,
1769,
202,
2463,
261,
86,
1769,
97,
2,
-100,
-100,
... |
String root = getCommitRoot((String[])paths.toArray(new String[paths.size()])); ISVNEntry rootEntry = locateEntry(root); if (rootEntry == null || rootEntry.getPropertyValue(SVNProperty.URL) == null) { throw new SVNException(root + " does not contain working copy files"); } | String root = getCommitRoot((String[]) paths .toArray(new String[paths.size()])); ISVNEntry rootEntry = locateEntry(root); if (rootEntry == null || rootEntry.getPropertyValue(SVNProperty.URL) == null) { throw new SVNException(root + " does not contain working copy files"); } | public long commitPaths(List paths, String message, boolean keepLocks, ISVNProgressViewer progressViewer) throws SVNException { long start = System.currentTimeMillis(); try { final Set modified = new HashSet(); for (Iterator it = paths.iterator(); it.hasNext();) { final String path = (String)it.next(); ISVNEntry entry = locateEntry(path); modified.add(entry); } if (message == null || modified.isEmpty()) { DebugLog.log("NOTHING TO COMMIT"); return -1; } String root = getCommitRoot((String[])paths.toArray(new String[paths.size()])); ISVNEntry rootEntry = locateEntry(root); if (rootEntry == null || rootEntry.getPropertyValue(SVNProperty.URL) == null) { throw new SVNException(root + " does not contain working copy files"); } DebugLog.log("COMMIT MESSAGE: " + message); Map tree = new HashMap(); Map locks = new HashMap(); String url = SVNCommitUtil.buildCommitTree(modified, tree, locks); for (Iterator treePaths = tree.keySet().iterator(); treePaths.hasNext();) { String treePath = (String)treePaths.next(); if (tree.get(treePath) != null) { DebugLog.log("TREE ENTRY : " + treePath + " : " + ((ISVNEntry)tree.get(treePath)).getPath()); } else { DebugLog.log("TREE ENTRY : " + treePath + " : null"); } } DebugLog.log("COMMIT ROOT RECALCULATED: " + url); DebugLog.log("COMMIT PREPARATIONS TOOK: " + (System.currentTimeMillis() - start) + " ms."); SVNRepositoryLocation location = SVNRepositoryLocation.parseURL(url); SVNRepository repository = SVNRepositoryFactory.create(location); repository.setCredentialsProvider(getCredentialsProvider()); repository.testConnection(); String host = location.getProtocol() + "://" + location.getHost() + ":" + location.getPort(); String rootURL = PathUtil.append(host, repository.getRepositoryRoot()); if (!locks.isEmpty()) { Map transaltedLocks = new HashMap(); for(Iterator lockedPaths = locks.keySet().iterator(); lockedPaths.hasNext();) { String lockedPath = (String) lockedPaths.next(); String relativePath = lockedPath.substring(rootURL.length()); if (!relativePath.startsWith("/")) { relativePath = "/" + relativePath; } transaltedLocks.put(relativePath, locks.get(lockedPath)); } locks = transaltedLocks; } else { locks = null; } DebugLog.log("LOCKS ready for commit: " + locks); ISVNEditor editor = repository.getCommitEditor(message, locks, keepLocks, new SVNWorkspaceMediatorAdapter(getRoot(), tree)); SVNCommitInfo info; try { SVNCommitUtil.doCommit("", rootURL, tree, editor, this, progressViewer); info = editor.closeEdit(); } catch (SVNException e) { DebugLog.error("error: " + e.getMessage()); if (e.getErrors() != null) { for (int i = 0; i < e.getErrors().length; i++) { SVNError error = e.getErrors()[i]; if (error != null) { DebugLog.error(error.toString()); } } } try { editor.abortEdit(); } catch (SVNException inner) { } throw e; } catch (Throwable th) { throw new SVNException(th); } DebugLog.log("COMMIT TOOK: " + (System.currentTimeMillis() - start) + " ms."); if (!myIsCopyCommit) { start = System.currentTimeMillis(); SVNCommitUtil.updateWorkingCopy(info, rootEntry.getPropertyValue(SVNProperty.UUID), tree, this, keepLocks); sleepForTimestamp(); DebugLog.log("POST COMMIT ACTIONS TOOK: " + (System.currentTimeMillis() - start) + " ms."); } return info != null ? info.getNewRevision() : -1; } finally { myIsCopyCommit = false; getRoot().dispose(); } } | 5695 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5695/299b43e154938f7743c4c04297b94660dcac9cf2/SVNWorkspace.java/clean/javasvn/src/org/tmatesoft/svn/core/internal/SVNWorkspace.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1525,
3294,
4466,
12,
682,
2953,
16,
514,
883,
16,
1250,
3455,
19159,
16,
4437,
58,
50,
5491,
18415,
4007,
18415,
13,
1216,
29537,
50,
503,
288,
202,
202,
5748,
787,
273,
2332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1525,
3294,
4466,
12,
682,
2953,
16,
514,
883,
16,
1250,
3455,
19159,
16,
4437,
58,
50,
5491,
18415,
4007,
18415,
13,
1216,
29537,
50,
503,
288,
202,
202,
5748,
787,
273,
2332... |
if (method.getName().startsWith("access$")){ if (!method.isStatic() ) return; | if (method.isStatic() && method.getName().startsWith("access$")){ | public void visitMethod(Method method) { // we search for outer-class-access functions, which // are static, have exactly one argument of this class' type and // return an instance of the outer class' type if (method.getName().startsWith("access$")){ if (!method.isStatic() ) return; String returnType = Type.getReturnType(method.getSignature()).toString(); if (!Tools.sameClass(returnType,oldOuterClassName)) return; Type[] argTypes = Type.getArgumentTypes(method.getSignature()); if (argTypes.length != 1) return; // construct the new signature & use it to overwrite the old one String newSignature = "(L"+newClassName+";)L"+newOuterClassName+";"; int index = method.getSignatureIndex(); method.getConstantPool().setConstant(index, new ConstantUtf8(newSignature)); } // and we check for constructors else if (method.getName().equals("<init>")){ Type[] argTypes = Type.getArgumentTypes(method.getSignature()); if (argTypes.length != 1) return; // modify the signature if neccessary if (Tools.sameClass(argTypes[0].toString(),oldOuterClassName)){ // construct the new signature and use it to overwrite the old one String newSignature = "(L"+newOuterClassName+";)V"; int index = method.getSignatureIndex(); method.getConstantPool().setConstant(index, new ConstantUtf8(newSignature)); } // KK Check code for super-cosntructor call and adjust its signature? } } | 56789 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56789/4ec5ee92e1ae3b87f8c7108d35e46b56ade5b60c/ClassModifyingVisitor.java/buggy/src/org/caesarj/mixer/intern/ClassModifyingVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
25138,
12,
1305,
707,
13,
288,
202,
202,
759,
732,
1623,
364,
6390,
17,
1106,
17,
3860,
4186,
16,
1492,
202,
202,
759,
854,
760,
16,
1240,
8950,
1245,
1237,
434,
333,
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,
25138,
12,
1305,
707,
13,
288,
202,
202,
759,
732,
1623,
364,
6390,
17,
1106,
17,
3860,
4186,
16,
1492,
202,
202,
759,
854,
760,
16,
1240,
8950,
1245,
1237,
434,
333,
6... |
FacesContext context = FacesContext.getCurrentInstance(); Map reqMap = context.getExternalContext().getRequestMap(); Map requestParams = context.getExternalContext().getRequestParameterMap(); AuthorBean author = (AuthorBean) cu.lookupBean( "author"); AssessmentSettingsBean assessmentSettings = (AssessmentSettingsBean) cu. lookupBean( "assessmentSettings"); AssessmentService assessmentService = new AssessmentService(); PublishedAssessmentService publishedAssessmentService = new PublishedAssessmentService(); AssessmentFacade assessment = assessmentService.getAssessment( assessmentSettings.getAssessmentId().toString()); boolean error = checkTitle(assessment); if (error){ return; } publish(assessment, assessmentSettings); GradingService gradingService = new GradingService(); HashMap map = gradingService.getSubmissionSizeOfAllPublishedAssessments(); ArrayList activePublishedList = publishedAssessmentService. getBasicInfoOfAllActivePublishedAssessments( author.getPublishedAssessmentOrderBy(),author.isPublishedAscending()); author.setPublishedAssessments(activePublishedList); setSubmissionSize(activePublishedList, map); ArrayList inactivePublishedList = publishedAssessmentService. getBasicInfoOfAllInActivePublishedAssessments( author.getInactivePublishedAssessmentOrderBy(),author.isInactivePublishedAscending()); author.setInactivePublishedAssessments(inactivePublishedList); setSubmissionSize(inactivePublishedList, map); ArrayList assessmentList = assessmentService. getBasicInfoOfAllActiveAssessments( author.getCoreAssessmentOrderBy(),author.isCoreAscending()); author.setAssessments(assessmentList); | synchronized(repeatedPublish) { FacesContext context = FacesContext.getCurrentInstance(); UIComponent eventSource = (UIComponent) ae.getSource(); ValueBinding vb = eventSource.getValueBinding("value"); String buttonValue = (String) vb.getExpressionString(); if(buttonValue.endsWith("#{msg.button_unique_save_and_publish}")) { repeatedPublish = new Boolean(false); return; } if(!repeatedPublish.booleanValue()) { Map reqMap = context.getExternalContext().getRequestMap(); Map requestParams = context.getExternalContext().getRequestParameterMap(); AuthorBean author = (AuthorBean) cu.lookupBean( "author"); AssessmentSettingsBean assessmentSettings = (AssessmentSettingsBean) cu. lookupBean( "assessmentSettings"); AssessmentService assessmentService = new AssessmentService(); PublishedAssessmentService publishedAssessmentService = new PublishedAssessmentService(); AssessmentFacade assessment = assessmentService.getAssessment( assessmentSettings.getAssessmentId().toString()); boolean error = checkTitle(assessment); if (error){ return; } publish(assessment, assessmentSettings); GradingService gradingService = new GradingService(); HashMap map = gradingService.getSubmissionSizeOfAllPublishedAssessments(); ArrayList activePublishedList = publishedAssessmentService. getBasicInfoOfAllActivePublishedAssessments( author.getPublishedAssessmentOrderBy(),author.isPublishedAscending()); author.setPublishedAssessments(activePublishedList); setSubmissionSize(activePublishedList, map); ArrayList inactivePublishedList = publishedAssessmentService. getBasicInfoOfAllInActivePublishedAssessments( author.getInactivePublishedAssessmentOrderBy(),author.isInactivePublishedAscending()); author.setInactivePublishedAssessments(inactivePublishedList); setSubmissionSize(inactivePublishedList, map); ArrayList assessmentList = assessmentService. getBasicInfoOfAllActiveAssessments( author.getCoreAssessmentOrderBy(),author.isCoreAscending()); author.setAssessments(assessmentList); repeatedPublish = new Boolean(true); } } | public void processAction(ActionEvent ae) throws AbortProcessingException { FacesContext context = FacesContext.getCurrentInstance(); Map reqMap = context.getExternalContext().getRequestMap(); Map requestParams = context.getExternalContext().getRequestParameterMap(); AuthorBean author = (AuthorBean) cu.lookupBean( "author"); AssessmentSettingsBean assessmentSettings = (AssessmentSettingsBean) cu. lookupBean( "assessmentSettings"); AssessmentService assessmentService = new AssessmentService(); PublishedAssessmentService publishedAssessmentService = new PublishedAssessmentService(); AssessmentFacade assessment = assessmentService.getAssessment( assessmentSettings.getAssessmentId().toString()); // 0. sorry need double checking assesmentTitle and everything boolean error = checkTitle(assessment); if (error){ return; } publish(assessment, assessmentSettings); // get the managed bean, author and set all the list GradingService gradingService = new GradingService(); HashMap map = gradingService.getSubmissionSizeOfAllPublishedAssessments(); // 1. need to update active published list in author bean ArrayList activePublishedList = publishedAssessmentService. getBasicInfoOfAllActivePublishedAssessments( author.getPublishedAssessmentOrderBy(),author.isPublishedAscending()); author.setPublishedAssessments(activePublishedList); setSubmissionSize(activePublishedList, map); // 2. need to update active published list in author bean ArrayList inactivePublishedList = publishedAssessmentService. getBasicInfoOfAllInActivePublishedAssessments( author.getInactivePublishedAssessmentOrderBy(),author.isInactivePublishedAscending()); author.setInactivePublishedAssessments(inactivePublishedList); setSubmissionSize(inactivePublishedList, map); // 3. reset the core listing // 'cos user may change core assessment title and publish - sigh ArrayList assessmentList = assessmentService. getBasicInfoOfAllActiveAssessments( author.getCoreAssessmentOrderBy(),author.isCoreAscending()); // get the managed bean, author and set the list author.setAssessments(assessmentList); } | 2021 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2021/f7775698a438e67a678c8b2ef2795f478426c3d4/PublishAssessmentListener.java/clean/samigo/tool/src/java/org/sakaiproject/tool/assessment/ui/listener/author/PublishAssessmentListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1207,
1803,
12,
1803,
1133,
14221,
13,
1216,
14263,
23684,
288,
565,
20306,
819,
273,
20306,
18,
588,
3935,
1442,
5621,
565,
1635,
1111,
863,
273,
819,
18,
588,
6841,
1042,
767... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
1803,
12,
1803,
1133,
14221,
13,
1216,
14263,
23684,
288,
565,
20306,
819,
273,
20306,
18,
588,
3935,
1442,
5621,
565,
1635,
1111,
863,
273,
819,
18,
588,
6841,
1042,
767... |
public Iterator features() { final Iterator wrappedIterator = baseSet.features(); return new Iterator() { public boolean hasNext() { return wrappedIterator.hasNext(); } public Object next() { return projectFeature((Feature) wrappedIterator.next()); } public void remove() { throw new UnsupportedOperationException(); } }; } | 50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/6af69e6d2e15b3553ee1bc70f261ad615ee61682/ReparentContext.java/clean/src/org/biojava/bio/seq/projection/ReparentContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3198,
7139,
1435,
95,
6385,
3198,
18704,
3198,
33,
1969,
694,
18,
7139,
5621,
2463,
2704,
3198,
1435,
95,
482,
6494,
5332,
2134,
1435,
95,
2463,
18704,
3198,
18,
5332,
2134,
5621,
97,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3198,
7139,
1435,
95,
6385,
3198,
18704,
3198,
33,
1969,
694,
18,
7139,
5621,
2463,
2704,
3198,
1435,
95,
482,
6494,
5332,
2134,
1435,
95,
2463,
18704,
3198,
18,
5332,
2134,
5621,
97,
48... | ||
} | public static String getSchemaType(int type) { switch (type) { case Types.ARRAY: return "array"; case Types.BIGINT: return "xsd:long"; case Types.BINARY: return "xsd:hexBinary"; case Types.BIT: return "xsd:boolean"; case Types.BLOB: return "xsd:hexBinary"; case Types.CHAR: return "xsd:string"; case Types.CLOB: return "xsd:string"; case Types.DATE: return "xsd:date"; case Types.DECIMAL: return "xsd:decimal"; case Types.DOUBLE: return "xsd:double"; case Types.FLOAT: return "xsd:decimal"; case Types.INTEGER: return "xsd:int"; case Types.JAVA_OBJECT: return "xsd:string"; case Types.LONGVARBINARY: return "xsd:hexBinary"; case Types.LONGVARCHAR: return "xsd:string"; case Types.NUMERIC: return "xsd:decimal"; case Types.REAL: return "xsd:float"; case Types.REF: return "xsd:IDREF"; case Types.SMALLINT: return "xsd:short"; case Types.STRUCT: return "struct"; case Types.TIME: return "xsd:time"; case Types.TIMESTAMP: return "xsd:dateTime"; case Types.TINYINT: return "xsd:byte"; case Types.VARBINARY: return "xsd:hexBinary"; // most general type default: return "xsd:string"; } } | 626 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/626/b30344a36aa33ce48a8764cba1029698770fe945/DatabaseBuilder.java/buggy/src/nu/xom/samples/DatabaseBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
514,
11088,
559,
12,
474,
618,
13,
288,
4202,
1620,
261,
723,
13,
288,
1377,
648,
7658,
18,
8552,
30,
540,
327,
315,
1126,
14432,
1377,
648,
7658,
18,
19044,
3217,
30,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
514,
11088,
559,
12,
474,
618,
13,
288,
4202,
1620,
261,
723,
13,
288,
1377,
648,
7658,
18,
8552,
30,
540,
327,
315,
1126,
14432,
1377,
648,
7658,
18,
19044,
3217,
30,
3639,
... | |
String s = t.nextToken(); | t.nextToken(); | private static SimpleOnset parseOnset(String rrule, String dtstart) { int week = 0; int dayOfWeek = 0; int month = 0; int dayOfMonth = 0; int hour = 0; int minute = 0; int second = 0; if (rrule != null) { for (StringTokenizer t = new StringTokenizer(rrule.toUpperCase(), ";="); t.hasMoreTokens();) { String token = t.nextToken(); if ("BYMONTH".equals(token)) { month = Integer.parseInt(t.nextToken()); } else if ("BYDAY".equals(token)) { boolean negative = false; int weekNum = 1; String value = t.nextToken(); char sign = value.charAt(0); if (sign == '-') { negative = true; value = value.substring(1); } if (sign == '+') { value = value.substring(1); } char num = value.charAt(0); if (Character.isDigit(num)) { weekNum = num - '0'; value = value.substring(1); } week = negative ? -1 * weekNum : weekNum; Integer day = (Integer) sDayOfWeekMap.get(value); if (day == null) throw new IllegalArgumentException("Invalid day of week value: " + value); dayOfWeek = day.intValue(); } else { String s = t.nextToken(); // skip value of unused param } } } else { // No RRULE provided. Get month and day of month from DTSTART. week = 0; month = dayOfMonth = 1; if (dtstart != null) { try { month = Integer.parseInt(dtstart.substring(4, 6)); dayOfWeek = Integer.parseInt(dtstart.substring(6, 8)); } catch (StringIndexOutOfBoundsException se) {} } } if (dtstart != null) { // Discard date and decompose time fields. try { int indexOfT = dtstart.indexOf('T'); hour = Integer.parseInt(dtstart.substring(indexOfT + 1, indexOfT + 3)); minute = Integer.parseInt(dtstart.substring(indexOfT + 3, indexOfT + 5)); second = Integer.parseInt(dtstart.substring(indexOfT + 5, indexOfT + 7)); } catch (StringIndexOutOfBoundsException se) { hour = minute = second = 0; } catch (NumberFormatException ne) { hour = minute = second = 0; } } return new SimpleOnset(week, dayOfWeek, month, dayOfMonth, hour, minute, second); } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/6b77e1c2e944cf869b178987a88c86b7707494b6/ICalTimeZone.java/buggy/ZimbraServer/src/java/com/zimbra/cs/mailbox/calendar/ICalTimeZone.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
4477,
1398,
542,
1109,
1398,
542,
12,
780,
436,
5345,
16,
514,
3681,
1937,
13,
288,
3639,
509,
4860,
273,
374,
31,
3639,
509,
21990,
273,
374,
31,
3639,
509,
3138,
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,
760,
4477,
1398,
542,
1109,
1398,
542,
12,
780,
436,
5345,
16,
514,
3681,
1937,
13,
288,
3639,
509,
4860,
273,
374,
31,
3639,
509,
21990,
273,
374,
31,
3639,
509,
3138,
273,
374,
... |
return fStore; } | return fStore; } | public Store getStore() { return fStore; } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/b13c667b376deb4a8f2c235ffd847b57616d23c4/ViewedStoreBase.java/buggy/grendel/sources/grendel/view/ViewedStoreBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
4994,
15818,
1435,
288,
565,
327,
284,
2257,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
4994,
15818,
1435,
288,
565,
327,
284,
2257,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public boolean performOk() { IPreferenceStore store = getPreferenceStore(); // inform the workbench of whether it should do autobuilds or not IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); boolean coreAutoBuildSetting = description.isAutoBuilding(); boolean preferenceStoreCurrentSetting = store.getBoolean(IPreferenceConstants.AUTO_BUILD); boolean newAutoBuildSetting = autoBuildButton.getSelection(); //As older versions of Eclipse did not use the preference store for this //setting it is possible that the setting in Core will be false //and the preference store will have the default value of true. //Do a second setValue if required here to synch them up if(preferenceStoreCurrentSetting && !coreAutoBuildSetting) store.setValue(IPreferenceConstants.AUTO_BUILD, coreAutoBuildSetting); // store the auto build in the preference store so that we can enable import and export store.setValue(IPreferenceConstants.AUTO_BUILD, newAutoBuildSetting); // store the save all prior to build setting store.setValue(IPreferenceConstants.SAVE_ALL_BEFORE_BUILD, autoSaveAllButton.getSelection()); // store the link navigator to editor setting store.setValue(IPreferenceConstants.REFRESH_WORKSPACE_ON_STARTUP, refreshButton.getSelection()); //store the preference for bringing task view to front on build store.setValue(IPreferenceConstants.SHOW_TASKS_ON_BUILD, showTasks.getSelection()); long oldSaveInterval = description.getSnapshotInterval() / 60000; long newSaveInterval = new Long(saveInterval.getStringValue()).longValue(); if(oldSaveInterval != newSaveInterval) { try { description.setSnapshotInterval(newSaveInterval * 60000); ResourcesPlugin.getWorkspace().setDescription(description); store.firePropertyChangeEvent(IPreferenceConstants.SAVE_INTERVAL, new Integer((int)oldSaveInterval), new Integer((int)newSaveInterval)); } catch (CoreException e) { WorkbenchPlugin.log("Error changing save interval preference", e.getStatus()); //$NON-NLS-1$ } } store.setValue(IPreferenceConstants.OPEN_ON_SINGLE_CLICK,openOnSingleClick); //$NON-NLS-1$ store.setValue(IPreferenceConstants.SELECT_ON_HOVER,selectOnHover); //$NON-NLS-1$ store.setValue(IPreferenceConstants.OPEN_AFTER_DELAY,openAfterDelay); //$NON-NLS-1$ int singleClickMethod = openOnSingleClick ? OpenStrategy.SINGLE_CLICK : OpenStrategy.DOUBLE_CLICK; if(openOnSingleClick) { if(selectOnHover) singleClickMethod |= OpenStrategy.SELECT_ON_HOVER; if(openAfterDelay) singleClickMethod |= OpenStrategy.ARROW_KEYS_OPEN; } OpenStrategy.setOpenMethod(singleClickMethod); WorkbenchPlugin.getDefault().savePluginPreferences(); return true; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/22bda34e4452682f99383b7352b0fbc66c20e628/WorkbenchPreferencePage.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
8809,
1435,
288,
202,
202,
45,
9624,
2257,
1707,
273,
336,
9624,
2257,
5621,
202,
202,
759,
13235,
326,
1440,
22144,
434,
2856,
518,
1410,
741,
2059,
947,
680,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
8809,
1435,
288,
202,
202,
45,
9624,
2257,
1707,
273,
336,
9624,
2257,
5621,
202,
202,
759,
13235,
326,
1440,
22144,
434,
2856,
518,
1410,
741,
2059,
947,
680,
87,
... | ||
Object obj[] = (Object[])localDestinations.get(name); if (obj == null) obj = new Object[3]; if (obj[2] != null) return false; obj[2] = destination; localDestinations.put(name, obj); localPageDestinations.put(destination, null); return true; | Object obj[] = (Object[])localDestinations.get(name); if (obj == null) obj = new Object[3]; if (obj[2] != null) return false; obj[2] = destination; localDestinations.put(name, obj); localPageDestinations.put(destination, null); return true; | boolean localDestination(String name, PdfDestination destination) { Object obj[] = (Object[])localDestinations.get(name); if (obj == null) obj = new Object[3]; if (obj[2] != null) return false; obj[2] = destination; localDestinations.put(name, obj); localPageDestinations.put(destination, null); return true; } | 3506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3506/6288f051b807f9da0a0f308a00b5851da285b8fb/PdfDocument.java/buggy/itext/src/com/lowagie/text/pdf/PdfDocument.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
1191,
5683,
12,
780,
508,
16,
9989,
5683,
2929,
13,
288,
3639,
1033,
1081,
8526,
273,
261,
921,
63,
5717,
3729,
27992,
18,
588,
12,
529,
1769,
3639,
309,
261,
2603,
422,
446,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
1191,
5683,
12,
780,
508,
16,
9989,
5683,
2929,
13,
288,
3639,
1033,
1081,
8526,
273,
261,
921,
63,
5717,
3729,
27992,
18,
588,
12,
529,
1769,
3639,
309,
261,
2603,
422,
446,
13,
... |
boolean autoActivated = false; | public void handleEvent(Event e) { if (!isEnabled) { return; } switch (e.type) { case SWT.Traverse: case SWT.KeyDown: if (DEBUG) { StringBuffer sb; if (e.type == SWT.Traverse) { sb = new StringBuffer("Traverse"); //$NON-NLS-1$ } else { sb = new StringBuffer("KeyDown"); //$NON-NLS-1$ } sb.append(" received by adapter"); //$NON-NLS-1$ dump(sb.toString(), e); } // If the popup is open, it gets first shot at the // keystroke and should set the doit flags appropriately. if (popup != null) { popup.getTargetControlListener().handleEvent(e); if (DEBUG) { StringBuffer sb; if (e.type == SWT.Traverse) { sb = new StringBuffer("Traverse"); //$NON-NLS-1$ } else { sb = new StringBuffer("KeyDown"); //$NON-NLS-1$ } sb.append(" after being handled by popup"); //$NON-NLS-1$ dump(sb.toString(), e); } return; } // We were only listening to traverse events for the popup if (e.type == SWT.Traverse) { return; } // The popup is not open. We are looking at keydown events // for a trigger to open the popup. if (triggerKeyStroke != null) { // Either there are no modifiers for the trigger and we // check the character field... if ((triggerKeyStroke.getModifierKeys() == KeyStroke.NO_KEY && triggerKeyStroke .getNaturalKey() == e.character) || // ...or there are modifiers, in which case the // keycode and state must match (triggerKeyStroke.getNaturalKey() == e.keyCode && ((triggerKeyStroke .getModifierKeys() & e.stateMask) == triggerKeyStroke .getModifierKeys()))) { // We never propagate the keystroke for an explicit // keystroke invocation of the popup e.doit = false; openProposalPopup(false); return; } } /* * The triggering keystroke was not invoked. Check for * autoactivation characters. */ if (e.character != 0) { boolean autoActivated = false; // Auto-activation characters were specified. Check // them. if (autoActivateString != null) { if (autoActivateString.indexOf(e.character) >= 0) { autoActivated = true; } // Auto-activation characters were not specified. If // there was no key stroke specified, assume // activation for alphanumeric characters. } else if (triggerKeyStroke == null && Character.isLetterOrDigit(e.character)) { autoActivated = true; } /* * When autoactivating, we check the autoactivation * delay. */ if (autoActivated) { e.doit = propagateKeys; if (autoActivationDelay > 0) { Runnable runnable = new Runnable() { public void run() { receivedKeyDown = false; try { Thread.sleep(autoActivationDelay); } catch (InterruptedException e) { } if (!isValid() || receivedKeyDown) { return; } getControl().getDisplay().syncExec( new Runnable() { public void run() { openProposalPopup(true); } }); } }; Thread t = new Thread(runnable); t.start(); } else { // Since we do not sleep, we must open the popup // in an async exec. This is necessary because // the cursor position and other important info // changes as a result of this event occurring. getControl().getDisplay().asyncExec( new Runnable() { public void run() { if (isValid()) { openProposalPopup(true); } } }); } } else { // No autoactivation occurred, so record the key down // as a means to interrupt any autoactivation that is // pending. receivedKeyDown = true; } } break; default: break; } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/af27fa6d683a2ec423870c0c5d8b1631b31fdbbd/ContentProposalAdapter.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1640,
1133,
12,
1133,
425,
13,
288,
9506,
202,
430,
16051,
291,
1526,
13,
288,
6862,
202,
2463,
31,
9506,
202,
97,
9506,
202,
9610,
261,
73,
18,
723,
13,
288,
9506,
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,
1875,
202,
482,
918,
1640,
1133,
12,
1133,
425,
13,
288,
9506,
202,
430,
16051,
291,
1526,
13,
288,
6862,
202,
2463,
31,
9506,
202,
97,
9506,
202,
9610,
261,
73,
18,
723,
13,
288,
9506,
20... | |
/* System.out.println(wget.grep("src=S(.*)E","<img src=SwyonacmsunipublicimagegifE alt=SImageE> <br> <img src=S/wyona-cms/unipublic/another_image.gifE alt=SAnother ImageE>")); if(true){return;} */ | public static void main(String[] args) { if (args.length == 0) { System.out.println("Usage: org.wyona.net.WGet [URL] -P/home/wyona/download"); return; } try { WGet wget = new WGet(); /* //System.out.println(wget.grep("src=\"(.*)\"","<img src=\"wyonacmsunipublicimagegif\" alt=\"Image\"> <br> <img src=\"/wyona-cms/unipublic/another_image.gif\" alt=\"Another Image\">")); System.out.println(wget.grep("src=S(.*)E","<img src=SwyonacmsunipublicimagegifE alt=SImageE> <br> <img src=S/wyona-cms/unipublic/another_image.gifE alt=SAnother ImageE>")); if(true){return;} */ for (int i = 0; i < args.length; i++) { if (args[i].indexOf("-P") == 0) { wget.setDirectoryPrefix(args[i].substring(2)); // -P/home/wyona/download, 2: remove "-P" } } byte[] response = wget.download(new URL(args[0]), "s/\\/wyona-cms\\/oscom//g"); //System.out.println(".main(): Response from remote server:\n\n"+new String(response)); } catch (MalformedURLException e) { System.err.println(e); } catch (Exception e) { System.err.println(e); } } | 45951 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45951/a1078ed762987fa0f30ca0489c45ddf390caf251/WGet.java/buggy/src/java/org/apache/lenya/net/WGet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
422,
374,
13,
288,
5411,
2332,
18,
659,
18,
8222,
2932,
5357,
30,
2358,
18,
91,
93,
265,
69,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
422,
374,
13,
288,
5411,
2332,
18,
659,
18,
8222,
2932,
5357,
30,
2358,
18,
91,
93,
265,
69,
18,
2... | |
"element:equals completion:public boolean equals(Object arg0) relevance:"+(R_DEFAULT + R_INTERESTING + R_CASE), | "element:equals completion:public boolean equals(Object obj) relevance:"+(R_DEFAULT + R_INTERESTING + R_CASE), | public void testCompletionMethodDeclaration3() throws JavaModelException { CompletionTestsRequestor requestor = new CompletionTestsRequestor(); ICompilationUnit cu= getCompilationUnit("Completion", "src", "", "CompletionMethodDeclaration3.java"); String str = cu.getSource(); String completeBehind = "eq"; int cursorLocation = str.indexOf(completeBehind) + completeBehind.length(); cu.codeComplete(cursorLocation, requestor); assertEquals( "should have one completion", "element:equals completion:public boolean equals(Object arg0) relevance:"+(R_DEFAULT + R_INTERESTING + R_CASE), requestor.getResults());} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/aa7a65081771999e54f29a295541444307143029/CompletionTests.java/clean/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1842,
11238,
1305,
6094,
23,
1435,
1216,
5110,
1488,
503,
288,
202,
11238,
4709,
8943,
280,
590,
280,
273,
394,
20735,
4709,
8943,
280,
5621,
202,
45,
19184,
2802,
15985,
33,
336,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1842,
11238,
1305,
6094,
23,
1435,
1216,
5110,
1488,
503,
288,
202,
11238,
4709,
8943,
280,
590,
280,
273,
394,
20735,
4709,
8943,
280,
5621,
202,
45,
19184,
2802,
15985,
33,
336,
1... |
Point2D position = gv.getGlyphPosition(0); | Rectangle2D logicalBounds = gv.getLogicalBounds(); | protected Shape getStrikethroughShape() { double y = metrics.getStrikethroughOffset(); Stroke strikethroughStroke = new BasicStroke(metrics.getStrikethroughThickness()); Point2D position = gv.getGlyphPosition(0); return strikethroughStroke.createStrokedShape( new java.awt.geom.Line2D.Double( position.getX(), position.getY()+y, position.getX()+getAdvance(), position.getY()+y)); } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/4869183dd452b1d4d6d9508ed6ab36070c6f2b0c/GlyphLayout.java/clean/sources/org/apache/batik/gvt/text/GlyphLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
12383,
24017,
1766,
546,
2642,
8500,
1435,
288,
3639,
1645,
677,
273,
4309,
18,
588,
1585,
1766,
546,
2642,
2335,
5621,
3639,
934,
6822,
609,
1766,
546,
2642,
14602,
273,
5411,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
12383,
24017,
1766,
546,
2642,
8500,
1435,
288,
3639,
1645,
677,
273,
4309,
18,
588,
1585,
1766,
546,
2642,
2335,
5621,
3639,
934,
6822,
609,
1766,
546,
2642,
14602,
273,
5411,
394,
... |
(new com.ibm.math.DiagBigDecimal.Test("mcn063")).ok=(mccon3.toString()).equals("digits=5 form=PLAIN lostDigits=1 roundingMode=ROUND_HALF_UP"); | (new Test("mcn063")).ok=(mccon3.toString()).equals("digits=5 form=PLAIN lostDigits=1 roundingMode=ROUND_HALF_UP"); | public void diagmathcontext(){ com.ibm.math.MathContext mccon1; com.ibm.math.MathContext mccon2; com.ibm.math.MathContext mccon3; com.ibm.math.MathContext mccon4; com.ibm.math.MathContext mcrmc; com.ibm.math.MathContext mcrmd; com.ibm.math.MathContext mcrmf; com.ibm.math.MathContext mcrmhd; com.ibm.math.MathContext mcrmhe; com.ibm.math.MathContext mcrmhu; com.ibm.math.MathContext mcrmun; com.ibm.math.MathContext mcrmu; boolean flag=false; java.lang.IllegalArgumentException e=null; // these tests are mostly existence checks (new com.ibm.math.DiagBigDecimal.Test("mcn001")).ok=(com.ibm.math.MathContext.DEFAULT.getDigits())==9; (new com.ibm.math.DiagBigDecimal.Test("mcn002")).ok=(com.ibm.math.MathContext.DEFAULT.getForm())==com.ibm.math.MathContext.SCIENTIFIC; (new com.ibm.math.DiagBigDecimal.Test("mcn003")).ok=(com.ibm.math.MathContext.DEFAULT.getForm())!=com.ibm.math.MathContext.ENGINEERING; (new com.ibm.math.DiagBigDecimal.Test("mcn004")).ok=(com.ibm.math.MathContext.DEFAULT.getForm())!=com.ibm.math.MathContext.PLAIN; (new com.ibm.math.DiagBigDecimal.Test("mcn005")).ok=(com.ibm.math.MathContext.DEFAULT.getLostDigits()?1:0)==0; (new com.ibm.math.DiagBigDecimal.Test("mcn006")).ok=(com.ibm.math.MathContext.DEFAULT.getRoundingMode())==com.ibm.math.MathContext.ROUND_HALF_UP; (new com.ibm.math.DiagBigDecimal.Test("mcn010")).ok=com.ibm.math.MathContext.ROUND_CEILING>=0; (new com.ibm.math.DiagBigDecimal.Test("mcn011")).ok=com.ibm.math.MathContext.ROUND_DOWN>=0; (new com.ibm.math.DiagBigDecimal.Test("mcn012")).ok=com.ibm.math.MathContext.ROUND_FLOOR>=0; (new com.ibm.math.DiagBigDecimal.Test("mcn013")).ok=com.ibm.math.MathContext.ROUND_HALF_DOWN>=0; (new com.ibm.math.DiagBigDecimal.Test("mcn014")).ok=com.ibm.math.MathContext.ROUND_HALF_EVEN>=0; (new com.ibm.math.DiagBigDecimal.Test("mcn015")).ok=com.ibm.math.MathContext.ROUND_HALF_UP>=0; (new com.ibm.math.DiagBigDecimal.Test("mcn016")).ok=com.ibm.math.MathContext.ROUND_UNNECESSARY>=0; (new com.ibm.math.DiagBigDecimal.Test("mcn017")).ok=com.ibm.math.MathContext.ROUND_UP>=0; mccon1=new com.ibm.math.MathContext(111); (new com.ibm.math.DiagBigDecimal.Test("mcn021")).ok=(mccon1.getDigits())==111; (new com.ibm.math.DiagBigDecimal.Test("mcn022")).ok=(mccon1.getForm())==com.ibm.math.MathContext.SCIENTIFIC; (new com.ibm.math.DiagBigDecimal.Test("mcn023")).ok=(mccon1.getLostDigits()?1:0)==0; (new com.ibm.math.DiagBigDecimal.Test("mcn024")).ok=(mccon1.getRoundingMode())==com.ibm.math.MathContext.ROUND_HALF_UP; mccon2=new com.ibm.math.MathContext(78,com.ibm.math.MathContext.ENGINEERING); (new com.ibm.math.DiagBigDecimal.Test("mcn031")).ok=(mccon2.getDigits())==78; (new com.ibm.math.DiagBigDecimal.Test("mcn032")).ok=(mccon2.getForm())==com.ibm.math.MathContext.ENGINEERING; (new com.ibm.math.DiagBigDecimal.Test("mcn033")).ok=(mccon2.getLostDigits()?1:0)==0; (new com.ibm.math.DiagBigDecimal.Test("mcn034")).ok=(mccon2.getRoundingMode())==com.ibm.math.MathContext.ROUND_HALF_UP; mccon3=new com.ibm.math.MathContext(5,com.ibm.math.MathContext.PLAIN,true); (new com.ibm.math.DiagBigDecimal.Test("mcn041")).ok=(mccon3.getDigits())==5; (new com.ibm.math.DiagBigDecimal.Test("mcn042")).ok=(mccon3.getForm())==com.ibm.math.MathContext.PLAIN; (new com.ibm.math.DiagBigDecimal.Test("mcn043")).ok=(mccon3.getLostDigits()?1:0)==1; (new com.ibm.math.DiagBigDecimal.Test("mcn044")).ok=(mccon3.getRoundingMode())==com.ibm.math.MathContext.ROUND_HALF_UP; mccon4=new com.ibm.math.MathContext(0,com.ibm.math.MathContext.SCIENTIFIC,false,com.ibm.math.MathContext.ROUND_FLOOR); (new com.ibm.math.DiagBigDecimal.Test("mcn051")).ok=(mccon4.getDigits())==0; (new com.ibm.math.DiagBigDecimal.Test("mcn052")).ok=(mccon4.getForm())==com.ibm.math.MathContext.SCIENTIFIC; (new com.ibm.math.DiagBigDecimal.Test("mcn053")).ok=(mccon4.getLostDigits()?1:0)==0; (new com.ibm.math.DiagBigDecimal.Test("mcn054")).ok=(mccon4.getRoundingMode())==com.ibm.math.MathContext.ROUND_FLOOR; (new com.ibm.math.DiagBigDecimal.Test("mcn061")).ok=(mccon1.toString()).equals("digits=111 form=SCIENTIFIC lostDigits=0 roundingMode=ROUND_HALF_UP"); (new com.ibm.math.DiagBigDecimal.Test("mcn062")).ok=(mccon2.toString()).equals("digits=78 form=ENGINEERING lostDigits=0 roundingMode=ROUND_HALF_UP"); (new com.ibm.math.DiagBigDecimal.Test("mcn063")).ok=(mccon3.toString()).equals("digits=5 form=PLAIN lostDigits=1 roundingMode=ROUND_HALF_UP"); (new com.ibm.math.DiagBigDecimal.Test("mcn064")).ok=(mccon4.toString()).equals("digits=0 form=SCIENTIFIC lostDigits=0 roundingMode=ROUND_FLOOR"); // complete testing rounding modes round trips mcrmc=new com.ibm.math.MathContext(0,com.ibm.math.MathContext.PLAIN,false,com.ibm.math.MathContext.ROUND_CEILING); mcrmd=new com.ibm.math.MathContext(0,com.ibm.math.MathContext.PLAIN,false,com.ibm.math.MathContext.ROUND_DOWN); mcrmf=new com.ibm.math.MathContext(0,com.ibm.math.MathContext.PLAIN,false,com.ibm.math.MathContext.ROUND_FLOOR); mcrmhd=new com.ibm.math.MathContext(0,com.ibm.math.MathContext.PLAIN,false,com.ibm.math.MathContext.ROUND_HALF_DOWN); mcrmhe=new com.ibm.math.MathContext(0,com.ibm.math.MathContext.PLAIN,false,com.ibm.math.MathContext.ROUND_HALF_EVEN); mcrmhu=new com.ibm.math.MathContext(0,com.ibm.math.MathContext.PLAIN,false,com.ibm.math.MathContext.ROUND_HALF_UP); mcrmun=new com.ibm.math.MathContext(0,com.ibm.math.MathContext.PLAIN,false,com.ibm.math.MathContext.ROUND_UNNECESSARY); mcrmu=new com.ibm.math.MathContext(0,com.ibm.math.MathContext.PLAIN,false,com.ibm.math.MathContext.ROUND_UP); (new com.ibm.math.DiagBigDecimal.Test("mcn071")).ok=(mcrmc.toString()).equals("digits=0 form=PLAIN lostDigits=0 roundingMode=ROUND_CEILING"); (new com.ibm.math.DiagBigDecimal.Test("mcn072")).ok=(mcrmd.toString()).equals("digits=0 form=PLAIN lostDigits=0 roundingMode=ROUND_DOWN"); (new com.ibm.math.DiagBigDecimal.Test("mcn073")).ok=(mcrmf.toString()).equals("digits=0 form=PLAIN lostDigits=0 roundingMode=ROUND_FLOOR"); (new com.ibm.math.DiagBigDecimal.Test("mcn074")).ok=(mcrmhd.toString()).equals("digits=0 form=PLAIN lostDigits=0 roundingMode=ROUND_HALF_DOWN"); (new com.ibm.math.DiagBigDecimal.Test("mcn075")).ok=(mcrmhe.toString()).equals("digits=0 form=PLAIN lostDigits=0 roundingMode=ROUND_HALF_EVEN"); (new com.ibm.math.DiagBigDecimal.Test("mcn076")).ok=(mcrmhu.toString()).equals("digits=0 form=PLAIN lostDigits=0 roundingMode=ROUND_HALF_UP"); (new com.ibm.math.DiagBigDecimal.Test("mcn077")).ok=(mcrmun.toString()).equals("digits=0 form=PLAIN lostDigits=0 roundingMode=ROUND_UNNECESSARY"); (new com.ibm.math.DiagBigDecimal.Test("mcn078")).ok=(mcrmu.toString()).equals("digits=0 form=PLAIN lostDigits=0 roundingMode=ROUND_UP"); // [get methods tested already] // errors... try{checkdig:do{ new com.ibm.math.MathContext(-1); flag=false; }while(false);} catch (java.lang.IllegalArgumentException $131){e=$131; flag=(e.getMessage()).equals("Digits too small: -1"); }/*checkdig*/ (new com.ibm.math.DiagBigDecimal.Test("mcn101")).ok=flag; try{checkdigbig:do{ new com.ibm.math.MathContext(1000000000); flag=false; }while(false);} catch (java.lang.IllegalArgumentException $132){e=$132; flag=(e.getMessage()).equals("Digits too large: 1000000000"); }/*checkdigbig*/ (new com.ibm.math.DiagBigDecimal.Test("mcn102")).ok=flag; try{checkform:do{ new com.ibm.math.MathContext(0,5); flag=false; }while(false);} catch (java.lang.IllegalArgumentException $133){e=$133; flag=(e.getMessage()).equals("Bad form value: 5"); }/*checkform*/ (new com.ibm.math.DiagBigDecimal.Test("mcn111")).ok=flag; try{checkformneg:do{ new com.ibm.math.MathContext(0,-1); flag=false; }while(false);} catch (java.lang.IllegalArgumentException $134){e=$134; flag=(e.getMessage()).equals("Bad form value: -1"); }/*checkformneg*/ (new com.ibm.math.DiagBigDecimal.Test("mcn112")).ok=flag; // [lostDigits cannot be invalid] try{checkround:do{ new com.ibm.math.MathContext(0,com.ibm.math.MathContext.PLAIN,false,12); flag=false; }while(false);} catch (java.lang.IllegalArgumentException $135){e=$135; flag=(e.getMessage()).equals("Bad roundingMode value: 12"); }/*checkround*/ (new com.ibm.math.DiagBigDecimal.Test("mcn121")).ok=flag; try{checkroundneg:do{ new com.ibm.math.MathContext(0,com.ibm.math.MathContext.PLAIN,false,-1); flag=false; }while(false);} catch (java.lang.IllegalArgumentException $136){e=$136; flag=(e.getMessage()).equals("Bad roundingMode value: -1"); }/*checkroundneg*/ (new com.ibm.math.DiagBigDecimal.Test("mcn122")).ok=flag; summary("MathContext"); return;} | 5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/9d7cfece10981dede4d5303274403593abc1a92d/DiagBigDecimal.java/clean/icu4j/src/com/ibm/icu/dev/test/bigdec/DiagBigDecimal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1071,
918,
6643,
15949,
2472,
1435,
95,
225,
532,
18,
10827,
18,
15949,
18,
10477,
1042,
6108,
591,
21,
31,
225,
532,
18,
10827,
18,
15949,
18,
10477,
1042,
6108,
591,
22,
31,
225,
532,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1071,
918,
6643,
15949,
2472,
1435,
95,
225,
532,
18,
10827,
18,
15949,
18,
10477,
1042,
6108,
591,
21,
31,
225,
532,
18,
10827,
18,
15949,
18,
10477,
1042,
6108,
591,
22,
31,
225,
532,... |
if (!fNamespacesEnabled) { attribute.clear(); attribute.localpart = entityReader.scanName('='); attribute.rawname = attribute.localpart; } else { entityReader.scanQName('=', attribute); if (entityReader.lookingAtChar(':', false)) { fErrorReporter.reportError(fErrorReporter.getLocator(), XMLMessages.XML_DOMAIN, XMLMessages.MSG_TWO_COLONS_IN_QNAME, XMLMessages.P5_INVALID_CHARACTER, null, XMLErrorReporter.ERRORTYPE_FATAL_ERROR); entityReader.skipPastNmtoken(' '); } } | if (!fNamespacesEnabled) { attribute.clear(); attribute.localpart = entityReader.scanName('='); attribute.rawname = attribute.localpart; } else { entityReader.scanQName('=', attribute); if (entityReader.lookingAtChar(':', false)) { fErrorReporter.reportError(fErrorReporter.getLocator(), XMLMessages.XML_DOMAIN, XMLMessages.MSG_TWO_COLONS_IN_QNAME, XMLMessages.P5_INVALID_CHARACTER, null, XMLErrorReporter.ERRORTYPE_FATAL_ERROR); entityReader.skipPastNmtoken(' '); } } | public void scanAttributeName(XMLEntityHandler.EntityReader entityReader, QName element, QName attribute) throws Exception { if (!fSeenRootElement) { fSeenRootElement = true; rootElementSpecified(element); fStringPool.resetShuffleCount(); } if (!fNamespacesEnabled) { attribute.clear(); attribute.localpart = entityReader.scanName('='); attribute.rawname = attribute.localpart; } else { entityReader.scanQName('=', attribute); if (entityReader.lookingAtChar(':', false)) { fErrorReporter.reportError(fErrorReporter.getLocator(), XMLMessages.XML_DOMAIN, XMLMessages.MSG_TWO_COLONS_IN_QNAME, XMLMessages.P5_INVALID_CHARACTER, null, XMLErrorReporter.ERRORTYPE_FATAL_ERROR); entityReader.skipPastNmtoken(' '); } } } // scanAttributeName(XMLEntityHandler.EntityReader,QName,QName) | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/f2b9ad84920b2015a53c9a67b4dfb5460fa0465e/XMLValidator.java/clean/src/org/apache/xerces/validators/common/XMLValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4135,
19240,
12,
60,
9687,
1628,
1503,
18,
1943,
2514,
1522,
2514,
16,
4766,
282,
16723,
930,
16,
16723,
1566,
13,
377,
1216,
1185,
288,
3639,
309,
16051,
74,
15160,
2375,
1046... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4135,
19240,
12,
60,
9687,
1628,
1503,
18,
1943,
2514,
1522,
2514,
16,
4766,
282,
16723,
930,
16,
16723,
1566,
13,
377,
1216,
1185,
288,
3639,
309,
16051,
74,
15160,
2375,
1046... |
public long getLength(File f) throws IOException { f = makeAbsolute(f); return f.length(); | public long getLength(Path f) throws IOException { return pathToFile(f).length(); | public long getLength(File f) throws IOException { f = makeAbsolute(f); return f.length(); } | 49248 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49248/ee01fef4b4fb82c7492a4a747793839a4d14cd39/LocalFileSystem.java/clean/src/java/org/apache/hadoop/fs/LocalFileSystem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1525,
9888,
12,
812,
284,
13,
1216,
1860,
288,
3639,
284,
273,
1221,
10368,
12,
74,
1769,
3639,
327,
284,
18,
2469,
5621,
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,
1071,
1525,
9888,
12,
812,
284,
13,
1216,
1860,
288,
3639,
284,
273,
1221,
10368,
12,
74,
1769,
3639,
327,
284,
18,
2469,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
String content = | final String content = | public void testReload() throws Exception { String content = "<html>\n" + " <head><title>test</title></head>\n" + " <body>\n" + " <a href='javascript:window.location.reload();' id='link1'>reload</a>\n" + " </body>\n" + "</html>"; final HtmlPage page1 = loadPage(content); final HtmlAnchor link = (HtmlAnchor) page1.getHtmlElementById("link1"); final HtmlPage page2 = (HtmlPage) link.click(); assertEquals( page1.getTitleText(), page2.getTitleText() ); assertNotSame( page1, page2 ); } | 47843 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47843/5cc5624b4386fdebb2c3ccc18840e11237b4776b/LocationTest.java/buggy/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/LocationTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
13013,
1435,
1216,
1185,
288,
3639,
727,
514,
913,
273,
2868,
3532,
2620,
5333,
82,
6,
5411,
397,
315,
225,
411,
1978,
4438,
2649,
34,
3813,
1757,
2649,
4695,
1978,
5333,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
13013,
1435,
1216,
1185,
288,
3639,
727,
514,
913,
273,
2868,
3532,
2620,
5333,
82,
6,
5411,
397,
315,
225,
411,
1978,
4438,
2649,
34,
3813,
1757,
2649,
4695,
1978,
5333,... |
public void initSize() | public void initSize(int size) | public void initSize() { m_lastMove = null; m_field = new Field[m_board.getSize()][m_board.getSize()]; removeAll(); int size = m_board.getSize(); setLayout(new GridLayout(size + 2, size + 2)); addColumnLabels(); for (int y = size - 1; y >= 0; --y) { String yLabel = Integer.toString(y + 1); add(new JLabel(yLabel, JLabel.CENTER)); for (int x = 0; x < size; ++x) { go.Point p = m_board.getPoint(x, y); Field field = new Field(this, p, m_board.isHandicap(p)); add(field); m_field[x][y] = field; } add(new JLabel(yLabel, JLabel.CENTER)); } addColumnLabels(); newGame(); revalidate(); repaint(); } | 51310 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51310/c65e110a6cb0c977679bc969485468cf4820bbcf/Board.java/clean/src/gui/Board.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
1225,
12,
474,
963,
13,
565,
288,
3639,
312,
67,
2722,
7607,
273,
446,
31,
3639,
312,
67,
1518,
273,
394,
2286,
63,
81,
67,
3752,
18,
588,
1225,
1435,
6362,
81,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
1225,
12,
474,
963,
13,
565,
288,
3639,
312,
67,
2722,
7607,
273,
446,
31,
3639,
312,
67,
1518,
273,
394,
2286,
63,
81,
67,
3752,
18,
588,
1225,
1435,
6362,
81,
67,
... |
assertEquals(1, manager.getTaskList().getArchiveTasks().size()); | assertEquals(1, manager.getTaskList().getArchiveContainer().getChildren().size()); | public void testArchiveRepositoryTaskExternalization() { BugzillaTask repositoryTask = new BugzillaTask("handle", "label", true); repositoryTask.setKind("kind"); manager.getTaskList().addTaskToArchive(repositoryTask); // repositoryTask.setCategory(manager.getTaskList().getArchiveCategory()); assertEquals(1, manager.getTaskList().getArchiveTasks().size()); assertEquals(0, manager.getTaskList().getRootTasks().size()); manager.saveTaskList(); manager.resetTaskList();// manager.getTaskList().clear();// manager.setTaskList(new TaskList()); manager.readExistingOrCreateNewList(); assertEquals(1, manager.getTaskList().getArchiveTasks().size()); assertEquals(0, manager.getTaskList().getRootTasks().size()); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/2c0101d1bc1396f07c34f7b6b9070809f6e236b0/TaskListManagerTest.java/buggy/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskListManagerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
7465,
3305,
2174,
6841,
1588,
1435,
288,
202,
202,
19865,
15990,
2174,
3352,
2174,
273,
394,
16907,
15990,
2174,
2932,
4110,
3113,
315,
1925,
3113,
638,
1769,
202,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
7465,
3305,
2174,
6841,
1588,
1435,
288,
202,
202,
19865,
15990,
2174,
3352,
2174,
273,
394,
16907,
15990,
2174,
2932,
4110,
3113,
315,
1925,
3113,
638,
1769,
202,
202,... |
Statement st = m_installer.m_dbconnection.createStatement(); ResultSet rs = st.executeQuery("SELECT outageId, ifServiceId from outages"); assertTrue("could not advance to read first row in ResultSet", rs.next()); assertEquals("expected outages outageId", 1, rs.getInt(1)); assertEquals("expected outages ifServiceId", 1, rs.getInt(2)); assertFalse("ResultSet contains more than one row", rs.next()); */ | * Statement st = m_installer.m_dbconnection.createStatement(); * ResultSet rs = st.executeQuery("SELECT outageId, ifServiceId from * outages"); assertTrue("could not advance to read first row in * ResultSet", rs.next()); assertEquals("expected outages outageId", * 1, rs.getInt(1)); assertEquals("expected outages ifServiceId", 1, * rs.getInt(2)); assertFalse("ResultSet contains more than one row", * rs.next()); */ | public void testTriggerSetIfServiceIdInOutageNullServiceId() throws Exception { if (!isDBTestEnabled()) { return; } m_installer.createSequences(); m_installer.createTables(); m_installer.updatePlPgsql(); m_installer.addStoredProcedures(); executeSQL("INSERT INTO node (nodeId, nodeCreateTime) VALUES ( 1, now() )"); executeSQL("INSERT INTO ipInterface (nodeId, ipAddr, ifIndex) VALUES ( 1, '1.2.3.4', null )"); executeSQL("INSERT INTO service (serviceID, serviceName) VALUES ( 1, 'COFFEE-READY' )"); executeSQL("INSERT INTO ifServices (nodeID, ipAddr, ifIndex, serviceID) VALUES ( 1, '1.2.3.4', null, 1)"); ThrowableAnticipator ta = new ThrowableAnticipator(); ta.anticipate(new AssertionFailedError("Could not execute statement: 'INSERT INTO outages (outageId, nodeId, ipAddr, ifLostService, serviceID ) VALUES ( nextval('outageNxtId'), 1, '1.2.3.4', now(), null )': ERROR: Outages Trigger Exception: No service found for... nodeid: 1 ipaddr: 1.2.3.4 serviceid: <NULL>")); try { executeSQL("INSERT INTO outages (outageId, nodeId, ipAddr, ifLostService, serviceID ) " + "VALUES ( nextval('outageNxtId'), 1, '1.2.3.4', now(), null )"); } catch (Throwable t) { ta.throwableReceived(t); } ta.verifyAnticipated(); /* Statement st = m_installer.m_dbconnection.createStatement(); ResultSet rs = st.executeQuery("SELECT outageId, ifServiceId from outages"); assertTrue("could not advance to read first row in ResultSet", rs.next()); assertEquals("expected outages outageId", 1, rs.getInt(1)); assertEquals("expected outages ifServiceId", 1, rs.getInt(2)); assertFalse("ResultSet contains more than one row", rs.next()); */ } | 25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/9c0a59382d378a750edf84524762ab71e335b4b3/InstallerDBTest.java/buggy/opennms-install/src/test/java/org/opennms/install/InstallerDBTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
6518,
694,
2047,
29177,
382,
1182,
410,
2041,
29177,
1435,
1216,
1185,
288,
3639,
309,
16051,
291,
2290,
4709,
1526,
10756,
288,
5411,
327,
31,
3639,
289,
3639,
312,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
6518,
694,
2047,
29177,
382,
1182,
410,
2041,
29177,
1435,
1216,
1185,
288,
3639,
309,
16051,
291,
2290,
4709,
1526,
10756,
288,
5411,
327,
31,
3639,
289,
3639,
312,
67,
... |
null, "setCdata"); | null, "setCdataExpr"); | public PropertyDescriptor[] getPropertyDescriptors() { PropertyDescriptor[] result = new PropertyDescriptor[8]; try { result[0] = new PropertyDescriptor("cdata", ELJavascriptValidatorTag.class, null, "setCdata"); result[1] = new PropertyDescriptor("dynamicJavascript", ELJavascriptValidatorTag.class, null, "setDynamicJavascript"); result[2] = new PropertyDescriptor("formName", ELJavascriptValidatorTag.class, null, "setFormName"); result[3] = new PropertyDescriptor("method", ELJavascriptValidatorTag.class, null, "setMethod"); result[4] = new PropertyDescriptor("page", ELJavascriptValidatorTag.class, null, "setPageExpr"); result[5] = new PropertyDescriptor("src", ELJavascriptValidatorTag.class, null, "setSrc"); result[6] = new PropertyDescriptor("staticJavascript", ELJavascriptValidatorTag.class, null, "setStaticJavascript"); result[7] = new PropertyDescriptor("htmlComment", ELJavascriptValidatorTag.class, null, "setHtmlComment"); } catch (IntrospectionException ex) { ex.printStackTrace(); } return (result); } | 2722 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2722/db064e19656421b94aaf753550935d95f44bd5f9/ELJavascriptValidatorTagBeanInfo.java/clean/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELJavascriptValidatorTagBeanInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
225,
26761,
8526,
3911,
12705,
1435,
565,
288,
3639,
26761,
8526,
225,
563,
282,
273,
394,
26761,
63,
28,
15533,
3639,
775,
288,
5411,
563,
63,
20,
65,
273,
394,
26761,
2932,
71,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
26761,
8526,
3911,
12705,
1435,
565,
288,
3639,
26761,
8526,
225,
563,
282,
273,
394,
26761,
63,
28,
15533,
3639,
775,
288,
5411,
563,
63,
20,
65,
273,
394,
26761,
2932,
71,
... |
pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); | pushOnIntStack(this.scanner.currentPosition - 1); pushOnIntStack(this.scanner.startPosition); | protected void consumeToken(int type) { /* remember the last consumed value */ /* try to minimize the number of build values */ checkNonExternalizedStringLiteral();// // clear the commentPtr of the scanner in case we read something different from a modifier// switch(type) {// case TokenNameabstract :// case TokenNamestrictfp :// case TokenNamefinal :// case TokenNamenative :// case TokenNameprivate :// case TokenNameprotected :// case TokenNamepublic :// case TokenNametransient :// case TokenNamevolatile :// case TokenNamestatic :// case TokenNamesynchronized :// break;// default:// scanner.commentPtr = -1;// } //System.out.println(scanner.toStringAction(type)); switch (type) { case TokenNameIdentifier : pushIdentifier(); if (scanner.useAssertAsAnIndentifier) { long positions = identifierPositionStack[identifierPtr]; problemReporter().useAssertAsAnIdentifier((int) (positions >>> 32), (int) positions); }// scanner.commentPtr = -1; break; case TokenNameinterface : adjustInterfaceModifiers(); //'class' is pushing two int (positions) on the stack ==> 'interface' needs to do it too.... pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition);// scanner.commentPtr = -1; break; case TokenNameabstract : checkAndSetModifiers(AccAbstract); break; case TokenNamestrictfp : checkAndSetModifiers(AccStrictfp); break; case TokenNamefinal : checkAndSetModifiers(AccFinal); break; case TokenNamenative : checkAndSetModifiers(AccNative); break; case TokenNameprivate : checkAndSetModifiers(AccPrivate); break; case TokenNameprotected : checkAndSetModifiers(AccProtected); break; case TokenNamepublic : checkAndSetModifiers(AccPublic); break; case TokenNametransient : checkAndSetModifiers(AccTransient); break; case TokenNamevolatile : checkAndSetModifiers(AccVolatile); break; case TokenNamestatic : checkAndSetModifiers(AccStatic); break; case TokenNamesynchronized : this.synchronizedBlockSourceStart = scanner.startPosition; checkAndSetModifiers(AccSynchronized); break; //============================== case TokenNamevoid : pushIdentifier(-T_void); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition);// scanner.commentPtr = -1; break; //push a default dimension while void is not part of the primitive //declaration baseType and so takes the place of a type without getting into //regular type parsing that generates a dimension on intStack case TokenNameboolean : pushIdentifier(-T_boolean); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); // scanner.commentPtr = -1; break; case TokenNamebyte : pushIdentifier(-T_byte); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); // scanner.commentPtr = -1; break; case TokenNamechar : pushIdentifier(-T_char); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); // scanner.commentPtr = -1; break; case TokenNamedouble : pushIdentifier(-T_double); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); // scanner.commentPtr = -1; break; case TokenNamefloat : pushIdentifier(-T_float); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); // scanner.commentPtr = -1; break; case TokenNameint : pushIdentifier(-T_int); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); // scanner.commentPtr = -1; break; case TokenNamelong : pushIdentifier(-T_long); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); // scanner.commentPtr = -1; break; case TokenNameshort : pushIdentifier(-T_short); pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); // scanner.commentPtr = -1; break; //============================== case TokenNameIntegerLiteral : pushOnExpressionStack( new IntLiteral( scanner.getCurrentTokenSource(), scanner.startPosition, scanner.currentPosition - 1)); // scanner.commentPtr = -1; break; case TokenNameLongLiteral : pushOnExpressionStack( new LongLiteral( scanner.getCurrentTokenSource(), scanner.startPosition, scanner.currentPosition - 1)); // scanner.commentPtr = -1; break; case TokenNameFloatingPointLiteral : pushOnExpressionStack( new FloatLiteral( scanner.getCurrentTokenSource(), scanner.startPosition, scanner.currentPosition - 1)); // scanner.commentPtr = -1; break; case TokenNameDoubleLiteral : pushOnExpressionStack( new DoubleLiteral( scanner.getCurrentTokenSource(), scanner.startPosition, scanner.currentPosition - 1)); // scanner.commentPtr = -1; break; case TokenNameCharacterLiteral : pushOnExpressionStack( new CharLiteral( scanner.getCurrentTokenSource(), scanner.startPosition, scanner.currentPosition - 1)); // scanner.commentPtr = -1; break; case TokenNameStringLiteral : StringLiteral stringLiteral = new StringLiteral( scanner.getCurrentTokenSourceString(), scanner.startPosition, scanner.currentPosition - 1); pushOnExpressionStack(stringLiteral); // scanner.commentPtr = -1; break; case TokenNamefalse : pushOnExpressionStack( new FalseLiteral(scanner.startPosition, scanner.currentPosition - 1)); // scanner.commentPtr = -1; break; case TokenNametrue : pushOnExpressionStack( new TrueLiteral(scanner.startPosition, scanner.currentPosition - 1)); break; case TokenNamenull : pushOnExpressionStack( new NullLiteral(scanner.startPosition, scanner.currentPosition - 1)); break; //============================ case TokenNamesuper : case TokenNamethis : endPosition = scanner.currentPosition - 1; pushOnIntStack(scanner.startPosition); break; case TokenNameassert : case TokenNameimport : case TokenNamepackage : case TokenNamethrow : case TokenNamedo : case TokenNameif : case TokenNamefor : case TokenNameswitch : case TokenNametry : case TokenNamewhile : case TokenNamebreak : case TokenNamecontinue : case TokenNamereturn : case TokenNamecase : pushOnIntStack(scanner.startPosition); break; case TokenNamenew : // https://bugs.eclipse.org/bugs/show_bug.cgi?id=40954 resetModifiers(); pushOnIntStack(scanner.startPosition); break; case TokenNameclass : pushOnIntStack(scanner.currentPosition - 1); pushOnIntStack(scanner.startPosition); break; case TokenNamedefault : pushOnIntStack(scanner.startPosition); pushOnIntStack(scanner.currentPosition - 1); break; //let extra semantic action decide when to push case TokenNameRBRACKET : case TokenNamePLUS : case TokenNameMINUS : case TokenNameNOT : case TokenNameTWIDDLE : endPosition = scanner.startPosition; break; case TokenNamePLUS_PLUS : case TokenNameMINUS_MINUS : endPosition = scanner.startPosition; endStatementPosition = scanner.currentPosition - 1; break; case TokenNameRBRACE: case TokenNameSEMICOLON : endStatementPosition = scanner.currentPosition - 1; endPosition = scanner.startPosition - 1; //the item is not part of the potential futur expression/statement break; // in order to handle ( expression) ////// (cast)expression///// foo(x) case TokenNameRPAREN : rParenPos = scanner.currentPosition - 1; // position of the end of right parenthesis (in case of unicode \u0029) lex00101 break; case TokenNameLPAREN : lParenPos = scanner.startPosition; break; // case TokenNameQUESTION : // case TokenNameCOMMA : // case TokenNameCOLON : // case TokenNameEQUAL : // case TokenNameLBRACKET : // case TokenNameDOT : // case TokenNameERROR : // case TokenNameEOF : // case TokenNamecase : // case TokenNamecatch : // case TokenNameelse : // case TokenNameextends : // case TokenNamefinally : // case TokenNameimplements : // case TokenNamethrows : // case TokenNameinstanceof : // case TokenNameEQUAL_EQUAL : // case TokenNameLESS_EQUAL : // case TokenNameGREATER_EQUAL : // case TokenNameNOT_EQUAL : // case TokenNameLEFT_SHIFT : // case TokenNameRIGHT_SHIFT : // case TokenNameUNSIGNED_RIGHT_SHIFT : // case TokenNamePLUS_EQUAL : // case TokenNameMINUS_EQUAL : // case TokenNameMULTIPLY_EQUAL : // case TokenNameDIVIDE_EQUAL : // case TokenNameAND_EQUAL : // case TokenNameOR_EQUAL : // case TokenNameXOR_EQUAL : // case TokenNameREMAINDER_EQUAL : // case TokenNameLEFT_SHIFT_EQUAL : // case TokenNameRIGHT_SHIFT_EQUAL : // case TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL : // case TokenNameOR_OR : // case TokenNameAND_AND : // case TokenNameREMAINDER : // case TokenNameXOR : // case TokenNameAND : // case TokenNameMULTIPLY : // case TokenNameOR : // case TokenNameDIVIDE : // case TokenNameGREATER : // case TokenNameLESS : }} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/72d09911302484497c2776b017dc226fd10250ec/Parser.java/clean/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
7865,
1345,
12,
474,
618,
13,
288,
202,
20308,
11586,
326,
1142,
12393,
460,
1195,
202,
20308,
775,
358,
18935,
326,
1300,
434,
1361,
924,
1195,
202,
1893,
3989,
6841,
1235,
28565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
7865,
1345,
12,
474,
618,
13,
288,
202,
20308,
11586,
326,
1142,
12393,
460,
1195,
202,
20308,
775,
358,
18935,
326,
1300,
434,
1361,
924,
1195,
202,
1893,
3989,
6841,
1235,
28565,
... |
if(log.isErrorEnabled()) log.error("exception is " + e); | log.error("exception is " + e); | private void fragment(Message msg) { ObjectOutputStream oos; byte[] buffer; byte[] fragments[]; Event evt; FragHeader hdr; Message frag_msg=null; Address dest=msg.getDest(), src=msg.getSrc(); long id=curr_id++; // used as seqnos int num_frags=0; try { // Write message into a byte buffer and fragment it bos.reset(); oos=new ObjectOutputStream(bos); msg.writeExternal(oos); oos.flush(); buffer=bos.toByteArray(); fragments=Util.fragmentBuffer(buffer, frag_size); num_frags=fragments.length; if(log.isInfoEnabled()) log.info("fragmenting packet to " + (dest != null ? dest.toString() : "<all members>") + " (size=" + buffer.length + ") into " + num_frags + " fragment(s) [frag_size=" + frag_size + "]"); for(int i=0; i < num_frags; i++) { frag_msg=new Message(dest, src, fragments[i]); hdr=new FragHeader(id, i, num_frags); if(log.isDebugEnabled()) log.debug("fragment's header is " + hdr); frag_msg.putHeader(getName(), hdr); evt=new Event(Event.MSG, frag_msg); passDown(evt); } } catch(Exception e) { if(log.isErrorEnabled()) log.error("exception is " + e); } } | 49475 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49475/85b7a7c351493f88f1d6a3045b9cbd0b817f95cd/FRAG.java/clean/src/org/jgroups/protocols/FRAG.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5481,
12,
1079,
1234,
13,
288,
3639,
23438,
24956,
31,
3639,
1160,
8526,
1613,
31,
3639,
1160,
8526,
14656,
8526,
31,
3639,
2587,
6324,
31,
3639,
478,
2458,
1864,
7723,
31,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5481,
12,
1079,
1234,
13,
288,
3639,
23438,
24956,
31,
3639,
1160,
8526,
1613,
31,
3639,
1160,
8526,
14656,
8526,
31,
3639,
2587,
6324,
31,
3639,
478,
2458,
1864,
7723,
31,
363... |
helpMenu.add( about ); | helpMenu.add( helpAbout ); | public MenuBar() throws HeadlessException { super(); int keyMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); fileOpen.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_O, keyMask ) ); fileMenu.add( fileOpen ); fileClose.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_W, keyMask ) ); fileMenu.add( fileClose ); fileMenu.add( new JSeparator() ); fileTrace.setEnabled( true ); fileMenu.add( fileTrace ); add( fileMenu ); viewMenu.add( autosizeColumns ); viewMenu.add( autosizeAndHideColumns ); add( viewMenu ); filterAllMessages.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_M, keyMask ) ); filterMenu.add( filterAllMessages ); filterAdministrativeMessages.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_D, keyMask ) ); filterMenu.add( filterAdministrativeMessages ); filterApplicationMessages.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_P, keyMask ) ); filterMenu.add( filterApplicationMessages ); filterMenu.add( new JSeparator() ); filterCustomFilter.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_F, keyMask ) ); filterMenu.add( filterCustomFilter ); filterMenu.add( new JSeparator() ); filterMenu.add( filterIndicationCategory ); filterMenu.add( filterEventCommunicationCategory ); filterMenu.add( filterQuotationNegotiationCategory ); filterMenu.add( filterMarketDataCategory ); filterMenu.add( filterSecurityAndTradingSessionCategory ); filterMenu.add( new JSeparator() ); filterMenu.add( filterSingleGeneralOrderHandlingCategory ); filterMenu.add( filterCrossOrdersCategory ); filterMenu.add( filterMultilegOrdersCategory ); filterMenu.add( filterListProgramBasketTradingCategory ); filterMenu.add( new JSeparator() ); filterMenu.add( filterAllocationCategory ); filterMenu.add( filterConfirmationCategory ); filterMenu.add( filterSettlementInstructionsCategory ); filterMenu.add( filterTradeCaptureReportingCategory ); filterMenu.add( filterRegistrationInstructionsCategory ); filterMenu.add( filterPositionsMaintenanceCategory ); filterMenu.add( filterCollateralManagementCategory ); add( filterMenu ); helpMenu.add( about ); add( helpMenu ); reset(); addActionListener( this ); filterAllMessages.setSelected( true ); } | 55685 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55685/4363305f238db09ca57c1bff107f3d4d2476840e/MenuBar.java/clean/quickfix/logviewer/MenuBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
9809,
5190,
1435,
1216,
3667,
2656,
503,
288,
202,
202,
9565,
5621,
1082,
202,
474,
498,
5796,
273,
13288,
8691,
18,
588,
1868,
6364,
8691,
7675,
588,
4599,
15576,
653,
5796,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
9809,
5190,
1435,
1216,
3667,
2656,
503,
288,
202,
202,
9565,
5621,
1082,
202,
474,
498,
5796,
273,
13288,
8691,
18,
588,
1868,
6364,
8691,
7675,
588,
4599,
15576,
653,
5796,
56... |
if (fvb.getWindow().getActiveWorkbenchPage() == null) return; Perspective persp = fvb.getWindow().getActiveWorkbenchPage().getActivePerspective(); if (persp != null) item.setEnabled(persp.isFastView(ref)); | private void updateItem(ToolItem item, IViewReference ref) { if (item.getImage() != ref.getTitleImage()) { item.setImage(ref.getTitleImage()); } if (!Util.equals(item.getToolTipText(), ref.getTitle())) { item.setToolTipText(ref.getTitle()); } // TODO: This gets called during shutdown; hide/remove the items? if (fvb.getWindow().getActiveWorkbenchPage() == null) return; Perspective persp = fvb.getWindow().getActiveWorkbenchPage().getActivePerspective(); if (persp != null) item.setEnabled(persp.isFastView(ref)); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/56d13c6414977c5d89d8b1fb52fc97cc4bff60f6/ShowFastViewContribution.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowFastViewContribution.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
1180,
12,
6364,
1180,
761,
16,
467,
1767,
2404,
1278,
13,
288,
3639,
309,
261,
1726,
18,
588,
2040,
1435,
480,
1278,
18,
588,
4247,
2040,
10756,
288,
5411,
761,
18,
542... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
1180,
12,
6364,
1180,
761,
16,
467,
1767,
2404,
1278,
13,
288,
3639,
309,
261,
1726,
18,
588,
2040,
1435,
480,
1278,
18,
588,
4247,
2040,
10756,
288,
5411,
761,
18,
542... | |
throws JavaScriptException | public static Object callMethod(Scriptable obj, String methodName, Object[] args) throws JavaScriptException { Object funObj = getProperty(obj, methodName); if (!(funObj instanceof Function)) { throw ScriptRuntime.typeError1( "msg.isnt.function", ScriptRuntime.toString(obj)+'.'+methodName); } Function fun = (Function)funObj; return Context.call(fun, getTopLevelScope(obj), obj, args); } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/37d29a017a6038dd3a95ecea961c7097f7733631/ScriptableObject.java/buggy/src/org/mozilla/javascript/ScriptableObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
745,
1305,
12,
3651,
429,
1081,
16,
514,
4918,
16,
4766,
565,
1033,
8526,
833,
13,
6647,
288,
3639,
1033,
9831,
2675,
273,
3911,
12,
2603,
16,
4918,
1769,
3639,
309,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
745,
1305,
12,
3651,
429,
1081,
16,
514,
4918,
16,
4766,
565,
1033,
8526,
833,
13,
6647,
288,
3639,
1033,
9831,
2675,
273,
3911,
12,
2603,
16,
4918,
1769,
3639,
309,
16... | |
if (!hasConversions) types = null; | public FunctionObject(String name, Member methodOrConstructor, Scriptable scope) { String methodName; if (methodOrConstructor instanceof Constructor) { ctor = (Constructor) methodOrConstructor; isStatic = true; // well, doesn't take a 'this' types = ctor.getParameterTypes(); methodName = ctor.getName(); } else { method = (Method) methodOrConstructor; isStatic = Modifier.isStatic(method.getModifiers()); types = method.getParameterTypes(); methodName = method.getName(); } String myNames[] = { name }; super.names = myNames; int length; if (types.length == 4 && (types[1].isArray() || types[2].isArray())) { // Either variable args or an error. if (types[1].isArray()) { if (!isStatic || types[0] != Context.class || types[1].getComponentType() != ScriptRuntime.ObjectClass || types[2] != ScriptRuntime.FunctionClass || types[3] != Boolean.TYPE) { String[] args = { methodName }; String message = Context.getMessage("msg.varargs.ctor", args); throw Context.reportRuntimeError(message); } parmsLength = VARARGS_CTOR; } else { if (!isStatic || types[0] != Context.class || types[1] != ScriptRuntime.ScriptableClass || types[2].getComponentType() != ScriptRuntime.ObjectClass || types[3] != ScriptRuntime.FunctionClass) { String[] args = { methodName }; String message = Context.getMessage("msg.varargs.fun", args); throw Context.reportRuntimeError(message); } parmsLength = VARARGS_METHOD; } // XXX check return type length = 1; } else { parmsLength = (short) types.length; boolean hasConversions = false; for (int i=0; i < parmsLength; i++) { Class type = types[i]; if (type == ScriptRuntime.ObjectClass) { // may not need conversions } else if (type == ScriptRuntime.StringClass || type == ScriptRuntime.BooleanClass || ScriptRuntime.NumberClass.isAssignableFrom(type) || Scriptable.class.isAssignableFrom(type)) { hasConversions = true; } else if (type == Boolean.TYPE) { hasConversions = true; types[i] = ScriptRuntime.BooleanClass; } else if (type == Byte.TYPE) { hasConversions = true; types[i] = ScriptRuntime.ByteClass; } else if (type == Short.TYPE) { hasConversions = true; types[i] = ScriptRuntime.ShortClass; } else if (type == Integer.TYPE) { hasConversions = true; types[i] = ScriptRuntime.IntegerClass; } else if (type == Float.TYPE) { hasConversions = true; types[i] = ScriptRuntime.FloatClass; } else if (type == Double.TYPE) { hasConversions = true; types[i] = ScriptRuntime.DoubleClass; } // Note that long is not supported; see comments above else { Object[] errArgs = { methodName }; throw Context.reportRuntimeError( Context.getMessage("msg.bad.parms", errArgs)); } } if (!hasConversions) types = null; length = parmsLength; } // Initialize length property lengthPropertyValue = (short) length; hasVoidReturn = method != null && method.getReturnType() == Void.TYPE; this.argCount = (short) length; setParentScope(scope); setPrototype(getFunctionPrototype(scope)); Context cx = Context.getCurrentContext(); useDynamicScope = cx != null && cx.hasCompileFunctionsWithDynamicScope(); } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/c7aabbec74df9f0acacd28f858852e14674ef35f/FunctionObject.java/clean/src/org/mozilla/javascript/FunctionObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4284,
921,
12,
780,
508,
16,
8596,
707,
1162,
6293,
16,
12900,
22780,
2146,
13,
565,
288,
3639,
514,
4918,
31,
3639,
309,
261,
2039,
1162,
6293,
1276,
11417,
13,
288,
5411,
15120,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4284,
921,
12,
780,
508,
16,
8596,
707,
1162,
6293,
16,
12900,
22780,
2146,
13,
565,
288,
3639,
514,
4918,
31,
3639,
309,
261,
2039,
1162,
6293,
1276,
11417,
13,
288,
5411,
15120,
... | |
rs.next(); | if ( rs.next() ) | public synchronized ALNode addUserLayoutNode (IPerson person, UserProfile profile, ALNode node ) throws PortalException { Connection con = RDBMServices.getConnection(); try { RDBMServices.setAutoCommit(con,false); int nodeId = 0; int layoutId = 0; int userId = person.getID(); IALNodeDescription nodeDesc = node.getNodeDescription(); int fragmentId = CommonUtils.parseInt(nodeDesc.getFragmentId()); int fragmentNodeId = CommonUtils.parseInt(nodeDesc.getFragmentNodeId()); Statement stmt = con.createStatement(); ResultSet rs; // eventually, we need to fix template layout implementations so you can just do this: // int layoutId=profile.getLayoutId(); // but for now: if ( fragmentId > 0 && fragmentNodeId <= 0 ) { // TO GET THE NEXT NODE ID FOR FRAGMENT NODES rs = stmt.executeQuery("SELECT MAX(NODE_ID) FROM UP_FRAGMENTS WHERE FRAGMENT_ID=" + fragmentId); if ( rs.next() ) nodeId = rs.getInt(1) + 1; else nodeId = 1; if ( rs != null ) rs.close(); } else { String subSelectString = "SELECT LAYOUT_ID FROM UP_USER_PROFILE WHERE USER_ID=" + userId + " AND PROFILE_ID=" + profile.getProfileId(); LogService.log(LogService.DEBUG, "AggregatedUserLayoutStore::addUserLayoutNode(): " + subSelectString); rs = stmt.executeQuery(subSelectString); try { rs.next(); layoutId = rs.getInt(1); if (rs.wasNull()) { layoutId = 0; } } finally { rs.close(); } // Make sure the next struct id is set in case the user adds a channel String sQuery = "SELECT NEXT_STRUCT_ID FROM UP_USER WHERE USER_ID=" + userId; LogService.log(LogService.DEBUG, "AggregatedUserLayoutStore::addUserLayoutNode(): " + sQuery); rs = stmt.executeQuery(sQuery); try { rs.next(); nodeId = rs.getInt(1)+1; } finally { rs.close(); } sQuery = "UPDATE UP_USER SET NEXT_STRUCT_ID=" + nodeId + " WHERE USER_ID=" + userId; stmt.executeUpdate(sQuery); } PreparedStatement psAddNode, psAddRestriction; // Setting the node ID nodeDesc.setId(nodeId+""); if ( fragmentId > 0 && fragmentNodeId <= 0 ) psAddNode = con.prepareStatement(FRAGMENT_ADD_SQL); else psAddNode = con.prepareStatement(LAYOUT_ADD_SQL); if ( fragmentId > 0 ) psAddRestriction = con.prepareStatement(FRAGMENT_RESTRICTION_ADD_SQL); else psAddRestriction = con.prepareStatement(LAYOUT_RESTRICTION_ADD_SQL); PreparedStatement psAddChannelParam = null, psAddChannel = null; /*if ( node.getNodeType() == IUserLayoutNodeDescription.CHANNEL ) { int publishId = CommonUtils.parseInt(((IALChannelDescription)nodeDesc).getChannelPublishId()); if ( publishId > 0 ) { rs = stmt.executeQuery("SELECT CHAN_ID FROM UP_CHANNEL WHERE CHAN_ID=" + publishId); try { if ( !rs.next() ) { psAddChannelParam = con.prepareStatement(CHANNEL_PARAM_ADD_SQL); psAddChannel = con.prepareStatement(CHANNEL_ADD_SQL); } } finally { rs.close(); } } }*/ if ( node.getNodeType() == IUserLayoutNodeDescription.CHANNEL ) { IALChannelDescription channelDesc = (IALChannelDescription) nodeDesc; int publishId = CommonUtils.parseInt(channelDesc.getChannelPublishId()); if ( publishId > 0 ) { rs = stmt.executeQuery("SELECT CHAN_NAME FROM UP_CHANNEL WHERE CHAN_ID=" + publishId); try { if ( rs.next() ) { channelDesc.setName(rs.getString(1)); fillChannelDescription( channelDesc ); } } finally { rs.close(); } } } ALNode resultNode = addUserLayoutNode ( userId, layoutId, node, psAddNode, psAddRestriction, null, null, stmt ); if ( psAddNode != null ) psAddNode.close(); if ( psAddRestriction != null ) psAddRestriction.close(); if ( psAddChannel != null ) psAddChannel.close(); if ( psAddChannelParam != null ) psAddChannelParam.close(); stmt.close(); RDBMServices.commit(con); con.close(); return resultNode; } catch (Exception e) { String errorMessage = e.getMessage(); try { RDBMServices.rollback(con); } catch ( SQLException sqle ) { LogService.log(LogService.ERROR, sqle.toString() ); errorMessage += ":" + sqle.getMessage(); } throw new PortalException(errorMessage); } } | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/3fe0532378b3b0521af32845af065cdc3141ade0/AggregatedUserLayoutStore.java/clean/source/org/jasig/portal/layout/AggregatedUserLayoutStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
7981,
907,
527,
1299,
3744,
907,
261,
2579,
3565,
6175,
16,
2177,
4029,
3042,
16,
7981,
907,
756,
262,
1216,
25478,
503,
288,
377,
4050,
356,
273,
534,
2290,
49,
5676,
18,
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,
3852,
7981,
907,
527,
1299,
3744,
907,
261,
2579,
3565,
6175,
16,
2177,
4029,
3042,
16,
7981,
907,
756,
262,
1216,
25478,
503,
288,
377,
4050,
356,
273,
534,
2290,
49,
5676,
18,
5... |
match(']'); | } | public void mRBRACK() throws RecognitionException { int type = RBRACK; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:66:10: ( ']' ) // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:66:10: ']' { match(']'); } if ( token==null ) {emit(type,line,charPosition,channel,start,getCharIndex()-1);} } | 5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/024138fd0e08f5f4cd91a30959fe962d30fec435/JavaParserLexer.java/buggy/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParserLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
54,
7192,
3649,
1435,
1216,
9539,
288,
3639,
509,
618,
273,
534,
7192,
3649,
31,
3639,
509,
787,
273,
23577,
1016,
5621,
3639,
509,
980,
273,
9851,
5621,
3639,
509,
1149,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
54,
7192,
3649,
1435,
1216,
9539,
288,
3639,
509,
618,
273,
534,
7192,
3649,
31,
3639,
509,
787,
273,
23577,
1016,
5621,
3639,
509,
980,
273,
9851,
5621,
3639,
509,
1149,
... |
File file = new File(filename); | File file = FileUtils.newFile(filename); | public static File createFile(String filename) throws IOException { File file = new File(filename); if (!file.canWrite()) { String dirName = file.getPath(); int i = dirName.lastIndexOf(File.separator); if (i > -1) { dirName = dirName.substring(0, i); File dir = new File(dirName); dir.mkdirs(); } file.createNewFile(); } return file; } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/c26d6e7895a7fd9d1a857f8d85c7ca168ac3be1e/FileUtils.java/clean/core/src/main/java/org/mule/util/FileUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1387,
21266,
12,
780,
1544,
13,
1216,
1860,
565,
288,
3639,
1387,
585,
273,
13779,
18,
2704,
812,
12,
3459,
1769,
3639,
309,
16051,
768,
18,
4169,
3067,
10756,
3639,
288,
5411,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1387,
21266,
12,
780,
1544,
13,
1216,
1860,
565,
288,
3639,
1387,
585,
273,
13779,
18,
2704,
812,
12,
3459,
1769,
3639,
309,
16051,
768,
18,
4169,
3067,
10756,
3639,
288,
5411,... |
if( ASS ) | if(AS.S) | private static String buildString( String msg, Object ob ) { String str = null; if( ASS ) { str = "!!!Assertion failed!!!"; if( null != msg ) str += "\n " + msg; if( null != ob ) { str += "\n Classname = " + ob.getClass(); str += "\n Object dump: " + ob; } } return str; } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/2de73cf99dce60cce549e7757f841284b68d1220/ER.java/clean/js/jsdj/classes/com/netscape/jsdebugging/ifcui/palomar/util/ER.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
1361,
780,
12,
514,
1234,
16,
1033,
3768,
262,
565,
288,
3639,
514,
609,
273,
446,
31,
3639,
309,
12,
3033,
18,
55,
13,
3639,
288,
5411,
609,
273,
315,
25885,
14979,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
1361,
780,
12,
514,
1234,
16,
1033,
3768,
262,
565,
288,
3639,
514,
609,
273,
446,
31,
3639,
309,
12,
3033,
18,
55,
13,
3639,
288,
5411,
609,
273,
315,
25885,
14979,
2... |
if (getTable() != null) { | if (getTable() != null) { | public RubyObject setupModule(Ruby ruby, RubyModule module) { // Node node = n; String file = ruby.getSourceFile(); int line = ruby.getSourceLine(); // TMP_PROTECT; ruby.getRubyFrame().tmpPush(); ruby.pushClass(); ruby.setRubyClass(module); ruby.setCBase(module); //CHAD ruby.getScope().push(); RubyVarmap.push(ruby); if (getTable() != null) { ruby.getScope().setLocalValues(new ArrayList(Collections.nCopies(getTable().size(), ruby.getNil()))); ruby.getScope().setLocalNames(getTable()); } else { ruby.getScope().setLocalValues(null); ruby.getScope().setLocalNames(null); } // +++ // if (ruby.getCRef() != null) { ruby.getCRef().push(module); // } else { // ruby.setCRef(new CRefNode(module, null)); // } // --- ruby.getRubyFrame().setCbase(ruby.getCRef()); // PUSH_TAG(PROT_NONE); RubyObject result = null; // if (( state = EXEC_TAG()) == 0 ) { // if (trace_func) { // call_trace_func("class", file, line, ruby_class, // ruby_frame->last_func, ruby_frame->last_class ); // } result = getNextNode() != null ? getNextNode().eval(ruby, ruby.getRubyClass()) : ruby.getNil(); // } // POP_TAG(); ruby.getCRef().pop(); RubyVarmap.pop(ruby); ruby.getScope().pop(); ruby.popClass(); ruby.getRubyFrame().tmpPop(); // if (trace_func){ // call_trace_func("end", file, line, 0, ruby_frame->last_func, ruby_frame->last_class ); // } // if (state != 0){ // JUMP_TAG(state); // } return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7798138390a306a202dcec9bde45928dae2e852e/ScopeNode.java/clean/org/jruby/nodes/ScopeNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
3875,
3120,
12,
54,
10340,
22155,
16,
19817,
3120,
1605,
13,
288,
202,
202,
759,
2029,
756,
273,
290,
31,
202,
202,
780,
585,
273,
22155,
18,
588,
31150,
5621,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
3875,
3120,
12,
54,
10340,
22155,
16,
19817,
3120,
1605,
13,
288,
202,
202,
759,
2029,
756,
273,
290,
31,
202,
202,
780,
585,
273,
22155,
18,
588,
31150,
5621,
202... |
if (assigningAuthority == null) { | try { patientId = Integer.parseInt(hl7PatientId); } catch (NumberFormatException e) { log.warn("Invalid patient ID '" + hl7PatientId + "'"); } if (assigningAuthority == null || patientId != null) { | public Integer resolvePatientId(HL7Segment pid) throws HL7Exception { /* * TODO: Properly handle assigning authority. If specified it's currently treated as PatientIdentifierType.name * TODO: Throw exceptions instead of returning null in some cases * TODO: Don't hydrate Patient objects unnecessarily */ String hl7PatientId = pid.getComponent(3, 1); String assigningAuthority = pid.getComponent(3, 4); if ("".equals(assigningAuthority)) { assigningAuthority = null; } if (assigningAuthority == null) { try { Integer ptId = new Integer(hl7PatientId); Patient patient = context.getPatientService().getPatient(ptId); return patient.getPatientId(); } catch (Exception ex) { log.error("Exception while treating PID.patient_id '" + hl7PatientId + "' as an internal identifier", ex); return null; } } else { try { PatientIdentifierType pit = context.getPatientService().getPatientIdentifierType(assigningAuthority); if (pit == null) { throw new HL7Exception("Can't find PatientIdentifierType named " + assigningAuthority); } List<PatientIdentifier> ids = context.getPatientService().getPatientIdentifiers(hl7PatientId, pit); if (ids.size() == 1) { return ids.get(0).getPatient().getPatientId(); } else { return null; } } catch (Exception ex) { log.error("Exception while handling PID.patient_id '" + hl7PatientId + "' for assigning authority '" + assigningAuthority + "'", ex); return null; } } } | 30777 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/30777/135cc730dd10c9e66687e12872c99986a4d9c40c/HL7Service.java/clean/src/api/org/openmrs/hl7/HL7Service.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2144,
2245,
22834,
1979,
548,
12,
44,
48,
27,
4131,
4231,
13,
1216,
670,
48,
27,
503,
288,
202,
202,
20308,
1082,
380,
2660,
30,
1186,
457,
715,
1640,
28639,
11675,
18,
971,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2245,
22834,
1979,
548,
12,
44,
48,
27,
4131,
4231,
13,
1216,
670,
48,
27,
503,
288,
202,
202,
20308,
1082,
380,
2660,
30,
1186,
457,
715,
1640,
28639,
11675,
18,
971,
... |
getLogger().error( "Trace", t ); | getLogger().info( "Trace", t ); | private void logTrace( Throwable t, boolean showErrors ) { if ( getLogger().isDebugEnabled() ) { getLogger().debug( "Trace", t ); line(); } else if ( showErrors ) { getLogger().error( "Trace", t ); line(); } else { getLogger().info( "For more information, run Maven with the -e switch" ); } } | 50542 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50542/a9f4d9f1e588bd5e89c4af908d1dfc8b6e81e741/DefaultMaven.java/buggy/maven-core/src/main/java/org/apache/maven/DefaultMaven.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
613,
3448,
12,
4206,
268,
16,
1250,
2405,
4229,
262,
565,
288,
3639,
309,
261,
7156,
7675,
291,
2829,
1526,
1435,
262,
3639,
288,
5411,
7156,
7675,
4148,
12,
315,
3448,
3113,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
613,
3448,
12,
4206,
268,
16,
1250,
2405,
4229,
262,
565,
288,
3639,
309,
261,
7156,
7675,
291,
2829,
1526,
1435,
262,
3639,
288,
5411,
7156,
7675,
4148,
12,
315,
3448,
3113,
... |
stripSpace.stripAttributes(true); stripSpace.setMaxLocals(); stripSpace.setMaxStack(); stripSpace.removeNOPs(); classGen.addMethod(stripSpace.getMethod()); | classGen.addMethod(stripSpace); | private static void compilePredicate(Vector rules, int defaultAction, ClassGenerator classGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = new InstructionList(); final XSLTC xsltc = classGen.getParser().getXSLTC(); // private boolean Translet.stripSpace(int type) - cannot be static final MethodGenerator stripSpace = new MethodGenerator(ACC_PUBLIC | ACC_FINAL , org.apache.bcel.generic.Type.BOOLEAN, new org.apache.bcel.generic.Type[] { Util.getJCRefType(DOM_INTF_SIG), org.apache.bcel.generic.Type.INT, org.apache.bcel.generic.Type.INT }, new String[] { "dom","node","type" }, "stripSpace",classGen.getClassName(),il,cpg); classGen.addInterface("org/apache/xalan/xsltc/StripFilter"); final int paramDom = stripSpace.getLocalIndex("dom"); final int paramCurrent = stripSpace.getLocalIndex("node"); final int paramType = stripSpace.getLocalIndex("type"); BranchHandle strip[] = new BranchHandle[rules.size()]; BranchHandle preserve[] = new BranchHandle[rules.size()]; int sCount = 0; int pCount = 0; // Traverse all strip/preserve rules for (int i = 0; i<rules.size(); i++) { // Get the next rule in the prioritised list WhitespaceRule rule = (WhitespaceRule)rules.elementAt(i); // Returns the namespace for a node in the DOM final int gns = cpg.addInterfaceMethodref(DOM_INTF, "getNamespaceName", "(I)Ljava/lang/String;"); final int strcmp = cpg.addMethodref("java/lang/String", "compareTo", "(Ljava/lang/String;)I"); // Handle elements="ns:*" type rule if (rule.getStrength() == RULE_NAMESPACE) { il.append(new ALOAD(paramDom)); il.append(new ILOAD(paramCurrent)); il.append(new INVOKEINTERFACE(gns,2)); il.append(new PUSH(cpg, rule.getNamespace())); il.append(new INVOKEVIRTUAL(strcmp)); il.append(ICONST_0); if (rule.getAction() == STRIP_SPACE) { strip[sCount++] = il.append(new IF_ICMPEQ(null)); } else { preserve[pCount++] = il.append(new IF_ICMPEQ(null)); } } // Handle elements="ns:el" type rule else if (rule.getStrength() == RULE_ELEMENT) { // Create the QName for the element final Parser parser = classGen.getParser(); QName qname; if (rule.getNamespace() != Constants.EMPTYSTRING ) qname = parser.getQName(rule.getNamespace(), null, rule.getElement()); else qname = parser.getQName(rule.getElement()); // Register the element. final int elementType = xsltc.registerElement(qname); il.append(new ILOAD(paramType)); il.append(new PUSH(cpg, elementType)); // Compare current node type with wanted element type if (rule.getAction() == STRIP_SPACE) strip[sCount++] = il.append(new IF_ICMPEQ(null)); else preserve[pCount++] = il.append(new IF_ICMPEQ(null)); } } if (defaultAction == STRIP_SPACE) { compileStripSpace(strip, sCount, il); compilePreserveSpace(preserve, pCount, il); } else { compilePreserveSpace(preserve, pCount, il); compileStripSpace(strip, sCount, il); } stripSpace.stripAttributes(true); stripSpace.setMaxLocals(); stripSpace.setMaxStack(); stripSpace.removeNOPs(); classGen.addMethod(stripSpace.getMethod()); } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/04fbeab0e3a7992cdc5a5fe8965298086118e3d8/Whitespace.java/clean/src/org/apache/xalan/xsltc/compiler/Whitespace.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
4074,
8634,
12,
5018,
2931,
16,
25083,
509,
805,
1803,
16,
25083,
1659,
3908,
667,
7642,
13,
288,
202,
6385,
10551,
2864,
7642,
3283,
75,
273,
667,
7642,
18,
588,
6902,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
4074,
8634,
12,
5018,
2931,
16,
25083,
509,
805,
1803,
16,
25083,
1659,
3908,
667,
7642,
13,
288,
202,
6385,
10551,
2864,
7642,
3283,
75,
273,
667,
7642,
18,
588,
6902,
... |
c.pushStyle(CascadedStyle.emptyCascadedStyle); | static void paintInlineContext(Context c, Box box, boolean restyle) { //dummy style to make sure that text nodes don't get extra padding and such { LinkedList decorations = c.getDecorations(); c.pushStyle(CascadedStyle.emptyCascadedStyle); //BlockBox block = (BlockBox)box; // translate into local coords // account for the origin of the containing box c.translate(box.x, box.y); // for each line box BlockBox block = null; if (box instanceof BlockBox) {//Why isn't it always a BlockBox? Because of e.g. Floats! block = (BlockBox) box; } CascadedStyle firstLineStyle = null; for (int i = 0; i < box.getChildCount(); i++) { if (i == 0 && block != null && block.firstLineStyle != null) { firstLineStyle = block.firstLineStyle; } // get the line box paintLine(c, (LineBox) box.getChild(i), restyle, firstLineStyle, decorations); if (i == 0 && block != null && block.firstLineStyle != null) { firstLineStyle = null; } } // translate back to parent coords c.translate(-box.x, -box.y); //pop dummy style c.popStyle(); } } | 53937 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53937/f77807950b50bf9a928b40c6c8caa9b235754fe4/InlineRendering.java/buggy/src/java/org/xhtmlrenderer/render/InlineRendering.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
918,
12574,
10870,
1042,
12,
1042,
276,
16,
8549,
3919,
16,
1250,
3127,
1362,
13,
288,
3639,
368,
21050,
2154,
358,
1221,
3071,
716,
977,
2199,
2727,
1404,
336,
2870,
4992,
471,
4123... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
918,
12574,
10870,
1042,
12,
1042,
276,
16,
8549,
3919,
16,
1250,
3127,
1362,
13,
288,
3639,
368,
21050,
2154,
358,
1221,
3071,
716,
977,
2199,
2727,
1404,
336,
2870,
4992,
471,
4123... | |
SequenceIntervalCollection activeIntervalCollection = bugInstance.getActiveIntervalCollection(); activeIntervalCollection.add(new SequenceInterval(sequence, sequence)); bugInstance.setActiveIntervalCollection(activeIntervalCollection); | bugInstance.setFirstVersion(sequence); | public boolean add(BugInstance bugInstance, boolean updateActiveTime) { registerUniqueId(bugInstance); if (updateActiveTime) { // Mark the BugInstance as being active at the BugCollection's current timestamp. SequenceIntervalCollection activeIntervalCollection = bugInstance.getActiveIntervalCollection(); activeIntervalCollection.add(new SequenceInterval(sequence, sequence)); bugInstance.setActiveIntervalCollection(activeIntervalCollection); } return bugSet.add(bugInstance); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/ae6d5886cb131ba7ea293f6f7c9cfc29314b9155/SortedBugCollection.java/clean/findbugs/src/java/edu/umd/cs/findbugs/SortedBugCollection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
527,
12,
19865,
1442,
7934,
1442,
16,
1250,
1089,
3896,
950,
13,
288,
202,
202,
4861,
24174,
12,
925,
1442,
1769,
202,
202,
430,
261,
2725,
3896,
950,
13,
288,
1082,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
527,
12,
19865,
1442,
7934,
1442,
16,
1250,
1089,
3896,
950,
13,
288,
202,
202,
4861,
24174,
12,
925,
1442,
1769,
202,
202,
430,
261,
2725,
3896,
950,
13,
288,
1082,
202... |
errroMessage.sendHtml( response ); } | errroMessage.sendHtml( response ); } | protected void sendErrorMessage( String imcserver, String eMailServerMaster, String languagePrefix, String errorHeader, int errorCode, HttpServletResponse response ) throws IOException { ErrorMessageGenerator errroMessage = new ErrorMessageGenerator( imcserver, eMailServerMaster, languagePrefix, errorHeader, this.TEMPLATE_ERROR, errorCode ); errroMessage.sendHtml( response ); } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/a270627916b37a677a391dd9f45c54d3d6f12503/Administrator.java/buggy/servlets/Administrator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1366,
14935,
12,
514,
709,
71,
3567,
16,
514,
425,
6759,
2081,
7786,
16,
6862,
4202,
514,
2653,
2244,
16,
514,
555,
1864,
16,
6862,
4202,
509,
12079,
16,
12446,
766,
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,
1366,
14935,
12,
514,
709,
71,
3567,
16,
514,
425,
6759,
2081,
7786,
16,
6862,
4202,
514,
2653,
2244,
16,
514,
555,
1864,
16,
6862,
4202,
509,
12079,
16,
12446,
766,
262... |
super((Shell)null); | super((Shell) null); | KeyAssistDialog(final IWorkbench workbench, final WorkbenchKeyboard associatedKeyboard, final KeyBindingState associatedState) { super((Shell)null); setShellStyle(SWT.NO_TRIM); setBlockOnOpen(false); this.activityManager = workbench.getActivitySupport() .getActivityManager(); this.bindingService = (IBindingService) workbench .getService(IWorkbenchServices.BINDING); this.commandService = (ICommandService) workbench .getService(IWorkbenchServices.COMMAND); this.keyBindingState = associatedState; this.workbenchKeyboard = associatedKeyboard; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e61bf96d546738a5dfebc5feb8c2bcbe110e4371/KeyAssistDialog.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeyAssistDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
653,
2610,
376,
6353,
12,
6385,
467,
2421,
22144,
1440,
22144,
16,
1082,
202,
6385,
4147,
22144,
17872,
3627,
17872,
16,
1082,
202,
6385,
1929,
5250,
1119,
3627,
1119,
13,
288,
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,
653,
2610,
376,
6353,
12,
6385,
467,
2421,
22144,
1440,
22144,
16,
1082,
202,
6385,
4147,
22144,
17872,
3627,
17872,
16,
1082,
202,
6385,
1929,
5250,
1119,
3627,
1119,
13,
288,
202,
... |
if ( moduleHandle!=libraryHandle && !moduleHandle.isInclude( libraryHandle ) ) | if ( moduleHandle != libraryHandle && !moduleHandle.isInclude( libraryHandle ) ) | public static boolean includeLibrary( ModuleHandle moduleHandle, LibraryHandle libraryHandle ) throws DesignFileException, SemanticException { if ( moduleHandle!=libraryHandle && !moduleHandle.isInclude( libraryHandle ) ) { String defaultName = new File( libraryHandle.getFileName( ) ).getName( ) .split( File.separator + "." )[0]; if ( SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ) .getLibrary( defaultName ) != null ) { ImportLibraryDialog dialog = new ImportLibraryDialog( defaultName ); if ( dialog.open( ) == Dialog.OK ) { moduleHandle.includeLibrary( DEUtil.getRelativedPath( moduleHandle.getFileName( ), libraryHandle.getFileName( ) ), (String) dialog.getResult( ) ); ExceptionHandler.openMessageBox( MSG_DIALOG_TITLE, MessageFormat.format( MSG_DIALOG_MSG, new String[]{ libraryHandle.getFileName( ) } ), SWT.ICON_INFORMATION ); return true; } return false; } else { moduleHandle.includeLibrary( DEUtil.getRelativedPath( moduleHandle.getFileName( ), libraryHandle.getFileName( ) ), defaultName ); ExceptionHandler.openMessageBox( MSG_DIALOG_TITLE, MessageFormat.format( MSG_DIALOG_MSG, new String[]{ libraryHandle.getFileName( ) } ), SWT.ICON_INFORMATION ); return true; } } return true; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/a11c61344fea2c7dd935e6c4bd0e49a1b90c426e/UIUtil.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/util/UIUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
2341,
9313,
12,
5924,
3259,
1605,
3259,
16,
1082,
202,
9313,
3259,
5313,
3259,
262,
1216,
29703,
812,
503,
16,
1082,
202,
13185,
9941,
503,
202,
95,
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,
760,
1250,
2341,
9313,
12,
5924,
3259,
1605,
3259,
16,
1082,
202,
9313,
3259,
5313,
3259,
262,
1216,
29703,
812,
503,
16,
1082,
202,
13185,
9941,
503,
202,
95,
202,
202,
430,
... |
public Color getBackground() { | public Color getBackground() { | public Color getBackground() { return Component.this.getBackground(); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/Component.java/clean/core/src/classpath/java/java/awt/Component.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
5563,
336,
8199,
1435,
288,
1082,
202,
2463,
5435,
18,
2211,
18,
588,
8199,
5621,
202,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
5563,
336,
8199,
1435,
288,
1082,
202,
2463,
5435,
18,
2211,
18,
588,
8199,
5621,
202,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if(event.getProperty().equals(IPreferenceConstants.ENABLED_DECORATORS)) WorkbenchPlugin.getDefault().getDecoratorManager().restoreListeners(); | if (event .getProperty() .equals(IPreferenceConstants.ENABLED_DECORATORS)) WorkbenchPlugin .getDefault() .getDecoratorManager() .restoreListeners(); if (event .getProperty() .equals(IWorkbenchPreferenceConstants.DEFAULT_PERSPECTIVE_ID)) { if (! event.getNewValue().equals(event.getOldValue())) { IPerspectiveRegistry perspectiveRegistry = getWorkbench().getPerspectiveRegistry(); perspectiveRegistry.setDefaultPerspective((String) event.getNewValue()); } } | public void propertyChange(PropertyChangeEvent event) { if(event.getProperty().equals(IPreferenceConstants.ENABLED_DECORATORS)) WorkbenchPlugin.getDefault().getDecoratorManager().restoreListeners(); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/673707a9883ba35bbbe6ac8e1b097d6f34e61e64/PlatformUIPreferenceListener.java/buggy/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/PlatformUIPreferenceListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1272,
3043,
12,
1396,
20930,
871,
13,
288,
202,
202,
430,
12,
2575,
18,
588,
1396,
7675,
14963,
12,
45,
9624,
2918,
18,
13560,
67,
1639,
9428,
3575,
55,
3719,
1082,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1272,
3043,
12,
1396,
20930,
871,
13,
288,
202,
202,
430,
12,
2575,
18,
588,
1396,
7675,
14963,
12,
45,
9624,
2918,
18,
13560,
67,
1639,
9428,
3575,
55,
3719,
1082,
202,
... |
Map<String, String> typeToValue = new HashMap<String, String>(); | public TableManager getSystemTableManagerCustomizations(TableManager tableManager, TableManager primarySystemTableManager, Date version) throws Exception { PreparedStatement ps = ConnectionManager.getRelationalDBConnection().prepareStatement("SELECT value, type " + "FROM genenametype INNER JOIN entrytype_genetype " + "ON (entrytype_genetype_name_hjid = entrytype_genetype.hjid) " + "WHERE entrytype_gene_hjid = ?"); ResultSet result; for (Row row : primarySystemTableManager.getRows()) { ps.setString(1, row.getValue("UID")); result = ps.executeQuery(); Map<String, String> typeToValue = new HashMap<String, String>(); while (result.next()) { typeToValue.put(result.getString("type"), result.getString("value")); } String ids = typeToValue.get("ordered locus") != null ? typeToValue.get("ordered locus") : typeToValue.get("primary") != null ? typeToValue.get("primary") : typeToValue.get("synonym"); for (String id : ids.split("/")) { tableManager.submit("Blattner", QueryType.insert, new String[][] { { "ID", id }, { "Species", "|" + getSpeciesName() + "|" }, { "\"Date\"", GenMAPPBuilderUtilities.getSystemsDateString(version) }, { "UID", row.getValue("UID") } }); } } return tableManager; } | 56676 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56676/451fd04f0ce6706463e5284c7920870a819cb05e/EscherichiaColiUniProtSpeciesProfile.java/clean/gmbuilder/src/edu/lmu/xmlpipedb/gmbuilder/databasetoolkit/profiles/EscherichiaColiUniProtSpeciesProfile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3555,
1318,
12996,
1388,
1318,
3802,
7089,
12,
1388,
1318,
1014,
1318,
16,
3555,
1318,
3354,
3163,
1388,
1318,
16,
2167,
1177,
13,
1216,
1185,
288,
3639,
16913,
4250,
273,
4050,
1318,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3555,
1318,
12996,
1388,
1318,
3802,
7089,
12,
1388,
1318,
1014,
1318,
16,
3555,
1318,
3354,
3163,
1388,
1318,
16,
2167,
1177,
13,
1216,
1185,
288,
3639,
16913,
4250,
273,
4050,
1318,... | |
public boolean shitlistRouter(Hash peer, String reason) { if (peer == null) { _log.error("wtf, why did we try to shitlist null?", new Exception("shitfaced")); return false; } if (_context.routerHash().equals(peer)) { _log.error("wtf, why did we try to shitlist ourselves?", new Exception("shitfaced")); return false; } boolean wasAlready = false; if (_log.shouldLog(Log.INFO)) _log.info("Shitlisting router " + peer.toBase64(), new Exception("Shitlist cause")); long period = SHITLIST_DURATION_MS + _context.random().nextLong(SHITLIST_DURATION_MS); PeerProfile prof = _context.profileOrganizer().getProfile(peer); if (prof != null) period = SHITLIST_DURATION_MS << prof.incrementShitlists(); if (period > 60*60*1000) period = 60*60*1000; synchronized (_shitlist) { Date oldDate = (Date)_shitlist.put(peer, new Date(_context.clock().now() + period)); wasAlready = (null == oldDate); if (reason != null) { _shitlistCause.put(peer, reason); } else { _shitlistCause.remove(peer); } } _context.messageRegistry().peerFailed(peer); return wasAlready; | public boolean shitlistRouter(Hash peer) { return shitlistRouter(peer, null); | public boolean shitlistRouter(Hash peer, String reason) { if (peer == null) { _log.error("wtf, why did we try to shitlist null?", new Exception("shitfaced")); return false; } if (_context.routerHash().equals(peer)) { _log.error("wtf, why did we try to shitlist ourselves?", new Exception("shitfaced")); return false; } boolean wasAlready = false; if (_log.shouldLog(Log.INFO)) _log.info("Shitlisting router " + peer.toBase64(), new Exception("Shitlist cause")); long period = SHITLIST_DURATION_MS + _context.random().nextLong(SHITLIST_DURATION_MS); PeerProfile prof = _context.profileOrganizer().getProfile(peer); if (prof != null) period = SHITLIST_DURATION_MS << prof.incrementShitlists(); if (period > 60*60*1000) period = 60*60*1000; synchronized (_shitlist) { Date oldDate = (Date)_shitlist.put(peer, new Date(_context.clock().now() + period)); wasAlready = (null == oldDate); if (reason != null) { _shitlistCause.put(peer, reason); } else { _shitlistCause.remove(peer); } } //_context.netDb().fail(peer); //_context.tunnelManager().peerFailed(peer); _context.messageRegistry().peerFailed(peer); return wasAlready; } | 3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/24bad8e4bbb44f0148e118f584047e5149fff555/Shitlist.java/buggy/router/java/src/net/i2p/router/Shitlist.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
699,
305,
1098,
8259,
12,
2310,
4261,
16,
514,
3971,
13,
288,
3639,
309,
261,
12210,
422,
446,
13,
288,
5411,
389,
1330,
18,
1636,
2932,
6046,
74,
16,
11598,
5061,
732,
775,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
699,
305,
1098,
8259,
12,
2310,
4261,
16,
514,
3971,
13,
288,
3639,
309,
261,
12210,
422,
446,
13,
288,
5411,
389,
1330,
18,
1636,
2932,
6046,
74,
16,
11598,
5061,
732,
775,... |
if ( _cnt2723>=1 ) { break _loop2723; } else {throw new NoViableAltException(LT(1), getFilename());} | if ( _cnt56>=1 ) { break _loop56; } else {throw new NoViableAltException(LT(1), getFilename());} | public final void value() throws RecognitionException, TokenStreamException { Token s = null; Token n = null; Token m = null; try { // for error handling boolean synPredMatched2709 = false; if (((_tokenSet_14.member(LA(1))) && (LA(2)==NL||LA(2)==ADR) && (_tokenSet_15.member(LA(3))))) { int _m2709 = mark(); synPredMatched2709 = true; inputState.guessing++; try { { switch ( LA(1)) { case HASH_REF: { match(HASH_REF); break; } case SCALAR_REF: { match(SCALAR_REF); break; } case CODE_REF: { match(CODE_REF); break; } case REF: { match(REF); break; } case FILE_REF: { match(FILE_REF); break; } case GLOB: { match(GLOB); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } } catch (RecognitionException pe) { synPredMatched2709 = false; } rewind(_m2709); inputState.guessing--; } if ( synPredMatched2709 ) { refs(); } else { boolean synPredMatched2711 = false; if (((LA(1)==STRING) && (LA(2)==NL) && (_tokenSet_9.member(LA(3))))) { int _m2711 = mark(); synPredMatched2711 = true; inputState.guessing++; try { { match(STRING); match(NL); } } catch (RecognitionException pe) { synPredMatched2711 = false; } rewind(_m2711); inputState.guessing--; } if ( synPredMatched2711 ) { s = LT(1); match(STRING); if ( inputState.guessing==0 ) { setVal(s.getText(),"Scalar");printConsole(" VAL:"+s.getText()+"\n"); } match(NL); } else { boolean synPredMatched2713 = false; if (((LA(1)==NUMBER) && (LA(2)==NL) && (_tokenSet_9.member(LA(3))))) { int _m2713 = mark(); synPredMatched2713 = true; inputState.guessing++; try { { match(NUMBER); match(NL); } } catch (RecognitionException pe) { synPredMatched2713 = false; } rewind(_m2713); inputState.guessing--; } if ( synPredMatched2713 ) { n = LT(1); match(NUMBER); if ( inputState.guessing==0 ) { setVal(n.getText(),"Scalar");printConsole(" VAL_NUM:"+n.getText()+"\n"); } match(NL); } else { boolean synPredMatched2715 = false; if (((LA(1)==FILE_HANDLE) && (LA(2)==PAREN_OP) && (LA(3)==PURE_NAME))) { int _m2715 = mark(); synPredMatched2715 = true; inputState.guessing++; try { { match(FILE_HANDLE); } } catch (RecognitionException pe) { synPredMatched2715 = false; } rewind(_m2715); inputState.guessing--; } if ( synPredMatched2715 ) { fileHandle(); match(NL); } else { boolean synPredMatched2717 = false; if (((LA(1)==NL) && (_tokenSet_9.member(LA(2))) && (_tokenSet_15.member(LA(3))))) { int _m2717 = mark(); synPredMatched2717 = true; inputState.guessing++; try { { match(NL); } } catch (RecognitionException pe) { synPredMatched2717 = false; } rewind(_m2717); inputState.guessing--; } if ( synPredMatched2717 ) { match(NL); if ( inputState.guessing==0 ) { setVal("undef","Scalar"); } } else { boolean synPredMatched2720 = false; if (((_tokenSet_16.member(LA(1))) && (_tokenSet_8.member(LA(2))) && ((LA(3) >= ARRAY_NAME && LA(3) <= CHAR_ESC)))) { int _m2720 = mark(); synPredMatched2720 = true; inputState.guessing++; try { { { match(_tokenSet_16); } match(EQ); } } catch (RecognitionException pe) { synPredMatched2720 = false; } rewind(_m2720); inputState.guessing--; } if ( synPredMatched2720 ) { if ( inputState.guessing==0 ) { mLex.mIgnoreWS=false; } { int _cnt2723=0; _loop2723: do { if ((_tokenSet_16.member(LA(1)))) { { m = LT(1); match(_tokenSet_16); } if ( inputState.guessing==0 ) { appendVal(m.getText()); } } else { if ( _cnt2723>=1 ) { break _loop2723; } else {throw new NoViableAltException(LT(1), getFilename());} } _cnt2723++; } while (true); } if ( inputState.guessing==0 ) { mLex.mIgnoreWS=true; } match(EQ); { boolean synPredMatched2726 = false; if (((_tokenSet_14.member(LA(1))) && (LA(2)==NL||LA(2)==ADR) && (_tokenSet_15.member(LA(3))))) { int _m2726 = mark(); synPredMatched2726 = true; inputState.guessing++; try { { switch ( LA(1)) { case HASH_REF: { match(HASH_REF); break; } case SCALAR_REF: { match(SCALAR_REF); break; } case CODE_REF: { match(CODE_REF); break; } case REF: { match(REF); break; } case FILE_REF: { match(FILE_REF); break; } case GLOB: { match(GLOB); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } } catch (RecognitionException pe) { synPredMatched2726 = false; } rewind(_m2726); inputState.guessing--; } if ( synPredMatched2726 ) { refs(); } else if (((LA(1) >= ARRAY_NAME && LA(1) <= CHAR_ESC)) && (_tokenSet_15.member(LA(2))) && (_tokenSet_15.member(LA(3)))) { val_nonl(); match(NL); } else { throw new NoViableAltException(LT(1), getFilename()); } } } else if (((LA(1) >= ARRAY_NAME && LA(1) <= CHAR_ESC)) && (_tokenSet_15.member(LA(2))) && (_tokenSet_15.member(LA(3)))) { val_nonl(); match(NL); } else { throw new NoViableAltException(LT(1), getFilename()); } }}}}} } catch (RecognitionException ex) { if (inputState.guessing==0) { reportError(ex); consume(); consumeUntil(_tokenSet_9); } else { throw ex; } } } | 48756 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48756/588fa46a989be704f3cfb7e6dd6997282136a5e7/PerlParserSimple.java/buggy/org.epic.debug/src/org/epic/debug/varparser/PerlParserSimple.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
460,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
1345,
225,
272,
273,
446,
31,
202,
202,
1345,
225,
290,
273,
446,
31,
202,
202,
1345,
225,
312,
273,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
460,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
1345,
225,
272,
273,
446,
31,
202,
202,
1345,
225,
290,
273,
446,
31,
202,
202,
1345,
225,
312,
273,
44... |
sbuf.append(" text-align: right; "); | sbuf.append("text-align: right; "); | public void addCss(StringBuffer sbuf) { sbuf.append("<STYLE type=\"text/css\">"); sbuf.append(" table { "); sbuf.append(" margin-left: 2em; "); sbuf.append(" margin-right: 2em; "); sbuf.append(" border-left: 2px solid #AAA; "); sbuf.append("}"); sbuf.append(LINE_SEP); sbuf.append("TR.even { "); sbuf.append(" background: #FFFFFF; "); sbuf.append("}"); sbuf.append(LINE_SEP); sbuf.append("TR.odd { "); sbuf.append(" background: #EAEAEA; "); sbuf.append("}"); sbuf.append(LINE_SEP); sbuf.append("TD { "); sbuf.append(" padding-right: 1ex; "); sbuf.append(" padding-left: 1ex; "); sbuf.append(" border-right: 2px solid #AAA;"); sbuf.append("}"); sbuf.append(LINE_SEP); sbuf.append("TD.Time, TD.Date { "); sbuf.append(" text-align: right; "); sbuf.append(" font-family: courier, monospace; "); sbuf.append(" font-size: smaller; "); sbuf.append("}"); sbuf.append(LINE_SEP); sbuf .append("TD.RemoteHost, TD.RequestProtocol, TD.RequestHeader, TD.RequestURL, TD.RemoteUser, TD.RequestURI, TD.ServerName {"); sbuf.append(" text-align: left; "); sbuf.append("}"); sbuf.append(LINE_SEP); sbuf .append("TD.RequestAttribute, TD.RequestCookie, TD.ResponseHeader, TD.RequestParameter {"); sbuf.append(" text-align: left; "); sbuf.append("}"); sbuf.append(LINE_SEP); sbuf .append("TD.RemoteIPAddress, TD.LocalIPAddress, TD.ContentLength, TD.StatusCode, TD.LocalPort {"); sbuf.append(" text-align: right; "); sbuf.append("}"); sbuf.append(LINE_SEP); sbuf.append("TR.header { "); sbuf.append(" background: #596ED5; "); sbuf.append(" color: #FFF; "); sbuf.append(" font-weight: bold; "); sbuf.append(" font-size: larger; "); sbuf.append("}"); sbuf.append(LINE_SEP); sbuf.append(" }"); sbuf.append("}"); } | 51675 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51675/72de6f8151b7528215bcfe228f8ae4bd010d1715/DefaultCssBuilder.java/buggy/logback-access/src/main/java/ch/qos/logback/access/html/DefaultCssBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
527,
7359,
12,
780,
1892,
2393,
696,
13,
288,
565,
2393,
696,
18,
6923,
2932,
32,
15066,
225,
618,
5189,
955,
19,
5212,
21121,
1769,
565,
2393,
696,
18,
6923,
2932,
565,
1014... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
527,
7359,
12,
780,
1892,
2393,
696,
13,
288,
565,
2393,
696,
18,
6923,
2932,
32,
15066,
225,
618,
5189,
955,
19,
5212,
21121,
1769,
565,
2393,
696,
18,
6923,
2932,
565,
1014... |
AST __t1868 = _t; AST tmp1588_AST_in = (AST)_t; | AST __t1872 = _t; AST tmp1592_AST_in = (AST)_t; | public final void recordphrase(AST _t) throws RecognitionException { AST recordphrase_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1863 = _t; AST tmp1583_AST_in = (AST)_t; match(_t,RECORD_NAME); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case EXCEPT: case FIELDS: { record_fields(_t); _t = _retTree; break; } case 3: case LEXDATE: case NUMBER: case QSTRING: case BIGENDIAN: case EXCLUSIVELOCK: case FALSE_KW: case FINDCASESENSITIVE: case FINDGLOBAL: case FINDNEXTOCCURRENCE: case FINDPREVOCCURRENCE: case FINDSELECT: case FINDWRAPAROUND: case HOSTBYTEORDER: case LEFT: case LITTLEENDIAN: case NO: case NOERROR_KW: case NOLOCK: case NOPREFETCH: case NOWAIT: case NULL_KW: case OF: case OUTERJOIN: case READAVAILABLE: case READEXACTNUM: case SEARCHSELF: case SEARCHTARGET: case SHARELOCK: case TODAY: case TRUE_KW: case USEINDEX: case USING: case WHERE: case WINDOWDELAYEDMINIMIZE: case WINDOWMAXIMIZED: case WINDOWMINIMIZED: case WINDOWNORMAL: case YES: case UNKNOWNVALUE: case FUNCTIONCALLTYPE: case GETATTRCALLTYPE: case PROCEDURECALLTYPE: case SAXCOMPLETE: case SAXPARSERERROR: case SAXRUNNING: case SAXUNINITIALIZED: case SETATTRCALLTYPE: case ROWUNMODIFIED: case ROWDELETED: case ROWMODIFIED: case ROWCREATED: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; if ((_t.getType()==TODAY)) { AST tmp1584_AST_in = (AST)_t; match(_t,TODAY); _t = _t.getNextSibling(); } else if ((_tokenSet_27.member(_t.getType()))) { constant(_t); _t = _retTree; } else if ((_tokenSet_28.member(_t.getType()))) { } else { throw new NoViableAltException(_t); } } { _loop1875: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LEFT: { AST __t1867 = _t; AST tmp1585_AST_in = (AST)_t; match(_t,LEFT); _t = _t.getFirstChild(); AST tmp1586_AST_in = (AST)_t; match(_t,OUTERJOIN); _t = _t.getNextSibling(); _t = __t1867; _t = _t.getNextSibling(); break; } case OUTERJOIN: { AST tmp1587_AST_in = (AST)_t; match(_t,OUTERJOIN); _t = _t.getNextSibling(); break; } case OF: { AST __t1868 = _t; AST tmp1588_AST_in = (AST)_t; match(_t,OF); _t = _t.getFirstChild(); AST tmp1589_AST_in = (AST)_t; match(_t,RECORD_NAME); _t = _t.getNextSibling(); _t = __t1868; _t = _t.getNextSibling(); break; } case WHERE: { AST __t1869 = _t; AST tmp1590_AST_in = (AST)_t; match(_t,WHERE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; if ((_tokenSet_4.member(_t.getType()))) { expression(_t); _t = _retTree; } else if ((_t.getType()==3)) { } else { throw new NoViableAltException(_t); } } _t = __t1869; _t = _t.getNextSibling(); break; } case USEINDEX: { AST __t1871 = _t; AST tmp1591_AST_in = (AST)_t; match(_t,USEINDEX); _t = _t.getFirstChild(); AST tmp1592_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); _t = __t1871; _t = _t.getNextSibling(); break; } case USING: { AST __t1872 = _t; AST tmp1593_AST_in = (AST)_t; match(_t,USING); _t = _t.getFirstChild(); field(_t); _t = _retTree; { _loop1874: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==AND)) { AST tmp1594_AST_in = (AST)_t; match(_t,AND); _t = _t.getNextSibling(); field(_t); _t = _retTree; } else { break _loop1874; } } while (true); } _t = __t1872; _t = _t.getNextSibling(); break; } case EXCLUSIVELOCK: case NOLOCK: case SHARELOCK: { lockhow(_t); _t = _retTree; break; } case NOWAIT: { AST tmp1595_AST_in = (AST)_t; match(_t,NOWAIT); _t = _t.getNextSibling(); break; } case NOPREFETCH: { AST tmp1596_AST_in = (AST)_t; match(_t,NOPREFETCH); _t = _t.getNextSibling(); break; } case NOERROR_KW: { AST tmp1597_AST_in = (AST)_t; match(_t,NOERROR_KW); _t = _t.getNextSibling(); break; } default: { break _loop1875; } } } while (true); } _t = __t1863; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/JPTreeParser.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparserbase/JPTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1409,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1409,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1409,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1409,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053... |
return filter(); | Filter result = filter(); return result; | public Filter parse(String s) throws ParseException { tokens = new StringTokenizer(s, SEPS, true); return filter(); } | 7981 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7981/134a2394c7ea0c569d600c254dc860c6553381a1/SearchStringParser.java/buggy/core/src/org/cougaar/core/naming/SearchStringParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4008,
1109,
12,
780,
272,
13,
1216,
10616,
288,
3639,
2430,
273,
394,
16370,
12,
87,
16,
3174,
5857,
16,
638,
1769,
3639,
4008,
563,
273,
1034,
5621,
327,
563,
31,
565,
289,
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,
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,
4008,
1109,
12,
780,
272,
13,
1216,
10616,
288,
3639,
2430,
273,
394,
16370,
12,
87,
16,
3174,
5857,
16,
638,
1769,
3639,
4008,
563,
273,
1034,
5621,
327,
563,
31,
565,
289,
2,
... |
} | } /* ===== SWITCH OFF THE SILLY AUTHENTICATION =========================================== | public Right initialize(String dbID, String user, String password) throws DBLayerException { Configuration cfg; int result = 0; // File containing Hibernate configuration configFile = new File("hibernate.cfg.xml"); // Load Hibernate configuration try { cfg = new Configuration().configure(configFile); } catch (HibernateException e) { logger.fatal("Cannot load Hibernate configuration. Details: "+e.getMessage()); throw new DBLayerException("Cannot load Hibernate configuration. Details: "+e.getMessage()); } // TODO: this should be loaded from a configuration file on the server // We are temporarily using this for DB authetication and user athentication as well cfg.setProperty("hibernate.connection.url", dbID); cfg.setProperty("hibernate.connection.username", user); cfg.setProperty("hibernate.connection.password", password); try { // Build session factory sessionFactory = cfg.buildSessionFactory(); } catch (HibernateException e) { logger.fatal("Cannot build Hibernate session factory. Details: "+e.getMessage()); throw new DBLayerException("Cannot build Hibernate session factory. Details: "+e.getMessage()); } // Authenticate user try { SelectQuery sq = this.createQuery(User.class); sq.addRestriction(PlantloreConstants.RESTR_EQ, User.LOGIN, null, user, null); result = this.executeQuery(sq); } catch (RemoteException e) { logger.fatal("Cannot load user information. Details: "+e.getMessage()); } Object[] userinfo = next(result); if (userinfo == null) { // Authentication failed, close DB connection sessionFactory.close(); sessionFactory = null; logger.warn("Authentication of user "+user+" failed!"); return null; } else { User clientUser = (User)userinfo[0]; this.rights = clientUser.getRight(); this.plantloreUser = clientUser; } return rights; } | 57211 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57211/6257494be8751cabcb0b6d3c36d003800ea234e2/HibernateDBLayer.java/clean/trunk/src/net/sf/plantlore/server/HibernateDBLayer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
13009,
4046,
12,
780,
1319,
734,
16,
514,
729,
16,
514,
2201,
13,
1216,
2383,
4576,
503,
288,
3639,
4659,
2776,
31,
3639,
509,
563,
273,
374,
31,
7734,
368,
1387,
4191,
670,
24360... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13009,
4046,
12,
780,
1319,
734,
16,
514,
729,
16,
514,
2201,
13,
1216,
2383,
4576,
503,
288,
3639,
4659,
2776,
31,
3639,
509,
563,
273,
374,
31,
7734,
368,
1387,
4191,
670,
24360... |
setType(((Integer)newValue).intValue()); | setType(((Integer) newValue).intValue()); | public void eSet(EStructuralFeature eFeature, Object newValue) { switch (eDerivedStructuralFeatureID(eFeature)) { case AttributePackage.IMAGE__TYPE: setType(((Integer)newValue).intValue()); return; case AttributePackage.IMAGE__URL: setURL((String)newValue); return; } eDynamicSet(eFeature, newValue); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/ImageImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/ImageImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
20199,
12,
41,
14372,
4595,
425,
4595,
16,
1033,
6129,
13,
565,
288,
3639,
1620,
261,
73,
21007,
14372,
4595,
734,
12,
73,
4595,
3719,
3639,
288,
5411,
648,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
20199,
12,
41,
14372,
4595,
425,
4595,
16,
1033,
6129,
13,
565,
288,
3639,
1620,
261,
73,
21007,
14372,
4595,
734,
12,
73,
4595,
3719,
3639,
288,
5411,
648,
3601,
2261,
18,
1... |
protected AlternativeGenerator(JavaGenerationParameters params, Type type, Alternative alt) { super(params); this.type = type; this.alt = alt; this.className = buildClassName(alt.getId()); this.superClassName = TypeGenerator.qualifiedClassName(params, type); } | protected AlternativeGenerator( JavaGenerationParameters params, Type type, Alternative alt) { super(params); this.type = type; this.alt = alt; this.className = buildClassName(alt.getId()); this.superClassName = TypeGenerator.qualifiedClassName(params, type); } | protected AlternativeGenerator(JavaGenerationParameters params, Type type, Alternative alt) { super(params); this.type = type; this.alt = alt; this.className = buildClassName(alt.getId()); this.superClassName = TypeGenerator.qualifiedClassName(params, type); } | 3664 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3664/76875cdfe2af0d6de4ab58a245cce8bd703a86ab/AlternativeGenerator.java/buggy/apigen/apigen/gen/java/AlternativeGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
21498,
1535,
3908,
12,
5852,
13842,
2402,
859,
16,
1412,
618,
16,
21498,
1535,
3770,
13,
288,
202,
202,
9565,
12,
2010,
1769,
202,
202,
2211,
18,
723,
273,
618,
31,
202,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
21498,
1535,
3908,
12,
5852,
13842,
2402,
859,
16,
1412,
618,
16,
21498,
1535,
3770,
13,
288,
202,
202,
9565,
12,
2010,
1769,
202,
202,
2211,
18,
723,
273,
618,
31,
202,
202,... |
if (frags.hasNext()) { TextFragmentBox box = (TextFragmentBox)frags.next(); assertTrue("Failed on: " + string1 + string2 + " Found extra fragment: -" + string1.substring(box.offset, box.offset + box.length) + "-\n", false); } | protected void doTest2(String string1, String string2, String widthString, String[] answers) { int width = -1; if (widthString != null) width = FigureUtilities.getStringExtents(widthString, TAHOMA).width; figure.setSize(width, 1000); textFlow.setText(string1); textFlow2.setText(string2); figure.validate(); ArrayList list = new ArrayList(textFlow.getFragments()); list.addAll(textFlow2.getFragments()); Iterator frags = list.iterator(); int index = 0; TextFragmentBox previousFrag = null; for (; index < answers.length; index++) { String answer = answers[index]; if (answer == TERMINATE) { if (frags.hasNext()) { TextFragmentBox box = (TextFragmentBox)frags.next(); assertTrue("Failed on: " + string1 + string2 + " Found extra fragment: -" + string1.substring(box.offset, box.offset + box.length) + "-\n", false); } return; } else if (answer == TRUNCATED) { assertTrue("Failed on: " + string1 + string2 + "Fragment is not truncated\n", callBooleanMethod(previousFrag, "isTruncated")); continue; } else if (answer == NON_TRUNCATED) { assertFalse("Failed on: " + string1 + string2 + "Fragment is truncated\n", callBooleanMethod(previousFrag, "isTruncated")); continue; } if (!frags.hasNext()) break; TextFragmentBox frag = (TextFragmentBox) frags.next(); if (answer == SAMELINE) { assertTrue("Failed on: " + string1 + string2 + " Fragments are not on the same line\n", previousFrag.getBaseline() == frag.getBaseline()); index++; answer = answers[index]; } else if (answer == NEWLINE) { assertTrue("Failed on: " + string1 + string2 + " Fragments are on the same line\n", previousFrag.getBaseline() != frag.getBaseline()); index++; answer = answers[index]; } previousFrag = frag; if (textFlow.getFragments().contains(frag)) { assertEquals("Failed on: \"" + string1 +"\" + \"" + string2 + "\" Fragment expected: \"" + answer + "\" Got: \"" + string1.substring(frag.offset, frag.offset + frag.length) + "\"\n", answer, string1.substring(frag.offset, frag.offset + frag.length)); return; } else { assertEquals("Failed on: \"" + string1 +"\" + \"" + string2 + "\" Fragment expected: \"" + answer + "\" Got: \"" + string2.substring(frag.offset, frag.offset + frag.length) + "\"\n", answer, string2.substring(frag.offset, frag.offset + frag.length)); return; } } assertFalse("Failed on: \"" + string1 +"\" + \"" + string2 + "\" Fragment expected: -" + answers[index] + "- No corresponding fragment\n", index < answers.length);} | 11225 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11225/12b5906f84354f4dabb83492a1a841dab42c2021/TextFlowWrapTest.java/buggy/org.eclipse.draw2d.test/src/org/eclipse/draw2d/test/TextFlowWrapTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
741,
4709,
22,
12,
780,
533,
21,
16,
514,
533,
22,
16,
514,
1835,
780,
16,
514,
8526,
12415,
13,
288,
202,
474,
1835,
273,
300,
21,
31,
202,
430,
261,
2819,
780,
480,
446,
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,
4750,
918,
741,
4709,
22,
12,
780,
533,
21,
16,
514,
533,
22,
16,
514,
1835,
780,
16,
514,
8526,
12415,
13,
288,
202,
474,
1835,
273,
300,
21,
31,
202,
430,
261,
2819,
780,
480,
446,
13,... | |
} } else { IStatus status = Preferences.validatePreferenceVersions(path); if (status.getSeverity() == IStatus.ERROR) { ErrorDialog.openError( getShell(), WorkbenchMessages.getString("WorkbenchPreferenceDialog.loadErrorTitle"), WorkbenchMessages.format("WorkbenchPreferenceDialog.verifyErrorMessage", new Object[]{selectedFilePath}), status); return false; } else if (status.getSeverity() == IStatus.WARNING) { int result = PreferenceErrorDialog.openError( getShell(), WorkbenchMessages.getString("WorkbenchPreferenceDialog.loadErrorTitle"), WorkbenchMessages.format("WorkbenchPreferenceDialog.verifyWarningMessage", new Object[]{selectedFilePath}), status); if (result != Window.OK) { return false; } } try { Preferences.importPreferences(path); } catch (CoreException e) { ErrorDialog.openError( getShell(), WorkbenchMessages.getString("WorkbenchPreferenceDialog.loadErrorTitle"), WorkbenchMessages.format("WorkbenchPreferenceDialog.loadErrorMessage", new Object[]{selectedFilePath}), e.getStatus()); return false; } | public boolean performFinish() { // Save all the pages and give them a chance to abort Iterator nodes = parent.getPreferenceManager().getElements(PreferenceManager.PRE_ORDER).iterator(); while (nodes.hasNext()) { IPreferenceNode node = (IPreferenceNode) nodes.next(); IPreferencePage page = node.getPage(); if (page != null) { if(!page.performOk()) return false; } } String selectedFilePath = fileSelectionPage.getPath(); File selectedFile = new File(selectedFilePath); long lastModified = selectedFile.lastModified(); // Save or load -- depending on the phase of moon. try { IPath path = new Path(selectedFilePath); if (export) { PreferenceExporter.exportPreferences(path); } else { PreferenceExporter.importPreferences(path); } Preferences.exportPreferences(new Path(selectedFilePath)); } catch (CoreException e) { ErrorDialog.openError( getShell(), WorkbenchMessages.getString("WorkbenchPreferenceDialog.saveErrorTitle"), //$NON-NLS-1$ WorkbenchMessages.format("WorkbenchPreferenceDialog.saveErrorMessage", new Object[]{selectedFilePath}), //$NON-NLS-1$ e.getStatus()); return false; } // See if we actually created a file (there where preferences to export) if (!export) { MessageDialog.openInformation( getShell(), WorkbenchMessages.getString("WorkbenchPreferenceDialog.loadTitle"), //$NON-NLS-1$ WorkbenchMessages.format("WorkbenchPreferenceDialog.loadMessage", new Object[]{selectedFilePath})); //$NON-NLS-1$ } else if ((selectedFile.exists() && (selectedFile.lastModified() != lastModified))) { MessageDialog.openInformation( getShell(), WorkbenchMessages.getString("WorkbenchPreferenceDialog.saveTitle"), //$NON-NLS-1$ WorkbenchMessages.format("WorkbenchPreferenceDialog.saveMessage", new Object[]{selectedFilePath})); //$NON-NLS-1$ } else { MessageDialog.openError( getShell(), WorkbenchMessages.getString("WorkbenchPreferenceDialog.saveErrorTitle"), //$NON-NLS-1$ WorkbenchMessages.getString("WorkbenchPreferenceDialog.noPreferencesMessage")); //$NON-NLS-1$ } // We have been successful! WorkbenchPlugin.getDefault().getDialogSettings().put(WorkbenchPreferenceDialog.FILE_PATH_SETTING, fileSelectionPage.getPath()); return true; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/3c63964b69c8784aa8b834145ebb9177bab4d07e/PreferenceImportExportWizard.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PreferenceImportExportWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
97,
225,
289,
469,
288,
467,
1482,
1267,
273,
28310,
18,
5662,
9624,
5940,
12,
803,
1769,
309,
261,
2327,
18,
588,
21630,
1435,
422,
467,
1482,
18,
3589,
13,
288,
225,
1068,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
97,
225,
289,
469,
288,
467,
1482,
1267,
273,
28310,
18,
5662,
9624,
5940,
12,
803,
1769,
309,
261,
2327,
18,
588,
21630,
1435,
422,
467,
1482,
18,
3589,
13,
288,
225,
1068,
... | |
Logger.trace("Player::create","D","Finally player is :"+player); | logger.debug("Finally player is :"+player); | public static Player create(RPObject object) { // Port from 0.03 to 0.10 if(!object.has("base_hp")) { object.put("base_hp","100"); object.put("hp","100"); } // Port from 0.13 to 0.20 if(!object.has("outfit")) { object.put("outfit",0); } // Port from 0.20 to 0.30 if(!object.hasSlot("rhand")) { object.addSlot(new RPSlot("rhand")); } if(!object.hasSlot("lhand")) { object.addSlot(new RPSlot("lhand")); } if(!object.hasSlot("armor")) { object.addSlot(new RPSlot("armor")); } if(!object.hasSlot("bag")) { object.addSlot(new RPSlot("bag")); } // Port from 0.30 to 0.35 if(!object.hasSlot("!buddy")) { object.addSlot(new RPSlot("!buddy")); } if(!object.has("atk_xp")) { object.put("atk_xp","0"); object.put("def_xp","0"); } if(object.has("devel")) { object.remove("devel"); } Player player=new Player(object); player.stop(); player.stopAttack(); boolean firstVisit=false; try { if(!object.has("zoneid")|| !object.has("x") || !object.has("y") || object.has("reset")) { firstVisit=true; } if(firstVisit) { player.put("zoneid","city"); } world.add(player); } catch(Exception e) // If placing the player at its last position fails we reset it to city entry point { Logger.thrown("Player::create","X",e); firstVisit=true; player.put("zoneid","city"); world.add(player); } StendhalRPAction.transferContent(player); StendhalRPZone zone=(StendhalRPZone)world.getRPZone(player.getID()); if(firstVisit) { zone.placeObjectAtEntryPoint(player); } int x=player.getx(); int y=player.gety(); StendhalRPAction.placeat(zone,player,x,y); try { if(player.hasSheep()) { Logger.trace("Player::create","D","Player has a sheep"); Sheep sheep=player.retrieveSheep(); sheep.put("zoneid",object.get("zoneid")); if(!sheep.has("base_hp")) { sheep.put("base_hp","10"); sheep.put("hp","10"); } world.add(sheep); x=sheep.getx(); y=sheep.gety(); StendhalRPAction.placeat(zone,sheep,x,y); player.setSheep(sheep); } } catch(Exception e) /** No idea how but some players get a sheep but they don't have it really. Me thinks that it is a player that has been running for a while the game and was kicked of server because shutdown on a pre 1.00 version of Marauroa. We shouldn't see this anymore. */ { Logger.thrown("Player::create","X",e); if(player.has("sheep")) { player.remove("sheep"); } if(player.hasSlot("#flock")) { player.removeSlot("#flock"); } } String[] slots={"rhand","lhand","armor"}; for(String slotName: slots) { try { RPSlot slot=player.getSlot(slotName); if(slot.size()!=0) { RPObject item=slot.iterator().next(); slot.clear(); if(item.get("type").equals("item")) // We simply ignore corpses... { Item entity=Item.create(item.get("class")); entity.put("#db_id",item.get("#db_id")); entity.setID(item.getID()); slot.add(entity); } } } catch(Exception e) { Logger.thrown("Player::create","X",e); RPSlot slot=player.getSlot(slotName); slot.clear(); } } if(player.getSlot("!buddy").size()>0) { RPObject buddies=player.getSlot("!buddy").iterator().next(); for(String name: buddies) { if(name.startsWith("_")) { buddies.put(name,"0"); } } for(Player buddy: rp.getPlayers()) { if(buddies.has("_"+buddy.getName())) { buddies.put(buddy.getName(),"1"); } } } player.setPrivateText("This release is EXPERIMENTAL. We are trying new RP system. Please report problems, suggestions and bugs."); Logger.trace("Player::create","D","Finally player is :"+player); return player; } | 4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/5032255cbc6322ed19134d0417d2ef3bbb056e19/Player.java/clean/src/games/stendhal/server/entity/Player.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
19185,
752,
12,
54,
52,
921,
733,
13,
565,
288,
565,
368,
6008,
628,
374,
18,
4630,
358,
374,
18,
2163,
565,
309,
12,
5,
1612,
18,
5332,
2932,
1969,
67,
15373,
6,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
19185,
752,
12,
54,
52,
921,
733,
13,
565,
288,
565,
368,
6008,
628,
374,
18,
4630,
358,
374,
18,
2163,
565,
309,
12,
5,
1612,
18,
5332,
2932,
1969,
67,
15373,
6,
3719,
1... |
if (message != null) | if (message != null && ! message.equals("")) | static String format(String message, Object expected, Object actual) { String formatted= ""; if (message != null) formatted= message + " "; return formatted + "expected:<" + expected + "> but was:<" + actual + ">"; } | 46243 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46243/b0c0b79ae5e0dcfc1670cf950d31a14f1c9c630c/Assert.java/clean/org/junit/Assert.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3845,
514,
740,
12,
780,
883,
16,
1033,
2665,
16,
1033,
3214,
13,
288,
202,
202,
780,
4955,
33,
1408,
31,
202,
202,
430,
261,
2150,
480,
446,
13,
1082,
202,
14897,
33,
883,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3845,
514,
740,
12,
780,
883,
16,
1033,
2665,
16,
1033,
3214,
13,
288,
202,
202,
780,
4955,
33,
1408,
31,
202,
202,
430,
261,
2150,
480,
446,
13,
1082,
202,
14897,
33,
883,
397,
... |
while (nidx < data.epsFile.length && ((data.epsFile[nidx] >= 48 && data.epsFile[nidx] <= 57) || (data.epsFile[nidx] == 45) || (data.epsFile[nidx] == 46) )) { | while (nidx < data.epsFile.length && ((data.epsFile[nidx] >= 48 && data.epsFile[nidx] <= 57) || (data.epsFile[nidx] == 45) || (data.epsFile[nidx] == 46))) { | private int readLongString(EPSImage.EPSData data, long[] mbbox, int i, int idx) { while (idx < data.epsFile.length && (data.epsFile[idx] == 32)) { idx++; } int nidx = idx; // check also for ANSI46(".") to identify floating point values while (nidx < data.epsFile.length && ((data.epsFile[nidx] >= 48 && data.epsFile[nidx] <= 57) || (data.epsFile[nidx] == 45) || (data.epsFile[nidx] == 46) )) { nidx++; } byte[] num = new byte[nidx - idx]; System.arraycopy(data.epsFile, idx, num, 0, nidx - idx); String ns = new String(num); //if( ns.indexOf(".") != -1 ) { // do something like logging a warning //} // then parse the double and round off to the next math. Integer mbbox[i] = (long) Math.ceil( Double.parseDouble( ns ) ); return (1 + nidx - idx); } | 5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/4e5fe60cb9134363e50dbd8da5c5e82e3c6e9afc/EPSReader.java/clean/src/org/apache/fop/image/analyser/EPSReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
26567,
780,
12,
41,
5857,
2040,
18,
41,
5857,
751,
501,
16,
1525,
8526,
4903,
2147,
16,
509,
277,
16,
509,
2067,
13,
288,
3639,
1323,
261,
3465,
411,
501,
18,
13058,
812,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
26567,
780,
12,
41,
5857,
2040,
18,
41,
5857,
751,
501,
16,
1525,
8526,
4903,
2147,
16,
509,
277,
16,
509,
2067,
13,
288,
3639,
1323,
261,
3465,
411,
501,
18,
13058,
812,
1... |
setElem(result, slot - lbegin, temp); | setElem(result, slot - begin, temp); | private Scriptable jsFunction_slice(Context cx, Scriptable thisObj, Object[] args) { Scriptable scope = getTopLevelScope(this); Scriptable result = ScriptRuntime.newObject(cx, scope, "Array", null); double length = getLengthProperty(thisObj); double begin = 0; double end = length; if (args.length > 0) { begin = ScriptRuntime.toInteger(args[0]); if (begin < 0) { begin += length; if (begin < 0) begin = 0; } else if (begin > length) { begin = length; } if (args.length > 1) { end = ScriptRuntime.toInteger(args[1]); if (end < 0) { end += length; if (end < 0) end = 0; } else if (end > length) { end = length; } } } long lbegin = (long)begin; long lend = (long)end; for (long slot = lbegin; slot < lend; slot++) { Object temp = getElem(thisObj, slot); setElem(result, slot - lbegin, temp); } return result; } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/5f6a565762eea9efee2aee1297e0f938ac7edf63/NativeArray.java/buggy/js/rhino/src/org/mozilla/javascript/NativeArray.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
22780,
3828,
2083,
67,
6665,
12,
1042,
9494,
16,
22780,
15261,
16,
4766,
3639,
1033,
8526,
833,
13,
565,
288,
3639,
22780,
2146,
273,
13729,
2355,
3876,
12,
2211,
1769,
3639,
22780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22780,
3828,
2083,
67,
6665,
12,
1042,
9494,
16,
22780,
15261,
16,
4766,
3639,
1033,
8526,
833,
13,
565,
288,
3639,
22780,
2146,
273,
13729,
2355,
3876,
12,
2211,
1769,
3639,
22780,
... |
result = imports.removeElement(className); | result = _imports.removeElement(className); | public boolean removeImport(String className) { boolean result = false; if (className == null) return result; if (className.length() == 0) return result; result = imports.removeElement(className); return result; } //-- removeImport | 57307 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57307/639ed93115321ad51c2450f306c4d50d146ede46/JStructure.java/buggy/src/main/java/org/exolab/javasource/JStructure.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1206,
5010,
12,
780,
2658,
13,
288,
3639,
1250,
563,
273,
629,
31,
3639,
309,
261,
12434,
422,
446,
13,
327,
563,
31,
3639,
309,
261,
12434,
18,
2469,
1435,
422,
374,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1206,
5010,
12,
780,
2658,
13,
288,
3639,
1250,
563,
273,
629,
31,
3639,
309,
261,
12434,
422,
446,
13,
327,
563,
31,
3639,
309,
261,
12434,
18,
2469,
1435,
422,
374,
13,
... |
if (osgi == null) throw new IllegalStateException("OSGi framework could not be started"); | public static Object run(String[] args,Runnable endSplashHandler) throws Exception { processCommandLine(args); setInstanceLocation(); setConfigurationLocation(); loadConfigurationInfo(); loadDefaultProperties(); adaptor = createAdaptor(); OSGi osgi = new OSGi(adaptor); if (osgi == null) throw new IllegalStateException("OSGi framework could not be started"); osgi.launch(); try { String console = System.getProperty(PROP_CONSOLE); if (console != null) startConsole(osgi, new String[0], console); context = osgi.getBundleContext(); publishSplashScreen(endSplashHandler); if (loadBundles() != null) { //if the installation of the basic did not fail setStartLevel(6); initializeApplicationTracker(); Runnable application = (Runnable)applicationTracker.getService(); applicationTracker.close(); checkUnresolvedBundles(context.getBundles()); if (application == null) throw new IllegalStateException("Unable to acquire application service"); application.run(); } } finally { stopSystemBundle(); } // TODO for now, if an exception is not thrown from this method, we have to do // the System.exit. In the future we will update startup.jar to do the System.exit all // the time. String exitCode = System.getProperty(PROP_EXITCODE); if (exitCode == null) System.exit(0); try { System.exit(Integer.parseInt(exitCode)); } catch (NumberFormatException e) { System.exit(13); } return null; } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/59da9b430a125a2ba51fe82173724396c4e0ef6e/EclipseStarter.java/buggy/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1033,
1086,
12,
780,
8526,
833,
16,
20013,
679,
16881,
961,
1503,
13,
1216,
1185,
288,
202,
202,
2567,
21391,
12,
1968,
1769,
202,
202,
542,
1442,
2735,
5621,
202,
202,
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,
225,
202,
482,
760,
1033,
1086,
12,
780,
8526,
833,
16,
20013,
679,
16881,
961,
1503,
13,
1216,
1185,
288,
202,
202,
2567,
21391,
12,
1968,
1769,
202,
202,
542,
1442,
2735,
5621,
202,
202,
5... | |
(PsiExpression[]) conditions.toArray(new PsiExpression[numConditions]); | conditions.toArray(new PsiExpression[numConditions]); | public void visitIfStatement(PsiIfStatement statement){ super.visitIfStatement(statement); final PsiElement parent = statement.getParent(); if(parent instanceof PsiIfStatement){ final PsiIfStatement parentStatement = (PsiIfStatement) parent; final PsiStatement elseBranch = parentStatement.getElseBranch(); if(statement.equals(elseBranch)){ return; } } final Set conditions = new HashSet(); collectConditionsForIfStatement(statement, conditions); final int numConditions = conditions.size(); if(numConditions < 2){ return; } final PsiExpression[] conditionArray = (PsiExpression[]) conditions.toArray(new PsiExpression[numConditions]); final boolean[] matched = new boolean[conditionArray.length]; Arrays.fill(matched, false); for(int i = 0; i < conditionArray.length; i++){ if(matched[i]){ continue; } final PsiExpression condition = conditionArray[i]; for(int j = i+1; j < conditionArray.length; j++){ if(matched[j]){ continue; } final PsiExpression testCondition = conditionArray[j]; final boolean areEquivalent = EquivalenceChecker.expressionsAreEquivalent(condition, testCondition); if(areEquivalent){ registerError(testCondition); if(!matched[i]){ registerError(condition); } matched[i] = true; matched[j] = true; } } } } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/2d46d291193579a7564649b4881c7ea8e02eda5b/DuplicateConditionInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/bugs/DuplicateConditionInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
2047,
3406,
12,
52,
7722,
2047,
3406,
3021,
15329,
5411,
2240,
18,
11658,
2047,
3406,
12,
11516,
1769,
5411,
727,
453,
7722,
1046,
982,
273,
3021,
18,
588,
3054,
5621,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
2047,
3406,
12,
52,
7722,
2047,
3406,
3021,
15329,
5411,
2240,
18,
11658,
2047,
3406,
12,
11516,
1769,
5411,
727,
453,
7722,
1046,
982,
273,
3021,
18,
588,
3054,
5621,
54... |
props.put(new Integer(propType), prop); | props.put(propType, prop); | public void putProp(int propType, Object prop) { if (props == null) props = new Hashtable(2); if (prop == null) props.remove(new Integer(propType)); else props.put(new Integer(propType), prop); } | 13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/f7a0fa338c9770cfddd37fbddd87bffd69e5df22/Node.java/buggy/js/rhino/src/org/mozilla/javascript/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1378,
4658,
12,
474,
2270,
559,
16,
1033,
2270,
13,
288,
3639,
309,
261,
9693,
422,
446,
13,
5411,
3458,
273,
394,
18559,
12,
22,
1769,
3639,
309,
261,
5986,
422,
446,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1378,
4658,
12,
474,
2270,
559,
16,
1033,
2270,
13,
288,
3639,
309,
261,
9693,
422,
446,
13,
5411,
3458,
273,
394,
18559,
12,
22,
1769,
3639,
309,
261,
5986,
422,
446,
13,
... |
ColData data = getColumn(columnIndex); return ((Integer) Support.convert(this, data.getValue(), java.sql.Types.TINYINT, null)).byteValue(); | return ((Integer) Support.convert(this, getColumn(columnIndex), java.sql.Types.TINYINT, null)).byteValue(); | public byte getByte(int columnIndex) throws SQLException { ColData data = getColumn(columnIndex); return ((Integer) Support.convert(this, data.getValue(), java.sql.Types.TINYINT, null)).byteValue(); } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/280391932d64190b4ee42f49e5f8b60382f2fa03/JtdsResultSet.java/buggy/src/main/net/sourceforge/jtds/jdbc/JtdsResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1160,
20999,
12,
474,
14882,
13,
1216,
6483,
288,
3639,
1558,
751,
501,
273,
6716,
12,
2827,
1016,
1769,
3639,
327,
14015,
4522,
13,
13619,
18,
6283,
12,
2211,
16,
501,
18,
24805,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
377,
1071,
1160,
20999,
12,
474,
14882,
13,
1216,
6483,
288,
3639,
1558,
751,
501,
273,
6716,
12,
2827,
1016,
1769,
3639,
327,
14015,
4522,
13,
13619,
18,
6283,
12,
2211,
16,
501,
18,
24805,
... |
strBuf.append('0').append("GMT").append(s.substring(s.length() - 3, s.length())).append(":00"); | do { if (i < 24) sbuf.append(c); c = s.charAt(i++); } while (Character.isDigit(c)); for (int j = i; j < 24; j++) sbuf.append('0'); | public Timestamp getTimestamp(int columnIndex) throws SQLException { String s = getString(columnIndex); if (s == null) return null; boolean subsecond; //if string contains a '.' we have fractional seconds if (s.indexOf('.') == -1) { subsecond = false; } else { subsecond = true; } //here we are modifying the string from ISO format to a format java can understand //java expects timezone info as 'GMT-08:00' instead of '-08' in postgres ISO format //and java expects three digits if fractional seconds are present instead of two for postgres //so this code strips off timezone info and adds on the GMT+/-... //as well as adds a third digit for partial seconds if necessary StringBuffer strBuf = new StringBuffer(s); //we are looking to see if the backend has appended on a timezone. //currently postgresql will return +/-HH:MM or +/-HH for timezone offset //(i.e. -06, or +06:30, note the expectation of the leading zero for the //hours, and the use of the : for delimiter between hours and minutes) //if the backend ISO format changes in the future this code will //need to be changed as well char sub = strBuf.charAt(strBuf.length() - 3); if (sub == '+' || sub == '-') { strBuf.setLength(strBuf.length() - 3); if (subsecond) { strBuf.append('0').append("GMT").append(s.substring(s.length() - 3, s.length())).append(":00"); } else { strBuf.append("GMT").append(s.substring(s.length() - 3, s.length())).append(":00"); } } else if (sub == ':') { //we may have found timezone info of format +/-HH:MM, or there is no //timezone info at all and this is the : preceding the seconds char sub2 = strBuf.charAt(strBuf.length() - 5); if (sub2 == '+' || sub2 == '-') { //we have found timezone info of format +/-HH:MM strBuf.setLength(strBuf.length() - 5); if (subsecond) { strBuf.append('0').append("GMT").append(s.substring(s.length() - 5)); } else { strBuf.append("GMT").append(s.substring(s.length() - 5)); } } else if (subsecond) { strBuf.append('0'); } } else if (subsecond) { strBuf = strBuf.append('0'); } s = strBuf.toString(); SimpleDateFormat df = null; if (s.length() > 23 && subsecond) { df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSzzzzzzzzz"); } else if (s.length() > 23 && !subsecond) { df = new SimpleDateFormat("yyyy-MM-dd HH:mm:sszzzzzzzzz"); } else if (s.length() > 10 && subsecond) { df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); } else if (s.length() > 10 && !subsecond) { df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); } else { df = new SimpleDateFormat("yyyy-MM-dd"); } try { return new Timestamp(df.parse(s).getTime()); } catch (ParseException e) { throw new PSQLException("postgresql.res.badtimestamp", new Integer(e.getErrorOffset()), s); } } | 46563 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46563/3dd85bcb08440bae6210114124aa0002a83c957c/ResultSet.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8159,
11940,
12,
474,
14882,
13,
1216,
6483,
202,
95,
202,
202,
780,
272,
273,
4997,
12,
2827,
1016,
1769,
202,
202,
430,
261,
87,
422,
446,
13,
1082,
202,
2463,
446,
31,
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,
225,
202,
482,
8159,
11940,
12,
474,
14882,
13,
1216,
6483,
202,
95,
202,
202,
780,
272,
273,
4997,
12,
2827,
1016,
1769,
202,
202,
430,
261,
87,
422,
446,
13,
1082,
202,
2463,
446,
31,
20... |
scanner.addDefinition("ONE", "one"); scanner.addDefinition("TWO", "two"); | addDefinition("ONE", "one"); addDefinition("TWO", "two"); | public void testSlightlyComplexIfdefStructure() { try { initializeScanner("#ifndef BASE\n#define BASE 10\n#endif\n#ifndef BASE\n#error BASE is defined\n#endif"); //$NON-NLS-1$ validateEOF(); } catch (Exception e) { fail(EXCEPTION_THROWN + e.toString()); } try { initializeScanner("#ifndef ONE\n#define ONE 1\n#ifdef TWO\n#define THREE ONE + TWO\n#endif\n#endif\nint three(THREE);"); //$NON-NLS-1$ validateToken(IToken.t_int); validateDefinition("ONE", "1"); //$NON-NLS-1$ //$NON-NLS-2$ validateAsUndefined("TWO"); //$NON-NLS-1$ validateAsUndefined("THREE"); //$NON-NLS-1$ validateIdentifier("three"); //$NON-NLS-1$ validateToken(IToken.tLPAREN); validateIdentifier("THREE"); //$NON-NLS-1$ validateToken(IToken.tRPAREN); validateToken(IToken.tSEMI); validateEOF(); initializeScanner("#ifndef ONE\n#define ONE 1\n#ifdef TWO\n#define THREE ONE + TWO\n#endif\n#endif\nint three(THREE);"); //$NON-NLS-1$ scanner.addDefinition("TWO", "2"); //$NON-NLS-1$ //$NON-NLS-2$ validateToken(IToken.t_int); validateDefinition("ONE", "1"); //$NON-NLS-1$ //$NON-NLS-2$ validateDefinition("TWO", "2"); //$NON-NLS-1$ //$NON-NLS-2$ validateDefinition("THREE", "ONE + TWO"); //$NON-NLS-1$ //$NON-NLS-2$ validateIdentifier("three"); //$NON-NLS-1$ validateToken(IToken.tLPAREN); validateInteger("1"); //$NON-NLS-1$ validateToken(IToken.tPLUS); validateInteger("2"); //$NON-NLS-1$ validateToken(IToken.tRPAREN); validateToken(IToken.tSEMI); validateEOF(); initializeScanner("#ifndef FOO\n#define FOO 4\n#else\n#undef FOO\n#define FOO 6\n#endif"); //$NON-NLS-1$ validateEOF(); validateDefinition("FOO", "4"); //$NON-NLS-1$ //$NON-NLS-2$ initializeScanner("#ifndef FOO\n#define FOO 4\n#else\n#undef FOO\n#define FOO 6\n#endif"); //$NON-NLS-1$ scanner.addDefinition("FOO", "2"); //$NON-NLS-1$ //$NON-NLS-2$ validateEOF(); validateDefinition("FOO", "6"); //$NON-NLS-1$ //$NON-NLS-2$ initializeScanner("#ifndef ONE\n# define ONE 1\n# ifndef TWO\n# define TWO ONE + ONE \n# else\n# undef TWO\n# define TWO 2 \n# endif\n#else\n# ifndef TWO\n# define TWO ONE + ONE \n# else\n# undef TWO\n# define TWO 2 \n# endif\n#endif\n"); //$NON-NLS-1$ validateEOF(); validateDefinition("ONE", "1"); //$NON-NLS-1$ //$NON-NLS-2$ validateDefinition("TWO", "ONE + ONE"); //$NON-NLS-1$ //$NON-NLS-2$ initializeScanner( "#ifndef ONE\r\n" + //$NON-NLS-1$ "# define ONE 1\n" + //$NON-NLS-1$ "# ifndef TWO\n" + //$NON-NLS-1$ "# define TWO ONE + ONE \n" + //$NON-NLS-1$ "# else\n" + //$NON-NLS-1$ "# undef TWO\n" + //$NON-NLS-1$ "# define TWO 2 \n" + //$NON-NLS-1$ "# endif\n" + //$NON-NLS-1$ "#else\n" + //$NON-NLS-1$ "# ifndef TWO\n" + //$NON-NLS-1$ "# define TWO ONE + ONE \n" + //$NON-NLS-1$ "# else\n" + //$NON-NLS-1$ "# undef TWO\n" + //$NON-NLS-1$ "# define TWO 2 \n" + //$NON-NLS-1$ "# endif\n" + //$NON-NLS-1$ "#endif\n"); //$NON-NLS-1$" + scanner.addDefinition("ONE", "one"); //$NON-NLS-1$ //$NON-NLS-2$ validateEOF(); validateDefinition("ONE", "one"); //$NON-NLS-1$ //$NON-NLS-2$ validateDefinition("TWO", "ONE + ONE"); //$NON-NLS-1$ //$NON-NLS-2$ initializeScanner("#ifndef ONE\n# define ONE 1\n# ifndef TWO\n# define TWO ONE + ONE \n# else\n# undef TWO\n# define TWO 2 \n# endif\n#else\n# ifndef TWO\n# define TWO ONE + ONE \n# else\n# undef TWO\n# define TWO 2 \n# endif\n#endif\n"); //$NON-NLS-1$ scanner.addDefinition("ONE", "one"); //$NON-NLS-1$ //$NON-NLS-2$ scanner.addDefinition("TWO", "two"); //$NON-NLS-1$ //$NON-NLS-2$ validateEOF(); validateDefinition("ONE", "one"); //$NON-NLS-1$ //$NON-NLS-2$ validateDefinition("TWO", "2"); //$NON-NLS-1$ //$NON-NLS-2$ initializeScanner("#ifndef ONE\n# define ONE 1\n# ifndef TWO\n# define TWO ONE + ONE \n# else\n# undef TWO\n# define TWO 2 \n# endif\n#else\n# ifndef TWO\n# define TWO ONE + ONE \n# else\n# undef TWO\n# define TWO 2 \n# endif\n#endif\n"); //$NON-NLS-1$ scanner.addDefinition("TWO", "two"); //$NON-NLS-1$ //$NON-NLS-2$ validateEOF(); validateDefinition("ONE", "1"); //$NON-NLS-1$ //$NON-NLS-2$ validateDefinition("TWO", "2"); //$NON-NLS-1$ //$NON-NLS-2$ } catch (Exception e) { fail(EXCEPTION_THROWN + e.toString()); } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/9a9ffd59c2ace5ba7e382136e5bf15a8c1305996/Scanner2Test.java/clean/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner2/Scanner2Test.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3738,
750,
715,
12795,
2047,
536,
6999,
1435,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
11160,
11338,
2932,
7,
430,
82,
536,
10250,
64,
82,
7,
11255,
10250,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3738,
750,
715,
12795,
2047,
536,
6999,
1435,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
11160,
11338,
2932,
7,
430,
82,
536,
10250,
64,
82,
7,
11255,
10250,
... |
connector.updateOfflineState(task, newData, false); | TasksUiPlugin.getSynchronizationManager().updateOfflineState(connector, task, newData, false); | public void testSynchronizedToSynchronized() { AbstractRepositoryTask task = primeTaskAndRepository(RepositoryTaskSyncState.SYNCHRONIZED, RepositoryTaskSyncState.SYNCHRONIZED); assertEquals(DATE_STAMP_1, task.getLastModifiedDateStamp()); connector.updateOfflineState(task, newData, false); assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSyncState()); assertEquals(DATE_STAMP_1, task.getLastModifiedDateStamp()); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/72d80f551ca060c2734122d72e119e0cdf881f12/RepositoryTaskSynchronizationTest.java/buggy/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositoryTaskSynchronizationTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
55,
15666,
774,
55,
15666,
1435,
288,
202,
202,
7469,
3305,
2174,
1562,
273,
17014,
2174,
1876,
3305,
12,
3305,
2174,
4047,
1119,
18,
7474,
50,
1792,
19359,
24131,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
55,
15666,
774,
55,
15666,
1435,
288,
202,
202,
7469,
3305,
2174,
1562,
273,
17014,
2174,
1876,
3305,
12,
3305,
2174,
4047,
1119,
18,
7474,
50,
1792,
19359,
24131,
16... |
private Vector singleMatch(MessageContainer mc, String conditions) { | private Vector singleMatch(Mail mc, String conditions) { | private Vector singleMatch(MessageContainer mc, String conditions) { boolean opNot = conditions.startsWith(OP_NOT); if (opNot) { conditions = conditions.substring(1); } String matchClass = "org.apache.james.james.match." + conditions; String param = ""; int sep = conditions.indexOf("="); if (sep != -1) { matchClass = "org.apache.james.james.match." + conditions.substring(0, sep); param = conditions.substring(sep + 1); } Match match = (Match) null; try { match = (Match) comp.getComponent(matchClass); } catch (ComponentNotFoundException cnfe) { try { match = (Match) Class.forName(matchClass).newInstance(); match.setContext(context); match.setComponentManager(comp); comp.put(matchClass, match); } catch (Exception ex) { logger.log("Exception instantiationg match " + matchClass + " : " + ex, "JAMES", logger.ERROR); return (Vector) null; } } if (opNot) return VectorUtils.subtract(mc.getRecipients(), match.match(mc, param)); else return match.match(mc, param); } | 47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/2cc4e7b335a4167a42773c840c2879d082e21c1e/JamesSpoolManager.java/clean/src/org/apache/james/james/JamesSpoolManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
5589,
2202,
2060,
12,
6759,
6108,
16,
514,
4636,
13,
288,
3639,
1250,
1061,
1248,
273,
4636,
18,
17514,
1190,
12,
3665,
67,
4400,
1769,
3639,
309,
261,
556,
1248,
13,
288,
5411,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
5589,
2202,
2060,
12,
6759,
6108,
16,
514,
4636,
13,
288,
3639,
1250,
1061,
1248,
273,
4636,
18,
17514,
1190,
12,
3665,
67,
4400,
1769,
3639,
309,
261,
556,
1248,
13,
288,
5411,
4... |
if (child.getElementType() == JavaDocElementType.DOC_COMMENT) return true; return false; | return child.getElementType() == JavaDocElementType.DOC_COMMENT; | private boolean isPartOfCodeBlock(final ASTNode child) { if (child == null) return false; if (child.getElementType() == ElementType.BLOCK_STATEMENT) return true; if (child.getElementType() == ElementType.CODE_BLOCK) return true; if (FormatterUtil.containsWhiteSpacesOnly(child)) return isPartOfCodeBlock(child.getTreeNext()); if (child.getElementType() == ElementType.END_OF_LINE_COMMENT) return isPartOfCodeBlock(child.getTreeNext()); if (child.getElementType() == JavaDocElementType.DOC_COMMENT) return true; return false; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/616f113625add2f5d8bc8627d9b6531e5272de03/BlockContainingJavaBlock.java/clean/source/com/intellij/psi/formatter/java/BlockContainingJavaBlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
353,
1988,
951,
1085,
1768,
12,
6385,
9183,
907,
1151,
13,
288,
565,
309,
261,
3624,
422,
446,
13,
327,
629,
31,
565,
309,
261,
3624,
18,
588,
17481,
1435,
422,
3010,
559,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
353,
1988,
951,
1085,
1768,
12,
6385,
9183,
907,
1151,
13,
288,
565,
309,
261,
3624,
422,
446,
13,
327,
629,
31,
565,
309,
261,
3624,
18,
588,
17481,
1435,
422,
3010,
559,
... |
deleteMarkers(resource); | if (!isTriggered) deleteMarkers(resource); | public void run(IProgressMonitor monitor) throws CoreException { try { IMarker marker = null; deleteMarkers(resource); for (int i = 0; i < emittedJoinPoints.length; i++) { EmittedJoinPoint jp = emittedJoinPoints[i]; AwLog.logTrace("jp @ " + className + ":" + jp.getLineNumber() + ":" + jp.getCalleeMemberName() + jp.getCalleeMemberDesc() ); // Note: atClass is callee for execution and caller site for call pc // since it is the weaved class. if (jp.getJoinPointType() == JoinPointType.METHOD_EXECUTION_INT) { IMethod atMethod = findMethod(atClass, jp.getCalleeMemberName(), jp.getCalleeMemberDesc()); createMarker(resource, atMethod, jp, loader, jproject); } else if (jp.getJoinPointType() == JoinPointType.CONSTRUCTOR_EXECUTION_INT) { IMethod atCtor = findConstructor(atClass, jp.getCalleeMemberDesc()); createMarker(resource, atCtor, jp, loader, jproject); } else if (jp.getJoinPointType() == JoinPointType.METHOD_CALL_INT || jp.getJoinPointType() == JoinPointType.CONSTRUCTOR_CALL_INT || jp.getJoinPointType() == JoinPointType.FIELD_GET_INT || jp.getJoinPointType() == JoinPointType.FIELD_SET_INT || jp.getJoinPointType() == JoinPointType.HANDLER_INT) { // rely on line number createMarker(resource, jp, loader, jproject); } } } catch (Exception e) { AwLog.logError(e); } } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/ad9e110e05d2c1ad1abf91e328a93bf28f562fa1/WeaverListener.java/clean/eclipse/org.codehaus.aspectwerkz.ide.eclipse.core/src/org/codehaus/aspectwerkz/ide/eclipse/ui/WeaverListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
1086,
12,
45,
5491,
7187,
6438,
13,
2868,
1216,
30015,
288,
1082,
3639,
775,
288,
9506,
3639,
467,
7078,
5373,
273,
446,
31,
9506,
540,
9506,
3639,
1430,
21644,
12,
3146,
1769... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
1086,
12,
45,
5491,
7187,
6438,
13,
2868,
1216,
30015,
288,
1082,
3639,
775,
288,
9506,
3639,
467,
7078,
5373,
273,
446,
31,
9506,
540,
9506,
3639,
1430,
21644,
12,
3146,
1769... |
following.push(FOLLOW_argument_list_in_from_source1735); | following.push(FOLLOW_argument_list_in_from_source1740); | public DeclarativeInvokerDescr from_source() throws RecognitionException { DeclarativeInvokerDescr ds; Token var=null; Token field=null; Token method=null; Token functionName=null; ArrayList args = null; ds = null; try { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:726:17: ( (var= ID '.' field= ID ) | (var= ID '.' method= ID opt_eol '(' opt_eol args= argument_list opt_eol ')' ) | (functionName= ID opt_eol '(' opt_eol args= argument_list opt_eol ')' ) ) int alt46=3; alt46 = dfa46.predict(input); switch (alt46) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:726:17: (var= ID '.' field= ID ) { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:726:17: (var= ID '.' field= ID ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:726:18: var= ID '.' field= ID { var=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_from_source1649); match(input,18,FOLLOW_18_in_from_source1651); field=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_from_source1655); FieldAccessDescr fa = new FieldAccessDescr(var.getText(), field.getText()); fa.setLine(var.getLine()); ds = fa; } } break; case 2 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:736:17: (var= ID '.' method= ID opt_eol '(' opt_eol args= argument_list opt_eol ')' ) { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:736:17: (var= ID '.' method= ID opt_eol '(' opt_eol args= argument_list opt_eol ')' ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:736:18: var= ID '.' method= ID opt_eol '(' opt_eol args= argument_list opt_eol ')' { var=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_from_source1682); match(input,18,FOLLOW_18_in_from_source1684); method=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_from_source1688); following.push(FOLLOW_opt_eol_in_from_source1690); opt_eol(); following.pop(); match(input,23,FOLLOW_23_in_from_source1693); following.push(FOLLOW_opt_eol_in_from_source1695); opt_eol(); following.pop(); following.push(FOLLOW_argument_list_in_from_source1699); args=argument_list(); following.pop(); following.push(FOLLOW_opt_eol_in_from_source1701); opt_eol(); following.pop(); match(input,25,FOLLOW_25_in_from_source1703); MethodAccessDescr mc = new MethodAccessDescr(var.getText(), method.getText()); mc.setArguments(args); mc.setLine(var.getLine()); ds = mc; } } break; case 3 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:745:17: (functionName= ID opt_eol '(' opt_eol args= argument_list opt_eol ')' ) { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:745:17: (functionName= ID opt_eol '(' opt_eol args= argument_list opt_eol ')' ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:745:18: functionName= ID opt_eol '(' opt_eol args= argument_list opt_eol ')' { functionName=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_from_source1725); following.push(FOLLOW_opt_eol_in_from_source1727); opt_eol(); following.pop(); match(input,23,FOLLOW_23_in_from_source1729); following.push(FOLLOW_opt_eol_in_from_source1731); opt_eol(); following.pop(); following.push(FOLLOW_argument_list_in_from_source1735); args=argument_list(); following.pop(); following.push(FOLLOW_opt_eol_in_from_source1737); opt_eol(); following.pop(); match(input,25,FOLLOW_25_in_from_source1739); FunctionCallDescr fc = new FunctionCallDescr(functionName.getText()); fc.setLine(functionName.getLine()); fc.setArguments(args); ds = fc; } } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ds; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/12c8feffd968f958100f654d836fa3c2ee21ded8/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3416,
7901,
1535,
24455,
16198,
628,
67,
3168,
1435,
1216,
9539,
288,
6647,
3416,
7901,
1535,
24455,
16198,
3780,
31,
3639,
3155,
569,
33,
2011,
31,
3639,
3155,
652,
33,
2011,
31,
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,
3416,
7901,
1535,
24455,
16198,
628,
67,
3168,
1435,
1216,
9539,
288,
6647,
3416,
7901,
1535,
24455,
16198,
3780,
31,
3639,
3155,
569,
33,
2011,
31,
3639,
3155,
652,
33,
2011,
31,
3... |
if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; | if (keyboardLocked) { if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; } else { keysBuffered = true; if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } } | public void sendKeys(String text) { if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = ""; } // check to see if position is in a field and if it is then change // current field to that field isInField(lastPos,true); strokenizer.setKeyStrokes(text); String s; boolean done = false; while (strokenizer.hasMoreKeyStrokes() && !done) { s = strokenizer.nextKeyStroke(); if (s.length() == 1) { simulateKeyStroke(s.charAt(0)); } else { if (s != null) simulateMnemonic(getMnemonicValue(s)); else System.out.println(" mnemonic " + s); } if (keyboardLocked) { bufferedKeys = strokenizer.getUnprocessedKeyStroked(); if (bufferedKeys != null) keysBuffered = true; done = true; } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/9e3f98202f0eb0ef5207f9793209ab3f13916f81/Screen5250.java/clean/tn5250j/src/org/tn5250j/Screen5250.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1366,
2396,
12,
780,
977,
13,
288,
1377,
309,
261,
2452,
17947,
13,
288,
540,
977,
273,
11445,
2396,
397,
977,
31,
540,
1311,
17947,
273,
629,
31,
540,
11445,
2396,
273,
1408... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1366,
2396,
12,
780,
977,
13,
288,
1377,
309,
261,
2452,
17947,
13,
288,
540,
977,
273,
11445,
2396,
397,
977,
31,
540,
1311,
17947,
273,
629,
31,
540,
11445,
2396,
273,
1408... |
private static byte intXor(OPT_Instruction s) { | private static DefUseEffect intXor(OPT_Instruction s) { | private static byte intXor(OPT_Instruction s) { if (CF_INT) { canonicalizeCommutativeOperator(s); OPT_Operand op1 = Binary.getVal1(s); OPT_Operand op2 = Binary.getVal2(s); if (op1.similar(op2)) { // THE SAME OPERAND: x ^ x == 0 Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(0)); return MOVE_FOLDED; } if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; if (op1.isIntConstant()) { // BOTH CONSTANTS: FOLD int val1 = op1.asIntConstant().value; Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(val1 ^ val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == -1) { // x ^ -1 == x ^ 0xffffffff = ~x Unary.mutate(s, INT_NOT, Binary.getClearResult(s), Binary.getClearVal1(s)); return REDUCED; } if (val2 == 0) { // x ^ 0 == x Move.mutate(s, INT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/4f52a59569c48e68010a63e605ee6691083a9e97/OPT_Simplifier.java/buggy/rvm/src/com/ibm/jikesrvm/opt/OPT_Simplifier.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
10922,
3727,
12477,
509,
60,
280,
12,
15620,
67,
11983,
272,
13,
288,
282,
309,
261,
8955,
67,
3217,
13,
288,
1377,
25839,
799,
10735,
1535,
5592,
12,
87,
1769,
1377,
16456,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
10922,
3727,
12477,
509,
60,
280,
12,
15620,
67,
11983,
272,
13,
288,
282,
309,
261,
8955,
67,
3217,
13,
288,
1377,
25839,
799,
10735,
1535,
5592,
12,
87,
1769,
1377,
16456,
... |
float dist = in-codebook[i]; dist = dist*dist; if (i==0 || dist<min_dist) | float dist = in - codebook[i]; dist = dist * dist; if (i == 0 || dist < min_dist) | public static final int index(final float in, final float[] codebook, final int entries) { int i; float min_dist=0; int best_index=0; for (i=0;i<entries;i++) { float dist = in-codebook[i]; dist = dist*dist; if (i==0 || dist<min_dist) { min_dist=dist; best_index=i; } } return best_index; } | 6221 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6221/81112208859292bc5ef5f9b0033ab2ea6dab38c0/VQ.java/clean/main/trunk/codec/src/main/java/org/xiph/speex/VQ.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
727,
509,
770,
12,
6385,
1431,
316,
16,
27573,
727,
1431,
8526,
981,
3618,
16,
27573,
727,
509,
3222,
13,
225,
288,
565,
509,
277,
31,
565,
1431,
1131,
67,
4413,
33,
20,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
727,
509,
770,
12,
6385,
1431,
316,
16,
27573,
727,
1431,
8526,
981,
3618,
16,
27573,
727,
509,
3222,
13,
225,
288,
565,
509,
277,
31,
565,
1431,
1131,
67,
4413,
33,
20,
31... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.