rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
private void insertNewDatablock(String tag, Element data) { // First check, if this is an extended datablock // in <NAME1 name="name2>... format, that has to be inserted // as name1.name2 String nameAttr = data.getAttribute("name"); String workTag = null; if((!data.getNodeName().toLowerCase().equals("data")) && nameAttr != null && (!"".equals(nameAttr))) { // this is an extended datablock workTag = tag.substring(0, tag.lastIndexOf(".")); } else { workTag = tag; } // Import the node for later inserting Element importedNode = (Element)parser.importNode(m_content, data); // Check, if this is a simple datablock without hierarchy. if(workTag.indexOf(".") == -1) { // Fine. We can insert the new Datablock at the of the document m_content.getDocumentElement().appendChild(importedNode); m_blocks.put(tag, importedNode); } else { // This is a hierachical datablock tag. We have to search for // an appropriate place to insert first. boolean found = false; String match = "." + workTag; int dotIndex = match.lastIndexOf("."); Vector newBlocks = new Vector(); while((!found) && (dotIndex > 1)) { match = match.substring(0, dotIndex); if(hasData(match.substring(1))) { found = true; } else { dotIndex = match.lastIndexOf("."); newBlocks.addElement(match.substring(dotIndex + 1)); } } // newBlocks now contains a (backward oriented) list // of all datablocks that have to be created, before // the new datablock named "tag" can be inserted. String datablockPrefix = ""; if(found) { datablockPrefix = match.substring(1) + "."; } // number of new elements to be created int numNewBlocks = newBlocks.size(); // used to create the required new elements Element newElem = null; // Contains the last existing Element in the hierarchy. Element lastElem = null; // now create the new elements backwards for(int i = numNewBlocks - 1;i >= 0;i--) { newElem = m_content.createElement("DATA"); newElem.setAttribute("name", (String)newBlocks.elementAt(i)); m_blocks.put(datablockPrefix + (String)newBlocks.elementAt(i), newElem); if(lastElem != null) { lastElem.appendChild(newElem); } else { lastElem = newElem; } } // Now all required parent datablocks are created. // Finally the given datablock can be inserted. if(lastElem != null) { lastElem.appendChild(importedNode); } else { lastElem = importedNode; } m_blocks.put(datablockPrefix + tag, importedNode); // lastElem now contains the hierarchical tree of all DATA tags to be // inserted. // If we have found an existing part of the hierarchy, get // this part and append the tree. If no part was found, append the // tree at the end of the document. if(found) { Element parent = (Element)m_blocks.get(match.substring(1)); parent.appendChild(lastElem); } else { m_content.getDocumentElement().appendChild(lastElem); } } } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/53020c572ca3e64148712b781e0f47c127dc8b78/A_CmsXmlContent.java/clean/src/com/opencms/template/A_CmsXmlContent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2243,
1908,
5139,
378,
739,
12,
780,
1047,
16,
3010,
501,
13,
288,
7734,
368,
5783,
866,
16,
309,
333,
353,
392,
7021,
10481,
739,
7734,
368,
316,
411,
1985,
21,
508,
1546,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2243,
1908,
5139,
378,
739,
12,
780,
1047,
16,
3010,
501,
13,
288,
7734,
368,
5783,
866,
16,
309,
333,
353,
392,
7021,
10481,
739,
7734,
368,
316,
411,
1985,
21,
508,
1546,
... | ||
elementStack = new Stack(); | elementStack= new Stack(); | public final void enclosedExpr() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST enclosedExpr_AST = null; AST tmp276_AST = null; tmp276_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp276_AST); match(LCURLY); if ( inputState.guessing==0 ) { globalStack.push(elementStack); elementStack = new Stack(); lexer.inElementContent= false; lexer.wsExplicit= false; } expr(); astFactory.addASTChild(currentAST, returnAST); match(RCURLY); if ( inputState.guessing==0 ) { elementStack = (Stack)globalStack.pop(); lexer.inElementContent= true; lexer.wsExplicit= true; } enclosedExpr_AST = (AST)currentAST.root; returnAST = enclosedExpr_AST; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/be23536931f66ed6f552941df1c272ed48eeb933/XPathParser2.java/buggy/src/org/exist/parser/XPathParser2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
25636,
4742,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
25636,
4742,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
202,
... |
if (!currentResource.getParent().equals(firstParent)) { | if (getSelectedNonResources().size() > 0) { | protected boolean updateSelection(IStructuredSelection selection) { if (!super.updateSelection(selection)) { return false; } if (getSelectedNonResources().size() > 0) { return false; } // to enable this command all selected resources must be siblings List selectedResources = getSelectedResources(); if (selectedResources.size() == 0) return false; IContainer firstParent = ((IResource) selectedResources.get(0)).getParent(); if (firstParent == null) { return false; } Iterator resourcesEnum = selectedResources.iterator(); while (resourcesEnum.hasNext()) { IResource currentResource = (IResource) resourcesEnum.next(); if (currentResource.getType() == IResource.PROJECT) { return false; } if (!currentResource.getParent().equals(firstParent)) { return false; } } return true;} | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/bf752ac27dbe2a869d9900197181599a8561dc6a/CopyResourceAction.java/buggy/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/actions/CopyResourceAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
1250,
1089,
6233,
12,
45,
30733,
6233,
4421,
13,
288,
202,
430,
16051,
9565,
18,
2725,
6233,
12,
10705,
3719,
288,
202,
202,
2463,
629,
31,
202,
97,
202,
430,
261,
588,
7416,
3989,
380... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
1250,
1089,
6233,
12,
45,
30733,
6233,
4421,
13,
288,
202,
430,
16051,
9565,
18,
2725,
6233,
12,
10705,
3719,
288,
202,
202,
2463,
629,
31,
202,
97,
202,
430,
261,
588,
7416,
3989,
380... |
ColumnConstraint[][] constraintses, | ColumnConstraint[][] constraintses, | public synchronized void load(RolapStar.Measure[] measures, ColumnConstraint[][] constraintses, Collection pinnedSegments) { BitKey bitKey = this.bitKey.copy(); int axisCount = columns.length; Util.assertTrue(constraintses.length == axisCount); // This array of Aggregation.Axis is shared by all Segments for // this set of measures and constraintses Aggregation.Axis[] axes = new Aggregation.Axis[axisCount]; for (int i = 0; i < axisCount; i++) { axes[i] = new Aggregation.Axis(columns[i], constraintses[i]); } boolean isDistinct = false; Segment[] segments = new Segment[measures.length]; for (int i = 0; i < measures.length; i++) { RolapStar.Measure measure = measures[i]; if (measure.getAggregator().isDistinct()) { isDistinct = true; } bitKey.setByPos(measure.getBitPosition()); Segment segment = new Segment(this, measure, constraintses, axes); segments[i] = segment; SoftReference ref = new SoftReference(segment); segmentRefs.add(ref); pinnedSegments.add(segment); } Segment.load(segments, bitKey, isDistinct, pinnedSegments, axes); } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/04e646f31dd5b7942980cee630c94f49bdab0e26/Aggregation.java/buggy/src/main/mondrian/rolap/agg/Aggregation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
1262,
12,
4984,
438,
18379,
18,
7197,
8526,
22692,
16,
21394,
4753,
5806,
63,
6362,
65,
4954,
2420,
16,
4766,
282,
2200,
26193,
7946,
13,
288,
3639,
6539,
653,
2831,
653,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1262,
12,
4984,
438,
18379,
18,
7197,
8526,
22692,
16,
21394,
4753,
5806,
63,
6362,
65,
4954,
2420,
16,
4766,
282,
2200,
26193,
7946,
13,
288,
3639,
6539,
653,
2831,
653,... |
CFG cfg = getCFG(method); DepthFirstSearch dfs = getDepthFirstSearch(method); DominatorsAnalysis analysis = new DominatorsAnalysis(cfg, dfs, true); Dataflow<java.util.BitSet, DominatorsAnalysis> dataflow = new Dataflow<java.util.BitSet, DominatorsAnalysis>(cfg, analysis); dataflow.execute(); return analysis; } | CFG cfg = getCFG(method); DepthFirstSearch dfs = getDepthFirstSearch(method); DominatorsAnalysis analysis = new DominatorsAnalysis(cfg, dfs, true); Dataflow<java.util.BitSet, DominatorsAnalysis> dataflow = new Dataflow<java.util.BitSet, DominatorsAnalysis>(cfg, analysis); dataflow.execute(); return analysis; } | protected DominatorsAnalysis analyze(Method method) throws DataflowAnalysisException, CFGBuilderException { CFG cfg = getCFG(method); DepthFirstSearch dfs = getDepthFirstSearch(method); DominatorsAnalysis analysis = new DominatorsAnalysis(cfg, dfs, true); Dataflow<java.util.BitSet, DominatorsAnalysis> dataflow = new Dataflow<java.util.BitSet, DominatorsAnalysis>(cfg, analysis); dataflow.execute(); return analysis; } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/4748a5a9b76f3dd763ee6bc7755c932a711bd6a6/ClassContext.java/clean/findbugs/src/java/edu/umd/cs/findbugs/ba/ClassContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1117,
12965,
30425,
9418,
12375,
12,
1305,
707,
13,
1216,
1910,
2426,
9418,
503,
16,
7577,
1263,
503,
288,
1082,
202,
19727,
2776,
273,
1927,
42,
43,
12,
2039,
1769,
1082,
202,
6148... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1117,
12965,
30425,
9418,
12375,
12,
1305,
707,
13,
1216,
1910,
2426,
9418,
503,
16,
7577,
1263,
503,
288,
1082,
202,
19727,
2776,
273,
1927,
42,
43,
12,
2039,
1769,
1082,
202,
6148... |
OrbUtils.startDebugNameServer(); OrbUtils.initializeServerForDebug(); | OrbUtils.startStandaloneNameServer(); OrbUtils.initializeServerForStandalone(); | protected void setUp() throws Exception { super.setUp(); OrbUtils.initializeLog(); OrbUtils.startDebugNameServer(); OrbUtils.initializeServerForDebug(); CrewGroupImpl crewGroupImpl = new CrewGroupImpl(); for (int i = 0; i < 1; i++) crewGroupImpl.createCrewPerson(createGenericSchedule(crewGroupImpl)); myCrewGroup = (new CrewGroupPOATie(crewGroupImpl))._this(OrbUtils.getORB()); //initialize stores mySimEnvironment = (new SimEnvironmentPOATie(new SimEnvironmentImpl()))._this(OrbUtils.getORB()); myPotableWaterStore = (new PotableWaterStorePOATie(new PotableWaterStoreImpl()))._this(OrbUtils.getORB()); myPotableWaterStore.setInitialCapacity(10000f); myPotableWaterStore.setInitialLevel(10000f); myFoodStore = (new FoodStorePOATie(new FoodStoreImpl()))._this(OrbUtils.getORB()); myGreyWaterStore = (new GreyWaterStorePOATie(new GreyWaterStoreImpl()))._this(OrbUtils.getORB()); myDirtyWaterStore = (new DirtyWaterStorePOATie(new DirtyWaterStoreImpl()))._this(OrbUtils.getORB()); myDryWasteStore = (new DryWasteStorePOATie(new DryWasteStoreImpl()))._this(OrbUtils.getORB()); myCrewGroup.getAirConsumerDefinition().setAirInputs(new SimEnvironment[] {mySimEnvironment}, new float[] {1000f}, new float[] {1000f}); myCrewGroup.getPotableWaterConsumerDefinition().setPotableWaterInputs(new PotableWaterStore[] {myPotableWaterStore}, new float[] {1000f}, new float[] {1000f}); myCrewGroup.getFoodConsumerDefinition().setFoodInputs(new FoodStore[] {myFoodStore}, new float[] {1000f}, new float[] {1000f}); myCrewGroup.getGreyWaterProducerDefinition().setGreyWaterOutputs(new GreyWaterStore[] {myGreyWaterStore}, new float[] {1000f}, new float[] {1000f}); myCrewGroup.getDirtyWaterProducerDefinition().setDirtyWaterOutputs(new DirtyWaterStore[] {myDirtyWaterStore}, new float[] {1000f}, new float[] {1000f}); myCrewGroup.getDryWasteProducerDefinition().setDryWasteOutputs(new DryWasteStore[] {myDryWasteStore}, new float[] {1000f}, new float[] {1000f}); myModules = new BioModule[7]; myModules[0] = myCrewGroup; myModules[1] = mySimEnvironment; myModules[2] = myPotableWaterStore; myModules[3] = myFoodStore; myModules[4] = myGreyWaterStore; myModules[5] = myDirtyWaterStore; myModules[6] = myDryWasteStore; for (BioModule currentModule : myModules) currentModule.setTickLength(1); } | 5015 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5015/84a5957e86b26b5f71ca20840ccaffc7da36aa32/CrewGroupImplTest.java/buggy/BIOSIM/test/com/traclabs/biosim/server/simulation/crew/CrewGroupImplTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
24292,
1435,
1216,
1185,
288,
202,
202,
9565,
18,
542,
1211,
5621,
202,
202,
1162,
70,
1989,
18,
11160,
1343,
5621,
202,
202,
1162,
70,
1989,
18,
1937,
2829,
461,
2081,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
24292,
1435,
1216,
1185,
288,
202,
202,
9565,
18,
542,
1211,
5621,
202,
202,
1162,
70,
1989,
18,
11160,
1343,
5621,
202,
202,
1162,
70,
1989,
18,
1937,
2829,
461,
2081,
... |
public EventFormatter(Element config) { this(config, false); } | public EventFormatter(){ this(null, false); } | public EventFormatter(Element config) { this(config, false); } | 45996 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45996/98ef0d8abd91a4f1bd2fa699e75b4a9df6cf2c96/EventFormatter.java/buggy/src/edu/sc/seis/sod/subsetter/EventFormatter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2587,
5074,
12,
1046,
642,
13,
288,
3639,
333,
12,
1425,
16,
629,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2587,
5074,
12,
1046,
642,
13,
288,
3639,
333,
12,
1425,
16,
629,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return entry(RubyNumeric.num2long(args[0])); | return entry(args[0].convertToInteger().getLongValue()); | public IRubyObject aref(IRubyObject[] args) { int argc = checkArgumentCount(args, 1, 2); if (argc == 2) { long beg = RubyNumeric.fix2long(args[0]); long len = RubyNumeric.fix2long(args[1]); if (beg < 0) { beg += getLength(); } return subseq(beg, len); } if (args[0] instanceof RubyFixnum) { return entry(RubyNumeric.fix2long(args[0])); } if (args[0] instanceof RubyBignum) { throw getRuntime().newIndexError("index too big"); } if (args[0] instanceof RubyRange) { long[] begLen = ((RubyRange) args[0]).getBeginLength(getLength(), true, false); return begLen == null ? newArray(getRuntime()) : subseq(begLen[0], begLen[1]); } return entry(RubyNumeric.num2long(args[0])); } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/803c66ee682936beecc8a43fe2cfc90fe5645b22/RubyArray.java/buggy/src/org/jruby/RubyArray.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
854,
74,
12,
7937,
10340,
921,
8526,
833,
13,
288,
3639,
509,
1501,
71,
273,
10788,
1380,
12,
1968,
16,
404,
16,
576,
1769,
3639,
309,
261,
3175,
71,
422,
576,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
854,
74,
12,
7937,
10340,
921,
8526,
833,
13,
288,
3639,
509,
1501,
71,
273,
10788,
1380,
12,
1968,
16,
404,
16,
576,
1769,
3639,
309,
261,
3175,
71,
422,
576,
... |
double dFullHeight = 0, dExtraWidth = 0, dDeltaHeight; | double dRealHeight = 0, dExtraWidth = 0, dDeltaHeight; | public final Size compute( IDisplayServer xs, Chart cm, SeriesDefinition[] seda, RunTimeContext rtc ) throws ChartException { // THREE CASES: // 1. ALL SERIES IN ONE ARRAYLIST // 2. ONE SERIES PER ARRAYLIST // 3. ALL OTHERS Legend lg = cm.getLegend( ); if ( !lg.isSetOrientation( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.legend.orientation.horzvert", //$NON-NLS-1$ ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } if ( !lg.isSetDirection( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.legend.direction.tblr", //$NON-NLS-1$ ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } // INITIALIZATION OF VARS USED IN FOLLOWING LOOPS Orientation orientation = lg.getOrientation( ); Direction direction = lg.getDirection( ); double maxWrappingSize = lg.getWrappingSize( ); Label la = LabelImpl.create( ); la.setCaption( (Text) EcoreUtil.copy( lg.getText( ) ) ); ClientArea ca = lg.getClientArea( ); LineAttributes lia = ca.getOutline( ); double dSeparatorThickness = lia.getThickness( ); double dWidth = 0, dHeight = 0; la.getCaption( ).setValue( "X" ); //$NON-NLS-1$ final ITextMetrics itm = xs.getTextMetrics( la ); double dItemHeight = itm.getFullHeight( ); Series se; ArrayList al; double dScale = xs.getDpiResolution( ) / 72d; Insets insCA = ca.getInsets( ).scaledInstance( dScale ); final boolean bPaletteByCategory = ( cm.getLegend( ) .getItemType( ) .getValue( ) == LegendItemType.CATEGORIES ); Series seBase; // Get available maximum block width/height. Block bl = cm.getBlock( ); Bounds boFull = bl.getBounds( ).scaledInstance( dScale ); Insets ins = bl.getInsets( ).scaledInstance( dScale ); Insets lgIns = lg.getInsets( ).scaledInstance( dScale ); double dAvailableWidth = boFull.getWidth( ) - ins.getLeft( ) - ins.getRight( ) - lgIns.getLeft( ) - lgIns.getRight( ); double dAvailableHeight = boFull.getHeight( ) - ins.getTop( ) - ins.getBottom( ) - lgIns.getTop( ) - lgIns.getBottom( ) - cm.getTitle( ) .getBounds( ) .scaledInstance( dScale ) .getHeight( ); // Calculate if minSlice applicable. boolean bMinSliceDefined = false; double dMinSlice = 0; boolean bPercentageMinSlice = false; String sMinSliceLabel = null; boolean bMinSliceApplied = false; if ( cm instanceof ChartWithoutAxes ) { bMinSliceDefined = ( (ChartWithoutAxes) cm ).isSetMinSlice( ); dMinSlice = ( (ChartWithoutAxes) cm ).getMinSlice( ); bPercentageMinSlice = ( (ChartWithoutAxes) cm ).isMinSlicePercent( ); sMinSliceLabel = ( (ChartWithoutAxes) cm ).getMinSliceLabel( ); if ( sMinSliceLabel == null || sMinSliceLabel.length( ) == 0 ) { sMinSliceLabel = IConstants.UNDEFINED_STRING; } else { sMinSliceLabel = rtc.externalizedMessage( sMinSliceLabel ); } } // calculate if need an extra legend item when minSlice defined. if ( bMinSliceDefined && bPaletteByCategory && cm instanceof ChartWithoutAxes ) { if ( !( (ChartWithoutAxes) cm ).getSeriesDefinitions( ).isEmpty( ) ) { // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS SeriesDefinition sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); SeriesDefinition[] sdOrtho = (SeriesDefinition[]) sdBase.getSeriesDefinitions( ) .toArray( ); DataSetIterator dsiOrtho = null; double dCurrentMinSlice = 0; for ( int i = 0; i < sdOrtho.length && !bMinSliceApplied; i++ ) { try { dsiOrtho = new DataSetIterator( ( (Series) sdOrtho[i].getRunTimeSeries( ) .get( 0 ) ).getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } // TODO Check dataSet type, throw exception or ignore?. if ( bPercentageMinSlice ) { double total = 0; while ( dsiOrtho.hasNext( ) ) { Object obj = dsiOrtho.next( ); if ( obj instanceof Number ) { total += ( (Number) obj ).doubleValue( ); } } dsiOrtho.reset( ); dCurrentMinSlice = total * dMinSlice / 100d; } else { dCurrentMinSlice = dMinSlice; } while ( dsiOrtho.hasNext( ) ) { Object obj = dsiOrtho.next( ); if ( obj instanceof Number ) { double val = ( (Number) obj ).doubleValue( ); if ( val < dCurrentMinSlice ) { bMinSliceApplied = true; break; } } } } } } // COMPUTATIONS HERE MUST BE IN SYNC WITH THE ACTUAL RENDERER if ( orientation.getValue( ) == Orientation.VERTICAL ) { double dW, dMaxW = 0; double dFullHeight = 0, dExtraWidth = 0, dDeltaHeight; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; if ( cm instanceof ChartWithAxes ) { final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; // ONLY // SUPPORT // 1 // BASE // AXIS // FOR // NOW if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { return SizeImpl.create( 0, 0 ); } sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); // OK TO ASSUME THAT 1 BASE SERIES // DEFINITION EXISTS } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { return SizeImpl.create( 0, 0 ); } sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); // OK TO ASSUME THAT 1 BASE SERIES // DEFINITION EXISTS } seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); // OK TO // ASSUME // THAT 1 // BASE // RUNTIME // SERIES // EXISTS DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } FormatSpecifier fs = null; if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } while ( dsiBase.hasNext( ) ) { // TODO filter the not-used legend. Object obj = dsiBase.next( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dDeltaHeight = insCA.getTop( ) + itm.getFullHeight( ) + insCA.getBottom( ); if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dWidth + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dWidth = itm.getFullWidth( ); dFullHeight = Math.max( dFullHeight, dHeight ); dHeight = dDeltaHeight; } else { dWidth = Math.max( itm.getFullWidth( ), dWidth ); dHeight += dDeltaHeight; } } // compute the extra MinSlice legend item if applicable. if ( bMinSliceDefined && bMinSliceApplied ) { la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); dDeltaHeight = insCA.getTop( ) + itm.getFullHeight( ) + insCA.getBottom( ); if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dWidth + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dWidth = itm.getFullWidth( ); dFullHeight = Math.max( dFullHeight, dHeight ); dHeight = dDeltaHeight; } else { dWidth = Math.max( itm.getFullWidth( ), dWidth ); dHeight += dDeltaHeight; } } dWidth += insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + insCA.getRight( ) + dExtraWidth; dHeight = Math.max( dFullHeight, dHeight ); } else if ( direction.getValue( ) == Direction.TOP_BOTTOM ) // (VERTICAL // => // TB) { dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dW = itm.getFullWidth( ); dDeltaHeight = insCA.getTop( ) + itm.getFullHeight( ) + insCA.getBottom( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = (Label) EcoreUtil.copy( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dW = Math.max( dW, itm.getFullWidth( ) ); dDeltaHeight += itm.getFullHeight( ) + 2; } } if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = dW; dFullHeight = Math.max( dFullHeight, dHeight ); dHeight = dDeltaHeight; } else { dMaxW = Math.max( dW, dMaxW ); dHeight += dDeltaHeight; } } // SETUP HORIZONTAL SEPARATOR SPACING if ( j < seda.length - 1 ) { dHeight += dSeparatorThickness; } } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING + MAX // ITEM WIDTH + RIGHT INSETS dWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + dMaxW + insCA.getRight( ) + dExtraWidth; dHeight = Math.max( dFullHeight, dHeight ); } else if ( direction.getValue( ) == Direction.LEFT_RIGHT ) // (VERTICAL // => // LR) { dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dW = itm.getFullWidth( ); dDeltaHeight = insCA.getTop( ) + itm.getFullHeight( ) + insCA.getBottom( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = (Label) EcoreUtil.copy( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dW = Math.max( dW, itm.getFullWidth( ) ); dDeltaHeight += itm.getFullHeight( ) + 2; } } if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = dW; dFullHeight = Math.max( dFullHeight, dHeight ); dHeight = dDeltaHeight; } else { dMaxW = Math.max( dW, dMaxW ); dHeight += dDeltaHeight; } } dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dFullHeight = Math.max( dFullHeight, dHeight ); dHeight = 0; // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 ) { dExtraWidth += dSeparatorThickness; } } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING + // MAX ITEM WIDTH + RIGHT INSETS dWidth += insCA.getLeft( ) + ( 3 * dItemHeight / 2 ) + dHorizontalSpacing + insCA.getRight( ) + dExtraWidth; dHeight = Math.max( dFullHeight, dHeight ); } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.direction", //$NON-NLS-1$ new Object[]{ direction.getName( ) }, ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } } else if ( orientation.getValue( ) == Orientation.HORIZONTAL ) { double dH, dMaxH = 0; double dFullWidth = 0, dExtraHeight = 0, dDeltaWidth; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; if ( cm instanceof ChartWithAxes ) { final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; // ONLY // SUPPORT // 1 // BASE // AXIS // FOR // NOW if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.base.axis.no.series.definitions", //$NON-NLS-1$ ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); // OK TO ASSUME // THAT 1 BASE // SERIES // DEFINITION // EXISTS } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.base.axis.no.series.definitions", //$NON-NLS-1$ ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); // OK TO ASSUME // THAT 1 BASE // SERIES // DEFINITION // EXISTS } seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); // OK TO // ASSUME // THAT 1 // BASE // RUNTIME // SERIES // EXISTS DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } FormatSpecifier fs = null; if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } while ( dsiBase.hasNext( ) ) { // TODO filter the not-used legend. Object obj = dsiBase.next( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dDeltaWidth = insCA.getLeft( ) + itm.getFullWidth( ) + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dHeight = itm.getFullHeight( ); dFullWidth = Math.max( dFullWidth, dWidth ); dWidth = dDeltaWidth; } else { dHeight = Math.max( itm.getFullHeight( ), dHeight ); dWidth += dDeltaWidth; } } // compute the extra MinSlice legend item if applicable. if ( bMinSliceDefined && bMinSliceApplied ) { la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); dDeltaWidth = insCA.getLeft( ) + itm.getFullWidth( ) + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dHeight = itm.getFullHeight( ); dFullWidth = Math.max( dFullWidth, dWidth ); dWidth = dDeltaWidth; } else { dHeight = Math.max( itm.getFullHeight( ), dHeight ); dWidth += dDeltaWidth; } } dHeight += dExtraHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dWidth = Math.max( dWidth, dFullWidth ); } else if ( direction.getValue( ) == Direction.TOP_BOTTOM ) // (HORIZONTAL // => // TB) { dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { dWidth = 0; al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dH = itm.getFullHeight( ); dDeltaWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + itm.getFullWidth( ) + insCA.getRight( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = (Label) EcoreUtil.copy( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dH += itm.getFullHeight( ) + 2; dDeltaWidth = Math.max( dDeltaWidth, itm.getFullWidth( ) ); } } if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = dH; dFullWidth = Math.max( dFullWidth, dWidth ); dWidth = dDeltaWidth; } else { dMaxH = Math.max( dH, dMaxH ); dWidth += dDeltaWidth; } } dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dFullWidth = Math.max( dFullWidth, dWidth ); dWidth = 0; // SETUP HORIZONTAL SEPARATOR SPACING if ( j < seda.length - 1 ) { dHeight += dSeparatorThickness; } } dHeight += insCA.getTop( ) + dVerticalSpacing + insCA.getBottom( ) + dExtraHeight; dWidth = Math.max( dFullWidth, dWidth ); } else if ( direction.getValue( ) == Direction.LEFT_RIGHT ) // (HORIZONTAL // => // LR) { dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dH = itm.getFullHeight( ); dDeltaWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + itm.getFullWidth( ) + insCA.getRight( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = (Label) EcoreUtil.copy( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dH += itm.getFullHeight( ) + 2; dDeltaWidth = Math.max( dDeltaWidth, itm.getFullWidth( ) ); } } if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = dH; dFullWidth = Math.max( dFullWidth, dWidth ); dWidth = dDeltaWidth; } else { dMaxH = Math.max( dH, dMaxH ); dWidth += dDeltaWidth; } } // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 ) { dWidth += dSeparatorThickness; } } dHeight += insCA.getTop( ) + dVerticalSpacing + insCA.getBottom( ) + dMaxH + dExtraHeight; dWidth = Math.max( dFullWidth, dWidth ); } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.direction", //$NON-NLS-1$ new Object[]{ direction }, ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.orientation", //$NON-NLS-1$ new Object[]{ orientation }, ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } // consider legend title size. Label lgTitle = lg.getTitle( ); if ( lgTitle != null && lgTitle.isSetVisible( ) && lgTitle.isVisible( ) ) { BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, lgTitle, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } switch ( lg.getTitlePosition( ).getValue( ) ) { case Position.ABOVE : case Position.BELOW : dHeight += bb.getHeight( ); dWidth = Math.max( dWidth, bb.getWidth( ) ); break; case Position.LEFT : case Position.RIGHT : dWidth += bb.getWidth( ); dHeight = Math.max( dHeight, bb.getHeight( ) ); break; } } itm.dispose( ); // DISPOSE RESOURCE AFTER USE if ( rtc != null ) { LegendItemLayoutHints lilh = new LegendItemLayoutHints( ); lilh.set( SizeImpl.create( dWidth, dHeight ) ); rtc.setLegendItemLayoutHints( lilh ); } sz = SizeImpl.create( dWidth, dHeight ); return sz; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/ad38cf76f1d641ada210d2a5b0551677d4e55a71/LegendBuilder.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/LegendBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
6321,
3671,
12,
1599,
291,
1601,
2081,
9280,
16,
14804,
5003,
16,
1082,
202,
6485,
1852,
8526,
24336,
69,
16,
1939,
950,
1042,
436,
5111,
262,
1216,
14804,
503,
202,
95,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6321,
3671,
12,
1599,
291,
1601,
2081,
9280,
16,
14804,
5003,
16,
1082,
202,
6485,
1852,
8526,
24336,
69,
16,
1939,
950,
1042,
436,
5111,
262,
1216,
14804,
503,
202,
95,
... |
if (hasFilter(FILTER_NONPUBLIC) && (member.getVisibility() != IMember.V_PUBLIC)) { | if (hasFilter(FILTER_NONPUBLIC) && (member.getVisibility() != ASTAccessVisibility.PUBLIC)) { | public boolean select(Viewer viewer, Object parentElement, Object element) { if(element instanceof IDeclaration){ IDeclaration declaration = (IDeclaration) element; if (hasFilter(FILTER_STATIC) && (declaration.isStatic()) ) { return false; } if (element instanceof IMember) { IMember member= (IMember)element; if (hasFilter(FILTER_NONPUBLIC) && (member.getVisibility() != IMember.V_PUBLIC)) { return false; } if (hasFilter(FILTER_FIELDS) && element instanceof IField) { return false; } } } return true; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/d67f2b25cf802ebe2bc22ca92c072d26a8dc6ccb/MemberFilter.java/clean/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/MemberFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
2027,
12,
18415,
14157,
16,
1033,
30363,
16,
1033,
930,
13,
288,
202,
202,
430,
12,
2956,
1276,
1599,
557,
80,
4302,
15329,
1082,
202,
734,
557,
80,
4302,
8266,
273,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
2027,
12,
18415,
14157,
16,
1033,
30363,
16,
1033,
930,
13,
288,
202,
202,
430,
12,
2956,
1276,
1599,
557,
80,
4302,
15329,
1082,
202,
734,
557,
80,
4302,
8266,
273,
261... |
checkPermission(READ); | public UID getOplanUID() { checkPermission(READ); return _org.getOplanUID(); } | 12869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12869/88b9829f6865cc3b0be1aa9712231f8ec2f1f64b/SecuredOrgActivity.java/clean/securityservices/src/org/cougaar/core/security/access/bbo/SecuredOrgActivity.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
10034,
17971,
7088,
3060,
1435,
288,
3639,
327,
389,
3341,
18,
588,
51,
7088,
3060,
5621,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
10034,
17971,
7088,
3060,
1435,
288,
3639,
327,
389,
3341,
18,
588,
51,
7088,
3060,
5621,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
StringBuffer sb = new StringBuffer("("); for (Enumeration e = classes(); e.hasMoreElements(); ) { | StringBuffer sb = new StringBuffer("{"); for (Enumeration e = children.keys(); e.hasMoreElements(); ) { | public String toString() { // not the most intuitive representation... StringBuffer sb = new StringBuffer("("); for (Enumeration e = classes(); e.hasMoreElements(); ) { HClass c = (HClass) e.nextElement(); sb.append(c.toString()); sb.append("=>"); HClass cc[] = children(c); for (int i=0; i<cc.length; i++) { sb.append(cc[i].toString()); if (i<cc.length-1) sb.append(", "); } if (e.hasMoreElements()) sb.append("; "); } sb.append(')'); return sb.toString(); } | 2866 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2866/088e2fcb6e119e071017cef83a2e91a3b872f0f0/ClassHierarchy.java/buggy/Analysis/QuadSSA/ClassHierarchy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
288,
202,
759,
486,
326,
4486,
509,
89,
3720,
4335,
2777,
202,
780,
1892,
2393,
273,
394,
6674,
2932,
2932,
1769,
202,
1884,
261,
21847,
425,
273,
3318,
5621,
425,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
288,
202,
759,
486,
326,
4486,
509,
89,
3720,
4335,
2777,
202,
780,
1892,
2393,
273,
394,
6674,
2932,
2932,
1769,
202,
1884,
261,
21847,
425,
273,
3318,
5621,
425,
... |
} else if (m_ResultsDestinationCBox.getSelectedItem() == DEST_CSV_TEXT) { m_destinationFilename = m_ResultsDestinationPathTField.getText(); if (m_Exp.getResultListener() instanceof CSVResultListener) { ((CSVResultListener)m_Exp.getResultListener()).setOutputFile(new File(m_destinationFilename)); | if (m_ResultsDestinationCBox.getSelectedItem() == DEST_ARFF_TEXT) { m_destinationFilename = m_ResultsDestinationPathTField.getText(); if (m_Exp.getResultListener() instanceof InstancesResultListener) { ((InstancesResultListener)m_Exp.getResultListener()).setOutputFile(resultsFile); } } else if (m_ResultsDestinationCBox.getSelectedItem() == DEST_CSV_TEXT) { m_destinationFilename = m_ResultsDestinationPathTField.getText(); if (m_Exp.getResultListener() instanceof CSVResultListener) { ((CSVResultListener)m_Exp.getResultListener()).setOutputFile(resultsFile); } | private void destinationAddressChanged() { if (m_Exp == null) return; if (m_ResultsDestinationCBox.getSelectedItem() == DEST_DATABASE_TEXT) { m_destinationDatabaseURL = m_ResultsDestinationPathTField.getText(); if (m_Exp.getResultListener() instanceof DatabaseResultListener) { ((DatabaseResultListener)m_Exp.getResultListener()).setDatabaseURL(m_destinationDatabaseURL); } } else if (m_ResultsDestinationCBox.getSelectedItem() == DEST_ARFF_TEXT) { m_destinationFilename = m_ResultsDestinationPathTField.getText(); if (m_Exp.getResultListener() instanceof InstancesResultListener) { ((InstancesResultListener)m_Exp.getResultListener()).setOutputFile(new File(m_destinationFilename)); } } else if (m_ResultsDestinationCBox.getSelectedItem() == DEST_CSV_TEXT) { m_destinationFilename = m_ResultsDestinationPathTField.getText(); if (m_Exp.getResultListener() instanceof CSVResultListener) { ((CSVResultListener)m_Exp.getResultListener()).setOutputFile(new File(m_destinationFilename)); } } m_Support.firePropertyChange("", null, null); } | 6866 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6866/9e9be5a3bb81a0b1c1c70f48f224f1da177da9c9/SimpleSetupPanel.java/buggy/gui/experiment/SimpleSetupPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
2929,
1887,
5033,
1435,
288,
565,
309,
261,
81,
67,
2966,
422,
446,
13,
327,
31,
565,
309,
261,
81,
67,
3447,
5683,
39,
3514,
18,
588,
7416,
1180,
1435,
422,
2030,
882,
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,
282,
3238,
918,
2929,
1887,
5033,
1435,
288,
565,
309,
261,
81,
67,
2966,
422,
446,
13,
327,
31,
565,
309,
261,
81,
67,
3447,
5683,
39,
3514,
18,
588,
7416,
1180,
1435,
422,
2030,
882,
67,... |
parentPipe.remove(removeKid); | parentPipe.remove(removeKid); overallPipe.add(removeKid); | private static void doPipelineAdd(SIRPipeline parentPipe, SIRPipeline newChildPipe, HashMap linearRepMap) { LinearPrinter.println(" new child pipe: "); Iterator newKidIter = newChildPipe.getChildren().iterator(); while(newKidIter.hasNext()) {LinearPrinter.println(" " + newKidIter.next());} // if the new child pipe has 0-1 children, we are done if (newChildPipe.size() == 0) { LinearPrinter.println(" (no children)"); return; } else if (newChildPipe.size() == 1) { LinearPrinter.println(" (one child)"); LinearPrinter.println(" resetting parent pointer for " + newChildPipe.get(0)); newChildPipe.get(0).setParent(parentPipe); return; } // if the newChild pipeline contains all of the children of // the parent pipe, there is no need to do any replacing // (we would just be adding a pipeline with its only child a pipeline). if (parentPipe.size() != newChildPipe.size()) { // set the parent field of the child pipe to be the parent (duh) newChildPipe.setParent(parentPipe); newChildPipe.setInit(SIRStream.makeEmptyInit()); // set to empty init method // remember the location of the first wrapper pipe's child // in the original parent pipeline (so we can insert the wrapper // pipe at the appropriate place. int newPipeIndex = parentPipe.indexOf(newChildPipe.get(0)); if (newPipeIndex == -1) {throw new RuntimeException("unknown child in wrapper pipe");} // now, remove all of the streams that appear in the new child wrapper pipeline Iterator wrappedChildIter = newChildPipe.getChildren().iterator(); while(wrappedChildIter.hasNext()) { SIRStream removeKid = (SIRStream)wrappedChildIter.next() ; parentPipe.remove(removeKid); } // now, add the new child pipeline to the parent at the index of first wrapped child parentPipe.add(newPipeIndex,newChildPipe); } else { // no need to do wrap all of the children again. newChildPipe = parentPipe; } // now, calculate the overall linear rep of the child pipeline List repList = getLinearRepList(linearRepMap, newChildPipe.getChildren()); // list of linear reps LinearTransform pipeTransform = LinearTransformPipeline.calculate(repList); try { LinearFilterRepresentation newRep = pipeTransform.transform(); // add a mapping from child pipe to the new linear form. linearRepMap.put(newChildPipe, newRep); // write output for output parsing scripts (check output mode // because printing this takes a loooooong time for big matrices) if (LinearPrinter.getOutput()) { LinearPrinter.println("Linear pipeline found: " + newChildPipe + "\n-->Matrix:\n" + newRep.getA() + "\n-->Constant Vector:\n" + newRep.getb()); } } catch (NoTransformPossibleException e) { // otherwise something bad happened in the combination process. LinearPrinter.println(" can't combine transform reps: " + e.getMessage()); //throw new RuntimeException("Error combining pipeline!"); } return; } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/aac78ba8cb316813a4a9ee138110b784b80b3a17/LinearAnalyzer.java/clean/streams/src/at/dms/kjc/sir/linear/LinearAnalyzer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
741,
8798,
986,
12,
2320,
54,
8798,
982,
11546,
16,
6862,
1377,
5705,
54,
8798,
19783,
11546,
16,
6862,
1377,
4317,
9103,
18933,
863,
13,
288,
202,
15982,
12149,
18,
8222,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
8798,
986,
12,
2320,
54,
8798,
982,
11546,
16,
6862,
1377,
5705,
54,
8798,
19783,
11546,
16,
6862,
1377,
4317,
9103,
18933,
863,
13,
288,
202,
15982,
12149,
18,
8222,... |
} else if (activationsByActionId.containsKey(actionID)) { final Object value = activationsByActionId.remove(actionID); if (value instanceof IHandlerActivation) { final IHandlerActivation activation = (IHandlerActivation) value; service.deactivateHandler(activation); activation.getHandler().dispose(); | } else { activationsByActionId = (Map) activationsByActionIdByServiceLocator .get(serviceLocator); if (activationsByActionId == null) { activationsByActionId = new HashMap(); activationsByActionIdByServiceLocator.put( serviceLocator, activationsByActionId); } else if (activationsByActionId.containsKey(actionID)) { final Object value = activationsByActionId .remove(actionID); if (value instanceof IHandlerActivation) { final IHandlerActivation activation = (IHandlerActivation) value; service.deactivateHandler(activation); activation.getHandler().dispose(); } | public void setGlobalActionHandler(String actionID, IAction handler) { final IServiceLocator locator = getServiceLocator(); if (handler != null) { // Update the action handlers. if (actionHandlers == null) actionHandlers = new HashMap(11); actionHandlers.put(actionID, handler); // Update the handler activations. final IHandlerService service = (IHandlerService) locator .getService(IHandlerService.class); Map activationsByActionId = null; if (activationsByActionIdByServiceLocator == null) { activationsByActionIdByServiceLocator = new WeakHashMap(); activationsByActionId = new HashMap(); activationsByActionIdByServiceLocator.put(locator, activationsByActionId); } else { activationsByActionId = (Map) activationsByActionIdByServiceLocator .get(locator); if (activationsByActionId == null) { activationsByActionId = new HashMap(); activationsByActionIdByServiceLocator.put(locator, activationsByActionId); } else if (activationsByActionId.containsKey(actionID)) { final Object value = activationsByActionId.remove(actionID); if (value instanceof IHandlerActivation) { final IHandlerActivation activation = (IHandlerActivation) value; service.deactivateHandler(activation); activation.getHandler().dispose(); } } } // Add a mapping from this action id to the command id. final IActionCommandMappingService mappingService = (IActionCommandMappingService) locator .getService(IActionCommandMappingService.class); final String commandId = mappingService.getCommandId(actionID); if (commandId != null) { // Register this as a handler with the given definition id. // the expression gives the setGlobalActionHandler() a // priority. final IHandler actionHandler = new ActionHandler(handler); final IHandlerActivation activation = service.activateHandler( commandId, actionHandler, new Expression() { public final EvaluationResult evaluate( final IEvaluationContext context) { return EvaluationResult.TRUE; } public final void collectExpressionInfo( final ExpressionInfo info) { info .addVariableNameAccess(SourcePriorityNameMapping.LEGACY_LEGACY_NAME); } }); activationsByActionId.put(actionID, activation); } } else { if (actionHandlers != null) actionHandlers.remove(actionID); // Remove the handler activation. final IHandlerService service = (IHandlerService) locator .getService(IHandlerService.class); if (activationsByActionIdByServiceLocator != null) { final Map activationsByActionId = (Map) activationsByActionIdByServiceLocator .get(locator); if ((activationsByActionId != null) && (activationsByActionId.containsKey(actionID))) { final Object value = activationsByActionId.remove(actionID); if (value instanceof IHandlerActivation) { final IHandlerActivation activation = (IHandlerActivation) value; service.deactivateHandler(activation); activation.getHandler().dispose(); } } } } actionHandlersChanged = true; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/3650e0efd6c52eb765c7beeea5a6979bbb754314/SubActionBars.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/SubActionBars.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
5160,
1803,
1503,
12,
780,
1301,
734,
16,
467,
1803,
1838,
13,
288,
202,
202,
6385,
467,
1179,
5786,
8871,
273,
17457,
5621,
202,
202,
430,
261,
4176,
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,
225,
202,
482,
918,
444,
5160,
1803,
1503,
12,
780,
1301,
734,
16,
467,
1803,
1838,
13,
288,
202,
202,
6385,
467,
1179,
5786,
8871,
273,
17457,
5621,
202,
202,
430,
261,
4176,
480,
446,
13,
... |
elem.setIdPos(wrapper.getClassKind().getOffset(), wrapper.getClassKind().getLength()); elem.setPos(wrapper.getClassKind().getOffset(), wrapper.getClassKind().getLength()); | enumeration.setIdPos(wrapper.getClassKind().getOffset(), wrapper.getClassKind().getLength()); enumeration.setPos(wrapper.getClassKind().getOffset(), wrapper.getClassKind().getLength()); | public void enumSpecifierEnd(Object enumSpec) { EnumerationWrapper wrapper = (EnumerationWrapper)enumSpec; List enumerators = wrapper.getEnumerators(); Parent realParent = (Parent)wrapper.getParent(); String enumName = ( wrapper.getName() == null ) ? "" : wrapper.getName().toString(); Enumeration enumeration = new Enumeration( (ICElement)realParent, enumName ); realParent.addChild( enumeration ); // create the list Iterator i = enumerators.iterator(); while( i.hasNext()) { EnumeratorWrapper subwrapper = (EnumeratorWrapper)i.next(); Enumerator enumerator = new Enumerator( enumeration, subwrapper.getName().toString() ); enumeration.addChild( enumerator ); } // do the offsets if( wrapper.getName() != null ) { elem.setIdPos(wrapper.getName().getStartOffset(), enumName.length()); elem.setPos(wrapper.getName().getStartOffset(), enumName.length()); } else { elem.setIdPos(wrapper.getClassKind().getOffset(), wrapper.getClassKind().getLength()); elem.setPos(wrapper.getClassKind().getOffset(), wrapper.getClassKind().getLength()); } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/13a2fc941cf426f21e66255cd139b30eda636023/NewModelBuilder.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/model/NewModelBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2792,
21416,
1638,
12,
921,
2792,
1990,
13,
288,
202,
202,
21847,
3611,
4053,
273,
261,
21847,
3611,
13,
7924,
1990,
31,
1082,
3196,
202,
682,
3557,
3062,
273,
4053,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2792,
21416,
1638,
12,
921,
2792,
1990,
13,
288,
202,
202,
21847,
3611,
4053,
273,
261,
21847,
3611,
13,
7924,
1990,
31,
1082,
3196,
202,
682,
3557,
3062,
273,
4053,
18,
... |
switchPos[idx++] = target.getFirstInstruction().getPosition(); | InstructionHandle firstIns = target.getFirstInstruction(); if (firstIns == null) return; switchPos[idx++] = firstIns.getPosition(); | private void findSwitchDuplicates(CFG cfg, Method method, BasicBlock bb) { Iterator<Edge> iei = cfg.outgoingEdgeIterator(bb); int[] switchPos = new int[cfg.getNumOutgoingEdges(bb)+1]; int idx = 0; while (iei.hasNext()) { Edge e = iei.next(); if (EdgeTypes.SWITCH_EDGE == e.getType()) { BasicBlock target = e.getTarget(); switchPos[idx++] = target.getFirstInstruction().getPosition(); } else if (EdgeTypes.SWITCH_DEFAULT_EDGE == e.getType()) { BasicBlock target = e.getTarget(); switchPos[idx++] = target.getFirstInstruction().getPosition(); } else return; } Arrays.sort(switchPos); if (switchPos.length < 2) return; for (int i = 0; i < switchPos.length-2; i++) { int s1Length = switchPos[i+1] - switchPos[i]; if (s1Length == 0) continue; byte[] s1Bytes = null; for (int j = i+1; j < switchPos.length-1; j++) { int s2Length = switchPos[j+1] - switchPos[j]; if (s2Length == 0) continue; if (s1Length != s2Length) continue; if (s1Bytes == null) s1Bytes = getCodeBytes(method, switchPos[i], switchPos[i+1]); byte[] s2Bytes = getCodeBytes(method, switchPos[j], switchPos[j+1]); if (!Arrays.equals(s1Bytes, s2Bytes)) continue; bugReporter.reportBug(new BugInstance(this, "DB_DUPLICATE_BRANCHES", LOW_PRIORITY) .addClass(classContext.getJavaClass()) .addMethod(classContext.getJavaClass().getClassName(), method.getName(), method.getSignature()) .addSourceLineRange(this, switchPos[i], switchPos[i+1]-1) .addSourceLineRange(this, switchPos[j], switchPos[j+1]-1)); j = switchPos.length; } } } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/cdb3872ca7acf26cdaa8fc74f5dc9dd3d25e2af2/DuplicateBranches.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/detect/DuplicateBranches.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1104,
10200,
23897,
12,
19727,
2776,
16,
2985,
707,
16,
7651,
1768,
7129,
13,
288,
9506,
202,
3198,
32,
6098,
34,
9228,
77,
273,
2776,
18,
31891,
6098,
3198,
12,
9897,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1104,
10200,
23897,
12,
19727,
2776,
16,
2985,
707,
16,
7651,
1768,
7129,
13,
288,
9506,
202,
3198,
32,
6098,
34,
9228,
77,
273,
2776,
18,
31891,
6098,
3198,
12,
9897,
1... |
if ( !page.getCheetSheetPath( ).equals( "" ) ) handle.setCheetSheet( page.getCheetSheetPath( ) ); | private void setDesignFile( String fileName ) throws DesignFileException, SemanticException, IOException { ReportDesignHandle handle = SessionHandleAdapter.getInstance( ) .getSessionHandle( ).openDesign( fileName ); if ( !page.getDisplayName( ).equals( "" ) ) //$NON-NLS-1$ handle.setDisplayName( page.getDisplayName( ) ); if ( !page.getDescription( ).equals( "" ) ) //$NON-NLS-1$ handle.setProperty( ModuleHandle.DESCRIPTION_PROP, page .getDescription( ) ); if ( !page.getPreviewImagePath( ).equals( "" ) ) //$NON-NLS-1$ handle.setIconFile( page.getPreviewImagePath( ) ); if ( !page.getCheetSheetPath( ).equals( "" ) ) //$NON-NLS-1$ handle.setCheetSheet( page.getCheetSheetPath( ) ); handle.save( ); handle.close( ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/65f562bfa3998b08a8a084928b000f590f71789b/PublishTemplateAction.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/actions/PublishTemplateAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
444,
15478,
812,
12,
514,
3968,
262,
1216,
29703,
812,
503,
16,
1082,
202,
13185,
9941,
503,
16,
1860,
202,
95,
202,
202,
4820,
15478,
3259,
1640,
273,
3877,
3259,
4216,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
444,
15478,
812,
12,
514,
3968,
262,
1216,
29703,
812,
503,
16,
1082,
202,
13185,
9941,
503,
16,
1860,
202,
95,
202,
202,
4820,
15478,
3259,
1640,
273,
3877,
3259,
4216,
... | |
if (getDelegate() instanceof IWorkbenchWindowActionDelegate) { IWorkbenchWindowActionDelegate winDelegate = (IWorkbenchWindowActionDelegate) getDelegate(); winDelegate.dispose(); } | if (getDelegate() != null) ((IWorkbenchWindowActionDelegate)getDelegate()).dispose(); | public void dispose() { removeFromActionList(this); if (retargetAction != null) { window.getPartService().removePartListener(retargetAction); retargetAction.dispose(); retargetAction = null; } window.getSelectionService().removeSelectionListener(this); if (getDelegate() instanceof IWorkbenchWindowActionDelegate) { IWorkbenchWindowActionDelegate winDelegate = (IWorkbenchWindowActionDelegate) getDelegate(); winDelegate.dispose(); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/533017ef7ac96e6b7992898e79975951d09265f2/WWinPluginAction.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WWinPluginAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
15825,
1435,
288,
202,
202,
4479,
1265,
1803,
682,
12,
2211,
1769,
202,
202,
430,
261,
1349,
826,
1803,
480,
446,
13,
288,
1082,
202,
5668,
18,
588,
1988,
1179,
7675,
447... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15825,
1435,
288,
202,
202,
4479,
1265,
1803,
682,
12,
2211,
1769,
202,
202,
430,
261,
1349,
826,
1803,
480,
446,
13,
288,
1082,
202,
5668,
18,
588,
1988,
1179,
7675,
447... |
mapPage.setProvider( new MapPropertyDescriptorProvider( ) ); | mapPage.setProvider( new MapDescriptorProvider( ) ); | protected void buildItemContent( CTabItem item ) { if ( itemMap.containsKey( item ) && itemMap.get( item ) == null ) { switch ( tabFolder.getSelectionIndex( ) ) { case 1 : bindingPage = new BindingPage( ); setPageInput( bindingPage ); refresh(tabFolder,bindingPage, true); item.setControl( bindingPage.getControl( ) ); itemMap.put( item, bindingPage ); break; case 2 : sortingPage = new FormPage( FormPropertyDescriptor.FULL_FUNCTION, new SortingHandleProvider( ), false, true ); setPageInput( sortingPage ); refresh(tabFolder,sortingPage, true); item.setControl( sortingPage.getControl( ) ); itemMap.put( item, sortingPage ); break; case 3 : groupPage = new FormPage( FormPropertyDescriptor.FULL_FUNCTION, new GroupHandleProvider( ), true, true ); setPageInput( groupPage ); refresh(tabFolder,groupPage, true); item.setControl( groupPage.getControl( ) ); itemMap.put( item, groupPage ); break; case 4 : mapPage = new PreviewPage( true ); mapPage.setPreview( new MapPropertyDescriptor( true ) ); mapPage.setProvider( new MapPropertyDescriptorProvider( ) ); setPageInput( mapPage ); refresh(tabFolder,mapPage, true); item.setControl( mapPage.getControl( ) ); itemMap.put( item, mapPage ); break; case 5 : highlightsPage = new PreviewPage( true ); highlightsPage.setPreview( new HighlightPropertyDescriptor( true ) ); highlightsPage.setProvider( new HighlightPropertyDescriptorProvider( ) ); setPageInput( highlightsPage ); refresh(tabFolder,highlightsPage, true); item.setControl( highlightsPage.getControl( ) ); itemMap.put( item, highlightsPage ); break; case 6 : filterPage = new FormPage( FormPropertyDescriptor.FULL_FUNCTION, new FilterHandleProvider( ), false, true ); setPageInput( filterPage ); refresh(tabFolder,filterPage, true); item.setControl( filterPage.getControl( ) ); itemMap.put( item, filterPage ); break; default : break; } } else if ( itemMap.get( item ) != null ){ setPageInput( itemMap.get( item ) ); refresh(tabFolder,itemMap.get( item ), false); } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/c5e06041c68a76014ff6551b333b41e26c09fefe/ListPageGenerator.java/buggy/UI/org.eclipse.birt.report.designer.ui.views/src/org/eclipse/birt/report/designer/ui/views/attributes/ListPageGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1361,
1180,
1350,
12,
385,
5661,
1180,
761,
262,
202,
95,
202,
202,
430,
261,
761,
863,
18,
12298,
653,
12,
761,
262,
597,
761,
863,
18,
588,
12,
761,
262,
422,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1361,
1180,
1350,
12,
385,
5661,
1180,
761,
262,
202,
95,
202,
202,
430,
261,
761,
863,
18,
12298,
653,
12,
761,
262,
597,
761,
863,
18,
588,
12,
761,
262,
422,
446,
... |
public void addTransaction(SIPTransaction transaction) { SIPRequest sipRequest = (SIPRequest) transaction.getOriginalRequest(); // Proessing a re-invite. if (firstTransaction != null && firstTransaction != transaction && transaction.getMethod().equals (firstTransaction.getMethod())) { this.reInviteFlag = true; } // Set state to Completed if we are processing a // BYE transaction for the dialog. // Will be set to TERMINATED after the BYE // transaction completes. if (sipRequest.getMethod().equals(Request.BYE)) { this.setState(COMPLETED_STATE); } if (firstTransaction == null) { // Record the local and remote sequenc // numbers and the from and to tags for future // use on this dialog. firstTransaction = transaction; this.setLocalParty(sipRequest); this.setRemoteParty(sipRequest); this.setCallId(sipRequest); this.originalRequest = sipRequest; if (transaction instanceof SIPServerTransaction) { hisTag = sipRequest.getFrom().getTag(); // My tag is assigned when sending response } else { setLocalSequenceNumber( sipRequest.getCSeq().getSequenceNumber()); // his tag is known when receiving response myTag = sipRequest.getFrom().getTag(); if (myTag == null) throw new RuntimeException("bad message tag missing!"); } } else if ( transaction.getMethod().equals(firstTransaction.getMethod()) && (((firstTransaction instanceof SIPServerTransaction) && (transaction instanceof SIPClientTransaction)) || ((firstTransaction instanceof SIPClientTransaction) && (transaction instanceof SIPServerTransaction)))) { // Switch from client side to server side for re-invite // (put the other side on hold). firstTransaction = transaction; this.setLocalParty(sipRequest); this.setRemoteParty(sipRequest); this.setCallId(sipRequest); this.originalRequest = sipRequest; } if (transaction instanceof SIPServerTransaction) setRemoteSequenceNumber( sipRequest.getCSeq().getSequenceNumber()); // If this is a server transaction record the remote // sequence number to avoid re-processing of requests // with the same sequence number directed towards this // dialog. this.lastTransaction = transaction; // set a back ptr in the incoming dialog. transaction.setDialog(this); if (LogWriter.needsLogging) { sipStack.logWriter.logMessage( "Transaction Added " + this +myTag + "/" + hisTag); sipStack.logWriter.logMessage( "TID = " + transaction.getTransactionId() + "/" + transaction.IsServerTransaction()); sipStack.logWriter.logStackTrace(); } } | 3364 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3364/d231d2c6c5ca907b5c90d5737c6ae873878b219f/SIPDialog.java/buggy/src/gov/nist/javax/sip/stack/SIPDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
3342,
12,
17739,
3342,
2492,
13,
288,
8227,
348,
2579,
691,
10341,
691,
273,
261,
17739,
691,
13,
3639,
2492,
18,
588,
8176,
691,
5621,
7734,
368,
1186,
403,
310,
279,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
3342,
12,
17739,
3342,
2492,
13,
288,
8227,
348,
2579,
691,
10341,
691,
273,
261,
17739,
691,
13,
3639,
2492,
18,
588,
8176,
691,
5621,
7734,
368,
1186,
403,
310,
279,
2... | ||
testf.isFiltered(theFile); | assertEquals(!expect,testf.isFiltered(theFile)); | public void testExcludePattern() { testf.excludePattern(PATTERNS); for (int idx = 0; idx < TESTDATA.length; idx++) { TestData td = TESTDATA[idx]; String theFile = td.file; boolean expect = td.exclpatt; testf.isFiltered(theFile); String line = testf.filter(theFile); if (line != null) { assertTrue("Expect to accept "+theFile,expect); } else { assertFalse("Expect to reject "+theFile,expect); } } } | 50179 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50179/188ae5683ff9e68a243bfddae83bb324803edce2/LogFilter.java/clean/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
12689,
3234,
1435,
202,
95,
202,
202,
3813,
74,
18,
10157,
3234,
12,
8592,
2560,
3156,
1769,
202,
202,
1884,
261,
474,
2067,
273,
374,
31,
2067,
411,
22130,
4883,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12689,
3234,
1435,
202,
95,
202,
202,
3813,
74,
18,
10157,
3234,
12,
8592,
2560,
3156,
1769,
202,
202,
1884,
261,
474,
2067,
273,
374,
31,
2067,
411,
22130,
4883,
1... |
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { UsageStatisticsSummary statistics = new UsageStatisticsSummary(); Map<Integer, Map<String, InteractionEventSummary>> summaryMap = new HashMap<Integer, Map<String, InteractionEventSummary>>(); Map<Integer, List<File>> filesPerUser = new HashMap<Integer, List<File>>(); try { // Go through the files to determine which users we have to process (by user id) for ( File source: sources ) { int userId = getUserId( source ); userIds.add(userId); List<File> filesForUser = null; if ( filesPerUser.containsKey( userId )) filesForUser = filesPerUser.get( userId ); if ( filesForUser == null ) filesForUser = new ArrayList<File>(); filesForUser.add( source ); filesPerUser.put( userId, filesForUser ); } } catch (Throwable t) { t.printStackTrace(); MylarPlugin.fail(t, "could not generate usage report", false); } try { // There are three processing events per user monitor.beginTask(JOB_LABEL, userIds.size() * 3); // Process the files for each user for( Integer aUser: filesPerUser.keySet() ) { Map<String, SortedSet<InteractionEvent>> userEvents = new HashMap<String, SortedSet<InteractionEvent>>(); for ( File aFile: filesPerUser.get( aUser )) { String phase = getPhase( aFile ); SortedSet<InteractionEvent> orderedEvents; if ( userEvents.get( phase ) == null ) { orderedEvents = new TreeSet<InteractionEvent>( new InteractionEventComparator()); orderedEvents.addAll( this.generator.logger.getHistoryFromFile(aFile)); } else { orderedEvents = userEvents.get(phase); orderedEvents.addAll( this.generator.logger.getHistoryFromFile(aFile)); } userEvents.put( phase, orderedEvents ); } monitor.worked(1); // If there are scanners registered, give each event to each scanner in turn if (this.generator.scanners != null && this.generator.scanners.size() > 0) { for ( Map.Entry<String, SortedSet<InteractionEvent>> eventsPerPhase: userEvents.entrySet() ) { String phaseToProcess = eventsPerPhase.getKey(); SortedSet<InteractionEvent> events = eventsPerPhase.getValue(); for (InteractionEvent event : events ) { for (IUsageScanner scanner : this.generator.scanners) { scanner.scanEvent(event, aUser, phaseToProcess); } } } } monitor.worked(1); // Consume all events for ( Map.Entry<String, SortedSet<InteractionEvent>> eventsPerPhase: userEvents.entrySet() ) { String phaseToProcess = eventsPerPhase.getKey(); SortedSet<InteractionEvent> events = eventsPerPhase.getValue(); for (InteractionEvent event : events ) { if (event.getKind().isUserEvent()) { // TODO: some collectors may want non-user events for (IUsageCollector collector : this.generator.collectors) collector.consumeEvent(event, aUser, phaseToProcess); } createUsageTableData(summaryMap, event, aUser); } } monitor.worked(1); } for (IUsageCollector collector : this.generator.collectors) statistics.add(collector); List<InteractionEventSummary> flattenedSummaries = new ArrayList<InteractionEventSummary>(); for (Map<String, InteractionEventSummary> userSummary : summaryMap.values()) { flattenedSummaries.addAll(userSummary.values()); } statistics.setSingleSummaries(flattenedSummaries); this.generator.lastParsedSummary = statistics; monitor.done(); } catch (Throwable t) { t.printStackTrace(); MylarPlugin.fail(t, "could not generate usage report", false); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/69cf4a60cebdb2edef88b409b2e36e233cd05c24/ReportGenerator.java/clean/sandbox/org.eclipse.mylyn.monitor.reports/src/org/eclipse/mylyn/monitor/reports/ReportGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1086,
12,
45,
5491,
7187,
6438,
13,
1216,
15342,
16,
7558,
288,
1082,
202,
5357,
8569,
4733,
7691,
273,
394,
10858,
8569,
4733,
5621,
1082,
202,
863,
32,
4522,
16,
1635,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1086,
12,
45,
5491,
7187,
6438,
13,
1216,
15342,
16,
7558,
288,
1082,
202,
5357,
8569,
4733,
7691,
273,
394,
10858,
8569,
4733,
5621,
1082,
202,
863,
32,
4522,
16,
1635,
... | ||
rubyClass.defineMethod("each", new JavaEachMethod("hasMoreElements", "nextElement")); | rubyClass.defineMethod("each", new JavaEachMethod(null, "hasMoreElements", "nextElement")); } else if (rubyClass.isMethodDefined("iterator")) { rubyClass.includeModule(ruby.getClasses().getEnumerableModule()); rubyClass.defineMethod("each", new JavaEachMethod("iterator", "hasNext", "next")); | private void addDefaultModules(RubyClass rubyClass) { if (rubyClass.isMethodDefined("hasNext") && rubyClass.isMethodDefined("next")) { rubyClass.includeModule(ruby.getClasses().getEnumerableModule()); rubyClass.defineMethod("each", new JavaEachMethod("hasNext", "next")); } else if (rubyClass.isMethodDefined("hasNext") && rubyClass.isMethodDefined("next")) { rubyClass.includeModule(ruby.getClasses().getEnumerableModule()); rubyClass.defineMethod("each", new JavaEachMethod("hasMoreElements", "nextElement")); } if (rubyClass.isMethodDefined("compareTo")) { rubyClass.includeModule(ruby.getClasses().getComparableModule()); if (!rubyClass.isMethodDefined("<=>")) { rubyClass.defineAlias("<=>", "compareTo"); } } } | 46217 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46217/1ceedf02ac15d7325cfcf505ca74f35c5bc4a258/JavaSupport.java/clean/org/jruby/javasupport/JavaSupport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
28297,
7782,
12,
54,
10340,
797,
22155,
797,
13,
288,
3639,
309,
261,
27768,
797,
18,
291,
1305,
8116,
2932,
5332,
2134,
7923,
597,
22155,
797,
18,
291,
1305,
8116,
2932,
4285,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28297,
7782,
12,
54,
10340,
797,
22155,
797,
13,
288,
3639,
309,
261,
27768,
797,
18,
291,
1305,
8116,
2932,
5332,
2134,
7923,
597,
22155,
797,
18,
291,
1305,
8116,
2932,
4285,... |
if (Debug.DUMP_KEY_EVENTS) { Log.log(Log.DEBUG,GrabKeyDialog.class,"processKeyEvent() key="+key+"."); } | protected void processKeyEvent(KeyEvent _evt) { KeyEvent evt = KeyEventWorkaround.processKeyEvent(_evt); if(!KeyEventWorkaround.isBindable(_evt.getKeyCode())) evt = null; if(debugBuffer != null) { debugBuffer.insert(debugBuffer.getLength(), "Event " + GrabKeyDialog.toString(_evt) + (evt == null ? " filtered\n" : " passed\n")); } if(evt == null) return; evt.consume(); KeyEventTranslator.Key key = KeyEventTranslator .translateKeyEvent(evt); if(key == null) return; if(debugBuffer != null) { debugBuffer.insert(debugBuffer.getLength(), "==> Translated to " + key + "\n"); } StringBuffer keyString = new StringBuffer(getText()); if(getDocument().getLength() != 0) keyString.append(' '); if (Debug.DUMP_KEY_EVENTS) { Log.log(Log.DEBUG,GrabKeyDialog.class,"processKeyEvent() key="+key+"."); } if (!Debug.SIMPLIFIED_KEY_HANDLING) { if(key.modifiers != null) keyString.append(key.modifiers).append('+'); if(key.input == ' ') keyString.append("SPACE"); else if(key.input != '\0') keyString.append(key.input); else { String symbolicName = getSymbolicName(key.key); if(symbolicName == null) return; keyString.append(symbolicName); } } else { if(key.modifiers != null) { keyString.append(key.modifiers).append('+'); } String symbolicName = getSymbolicName(key.key); if(symbolicName != null) { keyString.append(symbolicName); } else { if (key.input != '\0') { if (key.input == ' ') { keyString.append("SPACE"); } else { keyString.append(key.input); } } else { return; } } } setText(keyString.toString()); if(debugBuffer == null) updateAssignedTo(keyString.toString()); } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/867a736edd2b11b41a5e742a4976ed0dd147dead/GrabKeyDialog.java/clean/org/gjt/sp/jedit/gui/GrabKeyDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1117,
918,
1207,
653,
1133,
12,
653,
1133,
389,
73,
11734,
13,
202,
202,
95,
1082,
202,
653,
1133,
6324,
273,
23737,
2421,
12716,
18,
2567,
653,
1133,
24899,
73,
11734,
1769,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1117,
918,
1207,
653,
1133,
12,
653,
1133,
389,
73,
11734,
13,
202,
202,
95,
1082,
202,
653,
1133,
6324,
273,
23737,
2421,
12716,
18,
2567,
653,
1133,
24899,
73,
11734,
1769,
1082,
... | |
includeSourceSection.setStringValue( dialog.getPath( ) .substring( 0, dialog.getPath( ).lastIndexOf( "." ) ) ); | String path = dialog.getPath( ); if ( path.lastIndexOf( "." ) > 0 ) { path = path.substring( 0, path.lastIndexOf( "." ) ); } includeSourceSection.setStringValue( path ); | public void buildUI( Composite parent ) { super.buildUI( parent ); // TODO Auto-generated method stub container.setLayout( WidgetUtil.createGridLayout( 5 ) ); TextPropertyDescriptorProvider includeSourceProvider = new TextPropertyDescriptorProvider( ModuleHandle.INCLUDE_RESOURCE_PROP, ReportDesignConstants.MODULE_ELEMENT ); includeSourceSection = new TextAndButtonSection( includeSourceProvider.getDisplayName( ), container, true ); includeSourceSection.setProvider( includeSourceProvider ); includeSourceSection.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { final NewResourceFileDialog dialog = new NewResourceFileDialog( ); if ( dialog.open( ) == Window.OK ) { includeSourceSection.setStringValue( dialog.getPath( ) .substring( 0, dialog.getPath( ).lastIndexOf( "." ) ) ); //$NON-NLS-1$ includeSourceSection.forceFocus( ); } } } ); includeSourceSection.setWidth( 500 ); includeSourceSection.setButtonText( Messages.getString( "ReportPage.text.Resource.Add" ) ); includeSourceSection.setButtonWidth( 60 ); includeSourceSection.setGridPlaceholder( 1, true ); addSection( PageSectionId.RESOURCE_INCLUDE, includeSourceSection ); SeperatorSection seperatorSection = new SeperatorSection( container, SWT.HORIZONTAL ); addSection( PageSectionId.RESOURCE_SEPERATOR, seperatorSection ); JarFileFormProvider jarFileProvider = new JarFileFormProvider( ); FormSection jarFileSection = new FormSection( jarFileProvider.getDisplayName( ), container, true ); jarFileSection.setCustomForm( new JarFileFormPropertyDescriptor( true ) ); jarFileSection.setProvider( jarFileProvider ); jarFileSection.showDisplayLabel( true ); jarFileSection.setButtonWithDialog( true ); jarFileSection.setStyle( FormPropertyDescriptor.FULL_FUNCTION ); jarFileSection.setFillForm( true ); jarFileSection.setWidth( 500 ); jarFileSection.setHeight( 200 ); jarFileSection.setDisplayLabelStyle( SWT.HORIZONTAL ); jarFileSection.setGridPlaceholder( 1, true ); addSection( PageSectionId.RESOURCE_JARFILE, jarFileSection ); createSections( ); layoutSections( ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/e813e4939207f9a25da25a7791da1a881207e029/ResourcesPage.java/buggy/UI/org.eclipse.birt.report.designer.ui.views/src/org/eclipse/birt/report/designer/internal/ui/views/attributes/page/ResourcesPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1361,
5370,
12,
14728,
982,
225,
262,
202,
95,
202,
202,
9565,
18,
3510,
5370,
12,
982,
11272,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
202,
202,
3782,
18,
542,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1361,
5370,
12,
14728,
982,
225,
262,
202,
95,
202,
202,
9565,
18,
3510,
5370,
12,
982,
11272,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
202,
202,
3782,
18,
542,
... |
if ("file".equals(installURL.getProtocol()) && installDir.canWrite()) | if ("file".equals(installURL.getProtocol()) && canWrite(installDir)) | private static String computeDefaultConfigurationLocation() { // 1) We store the config state relative to the 'eclipse' directory if possible // 2) If this directory is read-only // we store the state in <user.home>/.eclipse/<application-id>_<version> where <user.home> // is unique for each local user, and <application-id> is the one // defined in .eclipseproduct marker file. If .eclipseproduct does not // exist, use "eclipse" as the application-id. URL installURL = computeInstallConfigurationLocation(); File installDir = new File(installURL.getFile()); if ("file".equals(installURL.getProtocol()) && installDir.canWrite()) //$NON-NLS-1$ return new File(installDir, CONFIG_DIR).getAbsolutePath(); // We can't write in the eclipse install dir so try for some place in the user's home dir return computeDefaultUserAreaLocation(CONFIG_DIR); } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/9ed4af7820c700d37e79922ee02c38bb1965d326/LocationManager.java/buggy/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/LocationManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
514,
3671,
1868,
1750,
2735,
1435,
288,
202,
202,
759,
404,
13,
1660,
1707,
326,
642,
919,
3632,
358,
326,
296,
20416,
11,
1867,
309,
3323,
202,
202,
759,
576,
13,
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,
1152,
760,
514,
3671,
1868,
1750,
2735,
1435,
288,
202,
202,
759,
404,
13,
1660,
1707,
326,
642,
919,
3632,
358,
326,
296,
20416,
11,
1867,
309,
3323,
202,
202,
759,
576,
13,
971,
... |
String str = ChartUIUtil.getColumnName( sExpressions[j] ); int index = Integer.valueOf( str.substring( str.length( ) - 1 ) ) .intValue( ) - 1; | String str = sExpressions[j]; int index = Integer.valueOf( str.substring( 5, str.length( ) - 3 ) ).intValue( ) - 1; | public Object[] getDataForColumns( String[] sExpressions, int iMaxRecords, boolean byRow ) { byRow = false; Object[] array = new Object[ROW_COUNT]; for ( int i = 0; i < array.length; i++ )// a column { Object[] innerArray = new Object[sExpressions.length];// a row for ( int j = 0; j < sExpressions.length; j++ ) { String str = ChartUIUtil.getColumnName( sExpressions[j] ); int index = Integer.valueOf( str.substring( str.length( ) - 1 ) ) .intValue( ) - 1; innerArray[j] = new Integer( ( (String[]) getPreviewData( ).get( i ) )[index] ); } array[i] = innerArray; } return array; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/787c1bcd1c21d7ed52b0fd7219748ec1e6f3e494/DefaultDataServiceProviderImpl.java/buggy/chart/org.eclipse.birt.chart.examples/src/org/eclipse/birt/chart/examples/builder/DefaultDataServiceProviderImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
8526,
4303,
1290,
3380,
12,
514,
8526,
272,
8927,
16,
509,
277,
2747,
6499,
16,
1082,
202,
6494,
635,
1999,
262,
202,
95,
202,
202,
1637,
1999,
273,
629,
31,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
8526,
4303,
1290,
3380,
12,
514,
8526,
272,
8927,
16,
509,
277,
2747,
6499,
16,
1082,
202,
6494,
635,
1999,
262,
202,
95,
202,
202,
1637,
1999,
273,
629,
31,
202,
202,
... |
rbToLocal.hide(); rbAsImap.hide(); cbLeave.hide(); | rbToLocal.setVisible( false ); rbAsImap.setVisible( false ); cbLeave.setVisible( false ); | void showNothing() { tfHost.hide(); lbHost.hide(); tfPort.hide(); lbPort.hide(); tfUser.hide(); lbUser.hide(); tfPass.hide(); lbPass.hide(); cbIdent.hide();lbIdent.hide(); tfDir.hide(); lbDir.hide(); btChoose.hide(); rbToLocal.hide(); rbAsImap.hide(); cbLeave.hide(); pane.repaint(new Rectangle(pane.getSize())); } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/622ab05cdd1b599cb4ef3ab4d649243fa1f4c39c/Servers.java/clean/grendel/sources/grendel/prefs/ui/Servers.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
2405,
23814,
1435,
288,
565,
3253,
2594,
18,
11248,
5621,
7831,
2594,
18,
11248,
5621,
565,
3253,
2617,
18,
11248,
5621,
7831,
2617,
18,
11248,
5621,
565,
3253,
1299,
18,
11248,
5621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
2405,
23814,
1435,
288,
565,
3253,
2594,
18,
11248,
5621,
7831,
2594,
18,
11248,
5621,
565,
3253,
2617,
18,
11248,
5621,
7831,
2617,
18,
11248,
5621,
565,
3253,
1299,
18,
11248,
5621,
... |
public NSArray newPrimaryKeys( int keysNeeded, EOEntity theEntity, JDBCChannel theChannel) { // Get primary key attrs array... NSArray pkAttrArray = theEntity.primaryKeyAttributes(); // ...and check if the PK is not compound if ( pkAttrArray == null || pkAttrArray.count() != 1) return null; // Get primary key attribute... EOAttribute pkAttr = (EOAttribute) pkAttrArray.objectAtIndex(0); // ...and check if it is number if (pkAttr.adaptorValueType() != EOAttribute.AdaptorNumberType) return null; // Build SQL expression String query = "SELECT " + theEntity.primaryKeyRootName() + "_SEQ.NEXTVAL FROM DUAL"; EOSQLExpression expression = expressionFactory().expressionForString( query ); NSMutableArray generatedKeys = new NSMutableArray( keysNeeded ); for ( int ii = 0; ii < keysNeeded; ii++) { // Do the actual fetch NSArray keyArray = theChannel._fetchRowsForSQLExpressionAndAttributes( expression, pkAttrArray); // Escape if something went wrong if ( keyArray == null || keyArray.count() == 0) return null; generatedKeys.addObject( keyArray.lastObject() ); } // Things went well if we are still here return generatedKeys; } | 50512 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50512/0f772c85947a30db6ca447cbb05141b20531b803/SAPDBPlugIn.java/buggy/Experimental/SAPDB_PlugIns/Pure/SAPDBPlugIn.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
11472,
1076,
394,
6793,
2396,
12,
509,
1311,
11449,
16,
512,
51,
1943,
326,
1943,
16,
16364,
2909,
326,
2909,
13,
288,
5411,
368,
968,
3354,
498,
3422,
526,
2777,
3639,
11472,
1076,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11472,
1076,
394,
6793,
2396,
12,
509,
1311,
11449,
16,
512,
51,
1943,
326,
1943,
16,
16364,
2909,
326,
2909,
13,
288,
5411,
368,
968,
3354,
498,
3422,
526,
2777,
3639,
11472,
1076,... | ||
return; | return false; | private void processLine(BufferedReader reader, OutputStream out) throws IOException { String line; StringBuffer outsb = new StringBuffer(); try { line = reader.readLine(); } catch (IOException e) { outsb.append("Bye... ("+e+")"); System.err.println("Bye... ("+e+")"); return; } boolean getCHKOnly = false; if(line == null) return; String uline = line.toUpperCase(); Logger.minor(this, "Command: "+line); if(uline.startsWith("GET:")) { // Should have a key next String key = line.substring("GET:".length()); while(key.length() > 0 && key.charAt(0) == ' ') key = key.substring(1); while(key.length() > 0 && key.charAt(key.length()-1) == ' ') key = key.substring(0, key.length()-2); Logger.normal(this, "Key: "+key); FreenetURI uri; try { uri = new FreenetURI(key); Logger.normal(this, "Key: "+uri); } catch (MalformedURLException e2) { outsb.append("Malformed URI: "+key+" : "+e2); return; } try { FetchResult result = client.fetch(uri); ClientMetadata cm = result.getMetadata(); outsb.append("Content MIME type: "+cm.getMIMEType()); Bucket data = result.asBucket(); // FIXME limit it above if(data.size() > 32*1024) { System.err.println("Data is more than 32K: "+data.size()); outsb.append("Data is more than 32K: "+data.size()); return; } byte[] dataBytes = BucketTools.toByteArray(data); boolean evil = false; for(int i=0;i<dataBytes.length;i++) { // Look for escape codes if(dataBytes[i] == '\n') continue; if(dataBytes[i] == '\r') continue; if(dataBytes[i] < 32) evil = true; } if(evil) { System.err.println("Data may contain escape codes which could cause the terminal to run arbitrary commands! Save it to a file if you must with GETFILE:"); outsb.append("Data may contain escape codes which could cause the terminal to run arbitrary commands! Save it to a file if you must with GETFILE:"); return; } outsb.append("Data:\r\n"); outsb.append(new String(dataBytes)); } catch (FetchException e) { outsb.append("Error: "+e.getMessage()+"\r\n"); if(e.getMode() == e.SPLITFILE_ERROR && e.errorCodes != null) { outsb.append(e.errorCodes.toVerboseString()); } if(e.newURI != null) outsb.append("Permanent redirect: "+e.newURI+"\r\n"); } } else if(uline.startsWith("GETFILE:")) { // Should have a key next String key = line.substring("GETFILE:".length()); while(key.length() > 0 && key.charAt(0) == ' ') key = key.substring(1); while(key.length() > 0 && key.charAt(key.length()-1) == ' ') key = key.substring(0, key.length()-2); Logger.normal(this, "Key: "+key); FreenetURI uri; try { uri = new FreenetURI(key); } catch (MalformedURLException e2) { outsb.append("Malformed URI: "+key+" : "+e2); return; } try { long startTime = System.currentTimeMillis(); FetchResult result = client.fetch(uri); ClientMetadata cm = result.getMetadata(); outsb.append("Content MIME type: "+cm.getMIMEType()); Bucket data = result.asBucket(); // Now calculate filename String fnam = uri.getDocName(); fnam = sanitize(fnam); if(fnam.length() == 0) { fnam = "freenet-download-"+HexUtil.bytesToHex(BucketTools.hash(data), 0, 10); String ext = DefaultMIMETypes.getExtension(cm.getMIMEType()); if(ext != null && !ext.equals("")) fnam += "." + ext; } File f = new File(downloadsDir, fnam); if(f.exists()) { outsb.append("File exists already: "+fnam); fnam = "freenet-"+System.currentTimeMillis()+"-"+fnam; } FileOutputStream fos = null; try { fos = new FileOutputStream(f); BucketTools.copyTo(data, fos, Long.MAX_VALUE); fos.close(); outsb.append("Written to "+fnam); } catch (IOException e) { outsb.append("Could not write file: caught "+e); e.printStackTrace(); } finally { if(fos != null) try { fos.close(); } catch (IOException e1) { // Ignore } } long endTime = System.currentTimeMillis(); long sz = data.size(); double rate = 1000.0 * sz / (endTime-startTime); outsb.append("Download rate: "+rate+" bytes / second"); } catch (FetchException e) { outsb.append("Error: "+e.getMessage()); if(e.getMode() == e.SPLITFILE_ERROR && e.errorCodes != null) { outsb.append(e.errorCodes.toVerboseString()); } if(e.newURI != null) outsb.append("Permanent redirect: "+e.newURI+"\r\n"); } } else if(uline.startsWith("QUIT")) { n.exit(); } else if(uline.startsWith("PUT:") || (getCHKOnly = uline.startsWith("GETCHK:"))) { // Just insert to local store if(getCHKOnly) line = line.substring(("GETCHK:").length()); else line = line.substring("PUT:".length()); while(line.length() > 0 && line.charAt(0) == ' ') line = line.substring(1); while(line.length() > 0 && line.charAt(line.length()-1) == ' ') line = line.substring(0, line.length()-2); String content; if(line.length() > 0) { // Single line insert content = line; } else { // Multiple line insert content = readLines(reader, false); } // Insert byte[] data = content.getBytes(); InsertBlock block = new InsertBlock(new ArrayBucket(data), null, FreenetURI.EMPTY_CHK_URI); FreenetURI uri; try { uri = client.insert(block, getCHKOnly); } catch (InserterException e) { outsb.append("Error: "+e.getMessage()); if(e.uri != null) outsb.append("URI would have been: "+e.uri); int mode = e.getMode(); if(mode == InserterException.FATAL_ERRORS_IN_BLOCKS || mode == InserterException.TOO_MANY_RETRIES_IN_BLOCKS) { outsb.append("Splitfile-specific error:\n"+e.errorCodes.toVerboseString()); } return; } outsb.append("URI: "+uri); //////////////////////////////////////////////////////////////////////////////// } else if(uline.startsWith("PUTDIR:") || (uline.startsWith("PUTSSKDIR")) || (getCHKOnly = uline.startsWith("GETCHKDIR:"))) { // TODO: Check for errors? boolean ssk = false; if(uline.startsWith("PUTDIR:")) line = line.substring("PUTDIR:".length()); else if(uline.startsWith("PUTSSKDIR:")) { line = line.substring("PUTSSKDIR:".length()); ssk = true; } else if(uline.startsWith("GETCHKDIR:")) line = line.substring(("GETCHKDIR:").length()); else { System.err.println("Impossible"); outsb.append("Impossible"); } line = line.trim(); if(line.length() < 1) { printHeader(out); return; } String defaultFile = null; FreenetURI insertURI = FreenetURI.EMPTY_CHK_URI; // set default file? if (line.matches("^.*#.*$")) { String[] split = line.split("#"); if(ssk) { insertURI = new FreenetURI(split[0]); line = split[1]; if(split.length > 2) defaultFile = split[2]; } else { defaultFile = split[1]; line = split[0]; } } HashMap bucketsByName = makeBucketsByName(line); if(defaultFile == null) { String[] defaultFiles = new String[] { "index.html", "index.htm", "default.html", "default.htm" }; for(int i=0;i<defaultFiles.length;i++) { if(bucketsByName.containsKey(defaultFiles[i])) { defaultFile = defaultFiles[i]; break; } } } FreenetURI uri; try { uri = client.insertManifest(insertURI, bucketsByName, defaultFile); uri = uri.addMetaStrings(new String[] { "" }); outsb.append("======================================================="); outsb.append("URI: "+uri); outsb.append("======================================================="); } catch (InserterException e) { outsb.append("Finished insert but: "+e.getMessage()); if(e.uri != null) { uri = e.uri; uri = uri.addMetaStrings(new String[] { "" }); outsb.append("URI would have been: "+uri); } if(e.errorCodes != null) { outsb.append("Splitfile errors breakdown:"); outsb.append(e.errorCodes.toVerboseString()); } Logger.error(this, "Caught "+e, e); } } else if(uline.startsWith("PUTFILE:") || (getCHKOnly = uline.startsWith("GETCHKFILE:"))) { // Just insert to local store if(getCHKOnly) { line = line.substring(("GETCHKFILE:").length()); } else { line = line.substring("PUTFILE:".length()); } while(line.length() > 0 && line.charAt(0) == ' ') line = line.substring(1); while(line.length() > 0 && line.charAt(line.length()-1) == ' ') line = line.substring(0, line.length()-2); File f = new File(line); outsb.append("Attempting to read file "+line); long startTime = System.currentTimeMillis(); try { if(!(f.exists() && f.canRead())) { throw new FileNotFoundException(); } // Guess MIME type String mimeType = DefaultMIMETypes.guessMIMEType(line); outsb.append("Using MIME type: "+mimeType); if(mimeType.equals(DefaultMIMETypes.DEFAULT_MIME_TYPE)) mimeType = ""; // don't need to override it FileBucket fb = new FileBucket(f, true, false, false, false); InsertBlock block = new InsertBlock(fb, new ClientMetadata(mimeType), FreenetURI.EMPTY_CHK_URI); startTime = System.currentTimeMillis(); FreenetURI uri = client.insert(block, getCHKOnly); // FIXME depends on CHK's still being renamable //uri = uri.setDocName(f.getName()); outsb.append("URI: "+uri+"\r\n"); long endTime = System.currentTimeMillis(); long sz = f.length(); double rate = 1000.0 * sz / (endTime-startTime); outsb.append("Upload rate: "+rate+" bytes / second\r\n"); } catch (FileNotFoundException e1) { outsb.append("File not found"); } catch (InserterException e) { outsb.append("Finished insert but: "+e.getMessage()); if(e.uri != null) { outsb.append("URI would have been: "+e.uri); long endTime = System.currentTimeMillis(); long sz = f.length(); double rate = 1000.0 * sz / (endTime-startTime); outsb.append("Upload rate: "+rate+" bytes / second"); } if(e.errorCodes != null) { outsb.append("Splitfile errors breakdown:"); outsb.append(e.errorCodes.toVerboseString()); } } catch (Throwable t) { outsb.append("Insert threw: "+t); t.printStackTrace(); } } else if(uline.startsWith("MAKESSK")) { InsertableClientSSK key = InsertableClientSSK.createRandom(r); outsb.append("Insert URI: "+key.getInsertURI().toString(false)); outsb.append("Request URI: "+key.getURI().toString(false)); FreenetURI insertURI = key.getInsertURI().setDocName("testsite"); String fixedInsertURI = insertURI.toString(false); outsb.append("Note that you MUST add a filename to the end of the above URLs e.g.:\r\n"+fixedInsertURI); outsb.append("Normally you will then do PUTSSKDIR:<insert URI>#<directory to upload>, for example:\r\nPUTSSKDIR:"+fixedInsertURI+"#directoryToUpload/"); outsb.append("This will then produce a manifest site containing all the files, the default document can be accessed at\r\n"+insertURI.addMetaStrings(new String[] { "" }).toString(false)); } else if(uline.startsWith("PUTSSK:")) { String cmd = line.substring("PUTSSK:".length()); cmd = cmd.trim(); if(cmd.indexOf(';') <= 0) { outsb.append("No target URI provided."); outsb.append("PUTSSK:<insert uri>;<url to redirect to>"); return; } String[] split = cmd.split(";"); String insertURI = split[0]; String targetURI = split[1]; outsb.append("Insert URI: "+insertURI); outsb.append("Target URI: "+targetURI); FreenetURI insert = new FreenetURI(insertURI); FreenetURI target = new FreenetURI(targetURI); try { FreenetURI result = client.insertRedirect(insert, target); outsb.append("Successfully inserted to fetch URI: "+result); } catch (InserterException e) { outsb.append("Finished insert but: "+e.getMessage()); Logger.normal(this, "Error: "+e, e); if(e.uri != null) { outsb.append("URI would have been: "+e.uri); } } } else if(uline.startsWith("STATUS")) { SimpleFieldSet fs = n.exportFieldSet(); outsb.append(fs.toString()); outsb.append(n.getStatus()); if(Version.buildNumber()<Version.highestSeenBuild){ outsb.append("The latest version is : "+Version.highestSeenBuild); } } else if(uline.startsWith("CONNECT:")) { String key = line.substring("CONNECT:".length()); while(key.length() > 0 && key.charAt(0) == ' ') key = key.substring(1); while(key.length() > 0 && key.charAt(key.length()-1) == ' ') key = key.substring(0, key.length()-2); String content = null; if(key.length() > 0) { // Filename BufferedReader in; outsb.append("Trying to connect to noderef in "+key); File f = new File(key); if (f.isFile()) { outsb.append("Given string seems to be a file, loading..."); in = new BufferedReader(new FileReader(f)); } else { outsb.append("Given string seems to be an URL, loading..."); URL url = new URL(key); URLConnection uc = url.openConnection(); in = new BufferedReader( new InputStreamReader(uc.getInputStream())); } content = readLines(in, true); in.close(); } else { content = readLines(reader, true); } if(content == null) return; if(content.equals("")) return; connect(content); } else if(uline.startsWith("NAME:")) { outsb.append("Node name currently: "+n.myName); String key = line.substring("NAME:".length()); while(key.length() > 0 && key.charAt(0) == ' ') key = key.substring(1); while(key.length() > 0 && key.charAt(key.length()-1) == ' ') key = key.substring(0, key.length()-2); outsb.append("New name: "+key); n.setName(key); } else if(uline.startsWith("DISCONNECT:")) { String ipAndPort = line.substring("DISCONNECT:".length()); disconnect(ipAndPort.trim()); } else if(uline.startsWith("PLUGLOAD:")) { if (line.substring("PLUGLOAD:".length()).trim().equals("?")) { outsb.append(" PLUGLOAD: pkg.Class - Load plugin from current classpath"); outsb.append(" PLUGLOAD: pkg.Class@file:<filename> - Load plugin from file"); outsb.append(" PLUGLOAD: pkg.Class@http://... - Load plugin from online file"); outsb.append(" PLUGLOAD: *@... - Load plugin from manifest in given jarfile"); outsb.append(""); outsb.append("If the filename/url ends with \".url\", it" + " is treated as a link, meaning that the first line is" + " the accual URL. Else it is loaded as classpath and" + " the class it loaded from it (meaning the file could" + " be either a jar-file or a class-file)."); outsb.append(""); outsb.append(" PLUGLOAD: pkg.Class* - Load newest version of plugin from http://downloads.freenetproject.org/alpha/plugins/"); outsb.append(""); } else n.pluginManager.startPlugin(line.substring("PLUGLOAD:".length()).trim()); //outsb.append("PLUGLOAD: <pkg.classname>[(@<URI to jarfile.jar>|<<URI to file containing real URI>|* (will load from freenets pluginpool))] - Load plugin."); } else if(uline.startsWith("PLUGLIST")) { outsb.append(n.pluginManager.dumpPlugins()); } else if(uline.startsWith("PLUGKILL:")) { n.pluginManager.killPlugin(line.substring("PLUGKILL:".length()).trim()); } else { if(uline.length() > 0) printHeader(out); } outsb.append("\r\n"); out.write(outsb.toString().getBytes()); out.flush(); } | 46035 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46035/8fb84ecb4f999d46d9f08a051b57d64c234b5ce4/TextModeClientInterface.java/buggy/src/freenet/node/TextModeClientInterface.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
1670,
12,
17947,
2514,
2949,
16,
8962,
596,
13,
1216,
1860,
288,
3639,
514,
980,
31,
3639,
6674,
596,
18366,
273,
394,
6674,
5621,
3639,
775,
288,
5411,
980,
273,
2949,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
1670,
12,
17947,
2514,
2949,
16,
8962,
596,
13,
1216,
1860,
288,
3639,
514,
980,
31,
3639,
6674,
596,
18366,
273,
394,
6674,
5621,
3639,
775,
288,
5411,
980,
273,
2949,
... |
BlockedMessage(Message message, String to) | BlockedMessage(Message message, String to, GUID id) | BlockedMessage(Message message, String to) { m_destination = to; m_message = message; m_id = new GUID(); } | 8339 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8339/597252b27df83a0bb5d6caf9c23246d7735a2bc6/BlockedMessage.java/buggy/src/games/strategy/engine/message/BlockedMessage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3914,
329,
1079,
12,
1079,
883,
16,
514,
358,
16,
20322,
612,
13,
225,
202,
95,
202,
202,
81,
67,
10590,
273,
358,
31,
202,
202,
81,
67,
2150,
273,
883,
31,
202,
202,
81,
67,
350,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3914,
329,
1079,
12,
1079,
883,
16,
514,
358,
16,
20322,
612,
13,
225,
202,
95,
202,
202,
81,
67,
10590,
273,
358,
31,
202,
202,
81,
67,
2150,
273,
883,
31,
202,
202,
81,
67,
350,
... |
l = l - (hours * (60*60)); | l = l - ((long)hours * ((long)60*60*1000)); | public static String formatTime(long timeInterval, int maxTerms) { StringBuffer sb = new StringBuffer(64); long l = timeInterval / 1000; // ms -> s int termCount = 0; // int weeks = (int)(l / (7*24*60*60)); if (weeks > 0) { sb.append(weeks + "w"); termCount++; l = l - (weeks * (7*24*60*60)); } // int days = (int)(l / (24*60*60)); if (days > 0) { sb.append(days + "d"); termCount++; l = l - (days * (24*60*60)); } if(termCount >= maxTerms) { return sb.toString(); } // int hours = (int)(l / (60*60)); if (hours > 0) { sb.append(hours + "h"); termCount++; l = l - (hours * (60*60)); } if(termCount >= maxTerms) { return sb.toString(); } // int minutes = (int)(l / 60); if (minutes > 0) { sb.append(minutes + "m"); termCount++; l = l - (minutes * 60); } if(termCount >= maxTerms) { return sb.toString(); } // sb.append(l + "s"); return sb.toString(); } | 50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/e3e1385af7111953dc0be72e3d64baca37a22231/TimeUtil.java/clean/src/freenet/support/TimeUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
740,
950,
12,
5748,
813,
4006,
16,
509,
943,
11673,
13,
288,
202,
202,
780,
1892,
2393,
273,
394,
6674,
12,
1105,
1769,
202,
202,
5748,
328,
273,
813,
4006,
342,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
740,
950,
12,
5748,
813,
4006,
16,
509,
943,
11673,
13,
288,
202,
202,
780,
1892,
2393,
273,
394,
6674,
12,
1105,
1769,
202,
202,
5748,
328,
273,
813,
4006,
342,
4... |
fSchemaLoader.setEntityResolver(getEntityResolver()); | XMLEntityResolver resolver = getEntityResolver(); if(resolver != null) { fSchemaLoader.setEntityResolver(resolver); } | SchemaGrammar parseXMLSchema(XMLInputSource is) throws IOException { fSchemaLoader.setEntityResolver(getEntityResolver()); fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter); String propPrefix = Constants.XERCES_PROPERTY_PREFIX; String propName = propPrefix + Constants.SCHEMA_LOCATION; fSchemaLoader.setProperty(propName, getProperty(propName)); propName = propPrefix + Constants.SCHEMA_NONS_LOCATION; fSchemaLoader.setProperty(propName, getProperty(propName)); propName = Constants.JAXP_PROPERTY_PREFIX+Constants.SCHEMA_SOURCE; fSchemaLoader.setProperty(propName, getProperty(propName)); fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, getFeature(SCHEMA_FULL_CHECKING)); // Should check whether the grammar with this namespace is already in // the grammar resolver. But since we don't know the target namespace // of the document here, we leave such check to XSDHandler fSchemaLoader.reset(); SchemaGrammar grammar = (SchemaGrammar)fSchemaLoader.loadGrammar(is); // by default, hand it off to the grammar pool if (grammar != null) { fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA, new Grammar[]{grammar}); } return grammar; } // parseXMLSchema(XMLInputSource) : SchemaGrammar | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/65f78a97c0a14a154e0ca81535580f92c0bdcc80/XMLGrammarCachingConfiguration.java/buggy/src/org/apache/xerces/parsers/XMLGrammarCachingConfiguration.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4611,
18576,
1109,
4201,
3078,
12,
4201,
1210,
1830,
353,
13,
1171,
1216,
1860,
288,
4202,
1139,
9687,
1628,
4301,
5039,
273,
6352,
4301,
5621,
309,
12,
14122,
480,
446,
13,
288,
284,
307... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4611,
18576,
1109,
4201,
3078,
12,
4201,
1210,
1830,
353,
13,
1171,
1216,
1860,
288,
4202,
1139,
9687,
1628,
4301,
5039,
273,
6352,
4301,
5621,
309,
12,
14122,
480,
446,
13,
288,
284,
307... |
public void setLocale (Locale locale) | public void setLocale(Locale locale) | public void setLocale (Locale locale) throws SAXException { aelfred2.setLocale (locale); } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/0820da75b03035b7198673adb4bd8108184d0cd8/XmlReader.java/buggy/libraries/javalib/gnu/xml/aelfred2/XmlReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
19848,
12,
3916,
2573,
13,
565,
1216,
14366,
202,
95,
279,
19079,
1118,
22,
18,
542,
3916,
261,
6339,
1769,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
19848,
12,
3916,
2573,
13,
565,
1216,
14366,
202,
95,
279,
19079,
1118,
22,
18,
542,
3916,
261,
6339,
1769,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public void unparse(XmlaResponse response) throws XmlaException { Connection connection = handler.getConnection(request); if (connection == null) { return; } final RolapSchema schema = (RolapSchema) connection.getSchema(); FunTable funTable = schema.getFunTable(); StringBuffer buf = new StringBuffer(50); List functions = funTable.getFunInfoList(); for (Iterator it = functions.iterator(); it.hasNext(); ) { FunInfo fi = (FunInfo) it.next(); int[][] paramCategories = fi.getParameterCategories(); int[] returnCategories = fi.getReturnCategories(); // Convert Windows newlines in 'description' to UNIX format. String description = fi.getDescription(); if (description != null) { description = Util.replace(fi.getDescription(), "\r", ""); } if ((paramCategories == null) || (paramCategories.length == 0)) { Row row = new Row(); row.set(FunctionName.name, fi.getName()); row.set(Description.name, description); row.set(ParameterList.name, "(none)"); row.set(ReturnType.name, 1); row.set(Origin.name, 1); //row.set(LibraryName.name, ""); // TODO WHAT VALUE should this have row.set(InterfaceName.name, ""); row.set(Caption.name, fi.getName()); emit(row, response); } else { for (int i = 0; i < paramCategories.length; i++) { int[] pc = paramCategories[i]; int returnCategory = returnCategories[i]; Row row = new Row(); row.set(FunctionName.name, fi.getName()); row.set(Description.name, description); buf.setLength(0); for (int j = 0; j < pc.length; j++) { int v = pc[j]; if (j > 0) { buf.append(", "); } buf.append(Category.instance.getDescription(v & Category.Mask)); } row.set(ParameterList.name, buf.toString()); int varType = VarType.convertCategory(returnCategory); row.set(ReturnType.name, varType); //TODO: currently FunInfo can not tell us which // functions are MDX and which are UDFs. row.set(Origin.name, 1); // TODO: Name of the type library for UDFs. NULL for MDX // functions. //row.set(LibraryName.name, ""); // TODO: Name of the interface for UDF and Group name // for the MDX functions. // TODO WHAT VALUE should this have row.set(InterfaceName.name, ""); row.set(Caption.name, fi.getName()); emit(row, response); } } } } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/60c8ed092a156642741851ef0b37808396a86dcd/RowsetDefinition.java/buggy/src/main/mondrian/xmla/RowsetDefinition.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
318,
2670,
12,
4432,
69,
607,
500,
550,
281,
575,
13,
15069,
4432,
69,
503,
95,
1952,
4071,
33,
4176,
18,
588,
1952,
12,
2293,
1769,
430,
12,
4071,
631,
2011,
15329,
2463,
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,
1071,
6459,
318,
2670,
12,
4432,
69,
607,
500,
550,
281,
575,
13,
15069,
4432,
69,
503,
95,
1952,
4071,
33,
4176,
18,
588,
1952,
12,
2293,
1769,
430,
12,
4071,
631,
2011,
15329,
2463,
31,
... | ||
public static double jsFunction_charCodeAt(Context cx, Scriptable thisObj, Object[] args, Function funObj) | private static double jsFunction_charCodeAt(String target, Object[] args) | public static double jsFunction_charCodeAt(Context cx, Scriptable thisObj, Object[] args, Function funObj) { if (args.length < 1) args = ScriptRuntime.padArguments(args, 1); String target = ScriptRuntime.toString(thisObj); double pos = ScriptRuntime.toInteger(args[0]); if (pos < 0 || pos >= target.length()) { return ScriptRuntime.NaN; } return target.charAt((int)pos); } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/b6331020dcf96bb85dae57ee2a2ce947b6b0477a/NativeString.java/clean/js/rhino/src/org/mozilla/javascript/NativeString.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1645,
3828,
2083,
67,
3001,
1085,
861,
12,
1042,
9494,
16,
22780,
15261,
16,
4766,
9079,
1033,
8526,
833,
16,
4284,
9831,
2675,
13,
565,
288,
3639,
309,
261,
1968,
18,
2469,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1645,
3828,
2083,
67,
3001,
1085,
861,
12,
1042,
9494,
16,
22780,
15261,
16,
4766,
9079,
1033,
8526,
833,
16,
4284,
9831,
2675,
13,
565,
288,
3639,
309,
261,
1968,
18,
2469,
... |
if ( prefix.length()==0 && uriStr.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA) && fTargetNSURIString.length() == 0) { uriStr = ""; } | private String resolvePrefixToURI (String prefix) throws Exception { String uriStr = fStringPool.toString(fNamespacesScope.getNamespaceForPrefix(fStringPool.addSymbol(prefix))); if (uriStr.length() == 0 && prefix.length() > 0) { // REVISIT: Localize reportGenericSchemaError("prefix : [" + prefix +"] cannot be resolved to a URI"); return ""; } //REVISIT, !!!! a hack: needs to be updated later, cause now we only use localpart to key build-in datatype. if ( prefix.length()==0 && uriStr.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA) && fTargetNSURIString.length() == 0) { uriStr = ""; } return uriStr; } | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/1b10c9f3b8adb38cd67d089a0532ba4fae4288c5/TraverseSchema.java/buggy/src/org/apache/xerces/validators/schema/TraverseSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
2245,
2244,
774,
3098,
261,
780,
1633,
13,
1216,
1185,
225,
288,
3639,
514,
2003,
1585,
273,
284,
780,
2864,
18,
10492,
12,
74,
13180,
3876,
18,
588,
3402,
1290,
2244,
12,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
2245,
2244,
774,
3098,
261,
780,
1633,
13,
1216,
1185,
225,
288,
3639,
514,
2003,
1585,
273,
284,
780,
2864,
18,
10492,
12,
74,
13180,
3876,
18,
588,
3402,
1290,
2244,
12,
74... | |
Element problemClassElement = new Element(InspectionsBundle.message("inspection.export.results.problem.element.tag")); | @NonNls Element problemClassElement = new Element(InspectionsBundle.message("inspection.export.results.problem.element.tag")); | public void visitElement(final RefEntity refEntity) { if (myProblemElements.containsKey(refEntity)) { CommonProblemDescriptor[] descriptions = getDescriptions(refEntity); for (CommonProblemDescriptor description : descriptions) { @NonNls final String template = description.getDescriptionTemplate(); int line = description instanceof ProblemDescriptor ? ((ProblemDescriptor)description).getLineNumber() : -1; final String text = description instanceof ProblemDescriptor ? ((ProblemDescriptor)description).getPsiElement().getText() : ""; @NonNls String problemText = template.replaceAll("#ref", text.replaceAll("\\$", "\\\\\\$")); problemText = problemText.replaceAll(" #loc ", " "); Element element = XMLExportUtl.createElement(refEntity, parentNode, line); Element problemClassElement = new Element(InspectionsBundle.message("inspection.export.results.problem.element.tag")); problemClassElement.addContent(getDisplayName()); element.addContent(problemClassElement); try { Element descriptionElement = new Element(InspectionsBundle.message("inspection.export.results.description.tag")); descriptionElement.addContent(problemText); element.addContent(descriptionElement); } catch (IllegalDataException e) { //noinspection HardCodedStringLiteral,UseOfSystemOutOrSystemErr System.out.println("Cannot save results for " + refEntity.getName()); } } } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/0fbd9215ceaf4861563f4ac803043c372346957f/DescriptorProviderInspection.java/buggy/inspections/impl/com/intellij/codeInspection/ex/DescriptorProviderInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
3757,
1046,
12,
6385,
3941,
1943,
1278,
1943,
13,
288,
3639,
309,
261,
4811,
13719,
3471,
18,
12298,
653,
12,
1734,
1943,
3719,
288,
1850,
5658,
13719,
3187,
8526,
15550,
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,
4202,
1071,
918,
3757,
1046,
12,
6385,
3941,
1943,
1278,
1943,
13,
288,
3639,
309,
261,
4811,
13719,
3471,
18,
12298,
653,
12,
1734,
1943,
3719,
288,
1850,
5658,
13719,
3187,
8526,
15550,
273,
... |
options = XmlOptions.maskNull( options ); boolean inner = options.hasOption( XmlOptions.SAVE_INNER ) && !options.hasOption( XmlOptions.SAVE_OUTER ); XMLStreamReaderBase xs; int k = c.kind(); if (k == Cur.TEXT) { xs = new XMLStreamReaderForString( c, c.getChars( -1 ), c._offSrc, c._cchSrc ); } else if (inner) { if (!c.hasAttrs() && !c.hasChildren()) xs = new XMLStreamReaderForString( c, c.getValueChars(), c._offSrc, c._cchSrc ); else { assert c.isContainer(); xs = new XMLStreamReaderForNode( c, true ); } } else xs = new XMLStreamReaderForNode( c, false ); | XMLStreamReaderBase xs = new XMLStreamReaderForString( c, src, off, cch ); | public static XMLStreamReader newXmlStreamReader ( Cur c, XmlOptions options ) { options = XmlOptions.maskNull( options ); boolean inner = options.hasOption( XmlOptions.SAVE_INNER ) && !options.hasOption( XmlOptions.SAVE_OUTER ); XMLStreamReaderBase xs; int k = c.kind(); if (k == Cur.TEXT) { xs = new XMLStreamReaderForString( c, c.getChars( -1 ), c._offSrc, c._cchSrc ); } else if (inner) { if (!c.hasAttrs() && !c.hasChildren()) xs = new XMLStreamReaderForString( c, c.getValueChars(), c._offSrc, c._cchSrc ); else { assert c.isContainer(); xs = new XMLStreamReaderForNode( c, true ); } } else xs = new XMLStreamReaderForNode( c, false ); if (c._locale.noSync()) return new UnsyncedJsr173( c._locale, xs ); else return new SyncedJsr173( c._locale, xs ); } | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/0348e161e0d123181c6f12c1786a8041f483033c/Jsr173.java/buggy/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/Jsr173.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15595,
2514,
394,
4432,
31495,
261,
7251,
276,
16,
5714,
1320,
702,
262,
565,
288,
3639,
702,
273,
5714,
1320,
18,
4455,
2041,
12,
702,
11272,
7734,
1250,
3443,
273,
2398,
702,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15595,
2514,
394,
4432,
31495,
261,
7251,
276,
16,
5714,
1320,
702,
262,
565,
288,
3639,
702,
273,
5714,
1320,
18,
4455,
2041,
12,
702,
11272,
7734,
1250,
3443,
273,
2398,
702,... |
|| (distance[i] == distance[ownerIndex])) { | || (distance[i] == distance[ownerIndex])) { | private int [] refineOwners(Instances centers, int [] candidates) throws Exception { int [] owners = new int [candidates.length]; double minDistance = Double.MAX_VALUE; int ownerIndex = -1; Instance owner; int numCand = candidates.length; double [] distance = new double[numCand]; boolean [] inside = new boolean[numCand]; for (int i = 0; i < numCand; i++) { distance[i] = distanceToHrect(centers.instance(candidates[i])); inside[i] = (distance[i] == 0.0); if (distance[i] < minDistance) { minDistance = distance[i]; ownerIndex = i; } } owner = new Instance(centers.instance(candidates[ownerIndex])); // are there other owners // loop also goes over already found owner, keeps order // in owner list int index = 0; for (int i = 0; i < numCand; i++) { // 1. all centers that are points within rectangle are owners if ((inside[i]) // 2. take all points with same distance to the rect. as the owner || (distance[i] == distance[ownerIndex])) { // add competitor to owners list owners[index++] = candidates[i]; } else { Instance competitor = new Instance(centers.instance(candidates[i])); if // 3. point has larger distance to rectangle but still can compete // with owner for some points in the rectangle (!candidateIsFullOwner(owner, competitor)) { // also add competitor to owners list owners[index++] = candidates[i]; } } } int [] result = new int [index]; for (int i = 0; i < index; i++) result[i] = owners[i]; return result; } | 4179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4179/aaff809b64947beaad850c99a9646d87e9236916/KDTree.java/clean/trunk/weka/core/KDTree.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
5378,
30446,
5460,
414,
12,
5361,
17723,
16,
509,
5378,
7965,
13,
4202,
1216,
1185,
288,
5411,
509,
5378,
25937,
273,
394,
509,
306,
21635,
18,
2469,
15533,
1377,
1645,
1131,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
5378,
30446,
5460,
414,
12,
5361,
17723,
16,
509,
5378,
7965,
13,
4202,
1216,
1185,
288,
5411,
509,
5378,
25937,
273,
394,
509,
306,
21635,
18,
2469,
15533,
1377,
1645,
1131,
7... |
len = System.in.read(buf); String amount = new String(buf, 0, len - 1); | System.in.read(buf); String amount = new String(buf).trim(); | private static CustomerQuoteRequest getRequestFromUser() throws IOException { byte[] buf = new byte[128]; System.out.println("Enter your name:"); int len = System.in.read(buf); String name = new String(buf, 0, len - 1); System.out.println("Enter loan Amount:"); buf = new byte[16]; len = System.in.read(buf); String amount = new String(buf, 0, len - 1); System.out.println("Enter loan Duration in months:"); buf = new byte[16]; len = System.in.read(buf); String duration = new String(buf, 0, len - 1); int d = 0; try { d = Integer.parseInt(duration); } catch (NumberFormatException e) { System.out.println("Failed to parse duration: " + duration + ". Using random default"); d = getRandomDuration(); } double a = 0; try { a = Double.valueOf(amount).doubleValue(); } catch (NumberFormatException e) { System.out.println("Failed to parse amount: " + amount + ". Using random default"); a = getRandomAmount(); } Customer c = new Customer(name, getRandomSsn()); CustomerQuoteRequest request = new CustomerQuoteRequest(c, a, d); return request; } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/a5836db0bf2017758b5ff620486665e9a5d63efe/Main.java/buggy/samples/loanbroker-esb/src/java/org/mule/samples/loanbroker/esb/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
13702,
10257,
691,
4328,
1265,
1299,
1435,
1216,
1860,
288,
3639,
1160,
8526,
1681,
273,
394,
1160,
63,
10392,
15533,
3639,
2332,
18,
659,
18,
8222,
2932,
10237,
3433,
508,
2773,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13702,
10257,
691,
4328,
1265,
1299,
1435,
1216,
1860,
288,
3639,
1160,
8526,
1681,
273,
394,
1160,
63,
10392,
15533,
3639,
2332,
18,
659,
18,
8222,
2932,
10237,
3433,
508,
2773,... |
} | if (securityManagerBeanName != null){ ApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext( config.getServletContext() ); this.securityManager = (CosmoSecurityManager) ctx.getBean(securityManagerBeanName); } else { log.warn("No security manager registered for " + "HttpLoggingFilter. Authentication information" + "will not be available."); } String format = config.getInitParameter("format"); if (format != null){ this.format = format; } } | public void init(FilterConfig arg0) throws ServletException { // Nothing to create } | 47226 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47226/f96055280a1704ad319a2b647dbf9996bd0a2341/HttpLoggingFilter.java/clean/src/main/java/org/osaf/cosmo/log/HttpLoggingFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1208,
12,
1586,
809,
1501,
20,
13,
1216,
16517,
288,
202,
202,
759,
13389,
358,
752,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1208,
12,
1586,
809,
1501,
20,
13,
1216,
16517,
288,
202,
202,
759,
13389,
358,
752,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
invokeBody( output ); | final String processName = this.name; | public void doTag(XMLOutput output) throws Exception { if ( this.name == null ) { throw new MissingAttributeException( "name" ); } invokeBody( output ); final Process process = getProcess( this.name ); if ( process == null ) { throw new JellyException( "No such process \"" + this.name + "\"" ); } Context blissedContext = (Context) getContext().getVariable( "blissed.context" ); if ( blissedContext == null ) { throw new JellyException( "No blissed Context" ); } process.accept( blissedContext ); } | 4520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4520/e5e57ba2c05a306a3dc42a44c320b15377b67948/DoProcessTag.java/clean/blissed/src/java/main/com/werken/blissed/jelly/DoProcessTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
1805,
12,
4201,
1447,
876,
13,
1216,
1185,
565,
288,
3639,
309,
261,
333,
18,
529,
422,
446,
262,
3639,
288,
5411,
604,
394,
10230,
1499,
503,
12,
315,
529,
6,
11272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
1805,
12,
4201,
1447,
876,
13,
1216,
1185,
565,
288,
3639,
309,
261,
333,
18,
529,
422,
446,
262,
3639,
288,
5411,
604,
394,
10230,
1499,
503,
12,
315,
529,
6,
11272,
... |
"Your submission will NOT be recorded unless you click the 'Submit' button on this page!</b></p>"); | "Your submission will NOT be recorded unless you click the 'Submit' button on this page!</b></p>"); | public void doSubmit(WebContext ctx) { if((ctx.session.user == null) || (ctx.session.user.email == null)) { ctx.println("Not logged in... please see this help link: "); ctx.printHelpLink("/NoUser"); ctx.println("<p>"); ctx.println("<i>Note: if you used the 'back' button on your browser, please instead use " + " the URL link that was emailed to you. </i>"); printFooter(ctx); return; } UserRegistry.User u = ctx.session.user; if(u == null) { u = reg.getEmptyUser(); } WebContext subContext = new WebContext(ctx); subContext.addQuery("submit","post"); boolean post = (ctx.field("submit").equals("post")); if(post == false) { ctx.println("<p class='hang'><B>Please read the following carefully. If there are any errors, hit Back and correct them. " + "Your submission will NOT be recorded unless you click the 'Submit' button on this page!</b></p>"); { subContext.println("<form method=POST action='" + subContext.base() + "'>"); subContext.printUrlAsHiddenFields(); subContext.println("<input type=submit value='Submit'>"); subContext.println("</form>"); } } else { ctx.println("<h2>Submitted the following changes:</h2><br/>"); { ctx.println("<form method=GET action='" + ctx.base() + "'>"); ctx.println("<input type=hidden name=uid value='" + ctx.session.user.id + "'> " + // NULL PTR "<input type=hidden name=email value='" + ctx.session.user.email + "'>"); ctx.println("<input type=submit value='Login Again'>"); ctx.println("</form>"); } } ctx.println("<hr/>"); ctx.println("<div class=pager>"); ctx.println("You: " + u.name + " <" + u.email + "><br/>"); ctx.println("Your sponsor: " + u.org); ctx.println("</div>"); File sessDir = new File(vetweb + "/" + u.email + "/" + ctx.session.id); if(post) { sessDir.mkdirs(); } String changedList = ""; Hashtable lh = ctx.session.getLocales(); Enumeration e = lh.keys(); String fullBody = ""; if(e.hasMoreElements()) { for(;e.hasMoreElements();) { String k = e.nextElement().toString(); String displayName = new ULocale(k).getDisplayName(); ctx.println("<hr/>"); ctx.println("<H3>" + displayName+ "</h3>"); if(!post) { ctx.println("<a class='pager' style='float: right;' href='" + ctx.url() + "&_=" + k + "&x=" + xREMOVE + "'>[Cancel This Edit]</a>"); } CLDRFile f = createCLDRFile(ctx, k, (Hashtable)lh.get(k)); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); f.write(pw); String asString = sw.toString(); fullBody = fullBody + "-------------" + "\n" + k + ".xml - " + displayName + "\n" + hexXML.transliterate(asString); String asHtml = TransliteratorUtilities.toHTML.transliterate(asString); ctx.println("<pre>" + asHtml + "</pre>"); File xmlFile = new File(sessDir, k + ".xml"); if(post) { try { changedList = changedList + " " + k; PrintWriter pw2 = BagFormatter.openUTF8Writer(sessDir + File.separator, k+".xml"); f.write(pw2); pw2.close(); ctx.println("<b>File Written.</b><br/>"); } catch(Throwable t) { // TODO: log?? ctx.println("<b>Couldn't write the file "+ k + ".xml</b> because: <br/>"); ctx.println(t.toString()); t.printStackTrace(); ctx.println("<p>"); } } } } ctx.println("<hr/>"); if(post == false) { subContext.println("<form method=POST action='" + subContext.base() + "'>"); subContext.printUrlAsHiddenFields(); subContext.println("<input type=submit value='Submit'>"); subContext.println("</form>"); } else { String body = "User: " + u.name + " <" + u.email + "> for " + u.org + "\n" + "Submitted data for: " + changedList + "\n" + "Session ID: " + ctx.session.id + "\n"; String smtp = survprops.getProperty("CLDR_SMTP","127.0.0.1"); if(smtp == null) { ctx.println("<i>Not sending mail- SMTP disabled.</i><br/>"); } else { MailSender.sendMail(u.email, "CLDR: Receipt of your data submission ", "Submission from IP: " + ctx.userIP() + "\n" + body + "\n The files submitted are attached below: \n" + fullBody ); MailSender.sendMail(survprops.getProperty("CLDR_NOTIFY"), "CLDR: from " + u.org + "/" + u.email + ": " + changedList, "URL: " + survprops.getProperty("CLDR_VET_WEB_URL","file:///dev/null") + u.email + "/" + ctx.session.id + "\n" + body); ctx.println("Thank you.. An email has been sent to the CLDR Vetting List and to you at " + u.email + ".<br/>"); } logger.info( "Data submitted: " + u.name + " <" + u.email + "> Sponsor: " + u.org + ": " + changedList + " " + " (user ID " + u.id + ", session " + ctx.session.id + " )" ); // destroy session { ctx.println("<form method=GET action='" + ctx.base() + "'>"); ctx.println("<input type=hidden name=uid value='" + ctx.session.user.id + "'> " + // NULL PTR "<input type=hidden name=email value='" + ctx.session.user.email + "'>"); ctx.println("<input type=submit value='Login Again'>"); ctx.println("</form>"); } ctx.session.remove(); } printFooter(ctx); } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/10ccfe126293a4e5e988763ac1f087943beb73b4/SurveyMain.java/clean/tools/java/org/unicode/cldr/web/SurveyMain.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
11620,
12,
4079,
1042,
1103,
13,
565,
288,
3639,
309,
12443,
5900,
18,
3184,
18,
1355,
422,
446,
13,
747,
5411,
261,
5900,
18,
3184,
18,
1355,
18,
3652,
422,
446,
3719,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
11620,
12,
4079,
1042,
1103,
13,
565,
288,
3639,
309,
12443,
5900,
18,
3184,
18,
1355,
422,
446,
13,
747,
5411,
261,
5900,
18,
3184,
18,
1355,
18,
3652,
422,
446,
3719,
... |
if (this.finishedDocument == false && transformerHandler != null) { | if (!this.finishedDocument && transformerHandler != null) { | public void recycle() { this.objectModel = null; if (this.inputSource != null) { this.resolver.release(this.inputSource); this.inputSource = null; } this.resolver = null; this.par = null; if (this.finishedDocument == false && transformerHandler != null) { // This situation will only occur if an exception occured during pipeline execution. // If Xalan is used in incremental mode, it is important that endDocument is called, otherwise // the thread on which it runs the transformation will keep waiting. // However, calling endDocument will cause the pipeline to continue executing, and thus the // serializer will write output to the outputstream after what's already there (the error page), // see also bug 13186. if (xalanDtmManagerGetIncrementalMethod != null && transformerHandler.getClass().getName().equals("org.apache.xalan.transformer.TransformerHandlerImpl")) { try { boolean incremental = ((Boolean)xalanDtmManagerGetIncrementalMethod.invoke(null, null)).booleanValue(); if (incremental) super.endDocument(); } catch (Exception ignore) {} } } this.finishedDocument = false; this.logicSheetParameters = null; this.transformerHandler = null; this.transformerValidity = null; super.recycle(); } | 46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/5d717a209e4e27f236784a21884e247d44112925/TraxTransformer.java/buggy/src/java/org/apache/cocoon/transformation/TraxTransformer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
23493,
1435,
288,
3639,
333,
18,
1612,
1488,
273,
446,
31,
3639,
309,
261,
2211,
18,
2630,
1830,
480,
446,
13,
288,
5411,
333,
18,
14122,
18,
9340,
12,
2211,
18,
2630,
1830,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23493,
1435,
288,
3639,
333,
18,
1612,
1488,
273,
446,
31,
3639,
309,
261,
2211,
18,
2630,
1830,
480,
446,
13,
288,
5411,
333,
18,
14122,
18,
9340,
12,
2211,
18,
2630,
1830,
... |
int index = layers.locationToIndex(e.getPoint()); Layer layer = (Layer)layers.getModel().getElementAt(index); LayerListPopup menu = new LayerListPopup(layers, layer); | int index = instance.locationToIndex(e.getPoint()); Layer layer = (Layer)instance.getModel().getElementAt(index); LayerListPopup menu = new LayerListPopup(instance, layer); | public LayerList(MapFrame mapFrame) { super("Layers", "layerlist", "Open a list of all loaded layers.", KeyEvent.VK_L); setPreferredSize(new Dimension(320,100)); add(new JScrollPane(layers), BorderLayout.CENTER); layers.setBackground(UIManager.getColor("Button.background")); layers.setCellRenderer(new DefaultListCellRenderer(){ @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { Layer layer = (Layer)value; JLabel label = (JLabel)super.getListCellRendererComponent(list, layer.name, index, isSelected, cellHasFocus); Icon icon = layer.getIcon(); if (!layer.visible) icon = ImageProvider.overlay(icon, "overlay/invisible", OverlayPosition.SOUTHEAST); label.setIcon(icon); label.setToolTipText(layer.getToolTipText()); return label; } }); final MapView mapView = mapFrame.mapView; Collection<Layer> data = mapView.getAllLayers(); for (Layer l : data) model.addElement(l); layers.setSelectedValue(mapView.getActiveLayer(), true); layers.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); layers.addListSelectionListener(new ListSelectionListener(){ public void valueChanged(ListSelectionEvent e) { if (layers.getModel().getSize() == 0) return; if (layers.getSelectedIndex() == -1) layers.setSelectedIndex(e.getFirstIndex()); mapView.setActiveLayer((Layer)layers.getSelectedValue()); } }); mapView.addLayerChangeListener(this); layers.addMouseListener(new MouseAdapter(){ private void openPopup(MouseEvent e) { int index = layers.locationToIndex(e.getPoint()); Layer layer = (Layer)layers.getModel().getElementAt(index); LayerListPopup menu = new LayerListPopup(layers, layer); menu.show(LayerList.this, e.getX(), e.getY()); } @Override public void mousePressed(MouseEvent e) { if (e.isPopupTrigger()) openPopup(e); } @Override public void mouseReleased(MouseEvent e) { if (e.isPopupTrigger()) openPopup(e); } }); // Buttons JPanel buttonPanel = new JPanel(new GridLayout(1, 5)); ActionListener upDown = new ActionListener(){ public void actionPerformed(ActionEvent e) { Layer l = (Layer)layers.getSelectedValue(); int sel = layers.getSelectedIndex(); int selDest = e.getActionCommand().equals("up") ? sel-1 : sel+1; mapView.moveLayer(l, selDest); model.set(sel, model.get(selDest)); model.set(selDest, l); layers.setSelectedIndex(selDest); updateButtonEnabled(); mapView.repaint(); } }; upButton.setToolTipText("Move the selected layer one row up."); upButton.addActionListener(upDown); upButton.setActionCommand("up"); buttonPanel.add(upButton); downButton.setToolTipText("Move the selected layer one row down."); downButton.addActionListener(upDown); downButton.setActionCommand("down"); buttonPanel.add(downButton); JButton showHideButton = new JButton(new ShowHideLayerAction(layers, null)); showHideButton.setText(""); buttonPanel.add(showHideButton); JButton deleteButton = new JButton(deleteAction); deleteButton.setText(""); buttonPanel.add(deleteButton); mergeButton.setToolTipText("Merge the selected layer into the layer directly below."); mergeButton.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { Layer lFrom = (Layer)layers.getSelectedValue(); Layer lTo = (Layer)model.get(layers.getSelectedIndex()+1); lTo.mergeFrom(lFrom); layers.setSelectedValue(lTo, true); mapView.removeLayer(lFrom); } }); buttonPanel.add(mergeButton); add(buttonPanel, BorderLayout.SOUTH); updateButtonEnabled(); } | 2204 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2204/1148dec067fa8cea10eb107b05a9b9adf23441c9/LayerList.java/buggy/src/org/openstreetmap/josm/gui/dialogs/LayerList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
12112,
682,
12,
863,
3219,
852,
3219,
13,
288,
202,
202,
9565,
2932,
9282,
3113,
315,
6363,
1098,
3113,
315,
3678,
279,
666,
434,
777,
4203,
6623,
1199,
16,
23737,
18,
58,
47,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12112,
682,
12,
863,
3219,
852,
3219,
13,
288,
202,
202,
9565,
2932,
9282,
3113,
315,
6363,
1098,
3113,
315,
3678,
279,
666,
434,
777,
4203,
6623,
1199,
16,
23737,
18,
58,
47,... |
public void analyzeMethod(final ClassContext classContext, Method method, final ResourceTracker<Resource> resourceTracker) | public void analyzeMethod(final ClassContext classContext, Method method, final ResourceTrackerType resourceTracker) | public void analyzeMethod(final ClassContext classContext, Method method, final ResourceTracker<Resource> resourceTracker) throws CFGBuilderException, DataflowAnalysisException { final MethodGen methodGen = classContext.getMethodGen(method); final CFG cfg = classContext.getCFG(method); final DepthFirstSearch dfs = classContext.getDepthFirstSearch(method); if (DEBUG) System.out.println(SignatureConverter.convertMethodSignature(methodGen)); new LocationScanner(cfg).scan(new LocationScanner.Callback() { public void visitLocation(Location location) { BasicBlock basicBlock = location.getBasicBlock(); InstructionHandle handle = location.getHandle(); try { Resource resource = resourceTracker.isResourceCreation(basicBlock, handle, methodGen.getConstantPool()); if (resource != null) { if (DEBUG) System.out.println("Resource creation at " + handle.getPosition()); ResourceValueAnalysis<Resource> analysis = new ResourceValueAnalysis<Resource>(methodGen, cfg, dfs, resourceTracker, resource, bugReporter); Dataflow<ResourceValueFrame, ResourceValueAnalysis<Resource>> dataflow = new Dataflow<ResourceValueFrame, ResourceValueAnalysis<Resource>>(cfg, analysis); dataflow.execute(); inspectResult(classContext.getJavaClass(), methodGen, cfg, dataflow, resource); } } catch (DataflowAnalysisException e) { throw new AnalysisException("FindOpenResource caught exception: " + e.toString(), e); } } }); } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/639bcebb3a0506260df1565a199d3be98d7d12bd/ResourceTrackingDetector.java/clean/findbugs/src/java/edu/umd/cs/findbugs/ResourceTrackingDetector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
12375,
1305,
12,
6385,
1659,
1042,
667,
1042,
16,
2985,
707,
16,
727,
2591,
8135,
32,
1420,
34,
1058,
8135,
13,
202,
202,
15069,
7577,
1263,
503,
16,
1910,
2426,
9418,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12375,
1305,
12,
6385,
1659,
1042,
667,
1042,
16,
2985,
707,
16,
727,
2591,
8135,
32,
1420,
34,
1058,
8135,
13,
202,
202,
15069,
7577,
1263,
503,
16,
1910,
2426,
9418,
50... |
public void refresh(){ super.refresh(); try{ final PluginManager mgr = InitialNaming.lookup(PluginManager.NAME); final PluginDescriptor descr = mgr.getRegistry().getPluginDescriptor(name); if (descr != null) { addStringln("Name:"); addStringln("\t"+descr.getId()); addStringln("Provider:"); addStringln("\t"+descr.getProviderName()); addStringln("State :"); try { if (descr.getPlugin().isActive()) { addStringln("\tactive"); } else { addStringln("\tinactive"); } } catch (PluginException PE){ System.err.println(PE); } addStringln("Prerequisites:"); PluginPrerequisite[] allPreqs = descr.getPrerequisites(); PluginPrerequisite current; for (int i =0 ; i<allPreqs.length; i++){ current = allPreqs[i]; addStringln("\t"+current.getPluginId()+"\t\t"+current.getPluginVersion()); } } else { isvalid = false; } } catch (NameNotFoundException N){ System.err.println(N); } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/b8b67ee52c51432dcf0f6438f3f284134d4b3cc8/JIFSFplugin.java/clean/fs/src/fs/org/jnode/fs/jifs/files/JIFSFplugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4460,
1435,
95,
202,
202,
9565,
18,
9144,
5621,
202,
202,
698,
95,
1082,
202,
6385,
6258,
1318,
13333,
273,
10188,
24102,
18,
8664,
12,
3773,
1318,
18,
1985,
1769,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4460,
1435,
95,
202,
202,
9565,
18,
9144,
5621,
202,
202,
698,
95,
1082,
202,
6385,
6258,
1318,
13333,
273,
10188,
24102,
18,
8664,
12,
3773,
1318,
18,
1985,
1769,
1082,
... | ||
super.startEntity(name, identifier, encoding); | super.startEntity(name, identifier, encoding, augs); | public void startEntity(String name, XMLResourceIdentifier identifier, String encoding) throws XNIException { // keep track of this entity before fEntityDepth is increased if (fEntityDepth == fEntityStack.length) { int[] entityarray = new int[fEntityStack.length * 2]; System.arraycopy(fEntityStack, 0, entityarray, 0, fEntityStack.length); fEntityStack = entityarray; } fEntityStack[fEntityDepth] = fMarkupDepth; super.startEntity(name, identifier, encoding); // WFC: entity declared in external subset in standalone doc if(fStandalone && fEntityManager.isEntityDeclInExternalSubset(name)) { reportFatalError("MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE", new Object[]{name}); } // call handler if (fDocumentHandler != null && !fScanningAttribute) { if (!name.equals("[xml]")) { fDocumentHandler.startGeneralEntity(name, identifier, encoding, null); } } } // startEntity(String,XMLResourceIdentifier,String) | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/4f0471f571a356269208b2b52df3ce2048c681d4/XMLDocumentFragmentScannerImpl.java/buggy/src/org/apache/xerces/impl/XMLDocumentFragmentScannerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
787,
1943,
12,
780,
508,
16,
11794,
3167,
1420,
3004,
2756,
16,
18701,
514,
2688,
13,
1216,
1139,
50,
45,
503,
288,
3639,
368,
3455,
3298,
434,
333,
1522,
1865,
284,
1943,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
787,
1943,
12,
780,
508,
16,
11794,
3167,
1420,
3004,
2756,
16,
18701,
514,
2688,
13,
1216,
1139,
50,
45,
503,
288,
3639,
368,
3455,
3298,
434,
333,
1522,
1865,
284,
1943,
61... |
void doSelectionLineUp() { int oldColumnX; int caretLine = getCaretLine(); int lineStartOffset = content.getOffsetAtLine(caretLine); // reset columnX on selection oldColumnX = columnX = getXAtOffset( content.getLine(caretLine), caretLine, caretOffset - lineStartOffset); if (caretLine == 0) { caretOffset = 0; } else { caretLine = doLineUp(); } setMouseWordSelectionAnchor(); // explicitly go to the calculated caret line. may be different // from content.getLineAtOffset(caretOffset) when in word wrap mode showCaret(caretLine); doSelection(ST.COLUMN_PREVIOUS); // save the original horizontal caret position columnX = oldColumnX;} | 12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/9e630cdfff1efebad25cc2ad394dba564071d578/StyledText2.java/buggy/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
918,
2896,
6233,
1670,
1211,
1435,
95,
202,
474,
1673,
1494,
60,
31,
202,
474,
71,
20731,
1670,
33,
588,
39,
20731,
1670,
5621,
202,
202,
474,
1369,
1685,
2335,
33,
1745,
18,
588,
2335,
861,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
918,
2896,
6233,
1670,
1211,
1435,
95,
202,
474,
1673,
1494,
60,
31,
202,
474,
71,
20731,
1670,
33,
588,
39,
20731,
1670,
5621,
202,
202,
474,
1369,
1685,
2335,
33,
1745,
18,
588,
2335,
861,... | ||
print(destDocument, new FileWriter("D:/enumNullable.xml")); print(expected, new FileWriter("D:/enumNullable.exp.xml")); | public void testGenerateSaxFragmentNullable() throws Exception { DOMBuilder dest = new DOMBuilder(); EnumSelectionList list = new EnumSelectionList(Sex.class.getName(), new EnumType(), true); list.generateSaxFragment(dest, Locale.ENGLISH); ResourceSource expectedSource = new ResourceSource("resource://org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.dest.xml"); Document expected = this.parser.parse(expectedSource.getInputStream()); Document destDocument = dest.getDocument(); print(destDocument, new FileWriter("D:/enumNullable.xml")); print(expected, new FileWriter("D:/enumNullable.exp.xml")); assertEqual("Test if output is what is expected", expected, destDocument); } | 46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/7d19ad1f7a79808557e1ad4199b6ff8d5042b74f/EnumSelectionListTestCase.java/buggy/blocks/cocoon-forms/cocoon-forms-impl/src/test/java/org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4625,
55,
651,
7456,
13349,
1435,
1216,
1185,
288,
3639,
4703,
1263,
1570,
273,
394,
4703,
1263,
5621,
3639,
6057,
6233,
682,
666,
273,
2398,
394,
6057,
6233,
682,
12,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4625,
55,
651,
7456,
13349,
1435,
1216,
1185,
288,
3639,
4703,
1263,
1570,
273,
394,
4703,
1263,
5621,
3639,
6057,
6233,
682,
666,
273,
2398,
394,
6057,
6233,
682,
12,
55... | |
ColorDefinition [] copyOfDefinitions = null; | FontDefinition [] copyOfDefinitions = null; FontDefinition [] defaults = null; | public static void populateRegistry(ITheme theme, ColorDefinition [] definitions, IPreferenceStore store) { // sort the definitions by dependant ordering so that we process // ancestors before children. ColorDefinition [] copyOfDefinitions = null; if (!theme.getId().equals(IThemeManager.DEFAULT_THEME)) { definitions = addDefaulted(definitions); } copyOfDefinitions = new ColorDefinition[definitions.length]; System.arraycopy(definitions, 0, copyOfDefinitions, 0, definitions.length); Arrays.sort(copyOfDefinitions, new IThemeRegistry.HierarchyComparator(definitions)); for (int i = 0; i < copyOfDefinitions.length; i++) { ColorDefinition definition = copyOfDefinitions[i]; installColor(definition, theme, store); } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/d94edf054bdce936ee21432861f9b30b09bccff1/ThemeElementHelper.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeElementHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
6490,
4243,
12,
1285,
76,
4698,
5006,
16,
5563,
1852,
5378,
6377,
16,
467,
9624,
2257,
1707,
13,
288,
202,
202,
759,
1524,
326,
6377,
635,
2447,
970,
9543,
1427,
716,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
6490,
4243,
12,
1285,
76,
4698,
5006,
16,
5563,
1852,
5378,
6377,
16,
467,
9624,
2257,
1707,
13,
288,
202,
202,
759,
1524,
326,
6377,
635,
2447,
970,
9543,
1427,
716,
73... |
mainPanel.add(soapXmlFile); | mainPanel.add(soapXmlFile); mainPanel.add(wsdlMessage); mainPanel.add(wsdlMessage2); mainPanel.add(wsdlMessage3); mainPanel.add(wsdlMessage4); mainPanel.add(wsdlMessage5); mainPanel.add(randomXmlFile); mainPanel.add(memCache); mainPanel.add(readResponse); mainPanel.add(readMessage); mainPanel.add(readMessage2); mainPanel.add(readMessage3); | private void init() { this.setLayout(new GridLayout(1,1)); // MAIN PANEL JPanel mainPanel = new VerticalPanel(); Border margin = new EmptyBorder(10, 10, 5, 10); mainPanel.setBorder(margin); mainPanel.setLayout(new VerticalLayout(5, VerticalLayout.LEFT)); // TITLE JLabel panelTitleLabel = new JLabel(label); Font curFont = panelTitleLabel.getFont(); int curFontSize = curFont.getSize(); curFontSize += 4; panelTitleLabel.setFont(new Font(curFont.getFontName(), curFont.getStyle(), curFontSize)); mainPanel.add(panelTitleLabel); // NAME mainPanel.add(getNamePanel()); mainPanel.add(urlField); mainPanel.add(soapAction); // OPTIONAL TASKS mainPanel.add(soapXml); mainPanel.add(soapXmlFile); this.add(mainPanel); } | 50179 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50179/e97de7ec6ed59a27f5482b4a534fbfbbb529e0f6/WebServiceSamplerGui.java/buggy/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/WebServiceSamplerGui.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1208,
1435,
202,
95,
202,
202,
2211,
18,
542,
3744,
12,
2704,
7145,
3744,
12,
21,
16,
21,
10019,
202,
202,
759,
22299,
453,
1258,
2247,
202,
202,
46,
5537,
2774,
5537,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1208,
1435,
202,
95,
202,
202,
2211,
18,
542,
3744,
12,
2704,
7145,
3744,
12,
21,
16,
21,
10019,
202,
202,
759,
22299,
453,
1258,
2247,
202,
202,
46,
5537,
2774,
5537,
... |
return GenericJavaTypeProposal.this.getImage(); | return fImage; | public Image getImage() { return GenericJavaTypeProposal.this.getImage(); } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/8bbc0d75400a94ea23e6eef0b43ca95530d40893/GenericJavaTypeProposal.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/GenericJavaTypeProposal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
3421,
10567,
1435,
288,
1082,
202,
2463,
7928,
31819,
14592,
18,
2211,
18,
588,
2040,
5621,
202,
202,
97,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
3421,
10567,
1435,
288,
1082,
202,
2463,
7928,
31819,
14592,
18,
2211,
18,
588,
2040,
5621,
202,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
DatabaseConnectionFactory.reload(); | DatabaseConnectionFactory.init(); | public void init() { ThreadCategory.setPrefix(LOG4J_CATEGORY); Category log = ThreadCategory.getInstance(getClass()); // load the outage configuration and get the required attributes int numWriters = 1; try { OutageManagerConfigFactory.reload(); OutageManagerConfigFactory oFactory = OutageManagerConfigFactory.getInstance(); // get number of threads numWriters = oFactory.getWriters(); } catch(MarshalException ex) { log.error("Failed to load outage configuration", ex); throw new UndeclaredThrowableException(ex); } catch(ValidationException ex) { log.error("Failed to load outage configuration", ex); throw new UndeclaredThrowableException(ex); } catch(IOException ex) { log.error("Failed to load outage configuration", ex); throw new UndeclaredThrowableException(ex); } // // Make sure we can connect to the database // - Close the open outages for unmanaged interfaces and services // - build a mapping of service name to service id from the service table // java.sql.Connection conn = null; try { DatabaseConnectionFactory.reload(); conn = DatabaseConnectionFactory.getInstance().getConnection(); // close open outages for unmanaged entities closeOutages(conn); // build the service table map buildServiceTableMap(conn); } catch (IOException ie) { log.fatal("IOException getting database connection", ie); throw new UndeclaredThrowableException(ie); } catch (MarshalException me) { log.fatal("Marshall Exception getting database connection", me); throw new UndeclaredThrowableException(me); } catch (ValidationException ve) { log.fatal("Validation Exception getting database connection", ve); throw new UndeclaredThrowableException(ve); } catch (SQLException sqlE) { log.fatal("Error closing outages for unmanaged services and interfaces or building servicename to serviceid mapping",sqlE); throw new UndeclaredThrowableException(sqlE); } catch (ClassNotFoundException cnfE) { log.fatal("Failed to load database driver", cnfE); throw new UndeclaredThrowableException(cnfE); } finally { if(conn != null) { try { conn.close(); } catch(Exception e) { } } } m_writerPool = new RunnableConsumerThreadPool("Outage Writer Pool", 0.6f, 1.0f, numWriters); if (log.isDebugEnabled()) log.debug("Created writer pool"); m_eventReceiver = new BroadcastEventProcessor(m_writerPool.getRunQueue()); if (log.isDebugEnabled()) log.debug("Created event receiver"); log.info("OutageManager ready to accept events"); } | 47678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47678/08954903f6d1e5d3d72b34dfafa41ceca3b49728/OutageManager.java/buggy/src/services/org/opennms/netmgt/outage/OutageManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1208,
1435,
202,
95,
202,
202,
3830,
4457,
18,
542,
2244,
12,
4842,
24,
46,
67,
24847,
1769,
202,
202,
4457,
613,
273,
4884,
4457,
18,
588,
1442,
12,
588,
797,
10663,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1208,
1435,
202,
95,
202,
202,
3830,
4457,
18,
542,
2244,
12,
4842,
24,
46,
67,
24847,
1769,
202,
202,
4457,
613,
273,
4884,
4457,
18,
588,
1442,
12,
588,
797,
10663,
2... |
public String getReadonlyExpr() { return (readonlyExpr); } | public String getReadonlyExpr() { return (readonlyExpr); } | public String getReadonlyExpr() { return (readonlyExpr); } | 54704 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54704/db064e19656421b94aaf753550935d95f44bd5f9/ELPasswordTag.java/clean/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELPasswordTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
225,
514,
282,
19900,
3700,
4742,
1435,
288,
327,
261,
16365,
4742,
1769,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
225,
514,
282,
19900,
3700,
4742,
1435,
288,
327,
261,
16365,
4742,
1769,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
public void showRunContent(final JavaProgramRunner requestor, final RunContentDescriptor descriptor) { if(ApplicationManager.getApplication().isUnitTestMode()) return; final RunnerInfo runnerInfo = requestor.getInfo(); LOG.assertTrue(runnerInfo != null); final ContentManager contentManager = getContentManagerForRunner(runnerInfo); RunContentDescriptor oldDescriptor = chooseReuseContentForDescriptor(contentManager, descriptor); Content content; if(oldDescriptor != null) { content = (Content)oldDescriptor.getAttachedContent(); myEventDispatcher.getMulticaster().contentRemoved(oldDescriptor, runnerInfo.getToolWindowId()); oldDescriptor.dispose(); // is of the same category, can be reused } else { content = createNewContent(contentManager, descriptor, runnerInfo.getToolWindowId()); } content.setComponent(descriptor.getComponent()); content.putUserData(DESCRIPTOR_KEY, descriptor); content.setDisplayName(descriptor.getDisplayName()); descriptor.setAttachedContent(content); content.getManager().setSelectedContent(content); ApplicationManager.getApplication().invokeLater(new Runnable() { public void run() { final ToolWindow toolWindow = ToolWindowManager.getInstance(myProject).getToolWindow(runnerInfo.getToolWindowId()); toolWindow.activate(null); } }); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/5b72c2198882fa306177c484063ede77ad1301dc/RunContentManagerImpl.java/clean/execution/impl/com/intellij/execution/ui/RunContentManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2405,
1997,
1350,
12,
6385,
5110,
9459,
9709,
590,
280,
16,
727,
1939,
1350,
3187,
4950,
13,
288,
565,
309,
12,
3208,
1318,
18,
588,
3208,
7675,
291,
2802,
4709,
2309,
10756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2405,
1997,
1350,
12,
6385,
5110,
9459,
9709,
590,
280,
16,
727,
1939,
1350,
3187,
4950,
13,
288,
565,
309,
12,
3208,
1318,
18,
588,
3208,
7675,
291,
2802,
4709,
2309,
10756,
... | ||
public Trigger getTrigger(SchedulingContext ctxt, String triggerName, | Trigger getTrigger(SchedulingContext ctxt, String triggerName, | public Trigger getTrigger(SchedulingContext ctxt, String triggerName, String triggerGroup) throws SchedulerException, RemoteException; | 15562 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15562/f6eeea5a952e67d6b7fc8b54ae64d0b9e7098a98/RemotableQuartzScheduler.java/clean/src/java/org/quartz/core/RemotableQuartzScheduler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
11321,
336,
6518,
12,
25401,
1042,
14286,
16,
514,
3080,
461,
16,
5411,
514,
3080,
1114,
13,
1216,
12620,
503,
16,
18361,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
11321,
336,
6518,
12,
25401,
1042,
14286,
16,
514,
3080,
461,
16,
5411,
514,
3080,
1114,
13,
1216,
12620,
503,
16,
18361,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
void updateTimes(Date fireTime) { if (fireTime == null) { this.nextFireTime = this.priorityTime = Long.MIN_VALUE; } else { this.nextFireTime = fireTime.getTime(); this.priorityTime = this.nextFireTime-trigger.getPriorityMillis(); } | void updateTimes(Date fireTime) { if (fireTime == null) { this.nextFireTime = this.priorityTime = Long.MIN_VALUE; } else { this.nextFireTime = fireTime.getTime(); this.priorityTime = this.nextFireTime-trigger.getPriorityMillis(); } | void updateTimes(Date fireTime) { if (fireTime == null) { this.nextFireTime = this.priorityTime = Long.MIN_VALUE; } else { this.nextFireTime = fireTime.getTime(); this.priorityTime = this.nextFireTime-trigger.getPriorityMillis(); } } | 15562 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15562/f6eeea5a952e67d6b7fc8b54ae64d0b9e7098a98/RAMJobStore.java/buggy/src/java/org/quartz/simpl/RAMJobStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1089,
10694,
12,
1626,
4452,
950,
13,
565,
288,
1377,
309,
261,
12179,
950,
422,
446,
13,
1377,
288,
3639,
333,
18,
4285,
9723,
950,
273,
333,
18,
8457,
950,
273,
3407,
18,
6236,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1089,
10694,
12,
1626,
4452,
950,
13,
565,
288,
1377,
309,
261,
12179,
950,
422,
446,
13,
1377,
288,
3639,
333,
18,
4285,
9723,
950,
273,
333,
18,
8457,
950,
273,
3407,
18,
6236,
... |
DataPattern(Datatype dt) { super(false, combineHashCode(DATA_HASH_CODE, dt.hashCode())); | DataPattern(boolean nullable, Datatype dt) { super(nullable, combineHashCode(DATA_HASH_CODE, dt.hashCode())); | DataPattern(Datatype dt) { super(false, combineHashCode(DATA_HASH_CODE, dt.hashCode())); this.dt = dt; } | 50651 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50651/f83c9d2463b870dde6c1fc39368cad1f22f17ff4/DataPattern.java/clean/src/com/thaiopensource/relaxng/DataPattern.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1910,
3234,
12,
20228,
3681,
13,
288,
565,
2240,
12,
5743,
16,
8661,
21952,
12,
4883,
67,
15920,
67,
5572,
16,
3681,
18,
2816,
1085,
1435,
10019,
565,
333,
18,
7510,
273,
3681,
31,
225,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1910,
3234,
12,
20228,
3681,
13,
288,
565,
2240,
12,
5743,
16,
8661,
21952,
12,
4883,
67,
15920,
67,
5572,
16,
3681,
18,
2816,
1085,
1435,
10019,
565,
333,
18,
7510,
273,
3681,
31,
225,... |
writeTo = new File(dir + File.separator + linkFileName); | writeTo = new File(dir + File.separator + linkFileName); | public void execute() throws BuildException { try { if (action.equals("single")) { doLink(resource, link); } else if (action.equals("delete")) { try { log("Removing symlink: " + link); Symlink.deleteSymlink(link); } catch (FileNotFoundException fnfe) { handleError(fnfe.toString()); } catch (IOException ioe) { handleError(ioe.toString()); } } else if (action.equals("recreate")) { Properties listOfLinks; Enumeration keys; if (fileSets.size() == 0){ handleError("File set identifying link file(s) " + "required for action recreate"); return; } listOfLinks = loadLinks(fileSets); keys = listOfLinks.keys(); while(keys.hasMoreElements()) { link = (String) keys.nextElement(); resource = listOfLinks.getProperty(link); doLink(resource, link); } } else if (action.equals("record")) { Vector vectOfLinks; Hashtable byDir = new Hashtable(); Enumeration links, dirs; if (fileSets.size() == 0) { handleError("File set identifying links to " + "record required"); return; } if (linkFileName == null) { handleError("Name of file to record links in " + "required"); return; } // fill our vector with file objects representing // links (canonical) vectOfLinks = findLinks(fileSets); // create a hashtable to group them by parent directory links = vectOfLinks.elements(); while (links.hasMoreElements()) { File thisLink = (File) links.nextElement(); String parent = thisLink.getParent(); if (byDir.containsKey(parent)) { ((Vector) byDir.get(parent)).addElement(thisLink); } else { byDir.put(parent, new Vector()); ((Vector) byDir.get(parent)).addElement(thisLink); } } // write a Properties file in each directory dirs = byDir.keys(); while (dirs.hasMoreElements()) { String dir = (String) dirs.nextElement(); Vector linksInDir = (Vector) byDir.get(dir); Properties linksToStore = new Properties(); Enumeration eachlink = linksInDir.elements(); File writeTo; // fill up a Properties object with link and resource // names while(eachlink.hasMoreElements()) { File alink = (File) eachlink.nextElement(); try { linksToStore.put(alink.getName(), alink.getCanonicalPath()); } catch (IOException ioe) { handleError("Couldn't get canonical "+ "name of a parent link"); } } // Get a place to record what we are about to write writeTo = new File(dir + File.separator + linkFileName); writePropertyFile(linksToStore, writeTo, "Symlinks from " + writeTo.getParent()); } } else { handleError("Invalid action specified in symlink"); } } finally { // return all variables to their default state, // ready for the next invocation. resource = null; link = null; action = "single"; fileSets = new Vector(); linkFileName = null; overwrite = false; failonerror = true; } } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/e3cc7de84e7518e5144dba5c23f36b4694987f48/Symlink.java/clean/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1836,
1435,
1216,
18463,
288,
3639,
775,
288,
5411,
309,
261,
1128,
18,
14963,
2932,
7526,
6,
3719,
288,
7734,
741,
2098,
12,
3146,
16,
1692,
1769,
5411,
289,
469,
309,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1836,
1435,
1216,
18463,
288,
3639,
775,
288,
5411,
309,
261,
1128,
18,
14963,
2932,
7526,
6,
3719,
288,
7734,
741,
2098,
12,
3146,
16,
1692,
1769,
5411,
289,
469,
309,
261,
... |
TextDomainObject text, String textstring ) { | TextDomainObject text, String textstring) { | private static void sprocUpdateInsertText( IMCServiceInterface service, int meta_id, int txt_no, TextDomainObject text, String textstring ) { String[] params = new String[]{"" + meta_id, "" + txt_no, "" + text.getType(), textstring}; service.sqlUpdateProcedure( SPROC_INSERT_TEXT, params ); } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/25d7c7c866e4b2d2d9e20e2d71648b696a1c81f6/DocumentMapper.java/buggy/server/src/imcode/server/document/DocumentMapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
272,
9381,
1891,
4600,
1528,
12,
6246,
39,
18348,
1156,
16,
509,
2191,
67,
350,
16,
509,
6463,
67,
2135,
16,
4766,
9079,
3867,
3748,
921,
977,
16,
514,
977,
1080,
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,
3238,
760,
918,
272,
9381,
1891,
4600,
1528,
12,
6246,
39,
18348,
1156,
16,
509,
2191,
67,
350,
16,
509,
6463,
67,
2135,
16,
4766,
9079,
3867,
3748,
921,
977,
16,
514,
977,
1080,
13,
... |
temp.refresh(); temp.invalidate(); temp.validate(); | temp.revalidate(); temp.repaint(); | private void addDeleteButton(PropertySheet sheet, ConfigElement elm, PropertyDefinition prop_def, Object value, int row) { ClassLoader loader = getClass().getClassLoader(); Icon remove_icon = new ImageIcon(loader.getResource("org/vrjuggler/jccl/editors/images/Delete16.gif")); JButton remove_button = new JButton(); remove_button.setIcon(remove_icon); remove_button.setMargin(new Insets(0,0,0,0)); remove_button.setBorderPainted(false); remove_button.setFocusPainted(false); remove_button.setContentAreaFilled(false); // Verify that the property is variable. if(prop_def.isVariable()) { remove_button.setEnabled(true); final Object temp_value = value; final String temp_string = prop_def.getToken(); final ConfigElement temp_elm = elm; remove_button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { PropertyComponent temp = (PropertyComponent)((Component)evt.getSource()).getParent(); temp_elm.removeProperty(temp_string, temp_value); if(temp.getLayout() instanceof TableLayout) { TableLayout tl = (TableLayout)temp.getLayout(); // Get the row that this panel is in. TableLayoutConstraints tlc = tl.getConstraints((Component)evt.getSource()); int row = tlc.row1; temp.remove((Component)evt.getSource()); tl.deleteRow(row); } temp.refresh(); temp.invalidate(); temp.validate(); } }); } else { remove_button.setEnabled(false); } TableLayoutConstraints c4 = new TableLayoutConstraints(2, row, 2, row, TableLayout.LEFT, TableLayout.TOP); sheet.add(remove_button, c4); } | 49828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49828/83ec27c8c32995f2b6128b170ad2836749c83e72/PropertySheetFactory.java/buggy/modules/jackal/editors/org/vrjuggler/jccl/editors/PropertySheetFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
918,
527,
2613,
3616,
12,
1396,
8229,
6202,
16,
1903,
1046,
12531,
16,
4276,
1852,
2270,
67,
536,
16,
1033,
460,
16,
509,
1027,
13,
282,
288,
1377,
9403,
4088,
273,
2900,
7675,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
918,
527,
2613,
3616,
12,
1396,
8229,
6202,
16,
1903,
1046,
12531,
16,
4276,
1852,
2270,
67,
536,
16,
1033,
460,
16,
509,
1027,
13,
282,
288,
1377,
9403,
4088,
273,
2900,
7675,
58... |
throw new TaskException( "The ext attribute or a mapper must be set if" + | throw new TaskException( "A mapper must be specified if" + | private void validate() throws TaskException { // Require destDir if( m_destDir == null ) { throw new TaskException( "The dest attribute must be set." ); } // if src and dest dirs are the same, require the extension // to be set, so we don't stomp every file. One could still // include a file with the same extension, but .... if( m_srcDir.equals( m_destDir ) && m_ext == null && m_mapper == null ) { throw new TaskException( "The ext attribute or a mapper must be set if" + " src and dest dirs are the same." ); } // default srcDir to basedir if( m_srcDir == null ) { m_srcDir = getBaseDirectory(); } } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/2afc643a3ea676cc68f2f010ea3a7560b7a0a3af/Native2Ascii.java/buggy/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/text/Native2Ascii.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1954,
1435,
3639,
1216,
3837,
503,
565,
288,
3639,
368,
12981,
26231,
3639,
309,
12,
312,
67,
10488,
1621,
422,
446,
262,
3639,
288,
5411,
604,
394,
3837,
503,
12,
315,
1986,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1954,
1435,
3639,
1216,
3837,
503,
565,
288,
3639,
368,
12981,
26231,
3639,
309,
12,
312,
67,
10488,
1621,
422,
446,
262,
3639,
288,
5411,
604,
394,
3837,
503,
12,
315,
1986,
... |
break; | public void execute() { switch (state) { case INITIAL: // No point in looking for metrics providers if there ate no local // Assets if (localAssets.size() > 0) { for (Iterator iterator = localAssets.getCollection().iterator(); iterator.hasNext();) { addMetricsProviders((HasRelationships) iterator.next()); } if (checkProviders()) { sendControl(Verb_Ready); setCurrentState(WAITING); } } break; case WAITING: if (checkControlTasks(readyAllocations)) { sendControl(Verb_Start); setCurrentState(STARTING); } break; case STARTING: if (checkControlTasks(startAllocations)) { startTime = System.currentTimeMillis(); startRunning(); setCurrentState(RUNNING); startSampleTimer(); } break; case SAMPLING: // Keep tabs on the society //checkRootTasks(); // Keep this up to date if (checkControlTasks(sampleAllocations)) { // OK, done with sampling. Go back to running setCurrentState(RUNNING); // Keep the system going //fillTaskQueue(); } break; case RUNNING: // Without this next, there's no way to stop! // we'll never go to the "FINISHING" state if (doneRunning()) { finish(); // All root tasks have been sent, break; } // If it's time again, do another sample if (sampleTimer != null && sampleTimer.hasExpired()) { setCurrentState(SAMPLING); sendControl(Verb_Sample); startSampleTimer(); // Restart break; } // otherwise, keep the society running //fillTaskQueue(); // Keep the task queue topped off break; case FINISHING: // the society is done running. Make sure we've done all our sampling if (checkControlTasks(finishAllocations)) { finishEverything(); // in Ray's version, this does a System.exit() } break; } } | 9368 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9368/7a8ff7c80cd83da862d195fc2892b4450985c3c8/MetricsInitializerPlugin.java/clean/csmart/src/org/cougaar/tools/csmart/plugin/MetricsInitializerPlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1836,
1435,
225,
288,
565,
1620,
261,
2019,
13,
288,
565,
648,
28226,
30,
1377,
368,
2631,
1634,
316,
7849,
364,
4309,
9165,
309,
1915,
225,
340,
1158,
1191,
1377,
368,
26284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1836,
1435,
225,
288,
565,
1620,
261,
2019,
13,
288,
565,
648,
28226,
30,
1377,
368,
2631,
1634,
316,
7849,
364,
4309,
9165,
309,
1915,
225,
340,
1158,
1191,
1377,
368,
26284,
... | |
retry: while (true) { | retry: while (true) { | private IRubyObject getConstantInner(String name, boolean exclude) { IRubyObject objectClass = getRuntime().getObject(); boolean retryForModule = false; RubyModule p = this; retry: while (true) { while (p != null) { IRubyObject constant = p.getConstantAt(name); if (constant == null) { if (getRuntime().getLoadService().autoload(name) != null) { continue; } } if (constant != null) { if (exclude && p == objectClass && this != objectClass) { getRuntime().getWarnings().warn("toplevel constant " + name + " referenced by " + getName() + "::" + name); } return constant; } p = p.getSuperClass(); } if (!exclude && !retryForModule && getClass().equals(RubyModule.class)) { retryForModule = true; p = getRuntime().getObject(); continue retry; } break; } return callMethod(getRuntime().getCurrentContext(), "const_missing", RubySymbol.newSymbol(getRuntime(), name)); } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/1278c5bb3507a052d150d814f15453542ae41aed/RubyModule.java/clean/src/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
15908,
10340,
921,
24337,
2857,
12,
780,
508,
16,
1250,
4433,
13,
288,
3639,
15908,
10340,
921,
23992,
273,
18814,
7675,
588,
921,
5621,
3639,
1250,
3300,
1290,
3120,
273,
629,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
15908,
10340,
921,
24337,
2857,
12,
780,
508,
16,
1250,
4433,
13,
288,
3639,
15908,
10340,
921,
23992,
273,
18814,
7675,
588,
921,
5621,
3639,
1250,
3300,
1290,
3120,
273,
629,
31,
... |
public void layout(Composite composite, boolean flushCache) { if (composite == null) return; // Make sure cancel button and progress bar are at the end. fMessageLabel.moveAbove(null); fToolBar.moveBelow(fMessageLabel); fProgressBar.moveBelow(fToolBar); Rectangle rect= composite.getClientArea(); Control[] children= composite.getChildren(); int count= children.length; int ws[]= new int[count]; int totalWidth= -GAP; for (int i= 0; i < count; i++) { Control w= children[i]; if (w == fProgressBar && !fProgressIsVisible) continue; if (w == fToolBar && !fCancelButtonIsVisible) continue; int width= w.computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache).x; ws[i]= width; totalWidth+= width + GAP; } int diff= rect.width-totalWidth; ws[0]+= diff; // make the first StatusLabel wider // Check against minimum recommended width final int msgMinWidth = rect.width/3; if (ws[0] < msgMinWidth) { diff = ws[0] - msgMinWidth; ws[0] = msgMinWidth; } else { diff = 0; } // Take space away from the contributions first. for (int i = count -1; i >= 0 && diff < 0; --i) { int min = Math.min(ws[i], -diff); ws[i] -= min; diff += min + GAP; } int x= rect.x; int y= rect.y; int h= rect.height; for (int i= 0; i < count; i++) { Control w= children[i]; /* * Workaround for Linux Motif: * Even if the progress bar and cancel button are * not set to be visible ad of width 0, they still * draw over the first pixel of the editor * contributions. * * The fix here is to draw the progress bar and * cancel button off screen if they are not visible. */ if (w == fProgressBar && !fProgressIsVisible || w == fToolBar && !fCancelButtonIsVisible) { w.setBounds(x + rect.width, y, ws[i], h); continue; } w.setBounds(x, y, ws[i], h); if (ws[i] > 0) x+= ws[i] + GAP; } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/a293a06950b3229cd6112f28b2ccc6c940e321a5/StatusLine.java/clean/bundles/org.eclipse.ui/Eclipse JFace/org/eclipse/jface/action/StatusLine.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
3511,
12,
9400,
9635,
16,
1250,
3663,
1649,
13,
288,
6862,
202,
430,
261,
27676,
422,
446,
13,
9506,
202,
2463,
31,
25083,
202,
759,
4344,
3071,
3755,
3568,
471,
4007,
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,
3196,
202,
482,
918,
3511,
12,
9400,
9635,
16,
1250,
3663,
1649,
13,
288,
6862,
202,
430,
261,
27676,
422,
446,
13,
9506,
202,
2463,
31,
25083,
202,
759,
4344,
3071,
3755,
3568,
471,
4007,
4... | ||
leaseTime = absoluteTime; } | leaseTime = absoluteTime; } | public void setLeaseTime(Date absoluteTime) { leaseTime = absoluteTime; } | 5505 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5505/e4909e722f1523c0d2d11da738a69b2ea24f683e/DFAgentDescription.java/clean/src/jade/domain/FIPAAgentManagement/DFAgentDescription.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
17746,
950,
12,
1626,
4967,
950,
13,
288,
202,
2508,
950,
273,
4967,
950,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
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,
377,
1071,
918,
444,
17746,
950,
12,
1626,
4967,
950,
13,
288,
202,
2508,
950,
273,
4967,
950,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public static String normalize( String path) { | public static String normalize(String path) { | public static String normalize( String path) { String normalized = path; // Resolve occurrences of "//" in the normalized path while (true) { int index = normalized.indexOf("//"); if (index < 0) break; normalized = normalized.substring(0, index) + normalized.substring(index + 1); } // Resolve occurrences of "/./" in the normalized path while (true) { int index = normalized.indexOf("/./"); if (index < 0) break; normalized = normalized.substring(0, index) + normalized.substring(index + 2); } // Resolve occurrences of "/../" in the normalized path while (true) { int index = normalized.indexOf("/../"); if (index < 0) break; if (index == 0) return null; // Trying to go outside our context int index2 = normalized.lastIndexOf('/', index - 1); normalized = normalized.substring(0, index2) + normalized.substring(index + 3); } // Return the normalized path that we have completed return normalized; } | 49302 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49302/e47d347ce4255b8964e384bf0df170281c78d070/FilenameUtils.java/buggy/src/java/org/apache/commons/io/FilenameUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
3883,
12,
780,
589,
13,
288,
3639,
514,
5640,
273,
589,
31,
3639,
368,
9910,
15698,
434,
31828,
316,
326,
5640,
589,
3639,
1323,
261,
3767,
13,
288,
5411,
509,
770,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
3883,
12,
780,
589,
13,
288,
3639,
514,
5640,
273,
589,
31,
3639,
368,
9910,
15698,
434,
31828,
316,
326,
5640,
589,
3639,
1323,
261,
3767,
13,
288,
5411,
509,
770,
273,... |
private void updateTrigger( String triggerType ) { if ( triggerType == null ) { return; } if ( cmbActionType.getSelectionIndex( ) == 0 ) { cmbTriggerType.unmarkSelection( triggerType ); return; } cmbTriggerType.markSelection( triggerType ); Object oldTrigger = triggersMap.get( triggerType ); Object newTrigger = getTrigger( ); if ( oldTrigger != null ) { int index = triggersList.indexOf( oldTrigger ); if ( index >= 0 ) { triggersList.set( index, newTrigger ); } } else { triggersList.add( newTrigger ); } triggersMap.put( triggerType, newTrigger ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/fb07b19048ffced36391d74141e3af0af95e96a0/TriggerDataComposite.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/TriggerDataComposite.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1089,
6518,
12,
514,
3080,
559,
262,
202,
95,
202,
202,
430,
261,
3080,
559,
422,
446,
262,
202,
202,
95,
1082,
202,
2463,
31,
202,
202,
97,
9506,
202,
430,
261,
276,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1089,
6518,
12,
514,
3080,
559,
262,
202,
95,
202,
202,
430,
261,
3080,
559,
422,
446,
262,
202,
202,
95,
1082,
202,
2463,
31,
202,
202,
97,
9506,
202,
430,
261,
276,
... | ||
super.setDoctype(publicId, this.getDoctypeSystem()); | super.setDoctypePublicId(publicId); | public void setDoctypePublic ( String publicId ) { if(m_shouldRecordHasBeenSet) m_doctypePublicHasBeenSet = true; super.setDoctype(publicId, this.getDoctypeSystem()); } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/0a59c863c802607a229820e928e851db21b9d055/OutputFormatExtended.java/buggy/src/org/apache/xalan/templates/OutputFormatExtended.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
3244,
12387,
4782,
261,
514,
1071,
548,
262,
225,
288,
565,
309,
12,
81,
67,
13139,
2115,
5582,
25931,
694,
13,
1377,
312,
67,
2896,
12387,
4782,
5582,
25931,
694,
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
3244,
12387,
4782,
261,
514,
1071,
548,
262,
225,
288,
565,
309,
12,
81,
67,
13139,
2115,
5582,
25931,
694,
13,
1377,
312,
67,
2896,
12387,
4782,
5582,
25931,
694,
273,
... |
return ((String) items.elementAt(index)); } | return((String)items.elementAt(index)); } | public synchronized String getSelectedItem() { int index = getSelectedIndex(); if (index == -1) return (null); return ((String) items.elementAt(index)); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/List.java/clean/core/src/classpath/java/java/awt/List.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
514,
16625,
1180,
1435,
288,
202,
202,
474,
770,
273,
16625,
1016,
5621,
202,
202,
430,
261,
1615,
422,
300,
21,
13,
1082,
202,
2463,
261,
2011,
1769,
202,
202,
2463,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
514,
16625,
1180,
1435,
288,
202,
202,
474,
770,
273,
16625,
1016,
5621,
202,
202,
430,
261,
1615,
422,
300,
21,
13,
1082,
202,
2463,
261,
2011,
1769,
202,
202,
2463,
14... |
table.put(symbol.asSymbol(), new WeakSymbolEntry(symbol)); | table.put(symbol.asSymbol(), new WeakSymbolEntry(symbol, unusedSymbols)); | public void store(RubySymbol symbol) { clean(); table.put(symbol.asSymbol(), new WeakSymbolEntry(symbol)); } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/cc20d41e6031b7e9c9ed46676d32e45334ed0d53/RubySymbol.java/clean/src/org/jruby/RubySymbol.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1707,
12,
54,
10340,
5335,
3273,
13,
288,
5411,
2721,
5621,
5411,
1014,
18,
458,
12,
7175,
18,
345,
5335,
9334,
394,
23632,
5335,
1622,
12,
7175,
16,
10197,
14821,
10019,
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,
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,
1707,
12,
54,
10340,
5335,
3273,
13,
288,
5411,
2721,
5621,
5411,
1014,
18,
458,
12,
7175,
18,
345,
5335,
9334,
394,
23632,
5335,
1622,
12,
7175,
16,
10197,
14821,
10019,
3639,... |
public org.quickfix.field.AgreementCurrency getAgreementCurrency() throws FieldNotFound { org.quickfix.field.AgreementCurrency value = new org.quickfix.field.AgreementCurrency(); | public quickfix.field.AgreementCurrency getAgreementCurrency() throws FieldNotFound { quickfix.field.AgreementCurrency value = new quickfix.field.AgreementCurrency(); | public org.quickfix.field.AgreementCurrency getAgreementCurrency() throws FieldNotFound { org.quickfix.field.AgreementCurrency value = new org.quickfix.field.AgreementCurrency(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityList.java/buggy/src/java/src/quickfix/fix44/SecurityList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
17420,
7623,
336,
17420,
7623,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
17420,
7623,
460,
273,
394,
2358,
18,
19525,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
17420,
7623,
336,
17420,
7623,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
17420,
7623,
460,
273,
394,
2358,
18,
19525,... |
SettingsTabPanel stp = ((PluggableSettingsTab) o) .getSettingsTabPanel(); | SettingsTabPanel stp = ((PluggableSettingsTab) o).getSettingsTabPanel(); | public void actionPerformed(ActionEvent event) { ProjectBrowser pb = ProjectBrowser.getInstance(); if (dialog == null) { try { dialog = new ArgoDialog(pb, localize("dialog.settings"), ArgoDialog.OK_CANCEL_OPTION, true) { public void actionPerformed(ActionEvent ev) { super.actionPerformed(ev); if (ev.getSource() == getOkButton()) { handleSave(); } else if (ev.getSource() == getCancelButton()) { handleCancel(); } } }; tabs = new JTabbedPane(); applyButton = new JButton(localize("button.apply")); String mnemonic = localize("button.apply.mnemonic"); if (mnemonic != null && mnemonic.length() > 0) { applyButton.setMnemonic(mnemonic.charAt(0)); } applyButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleSave(); } }); dialog.addButton(applyButton); ArrayList list = Argo.getPlugins(PluggableSettingsTab.class); ListIterator iterator = list.listIterator(); while (iterator.hasNext()) { Object o = iterator.next(); SettingsTabPanel stp = ((PluggableSettingsTab) o) .getSettingsTabPanel(); tabs.addTab(Translator.localize(stp .getTabResourceBundleKey(), stp.getTabKey()), stp .getTabPanel()); } // Increase width to accommodate all tabs on one row. // (temporary solution until tabs are replaced with tree) final int minimumWidth = 465; tabs.setPreferredSize(new Dimension(Math.max(tabs .getPreferredSize().width, minimumWidth), tabs .getPreferredSize().height)); dialog.setContent(tabs); } catch (Exception exception) { LOG.error("got an Exception in ActionSettings", exception); } } handleRefresh(); dialog.toFront(); dialog.setVisible(true); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/6aa90cbe14f92a7b461947f07ccb8b3d17109932/ActionSettings.java/buggy/src_new/org/argouml/ui/ActionSettings.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
871,
13,
288,
3639,
5420,
9132,
6386,
273,
5420,
9132,
18,
588,
1442,
5621,
3639,
309,
261,
12730,
422,
446,
13,
288,
5411,
775,
288,
7734,
6176,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
871,
13,
288,
3639,
5420,
9132,
6386,
273,
5420,
9132,
18,
588,
1442,
5621,
3639,
309,
261,
12730,
422,
446,
13,
288,
5411,
775,
288,
7734,
6176,
273,
... |
if (wizard == null) { | String siteStr = getWizardManager().getWizardIdSiteId(id); if (siteStr == null) { | protected Boolean isWizardViewAuth(AuthorizationFacade facade, Agent agent, Id id, boolean allowAnonymous) { Wizard wizard = getWizardManager().getWizard(id); if (wizard == null) { return null; } return isWizardViewAuth(wizard, facade, agent, id, allowAnonymous); } | 48996 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48996/f43db8d60f0f9713119d0a9acce83fd1f9aba61e/WizardAuthorizerImpl.java/buggy/wizard/api-impl/src/java/org/theospi/portfolio/wizard/WizardAuthorizerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
3411,
353,
27130,
1767,
1730,
12,
6063,
12467,
11270,
16,
8669,
4040,
16,
3124,
612,
16,
1250,
1699,
18792,
13,
288,
1377,
678,
13412,
24204,
273,
13876,
13412,
1318,
7675,
588,
27130... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4750,
3411,
353,
27130,
1767,
1730,
12,
6063,
12467,
11270,
16,
8669,
4040,
16,
3124,
612,
16,
1250,
1699,
18792,
13,
288,
1377,
678,
13412,
24204,
273,
13876,
13412,
1318,
7675,
588,
27130... |
bug.setPriority(Priorities.HIGH_PRIORITY); else if (score >= 3) bug.setPriority(Priorities.NORMAL_PRIORITY); else bug.setPriority(Priorities.LOW_PRIORITY); | bug.setPriority(priority-1); else if (score < 3) bug.setPriority(priority+1); | public void report() { UnreadFields unreadFields = AnalysisContext.currentAnalysisContext().getUnreadFields(); for(RememberedBug rb : rememberedBugs) { BugInstance bug = rb.bug; int score = 0; if (unreadFields.getReadFields().contains(rb.maskedField)) score++; if (unreadFields.getReadFields().contains(rb.maskingField)) score++; if (unreadFields.getWrittenFields().contains(rb.maskedField)) score++; if (unreadFields.getWrittenFields().contains(rb.maskingField)) score++; if (unreadFields.getWrittenOutsideOfConstructorFields().contains(rb.maskedField)) score++; if (unreadFields.getWrittenOutsideOfConstructorFields().contains(rb.maskingField)) score++; if (score >= 5) bug.setPriority(Priorities.HIGH_PRIORITY); else if (score >= 3) bug.setPriority(Priorities.NORMAL_PRIORITY); else bug.setPriority(Priorities.LOW_PRIORITY); bugReporter.reportBug(bug); } } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/f9267c265405385147fbfdb2c54a7ee102687cae/FindMaskedFields.java/clean/findbugs/src/java/edu/umd/cs/findbugs/detect/FindMaskedFields.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2605,
1435,
288,
202,
202,
984,
896,
2314,
19541,
2314,
273,
16318,
1042,
18,
2972,
9418,
1042,
7675,
588,
984,
896,
2314,
5621,
202,
202,
1884,
12,
28810,
329,
19865,
7138,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2605,
1435,
288,
202,
202,
984,
896,
2314,
19541,
2314,
273,
16318,
1042,
18,
2972,
9418,
1042,
7675,
588,
984,
896,
2314,
5621,
202,
202,
1884,
12,
28810,
329,
19865,
7138,
29... |
return (EAttribute)seriesEClass.getEStructuralFeatures().get(0); | return (EAttribute) seriesEClass.getEStructuralFeatures().get(0); | public EAttribute getSeries_Visible() { return (EAttribute)seriesEClass.getEStructuralFeatures().get(0); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/ComponentPackageImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/component/impl/ComponentPackageImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
512,
1499,
336,
6485,
67,
6207,
1435,
565,
288,
3639,
327,
261,
41,
1499,
13,
4166,
5720,
18,
588,
41,
14372,
8696,
7675,
588,
12,
20,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
512,
1499,
336,
6485,
67,
6207,
1435,
565,
288,
3639,
327,
261,
41,
1499,
13,
4166,
5720,
18,
588,
41,
14372,
8696,
7675,
588,
12,
20,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
... |
if (contributor.contributeObjectMenus(popupMenu, selProv)) actualContributions = true; | if (contributor.contributeObjectMenus(popupMenu, selProv)) { actualContributions = true; } | public boolean contributeObjectActions(IWorkbenchPart part, IMenuManager popupMenu, ISelectionProvider selProv) { // Get a selection. ISelection selection = selProv.getSelection(); if (selection == null) return false; // Convert the selection into an element vector. // According to the dictionary, a selection is "one that // is selected", or "a collection of selected things". // In reflection of this, we deal with one or a collection. List elements = null; if (selection instanceof IStructuredSelection) { elements = ((IStructuredSelection) selection).toList(); } else { elements = new ArrayList(1); elements.add(selection); } List contributors = getContributors(elements); if (contributors.isEmpty()) return false; // First pass, add the menus and collect the overrides. Prune from the // list any non-applicable contributions. boolean actualContributions = false; ArrayList overrides = new ArrayList(4); for (Iterator it = contributors.iterator(); it.hasNext();) { IObjectActionContributor contributor = (IObjectActionContributor) it.next(); if (!isApplicableTo(elements, contributor)) { it.remove(); continue; } if (contributor.contributeObjectMenus(popupMenu, selProv)) actualContributions = true; contributor.contributeObjectActionIdOverrides(overrides); } // Second pass, add the contributions that are applicable to // the selection. for (Iterator it = contributors.iterator(); it.hasNext();) { IObjectActionContributor contributor = (IObjectActionContributor) it.next(); if (contributor.contributeObjectActions(part, popupMenu, selProv, overrides)) actualContributions = true; } return actualContributions; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/ObjectActionContributorManager.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ObjectActionContributorManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
356,
887,
921,
6100,
12,
45,
2421,
22144,
1988,
1087,
16,
5411,
467,
4599,
1318,
10431,
4599,
16,
467,
6233,
2249,
357,
626,
90,
13,
288,
3639,
368,
968,
279,
4421,
18,
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,
377,
1071,
1250,
356,
887,
921,
6100,
12,
45,
2421,
22144,
1988,
1087,
16,
5411,
467,
4599,
1318,
10431,
4599,
16,
467,
6233,
2249,
357,
626,
90,
13,
288,
3639,
368,
968,
279,
4421,
18,
202,... |
block.setBlockObject(newProc); | newProc.block.setBlockObject(newProc); | public static RubyProc newProc(IRuby runtime, boolean isLambda) { ThreadContext tc = runtime.getCurrentContext(); if (!tc.isBlockGiven() && !tc.isFBlockGiven()) { throw runtime.newArgumentError("tried to create Proc object without a block"); } if (isLambda && !tc.isBlockGiven()) { // TODO: warn "tried to create Proc object without a block" } Block block = (Block) tc.getCurrentBlock(); if (!isLambda && block.getBlockObject() instanceof RubyProc) { return (RubyProc) block.getBlockObject(); } RubyProc newProc = new RubyProc(runtime, runtime.getClass("Proc")); newProc.block = block.cloneBlock(); newProc.wrapper = tc.getWrapper(); newProc.block.isLambda = isLambda; block.setBlockObject(newProc); return newProc; } | 45827 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45827/048e5b9179a657d1e786630b4cb43ae2bfdfbe4a/RubyProc.java/buggy/src/org/jruby/RubyProc.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
15417,
394,
15417,
12,
7937,
10340,
3099,
16,
1250,
353,
12025,
13,
288,
3639,
4884,
1042,
1715,
273,
3099,
18,
588,
3935,
1042,
5621,
7734,
309,
16051,
5111,
18,
291,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
15417,
394,
15417,
12,
7937,
10340,
3099,
16,
1250,
353,
12025,
13,
288,
3639,
4884,
1042,
1715,
273,
3099,
18,
588,
3935,
1042,
5621,
7734,
309,
16051,
5111,
18,
291,
1... |
public org.quickfix.field.Text getText() throws FieldNotFound { org.quickfix.field.Text value = new org.quickfix.field.Text(); | public quickfix.field.Text getText() throws FieldNotFound { quickfix.field.Text value = new quickfix.field.Text(); | public org.quickfix.field.Text getText() throws FieldNotFound { org.quickfix.field.Text value = new org.quickfix.field.Text(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityDefinition.java/clean/src/java/src/quickfix/fix42/SecurityDefinition.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
1528,
6701,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
1528,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
1528... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
1528,
6701,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
1528,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
1528... |
match(input,ID,FOLLOW_ID_in_dotted_name3125); if (failed) return name; | match(input,ID,FOLLOW_ID_in_dotted_name3251); if (failed) return name; | public String dotted_name() throws RecognitionException { String name = null; Token id=null; name = null; try { // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1256:3: (id= ID ( ( '.' ID )=> '.' id= ID )* ( ( '[' ']' )=> '[' ']' )* ) // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1256:3: id= ID ( ( '.' ID )=> '.' id= ID )* ( ( '[' ']' )=> '[' ']' )* { id=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_dotted_name3125); if (failed) return name; if ( backtracking==0 ) { name=id.getText(); } // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1256:32: ( ( '.' ID )=> '.' id= ID )* loop47: do { int alt47=2; int LA47_0 = input.LA(1); if ( (LA47_0==33) ) { alt47=1; } switch (alt47) { case 1 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1256:34: ( '.' ID )=> '.' id= ID { match(input,33,FOLLOW_33_in_dotted_name3131); if (failed) return name; id=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_dotted_name3135); if (failed) return name; if ( backtracking==0 ) { name = name + "." + id.getText(); } } break; default : break loop47; } } while (true); // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1256:85: ( ( '[' ']' )=> '[' ']' )* loop48: do { int alt48=2; int LA48_0 = input.LA(1); if ( (LA48_0==LEFT_SQUARE) ) { alt48=1; } switch (alt48) { case 1 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1256:87: ( '[' ']' )=> '[' ']' { match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_dotted_name3144); if (failed) return name; match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_dotted_name3146); if (failed) return name; if ( backtracking==0 ) { name = name + "[]"; } } break; default : break loop48; } } while (true); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return name; } | 5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/158de3e3177d9b48d45fb4c3fae8404e0f01f690/DRLParser.java/clean/drools-compiler/src/main/java/org/drools/lang/DRLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
20965,
67,
529,
1435,
1216,
9539,
288,
6647,
514,
508,
273,
446,
31,
3639,
3155,
612,
33,
2011,
31,
1171,
202,
202,
529,
273,
446,
31,
540,
202,
3639,
775,
288,
5411,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
20965,
67,
529,
1435,
1216,
9539,
288,
6647,
514,
508,
273,
446,
31,
3639,
3155,
612,
33,
2011,
31,
1171,
202,
202,
529,
273,
446,
31,
540,
202,
3639,
775,
288,
5411,
368,
... |
public String getLastBackoffReason() { | public synchronized String getLastBackoffReason() { | public String getLastBackoffReason() { return lastRoutingBackoffReason; } | 50915 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50915/7575bc3fb32360236cef62f655076b5de182f7d4/PeerNode.java/clean/src/freenet/node/PeerNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
7595,
16757,
8385,
1435,
288,
202,
202,
2463,
1142,
13966,
16757,
8385,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
7595,
16757,
8385,
1435,
288,
202,
202,
2463,
1142,
13966,
16757,
8385,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
.getColumnHandleAdapter( array[0] ).getColumnNumber( ); | .getColumnHandleAdapter( array[0] ) .getColumnNumber( ); | public static boolean handleValidateDragInOutline( Object selection ) { if ( selection instanceof StructuredSelection ) { return handleValidateDragInOutline( ( (StructuredSelection) selection ) .toArray( ) ); } if ( selection instanceof Object[] ) { Object[] array = (Object[]) selection; if ( array.length == 0 ) { return false; } if ( array[0] instanceof ColumnHandle && ((ColumnHandle)array[0]).getRoot() != null) { boolean bool = false; int columnNumber = HandleAdapterFactory.getInstance( ) .getColumnHandleAdapter( array[0] ).getColumnNumber( ); Object parent = ( (ColumnHandle) array[0] ).getContainer( ); if ( parent instanceof TableHandle ) { bool = ( (TableHandle) parent ) .canCopyColumn( columnNumber ); } else if ( parent instanceof GridHandle ) { bool = ( (GridHandle) parent ).canCopyColumn( columnNumber ); } if ( bool && array.length == 1 ) { return true; } if ( bool && array[1] instanceof CellHandle ) { return true; } return false; } for ( int i = 0; i < array.length; i++ ) { if ( checkContainerExists( array[i], array ) ) continue; if ( !handleValidateDragInOutline( array[i] ) ) return false; } return true; } if ( selection instanceof ReportElementModel ) { return handleValidateDragInOutline( ( (ReportElementModel) selection ) .getSlotHandle( ) ); } if ( selection instanceof SlotHandle ) { SlotHandle slot = (SlotHandle) selection; DesignElementHandle handle = slot.getElementHandle( ); return slot.getContents( ).size( ) > 0 && ( handle instanceof ListHandle || handle instanceof ListGroupHandle ); } if ( selection instanceof ColumnHandle && ((ColumnHandle)selection).getRoot()!=null ) { int columnNumber = HandleAdapterFactory.getInstance( ) .getColumnHandleAdapter( selection ).getColumnNumber( ); Object parent = ( (ColumnHandle) selection ).getContainer( ); if ( parent instanceof TableHandle ) { return ( (TableHandle) parent ).canCopyColumn( columnNumber ); } else if ( parent instanceof GridHandle ) { return ( (GridHandle) parent ).canCopyColumn( columnNumber ); } } return selection instanceof ReportItemHandle || selection instanceof DataSetHandle || selection instanceof DataSourceHandle || selection instanceof ScalarParameterHandle || selection instanceof ParameterGroupHandle // || selection instanceof RowHandle || selection instanceof GroupHandle || selection instanceof StyleHandle || selection instanceof ThemeHandle || selection instanceof EmbeddedImageHandle || selection instanceof TemplateElementHandle || selection instanceof DataSetItemModel || selection instanceof ResultSetColumnHandle; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/15872394c039d121619cbe58b491c78363c43ff7/DNDUtil.java/clean/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/DNDUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
1640,
4270,
11728,
382,
21805,
12,
1033,
4421,
262,
202,
95,
202,
202,
430,
261,
4421,
1276,
7362,
2862,
6233,
262,
202,
202,
95,
1082,
202,
2463,
1640,
4270,
11728,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
4270,
11728,
382,
21805,
12,
1033,
4421,
262,
202,
95,
202,
202,
430,
261,
4421,
1276,
7362,
2862,
6233,
262,
202,
202,
95,
1082,
202,
2463,
1640,
4270,
11728,
... |
default: type = "UNKNOWN TYPE (" + total_header_type + ')'; break; } | default: type="UNKNOWN TYPE (" + total_header_type + ')'; break; } | public String toString() { String type = ""; switch( total_header_type ) { case TOTAL_UNICAST: type = "TOTAL_UNICAST"; break; case TOTAL_BCAST: type = "TOTAL_BCAST"; break; case TOTAL_REQUEST: type = "TOTAL_REQUEST"; break; case TOTAL_NEW_VIEW: type = "NEW_VIEW"; break; case TOTAL_NEW_VIEW_ACK: type = "NEW_VIEW_ACK"; break; case TOTAL_CUM_SEQ_ACK: type = "TOTAL_CUM_SEQ_ACK"; break; case TOTAL_SEQ_ACK: type = "TOTAL_SEQ_ACK"; break; case TOTAL_RESEND: type = "TOTAL_RESEND"; break; default: type = "UNKNOWN TYPE (" + total_header_type + ')'; break; } return "[ TOTAL_OLD: type=" + type + ", seq=" + seq_id + " ]"; } | 51463 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51463/5ad015d9a78e1da3350d9b398b46b2f5d4508564/TOTAL_OLD.java/clean/src/org/jgroups/protocols/TOTAL_OLD.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1762,
1435,
288,
202,
565,
514,
618,
273,
1408,
31,
202,
565,
1620,
12,
2078,
67,
3374,
67,
723,
262,
288,
202,
565,
648,
399,
19851,
67,
2124,
2871,
9053,
30,
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,
514,
1762,
1435,
288,
202,
565,
514,
618,
273,
1408,
31,
202,
565,
1620,
12,
2078,
67,
3374,
67,
723,
262,
288,
202,
565,
648,
399,
19851,
67,
2124,
2871,
9053,
30,
202,
202... |
return readers[index].getPixelType(id); | return readers[current].getPixelType(id); | public int getPixelType(String id) throws FormatException, IOException { if (!id.equals(currentId)) initFile(id); return readers[index].getPixelType(id); } | 55303 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55303/76f0f24f6d6757c1f4133a42b987de82878422c1/ImageReader.java/clean/loci/formats/ImageReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
1689,
3556,
559,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
309,
16051,
350,
18,
14963,
12,
2972,
548,
3719,
1208,
812,
12,
350,
1769,
565,
327,
16527,
63,
2972,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
1689,
3556,
559,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
309,
16051,
350,
18,
14963,
12,
2972,
548,
3719,
1208,
812,
12,
350,
1769,
565,
327,
16527,
63,
2972,
... |
throws ClassNotFoundException, IOException, SQLException { | throws ClassNotFoundException, IOException, SQLException { | protected Object getJobDetailFromBlob(ResultSet rs, String colName) throws ClassNotFoundException, IOException, SQLException { if (canUseProperties()) { InputStream binaryInput = rs.getBinaryStream(colName); return binaryInput; } return getObjectFromBlob(rs, colName); } | 15562 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15562/f6eeea5a952e67d6b7fc8b54ae64d0b9e7098a98/MSSQLDelegate.java/clean/src/java/org/quartz/impl/jdbcjobstore/MSSQLDelegate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1033,
13024,
6109,
1265,
9405,
12,
13198,
3597,
16,
514,
18655,
13,
5411,
1216,
10403,
16,
1860,
16,
6483,
288,
3639,
309,
261,
4169,
3727,
2297,
10756,
288,
5411,
5037,
3112,
1210,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
13024,
6109,
1265,
9405,
12,
13198,
3597,
16,
514,
18655,
13,
5411,
1216,
10403,
16,
1860,
16,
6483,
288,
3639,
309,
261,
4169,
3727,
2297,
10756,
288,
5411,
5037,
3112,
1210,
... |
public boolean isEnabledFor(Object obj) { | public boolean isEnabledFor(Object object) { | public boolean isEnabledFor(Object obj) { Iterator iter = list.iterator(); while (iter.hasNext()) { AbstractExpression expr = (AbstractExpression)iter.next(); if (expr.isEnabledFor(obj)) return true; } return false; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/5a7207e86843def9001d641c82b7f76fd7c9d57f/ActionExpression.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionExpression.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1250,
12047,
1290,
12,
921,
1081,
13,
288,
1082,
202,
3198,
1400,
273,
666,
18,
9838,
5621,
1082,
202,
17523,
261,
2165,
18,
5332,
2134,
10756,
288,
9506,
202,
7469,
2300,
3065... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1250,
12047,
1290,
12,
921,
1081,
13,
288,
1082,
202,
3198,
1400,
273,
666,
18,
9838,
5621,
1082,
202,
17523,
261,
2165,
18,
5332,
2134,
10756,
288,
9506,
202,
7469,
2300,
3065... |
ec.addWarn("Parsing warning", this, spe); ec.addWarn("Parsing problem on line " + spe.getLineNumber() + " and column " + spe.getColumnNumber(), this, spe); | addWarn("Parsing warning", spe); addWarn("Parsing problem on line " + spe.getLineNumber() + " and column " + spe.getColumnNumber(), spe); | public void warning(SAXParseException spe) throws SAXException { ec.addWarn("Parsing warning", this, spe); ec.addWarn("Parsing problem on line " + spe.getLineNumber() + " and column " + spe.getColumnNumber(), this, spe); } | 51675 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51675/7177ff8f31734f293185997e0a81156f64bc26a6/SaxEventRecorder.java/clean/logback-core/src/main/java/ch/qos/logback/core/joran/spi/SaxEventRecorder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3436,
12,
55,
2501,
13047,
17785,
13,
1216,
14366,
288,
565,
6557,
18,
1289,
3160,
2932,
13963,
3436,
3113,
333,
16,
17785,
1769,
565,
6557,
18,
1289,
3160,
2932,
13963,
6199,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3436,
12,
55,
2501,
13047,
17785,
13,
1216,
14366,
288,
565,
6557,
18,
1289,
3160,
2932,
13963,
3436,
3113,
333,
16,
17785,
1769,
565,
6557,
18,
1289,
3160,
2932,
13963,
6199,
... |
String dirName = "target/threshd-test/1"; | String rrdRepository = "target/threshd-test"; | protected void setUp() throws Exception { super.setUp(); MockLogAppender.setupLogging(); setupDatabase(); createMockRrd(); setupEventManager(); String dirName = "target/threshd-test/1"; String fileName = "cpuUtilization"+RrdUtils.getExtension(); String ipAddress = "192.168.1.1"; String serviceName = "SNMP"; String groupName = "default-snmp"; setupThresholdConfig(dirName, fileName, ipAddress, serviceName, groupName); m_thresholder = new SnmpThresholder(); m_thresholder.initialize(m_serviceParameters); m_thresholder.initialize(m_iface, m_parameters); } | 11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/7a86f2834f8ee12135b42094cac6abd75242882c/SnmpThresholderTest.java/clean/opennms-services/src/test/java/org/opennms/netmgt/threshd/SnmpThresholderTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24292,
1435,
1216,
1185,
288,
3639,
2240,
18,
542,
1211,
5621,
7734,
7867,
1343,
17302,
18,
8401,
7735,
5621,
7734,
3875,
4254,
5621,
7734,
752,
9865,
54,
13623,
5621,
3639,
3875... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24292,
1435,
1216,
1185,
288,
3639,
2240,
18,
542,
1211,
5621,
7734,
7867,
1343,
17302,
18,
8401,
7735,
5621,
7734,
3875,
4254,
5621,
7734,
752,
9865,
54,
13623,
5621,
3639,
3875... |
public void skippedEntity (String name) { /* ignored */ } | public void skippedEntity(String name) { /* ignored */ } | public void skippedEntity (String name) { /* ignored */ } | 27835 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27835/7fb7568e63c3fe14af521de4699cb37898923ca7/SAXDriver.java/buggy/libjava/gnu/xml/aelfred2/SAXDriver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
9700,
1943,
261,
780,
508,
13,
202,
565,
288,
1748,
5455,
1195,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
9700,
1943,
261,
780,
508,
13,
202,
565,
288,
1748,
5455,
1195,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
monitor.beginTask("Setting Binary Parser...", 2); | monitor.beginTask(CUIMessages.getString("BinaryParserBlock.settingBinaryParser"), 2); | public void performApply(IProgressMonitor monitor) throws CoreException { if (monitor == null) { monitor = new NullProgressMonitor(); } monitor.beginTask("Setting Binary Parser...", 2); String selected = comboBox.getText(); if (selected != null) { if (initial == null || !selected.equals(initial)) { if (getContainer().getProject() != null) { ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(getContainer().getProject()); desc.remove(CCorePlugin.BINARY_PARSER_UNIQ_ID); desc.create(CCorePlugin.BINARY_PARSER_UNIQ_ID, (String) idMap.get(selected)); } else { fPrefs.setValue(CCorePlugin.PREF_BINARY_PARSER, (String) idMap.get(selected)); } initial = selected; } } monitor.worked(1); // Give a chance to the contributions to save. // We have to do it last to make sure the parser id is save // in .cdtproject super.performApply(new SubProgressMonitor(monitor, 1)); // Reset the binary parser the paths may have change. if (getContainer().getProject() != null) CCorePlugin.getDefault().getCoreModel().resetBinaryParser(getContainer().getProject()); monitor.done(); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/1738ff26440cb838b4d42f49cb8d29c4cc9babdf/BinaryParserBlock.java/clean/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3073,
7001,
12,
45,
5491,
7187,
6438,
13,
1216,
30015,
288,
202,
202,
430,
261,
10259,
422,
446,
13,
288,
1082,
202,
10259,
273,
394,
4112,
5491,
7187,
5621,
202,
202,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3073,
7001,
12,
45,
5491,
7187,
6438,
13,
1216,
30015,
288,
202,
202,
430,
261,
10259,
422,
446,
13,
288,
1082,
202,
10259,
273,
394,
4112,
5491,
7187,
5621,
202,
202,
97... |
public void actionPerformed(ActionEvent event) { JInternalFrame[] frames = DesktopPane.getAllFrames(); prefs.write(); try { for(int i = 0; i < frames.length; ++i) { frames[i].setClosed(true); } // 3P // Close down the STI library SoarRuntimeTerm(); dispose(); commitAction.perform(); System.exit(0); } catch (java.beans.PropertyVetoException pve) {} } | 47007 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47007/1b1fc0d1cd3e331f011554311af91290afd09142/MainFrame.java/buggy/OldSoar/trunk/visualsoar/Source/edu/umich/visualsoar/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
6459,
1128,
13889,
12,
1803,
1133,
2575,
15329,
1082,
202,
46,
3061,
3219,
8526,
10278,
33,
27583,
8485,
18,
588,
1595,
15162,
5621,
1082,
202,
1484,
2556,
18,
2626,
5621,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
6459,
1128,
13889,
12,
1803,
1133,
2575,
15329,
1082,
202,
46,
3061,
3219,
8526,
10278,
33,
27583,
8485,
18,
588,
1595,
15162,
5621,
1082,
202,
1484,
2556,
18,
2626,
5621,
1082,
... | ||
toolSession.setAttribute(ResourceToolAction.ACTION_CANCELED, Boolean.TRUE); | ResourceToolActionPipe pipe = (ResourceToolActionPipe) toolSession.getAttribute(ResourceToolAction.ACTION_PIPE); pipe.setActionCanceled(true); pipe.setErrorEncountered(false); pipe.setActionCompleted(true); | public void doCancel(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); ParameterParser params = data.getParameters (); ToolSession toolSession = SessionManager.getCurrentToolSession(); Tool tool = ToolManager.getCurrentTool(); String url = (String) toolSession.getAttribute(tool.getId() + Tool.HELPER_DONE_URL); toolSession.removeAttribute(tool.getId() + Tool.HELPER_DONE_URL); toolSession.setAttribute(ResourceToolAction.ACTION_CANCELED, Boolean.TRUE); } | 52245 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52245/e05dd31903c0f04dd00e7100a5602fab83480354/ResourcesHelperAction.java/clean/content-tool/tool/src/java/org/sakaiproject/content/tool/ResourcesHelperAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
741,
6691,
12,
1997,
751,
501,
13,
202,
95,
202,
202,
2157,
1119,
919,
273,
14015,
46,
2413,
5868,
1997,
751,
13,
892,
2934,
588,
18566,
2157,
1119,
261,
12443,
46,
2413,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
741,
6691,
12,
1997,
751,
501,
13,
202,
95,
202,
202,
2157,
1119,
919,
273,
14015,
46,
2413,
5868,
1997,
751,
13,
892,
2934,
588,
18566,
2157,
1119,
261,
12443,
46,
2413,... |
switch (provider.getShowType()) { case ShowPluginsMenu.SHOW_ALL_PLUGINS : treeViewer.add(treeViewer.getInput(), adapter); break; case ShowPluginsMenu.SHOW_RUNNING_PLUGINS : if (descriptor.isPluginActivated()) treeViewer.add(treeViewer.getInput(), adapter); break; case ShowPluginsMenu.SHOW_NON_RUNNING_PLUGINS : if (!descriptor.isPluginActivated()) treeViewer.add(treeViewer.getInput(), adapter); break; default : break; } | if (provider.isShowRunning() && descriptor.isPluginActivated()) treeViewer.add(treeViewer.getInput(), adapter); else treeViewer.add(treeViewer.getInput(), adapter); | public void bundleChanged(BundleEvent event) { final RegistryBrowserContentProvider provider = ((RegistryBrowserContentProvider) treeViewer .getContentProvider()); final IPluginDescriptor descriptor = Platform.getPluginRegistry() .getPluginDescriptor(event.getBundle().getGlobalName()); if (descriptor == null) return; final PluginObjectAdapter adapter = new PluginObjectAdapter(descriptor); treeViewer.getTree().getDisplay().asyncExec(new Runnable() { public void run() { TreeItem[] items = treeViewer.getTree().getItems(); if (items != null) { for (int i = 0; i < items.length; i++) { PluginObjectAdapter plugin = (PluginObjectAdapter) items[i] .getData(); if (adapter != null) { Object object = plugin.getObject(); if (object instanceof IPluginDescriptor) { IPluginDescriptor desc = (IPluginDescriptor) object; if (desc.equals(descriptor)) { treeViewer.remove(plugin); break; } } } } } switch (provider.getShowType()) { case ShowPluginsMenu.SHOW_ALL_PLUGINS : treeViewer.add(treeViewer.getInput(), adapter); break; case ShowPluginsMenu.SHOW_RUNNING_PLUGINS : if (descriptor.isPluginActivated()) treeViewer.add(treeViewer.getInput(), adapter); break; case ShowPluginsMenu.SHOW_NON_RUNNING_PLUGINS : if (!descriptor.isPluginActivated()) treeViewer.add(treeViewer.getInput(), adapter); break; default : break; } } }); } | 14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/da9411dec7054667c47dca3c2ca1644866de8d9b/RegistryBrowser.java/buggy/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3440,
5033,
12,
3405,
1133,
871,
13,
288,
202,
202,
6385,
5438,
9132,
1350,
2249,
2893,
273,
14015,
4243,
9132,
1350,
2249,
13,
2151,
18415,
9506,
202,
18,
588,
1350,
2249,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3440,
5033,
12,
3405,
1133,
871,
13,
288,
202,
202,
6385,
5438,
9132,
1350,
2249,
2893,
273,
14015,
4243,
9132,
1350,
2249,
13,
2151,
18415,
9506,
202,
18,
588,
1350,
2249,... |
if (jj_3R_77()) return true; | final private boolean jj_3R_112() { if (jj_3R_77()) return true; Token xsp; if (jj_3_14()) return true; while (true) { xsp = jj_scanpos; if (jj_3_14()) { jj_scanpos = xsp; break; } } return false; } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/3e3034d7566b0047ef2bf5af2e29ce51f94a2d2e/JavaParser.java/clean/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
17666,
1435,
288,
4202,
3155,
619,
1752,
31,
565,
309,
261,
78,
78,
67,
23,
67,
3461,
10756,
327,
638,
31,
565,
1323,
261,
3767,
13,
288,
1377,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
17666,
1435,
288,
4202,
3155,
619,
1752,
31,
565,
309,
261,
78,
78,
67,
23,
67,
3461,
10756,
327,
638,
31,
565,
1323,
261,
3767,
13,
288,
1377,... | |
catch (PySyntaxError e) { try { node = parse(new StringBufferInputStream(string+"\n"), kind, filename, cflags); } catch (PySyntaxError e1) { if (e.forceNewline || !e1.forceNewline) throw e; } return null; | catch (Throwable t) { /* CPython codeop exploits that with CPython parser adding newlines to a partial valid sentence move the reported error position, this is not true for our parser, so we need a different approach: we check whether all sentence tokens have been consumed or the remaining ones fullfill lookahead expectations. See: PythonGrammar.partial_valid_sentence (def in python.jjt) */ if (g.partial_valid_sentence(t)) { return null; } throw fixParseError(bufreader, t, filename); | public static modType partialParse(String string, String kind, String filename, CompilerFlags cflags) { modType node = null; //System.err.println(new PyString(string).__repr__().toString()); try { node = parse(new StringBufferInputStream(string), kind, filename, cflags); } catch (PySyntaxError e) { //System.out.println("e: "+e.lineno+", "+e.column+", "+ // e.forceNewline); try { node = parse(new StringBufferInputStream(string+"\n"), kind, filename, cflags); } catch (PySyntaxError e1) { //System.out.println("e1: "+e1.lineno+", "+e1.column+ // ", "+e1.forceNewline); if (e.forceNewline || !e1.forceNewline) throw e; } return null; } return node; } | 6527 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6527/2b47cff319e0a469e540c356f904a833b9b33cd7/parser.java/buggy/org/python/core/parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
681,
559,
4702,
3201,
12,
780,
533,
16,
514,
3846,
16,
4766,
1850,
514,
1544,
16,
4766,
1850,
12972,
5094,
276,
7133,
13,
565,
288,
3639,
681,
559,
756,
273,
446,
31,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
681,
559,
4702,
3201,
12,
780,
533,
16,
514,
3846,
16,
4766,
1850,
514,
1544,
16,
4766,
1850,
12972,
5094,
276,
7133,
13,
565,
288,
3639,
681,
559,
756,
273,
446,
31,
3639,
... |
public void edgesChanged(IMylarContextNode node) { | public void edgesChanged(IMylarElement node) { | public void edgesChanged(IMylarContextNode node) { // don't care about this event } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/f5bfb4859762da1543c326b182b2de34d0d94c08/ContextManagerTest.java/clean/org.eclipse.mylyn.java.tests/src/org/eclipse/mylyn/java/tests/ContextManagerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
5231,
5033,
12,
3445,
93,
7901,
1046,
756,
13,
288,
540,
202,
759,
2727,
1404,
7671,
2973,
333,
871,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
5231,
5033,
12,
3445,
93,
7901,
1046,
756,
13,
288,
540,
202,
759,
2727,
1404,
7671,
2973,
333,
871,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return new Double(ln < 0.0d ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY); | if (ln == 0.0d || ln == -0.0d) { return new Double(Double.NaN); } else { return new Double(ln < 0.0d ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY); } | public Object evaluate(Node context, int pos, int len) { Object left = lhs.evaluate(context, pos, len); Object right = rhs.evaluate(context, pos, len); double ln = _number(context, left); double rn = _number(context, right); switch (op) { case ADD: return new Double(ln + rn); case SUBTRACT: return new Double(ln - rn); case MULTIPLY: return new Double(ln * rn); case DIVIDE: if (rn == 0.0d || rn == -0.0d) { return new Double(ln < 0.0d ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY); } return new Double(ln / rn); case MODULO: if (rn == 0.0d || rn == -0.0d) { return new Double(ln < 0.0d ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY); } return new Double(ln % rn); default: throw new IllegalStateException(); } } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/5d6e63e8fc39b60710c81700f3faa7cdd21eeb60/ArithmeticExpr.java/clean/gnu/xml/xpath/ArithmeticExpr.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1033,
5956,
12,
907,
819,
16,
509,
949,
16,
509,
562,
13,
225,
288,
565,
1033,
2002,
273,
8499,
18,
21024,
12,
2472,
16,
949,
16,
562,
1769,
565,
1033,
2145,
273,
7711,
18,
2102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
5956,
12,
907,
819,
16,
509,
949,
16,
509,
562,
13,
225,
288,
565,
1033,
2002,
273,
8499,
18,
21024,
12,
2472,
16,
949,
16,
562,
1769,
565,
1033,
2145,
273,
7711,
18,
2102... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.