rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
this.choicesContainer.clear(); for (int i = 0; i < this.choices.length; i++) { Item item = this.choiceItems[i]; if (item == null) { item = new ChoiceItem( this.choices[i], null, Choice.IMPLICIT, this.choiceItemStyle ); | if (this.numberOfMatches == this.choices.length) { this.numberOfMatches = 0; openChoices( false ); } else { this.appendDelimiterIndex = -1; this.choicesContainer.clear(); for (int i = 0; i < this.choices.length; i++) { Item item = this.choiceItems[i]; if (item == null) { item = new ChoiceItem( this.choices[i], null, Choice.IMPLICIT, this.choiceItemStyle ); } this.choicesContainer.add( item ); | protected boolean handleKeyPressed(int keyCode, int gameAction) { //#debug System.out.println("keyPressed( keyCode=" + keyCode + ", gameAction=" + gameAction + " )"); if (this.isInChoice) { if ( this.choicesContainer.handleKeyPressed(keyCode, gameAction) ) { //#debug System.out.println("keyPressed handled by choices container"); return true; } //System.out.println("focusing textfield again, isFocused=" + this.isFocused); enterChoices( false ); if (gameAction == Canvas.FIRE) { // option has been selected! Item item = this.choicesContainer.getFocusedItem(); String choiceText; if ( item instanceof ChoiceItem ) { choiceText = ((ChoiceItem) item).getText(); } else { choiceText = item.toString(); } //#if polish.usePolishGui //# setString( choiceText ); //# setCaretPosition( choiceText.length() ); //#else System.out.println( choiceText ); // just use it so that the IDE won't cry //#endif this.numberOfMatches = 0; this.choicesContainer.clear(); openChoices( false ); super.notifyStateChanged(); } return true; } else if ( (gameAction == Canvas.DOWN && keyCode != Canvas.KEY_NUM8) && this.numberOfMatches > 0) { //System.out.println("focusing choices container"); enterChoices( true ); return true; } else if (gameAction == Canvas.FIRE && keyCode != Canvas.KEY_NUM5) { //if (this.numberOfMatches == 0) { if (this.choices == null) { //#if polish.usePolishGui //# return super.handleKeyPressed(keyCode, gameAction); //#else return true; //#endif } this.choicesContainer.clear(); for (int i = 0; i < this.choices.length; i++) { Item item = this.choiceItems[i]; if (item == null) { // create new ChoiceItem (lazy initialisation) item = new ChoiceItem( this.choices[i], null, Choice.IMPLICIT, this.choiceItemStyle ); } this.choicesContainer.add( item ); } this.numberOfMatches = this.choicesContainer.size(); //} //enterChoices( true ); return true; } //#if polish.usePolishGui //# return super.handleKeyPressed(keyCode, gameAction); //#else return true; //#endif } | 9804 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9804/81985946103c70577b8512e8ee7690a116bcdbef/ChoiceTextField.java/buggy/enough-polish-j2me/source/src/de/enough/polish/ui/ChoiceTextField.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1250,
1640,
653,
24624,
12,
474,
16369,
16,
509,
7920,
1803,
13,
288,
202,
202,
759,
7,
4148,
202,
202,
3163,
18,
659,
18,
8222,
2932,
856,
24624,
12,
16369,
1546,
397,
16369... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
1640,
653,
24624,
12,
474,
16369,
16,
509,
7920,
1803,
13,
288,
202,
202,
759,
7,
4148,
202,
202,
3163,
18,
659,
18,
8222,
2932,
856,
24624,
12,
16369,
1546,
397,
16369... |
final Main finalDb = db; | ContextWindow(Main db) { super(); this.db = db; enabled = false; JPanel left = new JPanel(); JToolBar t1 = new JToolBar(); t1.setName("Variables"); t1.setLayout(new GridLayout()); t1.add(left); JPanel p1 = new JPanel(); p1.setLayout(new GridLayout()); JPanel p2 = new JPanel(); p2.setLayout(new GridLayout()); p1.add(t1); JLabel label = new JLabel("Context:"); context = new JComboBox(); context.setLightWeightPopupEnabled(false); toolTips = new java.util.Vector(); label.setBorder(context.getBorder()); context.addActionListener(this); context.setActionCommand("ContextSwitch"); GridBagLayout layout = new GridBagLayout(); left.setLayout(layout); GridBagConstraints lc = new GridBagConstraints(); lc.insets.left = 5; lc.anchor = GridBagConstraints.WEST; lc.ipadx = 5; layout.setConstraints(label, lc); left.add(label); GridBagConstraints c = new GridBagConstraints(); c.gridwidth = GridBagConstraints.REMAINDER; c.fill = GridBagConstraints.HORIZONTAL; c.anchor = GridBagConstraints.WEST; layout.setConstraints(context, c); left.add(context); tabs = new JTabbedPane(SwingConstants.BOTTOM); tabs.setPreferredSize(new Dimension(500,300)); thisTable = new MyTreeTable(new AbstractTreeTableModel(new DefaultMutableTreeNode()) { public Object getChild(Object parent, int index) { return null; } public int getChildCount(Object parent) { return 0; } public int getColumnCount() { //return 3; return 2; } public String getColumnName(int column) { switch (column) { case 0: return " Name"; case 1: //return "Type"; //case 2: return " Value"; } return null; } public Object getValueAt(Object node, int column) { return null; } }); JScrollPane jsp = new JScrollPane(thisTable); jsp.getViewport().setViewSize(new Dimension(5,2)); tabs.add("this", jsp); localsTable = new MyTreeTable(new AbstractTreeTableModel(new DefaultMutableTreeNode()) { public Object getChild(Object parent, int index) { return null; } public int getChildCount(Object parent) { return 0; } public int getColumnCount() { return 2; } public String getColumnName(int column) { switch (column) { case 0: return " Name"; case 1: return " Value"; } return null; } public Object getValueAt(Object node, int column) { return null; } }); localsTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); localsTable.setPreferredSize(null); jsp = new JScrollPane(localsTable); tabs.add("Locals", jsp); c.weightx = c.weighty = 1; c.gridheight = GridBagConstraints.REMAINDER; c.fill = GridBagConstraints.BOTH; c.anchor = GridBagConstraints.WEST; layout.setConstraints(tabs, c); left.add(tabs); evaluator = new Evaluator(db); cmdLine = new EvalTextArea(db); //cmdLine.requestFocus(); tableModel = evaluator.tableModel; jsp = new JScrollPane(evaluator); JToolBar t2 = new JToolBar(); t2.setName("Evaluate"); tabs2 = new JTabbedPane(SwingConstants.BOTTOM); tabs2.add("Watch", jsp); tabs2.add("Evaluate", new JScrollPane(cmdLine)); tabs2.setPreferredSize(new Dimension(500,300)); t2.setLayout(new GridLayout()); t2.add(tabs2); p2.add(t2); evaluator.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, p1, p2); split.setOneTouchExpandable(true); Main.setResizeWeight(split, 0.5); setLayout(new BorderLayout()); add(split, BorderLayout.CENTER); final JToolBar finalT1 = t1; final JToolBar finalT2 = t2; final JPanel finalP1 = p1; final JPanel finalP2 = p2; final JSplitPane finalSplit = split; final JPanel finalThis = this; final Main finalDb = db; ComponentListener clistener = new ComponentListener() { boolean t1Docked = true; boolean t2Docked = true; void check(Component comp) { Component thisParent = finalThis.getParent(); if (thisParent == null) { return; } Component parent = finalT1.getParent(); boolean leftDocked = true; boolean rightDocked = true; boolean adjustVerticalSplit = false; if (parent != null) { if (parent != finalP1) { while (!(parent instanceof JFrame)) { parent = parent.getParent(); } JFrame frame = (JFrame)parent; finalDb.addTopLevel("Variables", frame); // We need the following hacks because: // - We want an undocked toolbar to be // resizable. // - We are using JToolbar as a container of a // JComboBox. Without this JComboBox's popup // can get left floating when the toolbar is // re-docked. // // We make the frame resizable and then // remove JToolbar's window listener // and insert one of our own that first ensures // the JComboBox's popup window is closed // and then calls JToolbar's window listener. if (!frame.isResizable()) { frame.setResizable(true); frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); final EventListener[] l = frame.getListeners(WindowListener.class); frame.removeWindowListener((WindowListener)l[0]); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { context.hidePopup(); ((WindowListener)l[0]).windowClosing(e); } }); //adjustVerticalSplit = true; } leftDocked = false; } else { leftDocked = true; } } parent = finalT2.getParent(); if (parent != null) { if (parent != finalP2) { while (!(parent instanceof JFrame)) { parent = parent.getParent(); } JFrame frame = (JFrame)parent; finalDb.addTopLevel("Evaluate", frame); frame.setResizable(true); rightDocked = false; } else { rightDocked = true; } } if (leftDocked && t2Docked && rightDocked && t2Docked) { // no change return; } t1Docked = leftDocked; t2Docked = rightDocked; JSplitPane split = (JSplitPane)thisParent; if (leftDocked) { if (rightDocked) { finalSplit.setDividerLocation(0.5); } else { finalSplit.setDividerLocation(1.0); } if (adjustVerticalSplit) { split.setDividerLocation(0.66); } } else if (rightDocked) { finalSplit.setDividerLocation(0.0); split.setDividerLocation(0.66); } else { // both undocked split.setDividerLocation(1.0); } } public void componentHidden(ComponentEvent e) { check(e.getComponent()); } public void componentMoved(ComponentEvent e) { check(e.getComponent()); } public void componentResized(ComponentEvent e) { check(e.getComponent()); } public void componentShown(ComponentEvent e) { check(e.getComponent()); } }; p1.addContainerListener(new ContainerListener() { public void componentAdded(ContainerEvent e) { Component thisParent = finalThis.getParent(); JSplitPane split = (JSplitPane)thisParent; if (e.getChild() == finalT1) { if (finalT2.getParent() == finalP2) { // both docked finalSplit.setDividerLocation(0.5); } else { // left docked only finalSplit.setDividerLocation(1.0); } split.setDividerLocation(0.66); } } public void componentRemoved(ContainerEvent e) { Component thisParent = finalThis.getParent(); JSplitPane split = (JSplitPane)thisParent; if (e.getChild() == finalT1) { if (finalT2.getParent() == finalP2) { // right docked only finalSplit.setDividerLocation(0.0); split.setDividerLocation(0.66); } else { // both undocked split.setDividerLocation(1.0); } } } }); t1.addComponentListener(clistener); t2.addComponentListener(clistener); disable(); } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/7ceadc8e69bfcf427fd421373c750f8de120f15c/Main.java/clean/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1772,
3829,
12,
6376,
1319,
13,
288,
3639,
2240,
5621,
3639,
333,
18,
1966,
273,
1319,
31,
3639,
3696,
273,
629,
31,
3639,
24048,
2002,
273,
394,
24048,
5621,
3639,
804,
6364,
5190,
268,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1772,
3829,
12,
6376,
1319,
13,
288,
3639,
2240,
5621,
3639,
333,
18,
1966,
273,
1319,
31,
3639,
3696,
273,
629,
31,
3639,
24048,
2002,
273,
394,
24048,
5621,
3639,
804,
6364,
5190,
268,
... | |
public String getFileType() { return fileType; | public static String getFileType(String filePath) { if(filePath.endsWith(FILE_GRAMMAR_EXTENSION)) return FILE_TYPE_GRAMMAR; if(filePath.endsWith(FILE_JAVA_EXTENSION)) return FILE_TYPE_JAVA; return FILE_TYPE_TEXT; | public String getFileType() { return fileType; } | 51505 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51505/ad7580f1bfb69261728483f225d3a78974d18939/ProjectFileItem.java/buggy/src/org/antlr/works/project/ProjectFileItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
6034,
559,
1435,
288,
3639,
327,
21939,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
6034,
559,
1435,
288,
3639,
327,
21939,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (WorkbenchActivityHelper.filterItem(children[i])) | if (WorkbenchActivityHelper.filterItem(children[i])) | public Object[] getChildren(Object parentElement) { Object [] children = super.getChildren(parentElement); if (!getFiltering()) return children; ArrayList filteredChildren = new ArrayList(children.length); for (int i = 0; i < children.length; i++) { if (WorkbenchActivityHelper.filterItem(children[i])) continue; filteredChildren.add(children[i]); } return filteredChildren.toArray(); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/bf8c4c993da957db764b5127994cb5541bdc6a42/FilteredPreferenceContentProvider.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FilteredPreferenceContentProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
8526,
10268,
12,
921,
30363,
13,
288,
202,
202,
921,
5378,
2325,
273,
2240,
18,
588,
4212,
12,
2938,
1046,
1769,
202,
202,
430,
16051,
588,
30115,
10756,
1082,
202,
2463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10268,
12,
921,
30363,
13,
288,
202,
202,
921,
5378,
2325,
273,
2240,
18,
588,
4212,
12,
2938,
1046,
1769,
202,
202,
430,
16051,
588,
30115,
10756,
1082,
202,
2463,
... |
if (posOnCurrentLine == 0 && currentLine.length() > 0) { currentLine = currentLine.substring(1); } else if (posOnCurrentLine < currentLine.length()) { currentLine = currentLine.substring(0, posOnCurrentLine) + currentLine.substring(posOnCurrentLine + 1, currentLine.length()); } | currentLine.delete(); | public void keyPressed(KeyboardEvent ke) { // make sure we are ready to intercept the keyboard if (!isActive) return; switch (ke.getKeyCode()) { // intercept the up and down arrow keys case KeyEvent.VK_UP: ke.consume(); if (historyIndex == -1) { newestLine = currentLine; historyIndex = history.size(); } historyIndex--; redisplay(); break; case KeyEvent.VK_DOWN: ke.consume(); if (historyIndex == history.size() - 1) historyIndex = -2; else if (historyIndex == -1) newestLine = currentLine; historyIndex++; redisplay(); break; case KeyEvent.VK_LEFT: //Left the cursor goes left ke.consume(); if (posOnCurrentLine > 0) { posOnCurrentLine--; refreshCurrentLine(); } break; case KeyEvent.VK_RIGHT: // Right the cursor goes right ke.consume(); if (posOnCurrentLine < currentLine.length()) { posOnCurrentLine++; refreshCurrentLine(); } break; case KeyEvent.VK_HOME: // The cursor goes at the start ke.consume(); posOnCurrentLine = 0; refreshCurrentLine(); break; case KeyEvent.VK_END: // the cursor goes at the end of line ke.consume(); posOnCurrentLine = currentLine.length(); refreshCurrentLine(); break; // if its a backspace we want to remove one from the end of our current // line case KeyEvent.VK_BACK_SPACE: ke.consume(); if (currentLine.length() != 0 && posOnCurrentLine > 0) { posOnCurrentLine--; currentLine = currentLine.substring(0, posOnCurrentLine) + currentLine.substring(posOnCurrentLine + 1, currentLine.length()); refreshCurrentLine(); } break; // if its a delete we want to remove one under the cursor case KeyEvent.VK_DELETE: ke.consume(); if (posOnCurrentLine == 0 && currentLine.length() > 0) { currentLine = currentLine.substring(1); } else if (posOnCurrentLine < currentLine.length()) { currentLine = currentLine.substring(0, posOnCurrentLine) + currentLine.substring(posOnCurrentLine + 1, currentLine.length()); } refreshCurrentLine(); break; // if its an enter key we want to process the command, and then resume // the thread case KeyEvent.VK_ENTER: out.print(ke.getKeyChar()); ke.consume(); posOnCurrentLine = 0; synchronized (this) { isActive = false; threadSuspended = false; notifyAll(); } break; // if it's the tab key, we want to trigger command line completion case KeyEvent.VK_TAB: ke.consume(); if (posOnCurrentLine != currentLine.length()) { String ending = currentLine.substring(posOnCurrentLine); currentLine = complete(currentLine.substring(0, posOnCurrentLine)) + ending; posOnCurrentLine = currentLine.length() - ending.length(); } else { currentLine = complete(currentLine); posOnCurrentLine = currentLine.length(); } break; default: // if its a useful key we want to add it to our current line if (!Character.isISOControl(ke.getKeyChar())) { ke.consume(); if (posOnCurrentLine == currentLine.length()) { currentLine += ke.getKeyChar(); } else { currentLine = currentLine.substring(0, posOnCurrentLine) + ke.getKeyChar() + currentLine.substring(posOnCurrentLine); } posOnCurrentLine++; refreshCurrentLine(); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f2385c6a19065b00b78132ca332505dc23e536aa/CommandShell.java/buggy/shell/src/shell/org/jnode/shell/CommandShell.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
498,
24624,
12,
17872,
1133,
12519,
13,
288,
3639,
368,
225,
1221,
3071,
732,
854,
5695,
358,
10883,
326,
16263,
3639,
309,
16051,
291,
3896,
13,
327,
31,
3639,
1620,
261,
4491... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
498,
24624,
12,
17872,
1133,
12519,
13,
288,
3639,
368,
225,
1221,
3071,
732,
854,
5695,
358,
10883,
326,
16263,
3639,
309,
16051,
291,
3896,
13,
327,
31,
3639,
1620,
261,
4491... |
if ( result.toString( ).equals( name ) ) | if ( result.toString( ).equals( literal ) ) | public static StyledComponent get( String name ) { for ( int i = 0; i < VALUES_ARRAY.length; ++i ) { StyledComponent result = VALUES_ARRAY[i]; if ( result.toString( ).equals( name ) ) { return result; } } return null; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/036e8c78765730b146e5854b9d6c397a296fed86/StyledComponent.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/StyledComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
934,
93,
1259,
1841,
336,
12,
514,
508,
262,
202,
95,
202,
202,
1884,
261,
509,
277,
273,
374,
31,
277,
411,
13477,
67,
8552,
18,
2469,
31,
965,
77,
262,
202,
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,
760,
934,
93,
1259,
1841,
336,
12,
514,
508,
262,
202,
95,
202,
202,
1884,
261,
509,
277,
273,
374,
31,
277,
411,
13477,
67,
8552,
18,
2469,
31,
965,
77,
262,
202,
202,
95... |
PropertyManipulator.AttributeManipulator manip = | PropertyManipulator.AttributeManipulator manip = | private void setKeyProperties(DataObject data, final DataObject associatedObject) throws Exception { s_log.info("setting key properties"); KeyGenerator.setKeyValues(data); final ObjectType type = data.getObjectType(); PropertyManipulator.AttributeManipulator manip = new PropertyManipulator.AttributeManipulator() { public boolean obeys(Property p) { return super.obeys(p) && type.isKeyProperty(p) && p.getType().isCompound(); } public void manipulate(Property p, DataObject dataInner) throws Exception { if( associatedObject != null && p.getType().equals(associatedObject.getObjectType())) { dataInner.set(p.getName(), associatedObject); } else { DataObject object = getSession().create(p.getType().getQualifiedName()); reportPropertyTypes(object); initializeObject(object, dataInner); } } }; PropertyManipulator.manipulateProperties(data, manip); } | 12196 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12196/558097820abc0198518796cedde797658cda9a5e/ObjectTypeValidator.java/buggy/archive/core-platform/test/src/com/arsdigita/persistence/ObjectTypeValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
16696,
2297,
12,
21881,
501,
16,
4766,
282,
727,
18914,
3627,
921,
13,
540,
1216,
1185,
288,
3639,
272,
67,
1330,
18,
1376,
2932,
8920,
498,
1790,
8863,
3639,
1929,
3908,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
16696,
2297,
12,
21881,
501,
16,
4766,
282,
727,
18914,
3627,
921,
13,
540,
1216,
1185,
288,
3639,
272,
67,
1330,
18,
1376,
2932,
8920,
498,
1790,
8863,
3639,
1929,
3908,
18,
... |
if (job() != null) { return new EmptyPass(this); } | public Pass createPass(ExtensionInfo extInfo) { if (job() != null) {// TypeSystem ts = extInfo.typeSystem();// NodeFactory nf = extInfo.nodeFactory();// return new ConstantCheckPass(this, new ConstantChecker(job(), ts, nf)); return new EmptyPass(this); } return new CheckFieldConstantsPass(extInfo.scheduler(), this); } | 11982 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11982/bda52f00f5902ee65b55f621237f58b4aa0b6bd6/FieldConstantsChecked.java/buggy/src/polyglot/frontend/goals/FieldConstantsChecked.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10311,
752,
6433,
12,
3625,
966,
1110,
966,
13,
288,
3639,
309,
261,
4688,
1435,
480,
446,
13,
288,
759,
1850,
1412,
3163,
3742,
273,
1110,
966,
18,
723,
3163,
5621,
759,
1850,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10311,
752,
6433,
12,
3625,
966,
1110,
966,
13,
288,
3639,
309,
261,
4688,
1435,
480,
446,
13,
288,
759,
1850,
1412,
3163,
3742,
273,
1110,
966,
18,
723,
3163,
5621,
759,
1850,
20... | |
mCosId = (c == null) ? "" : c.getId(); mCosName = (c == null) ? "" : c.getName(); | QuotaUsageParams(Domain d, Cos c, String sortBy, boolean sortAscending) { mDomainId = (d == null) ? "" : d.getId(); mCosId = (c == null) ? "" : c.getId(); mCosName = (c == null) ? "" : c.getName(); mSortBy = (sortBy == null) ? "" : sortBy; mSortAscending = sortAscending; } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/e0e2736903fd41703d90900b83de35cf820d22a2/GetQuotaUsage.java/clean/ZimbraServer/src/java/com/zimbra/cs/service/admin/GetQuotaUsage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4783,
25441,
5357,
1370,
12,
3748,
302,
16,
385,
538,
276,
16,
514,
14021,
16,
1250,
1524,
13665,
2846,
13,
288,
5411,
312,
3748,
548,
273,
261,
72,
422,
446,
13,
692,
1408,
294,
302,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4783,
25441,
5357,
1370,
12,
3748,
302,
16,
385,
538,
276,
16,
514,
14021,
16,
1250,
1524,
13665,
2846,
13,
288,
5411,
312,
3748,
548,
273,
261,
72,
422,
446,
13,
692,
1408,
294,
302,
... | |
return null; | return new GeneralPath(); | public Shape draw(Dimension size){ if(visible){ MicroSecondTimeRange overTimeRange = timeRegistrar.getTimeRange(). getOversizedTimeRange(BasicSeismogramDisplay.OVERSIZED_SCALE); if(flagTime.before(overTimeRange.getBeginTime()) || flagTime.after(overTimeRange.getEndTime())) return null; double offset = flagTime.difference(overTimeRange.getBeginTime()).getValue()/overTimeRange.getInterval().getValue(); location = (int)(offset * (double)size.width); Area pole = new Area(new Rectangle(location, 0, 1, size.height)); Area flag = new Area(new Rectangle(location, 0, name.length() * 12, 13)); flag.add(pole); return flag; } return null; } | 52623 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52623/127f78be2309654c0b9f86a02096d9bf025d9833/FlagPlotter.java/clean/src/edu/sc/seis/fissuresUtil/display/FlagPlotter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12383,
3724,
12,
8611,
963,
15329,
202,
430,
12,
8613,
15329,
202,
565,
18284,
8211,
950,
2655,
1879,
950,
2655,
273,
813,
30855,
18,
588,
950,
2655,
7675,
202,
202,
588,
51,
2496,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12383,
3724,
12,
8611,
963,
15329,
202,
430,
12,
8613,
15329,
202,
565,
18284,
8211,
950,
2655,
1879,
950,
2655,
273,
813,
30855,
18,
588,
950,
2655,
7675,
202,
202,
588,
51,
2496,
... |
queries.addAll(queriesThatMentionBag(profile.getSavedQueries(), getSelectedBags()[i])); queries.addAll(queriesThatMentionBag(profile.getHistory(), getSelectedBags()[i])); | queries.addAll(queriesThatMentionBag(profile.getSavedQueries(), getSelectedBags()[i])); queries.addAll(queriesThatMentionBag(profile.getHistory(), getSelectedBags()[i])); | public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { HttpSession session = request.getSession(); Profile profile = (Profile) session.getAttribute(Constants.PROFILE); ActionErrors errors = new ActionErrors(); if (request.getParameter("newName") == null && selectedBags.length == 0) { errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("errors.modifyBag.none")); } else if (request.getParameter("delete") != null) { for (int i = 0; i < getSelectedBags().length; i++) { Set queries = new HashSet(); queries.addAll(queriesThatMentionBag(profile.getSavedQueries(), getSelectedBags()[i])); queries.addAll(queriesThatMentionBag(profile.getHistory(), getSelectedBags()[i])); if (queries.size() > 0) { ActionMessage actionMessage = new ActionMessage("history.baginuse", getSelectedBags()[i], queries); errors.add(ActionMessages.GLOBAL_MESSAGE, actionMessage); } } } if (request.getParameter("newName") == null && (request.getParameter("union") != null || request.getParameter("intersect") != null)) { if (StringUtils.isEmpty(getNewBagName())) { ActionMessage actionMessage = new ActionMessage("errors.required", "New bag name"); errors.add(ActionMessages.GLOBAL_MESSAGE, actionMessage); } } return errors; } | 7196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7196/d1353887d37276cfc4755f700df7b6b9c1580e78/ModifyBagForm.java/buggy/intermine/web/main/src/org/intermine/web/history/ModifyBagForm.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
4229,
1954,
12,
1803,
3233,
2874,
16,
9984,
590,
13,
288,
3639,
26166,
1339,
273,
590,
18,
588,
2157,
5621,
3639,
11357,
3042,
273,
261,
4029,
13,
1339,
18,
588,
1499,
12,
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,
4382,
4229,
1954,
12,
1803,
3233,
2874,
16,
9984,
590,
13,
288,
3639,
26166,
1339,
273,
590,
18,
588,
2157,
5621,
3639,
11357,
3042,
273,
261,
4029,
13,
1339,
18,
588,
1499,
12,
2... |
completion = new CompletionInfo(); String result = null; try { CommandLine cl = new CommandLine(partial); String cmd = ""; if (cl.hasNext()) { cmd = cl.next(); if (!cmd.trim().equals("") && cl.hasNext()) try { CommandInfo cmdClass = getCommandClass(cmd); Help.Info info = Help.getInfo(cmdClass.getCommandClass()); | completion = new CompletionInfo(); String result = null; try { CommandLine cl = new CommandLine(partial); String cmd = ""; if (cl.hasNext()) { cmd = cl.next(); if (!cmd.trim().equals("") && cl.hasNext()) try { CommandInfo cmdClass = getCommandClass(cmd); Help.Info info = Help.getInfo(cmdClass.getCommandClass()); | CompletionInfo complete(String partial) { // workaround to set the currentShell to this shell try { ShellUtils.getShellManager().registerShell(this); } catch (NameNotFoundException ex) { } completion = new CompletionInfo(); String result = null; try { CommandLine cl = new CommandLine(partial); String cmd = ""; if (cl.hasNext()) { cmd = cl.next(); if (!cmd.trim().equals("") && cl.hasNext()) try { // get command's help info CommandInfo cmdClass = getCommandClass(cmd); Help.Info info = Help.getInfo(cmdClass.getCommandClass()); // perform completion result = cmd + " " + info.complete(cl); // prepend completion.setCompleted(result); // command // name and // space // again } catch (ClassNotFoundException ex) { throw new CompletionException( "Command class not found"); } catch (HelpException ex) { ex.printStackTrace(); throw new CompletionException( "Command class not found"); } } if (result == null) // assume this is the alias to be called result = defaultArg.complete(cmd); if (!partial.equals(result) && !completion.hasItems()) { // performed direct // completion without listing completion.setCompleted(result); completion.setNewPrompt(false); } } catch (CompletionException ex) { out.println(); // next line err.println(ex.getMessage()); // print the error (optional) // this debug output is to trace where the Exception came from //ex.printStackTrace(err); // restore old value and need a new prompt completion.setCompleted(partial); completion.setNewPrompt(true); } return completion; } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/34de2dc986de957bf3cb702395f863f43c74672f/CommandShell.java/clean/shell/src/shell/org/jnode/shell/CommandShell.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
20735,
966,
3912,
12,
780,
4702,
13,
288,
3639,
368,
18975,
358,
444,
326,
783,
13220,
358,
333,
5972,
3639,
775,
288,
5411,
19433,
1989,
18,
588,
13220,
1318,
7675,
4861,
13220,
12,
2211... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
20735,
966,
3912,
12,
780,
4702,
13,
288,
3639,
368,
18975,
358,
444,
326,
783,
13220,
358,
333,
5972,
3639,
775,
288,
5411,
19433,
1989,
18,
588,
13220,
1318,
7675,
4861,
13220,
12,
2211... |
/* while (temp != end) { if (temp.hasTargeters()) { InstructionTargeter[] tar=temp.getTargeters(); for (int k = 0; k < tar.length; k++) { method.removeExceptionHandlers(); temp.removeAllTargeters(); } } temp= temp.getNext(); } */ | private void transformByInstructionSequence(InstructionHandle start, InstructionHandle end, InstructionList code, ConstantPoolGen pool, MethodGen method) throws TargetLostException { InstructionHandle temp= start; /* while (temp != end) { if (temp.hasTargeters()) { InstructionTargeter[] tar=temp.getTargeters(); for (int k = 0; k < tar.length; k++) { method.removeExceptionHandlers(); temp.removeAllTargeters(); } } temp= temp.getNext(); } */ code.insert(start, this.buildInstructionListWithCallToNewMethod(pool, classThatContainsTheNewMethod)); temp= start.getNext().getNext().getNext(); // System.out.println(temp); try { code.delete(temp, end); } catch (TargetLostException e) { InstructionHandle[] handles= e.getTargets(); for (int i = 0; i < handles.length; i++) { InstructionTargeter[] targets= handles[i].getTargeters(); for (int j = 0; j < targets.length; j++) { if (targets[j] instanceof CodeExceptionGen) { CodeExceptionGen ceg= (CodeExceptionGen) targets[j]; method.removeExceptionHandler(ceg); } } } } try { code.delete(start); } catch (TargetLostException e) { InstructionHandle[] handles= e.getTargets(); for (int i = 0; i < handles.length; i++) { InstructionTargeter[] targets= handles[i].getTargeters(); for (int j = 0; j < targets.length; j++) { if (targets[j] instanceof CodeExceptionGen) { CodeExceptionGen ceg= (CodeExceptionGen) targets[j]; method.removeExceptionHandler(ceg); } } } } method.setConstantPool(pool); method.setInstructionList(code); } | 10293 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10293/e24b4f77d610184bf0bd234cd35d326efab37d12/Transformer.java/buggy/src/java/net/java/dev/jminimizer/Transformer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2510,
858,
11983,
4021,
12,
11983,
3259,
787,
16,
24605,
3259,
679,
16,
24605,
682,
981,
16,
10551,
2864,
7642,
2845,
16,
2985,
7642,
707,
13,
1216,
5916,
19024,
503,
288,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2510,
858,
11983,
4021,
12,
11983,
3259,
787,
16,
24605,
3259,
679,
16,
24605,
682,
981,
16,
10551,
2864,
7642,
2845,
16,
2985,
7642,
707,
13,
1216,
5916,
19024,
503,
288,... | |
if (num != sizeZ * sizeC * sizeT) { | if (num != zSize * cSize * tSize) { | public int getIndex(String id, int z, int c, int t, boolean separated) throws FormatException, IOException { // get DimensionOrder String order = getDimensionOrder(id); if (order == null) throw new FormatException("Dimension order is null"); if (!order.startsWith("XY")) { throw new FormatException("Invalid dimension order: " + order); } int iz = order.indexOf("Z") - 2; int ic = order.indexOf("C") - 2; int it = order.indexOf("T") - 2; if (iz < 0 || iz > 2 || ic < 0 || ic > 2 || it < 0 || it > 2) { throw new FormatException("Invalid dimension order: " + order); } // get SizeZ int sizeZ = getSizeZ(id); if (sizeZ <= 0) throw new FormatException("Invalid Z size: " + sizeZ); if (z < 0 || z >= sizeZ) { throw new FormatException("Invalid Z index: " + z + "/" + sizeZ); } // get SizeC int sizeC = getSizeC(id); if (sizeC <= 0) throw new FormatException("Invalid C size: " + sizeC); if (c < 0 || c >= sizeC) { throw new FormatException("Invalid C index: " + c + "/" + sizeC); } int origSizeC = sizeC; boolean rgb = isRGB(id); if (!separated) sizeC = 1; // adjust for RGB merging // get SizeT int sizeT = getSizeT(id); if (sizeT <= 0) throw new FormatException("Invalid T size: " + sizeT); if (t < 0 || t >= sizeT) { throw new FormatException("Invalid T index: " + t + "/" + sizeT); } // get image count int num = getImageCount(id); if (num <= 0) throw new FormatException("Invalid image count: " + num); if (num != sizeZ * sizeC * sizeT) { // if this happens, there is probably a bug in metadata population -- // either one of the ZCT sizes, or the total number of images -- // or else the input file is invalid throw new FormatException("ZCT size vs image count mismatch (rgb=" + rgb + "; separated=" + separated + "; sizeZ=" + sizeZ + ", sizeC=" + origSizeC + ", sizeT=" + sizeT + ", total=" + num); } // assign rasterization order int v0 = iz == 0 ? z : (ic == 0 ? c : t); int v1 = iz == 1 ? z : (ic == 1 ? c : t); int v2 = iz == 2 ? z : (ic == 2 ? c : t); int len0 = iz == 0 ? sizeZ : (ic == 0 ? sizeC : sizeT); int len1 = iz == 1 ? sizeZ : (ic == 1 ? sizeC : sizeT); int len2 = iz == 2 ? sizeZ : (ic == 2 ? sizeC : sizeT); return v0 + v1 * len0 + v2 * len0 * len1; } | 11426 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11426/054bd26b1432b6733cf1a54342b04ae97fa3a07c/FormatReader.java/clean/loci/formats/FormatReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
8088,
12,
780,
612,
16,
509,
998,
16,
509,
276,
16,
509,
268,
16,
1250,
8936,
13,
565,
1216,
4077,
503,
16,
1860,
225,
288,
565,
368,
336,
13037,
2448,
565,
514,
1353,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
8088,
12,
780,
612,
16,
509,
998,
16,
509,
276,
16,
509,
268,
16,
1250,
8936,
13,
565,
1216,
4077,
503,
16,
1860,
225,
288,
565,
368,
336,
13037,
2448,
565,
514,
1353,
273,... |
void innerUpdate(){ Logger.minor(this, "Update() called"); synchronized(this) { if((result == null) || hasBeenBlown) { Logger.minor(this, "Returning: result="+result+", isAutoUpdateAllowed="+isAutoUpdateAllowed+", hasBeenBlown="+hasBeenBlown); return; } this.revocationDNFCounter = 0; this.finalCheck = true; } System.err.println("Searching for revocation key"); this.queueFetchRevocation(100); synchronized(this) { while(revocationDNFCounter < 3) { System.err.println("Revocation counter: "+revocationDNFCounter); if(this.hasBeenBlown) { Logger.error(this, "The revocation key has been found on the network : blocking auto-update"); return; } try { wait(100*1000); } catch (InterruptedException e) { // Ignore } } } System.err.println("Update in progress"); Logger.normal(this, "Update in progress"); try{ ArrayBucket bucket = (ArrayBucket) result.asBucket(); byte[] data = bucket.toByteArray(); File fRunning = new File("freenet-cvs-snapshot.jar"); File fNew = new File("freenet-cvs-snapshot.jar.new"); boolean nastyRestart = false; if(File.separatorChar != '\\') { // Do nothing. } else { nastyRestart = true; Properties p = WrapperManager.getProperties(); String cp1 = p.getProperty("wrapper.java.classpath.1"); if(cp1.equals("freenet-cvs-snapshot.jar")) { // Cool! } else if(cp1.equals("freenet-cvs-snapshot.jar.new")) { // Swapped; we are running .new File tmp = fRunning; fRunning = fNew; fNew = tmp; } else { cp1 = p.getProperty("wrapper.java.classpath.2"); if(cp1.equals("freenet-cvs-snapshot.jar")) { // Cool! } else if(cp1.equals("freenet-cvs-snapshot.jar.new")) { // Swapped; we are running .new File tmp = fRunning; fRunning = fNew; fNew = tmp; } else { Logger.error(this, "Cannot restart on Windows due to non-standard config file!"); System.err.println("Cannot restart on Windows due to non-standard config file!"); return; } } } fNew.delete(); FileOutputStream fos = new FileOutputStream(fNew); fos.write(data); fos.flush(); fos.close(); System.out.println("################## File written! "+cg.getURI().getSuggestedEdition()+ " " +fNew.getAbsolutePath()); if(!nastyRestart) { // Easy way. if(!fNew.renameTo(fRunning)) { fRunning.delete(); if(!fNew.renameTo(fRunning)) { System.err.println("ERROR renaming the file!"); return; } } } else { // Hard way. if(!WrapperManager.isControlledByNativeWrapper()) { Logger.error(this, "Cannot update because not running under wrapper"); System.err.println("Cannot update because not running under wrapper"); return; } try { File oldConfig = new File("wrapper.conf"); File newConfig = new File("wrapper.conf.new"); FileInputStream fis = new FileInputStream(oldConfig); BufferedInputStream bis = new BufferedInputStream(fis); InputStreamReader isr = new InputStreamReader(bis); BufferedReader br = new BufferedReader(isr); fos = new FileOutputStream(newConfig); OutputStreamWriter osw = new OutputStreamWriter(fos); BufferedWriter bw = new BufferedWriter(osw); String line; boolean succeeded = false; boolean stillSucceeded = false; while((line = br.readLine()) != null) { if(line.equals("wrapper.java.classpath.1="+fRunning.getName())) { bw.write("wrapper.java.classpath.1="+fNew.getName()+"\r\n"); succeeded = true; } else if(line.equals("wrapper.java.classpath.2="+fRunning.getName())) { bw.write("wrapper.java.classpath.2="+fNew.getName()+"\r\n"); succeeded = true; } else { if(line.equals("wrapper.restart.reload_configuration=TRUE")) stillSucceeded = true; bw.write(line+"\r\n"); } } bw.close(); br.close(); if(!succeeded) { System.err.println("Not able to update because of non-standard config"); Logger.error(this, "Not able to update because of non-standard config"); return; } if(!stillSucceeded) { System.err.println("Not able to update because of non-standard or old config, add a line saying \"wrapper.restart.reload_configuration=TRUE\""); Logger.error(this, "Not able to update because of non-standard or old config, add a line saying \"wrapper.restart.reload_configuration=TRUE\""); return; } if(!newConfig.renameTo(oldConfig)) { oldConfig.delete(); if(!newConfig.renameTo(oldConfig)) { System.err.println("Failed to rename over old config: update failed."); Logger.error(this, "Failed to rename over old config: update failed."); return; } } // New config installed. } catch (IOException e) { Logger.error(this, "Not able to update because of I/O error: "+e, e); System.err.println("Not able to update because of I/O error: "+e); } } if(node.getNodeStarter()!=null) { System.err.println("Restarting because of update"); node.getNodeStarter().restart(); } else{ System.out.println("New version has been downloaded: please restart your node!"); node.exit(); } System.err.println("WTF? Restart returned!?"); }catch(Exception e){ Logger.error(this, "Error while updating the node : "+e); System.out.println("Exception : "+e); e.printStackTrace(); } } | 48807 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48807/0ce52e9ff1e0048c34e8d11f2ad596bc8936f6e9/NodeUpdater.java/clean/src/freenet/node/updater/NodeUpdater.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
3443,
1891,
1435,
95,
202,
202,
3328,
18,
17364,
12,
2211,
16,
315,
1891,
1435,
2566,
8863,
202,
202,
22043,
12,
2211,
13,
288,
1082,
202,
430,
12443,
2088,
422,
446,
13,
747... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
3443,
1891,
1435,
95,
202,
202,
3328,
18,
17364,
12,
2211,
16,
315,
1891,
1435,
2566,
8863,
202,
202,
22043,
12,
2211,
13,
288,
1082,
202,
430,
12443,
2088,
422,
446,
13,
747... | ||
this.path = buildPath( path ); | this.path = fixTrailingAttr(buildPath( path )); | public ColumnInfo( int index, String name, String type, String path, String originalPath ) throws OdaException { this.index = index; this.name = name; this.type = type; if( !DataTypes.isValidType( type ) ) throw new OdaException( "The given data type name is invalid."); this.path = buildPath( path ); this.originalPath = originalPath; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/469779f64e93581130622148ed839dd8e3faa663/RelationInformation.java/clean/data/org.eclipse.birt.report.data.oda.xml/src/org/eclipse/birt/report/data/oda/xml/util/RelationInformation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4753,
966,
12,
509,
770,
16,
514,
508,
16,
514,
618,
16,
514,
589,
16,
514,
2282,
743,
262,
1216,
531,
2414,
503,
202,
95,
202,
202,
2211,
18,
1615,
273,
770,
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,
4753,
966,
12,
509,
770,
16,
514,
508,
16,
514,
618,
16,
514,
589,
16,
514,
2282,
743,
262,
1216,
531,
2414,
503,
202,
95,
202,
202,
2211,
18,
1615,
273,
770,
31,
202,
202... |
addSubFlowState( | addSubflowState( | public void buildStates() throws FlowBuilderException { GroovyObject pageFlow = (GroovyObject)this.applicationContext.getBean(pageFlowClass.getFullName()); Assert.notNull(pageFlow); Flow flow = (Flow)pageFlow.getProperty(FLOW); Assert.notNull(flow); String firstState = null; for (Iterator iter = flow.getStates().iterator(); iter.hasNext();) { State state = (State)iter.next(); if (firstState == null) { firstState = state.getId(); } if (state.isActionState()) { AnnotatedAction action = null; if (state.getAction() != null) { action = new AnnotatedAction(state.getAction()); } else if (state.getActionClass() != null) { Action tmpAction = null; if (Action.class.isAssignableFrom(state.getActionClass())) { tmpAction = (Action)BeanUtils.instantiateClass(state.getActionClass()); } else { throw new UnsupportedOperationException("None " + Action.class.getName() + " action classes are not yet supported!"); } if (state.getActionProperties() != null) { new BeanWrapperImpl(tmpAction).setPropertyValues(state.getActionProperties()); } action = new AnnotatedAction(tmpAction); } else if (state.getActionClosure() != null) { action = new AnnotatedAction(new ClosureAction(this.pageFlowClass.getFlowId(), state.getId(), state.getActionClosure())); } else if (state.getActionFormDetails() != null) { GrailsFormAction formAction = new GrailsFormAction(); BeanWrapper beanWrapper = new BeanWrapperImpl(formAction); for (Iterator iter2 = state.getActionFormDetails().entrySet().iterator(); iter2.hasNext();) { Map.Entry entry = (Map.Entry)iter2.next(); if (VALIDATOR.equals(entry.getKey()) && entry.getValue() instanceof Closure) { beanWrapper.setPropertyValue((String)entry.getKey(), new ClosureValidator(((Closure)entry.getValue()))); } else { beanWrapper.setPropertyValue((String)entry.getKey(), entry.getValue()); } } formAction.afterPropertiesSet(); action = new AnnotatedAction(formAction); if (state.getActionMethod() != null) { action.setProperty(METHOD, state.getActionMethod()); } else { action.setProperty(METHOD, BIND_AND_VALIDATE); } } else { throw new UnsupportedOperationException(); } addActionState(state.getId(), action, getTransitions(state.getTransitions())); } else if (state.isViewState()) { if (state.getViewName() != null) { addViewState(state.getId(), new ModelViewDescriptorCreator(state.getViewName(), state.getViewModel()), getTransitions(state.getTransitions()), new HashMap()); } else if (state.getViewClosure() != null) { throw new UnsupportedOperationException("View closures are not yet supported!"); } } else if (state.isDecisionState()) { throw new UnsupportedOperationException("Decision states are not yet supported!"); } else if (state.isSubflowState()) { if (state.getSubFlowInput() != null || state.getSubFlowOutput() != null) { addSubFlowState( state.getId(), getFlowServiceLocator().getFlow(state.getSubFlowId()), new ClosureFlowAttributeMapper(this.pageFlowClass.getFlowId(), state.getId(), state.getSubFlowInput(), state.getSubFlowOutput()), getTransitions(state.getTransitions())); } else if (state.getAttributeMapper() != null) { addSubFlowState( state.getId(), getFlowServiceLocator().getFlow(state.getSubFlowId()), state.getAttributeMapper(), getTransitions(state.getTransitions())); } else if (state.getAttributeMapperClass() != null) { FlowAttributeMapper flowAttributeMapper = (FlowAttributeMapper)BeanUtils.instantiateClass(state.getAttributeMapperClass()); if (state.getAttributeMapperProperties() != null) { new BeanWrapperImpl(flowAttributeMapper).setPropertyValues(state.getAttributeMapperProperties()); } addSubFlowState( state.getId(), getFlowServiceLocator().getFlow(state.getSubFlowId()), flowAttributeMapper, getTransitions(state.getTransitions())); } else { addSubFlowState(state.getId(), getFlowServiceLocator().getFlow(state.getSubFlowId()), getTransitions(state.getTransitions())); } } else if (state.isEndState()) { if (state.getViewName() != null) { addEndState(state.getId(), new ModelViewDescriptorCreator(state.getViewName(), state.getViewModel()), new HashMap()); } else { addEndState(state.getId()); } } else { throw new UnsupportedOperationException(); } } if (firstState != null) { getFlow().setStartState(firstState); } } | 26970 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/26970/94ce4a4590c3c23ebe7784cb8e45227b7729d21d/GrailsFlowBuilder.java/clean/src/web/org/codehaus/groovy/grails/web/pageflow/GrailsFlowBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1361,
7629,
1435,
1216,
9473,
1263,
503,
288,
202,
202,
43,
12859,
921,
1363,
5249,
273,
261,
43,
12859,
921,
13,
2211,
18,
3685,
1042,
18,
588,
3381,
12,
2433,
5249,
797... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1361,
7629,
1435,
1216,
9473,
1263,
503,
288,
202,
202,
43,
12859,
921,
1363,
5249,
273,
261,
43,
12859,
921,
13,
2211,
18,
3685,
1042,
18,
588,
3381,
12,
2433,
5249,
797... |
private static final void readHandlerSubmissionsFromRegistry( | private final void readHandlerSubmissionsFromRegistry( | private static final void readHandlerSubmissionsFromRegistry( final IConfigurationElement[] configurationElements, final int configurationElementCount, final IHandlerService handlerService) { final List warningsToLog = new ArrayList(1); for (int i = 0; i < configurationElementCount; i++) { final IConfigurationElement configurationElement = configurationElements[i]; // Read out the command identifier. final String commandId = readRequired(configurationElement, ATT_COMMAND_ID, warningsToLog, "Handler submissions need a command id"); //$NON-NLS-1$ if (commandId == null) { continue; } handlerActivations.add(handlerService.activateHandler(commandId, new LegacyHandlerWrapper(new LegacyHandlerProxy( configurationElement)))); } logWarnings( warningsToLog, "Warnings while parsing the handler submissions from the 'org.eclipse.ui.commands' extension point."); //$NON-NLS-1$ } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/a5c6783a85a2a3bb61fe5ef880cb6f3ebcb76e98/HandlerPersistence.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerPersistence.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
918,
855,
1503,
1676,
7300,
1265,
4243,
12,
1082,
202,
6385,
467,
1750,
1046,
8526,
1664,
3471,
16,
1082,
202,
6385,
509,
1664,
1046,
1380,
16,
1082,
202,
6385,
467,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
918,
855,
1503,
1676,
7300,
1265,
4243,
12,
1082,
202,
6385,
467,
1750,
1046,
8526,
1664,
3471,
16,
1082,
202,
6385,
509,
1664,
1046,
1380,
16,
1082,
202,
6385,
467,
... |
public void actionPerformed(ActionEvent e) { if (getNewConnectionDialog() != null) { getNewConnectionDialog().requestFocus(); return; } final DBCSPanel dbcsPanel = new DBCSPanel(); dbcsPanel.setDbcs(new ArchitectDataSource()); DBCS_OkAction okAction = new DBCS_OkAction(dbcsPanel, true); okAction.setConnectionSelectionCallBack(SourceOrTargetStuff.this); Action cancelAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { dbcsPanel.discardChanges(); setNewConnectionDialog(null); } }; JDialog d = ArchitectPanelBuilder.createArchitectPanelDialog( dbcsPanel, SwingUtilities.getWindowAncestor(CompareDMPanel.this), DBCS_DIALOG_TITLE, ArchitectPanelBuilder.OK_BUTTON_LABEL, okAction, cancelAction); okAction.setConnectionDialog(d); setNewConnectionDialog(d); d.setVisible(true); } | 53257 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53257/821f8b183e315e64240df330c64b71e323dc5ac5/CompareDMPanel.java/clean/src/ca/sqlpower/architect/swingui/CompareDMPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
26100,
12,
1803,
1133,
425,
13,
288,
9506,
202,
430,
261,
588,
1908,
1952,
6353,
1435,
480,
446,
13,
288,
6862,
202,
588,
1908,
1952,
6353,
7675,
2293,
9233,
5621,
6862,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
26100,
12,
1803,
1133,
425,
13,
288,
9506,
202,
430,
261,
588,
1908,
1952,
6353,
1435,
480,
446,
13,
288,
6862,
202,
588,
1908,
1952,
6353,
7675,
2293,
9233,
5621,
6862,
... | ||
while (it.hasNext()) { | while (it.hasNext() && !(foundIt && foundClubDivisionGroup)) { | public boolean createSpecialConnectionDivision(String connection, int parentGroupId, String clubName, IWContext iwc) { if (connection == null || connection.equals("")) return false; try { Group group = (Group) (((GroupHome) com.idega.data.IDOLookup.getHome(Group.class)).findByPrimaryKey(new Integer(parentGroupId))); Group specialGroup = (Group) (((GroupHome) com.idega.data.IDOLookup.getHome(Group.class)).findByPrimaryKey(new Integer(connection))); Group child = null; boolean foundIt = false; List children = specialGroup.getChildGroups(); Iterator it = children.iterator(); while (it.hasNext()) { child = (Group) it.next(); if (child.getGroupType().equals(IWMemberConstants.GROUP_TYPE_CLUB_DIVISION_TEMPLATE)) { foundIt = true; break; } } if (foundIt && child != null) { insertCopyOfChild(group, child, specialGroup, clubName,iwc); } } catch (Exception e) { e.printStackTrace(); } return false; } | 57353 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57353/9cecdc9cab03e37130cda58966a7006ba4384f26/ClubInformationPluginBusinessBean.java/clean/src/java/is/idega/idegaweb/member/business/plugins/ClubInformationPluginBusinessBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
752,
12193,
1952,
28223,
12,
780,
1459,
16,
509,
982,
8722,
16,
514,
927,
373,
461,
16,
467,
59,
1042,
25522,
71,
13,
288,
202,
202,
430,
261,
4071,
422,
446,
747,
145... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
12193,
1952,
28223,
12,
780,
1459,
16,
509,
982,
8722,
16,
514,
927,
373,
461,
16,
467,
59,
1042,
25522,
71,
13,
288,
202,
202,
430,
261,
4071,
422,
446,
747,
145... |
return _omitXmlDeclaration; | return _omitXmlDeclaration; | public boolean getOmitXMLDeclaration() { return _omitXmlDeclaration; } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/cd53b656c8781337491709c662fe224c44d1ef7d/OutputFormat.java/buggy/src/org/apache/xml/serialize/OutputFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
17971,
1938,
4201,
6094,
1435,
565,
288,
202,
2463,
389,
362,
305,
4432,
6094,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1250,
17971,
1938,
4201,
6094,
1435,
565,
288,
202,
2463,
389,
362,
305,
4432,
6094,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
String status = ""; int filteredCount = currentMarkers.getItemCount(); int totalCount = getTotalMarkers(); if (filteredCount == totalCount) { status = Messages .format( "filter.itemsMessage", new Object[] { new Integer(totalCount) }); } else { status = Messages .format( "filter.matchedMessage", new Object[] { new Integer(filteredCount), new Integer(totalCount) }); } setContentDescription(status); } | String status = ""; int filteredCount = currentMarkers.getItemCount(); int totalCount = getTotalMarkers(); if (filteredCount == totalCount) { status = Messages .format( "filter.itemsMessage", new Object[] { new Integer(totalCount) }); } else { status = Messages .format( "filter.matchedMessage", new Object[] { new Integer(filteredCount), new Integer(totalCount) }); } setContentDescription(status); } | void updateTitle() { String status = ""; //$NON-NLS-1$ int filteredCount = currentMarkers.getItemCount(); int totalCount = getTotalMarkers(); if (filteredCount == totalCount) { status = Messages .format( "filter.itemsMessage", new Object[] { new Integer(totalCount) }); //$NON-NLS-1$ } else { status = Messages .format( "filter.matchedMessage", new Object[] { new Integer(filteredCount), new Integer(totalCount) }); //$NON-NLS-1$ } setContentDescription(status); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/1ceb585b9b16047c6c580984b0c9962c41a22ba6/MarkerView.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1089,
4247,
1435,
288,
3639,
514,
1267,
273,
1408,
31,
4329,
3993,
17,
5106,
17,
21,
8,
3639,
509,
5105,
1380,
273,
783,
21644,
18,
588,
30687,
5621,
3639,
509,
20578,
273,
12831,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4247,
1435,
288,
3639,
514,
1267,
273,
1408,
31,
4329,
3993,
17,
5106,
17,
21,
8,
3639,
509,
5105,
1380,
273,
783,
21644,
18,
588,
30687,
5621,
3639,
509,
20578,
273,
12831,
... |
public TA_RetCode AD(int startIdx, int endIdx, double inHigh[], double inLow[], double inClose[], int inVolume[], MInteger outBegIdx, MInteger outNbElement, double outReal[]) { | public TA_RetCode AD( int startIdx, int endIdx, double inHigh[], double inLow[], double inClose[], int inVolume[], MInteger outBegIdx, MInteger outNbElement, double outReal[] ) { | public TA_RetCode AD(int startIdx, int endIdx, double inHigh[], double inLow[], double inClose[], int inVolume[], MInteger outBegIdx, MInteger outNbElement, double outReal[]) { int nbBar, currentBar, outIdx; double high, low, close, tmp; double ad; if (startIdx < 0) return TA_RetCode.TA_OUT_OF_RANGE_START_INDEX; if ((endIdx < 0) || (endIdx < startIdx)) return TA_RetCode.TA_OUT_OF_RANGE_END_INDEX; nbBar = endIdx - startIdx + 1; outNbElement.value = nbBar; outBegIdx.value = startIdx; currentBar = startIdx; outIdx = 0; ad = 0.0; while (nbBar != 0) { high = inHigh[currentBar]; low = inLow[currentBar]; tmp = high - low; close = inClose[currentBar]; if (tmp > 0.0) ad += (((close - low) - (high - close)) / tmp) * ((double) inVolume[currentBar]); outReal[outIdx++] = ad; currentBar++; nbBar--; } return TA_RetCode.TA_SUCCESS; } | 2365 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2365/8c26ea7a2c59f9148f3db0db7ab39ed48689e601/Core.java/buggy/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
399,
37,
67,
7055,
1085,
11738,
12,
474,
27108,
16,
509,
679,
4223,
16,
1645,
316,
8573,
63,
6487,
1082,
202,
9056,
316,
10520,
63,
6487,
1645,
316,
4605,
63,
6487,
509,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
399,
37,
67,
7055,
1085,
11738,
12,
474,
27108,
16,
509,
679,
4223,
16,
1645,
316,
8573,
63,
6487,
1082,
202,
9056,
316,
10520,
63,
6487,
1645,
316,
4605,
63,
6487,
509,
316,
... |
FilterDescription fdesc = (FilterDescription) parent; } else { | protected static int getHeterogenousOffset(Object parent, Object child) { int hetOffset = -1; if (child instanceof org.ensembl.mart.lib.config.Exportable) { //Exportables go after Importables within a DatasetConfig hetOffset = ((DatasetConfig) parent).getImportables().length; } else if (child instanceof org.ensembl.mart.lib.config.FilterPage) { //FilterPages go after Importables and Exportables within a DatasetConfig DatasetConfig dsc = (DatasetConfig) parent; hetOffset = dsc.getImportables().length + dsc.getExportables().length; } else if (child instanceof org.ensembl.mart.lib.config.AttributePage) { //AttributePages go after Importables, Exportables, and FilterPages within a DatasetConfig DatasetConfig dsc = (DatasetConfig) parent; hetOffset = dsc.getImportables().length + dsc.getExportables().length + dsc.getFilterPages().length; //} //else if (child instanceof org.ensembl.mart.lib.config.Disable) { //Disables go after Enables within a FilterDescription //FilterDescription fdesc = (FilterDescription) parent; //hetOffset = fdesc.getEnables().length; } else if (child instanceof org.ensembl.mart.lib.config.Option) { if (parent instanceof org.ensembl.mart.lib.config.FilterDescription) { //Options go after Enables and Disables within a FilterDescription FilterDescription fdesc = (FilterDescription) parent; //hetOffset = fdesc.getEnables().length + fdesc.getDisables().length; } else { //Options go first within an Option hetOffset = 0; } } else if (child instanceof org.ensembl.mart.lib.config.PushAction) { //PushActions go after Options within an Option Option op = (Option) parent; hetOffset = op.getOptions().length; } else { //for all others insert at top of list hetOffset = 0; } return hetOffset; } | 2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/f5bd17d8047dd4d76aaa5691a44de76988520d43/DatasetConfigTreeNode.java/clean/src/java/org/ensembl/mart/editor/DatasetConfigTreeNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
760,
509,
7628,
847,
19409,
1481,
2335,
12,
921,
982,
16,
1033,
1151,
13,
288,
565,
509,
366,
278,
2335,
273,
300,
21,
31,
565,
309,
261,
3624,
1276,
2358,
18,
25137,
80,
18,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
760,
509,
7628,
847,
19409,
1481,
2335,
12,
921,
982,
16,
1033,
1151,
13,
288,
565,
509,
366,
278,
2335,
273,
300,
21,
31,
565,
309,
261,
3624,
1276,
2358,
18,
25137,
80,
18,
81... | |
map = new Tile[heightInTiles][widthInTiles]; | map = new Tile[heightInTiles+1][widthInTiles+1]; | public void setBounds(Rectangle bounds) { xOffset = bounds.x; yOffset = bounds.y; widthInTiles = bounds.width; heightInTiles = bounds.height; map = new Tile[heightInTiles][widthInTiles]; } | 6621 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6621/9b526d961d4c5e3ac31e60bf677ad2b84e9a7876/MapLayer.java/buggy/tiled/core/MapLayer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
5694,
12,
19463,
4972,
13,
288,
202,
202,
92,
2335,
273,
4972,
18,
92,
31,
202,
202,
93,
2335,
273,
4972,
18,
93,
31,
202,
202,
2819,
382,
27669,
273,
4972,
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,
444,
5694,
12,
19463,
4972,
13,
288,
202,
202,
92,
2335,
273,
4972,
18,
92,
31,
202,
202,
93,
2335,
273,
4972,
18,
93,
31,
202,
202,
2819,
382,
27669,
273,
4972,
18,
... |
private String newMacro (String name) { return "${" + name + "}"; | private String newMacro(String name) { StringBuffer result = new StringBuffer(name.length() + 4); result.append("${"); result.append(name); result.append("}"); return result.toString(); | private String newMacro (String name) { return "${" + name + "}"; } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/c66c28e4527a155adbc10a942722ddcbad495baf/CmsLinkProcessor.java/buggy/src/org/opencms/staticexport/CmsLinkProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
394,
17392,
261,
780,
508,
13,
288,
7734,
327,
4662,
16711,
397,
508,
397,
11883,
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,
3238,
514,
394,
17392,
261,
780,
508,
13,
288,
7734,
327,
4662,
16711,
397,
508,
397,
11883,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
public ConnectDialog(Frame frame) { super(frame, "Connect To Game...", true); yourNameL = new Label("Your Name:", Label.RIGHT); serverAddrL = new Label("Server Address:", Label.RIGHT); portL = new Label("Port:", Label.RIGHT); yourNameF = new TextField(Settings.lastPlayerName, 16); yourNameF.addActionListener(this); serverAddrF = new TextField(Settings.lastConnectAddr, 16); serverAddrF.addActionListener(this); portF = new TextField(Settings.lastConnectPort + "", 4); portF.addActionListener(this); okayB = new Button("Okay"); okayB.setActionCommand("done"); okayB.addActionListener(this); okayB.setSize(80, 24); cancelB = new Button("Cancel"); cancelB.setActionCommand("cancel"); cancelB.addActionListener(this); cancelB.setSize(80, 24); GridBagLayout gridbag = new GridBagLayout(); GridBagConstraints c = new GridBagConstraints(); setLayout(gridbag); c.fill = GridBagConstraints.NONE; c.weightx = 0.0; c.weighty = 0.0; c.insets = new Insets(5, 5, 5, 5); c.gridwidth = 1; c.anchor = GridBagConstraints.EAST; gridbag.setConstraints(yourNameL, c); add(yourNameL); c.gridwidth = GridBagConstraints.REMAINDER; c.anchor = GridBagConstraints.WEST; gridbag.setConstraints(yourNameF, c); add(yourNameF); c.gridwidth = 1; c.anchor = GridBagConstraints.EAST; gridbag.setConstraints(serverAddrL, c); add(serverAddrL); c.gridwidth = GridBagConstraints.REMAINDER; c.anchor = GridBagConstraints.WEST; gridbag.setConstraints(serverAddrF, c); add(serverAddrF); c.gridwidth = 1; c.anchor = GridBagConstraints.EAST; gridbag.setConstraints(portL, c); add(portL); c.gridwidth = GridBagConstraints.REMAINDER; c.anchor = GridBagConstraints.WEST; gridbag.setConstraints(portF, c); add(portF); c.ipadx = 20; c.ipady = 5; c.gridwidth = 1; c.anchor = GridBagConstraints.CENTER; gridbag.setConstraints(okayB, c); add(okayB); c.gridwidth = GridBagConstraints.REMAINDER; gridbag.setConstraints(cancelB, c); add(cancelB); pack(); setResizable(false); setLocation(frame.getLocation().x + frame.getSize().width/2 - getSize().width/2, frame.getLocation().y + frame.getSize().height/2 - getSize().height/2); } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/d7aa695a7511ae9edf5983c3cfd1b2959eaf677e/MegaMek.java/buggy/megamek/src/megamek/MegaMek.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8289,
6353,
12,
3219,
2623,
13,
288,
3639,
2240,
12,
3789,
16,
315,
5215,
2974,
14121,
7070,
16,
638,
1769,
7734,
3433,
461,
48,
273,
394,
5287,
2932,
15446,
1770,
2773,
16,
5287,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8289,
6353,
12,
3219,
2623,
13,
288,
3639,
2240,
12,
3789,
16,
315,
5215,
2974,
14121,
7070,
16,
638,
1769,
7734,
3433,
461,
48,
273,
394,
5287,
2932,
15446,
1770,
2773,
16,
5287,
... | ||
SmilesGenerator sg = new SmilesGenerator(); | public void testCycloOctan() { try { SmilesGenerator sg = new SmilesGenerator(); String filename = "data/mdl/cyclooctan.mol"; InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename); MDLReader reader = new MDLReader(new InputStreamReader(ins)); Molecule mol1 = (Molecule) reader.read(new Molecule()); String moleculeSmile = sg.createSMILES(mol1); assertEquals(moleculeSmile, "C1=CCCCCCC1"); } catch (Exception exc) { exc.printStackTrace(); System.out.println(exc); fail(exc.getMessage()); } } | 45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/99fe3519d35ad1fd276844ab16fa237c545a01fc/SmilesGeneratorTest.java/buggy/src/org/openscience/cdk/test/smiles/SmilesGeneratorTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
17992,
7550,
19320,
304,
1435,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
9552,
1449,
3908,
11150,
273,
394,
9425,
1449,
3908,
5621,
1082,
202,
780,
1544,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
17992,
7550,
19320,
304,
1435,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
9552,
1449,
3908,
11150,
273,
394,
9425,
1449,
3908,
5621,
1082,
202,
780,
1544,
273,
... | |
if (!(cl instanceof NativeJavaClass)) throw new EvaluatorException("not a class"); | if (!(cl instanceof NativeJavaClass)) { String[] args = { Context.toString(cl) }; throw Context.reportRuntimeError( Context.getMessage("msg.not.class", args)); } | public void importClass(Object cl) { if (!(cl instanceof NativeJavaClass)) throw new EvaluatorException("not a class");// TODO: better msg String s = ((NativeJavaClass) cl).getClassObject().getName(); String n = s.substring(s.lastIndexOf('.')+1); if (this.has(n, this)) throw new EvaluatorException("property " + n + " is already defined"); this.defineProperty(n, cl, DONTENUM); } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/6b84d958f412657c5e0efa0cb352e05775ffafdc/ImporterTopLevel.java/buggy/js/rhino/org/mozilla/javascript/ImporterTopLevel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1930,
797,
12,
921,
927,
13,
288,
3639,
309,
16051,
12,
830,
1276,
16717,
5852,
797,
3719,
5411,
604,
394,
31956,
503,
2932,
902,
279,
667,
8863,
759,
2660,
30,
7844,
1234,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1930,
797,
12,
921,
927,
13,
288,
3639,
309,
16051,
12,
830,
1276,
16717,
5852,
797,
3719,
5411,
604,
394,
31956,
503,
2932,
902,
279,
667,
8863,
759,
2660,
30,
7844,
1234,
3... |
CmsSearchIndex searchIndex = (CmsSearchIndex) indexIterator.next(); | CmsSearchIndex searchIndex = (CmsSearchIndex)indexIterator.next(); | public Element generateXml(Element parent) { // add <search> node Element searchElement = parent.addElement(N_SEARCH); if (OpenCms.getRunLevel() >= OpenCms.RUNLEVEL_3_SHELL_ACCESS) { // initialized OpenCms instance is available, use latest values m_searchManager = OpenCms.getSearchManager(); } // add <cache> element searchElement.addElement(N_CACHE).addText(m_searchManager.getResultCacheSize()); // add <directory> element searchElement.addElement(N_DIRECTORY).addText(m_searchManager.getDirectory()); // add <timeout> element searchElement.addElement(N_TIMEOUT).addText(m_searchManager.getTimeout()); // add <exerpt> element searchElement.addElement(N_EXCERPT).addText(String.valueOf(m_searchManager.getMaxExcerptLength())); // add <highlighter> element searchElement.addElement(N_HIGHLIGHTER).addText(m_searchManager.getHighlighter().getClass().getName()); // <documenttypes> Element documenttypesElement = searchElement.addElement(N_DOCUMENTTYPES); List docTypeKeyList = new ArrayList(m_searchManager.getDocumentTypeConfigs().keySet()); Collections.sort(docTypeKeyList); List sortedDocTypeList = new ArrayList(); Iterator i = docTypeKeyList.iterator(); while (i.hasNext()) { CmsSearchDocumentType currDocType = m_searchManager.getDocumentTypeConfig((String)i.next()); sortedDocTypeList.add(currDocType); } Iterator docTypeIterator = sortedDocTypeList.iterator(); while (docTypeIterator.hasNext()) { CmsSearchDocumentType currSearchDocType = (CmsSearchDocumentType) docTypeIterator.next(); // add the next <documenttype> element Element documenttypeElement = documenttypesElement.addElement(N_DOCUMENTTYPE); // add <name> element documenttypeElement.addElement(N_NAME).addText(currSearchDocType.getName()); // add <class> element documenttypeElement.addElement(N_CLASS).addText(currSearchDocType.getClassName()); // add <mimetypes> element Element mimetypesElement = documenttypeElement.addElement(N_MIMETYPES); // get the list of mimetypes to trigger the document factory class Iterator mimeTypesIterator = currSearchDocType.getMimeTypes().iterator(); while (mimeTypesIterator.hasNext()) { // add <mimetype> element(s) mimetypesElement.addElement(N_MIMETYPE).addText((String)mimeTypesIterator.next()); } // add <resourcetypes> element Element restypesElement = documenttypeElement.addElement(N_RESOURCETYPES); // get the list of Cms resource types to trigger the document factory Iterator resTypesIterator = currSearchDocType.getResourceTypes().iterator(); while (resTypesIterator.hasNext()) { // add <resourcetype> element(s) restypesElement.addElement(N_RESOURCETYPE).addText((String)resTypesIterator.next()); } } // </documenttypes> // <analyzers> Element analyzersElement = searchElement.addElement(N_ANALYZERS); List analyzerList = new ArrayList(m_searchManager.getAnalyzers().keySet()); // sort Analyzers in ascending order Collections.sort(analyzerList); Iterator analyzersIterator = analyzerList.iterator(); while (analyzersIterator.hasNext()) { CmsSearchAnalyzer searchAnalyzer = m_searchManager.getCmsSearchAnalyzer((String)analyzersIterator.next()); // add the next <analyzer> element Element analyzerElement = analyzersElement.addElement(N_ANALYZER); // add <class> element analyzerElement.addElement(N_CLASS).addText(searchAnalyzer.getClassName()); if (searchAnalyzer.getStemmerAlgorithm()!=null) { // add <stemmer> element analyzerElement.addElement(N_STEMMER).addText(searchAnalyzer.getStemmerAlgorithm()); } // add <locale> element analyzerElement.addElement(N_LOCALE).addText(searchAnalyzer.getLocale()); } // </analyzers> // <indexes> Element indexesElement = searchElement.addElement(N_INDEXES); Iterator indexIterator = m_searchManager.getSearchIndexs().iterator(); while (indexIterator.hasNext()) { CmsSearchIndex searchIndex = (CmsSearchIndex) indexIterator.next(); // add the next <index> element Element indexElement = indexesElement.addElement(N_INDEX); // add <name> element indexElement.addElement(N_NAME).addText(searchIndex.getName()); // add <rebuild> element indexElement.addElement(N_REBUILD).addText(searchIndex.getRebuildMode()); // add <project> element indexElement.addElement(N_PROJECT).addText(searchIndex.getProject()); // add <locale> element indexElement.addElement(N_LOCALE).addText(searchIndex.getLocale()); // add <sources> element Element sourcesElement = indexElement.addElement(N_SOURCES); // iterate above sourcenames Iterator sourcesIterator = searchIndex.getSourceNames().iterator(); while (sourcesIterator.hasNext()) { // add <source> element sourcesElement.addElement(N_SOURCE).addText((String)sourcesIterator.next()); } // iterate additional params Map indexConfiguration = searchIndex.getConfiguration(); if (indexConfiguration != null) { Iterator it = indexConfiguration.keySet().iterator(); while (it.hasNext()) { String name = (String)it.next(); String value = indexConfiguration.get(name).toString(); Element paramNode = indexElement.addElement(N_PARAM); paramNode.addAttribute(A_NAME, name); paramNode.addText(value); } } } // </indexes> // <indexsources> Element indexsourcesElement = searchElement.addElement(N_INDEXSOURCES); List indexSources = new ArrayList(m_searchManager.getSearchIndexSources().values()); Iterator indexsourceIterator = indexSources.iterator(); while (indexsourceIterator.hasNext()) { CmsSearchIndexSource searchIndexSource = (CmsSearchIndexSource)indexsourceIterator.next(); // add <indexsource> element(s) Element indexsourceElement = indexsourcesElement.addElement(N_INDEXSOURCE); // add <name> element indexsourceElement.addElement(N_NAME).addText(searchIndexSource.getName()); // add <indexer class=""> element Element indexerElement = indexsourceElement.addElement(N_INDEXER).addAttribute(N_CLASS, searchIndexSource.getIndexerClassName()); Map params = searchIndexSource.getParams(); Iterator paramIterator = params.keySet().iterator(); while (paramIterator.hasNext()) { String paramKey = (String) paramIterator.next(); // add <param name=""> element(s) indexerElement.addElement(I_CmsXmlConfiguration.N_PARAM).addAttribute(I_CmsXmlConfiguration.A_NAME, paramKey).addText((String)params.get(paramKey)); } // add <resources> element Element resourcesElement = indexsourceElement.addElement(N_RESOURCES); Iterator resourceIterator = searchIndexSource.getResourcesNames().iterator(); while (resourceIterator.hasNext()) { // add <resource> element(s) resourcesElement.addElement(N_RESOURCE).addText((String)resourceIterator.next()); } // add <documenttypes-indexed> element Element doctypes_indexedElement = indexsourceElement.addElement(N_DOCUMENTTYPES_INDEXED); Iterator doctypesIterator = searchIndexSource.getDocumentTypes().iterator(); while (doctypesIterator.hasNext()) { // add <name> element(s) doctypes_indexedElement.addElement(N_NAME).addText((String)doctypesIterator.next()); } } // </indexsources> return searchElement; } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/ffc41838b2d111ebeb91e9a4f240187165ad24d5/CmsSearchConfiguration.java/clean/src/org/opencms/configuration/CmsSearchConfiguration.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3010,
2103,
4432,
12,
1046,
982,
13,
288,
3639,
368,
527,
411,
3072,
34,
756,
3639,
3010,
1623,
1046,
273,
982,
18,
1289,
1046,
12,
50,
67,
17251,
1769,
3639,
309,
261,
3678,
4747... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3010,
2103,
4432,
12,
1046,
982,
13,
288,
3639,
368,
527,
411,
3072,
34,
756,
3639,
3010,
1623,
1046,
273,
982,
18,
1289,
1046,
12,
50,
67,
17251,
1769,
3639,
309,
261,
3678,
4747... |
public String generateClassifier(MClassifier cls) { String generatedName = generateName(cls.getName()); String classifierKeyword; if (cls instanceof MClassImpl) classifierKeyword = "class"; else if (cls instanceof MInterface) classifierKeyword = "interface"; else return ""; // actors and use cases StringBuffer sb = new StringBuffer(80); sb.append(DocumentationManager.getComments(cls)); // Add the comments for this classifier first. /* * Replaced 2001-09-26 STEFFEN ZSCHALER * * Was: * sb.append(DocumentationManager.getDocs(cls)).append("\n"); */ sb.append (generateConstraintEnrichedDocComment (cls)).append ("\n"); sb.append(generateVisibility(cls.getVisibility())); if (cls.isAbstract() && !(cls instanceof MInterface)) sb.append("abstract "); if (cls.isLeaf()) sb.append("final "); sb.append(classifierKeyword).append(" ").append(generatedName); String baseClass = generateGeneralzation(cls.getGeneralizations()); String tv = null; if (!baseClass.equals("")) sb.append(' ').append("extends ").append(baseClass); // nsuml: realizations! if (cls instanceof MClass) { String interfaces = generateSpecification((MClass)cls); if (!interfaces.equals("")) sb.append(' ').append("implements ").append(interfaces); } sb.append("\n{"); tv = generateTaggedValues(cls); if (tv != null && tv.length() > 0) sb.append(INDENT).append(tv); // sb.append(generateConstraints(cls)); Removed 2001-09-26 STEFFEN ZSCHALER Collection strs = MMUtil.SINGLETON.getAttributes(cls); if (strs != null) { sb.append('\n'); if (cls instanceof MClassImpl) sb.append(INDENT).append("// Attributes\n"); Iterator strEnum = strs.iterator(); while (strEnum.hasNext()) { MStructuralFeature sf = (MStructuralFeature) strEnum.next(); sb.append('\n').append(INDENT).append(generate(sf)); tv = generateTaggedValues(sf); if (tv != null && tv.length() > 0) sb.append(INDENT).append(tv).append('\n'); } } Collection ends = cls.getAssociationEnds(); if (ends != null) { sb.append('\n'); if (cls instanceof MClassImpl) sb.append(INDENT).append("// Associations\n"); Iterator endEnum = ends.iterator(); while (endEnum.hasNext()) { MAssociationEnd ae = (MAssociationEnd) endEnum.next(); MAssociation a = ae.getAssociation(); sb.append('\n').append(INDENT).append(generateAssociationFrom(a, ae)); tv = generateTaggedValues(a); if (tv != null && tv.length() > 0) sb.append(INDENT).append(tv); // sb.append(generateConstraints(a)); Removed 2001-09-26 STEFFEN ZSCHALER Why was this not in generateAssociationFrom ? } } // needs-more-work: constructors Collection behs = MMUtil.SINGLETON.getOperations(cls); if (behs != null) { sb.append ('\n'); sb.append (INDENT).append ("// Operations\n"); Iterator behEnum = behs.iterator(); while (behEnum.hasNext()) { MBehavioralFeature bf = (MBehavioralFeature) behEnum.next(); sb.append ('\n').append (INDENT).append (generate (bf)); tv = generateTaggedValues((MModelElement)bf); if ((cls instanceof MClassImpl) && (bf instanceof MOperation) && (! ((MOperation) bf).isAbstract())) { sb.append ('\n').append (INDENT).append ("{\n"); if (tv.length() > 0) sb.append (INDENT).append (tv); sb.append (generateMethodBody ((MOperation) bf)).append ('\n') .append (INDENT).append ("}\n"); } else { sb.append (";\n"); if (tv.length() > 0) sb.append (INDENT).append (tv).append ('\n'); } } } sb.append("} /* end ").append(classifierKeyword).append(' ').append(generatedName).append(" */\n"); return sb.toString(); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/00b3c8a45344d16d7f2584bfb7fd43ff696250bb/GeneratorJava.java/buggy/src_new/org/argouml/language/java/generator/GeneratorJava.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
2103,
13860,
12,
49,
13860,
2028,
13,
288,
565,
514,
4374,
461,
273,
2103,
461,
12,
6429,
18,
17994,
10663,
565,
514,
14622,
8736,
31,
565,
309,
261,
6429,
1276,
490,
797,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
2103,
13860,
12,
49,
13860,
2028,
13,
288,
565,
514,
4374,
461,
273,
2103,
461,
12,
6429,
18,
17994,
10663,
565,
514,
14622,
8736,
31,
565,
309,
261,
6429,
1276,
490,
797,
28... | ||
assertEquals(col.size(), 9); | assertEquals(col.size(), 9); | public void testBug84615() throws Exception { StringBuffer buffer = new StringBuffer(); buffer.append("class A { public : static int n; }; \n"); //$NON-NLS-1$ buffer.append("int main() { \n"); //$NON-NLS-1$ buffer.append(" int A; \n"); //$NON-NLS-1$ buffer.append(" A::n = 42; \n"); //$NON-NLS-1$ buffer.append(" A b; \n"); //$NON-NLS-1$ buffer.append("} \n"); //$NON-NLS-1$ IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP); CPPNameCollector col = new CPPNameCollector(); CPPVisitor.visitTranslationUnit(tu, col); assertEquals(col.size(), 9); ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding(); ICPPField n = (ICPPField) col.getName(1).resolveBinding(); IBinding Aref = col.getName(5).resolveBinding(); IBinding nref = col.getName(6).resolveBinding(); IProblemBinding prob = (IProblemBinding) col.getName(7).resolveBinding(); assertSame(A, Aref); assertSame(n, nref); assertNotNull(prob); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/85642473031be9bd27aacd0ceddea64e2ce41399/AST2CPPTests.java/clean/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1842,
19865,
5193,
26,
3600,
1435,
1216,
1185,
288,
1377,
6674,
1613,
273,
394,
6674,
5621,
1377,
1613,
18,
6923,
2932,
1106,
432,
288,
1071,
294,
760,
509,
290,
31,
289,
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,
565,
1071,
918,
1842,
19865,
5193,
26,
3600,
1435,
1216,
1185,
288,
1377,
6674,
1613,
273,
394,
6674,
5621,
1377,
1613,
18,
6923,
2932,
1106,
432,
288,
1071,
294,
760,
509,
290,
31,
289,
31,
... |
fTemplateViewer.setSorter(ListUtil.NAME_SORTER); | fTemplateViewer.setComparator(ListUtil.NAME_COMPARATOR); | public void createControl(Composite parent) { // tab folder final TabFolder tabFolder = new TabFolder(parent, SWT.FLAT); TabItem firstTab = new TabItem(tabFolder, SWT.NULL); firstTab.setText(PDEUIMessages.PointSelectionPage_tab1); TabItem secondTab = new TabItem(tabFolder, SWT.NULL); secondTab.setText(PDEUIMessages.PointSelectionPage_tab2); secondTab.setControl(createWizardsPage(tabFolder)); tabFolder.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { updateTabSelection(tabFolder.getSelectionIndex()); } }); // top level group Composite outerContainer = new Composite(tabFolder, SWT.NONE); firstTab.setControl(outerContainer); GridLayout layout = new GridLayout(); outerContainer.setLayout(layout); GridData gd = new GridData(GridData.FILL_BOTH); outerContainer.setLayoutData(gd); Composite pointContainer = new Composite(outerContainer, SWT.NONE); layout = new GridLayout(); layout.marginHeight = layout.marginWidth = 0; pointContainer.setLayout(layout); gd = new GridData(GridData.FILL_BOTH); pointContainer.setLayoutData(gd); Composite labelContainer = new Composite(pointContainer, SWT.NONE); layout = new GridLayout(2, false); layout.marginHeight = layout.marginWidth = 0; labelContainer.setLayout(layout); labelContainer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Label filterLabel = new Label(labelContainer, SWT.NONE); filterLabel.setText(PDEUIMessages.NewExtensionWizard_PointSelectionPage_availExtPoints_label); gd = new GridData(); gd.verticalAlignment = GridData.CENTER; filterLabel.setLayoutData(gd); fFilterText = new Text(labelContainer, SWT.BORDER); fFilterText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fFilterText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { fWildCardFilter.setMatchText(fFilterText.getText()); fPointListViewer.refresh(); } }); fFilterText.addKeyListener(new KeyListener() { public void keyPressed(KeyEvent e) { if (e.keyCode == SWT.ARROW_DOWN) fPointListViewer.getControl().setFocus(); } public void keyReleased(KeyEvent e) {} }); fFilterCheck = new Button(outerContainer, SWT.CHECK); fFilterCheck.setText(PDEUIMessages.NewExtensionWizard_PointSelectionPage_filterCheck); gd = new GridData(GridData.FILL_HORIZONTAL); fFilterCheck.setLayoutData(gd); fFilterCheck.setSelection(true); fFilterCheck.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { fPointListViewer.refresh(); } }); fPointListViewer = new TableViewer( pointContainer, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER); fPointListViewer.setContentProvider(new PointContentProvider()); fPointListViewer.setLabelProvider(new PointLabelProvider()); fPointListViewer.addSelectionChangedListener(this); fPointListViewer.addDoubleClickListener(new IDoubleClickListener(){ public void doubleClick(DoubleClickEvent event) { if (canFinish()){ fWizard.performFinish(); fWizard.getShell().close(); fWizard.dispose(); fWizard.setContainer(null); } } }); fPointListViewer.addFilter(fWildCardFilter); fPointListViewer.setSorter(ListUtil.NAME_SORTER); gd = new GridData(GridData.FILL_BOTH); gd.heightHint = 150; fPointListViewer.getTable().setLayoutData(gd); Composite templateComposite = new Composite(outerContainer, SWT.NONE); layout = new GridLayout(); layout.marginHeight = 4; layout.marginWidth = 0; templateComposite.setLayout(layout); gd = new GridData(GridData.FILL_HORIZONTAL); templateComposite.setLayoutData(gd); fDescLink = new Link(templateComposite, SWT.NONE); fDescLink.setText(NLS.bind(PDEUIMessages.PointSelectionPage_extPointDesc, "")); //$NON-NLS-1$ fDescLink.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (fCurrentPoint != null) new ShowDescriptionAction(fCurrentPoint, true).run(); } }); fDescLink.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Control c = null; Composite comp = new Composite(templateComposite, SWT.BORDER); layout = new GridLayout(); layout.marginHeight = layout.marginWidth = 0; comp.setLayout(layout); comp.setLayoutData(new GridData(GridData.FILL_BOTH)); try { c = fPointDescBrowser = new Browser(comp, SWT.NONE); } catch (SWTError e) {} if (c == null) c = fPointDescription = new Text(comp, SWT.WRAP | SWT.MULTI | SWT.V_SCROLL | SWT.READ_ONLY); setPointDescriptionText(PDEUIMessages.NewExtensionWizard_PointSelectionPage_extPointDescription); gd = new GridData(GridData.FILL_HORIZONTAL); gd.heightHint = 80; c.setLayoutData(gd); fTemplateLabel = new Label(templateComposite, SWT.NONE | SWT.WRAP); fTemplateLabel.setText(PDEUIMessages.NewExtensionWizard_PointSelectionPage_contributedTemplates_title); gd = new GridData(GridData.FILL_HORIZONTAL); fTemplateLabel.setLayoutData(gd); SashForm templateSashForm = new SashForm(templateComposite, SWT.HORIZONTAL); templateSashForm.setLayout(new GridLayout()); gd = new GridData(GridData.FILL_BOTH); gd.heightHint = 80; templateSashForm.setLayoutData(gd); Composite wizardComposite = new Composite(templateSashForm, SWT.NONE); layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; wizardComposite.setLayout(layout); gd = new GridData( GridData.FILL_BOTH | GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); wizardComposite.setLayoutData(gd); fTemplateViewer = new TableViewer(wizardComposite, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER); fTemplateViewer.setContentProvider(new TemplateContentProvider()); fTemplateViewer.setLabelProvider(ElementLabelProvider.INSTANCE); fTemplateViewer.setSorter(ListUtil.NAME_SORTER); fTemplateViewer.addSelectionChangedListener(this); gd = new GridData(GridData.FILL_BOTH); fTemplateViewer.getTable().setLayoutData(gd); TableItem[] selection = fPointListViewer.getTable().getSelection(); if (selection != null && selection.length > 0) fTemplateViewer.setInput(selection[0]); fTemplateViewer.addDoubleClickListener(new IDoubleClickListener(){ public void doubleClick(DoubleClickEvent event) { if (canFlipToNextPage()){ advanceToNextPage(); } } }); Composite descriptionComposite = new Composite(templateSashForm, SWT.NONE); layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; descriptionComposite.setLayout(layout); gd = new GridData(GridData.FILL_BOTH | GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); descriptionComposite.setLayoutData(gd); createDescriptionIn(descriptionComposite); getContainer().getShell().setSize(500, 500); initialize(); setControl(tabFolder); Dialog.applyDialogFont(outerContainer); PlatformUI.getWorkbench().getHelpSystem().setHelp( outerContainer, IHelpContextIds.ADD_EXTENSIONS_SCHEMA_BASED); } | 8783 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8783/2c99ec563b6fa17cebdc7c80d292285e73ec04c2/PointSelectionPage.java/clean/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/extension/PointSelectionPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
752,
3367,
12,
9400,
982,
13,
288,
202,
202,
759,
3246,
3009,
202,
202,
6385,
9483,
3899,
3246,
3899,
273,
394,
9483,
3899,
12,
2938,
16,
348,
8588,
18,
42,
12190,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
752,
3367,
12,
9400,
982,
13,
288,
202,
202,
759,
3246,
3009,
202,
202,
6385,
9483,
3899,
3246,
3899,
273,
394,
9483,
3899,
12,
2938,
16,
348,
8588,
18,
42,
12190,
1769,
... |
public Result decode(String ref) { Result result; Timer timer = Timer.getTimer(context, "Decode"); timer.start(); // start the timer result = recognizer.recognize(); timer.stop(); // stop the timer showFinalResult(ref, result, timer); return result; } | 7874 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7874/b11c7e7ba4192f5f2bdddca677d061835222474d/Decoder.java/buggy/edu/cmu/sphinx/decoder/Decoder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3438,
2495,
12,
780,
1278,
13,
288,
3639,
3438,
563,
31,
202,
6777,
5441,
273,
12290,
18,
588,
6777,
12,
2472,
16,
315,
6615,
8863,
3639,
5441,
18,
1937,
5621,
225,
368,
787,
326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3438,
2495,
12,
780,
1278,
13,
288,
3639,
3438,
563,
31,
202,
6777,
5441,
273,
12290,
18,
588,
6777,
12,
2472,
16,
315,
6615,
8863,
3639,
5441,
18,
1937,
5621,
225,
368,
787,
326,... | ||
return ((MPseudostateKind)ps1).equals(ps2); | return ((MPseudostateKind) ps1).equals(ps2); | public static boolean equalsPseudostateKind(Object ps1, Object ps2) { return ((MPseudostateKind)ps1).equals(ps2); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/ca3bcb5d6dd283c4553bcbfe50b108dc5d499768/ModelFacade.java/clean/src_new/org/argouml/model/ModelFacade.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
1606,
52,
23715,
669,
340,
5677,
12,
921,
4250,
21,
16,
1033,
4250,
22,
13,
288,
3639,
327,
14015,
4566,
23715,
669,
340,
5677,
13,
4250,
21,
2934,
14963,
12,
1121,
22,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
1606,
52,
23715,
669,
340,
5677,
12,
921,
4250,
21,
16,
1033,
4250,
22,
13,
288,
3639,
327,
14015,
4566,
23715,
669,
340,
5677,
13,
4250,
21,
2934,
14963,
12,
1121,
22,... |
file = new NormalizedFile(path.getRuntime().getCurrentDirectory(), path.getValue()); | file = new NormalizedFile(path.getRuntime().getCurrentDirectory(), path.toString()); | private static NormalizedFile newFile(RubyString path) { NormalizedFile file = new NormalizedFile(path.getValue()); if (!file.isAbsolute()) { file = new NormalizedFile(path.getRuntime().getCurrentDirectory(), path.getValue()); } try { file = (NormalizedFile)file.getCanonicalFile(); } catch (IOException e) { file = (NormalizedFile)file.getAbsoluteFile(); } return file; } | 47619 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47619/9f2efc63a858fa0507245b207025eab027840a04/RubyFileTest.java/clean/src/org/jruby/RubyFileTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
8769,
1235,
812,
20592,
12,
54,
10340,
780,
589,
13,
288,
202,
202,
15577,
812,
585,
273,
394,
8769,
1235,
812,
12,
803,
18,
24805,
10663,
7734,
309,
16051,
768,
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,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
8769,
1235,
812,
20592,
12,
54,
10340,
780,
589,
13,
288,
202,
202,
15577,
812,
585,
273,
394,
8769,
1235,
812,
12,
803,
18,
24805,
10663,
7734,
309,
16051,
768,
18,
291... |
reportIllegalAttributeValue(header, key, value, problemID); | reportIllegalAttributeValue(header, key, value); | protected void validateAttributeValue(IHeader header, ManifestElement element, String key, String[] allowedValues, int problemID) { String value = element.getAttribute(key); if (value == null) { return; } for (int i = 0; i < allowedValues.length; i++) { if (allowedValues[i].equals(value)) { return; } } reportIllegalAttributeValue(header, key, value, problemID); } | 8783 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8783/87dd8ec978807e3ea8f676ade2caf585bff26e45/JarManifestErrorReporter.java/clean/org.eclipse.pde/src/org/eclipse/pde/internal/builders/JarManifestErrorReporter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1954,
14942,
12,
45,
1864,
1446,
16,
15443,
1046,
930,
16,
1082,
202,
780,
498,
16,
514,
8526,
25080,
16,
509,
6199,
734,
13,
288,
202,
202,
780,
460,
273,
930,
18,
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,
225,
202,
1117,
918,
1954,
14942,
12,
45,
1864,
1446,
16,
15443,
1046,
930,
16,
1082,
202,
780,
498,
16,
514,
8526,
25080,
16,
509,
6199,
734,
13,
288,
202,
202,
780,
460,
273,
930,
18,
58... |
public String getClassName() { | public String getClassName() { | public String getClassName() { return "Date"; } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/ba8f69355a752cc7402f5b559a19be4d84c54e22/NativeDate.java/buggy/js/rhino/src/org/mozilla/javascript/NativeDate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
11819,
1435,
288,
3639,
327,
315,
1626,
14432,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
11819,
1435,
288,
3639,
327,
315,
1626,
14432,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return (RubyClass)getRubyClass(); | return getRubyClass(); | public RubyModule m_type() { return (RubyClass)getRubyClass(); } | 48072 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48072/60d09f0d06e157ff7d9bb828d89273706e4e2798/RubyBoolean.java/clean/org/jruby/RubyBoolean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
3120,
312,
67,
723,
1435,
288,
3639,
327,
4170,
10340,
797,
5621,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
3120,
312,
67,
723,
1435,
288,
3639,
327,
4170,
10340,
797,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public String getDefined() { | public String getDefined(Ruby ruby, RubyObject self) { | public String getDefined() { Node head = getHeadNode(); if(head instanceof ZSuperNode || head instanceof SuperNode) { //if (ruby_frame->last_func == 0) return 0; // else if (ruby_frame->last_class == 0) return 0; // else if (rb_method_boundp(RCLASS(ruby_frame->last_class)->super, // ruby_frame->last_func, 0)) { // if (nd_type(node) == NODE_SUPER) { // return arg_defined(self, node->nd_args, buf, "super"); // } // return "super"; // } // break; } else if (head instanceof VCallNode || head instanceof FCallNode) { } else if (head instanceof CallNode) { } else if (head instanceof Match2Node || head instanceof Match3Node) { return "method"; } else if (head instanceof YieldNode) { //if block given, TODO----FIXME return "yield"; } else if (head instanceof SelfNode) { return "self"; } else if (head instanceof NilNode) { return "nil"; } else if (head instanceof TrueNode) { return "true"; } else if (head instanceof FalseNode) { return "false"; } else if (head instanceof AssignableNode || head instanceof AttrSetNode || head instanceof OpAsgn1Node || head instanceof OpAsgn2Node) { return "assignment"; } else if (head instanceof LVarNode) { return "local-variable"; } else if (head instanceof DVarNode) { return "local-variable(in-block)"; } else if (head instanceof GVarNode) { //FIXME...need to first check that it's defined!!! // if (rb_gvar_defined(node->nd_entry)) { return "global-variable"; } else if (head instanceof IVarNode) { //FIXME...need to first check that it's defined!!! // if (rb_ivar_defined(self, node->nd_vid)) { return "instance-variable"; } else if (head instanceof ConstNode) { // FIXME if(constant is defined) return "constant"; } else if (head instanceof CVarNode) { // FIXME!!!! //if (NIL_P(ruby_cbase)) { //if (rb_cvar_defined(CLASS_OF(self), node->nd_vid)) { //return "class variable"; //} //break; //} //if (!FL_TEST(ruby_cbase, FL_SINGLETON)) { //if (rb_cvar_defined(ruby_cbase, node->nd_vid)) { //return "class variable"; //} //break; //} //self = rb_iv_get(ruby_cbase, "__attached__"); return "class variable"; } else if (head instanceof CVar2Node) { // FIXME!!!! //if (rb_cvar_defined(rb_cvar_singleton(self), node->nd_vid)) { //return "class variable"; //} } else if (head instanceof Colon2Node) { //FIXME!!!!! //PUSH_TAG(PROT_NONE); //if ((state = EXEC_TAG()) == 0) { //val = rb_eval(self, node->nd_head); //} //POP_TAG(); //if (state) { //ruby_errinfo = Qnil; //return 0; //} //else { //switch (TYPE(val)) { //case T_CLASS: //case T_MODULE: //if (rb_const_defined_at(val, node->nd_mid)) //return "constant"; //default: //if (rb_method_boundp(val, node->nd_mid, 1)) { //return "method"; //} //} //} //break; return null; } else if (head instanceof NthRefNode) { //FIXME!! //if (RTEST(rb_reg_nth_defined(node->nd_nth, MATCH_DATA))) { //sprintf(buf, "$%d", node->nd_nth); //return buf; //} //break; return null; } else if (head instanceof BackRefNode) { //FIXME!! //if (RTEST(rb_reg_nth_defined(0, MATCH_DATA))) { //sprintf(buf, "$%c", node->nd_nth); //return buf; //} //break; return null; } else { //FIXME!! //default: //PUSH_TAG(PROT_NONE); //if ((state = EXEC_TAG()) == 0) { //rb_eval(self, node); //} //POP_TAG(); //if (!state) { //return "expression"; //} //ruby_errinfo = Qnil; //break; } return null; } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/6f48980923c4b06bac2890165c858310895f9a14/DefinedNode.java/clean/org/jruby/nodes/DefinedNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1377,
1071,
514,
336,
8116,
12,
54,
10340,
22155,
16,
19817,
921,
365,
13,
288,
3639,
2029,
910,
273,
336,
1414,
907,
5621,
3639,
309,
12,
1978,
1276,
2285,
8051,
907,
747,
910,
1276,
14845,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1377,
1071,
514,
336,
8116,
12,
54,
10340,
22155,
16,
19817,
921,
365,
13,
288,
3639,
2029,
910,
273,
336,
1414,
907,
5621,
3639,
309,
12,
1978,
1276,
2285,
8051,
907,
747,
910,
1276,
14845,
... |
table.update(); OS.ImageList_DragShowNolock(true); | void showDropTargetEffect(int effect, int x, int y) { effect = checkEffect(effect); int handle = table.handle; Point coordinates = new Point(x, y); coordinates = table.toControl(coordinates); LVHITTESTINFO pinfo = new LVHITTESTINFO(); pinfo.x = coordinates.x; pinfo.y = coordinates.y; OS.SendMessage(handle, OS.LVM_HITTEST, 0, pinfo); if ((effect & DND.FEEDBACK_SCROLL) == 0) { scrollBeginTime = 0; scrollIndex = -1; } else { if (pinfo.iItem != -1 && scrollIndex == pinfo.iItem && scrollBeginTime != 0) { if (System.currentTimeMillis() >= scrollBeginTime) { int top = Math.max (0, OS.SendMessage (handle, OS.LVM_GETTOPINDEX, 0, 0)); int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0); int index = (scrollIndex - 1 < top) ? Math.max(0, scrollIndex - 1) : Math.min(count - 1, scrollIndex + 1); boolean scroll = true; if (pinfo.iItem == top) { scroll = pinfo.iItem != index; } else { RECT itemRect = new RECT (); itemRect.left = OS.LVIR_BOUNDS; if (OS.SendMessage (handle, OS.LVM_GETITEMRECT, pinfo.iItem, itemRect) != 0) { RECT rect = new RECT (); OS.GetClientRect (handle, rect); POINT pt = new POINT (); pt.x = itemRect.left; pt.y = itemRect.top; if (OS.PtInRect (rect, pt)) { pt.y = itemRect.bottom; if (OS.PtInRect (rect, pt)) scroll = false; } } } if (scroll) { OS.ImageList_DragShowNolock(false); OS.SendMessage (handle, OS.LVM_ENSUREVISIBLE, index, 0); table.update(); OS.ImageList_DragShowNolock(true); } scrollBeginTime = 0; scrollIndex = -1; } } else { scrollBeginTime = System.currentTimeMillis() + SCROLL_HYSTERESIS; scrollIndex = pinfo.iItem; } } if (pinfo.iItem != -1 && (effect & DND.FEEDBACK_SELECT) != 0) { TableItem item = table.getItem(pinfo.iItem); if (dropHighlight != item) { LVITEM lvItem = new LVITEM(); lvItem.stateMask = OS.LVIS_DROPHILITED; OS.ImageList_DragShowNolock(false); OS.SendMessage(handle, OS.LVM_SETITEMSTATE, -1, lvItem); lvItem.state = OS.LVIS_DROPHILITED; OS.SendMessage(handle, OS.LVM_SETITEMSTATE, pinfo.iItem, lvItem); table.update(); OS.ImageList_DragShowNolock(true); dropHighlight = item; } } else { if (dropHighlight != null) { LVITEM lvItem = new LVITEM (); lvItem.stateMask = OS.LVIS_DROPHILITED; OS.ImageList_DragShowNolock(false); OS.SendMessage(handle, OS.LVM_SETITEMSTATE, -1, lvItem); table.update(); OS.ImageList_DragShowNolock(true); dropHighlight = null; } } //Insert mark only supported on Windows XP with manifest// if (OS.COMCTL32_MAJOR >= 6) {// if ((effect & DND.FEEDBACK_INSERT_BEFORE) != 0 || (effect & DND.FEEDBACK_INSERT_AFTER) != 0) {// LVINSERTMARK lvinsertmark = new LVINSERTMARK();// lvinsertmark.cbSize = LVINSERTMARK.sizeof;// lvinsertmark.dwFlags = (effect & DND.FEEDBACK_INSERT_BEFORE) != 0 ? 0 : OS.LVIM_AFTER;// lvinsertmark.iItem = pinfo.iItem == -1 ? 0 : pinfo.iItem;// int hItem = pinfo.iItem;// OS.SendMessage (handle, OS.LVM_SETINSERTMARK, 0, lvinsertmark);// } else {// OS.SendMessage (handle, OS.LVM_SETINSERTMARK, 0, 0);// }// } return;} | 12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/a3f5ca78a9a757f67007e90931f528488156c2d8/TableDragAndDropEffect.java/buggy/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragAndDropEffect.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
918,
2405,
7544,
2326,
12477,
12,
474,
5426,
16,
509,
619,
16,
509,
677,
13,
288,
202,
13867,
273,
866,
12477,
12,
13867,
1769,
202,
474,
1640,
273,
1014,
18,
4110,
31,
202,
2148,
5513,
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,
918,
2405,
7544,
2326,
12477,
12,
474,
5426,
16,
509,
619,
16,
509,
677,
13,
288,
202,
13867,
273,
866,
12477,
12,
13867,
1769,
202,
474,
1640,
273,
1014,
18,
4110,
31,
202,
2148,
5513,
273,... | |
log.debug("User id " + staticData.getPerson().getID() + " entered invalid column width: " + newWidth); | if (log.isDebugEnabled()) log.debug("User id " + staticData.getPerson().getID() + " entered invalid column width: " + newWidth); | private final void changeColumnWidths(HashMap columnWidths) throws Exception { StructureStylesheetUserPreferences ssup = userPrefs.getStructureStylesheetUserPreferences(); java.util.Set sColWidths = columnWidths.keySet(); java.util.Iterator iterator = sColWidths.iterator(); while(iterator.hasNext()) { String folderId = (String)iterator.next(); String newWidth = (String)columnWidths.get(folderId); // Only accept widths that are either percentages or integers (fixed widths) boolean widthIsValid = true; try { Integer.parseInt(newWidth.endsWith("%") ? newWidth.substring(0, newWidth.indexOf("%")) : newWidth); } catch (java.lang.NumberFormatException nfe) { widthIsValid = false; } if (widthIsValid) ssup.setFolderAttributeValue(folderId, "width", newWidth); else log.debug("User id " + staticData.getPerson().getID() + " entered invalid column width: " + newWidth); } // Persist structure stylesheet user preferences saveUserPreferences(); } | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/760cf3635c5ede30179996a83bb8a9141d0f4f0e/TabColumnPrefsState.java/buggy/source/org/jasig/portal/channels/UserPreferences/TabColumnPrefsState.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
727,
918,
2549,
1494,
22407,
12,
8658,
1057,
22407,
13,
1216,
1185,
225,
288,
565,
13348,
24656,
1299,
12377,
272,
2859,
273,
729,
1386,
2556,
18,
588,
6999,
24656,
1299,
12377,
5621,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
727,
918,
2549,
1494,
22407,
12,
8658,
1057,
22407,
13,
1216,
1185,
225,
288,
565,
13348,
24656,
1299,
12377,
272,
2859,
273,
729,
1386,
2556,
18,
588,
6999,
24656,
1299,
12377,
5621,... |
continue; } | continue; } | protected String printValues( Sequence resultSet, int howmany, int start ) { if ( resultSet.getLength( ) == 0 ) return formatErrorMsg( "nothing found", OK ); if ( ( howmany > resultSet.getLength( ) ) || ( howmany == 0 ) ) howmany = resultSet.getLength( ); if ( ( start < 1 ) || ( start > resultSet.getLength( ) ) ) return formatErrorMsg( "start parameter out of range", WRONG_REQUEST ); Item item; StringBuffer buf = new StringBuffer( ); buf.append( "<exist:result xmlns:exist=\"http://exist.sourceforge.net/NS/exist\" " ); buf.append( "hitCount=\"" ); buf.append( resultSet.getLength( ) ); buf.append( "\">" ); String elem; for ( int i = start - 1; i < ( ( start + howmany ) - 1 ); i++ ) { item = resultSet.itemAt( i ); switch ( item.getType() ) { case Type.NUMBER: elem = "exist:number"; break; case Type.STRING: elem = "exist:string"; break; case Type.BOOLEAN: elem = "exist:boolean"; break; default: HttpServer.LOG.debug( "unknown type: " + item.getType( ) ); continue; } buf.append( "<" ); buf.append( elem ); buf.append( " value=\"" ); buf.append( item.getStringValue( ) ); buf.append( "\"/>" ); } buf.append( "</exist:result>" ); return buf.toString( ); } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/ad9d55f515de2cb1fa50cf09c9e42150efc8374f/HttpServerConnection.java/buggy/src/org/exist/http/HttpServerConnection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
1172,
1972,
12,
8370,
12168,
16,
509,
3661,
9353,
16,
509,
787,
262,
288,
3639,
309,
261,
12168,
18,
588,
1782,
12,
225,
262,
422,
374,
262,
5411,
327,
740,
668,
3332,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
1172,
1972,
12,
8370,
12168,
16,
509,
3661,
9353,
16,
509,
787,
262,
288,
3639,
309,
261,
12168,
18,
588,
1782,
12,
225,
262,
422,
374,
262,
5411,
327,
740,
668,
3332,
12,
... |
File file = new File(propertyPath); file.delete(); bak.renameTo(file); | if (bak.exists()) { File file = new File(propertyPath); file.delete(); bak.renameTo(file); } | public synchronized static void reset(File bak) { File file = new File(propertyPath); file.delete(); bak.renameTo(file); } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/59bc8cd90806195ec50ccdbfd1fb167a4bd8f755/DefaultPropertyHelper.java/buggy/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/util/DefaultPropertyHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
760,
918,
2715,
12,
812,
324,
581,
13,
288,
202,
202,
812,
585,
273,
394,
1387,
12,
4468,
743,
1769,
202,
202,
768,
18,
3733,
5621,
202,
202,
31170,
18,
18539,
774,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
760,
918,
2715,
12,
812,
324,
581,
13,
288,
202,
202,
812,
585,
273,
394,
1387,
12,
4468,
743,
1769,
202,
202,
768,
18,
3733,
5621,
202,
202,
31170,
18,
18539,
774,
12... |
field_id = getConverter().makeBuiltinToATermConversion(field_type, field_id); | field_id = getConverter().makeBuiltinToATermConversion(field_type, field_id); | protected String buildActualTypedAltArgumentList(Iterator fields, boolean convertBuiltins) { StringBuffer buf = new StringBuffer(); while (fields.hasNext()) { Field field = (Field) fields.next(); String field_id = getFieldId(field.getId()); String field_type = field.getType(); if (convertBuiltins) { field_id = getConverter().makeBuiltinToATermConversion(field_type, field_id); } buf.append(field_id); if (fields.hasNext()) { buf.append(", "); } } return buf.toString(); } | 3664 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3664/76875cdfe2af0d6de4ab58a245cce8bd703a86ab/JavaGenerator.java/clean/apigen/apigen/gen/java/JavaGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
1361,
11266,
11985,
10655,
1379,
682,
12,
3198,
1466,
16,
1250,
1765,
16409,
2679,
13,
288,
3639,
6674,
1681,
273,
394,
6674,
5621,
3639,
1323,
261,
2821,
18,
5332,
2134,
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,
377,
4750,
514,
1361,
11266,
11985,
10655,
1379,
682,
12,
3198,
1466,
16,
1250,
1765,
16409,
2679,
13,
288,
3639,
6674,
1681,
273,
394,
6674,
5621,
3639,
1323,
261,
2821,
18,
5332,
2134,
10756,
... |
output = compare.replaceAll("\r",""); output = compare.replaceAll("\n",""); | output = StringUtils.replace(output,"\r",""); output = StringUtils.replace(output,"\n",""); | public void endApplicationScopeNameIterateList (WebResponse response){ String output = response.getText(); String compare = ""; for (int i = 0; i < iterations; i++) { compare += "test" + i; } //fix for introduced carriage return / line feeds output = compare.replaceAll("\r",""); output = compare.replaceAll("\n",""); assertEquals(compare, output); } | 2722 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2722/d35243d93417203419685737c1434918c5e62bae/TestIterateTag.java/clean/src/test/org/apache/struts/taglib/logic/TestIterateTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
679,
3208,
3876,
461,
14916,
682,
261,
4079,
1064,
766,
15329,
202,
565,
514,
876,
273,
766,
18,
588,
1528,
5621,
202,
565,
514,
3400,
273,
1408,
31,
202,
565,
364,
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,
918,
679,
3208,
3876,
461,
14916,
682,
261,
4079,
1064,
766,
15329,
202,
565,
514,
876,
273,
766,
18,
588,
1528,
5621,
202,
565,
514,
3400,
273,
1408,
31,
202,
565,
364,
261,
... |
JavaClass superClass = obj.getSuperClass(); Method [] superClassMethods = superClass.getMethods(); superClassImplementsSerializable = Repository.instanceOf(superClass, "java.io.Serializable"); superClassHasVoidConstructor = false; for(int i = 0; i < superClassMethods.length; i++) { Method m = superClassMethods[i]; /* System.out.println("Supercase has method named " + m.getName() + " with sig " + m.getSignature()); */ if (m.getName().equals("<init>") && m.getSignature().equals("()V") && m.isPublic() ) superClassHasVoidConstructor = true; | JavaClass superClass = obj.getSuperClass(); if (superClass != null) { Method [] superClassMethods = superClass.getMethods(); superClassImplementsSerializable = Repository.instanceOf(superClass, "java.io.Serializable"); superClassHasVoidConstructor = false; for(int i = 0; i < superClassMethods.length; i++) { Method m = superClassMethods[i]; /* System.out.println("Supercase has method named " + m.getName() + " with sig " + m.getSignature()); */ if (m.getName().equals("<init>") && m.getSignature().equals("()V") && m.isPublic() ) superClassHasVoidConstructor = true; } | public void visit(JavaClass obj) { int flags = obj.getAccessFlags(); isAbstract = (flags & ACC_ABSTRACT) != 0 || (flags & ACC_INTERFACE) != 0; sawSerialVersionUID = false; isSerializable = implementsSerializableDirectly = false; isExternalizable = false; directlyImplementsExternalizable = false; isGUIClass = false; isRemote = false; // Does this class directly implement Serializable? String [] interface_names = obj.getInterfaceNames(); for(int i=0; i < interface_names.length; i++) { if (interface_names[i].equals("java.io.Externalizable")) { directlyImplementsExternalizable = true; isExternalizable = true; // System.out.println("Directly implements Externalizable: " + betterClassName); } else if (interface_names[i].equals("java.io.Serializable")) { implementsSerializableDirectly = true; isSerializable = true; break; } } // Does this class indirectly implement Serializable? if (!isSerializable) { try { if (Repository.instanceOf(obj,"java.io.Externalizable")) isExternalizable = true; if (Repository.instanceOf(obj,"java.io.Serializable")) isSerializable = true; if (Repository.instanceOf(obj,"java.rmi.Remote")) { isRemote = true; } } catch (ClassNotFoundException e) { bugReporter.reportMissingClass(e); } } hasPublicVoidConstructor = false; superClassHasVoidConstructor = true; superClassImplementsSerializable = isSerializable && !implementsSerializableDirectly; try { JavaClass superClass = obj.getSuperClass(); Method [] superClassMethods = superClass.getMethods(); superClassImplementsSerializable = Repository.instanceOf(superClass, "java.io.Serializable"); superClassHasVoidConstructor = false; for(int i = 0; i < superClassMethods.length; i++) { Method m = superClassMethods[i]; /* System.out.println("Supercase has method named " + m.getName() + " with sig " + m.getSignature()); */ if (m.getName().equals("<init>") && m.getSignature().equals("()V") && m.isPublic() ) superClassHasVoidConstructor = true; } } catch (ClassNotFoundException e) {} if (isSerializable && !isExternalizable && !superClassHasVoidConstructor && !superClassImplementsSerializable) bugReporter.reportBug(new BugInstance("SE_NO_SUITABLE_CONSTRUCTOR", implementsSerializableDirectly ? HIGH_PRIORITY : NORMAL_PRIORITY) .addClass(thisClass.getClassName())); // Is this a GUI class? try { isGUIClass = Repository.instanceOf(obj, "java.awt.Component"); } catch (ClassNotFoundException e) { bugReporter.reportMissingClass(e); } foundSynthetic = false; foundSynchronizedMethods = false; writeObjectIsSynchronized = false; sawReadExternal = sawWriteExternal = sawReadObject = sawWriteObject = false; } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/7dfcda365833e0475d013c0ef96c3eb54216bd71/SerializableIdiom.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/detect/SerializableIdiom.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
12,
5852,
797,
1081,
13,
377,
288,
4202,
202,
474,
2943,
273,
1081,
18,
588,
1862,
5094,
5621,
202,
291,
7469,
273,
261,
7133,
473,
18816,
67,
26756,
13,
480,
374,
4697... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
12,
5852,
797,
1081,
13,
377,
288,
4202,
202,
474,
2943,
273,
1081,
18,
588,
1862,
5094,
5621,
202,
291,
7469,
273,
261,
7133,
473,
18816,
67,
26756,
13,
480,
374,
4697... |
final InternalAuditModel iAModel = InternalAuditModel.getInternalModel(context); return iAModel; | return InternalAuditModel.getInternalModel(context); | protected InternalAuditModel getInternalAuditModel() { final InternalAuditModel iAModel = InternalAuditModel.getInternalModel(context); return iAModel; } | 53635 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53635/e397e185a7860feada91b8307956a3b3a60d5857/AbstractModelImpl.java/buggy/client-model/src/main/java/com/thinkparity/model/parity/model/AbstractModelImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
3186,
10832,
1488,
16918,
10832,
1488,
1435,
288,
202,
202,
6385,
3186,
10832,
1488,
277,
37,
1488,
273,
3186,
10832,
1488,
18,
588,
3061,
1488,
12,
2472,
1769,
202,
202,
2463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
3186,
10832,
1488,
16918,
10832,
1488,
1435,
288,
202,
202,
6385,
3186,
10832,
1488,
277,
37,
1488,
273,
3186,
10832,
1488,
18,
588,
3061,
1488,
12,
2472,
1769,
202,
202,
2463,
... |
regexpClass.defineConstant("IGNORECASE", RubyFixnum.newFixnum(runtime, RE_OPTION_IGNORECASE)); regexpClass.defineConstant("EXTENDED", RubyFixnum.newFixnum(runtime, RE_OPTION_EXTENDED)); regexpClass.defineConstant("MULTILINE", RubyFixnum.newFixnum(runtime, RE_OPTION_MULTILINE)); | regexpClass.defineConstant("IGNORECASE", runtime.newFixnum(RE_OPTION_IGNORECASE)); regexpClass.defineConstant("EXTENDED", runtime.newFixnum(RE_OPTION_EXTENDED)); regexpClass.defineConstant("MULTILINE", runtime.newFixnum(RE_OPTION_MULTILINE)); | public static RubyClass createRegexpClass(Ruby runtime) { RubyClass regexpClass = runtime.defineClass("Regexp", runtime.getClasses().getObjectClass()); CallbackFactory callbackFactory = runtime.callbackFactory(); regexpClass.defineConstant("IGNORECASE", RubyFixnum.newFixnum(runtime, RE_OPTION_IGNORECASE)); regexpClass.defineConstant("EXTENDED", RubyFixnum.newFixnum(runtime, RE_OPTION_EXTENDED)); regexpClass.defineConstant("MULTILINE", RubyFixnum.newFixnum(runtime, RE_OPTION_MULTILINE)); regexpClass.defineMethod("initialize", callbackFactory.getOptMethod(RubyRegexp.class, "initialize")); regexpClass.defineMethod("clone", callbackFactory.getMethod(RubyRegexp.class, "rbClone")); regexpClass.defineMethod("==", callbackFactory.getMethod(RubyRegexp.class, "equal", IRubyObject.class)); regexpClass.defineMethod("===", callbackFactory.getMethod(RubyRegexp.class, "match", IRubyObject.class)); regexpClass.defineMethod("=~", callbackFactory.getMethod(RubyRegexp.class, "match", IRubyObject.class)); regexpClass.defineMethod("~", callbackFactory.getMethod(RubyRegexp.class, "match2")); regexpClass.defineMethod("match", callbackFactory.getMethod(RubyRegexp.class, "match_m", IRubyObject.class)); regexpClass.defineMethod("inspect", callbackFactory.getMethod(RubyRegexp.class, "inspect")); regexpClass.defineMethod("source", callbackFactory.getMethod(RubyRegexp.class, "source")); regexpClass.defineMethod("casefold?", callbackFactory.getMethod(RubyRegexp.class, "casefold")); regexpClass.defineMethod("kcode", callbackFactory.getMethod(RubyRegexp.class, "kcode")); regexpClass.defineMethod("to_s", callbackFactory.getMethod(RubyRegexp.class, "to_s")); regexpClass.defineSingletonMethod("new", callbackFactory.getOptSingletonMethod(RubyRegexp.class, "newInstance")); regexpClass.defineSingletonMethod("compile", callbackFactory.getOptSingletonMethod(RubyRegexp.class, "newInstance")); regexpClass.defineSingletonMethod("quote", callbackFactory.getSingletonMethod(RubyRegexp.class, "quote", RubyString.class)); regexpClass.defineSingletonMethod("escape", callbackFactory.getSingletonMethod(RubyRegexp.class, "quote", RubyString.class)); regexpClass.defineSingletonMethod("last_match", callbackFactory.getSingletonMethod(RubyRegexp.class, "last_match_s")); return regexpClass; } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyRegexp.java/buggy/src/org/jruby/RubyRegexp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
14621,
797,
12,
54,
10340,
3099,
13,
288,
3639,
19817,
797,
7195,
797,
273,
3099,
18,
11255,
797,
2932,
14621,
3113,
3099,
18,
588,
4818,
7675,
588,
921,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
14621,
797,
12,
54,
10340,
3099,
13,
288,
3639,
19817,
797,
7195,
797,
273,
3099,
18,
11255,
797,
2932,
14621,
3113,
3099,
18,
588,
4818,
7675,
588,
921,
797,
... |
if (methodWrapper != null) { | if (methodWrapper != null && methodWrapper.getMethodCall().hasCallLocations()) { | private void updateLocationsView(MethodWrapper methodWrapper) { if (methodWrapper != null) { fLocationViewer.setInput(methodWrapper.getMethodCall().getCallLocations()); } else { fLocationViewer.setInput(""); //$NON-NLS-1$ } } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/40ea3033ea0142eae45ddc9f36fd63a6c805bee9/CallHierarchyViewPart.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewPart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
10985,
1767,
12,
1305,
3611,
707,
3611,
13,
288,
3639,
309,
261,
2039,
3611,
480,
446,
597,
707,
3611,
18,
588,
12592,
7675,
5332,
1477,
10985,
10756,
288,
5411,
284,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
10985,
1767,
12,
1305,
3611,
707,
3611,
13,
288,
3639,
309,
261,
2039,
3611,
480,
446,
597,
707,
3611,
18,
588,
12592,
7675,
5332,
1477,
10985,
10756,
288,
5411,
284,
273... |
String msg= line.substring(firstColon + 1); if ((enter = msg.startsWith(" Entering directory")) || (msg.startsWith(" Leaving directory"))) { | String msg= line.substring(firstColon + 1).trim(); if ((enter = msg.startsWith("Entering directory")) || (msg.startsWith("Leaving directory"))) { | public boolean processLine(String line, ErrorParserManager eoParser) { // make\[[0-9]*\]: error_desc int firstColon= line.indexOf(':'); if (firstColon != -1 && line.startsWith("make")) { boolean enter = false; String msg= line.substring(firstColon + 1); if ((enter = msg.startsWith(" Entering directory")) || (msg.startsWith(" Leaving directory"))) { int s = msg.indexOf('`'); int e = msg.indexOf('\''); if (s != -1 && e != -1) { String dir = msg.substring(s+1, e); if (enter) { /* Sometimes make screws up the output, so * "leave" events can't be seen. Double-check level * here. */ int level = getDirectoryLevel(line); int parseLevel = eoParser.getDirectoryLevel(); for (; level < parseLevel; level++) { eoParser.popDirectory(); } eoParser.pushDirectory(new Path(dir)); } else { eoParser.popDirectory(); /* Could check to see if they match */ } } } else if (msg.startsWith(" ***")) { eoParser.generateMarker(null, -1, msg, IMarkerGenerator.SEVERITY_ERROR_BUILD, null); } } return false; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/4baaaf3c10fea2f501b799ea91c8a136ddd38125/MakeErrorParser.java/clean/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorparsers/MakeErrorParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1207,
1670,
12,
780,
980,
16,
1068,
2678,
1318,
425,
83,
2678,
13,
288,
202,
202,
759,
1221,
64,
31128,
20,
17,
29,
27759,
14542,
225,
555,
67,
5569,
202,
202,
474,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
1670,
12,
780,
980,
16,
1068,
2678,
1318,
425,
83,
2678,
13,
288,
202,
202,
759,
1221,
64,
31128,
20,
17,
29,
27759,
14542,
225,
555,
67,
5569,
202,
202,
474,
11... |
} else { | } else { | public static String getDataStoreType(Connection connection) { String dataStoreType; if (connection != null) { if (connection instanceof com.idega.data.DatastoreConnection) { return getDataStoreType(((DatastoreConnection)connection).getUnderLyingConnection()); } else { String checkString = null; try { checkString = connection.getMetaData().getDatabaseProductName().toLowerCase(); } catch (SQLException e) { //Old Check e.printStackTrace(); checkString = connection.getClass().getName(); } if (checkString.indexOf("oracle") != -1) { dataStoreType = "oracle"; } else if (checkString.indexOf("interbase") != -1 || checkString.indexOf("firebird") != -1) { dataStoreType = "interbase"; } else if (checkString.indexOf("hsql") != -1 || checkString.indexOf("hypersonicsql") != -1) { dataStoreType = "hsql"; } else if (checkString.indexOf("mckoi") != -1 ) { dataStoreType = "mckoi"; } else if (checkString.indexOf("mysql") != -1) { dataStoreType = "mysql"; } else if (checkString.indexOf("sap") != -1) { dataStoreType = "sapdb"; } else if (checkString.indexOf("db2") != -1) { dataStoreType = "db2"; } else if (checkString.indexOf("microsoft sql") != -1 || checkString.indexOf("microsoftsql") != -1) { dataStoreType = "mssqlserver"; } else if (checkString.indexOf("informix") != -1) { dataStoreType = "informix"; } else if (checkString.indexOf("idega") != -1) { dataStoreType = "idega"; } else { dataStoreType = "unimplemented"; } } } else { dataStoreType = ""; } return dataStoreType; } | 52001 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52001/a72e9e5217b7290ee5136c1efddb8aabdea08bf5/DatastoreInterface.java/clean/src/java/com/idega/data/DatastoreInterface.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
4303,
2257,
559,
12,
1952,
1459,
13,
288,
202,
202,
780,
31927,
559,
31,
202,
202,
430,
261,
4071,
480,
446,
13,
288,
1082,
202,
430,
261,
4071,
1276,
532,
18,
831... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4303,
2257,
559,
12,
1952,
1459,
13,
288,
202,
202,
780,
31927,
559,
31,
202,
202,
430,
261,
4071,
480,
446,
13,
288,
1082,
202,
430,
261,
4071,
1276,
532,
18,
831... |
List list1 = (List) knowledgeHelper.get( list1Declaration ); List list2 = (List) knowledgeHelper.get( list2Declaration ); values.add( new List[]{list1, list2} ); | String s1 = (String) knowledgeHelper.get( s1Declaration ); String s2 = (String) knowledgeHelper.get( s2Declaration ); values.add( new String[]{s1, s2} ); | public void test1() throws Exception { ObjectType list1ObjectType = new ClassObjectType( List.class ); ObjectType list2ObjectType = new ClassObjectType( List.class ); Rule rule = new Rule( "rule-1" ); Column list1Column = new Column( 0, list1ObjectType, "list1" ); Column list2Column = new Column( 1, list2ObjectType, "list2" ); rule.addPattern( list1Column ); rule.addPattern( list2Column ); final Declaration list1Declaration = rule.getDeclaration( "list1" ); final Declaration list2Declaration = rule.getDeclaration( "list2" ); final List values = new ArrayList(); rule.setConsequence( new Consequence() { public void evaluate(KnowledgeHelper knowledgeHelper, WorkingMemory workingMemory) throws Exception { List list1 = (List) knowledgeHelper.get( list1Declaration ); List list2 = (List) knowledgeHelper.get( list2Declaration ); values.add( new List[]{list1, list2} ); } } ); Package pkg = new Package( "org.drools" ); pkg.addRule( rule ); RuleBase ruleBase = RuleBaseFactory.newRuleBase(); ruleBase.addPackage( pkg ); WorkingMemory workingMemory = ruleBase.newWorkingMemory(); workingMemory.assertObject( new ArrayList() ); workingMemory.assertObject( new ArrayList() ); workingMemory.assertObject( new LinkedList() ); workingMemory.assertObject( new LinkedList() ); workingMemory.fireAllRules(); // A full cross product is 16, this is just 12 assertEquals( 12, values.size() ); } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/9731e11a9bc76b8b96781bd155c555ec49d6c960/CrossProductTest.java/clean/drools-core/src/test/java/org/drools/reteoo/CrossProductTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
21,
1435,
1216,
1185,
288,
3639,
21338,
666,
21,
17610,
273,
394,
1659,
17610,
12,
987,
18,
1106,
11272,
3639,
21338,
666,
22,
17610,
273,
394,
1659,
17610,
12,
987,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
21,
1435,
1216,
1185,
288,
3639,
21338,
666,
21,
17610,
273,
394,
1659,
17610,
12,
987,
18,
1106,
11272,
3639,
21338,
666,
22,
17610,
273,
394,
1659,
17610,
12,
987,
18,
... |
assertEquals(BugReportSyncState.OUTGOING, task.getSyncState()); | assertEquals(RepositoryTaskSyncState.OUTGOING, task.getSyncState()); | public void testSynchronize() throws InterruptedException, PartInitException, LoginException, BugzillaException, PossibleBugzillaFailureException { // Get the task BugzillaTask task = (BugzillaTask) client.createTaskFromExistingId(repository, "1"); MylarTaskListPlugin.getTaskListManager().moveToRoot(task); assertTrue(task.isBugDownloaded()); // (The initial local copy from server) client.saveBugReport(task.getBugReport()); assertEquals(task.getSyncState(), BugReportSyncState.SYNCHRONIZED); // Modify it String newCommentText = "BugzillaRepositoryClientTest.testSynchronize(): " + (new Date()).toString(); task.getBugReport().setNewNewComment(newCommentText); // overwrites old fields/attributes with new content (ususually done by // BugEditor) updateBug(task.getBugReport()); assertEquals(task.getSyncState(), BugReportSyncState.SYNCHRONIZED); client.saveBugReport(task.getBugReport()); assertEquals(BugReportSyncState.OUTGOING, task.getSyncState()); // Submit changes MockBugzillaReportSubmitForm form = new MockBugzillaReportSubmitForm(); client.submitBugReport(task.getBugReport(), form, null); assertEquals(BugReportSyncState.SYNCHRONIZED, task.getSyncState()); // TODO: Test that comment was appended // ArrayList<Comment> comments = task.getBugReport().getComments(); // assertNotNull(comments); // assertTrue(comments.size() > 0); // Comment lastComment = comments.get(comments.size() - 1); // assertEquals(newCommentText, lastComment.getText()); client.synchronize(task, true, null); assertEquals(BugReportSyncState.SYNCHRONIZED, task.getSyncState()); // OUTGOING with forceddSynch=false task.setSyncState(BugReportSyncState.OUTGOING); client.synchronize(task, false, null); assertEquals(BugReportSyncState.OUTGOING, task.getSyncState()); // OUTGOING with forcedSynch=true --> Update Local Copy dialog // Choosing to override local changes results in SYNCHRONIZED // Choosing not to override results in CONFLICT task.setSyncState(BugReportSyncState.CONFLICT); client.synchronize(task, false, null); assertEquals(BugReportSyncState.CONFLICT, task.getSyncState()); // CONFLICT with forcedSynch=true --> Update Local Copy dialog // Has no outgoing changes or conflicts yet needs synch // because task doesn't have bug report (new query hit) // Result: retrieved with no incoming status task.setSyncState(BugReportSyncState.SYNCHRONIZED); BugReport bugReport = task.getBugReport(); task.setBugReport(null); client.synchronize(task, false, null); assertEquals(BugReportSyncState.SYNCHRONIZED, task.getSyncState()); assertNotNull(task.getBugReport()); assertEquals(task.getBugReport().getId(), bugReport.getId()); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/d91a4c7a3effbbe8b742e700082f8e9f1c02b294/BugzillaRepositoryClientTest.java/clean/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryClientTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
19298,
554,
1435,
1216,
7558,
16,
6393,
2570,
503,
16,
11744,
503,
16,
16907,
15990,
503,
16,
1082,
202,
13576,
19865,
15990,
14389,
288,
202,
202,
759,
968,
326,
156... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19298,
554,
1435,
1216,
7558,
16,
6393,
2570,
503,
16,
11744,
503,
16,
16907,
15990,
503,
16,
1082,
202,
13576,
19865,
15990,
14389,
288,
202,
202,
759,
968,
326,
156... |
public void setNextChangeListener ( ChangeListener listener ) { | public void setNextChangeListener(ChangeListener listener) { | public void setNextChangeListener ( ChangeListener listener ) { _nextChangeListener = listener; } | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/8883179236b87db476131da6fa70580fac43da83/Cursor.java/clean/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cursor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
27674,
15744,
261,
7576,
2223,
2991,
262,
565,
288,
3639,
389,
4285,
15744,
273,
2991,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
27674,
15744,
261,
7576,
2223,
2991,
262,
565,
288,
3639,
389,
4285,
15744,
273,
2991,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public void setUp() throws RuleSetNotFoundException { rule = findRule("naming", "AbstractNaming"); } | public void setUp() { rule = findRule("naming", "AbstractNaming"); } | public void setUp() throws RuleSetNotFoundException { rule = findRule("naming", "AbstractNaming"); } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/4e45de9075eeb015245ff09f8f8c58cf0f98bbf3/AbstractNamingTest.java/clean/pmd/regress/test/net/sourceforge/pmd/rules/AbstractNamingTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
24292,
1435,
1216,
6781,
694,
3990,
288,
3639,
1720,
273,
1104,
2175,
2932,
82,
7772,
3113,
315,
7469,
24102,
8863,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
24292,
1435,
1216,
6781,
694,
3990,
288,
3639,
1720,
273,
1104,
2175,
2932,
82,
7772,
3113,
315,
7469,
24102,
8863,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (cx.debugger != null) { | if (debuggerFrame != null) { | public static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, NativeFunction fnOrScript, InterpreterData theData) throws JavaScriptException { if (cx.interpreterSecurityDomain != theData.securityDomain) { // If securityDomain is different, update domain in Cotext // and call self under new domain Object savedDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = theData.securityDomain; try { return interpret(cx, scope, thisObj, args, fnOrScript, theData); } finally { cx.interpreterSecurityDomain = savedDomain; } } final Object DBL_MRK = Interpreter.DBL_MRK; final Scriptable undefined = Undefined.instance; final int VAR_SHFT = 0; final int maxVars = theData.itsMaxVars; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int TRY_STACK_SHFT = LOCAL_SHFT + theData.itsMaxLocals; final int STACK_SHFT = TRY_STACK_SHFT + theData.itsMaxTryDepth;// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_STACK_SHFT]: used for newtemp/usetemp// stack[TRY_STACK_SHFT <= i < STACK_SHFT]: stack of try scopes// stack[STACK_SHFT <= i < STACK_SHFT + theData.itsMaxStack]: stack data// sDbl[TRY_STACK_SHFT <= i < STACK_SHFT]: stack of try block pc, stored as doubles// sDbl[any other i]: if stack[i] is DBL_MRK, sDbl[i] holds the number value int maxFrameArray = theData.itsMaxFrameArray; if (maxFrameArray != STACK_SHFT + theData.itsMaxStack) Context.codeBug(); Object[] stack = new Object[maxFrameArray]; double[] sDbl = new double[maxFrameArray]; int stackTop = STACK_SHFT - 1; int tryStackTop = 0; // add TRY_STACK_SHFT to get real index int definedArgs = fnOrScript.argCount; if (definedArgs != 0) { if (definedArgs > args.length) { definedArgs = args.length; } for (int i = 0; i != definedArgs; ++i) { stack[VAR_SHFT + i] = args[i]; } } for (int i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } if (theData.itsFunctionType != 0) { if (fnOrScript.itsClosure != null) { scope = fnOrScript.itsClosure; }else if (!theData.itsUseDynamicScope) { scope = fnOrScript.getParentScope(); } if (theData.itsCheckThis) { thisObj = ScriptRuntime.getThis(thisObj); } if (theData.itsNeedsActivation) { scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } } else { scope = ScriptRuntime.initScript(cx, scope, fnOrScript, thisObj, theData.itsFromEvalCode); } if (theData.itsNestedFunctions != null) { if (theData.itsFunctionType != 0 && !theData.itsNeedsActivation) Context.codeBug(); for (int i = 0; i < theData.itsNestedFunctions.length; i++) createFunctionObject(theData.itsNestedFunctions[i], scope, theData.itsFromEvalCode); } DebugFrame debuggerFrame = null; boolean useActivationVars = false; if (cx.debugger != null) { if (theData.itsFunctionType != 0 && !theData.itsNeedsActivation) { useActivationVars = true; scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } debuggerFrame = cx.debugger.enterFrame (cx, scope, thisObj, args, (DebuggableScript)fnOrScript); } Object result = undefined; byte[] iCode = theData.itsICode; String[] strings = theData.itsStringTable; int pc = 0; int pcPrevBranch = pc; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; Loop: while (true) { try { switch (iCode[pc] & 0xff) { case TokenStream.ENDTRY : tryStackTop--; break; case TokenStream.TRY : stack[TRY_STACK_SHFT + tryStackTop] = scope; sDbl[TRY_STACK_SHFT + tryStackTop] = (double)pc; ++tryStackTop; // Skip starting pc of catch/finally blocks pc += 4; break; case TokenStream.GE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl <= lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.LE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl <= rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.GT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl < lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.LT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl < rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.IN : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.INSTANCEOF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.instanceOf(scope, lhs, rhs); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.EQ : { --stackTop; boolean valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.NE : { --stackTop; boolean valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.SHEQ : { --stackTop; boolean valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.SHNE : { --stackTop; boolean valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.IFNE : { Object val = stack[stackTop]; boolean valBln; if (val != DBL_MRK) { valBln = !ScriptRuntime.toBoolean(val); } else { double valDbl = sDbl[stackTop]; valBln = !(valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount (instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; } case TokenStream.IFEQ : { boolean valBln; Object val = stack[stackTop]; if (val != DBL_MRK) { valBln = ScriptRuntime.toBoolean(val); } else { double valDbl = sDbl[stackTop]; valBln = (valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount (instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; } case TokenStream.GOTO : if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.GOSUB : sDbl[++stackTop] = pc + 3; if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.RETSUB : { int slot = (iCode[pc + 1] & 0xFF); if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = (int)sDbl[LOCAL_SHFT + slot]; continue; } case TokenStream.POP : stackTop--; break; case TokenStream.DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; break; case TokenStream.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break; case TokenStream.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break Loop; case RETURN_UNDEF_ICODE : result = undefined; break Loop; case END_ICODE: break Loop; case TokenStream.BITNOT : { int rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; break; } case TokenStream.BITAND : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; break; } case TokenStream.BITOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; break; } case TokenStream.BITXOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; break; } case TokenStream.LSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; break; } case TokenStream.RSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; break; } case TokenStream.URSH : { int rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; break; } case TokenStream.ADD : --stackTop; do_add(stack, sDbl, stackTop); break; case TokenStream.SUB : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; break; } case TokenStream.NEG : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; break; } case TokenStream.POS : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; break; } case TokenStream.MUL : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; break; } case TokenStream.DIV : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; break; } case TokenStream.MOD : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; break; } case TokenStream.BINDNAME : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.bind(scope, name); pc += 2; break; } case TokenStream.GETBASE : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.getBase(scope, name); pc += 2; break; } case TokenStream.SETNAME : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; // what about class cast exception here for lhs? stack[stackTop] = ScriptRuntime.setName ((Scriptable)lhs, rhs, scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; } case TokenStream.DELPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(lhs, rhs); break; } case TokenStream.GETPROP : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; } case TokenStream.SETPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; } case TokenStream.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; break; case TokenStream.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; break; case TokenStream.PROPINC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrement(lhs, name, scope); break; } case TokenStream.PROPDEC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrement(lhs, name, scope); break; } case TokenStream.ELEMINC : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrementElem(lhs, rhs, scope); break; } case TokenStream.ELEMDEC : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrementElem(lhs, rhs, scope); break; } case TokenStream.GETTHIS : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getThis((Scriptable)lhs); break; } case TokenStream.NEWTEMP : { int slot = (iCode[++pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; break; } case TokenStream.USETEMP : { int slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; break; } case TokenStream.CALLSPECIAL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int lineNum = getShort(iCode, pc + 1); String name = strings[getShort(iCode, pc + 3)]; int count = getShort(iCode, pc + 5); Object[] outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, lhs, rhs, outArgs, thisObj, scope, name, lineNum); pc += 6; instructionCount = cx.instructionCount; break; } case TokenStream.CALL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } cx.instructionCount = instructionCount; int count = getShort(iCode, pc + 3); Object[] outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); if (lhs == undefined) { int i = getShort(iCode, pc + 1); if (i != -1) lhs = strings[i]; } Scriptable calleeScope = scope; if (theData.itsNeedsActivation) { calleeScope = ScriptableObject. getTopLevelScope(scope); } stack[stackTop] = ScriptRuntime.call(cx, lhs, rhs, outArgs, calleeScope); pc += 4; instructionCount = cx.instructionCount; break; } case TokenStream.NEW : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int count = getShort(iCode, pc + 3); Object[] outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); if (lhs == undefined && getShort(iCode, pc + 1) != -1) { // special code for better error message for call // to undefined lhs = strings[getShort(iCode, pc + 1)]; } stack[stackTop] = ScriptRuntime.newObject(cx, lhs, outArgs, scope); pc += 4; instructionCount = cx.instructionCount; break; } case TokenStream.TYPEOF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); break; } case TokenStream.TYPEOFNAME : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; } case TokenStream.STRING : stack[++stackTop] = strings[getShort(iCode, pc + 1)]; pc += 2; break; case SHORTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc + 1); pc += 2; break; case INTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc + 1); pc += 4; break; case TokenStream.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = theData. itsDoubleTable[getShort(iCode, pc + 1)]; pc += 2; break; case TokenStream.NAME : stack[++stackTop] = ScriptRuntime.name (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.NAMEINC : stack[++stackTop] = ScriptRuntime.postIncrement (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.NAMEDEC : stack[++stackTop] = ScriptRuntime.postDecrement (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.SETVAR : { int slot = (iCode[++pc] & 0xFF); if (!useActivationVars) { stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; }else { Object val = stack[stackTop]; if (val == DBL_MRK) val = doubleWrap(sDbl[stackTop]); activationPut(fnOrScript, scope, slot, val); } break; } case TokenStream.GETVAR : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; }else { stack[stackTop] = activationGet(fnOrScript, scope, slot); } break; } case TokenStream.VARINC : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) + 1.0; }else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; val = doubleWrap(ScriptRuntime.toNumber(val) + 1.0); activationPut(fnOrScript, scope, slot, val); } break; } case TokenStream.VARDEC : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) - 1.0; }else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; val = doubleWrap(ScriptRuntime.toNumber(val) - 1.0); activationPut(fnOrScript, scope, slot, val); } break; } case TokenStream.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; break; case TokenStream.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; break; case TokenStream.NULL : stack[++stackTop] = null; break; case TokenStream.THIS : stack[++stackTop] = thisObj; break; case TokenStream.THISFN : stack[++stackTop] = fnOrScript; break; case TokenStream.FALSE : stack[++stackTop] = Boolean.FALSE; break; case TokenStream.TRUE : stack[++stackTop] = Boolean.TRUE; break; case TokenStream.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case TokenStream.THROW : { Object exception = stack[stackTop]; if (exception == DBL_MRK) exception = doubleWrap(sDbl[stackTop]); --stackTop; throw new JavaScriptException(exception); } case TokenStream.JTHROW : { Object exception = stack[stackTop]; // No need to check for DBL_MRK: exception must be Exception --stackTop; if (exception instanceof JavaScriptException) throw (JavaScriptException)exception; else throw (RuntimeException)exception; } case TokenStream.ENTERWITH : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); break; } case TokenStream.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); break; case TokenStream.NEWSCOPE : stack[++stackTop] = ScriptRuntime.newScope(); break; case TokenStream.ENUMINIT : { int slot = (iCode[++pc] & 0xFF); Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.initEnum(lhs, scope); break; } case TokenStream.ENUMNEXT : { int slot = (iCode[++pc] & 0xFF); Object val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = ScriptRuntime. nextEnum((Enumeration)val); break; } case TokenStream.GETPROTO : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProto(lhs, scope); break; } case TokenStream.GETPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs); break; } case TokenStream.GETSCOPEPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs, scope); break; } case TokenStream.SETPROTO : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProto(lhs, rhs, scope); break; } case TokenStream.SETPARENT : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setParent(lhs, rhs, scope); break; } case TokenStream.SCOPE : stack[++stackTop] = scope; break; case TokenStream.CLOSURE : { int i = getShort(iCode, pc + 1); stack[++stackTop] = new InterpretedFunction( theData.itsNestedFunctions[i], scope, cx); createFunctionObject( (InterpretedFunction)stack[stackTop], scope, theData.itsFromEvalCode); pc += 2; break; } case TokenStream.OBJECT : { int i = getShort(iCode, pc + 1); stack[++stackTop] = theData.itsRegExpLiterals[i]; pc += 2; break; } case SOURCEFILE_ICODE : cx.interpreterSourceFile = theData.itsSourceFile; break; case LINE_ICODE : case BREAKPOINT_ICODE : { int line = getShort(iCode, pc + 1); cx.interpreterLine = line; if (debuggerFrame != null) { boolean breakpoint = ((iCode[pc] & 0xff) == BREAKPOINT_ICODE); debuggerFrame.onLineChange(cx, line, breakpoint); } pc += 2; break; } default : dumpICode(theData); throw new RuntimeException("Unknown icode : " + (iCode[pc] & 0xff) + " @ pc : " + pc); } pc++; } catch (Throwable ex) { if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } } final int SCRIPT_THROW = 0, ECMA = 1, RUNTIME = 2, OTHER = 3; int exType; Object catchObj = ex; // Object seen by script catch for (;;) { if (catchObj instanceof JavaScriptException) { catchObj = ScriptRuntime.unwrapJavaScriptException ((JavaScriptException)catchObj); exType = SCRIPT_THROW; } else if (catchObj instanceof EcmaError) { // an offical ECMA error object, catchObj = ((EcmaError)catchObj).getErrorObject(); exType = ECMA; } else if (catchObj instanceof RuntimeException) { if (catchObj instanceof WrappedException) { Object w = ((WrappedException) catchObj).unwrap(); if (w instanceof Throwable) { catchObj = (Throwable) w; continue; } } catchObj = null; // script can not catch this exType = RUNTIME; } else { // Error instance catchObj = null; // script can not catch this exType = OTHER; } break; } if (exType != OTHER && debuggerFrame != null) { debuggerFrame.onExceptionThrown(cx, ex); } boolean rethrow = true; if (exType != OTHER && tryStackTop > 0) { // Do not allow for JS to interfere with Error instances // (exType == OTHER), as they can be used to terminate // long running script --tryStackTop; int try_pc = (int)sDbl[TRY_STACK_SHFT + tryStackTop]; if (exType == SCRIPT_THROW || exType == ECMA) { // Allow JS to catch only JavaScriptException and // EcmaError int catch_pc = getTarget(iCode, try_pc + 1); if (catch_pc == try_pc) { catch_pc = 0; } if (catch_pc != 0) { // Has catch block rethrow = false; pc = catch_pc; stackTop = STACK_SHFT; stack[stackTop] = catchObj; } } if (rethrow) { int finally_pc = getTarget(iCode, try_pc + 3); if (finally_pc == try_pc + 2) { finally_pc = 0; } if (finally_pc != 0) { // has finally block rethrow = false; pc = finally_pc; stackTop = STACK_SHFT; stack[stackTop] = ex; } } } if (rethrow) { if (debuggerFrame != null) { debuggerFrame.onExit(cx, true, ex); } if (theData.itsNeedsActivation) { ScriptRuntime.popActivation(cx); } if (exType == SCRIPT_THROW) throw (JavaScriptException)ex; if (exType == ECMA || exType == RUNTIME) throw (RuntimeException)ex; throw (Error)ex; } // We caught an exception, // Notify instruction observer if necessary // and point pcPrevBranch to start of catch/finally block if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { // Note: this can throw Error cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc; // restore scope at try point scope = (Scriptable)stack[TRY_STACK_SHFT + tryStackTop]; } } if (debuggerFrame != null) { debuggerFrame.onExit(cx, false, result); } if (theData.itsNeedsActivation) { ScriptRuntime.popActivation(cx); } if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } return result; } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/1d93746ffcb379888ae92131c2c940c4a7fb10e8/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
282,
22780,
15261,
16,
1033,
8526,
833,
16,
4766,
282,
16717,
2083,
2295,
1162,
3651,
16,
4766,
282,
5294,
11599,
751,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
282,
22780,
15261,
16,
1033,
8526,
833,
16,
4766,
282,
16717,
2083,
2295,
1162,
3651,
16,
4766,
282,
5294,
11599,
751,
3... |
- ( numImage.getBounds( ).height / 2 ) + leftMargin ); | - ( numImage.getBounds( ).height / 2 ) + leftMargin ); | protected void paintFigure( Graphics graphics ) { //set /* * @TODO:Pratik maybe you can break this method into a few methods. that * might make it a little easier to read and understand. plus, * sub-classes could customize certain parts. */ setIntervalForPaint( ); double dotsPerUnit = getDPU( ); Rectangle clip = transposer.t( graphics.getClip( Rectangle.SINGLETON ) ); Rectangle figClientArea = transposer.t( getClientArea( ) ); // Use the x and width of the client area, but the y and height of the // clip as the // bounds of the area which is to be repainted. This will increase // performance as the // entire ruler will not be repainted everytime. Rectangle clippedBounds = clip; clippedBounds.x = figClientArea.x; clippedBounds.width = figClientArea.width - BORDER_WIDTH; // Paint the background if ( isOpaque( ) ) { graphics.fillRectangle( transposer.t( clippedBounds ) ); } /* * A major mark is one that goes all the way from the left edge to the * right edge of a ruler and for which a number is displayed. Determine * the minimum number of pixels that are to be left between major marks. * This will, in turn, help determine how many units are to be displayed * per major mark. A major mark should have at least enough pixels to * display the text and its padding. We take into the consideration the * max of text's width and height so that for horizontal and vertical * rulers that are of the same height, the number of units per major * mark is the same. */ int unitsPerMajorMark = (int) ( minPixelsBetweenMajorMarks / dotsPerUnit ); //unitsPerMajorMark = 20; if ( minPixelsBetweenMajorMarks % dotsPerUnit != 0.0 ) { unitsPerMajorMark++; } if ( interval > 0 ) { /* * If the client specified how many units are to be displayed per * major mark, use that. If, however, showing that many units * wouldn't leave enough room for the text, than take its smallest * multiple that would leave enough room. */ int intervalMultiple = interval; while ( intervalMultiple < unitsPerMajorMark ) { intervalMultiple += interval; } unitsPerMajorMark = intervalMultiple; } else if ( unitsPerMajorMark != 1 && unitsPerMajorMark % 2 != 0 ) { // if the number of units per major mark is calculated dynamically, // ensure that // it is an even number. unitsPerMajorMark++; } /* * divsPerMajorMark indicates the number of divisions that a major mark * should be divided into. for eg., a value of 2 would mean that a major * mark would be shown as having two parts. that means that there would * be a marker showing the beginning and end of the major marker and * another right in the middle. */ int divsPerMajorMark; if ( divisions > 0 && dotsPerUnit * unitsPerMajorMark / divisions >= minPixelsBetweenMarks ) { /* * If the client has specified the number of divisions per major * mark, use that unless it would cause the minimum space between * marks to be less than minPixelsBetweenMarks */ divsPerMajorMark = divisions; } else { /* * If the client hasn't specified the number of divisions per major * mark or the one that the client has specified is invalid, then * calculate it dynamically. This algorithm will try to display 10 * divisions per CM, and 16 per INCH. However, if that puts the * marks too close together (i.e., the space between them is less * than minPixelsBetweenMarks), then it keeps decreasing the number * of divisions by a factor of 2 until there is enough space between * them. */ divsPerMajorMark = 2; if ( getUnit( ) == RulerProvider.UNIT_CENTIMETERS ) { divsPerMajorMark = 10; } else if ( getUnit( ) == RulerProvider.UNIT_INCHES ) { divsPerMajorMark = 8; } //divsPerMajorMark = getPerMajorMark(getUnit()); while ( dotsPerUnit * unitsPerMajorMark / divsPerMajorMark < minPixelsBetweenMarks ) { divsPerMajorMark /= 2; if ( divsPerMajorMark == 0 ) { break; } } // This should never happen unless the client has specified a // minPixelsBetweenMarks that is larger than // minPixelsBetweenMajorMarks (which // is calculated using the text's size -- size of the largest number // to be // displayed). if ( divsPerMajorMark == 0 ) { divsPerMajorMark = 1; } } /* * mediumMarkerDivNum is used to determine which mark (line drawn to * indicate a point on the ruler) in a major mark will be of medium * size. If its value is 1 then every mark will be of medium size. If * its value is 5, then every 5th mark will be of medium size (the rest * being of small size). */ int mediumMarkerDivNum = 1; switch ( divsPerMajorMark ) { case 20 : case 10 : case 5 : mediumMarkerDivNum = 5; break; case 16 : case 8 : mediumMarkerDivNum = 4; break; case 4 : mediumMarkerDivNum = 2; break; case 2 : mediumMarkerDivNum = 1; } Rectangle leftRect = transposer.t( getScaleLeftSpace( ) ); int leftMargin = leftRect.y; /* * dotsPerDivision = number of pixels between each mark = number of * pixels in a division */ double dotsPerDivision = dotsPerUnit * unitsPerMajorMark / divsPerMajorMark; /* * startMark is the division/mark from which we are going to start * painting. It should be the last major mark (one for which a number is * displayed) that is before the top of the clip rectangle. */ int startMark = (int) ( ( clippedBounds.y - leftMargin ) / ( dotsPerUnit * unitsPerMajorMark ) ) * divsPerMajorMark; if ( clippedBounds.y < 0 ) { // -2 / 10 = 0, not -1. so, if the top of the clip is negative, we // need to move // the startMark back by a whole major mark. startMark -= divsPerMajorMark; } // endMark is the first non-visible mark (doesn't have to be a major // mark) that is // beyond the end of the clip region int endMark = (int) ( ( ( clippedBounds.y + clippedBounds.height - leftMargin ) / dotsPerDivision ) ) + 1; int leading = FigureUtilities.getFontMetrics( getFont( ) ).getLeading( ); Rectangle forbiddenZone = new Rectangle( ); for ( int div = startMark; div <= endMark; div++ ) { // y is the vertical position of the mark if ( leftRect.bottom( ) <= clippedBounds.bottom( ) ) { //continue; } int y = (int) ( div * dotsPerDivision ); if ( div % divsPerMajorMark == 0 ) { String num = "" + ( div / divsPerMajorMark ) * unitsPerMajorMark; //$NON-NLS-1$ if ( isHorizontal( ) ) { Dimension numSize = FigureUtilities.getStringExtents( num, getFont( ) ); /* * FigureUtilities is increasing the width reported by GC by * 1, so we remove it here. Also, if the actual width (the * one reported by the GC) is even, we want to increase it * by 1. This will ensure that when marks marks are erased * because they are too close to the number, they are erased * from both sides of that number. */ if ( numSize.width % 2 == 0 ) { numSize.width--; } Point textLocation = new Point( y - ( numSize.width / 2 ) + leftMargin, clippedBounds.x + textMargin - leading ); forbiddenZone.setLocation( textLocation ); forbiddenZone.setSize( numSize ); forbiddenZone.expand( 1, 1 ); graphics.fillRectangle( forbiddenZone ); // Uncomment the following line of code if you want to see a // line at // the exact position of the major mark // graphics.drawLine(y, clippedBounds.x, y, clippedBounds.x // + clippedBounds.width); graphics.drawText( num, textLocation ); } else { Image numImage = ImageUtilities.createRotatedImageOfString( num, getFont( ), getForegroundColor( ), getBackgroundColor( ) ); Point textLocation = new Point( clippedBounds.x + textMargin, y - ( numImage.getBounds( ).height / 2 ) + leftMargin ); forbiddenZone.setLocation( textLocation ); forbiddenZone.setSize( numImage.getBounds( ).width, numImage.getBounds( ).height ); forbiddenZone.expand( 1, 1 + ( numImage.getBounds( ).height % 2 == 0 ? 1 : 0 ) ); graphics.fillRectangle( forbiddenZone ); graphics.drawImage( numImage, textLocation ); numImage.dispose( ); } } else if ( ( div % divsPerMajorMark ) % mediumMarkerDivNum == 0 ) { // this is a medium mark, so its length should be longer than // the small marks Point start = transposer.t( new Point( ( clippedBounds.getRight( ).x - mediumMarkWidth ) / 2, y + leftMargin ) ); Point end = transposer.t( new Point( ( ( clippedBounds.getRight( ).x - mediumMarkWidth ) / 2 ) + mediumMarkWidth, y + leftMargin ) ); if ( !forbiddenZone.contains( start ) ) { graphics.drawLine( start, end ); } } else { // small mark Point start = transposer.t( new Point( ( clippedBounds.getRight( ).x - smallMarkWidth ) / 2, y + leftMargin ) ); Point end = transposer.t( new Point( ( ( clippedBounds.getRight( ).x - smallMarkWidth ) / 2 ) + smallMarkWidth, y + leftMargin ) ); if ( !forbiddenZone.contains( start ) ) { graphics.drawLine( start, end ); } } } // paint the border clippedBounds.expand( BORDER_WIDTH, 0 ); graphics.setForegroundColor( ColorConstants.buttonDarker ); graphics.drawLine( transposer.t( clippedBounds.getTopRight( ) .translate( -1, -1 ) ), transposer.t( clippedBounds.getBottomRight( ) .translate( -1, -1 ) ) ); Color c = Display.getCurrent( ) .getSystemColor( SWT.COLOR_WIDGET_BACKGROUND ); graphics.setBackgroundColor( ReportColorConstants.greyFillColor ); graphics.setBackgroundColor( c ); Rectangle rect = new Rectangle( 0, 0, clippedBounds.height, leftMargin - 2 ); rect = transposer.t( rect ); graphics.fillRectangle( rect ); graphics.fillRectangle( getEndRect( graphics.getClip( Rectangle.SINGLETON ) ) ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/61cce071e25248ce85d293e05344845aab740350/EditorRulerFigure.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/editors/rulers/EditorRulerFigure.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
12574,
42,
15906,
12,
16830,
17313,
262,
202,
95,
202,
202,
759,
542,
202,
202,
20308,
1082,
380,
632,
6241,
30,
2050,
270,
1766,
6944,
1846,
848,
898,
333,
707,
1368,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
12574,
42,
15906,
12,
16830,
17313,
262,
202,
95,
202,
202,
759,
542,
202,
202,
20308,
1082,
380,
632,
6241,
30,
2050,
270,
1766,
6944,
1846,
848,
898,
333,
707,
1368,
2... |
private void setDeliveryStatuses(List recipients, LmtpStatus status) { for (Iterator iter = recipients.iterator(); iter.hasNext();) { LmtpAddress recipient = (LmtpAddress)iter.next(); | private void setDeliveryStatuses(List<LmtpAddress> recipients, LmtpStatus status) { for (LmtpAddress recipient : recipients) | private void setDeliveryStatuses(List recipients, LmtpStatus status) { for (Iterator iter = recipients.iterator(); iter.hasNext();) { LmtpAddress recipient = (LmtpAddress)iter.next(); recipient.setDeliveryStatus(status); } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/8374021d61fdd254b7450f0f79dc266803ddfe92/ZimbraLmtpBackend.java/buggy/ZimbraServer/src/java/com/zimbra/cs/lmtpserver/ZimbraLmtpBackend.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
444,
8909,
15220,
12,
682,
12045,
16,
511,
11091,
1482,
1267,
13,
288,
3639,
364,
261,
3198,
1400,
273,
12045,
18,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
288,
5411,
511,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
8909,
15220,
12,
682,
12045,
16,
511,
11091,
1482,
1267,
13,
288,
3639,
364,
261,
3198,
1400,
273,
12045,
18,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
288,
5411,
511,
... |
showIt(MoleculeFactory.makeBicycloRings(), "Bicyclo-[2.2.2]-octane"); | showIt(MoleculeFactory.makeBicycloRings(), "Bicyclo-[2.2.2]-octane"); | public void runVisualTests() { moleculeListViewer = new MoleculeListViewer(); showIt(MoleculeFactory.loadMolecule("data/mdl/reserpine.mol"), "Reserpine"); showIt(MoleculeFactory.loadMolecule("data/mdl/four-ring-5x10.mol"), "5x10 condensed four membered rings"); showIt(MoleculeFactory.loadMolecule("data/mdl/six-ring-4x4.mol"), "4x4 condensed six membered rings"); showIt(MoleculeFactory.loadMolecule("data/mdl/polycarpol.mol"), "Polycarpol"); showIt(MoleculeFactory.makeAlphaPinene(), "alpha-Pinene"); showIt(MoleculeFactory.makeBiphenyl(), "Biphenyl"); showIt(MoleculeFactory.make4x3CondensedRings(), "4x3CondensedRings"); showIt(MoleculeFactory.makePhenylEthylBenzene(), "PhenylEthylBenzene"); showIt(MoleculeFactory.makeSpiroRings(), "Spiro"); showIt(MoleculeFactory.makeMethylDecaline(), "Methyldecaline"); showIt(MoleculeFactory.makeBranchedAliphatic(), "Branched aliphatic"); showIt(MoleculeFactory.makeDiamantane(), "Diamantane - A Problem! - Solve it! :-)"); showIt(MoleculeFactory.makeEthylCyclohexane(), "Ethylcyclohexane"); showIt(MoleculeFactory.makeBicycloRings(), "Bicyclo-[2.2.2]-octane"); } | 45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/75e11806a55fcb01f0e4d2b68215836a866dad74/StructureDiagramGeneratorTest.java/clean/src/org/openscience/cdk/test/layout/StructureDiagramGeneratorTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
25780,
14650,
1435,
202,
95,
202,
202,
81,
10545,
682,
18415,
273,
394,
490,
10545,
682,
18415,
5621,
202,
202,
4500,
7193,
12,
29669,
1733,
18,
945,
29669,
2932,
892... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
25780,
14650,
1435,
202,
95,
202,
202,
81,
10545,
682,
18415,
273,
394,
490,
10545,
682,
18415,
5621,
202,
202,
4500,
7193,
12,
29669,
1733,
18,
945,
29669,
2932,
892... |
if (targetSource.getTarget() == null) { | if (targetSource.getTarget() == unavailableService) { | public synchronized void before(Method method, Object[] args, Object target) throws Throwable { int numAttempts = 0; while (targetSource.getTarget() == null && (numAttempts++ < this.maxRetries)) { Thread.sleep(this.retryIntervalMillis); } if (targetSource.getTarget() == null) { // no luck! throw new ServiceUnavailableException( "The target OSGi service of type '" + "was unregistered " + "and no suitable replacement was found after retrying " + this.maxRetries + " times.", this.serviceType, null); } } | 54717 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54717/89d344c85ca19ee8c9cc54d87d37e73fae16b7bd/OsgiServiceInterceptor.java/buggy/spring-osgi-core/src/main/java/org/springframework/osgi/service/OsgiServiceInterceptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
1865,
12,
1305,
707,
16,
1033,
8526,
833,
16,
1033,
1018,
13,
1216,
4206,
288,
3639,
509,
818,
10113,
273,
374,
31,
3639,
1323,
261,
3299,
1830,
18,
588,
2326,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
1865,
12,
1305,
707,
16,
1033,
8526,
833,
16,
1033,
1018,
13,
1216,
4206,
288,
3639,
509,
818,
10113,
273,
374,
31,
3639,
1323,
261,
3299,
1830,
18,
588,
2326,
1435... |
private void initializeDirectives() throws Exception { /* * Initialize the runtime directive table. * This will be used for creating parsers. */ runtimeDirectives = new Hashtable(); Properties directiveProperties = new Properties(); /* * Grab the properties file with the list of directives * that we should initialize. */ InputStream inputStream = getClass().getResourceAsStream('/' + DEFAULT_RUNTIME_DIRECTIVES); if (inputStream == null) { throw new Exception("Error loading directive.properties! " + "Something is very wrong if these properties " + "aren't being located. Either your Velocity " + "distribution is incomplete or your Velocity " + "jar file is corrupted!"); } directiveProperties.load(inputStream); /* * Grab all the values of the properties. These * are all class names for example: * * org.apache.velocity.runtime.directive.Foreach */ Enumeration directiveClasses = directiveProperties.elements(); while (directiveClasses.hasMoreElements()) { String directiveClass = (String) directiveClasses.nextElement(); loadDirective( directiveClass, "System" ); } /* * now the user's directives */ String[] userdirective = configuration.getStringArray("userdirective"); for( int i = 0; i < userdirective.length; i++) { loadDirective( userdirective[i], "User"); } } | 55820 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55820/89173502837b4d67a69cd30d0b93cf47ed84c8cc/RuntimeInstance.java/buggy/src/java/org/apache/velocity/runtime/RuntimeInstance.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4046,
25343,
1435,
3639,
1216,
1185,
565,
288,
3639,
1748,
540,
380,
9190,
326,
3099,
8655,
1014,
18,
540,
380,
1220,
903,
506,
1399,
364,
4979,
14212,
18,
540,
1195,
3639,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4046,
25343,
1435,
3639,
1216,
1185,
565,
288,
3639,
1748,
540,
380,
9190,
326,
3099,
8655,
1014,
18,
540,
380,
1220,
903,
506,
1399,
364,
4979,
14212,
18,
540,
1195,
3639,
309... | ||
Link L = null; Text text = null; spacer = Table.getTransparentCell(iwc); spacer.setWidth(_widthFromIcon); subNodeImage = (Image) spacer.clone(); subNodeImage.setWidth(_subWidthFromParent); subNodeImage.setHeight(2); Image spaceBetween = (Image) spacer.clone(); spaceBetween.setHeight(_spaceBetween); | Link L = null; Text text = null; spacer = Table.getTransparentCell(iwc); spacer.setWidth(_widthFromIcon); subNodeImage = (Image) spacer.clone(); subNodeImage.setWidth(_subWidthFromParent); subNodeImage.setHeight(2); Image spaceBetween = (Image) spacer.clone(); spaceBetween.setHeight(_spaceBetween); | public void main(IWContext iwc){ setStyles(); if ( rootNode == -1 ) { rootNode = BuilderLogic.getStartPageId(iwc); } String sCurrentPageId = iwc.getParameter(com.idega.builder.business.BuilderLogic.IB_PAGE_PARAMETER); currentPageId = sCurrentPageId !=null ? Integer.parseInt(sCurrentPageId):rootNode; try { parentPageId = Integer.parseInt(iwc.getParameter("parent_id")); } catch (NumberFormatException e) { parentPageId = -1; } if ( parentPageId == -1 && _addParentID ) parentPageId = rootNode; PageTreeNode node = new PageTreeNode(rootNode, iwc); boolean bottom = !HomeVerticalAlignment.equals(VerticalAlignmentHandler.TOP); boolean left = !HomeHorizontalAlignment.equals(HorizontalAlignmentHandler.RIGHT); boolean vertical = viewType == VERTICAL; Vector nodeVector = new Vector(); if ( withRootAsHome && ((!bottom && vertical) || (!vertical && left)) ) { nodeVector.add(node); withRootAsHome = false; } Iterator iter = node.getChildren(); while (iter.hasNext()) nodeVector.add((PageTreeNode) iter.next()); if ( withRootAsHome && (bottom || !left) ) nodeVector.add(node); int row = 1,col = 1; Table T = new Table(); T.setCellpadding(cellPadding); T.setCellspacing(cellSpacing); if(tableBackGroundColor !=null) T.setColor(tableBackGroundColor); if(width != null) T.setWidth(width); if(height != null) T.setHeight(height); Link L = null; Text text = null; spacer = Table.getTransparentCell(iwc); spacer.setWidth(_widthFromIcon); subNodeImage = (Image) spacer.clone(); subNodeImage.setWidth(_subWidthFromParent); subNodeImage.setHeight(2); Image spaceBetween = (Image) spacer.clone(); spaceBetween.setHeight(_spaceBetween); Iterator iterator = nodeVector.iterator(); while (iterator.hasNext()) { PageTreeNode n = (PageTreeNode) iterator.next(); L = getLink(n.getNodeName(),n.getNodeID(),rootNode,_addParentID,false); if ( _iconImage != null ) { Image image = new Image(_iconImage.getMediaURL(iwc)); if ( _iconOverImage != null ) L.setOnMouseOverImage(image,_iconOverImage); T.add(image,col,row); T.add(spacer,col,row); if(!vertical) col++; } if ( !vertical ) T.add(L,col++,row); else { T.mergeCells(col,row,col+1,row); T.add(L,col,row++); if ( _showAllSubPages ) { if ( n.getNodeID() != rootNode ) row = addSubLinks(iwc,T,col,row,L,n); } else { if ( _showSubPages && (n.getNodeID() == currentPageId || n.getNodeID() == parentPageId) && n.getNodeID() != rootNode ) { row = addSubLinks(iwc,T,col,row,L,n); } } } if ( _spacer != null && iterator.hasNext() ) { if ( !vertical ) T.add(_spacer,col++,row); else T.add(_spacer,col,row++); } if ( _spaceBetween > 0 && vertical ) { T.add(spaceBetween,col,row++); } } add(T); } | 14023 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14023/7261eb3396a1a3ff74ff75fa83c39e16bbd58ed2/NavigationMenu.java/clean/src/java/com/idega/block/navigation/presentation/NavigationMenu.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2774,
12,
45,
59,
1042,
25522,
71,
15329,
565,
444,
9725,
5621,
565,
309,
261,
10181,
422,
300,
21,
262,
288,
1377,
10181,
273,
5008,
20556,
18,
588,
1685,
23053,
12,
22315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2774,
12,
45,
59,
1042,
25522,
71,
15329,
565,
444,
9725,
5621,
565,
309,
261,
10181,
422,
300,
21,
262,
288,
1377,
10181,
273,
5008,
20556,
18,
588,
1685,
23053,
12,
22315,
... |
private boolean contextInfoPopupKeyPressed(KeyEvent e) { char key= e.character; if (key == 0) { switch (e.keyCode) { case SWT.ARROW_LEFT: case SWT.ARROW_RIGHT: validateContextInformation(); break; case SWT.CTRL: case SWT.SHIFT: break; default: hideContextInfoPopup(); break; } } else if (key == 0x1B) { // Terminate on Esc hideContextInfoPopup(); } else { validateContextInformation(); } return true; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e3525decbb08952546a48571c4b3f6f6fb530f8a/ContextInformationPopup.java/clean/bundles/org.eclipse.ui/Eclipse JFace Text/org/eclipse/jface/text/contentassist/ContextInformationPopup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
819,
966,
13770,
653,
24624,
12,
653,
1133,
425,
13,
288,
202,
202,
3001,
498,
33,
425,
18,
11560,
31,
202,
202,
430,
261,
856,
422,
374,
13,
288,
25083,
202,
9610,
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,
1152,
1250,
819,
966,
13770,
653,
24624,
12,
653,
1133,
425,
13,
288,
202,
202,
3001,
498,
33,
425,
18,
11560,
31,
202,
202,
430,
261,
856,
422,
374,
13,
288,
25083,
202,
9610,
2... | ||
setLocationRelativeTo(view); | GUIUtilities.loadGeometry(this,name); | public OptionsDialog(View view) { super(view, jEdit.getProperty("options.title"), true); view.showWaitCursor(); JPanel content = new JPanel(new BorderLayout(12,12)); content.setBorder(new EmptyBorder(12,12,12,12)); setContentPane(content); JPanel stage = new JPanel(new BorderLayout(6,6)); // currentLabel displays the path of the currently selected // OptionPane at the top of the stage area currentLabel = new JLabel(); currentLabel.setHorizontalAlignment(JLabel.LEFT); stage.add(currentLabel, BorderLayout.NORTH); cardPanel = new JPanel(new CardLayout()); stage.add(cardPanel, BorderLayout.CENTER); paneTree = new JTree(createOptionTreeModel()); paneTree.setCellRenderer(new PaneNameRenderer()); // looks bad with the OS X L&F, apparently... if(!OperatingSystem.isMacOSLF()) paneTree.putClientProperty("JTree.lineStyle", "Angled"); paneTree.setShowsRootHandles(true); paneTree.setRootVisible(false); JSplitPane splitter = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(paneTree, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED), stage); content.add(splitter, BorderLayout.CENTER); Box buttons = new Box(BoxLayout.X_AXIS); buttons.add(Box.createGlue()); ok = new JButton(jEdit.getProperty("common.ok")); ok.addActionListener(this); buttons.add(ok); buttons.add(Box.createHorizontalStrut(6)); getRootPane().setDefaultButton(ok); cancel = new JButton(jEdit.getProperty("common.cancel")); cancel.addActionListener(this); buttons.add(cancel); buttons.add(Box.createHorizontalStrut(6)); apply = new JButton(jEdit.getProperty("common.apply")); apply.addActionListener(this); buttons.add(apply); buttons.add(Box.createGlue()); content.add(buttons, BorderLayout.SOUTH); // register the Options dialog as a TreeSelectionListener. // this is done before the initial selection to ensure that the // first selected OptionPane is displayed on startup. paneTree.getSelectionModel().addTreeSelectionListener(this); paneTree.expandPath(new TreePath( new Object[] { paneTree.getModel().getRoot(), jEditGroup })); paneTree.expandPath(new TreePath( new Object[] { paneTree.getModel().getRoot(), pluginsGroup })); paneTree.setSelectionRow(0); view.hideWaitCursor(); pack(); setLocationRelativeTo(view); show(); } | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/50dba43c034792706c94f0d701351f497e2ce540/OptionsDialog.java/buggy/org/gjt/sp/jedit/gui/OptionsDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5087,
6353,
12,
1767,
1476,
13,
202,
95,
202,
202,
9565,
12,
1945,
16,
525,
4666,
18,
588,
1396,
2932,
2116,
18,
2649,
6,
3631,
638,
1769,
202,
202,
1945,
18,
4500,
5480,
66... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5087,
6353,
12,
1767,
1476,
13,
202,
95,
202,
202,
9565,
12,
1945,
16,
525,
4666,
18,
588,
1396,
2932,
2116,
18,
2649,
6,
3631,
638,
1769,
202,
202,
1945,
18,
4500,
5480,
66... |
private CaseBusiness getCaseBusiness(IWApplicationContext iwac) { | protected CaseBusiness getCaseBusiness(IWApplicationContext iwac) { | private CaseBusiness getCaseBusiness(IWApplicationContext iwac) { try { return (CaseBusiness) IBOLookup.getServiceInstance(iwac, CaseBusiness.class); } catch (IBOLookupException ile) { throw new IBORuntimeException(ile); } } | 57002 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57002/3b4fd98eccca0d445b86155e475e303aa53bb164/CaseBlock.java/buggy/src/java/com/idega/block/process/presentation/CaseBlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
12605,
13423,
1927,
448,
13423,
12,
45,
59,
28278,
25522,
1077,
13,
288,
202,
202,
698,
288,
1082,
202,
2463,
261,
2449,
13423,
13,
23450,
1741,
4909,
18,
588,
29652,
12,
22315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12605,
13423,
1927,
448,
13423,
12,
45,
59,
28278,
25522,
1077,
13,
288,
202,
202,
698,
288,
1082,
202,
2463,
261,
2449,
13423,
13,
23450,
1741,
4909,
18,
588,
29652,
12,
22315... |
assertTrue("Did not convert epoch to GMT string correctly", new Date(0) .toGMTString().equals("1 Jan 1970 00:00:00 GMT")); assertTrue("Did not convert epoch + 1yr to GMT string correctly", new Date((long) 365 * 24 * 60 * 60 * 1000).toGMTString() .equals("1 Jan 1971 00:00:00 GMT")); | assertEquals("Did not convert epoch to GMT string correctly", "1 Jan 1970 00:00:00 GMT", new Date(0) .toGMTString()); assertEquals("Did not convert epoch + 1yr to GMT string correctly", "1 Jan 1971 00:00:00 GMT", new Date((long) 365 * 24 * 60 * 60 * 1000).toGMTString() ); | public void test_toGMTString() { // Test for method java.lang.String java.util.Date.toGMTString() assertTrue("Did not convert epoch to GMT string correctly", new Date(0) .toGMTString().equals("1 Jan 1970 00:00:00 GMT")); assertTrue("Did not convert epoch + 1yr to GMT string correctly", new Date((long) 365 * 24 * 60 * 60 * 1000).toGMTString() .equals("1 Jan 1971 00:00:00 GMT")); } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/181e940cd92dfff67639d98e991206d375a987ea/DateTest.java/clean/modules/luni/src/test/java/tests/api/java/util/DateTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
67,
869,
25315,
780,
1435,
288,
202,
202,
759,
7766,
364,
707,
2252,
18,
4936,
18,
780,
2252,
18,
1367,
18,
1626,
18,
869,
25315,
780,
1435,
202,
202,
11231,
5510,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
67,
869,
25315,
780,
1435,
288,
202,
202,
759,
7766,
364,
707,
2252,
18,
4936,
18,
780,
2252,
18,
1367,
18,
1626,
18,
869,
25315,
780,
1435,
202,
202,
11231,
5510,
... |
if (idata.itsNeedsActivation || debuggerFrame != null) { | if (idata.itsNeedsActivation || useActivationVars) { | static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, double[] argsDbl, int argShift, int argCount, NativeFunction fnOrScript, InterpreterData idata) throws JavaScriptException { if (cx.interpreterSecurityDomain != idata.securityDomain) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); } SecurityController sc = idata.securityController; Object savedDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = idata.securityDomain; try { return sc.callWithDomain(idata.securityDomain, cx, fnOrScript, scope, thisObj, args); } finally { cx.interpreterSecurityDomain = savedDomain; } } final Object DBL_MRK = Interpreter.DBL_MRK; final Scriptable undefined = Undefined.instance; final int LOCAL_SHFT = idata.itsMaxVars; final int STACK_SHFT = LOCAL_SHFT + idata.itsMaxLocals;// stack[0 <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_STACK_SHFT]: used for local temporaries// stack[STACK_SHFT <= i < STACK_SHFT + idata.itsMaxStack]: stack data// sDbl[i]: if stack[i] is DBL_MRK, sDbl[i] holds the number value int maxFrameArray = idata.itsMaxFrameArray; if (maxFrameArray != STACK_SHFT + idata.itsMaxStack) Kit.codeBug(); Object[] stack = new Object[maxFrameArray]; double[] sDbl = new double[maxFrameArray]; int stackTop = STACK_SHFT - 1; int withDepth = 0; int definedArgs = fnOrScript.argCount; if (definedArgs > argCount) { definedArgs = argCount; } for (int i = 0; i != definedArgs; ++i) { Object arg = args[argShift + i]; stack[i] = arg; if (arg == DBL_MRK) { sDbl[i] = argsDbl[argShift + i]; } } for (int i = definedArgs; i != idata.itsMaxVars; ++i) { stack[i] = undefined; } DebugFrame debuggerFrame = null; if (cx.debugger != null) { debuggerFrame = cx.debugger.getFrame(cx, idata); } if (idata.itsFunctionType != 0) { InterpretedFunction f = (InterpretedFunction)fnOrScript; if (!idata.useDynamicScope) { scope = fnOrScript.getParentScope(); } if (idata.itsCheckThis) { thisObj = ScriptRuntime.getThis(thisObj); } if (idata.itsNeedsActivation) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } scope = ScriptRuntime.enterActivationFunction(cx, scope, fnOrScript, thisObj, args); } } else { scope = ScriptRuntime.enterScript(cx, scope, fnOrScript, thisObj); } if (idata.itsNestedFunctions != null) { if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) Kit.codeBug(); for (int i = 0; i < idata.itsNestedFunctions.length; i++) { InterpreterData fdata = idata.itsNestedFunctions[i]; if (fdata.itsFunctionType == FunctionNode.FUNCTION_STATEMENT) { createFunction(cx, scope, fdata, idata.itsFromEvalCode); } } } // Wrapped regexps for functions are stored in InterpretedFunction // but for script which should not contain references to scope // the regexps re-wrapped during each script execution Scriptable[] scriptRegExps = null; boolean useActivationVars = false; if (debuggerFrame != null) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) { useActivationVars = true; scope = ScriptRuntime.enterActivationFunction(cx, scope, fnOrScript, thisObj, args); } debuggerFrame.onEnter(cx, scope, thisObj, args); } InterpreterData savedData = cx.interpreterData; cx.interpreterData = idata; cx.interpreterLineIndex = idata.firstLinePC; Object result = undefined; // If javaException != null on exit, it will be throw instead of // normal return Throwable javaException = null; int exceptionPC = -1; byte[] iCode = idata.itsICode; int pc = 0; int pcPrevBranch = 0; final boolean instructionCounting = (cx.instructionThreshold != 0); // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; String[] strings = idata.itsStringTable; String stringReg = null; int indexReg = 0; Loop: for (;;) { try { int op = iCode[pc++]; jumplessRun: { // Back indent to ease imlementation readingswitch (op) { case Icode_CATCH: { // The following code should be executed inside try/catch inside main // loop, not in the loop catch block itself to deal with exceptions // from observeInstructionCount. A special bytecode is used only to // simplify logic. if (javaException == null) Kit.codeBug(); pc = -1; boolean doCatch = false; int handlerOffset = getExceptionHandler(idata.itsExceptionTable, exceptionPC); if (handlerOffset >= 0) { final int SCRIPT_CAN_CATCH = 0, ONLY_FINALLY = 1, OTHER = 2; int exType; if (javaException instanceof JavaScriptException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EcmaError) { // an offical ECMA error object, exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EvaluatorException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof RuntimeException) { exType = ONLY_FINALLY; } else { // Error instance exType = OTHER; } if (exType != OTHER) { // Do not allow for JS to interfere with Error instances // (exType == OTHER), as they can be used to terminate // long running script if (exType == SCRIPT_CAN_CATCH) { // Allow JS to catch only JavaScriptException and // EcmaError pc = idata.itsExceptionTable[handlerOffset + EXCEPTION_CATCH_SLOT]; if (pc >= 0) { // Has catch block doCatch = true; } } if (pc < 0) { pc = idata.itsExceptionTable[handlerOffset + EXCEPTION_FINALLY_SLOT]; } } } if (debuggerFrame != null && !(javaException instanceof Error)) { debuggerFrame.onExceptionThrown(cx, javaException); } if (pc < 0) { break Loop; } // We caught an exception // restore scope at try point int tryWithDepth = idata.itsExceptionTable[ handlerOffset + EXCEPTION_WITH_DEPTH_SLOT]; while (tryWithDepth != withDepth) { if (scope == null) Kit.codeBug(); scope = ScriptRuntime.leaveWith(scope); --withDepth; } if (doCatch) { stackTop = STACK_SHFT - 1; int exLocal = idata.itsExceptionTable[ handlerOffset + EXCEPTION_LOCAL_SLOT]; stack[LOCAL_SHFT + exLocal] = ScriptRuntime.getCatchObject( cx, scope, javaException); } else { stackTop = STACK_SHFT; // Call finally handler with javaException on stack top to // distinguish from normal invocation through GOSUB // which would contain DBL_MRK on the stack stack[stackTop] = javaException; } // clear exception javaException = null; if (instructionCounting) { // 500: catch cost cx.addInstructionCount(500); pcPrevBranch = pc; } continue Loop; } case Token.THROW: { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int sourceLine = getShort(iCode, pc); throw new JavaScriptException(value, idata.itsSourceFile, sourceLine); } case Token.GE : case Token.LE : case Token.GT : case Token.LT : stackTop = do_cmp(stack, sDbl, stackTop, op); continue Loop; case Token.IN : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.in(lhs, rhs, cx, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.INSTANCEOF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.instanceOf(lhs, rhs, cx, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.EQ : case Token.NE : stackTop = do_eq(stack, sDbl, stackTop, op); continue Loop; case Token.SHEQ : case Token.SHNE : stackTop = do_sheq(stack, sDbl, stackTop, op); continue Loop; case Token.IFNE : if (stack_boolean(stack, sDbl, stackTop--)) { pc += 2; continue Loop; } break jumplessRun; case Token.IFEQ : if (!stack_boolean(stack, sDbl, stackTop--)) { pc += 2; continue Loop; } break jumplessRun; case Icode_IFEQ_POP : if (!stack_boolean(stack, sDbl, stackTop--)) { pc += 2; continue Loop; } stack[stackTop--] = null; break jumplessRun; case Token.GOTO : break jumplessRun; case Icode_GOSUB : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = pc + 2; break jumplessRun; case Icode_RETSUB : { // indexReg: local to store return address if (instructionCounting) { cx.addInstructionCount(pc - pcPrevBranch); } Object value = stack[LOCAL_SHFT + indexReg]; if (value != DBL_MRK) { // Invocation from exception handler, restore object to rethrow javaException = (Throwable)value; exceptionPC = pc - 1; pc = getJavaCatchPC(iCode); } else { // Normal return from GOSUB pc = (int)sDbl[LOCAL_SHFT + indexReg]; pcPrevBranch = pc; } continue Loop; } case Icode_POP : stack[stackTop] = null; stackTop--; continue Loop; case Icode_POP_RESULT : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); stack[stackTop] = null; --stackTop; continue Loop; case Icode_DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; continue Loop; case Icode_DUP2 : stack[stackTop + 1] = stack[stackTop - 1]; sDbl[stackTop + 1] = sDbl[stackTop - 1]; stack[stackTop + 2] = stack[stackTop]; sDbl[stackTop + 2] = sDbl[stackTop]; stackTop += 2; continue Loop; case Icode_SWAP : { Object o = stack[stackTop]; stack[stackTop] = stack[stackTop - 1]; stack[stackTop - 1] = o; double d = sDbl[stackTop]; sDbl[stackTop] = sDbl[stackTop - 1]; sDbl[stackTop - 1] = d; continue Loop; } case Token.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break Loop; case Token.RETURN_RESULT : break Loop; case Icode_RETUNDEF : result = undefined; break Loop; case Token.BITNOT : { int rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; continue Loop; } case Token.BITAND : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; continue Loop; } case Token.BITOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; continue Loop; } case Token.BITXOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; continue Loop; } case Token.LSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; continue Loop; } case Token.RSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; continue Loop; } case Token.URSH : { int rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; continue Loop; } case Token.NEG : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; continue Loop; } case Token.POS : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; continue Loop; } case Token.ADD : stackTop = do_add(stack, sDbl, stackTop, cx); continue Loop; case Token.SUB : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; continue Loop; } case Token.MUL : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; continue Loop; } case Token.DIV : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; continue Loop; } case Token.MOD : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; continue Loop; } case Token.NOT : stack[stackTop] = stack_boolean(stack, sDbl, stackTop) ? Boolean.FALSE : Boolean.TRUE; continue Loop; case Token.BINDNAME : stack[++stackTop] = ScriptRuntime.bind(cx, scope, stringReg); continue Loop; case Token.SETNAME : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.setName(lhs, rhs, cx, stringReg); continue Loop; } case Token.DELPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(cx, scope, lhs, rhs); continue Loop; } case Token.GETPROP : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getObjectProp(lhs, stringReg, cx, scope); continue Loop; } case Token.SETPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setObjectProp(lhs, stringReg, rhs, cx, scope); continue Loop; } case Icode_PROP_INC_DEC : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.propIncrDecr(lhs, stringReg, scope, iCode[pc]); ++pc; continue Loop; } case Token.GETELEM : stackTop = do_getElem(stack, sDbl, stackTop, cx, scope); continue Loop; case Token.SETELEM : stackTop = do_setElem(stack, sDbl, stackTop, cx, scope); continue Loop; case Icode_ELEM_INC_DEC: { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.elemIncrDecr(lhs, rhs, cx, scope, iCode[pc]); ++pc; continue Loop; } case Token.GET_REF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getReference(lhs); continue Loop; } case Token.SET_REF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setReference(lhs, rhs); continue Loop; } case Token.DEL_REF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.deleteReference(lhs); continue Loop; } case Icode_REF_INC_DEC : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.referenceIncrDecr(lhs, iCode[pc]); ++pc; continue Loop; } case Token.LOCAL_SAVE : stack[LOCAL_SHFT + indexReg] = stack[stackTop]; sDbl[LOCAL_SHFT + indexReg] = sDbl[stackTop]; --stackTop; continue Loop; case Token.LOCAL_LOAD : ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + indexReg]; sDbl[stackTop] = sDbl[LOCAL_SHFT + indexReg]; continue Loop; case Icode_NAME_AND_THIS : // stringReg: name ++stackTop; stack[stackTop] = ScriptRuntime.getNameFunctionAndThis(stringReg, cx, scope); ++stackTop; stack[stackTop] = ScriptRuntime.lastStoredScriptable(cx); continue Loop; case Icode_PROP_AND_THIS: { Object obj = stack[stackTop]; if (obj == DBL_MRK) obj = doubleWrap(sDbl[stackTop]); // stringReg: property stack[stackTop] = ScriptRuntime.getPropFunctionAndThis(obj, stringReg, cx, scope); ++stackTop; stack[stackTop] = ScriptRuntime.lastStoredScriptable(cx); continue Loop; } case Icode_ELEM_AND_THIS: { Object obj = stack[stackTop - 1]; if (obj == DBL_MRK) obj = doubleWrap(sDbl[stackTop - 1]); Object id = stack[stackTop]; if (id == DBL_MRK) id = doubleWrap(sDbl[stackTop]); stack[stackTop - 1] = ScriptRuntime.getElemFunctionAndThis(obj, id, cx, scope); stack[stackTop] = ScriptRuntime.lastStoredScriptable(cx); continue Loop; } case Icode_VALUE_AND_THIS : { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getValueFunctionAndThis(value, cx); ++stackTop; stack[stackTop] = ScriptRuntime.lastStoredScriptable(cx); continue Loop; } case Icode_CALLSPECIAL : { if (instructionCounting) { cx.instructionCount += INVOCATION_COST; } // indexReg: number of arguments int callType = iCode[pc] & 0xFF; boolean isNew = (iCode[pc + 1] != 0); int sourceLine = getShort(iCode, pc + 2); stackTop -= indexReg; Object[] outArgs = getArgsArray(stack, sDbl, stackTop + 1, indexReg); if (isNew) { Object function = stack[stackTop]; if (function == DBL_MRK) function = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.newSpecial( cx, function, outArgs, scope, callType); } else { // Call code generation ensure that stack here // is ... Function Scriptable Scriptable functionThis = (Scriptable)stack[stackTop]; --stackTop; Function function = (Function)stack[stackTop]; stack[stackTop] = ScriptRuntime.callSpecial( cx, function, functionThis, outArgs, scope, thisObj, callType, idata.itsSourceFile, sourceLine); } pc += 4; continue Loop; } case Token.CALL : { if (instructionCounting) { cx.instructionCount += INVOCATION_COST; } // indexReg: number of arguments stackTop -= indexReg; int calleeArgShft = stackTop + 1; // CALL generation ensures that funThisObj and fun // are already Scriptable and Function objects respectively Scriptable funThisObj = (Scriptable)stack[stackTop]; --stackTop; Function fun = (Function)stack[stackTop]; Scriptable funScope = scope; if (idata.itsNeedsActivation) { funScope = ScriptableObject.getTopLevelScope(scope); } if (fun instanceof InterpretedFunction) { // Inlining of InterpretedFunction.call not to create // argument array InterpretedFunction ifun = (InterpretedFunction)fun; stack[stackTop] = interpret(cx, funScope, funThisObj, stack, sDbl, calleeArgShft, indexReg, ifun, ifun.itsData); } else { Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, indexReg); stack[stackTop] = fun.call(cx, funScope, funThisObj, outArgs); } continue Loop; } case Token.REF_CALL : { if (instructionCounting) { cx.instructionCount += INVOCATION_COST; } // indexReg: number of arguments stackTop -= indexReg; int calleeArgShft = stackTop + 1; // REF_CALL generation ensures that funThisObj and fun // are already Scriptable and Function objects respectively Scriptable funThisObj = (Scriptable)stack[stackTop]; --stackTop; Function fun = (Function)stack[stackTop]; Scriptable funScope = scope; if (idata.itsNeedsActivation) { funScope = ScriptableObject.getTopLevelScope(scope); } Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, indexReg); stack[stackTop] = ScriptRuntime.referenceCall(fun, funThisObj, outArgs, cx, funScope); continue Loop; } case Token.NEW : { if (instructionCounting) { cx.instructionCount += INVOCATION_COST; } // indexReg: number of arguments stackTop -= indexReg; int calleeArgShft = stackTop + 1; Object lhs = stack[stackTop]; if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.construct not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; Scriptable newInstance = f.createObject(cx, scope); Object callResult = interpret(cx, scope, newInstance, stack, sDbl, calleeArgShft, indexReg, f, f.itsData); if (callResult instanceof Scriptable && callResult != undefined) { stack[stackTop] = callResult; } else { stack[stackTop] = newInstance; } } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, indexReg); stack[stackTop] = f.construct(cx, scope, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); throw notAFunction(lhs, idata, pc); } pc += 2; // skip debug name index continue Loop; } case Token.TYPEOF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); continue Loop; } case Icode_TYPEOFNAME : stack[++stackTop] = ScriptRuntime.typeofName(scope, stringReg); continue Loop; case Token.STRING : stack[++stackTop] = stringReg; continue Loop; case Icode_SHORTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc); pc += 2; continue Loop; case Icode_INTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc); pc += 4; continue Loop; case Token.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = idata.itsDoubleTable[indexReg]; continue Loop; case Token.NAME : stack[++stackTop] = ScriptRuntime.name(cx, scope, stringReg); continue Loop; case Icode_NAME_INC_DEC : stack[++stackTop] = ScriptRuntime.nameIncrDecr(scope, stringReg, iCode[pc]); ++pc; continue Loop; case Icode_SETVAR1: indexReg = iCode[pc++]; // fallthrough case Token.SETVAR : if (!useActivationVars) { stack[indexReg] = stack[stackTop]; sDbl[indexReg] = sDbl[stackTop]; } else { Object val = stack[stackTop]; if (val == DBL_MRK) val = doubleWrap(sDbl[stackTop]); activationPut(fnOrScript, scope, indexReg, val); } continue Loop; case Icode_GETVAR1: indexReg = iCode[pc++]; // fallthrough case Token.GETVAR : ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[indexReg]; sDbl[stackTop] = sDbl[indexReg]; } else { stack[stackTop] = activationGet(fnOrScript, scope, indexReg); } continue Loop; case Icode_VAR_INC_DEC : { // indexReg : varindex ++stackTop; int incrDecrMask = iCode[pc]; if (!useActivationVars) { stack[stackTop] = DBL_MRK; Object varValue = stack[indexReg]; double d; if (varValue == DBL_MRK) { d = sDbl[indexReg]; } else { d = ScriptRuntime.toNumber(varValue); stack[indexReg] = DBL_MRK; } double d2 = ((incrDecrMask & Node.DECR_FLAG) == 0) ? d + 1.0 : d - 1.0; sDbl[indexReg] = d2; sDbl[stackTop] = ((incrDecrMask & Node.POST_FLAG) == 0) ? d2 : d; } else { String varName = fnOrScript.argNames[indexReg]; stack[stackTop] = ScriptRuntime.nameIncrDecr(scope, varName, incrDecrMask); } ++pc; continue Loop; } case Icode_ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; continue Loop; case Icode_ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; continue Loop; case Token.NULL : stack[++stackTop] = null; continue Loop; case Token.THIS : stack[++stackTop] = thisObj; continue Loop; case Token.THISFN : stack[++stackTop] = fnOrScript; continue Loop; case Token.FALSE : stack[++stackTop] = Boolean.FALSE; continue Loop; case Token.TRUE : stack[++stackTop] = Boolean.TRUE; continue Loop; case Icode_UNDEF : stack[++stackTop] = undefined; continue Loop; case Token.ENTERWITH : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); ++withDepth; continue Loop; } case Token.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); --withDepth; continue Loop; case Token.CATCH_SCOPE : stack[stackTop] = ScriptRuntime.newCatchScope(stringReg, stack[stackTop]); continue Loop; case Token.ENUM_INIT_KEYS : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + indexReg] = ScriptRuntime.enumInit(lhs, scope); continue Loop; } case Token.ENUM_INIT_VALUES : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + indexReg] = ScriptRuntime.enumValuesInit(lhs, scope); continue Loop; } case Token.ENUM_NEXT : case Token.ENUM_ID : { Object val = stack[LOCAL_SHFT + indexReg]; ++stackTop; stack[stackTop] = (op == Token.ENUM_NEXT) ? (Object)ScriptRuntime.enumNext(val) : (Object)ScriptRuntime.enumId(val, cx); continue Loop; } case Token.SPECIAL_REF : { //stringReg: name of special property Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.specialReference(lhs, stringReg, cx, scope); continue Loop; } case Token.XML_REF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.xmlReference(lhs, cx, scope); continue Loop; } case Token.GENERIC_REF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.genericReference(lhs, cx, scope); continue Loop; } case Icode_SCOPE : stack[++stackTop] = scope; continue Loop; case Icode_CLOSURE_EXPR : { InterpreterData closureData = idata.itsNestedFunctions[indexReg]; stack[++stackTop] = createFunction(cx, scope, closureData, idata.itsFromEvalCode); continue Loop; } case Icode_CLOSURE_STMT : { InterpreterData closureData = idata.itsNestedFunctions[indexReg]; createFunction(cx, scope, closureData, idata.itsFromEvalCode); continue Loop; } case Token.REGEXP : { Scriptable regexp; if (idata.itsFunctionType != 0) { regexp = ((InterpretedFunction)fnOrScript).itsRegExps[indexReg]; } else { if (scriptRegExps == null) { scriptRegExps = wrapRegExps(cx, scope, idata); } regexp = scriptRegExps[indexReg]; } stack[++stackTop] = regexp; continue Loop; } case Icode_LITERAL_NEW : // indexReg: number of values in the literal ++stackTop; stack[stackTop] = new Object[indexReg]; sDbl[stackTop] = 0; continue Loop; case Icode_LITERAL_SET : { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int i = (int)sDbl[stackTop]; ((Object[])stack[stackTop])[i] = value; sDbl[stackTop] = i + 1; continue Loop; } case Token.ARRAYLIT : case Icode_SPARE_ARRAYLIT : case Token.OBJECTLIT : { Object[] data = (Object[])stack[stackTop]; Object val; if (op == Token.OBJECTLIT) { Object[] ids = (Object[])idata.literalIds[indexReg]; val = ScriptRuntime.newObjectLiteral(ids, data, cx, scope); } else { int[] skipIndexces = null; if (op == Icode_SPARE_ARRAYLIT) { skipIndexces = (int[])idata.literalIds[indexReg]; } val = ScriptRuntime.newArrayLiteral(data, skipIndexces, cx, scope); } stack[stackTop] = val; continue Loop; } case Icode_ENTERDQ : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterDotQuery(lhs, scope); ++withDepth; continue Loop; } case Icode_LEAVEDQ : { boolean valBln = stack_boolean(stack, sDbl, stackTop); Object x = ScriptRuntime.updateDotQuery(valBln, scope); if (x != null) { stack[stackTop] = x; scope = ScriptRuntime.leaveDotQuery(scope); --withDepth; pc += 2; continue Loop; } // reset stack and PC to code after ENTERDQ --stackTop; break jumplessRun; } case Token.DEFAULTNAMESPACE : { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setDefaultNamespace(value, cx); continue Loop; } case Token.ESCXMLATTR : { Object value = stack[stackTop]; if (value != DBL_MRK) { stack[stackTop] = ScriptRuntime.escapeAttributeValue(value, cx); } continue Loop; } case Token.ESCXMLTEXT : { Object value = stack[stackTop]; if (value != DBL_MRK) { stack[stackTop] = ScriptRuntime.escapeTextValue(value, cx); } continue Loop; } case Token.TOATTRNAME : { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.toAttributeName(value, cx); continue Loop; } case Token.DESCENDANTS : { Object value = stack[stackTop]; if(value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.toDescendantsName(value, cx); continue Loop; } case Token.COLONCOLON : { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); // stringReg contains namespace stack[stackTop] = ScriptRuntime.toQualifiedName(stringReg, value, cx, scope); continue Loop; } case Icode_LINE : cx.interpreterLineIndex = pc; if (debuggerFrame != null) { int line = getShort(iCode, pc); debuggerFrame.onLineChange(cx, line); } pc += 2; continue Loop; case Icode_REG_IND_C0: indexReg = 0; continue Loop; case Icode_REG_IND_C1: indexReg = 1; continue Loop; case Icode_REG_IND_C2: indexReg = 2; continue Loop; case Icode_REG_IND_C3: indexReg = 3; continue Loop; case Icode_REG_IND_C4: indexReg = 4; continue Loop; case Icode_REG_IND_C5: indexReg = 5; continue Loop; case Icode_REG_IND1: indexReg = 0xFF & iCode[pc]; ++pc; continue Loop; case Icode_REG_IND2: indexReg = getIndex(iCode, pc); pc += 2; continue Loop; case Icode_REG_IND4: indexReg = getInt(iCode, pc); pc += 4; continue Loop; case Icode_REG_STR_C0: stringReg = strings[0]; continue Loop; case Icode_REG_STR_C1: stringReg = strings[1]; continue Loop; case Icode_REG_STR_C2: stringReg = strings[2]; continue Loop; case Icode_REG_STR_C3: stringReg = strings[3]; continue Loop; case Icode_REG_STR1: stringReg = strings[0xFF & iCode[pc]]; ++pc; continue Loop; case Icode_REG_STR2: stringReg = strings[getIndex(iCode, pc)]; pc += 2; continue Loop; case Icode_REG_STR4: stringReg = strings[getInt(iCode, pc)]; pc += 4; continue Loop; default : dumpICode(idata); throw new RuntimeException("Unknown icode : "+op+" @ pc : "+(pc-1));} // end of interpreter switch } // end of jumplessRun label block // This should be reachable only for jump implementation // when pc points to encoded target offset if (instructionCounting) { cx.addInstructionCount(pc + 2 - pcPrevBranch); } int offset = getShort(iCode, pc); if (offset != 0) { // -1 accounts for pc pointing to jump opcode + 1 pc += offset - 1; } else { pc = idata.longJumps.getExistingInt(pc); } pcPrevBranch = pc; continue Loop; } // end of interpreter try catch (Throwable ex) { if (instructionCounting) { // Can not call addInstructionCount as it may trigger // exception cx.instructionCount += pc - pcPrevBranch; } javaException = ex; exceptionPC = pc - 1; pc = getJavaCatchPC(iCode); continue Loop; } } // end of interpreter loop cx.interpreterData = savedData; if (debuggerFrame != null) { if (javaException != null) { debuggerFrame.onExit(cx, true, javaException); } else { debuggerFrame.onExit(cx, false, result); } } if (idata.itsFunctionType != 0) { if (idata.itsNeedsActivation || debuggerFrame != null) { ScriptRuntime.exitActivationFunction(cx); } } else { ScriptRuntime.exitScript(cx); } if (javaException != null) { if (javaException instanceof RuntimeException) { throw (RuntimeException)javaException; } else { // Must be instance of Error or code bug throw (Error)javaException; } } return result; } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/81605cfd95070f6af92b065f7488da2f048e67e8/Interpreter.java/clean/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701... |
mod.setRubyClass((RubyModule) recv); ruby.getClasses().getModuleClass().callInit(null); | mod.setRubyClass((RubyModule) recv); ruby.getClasses().getModuleClass().callInit(null); | public static RubyModule m_new(Ruby ruby, RubyObject recv) { RubyModule mod = RubyModule.m_newModule(ruby); mod.setRubyClass((RubyModule) recv); ruby.getClasses().getModuleClass().callInit(null); return mod; } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/clean/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
19817,
3120,
312,
67,
2704,
12,
54,
10340,
22155,
16,
19817,
921,
10665,
13,
288,
202,
202,
54,
10340,
3120,
681,
273,
19817,
3120,
18,
81,
67,
2704,
3120,
12,
27768,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19817,
3120,
312,
67,
2704,
12,
54,
10340,
22155,
16,
19817,
921,
10665,
13,
288,
202,
202,
54,
10340,
3120,
681,
273,
19817,
3120,
18,
81,
67,
2704,
3120,
12,
27768,
176... |
column.setIsNullable(! isNullable.equals("NO")); | column.setIsNullable(!"NO".equals(isNullable)); | private void loadColumns() throws SQLException { if (! allColumnsLoaded) { Connection conn = JdbcSchema.this.getConnection(); try { DatabaseMetaData dmd = conn.getMetaData(); String schema = JdbcSchema.this.getSchemaName(); String catalog = JdbcSchema.this.getCatalogName(); String tableName = getName(); String columnNamePattern = "%"; ResultSet rs = null; try { Map map = getColumnMap(); rs = dmd.getColumns(catalog, schema, tableName, columnNamePattern); while (rs.next()) { String name = rs.getString(4); int type = rs.getInt(5); String typeName = rs.getString(6); int columnSize = rs.getInt(7); int decimalDigits = rs.getInt(9); int numPrecRadix = rs.getInt(10); int charOctetLength = rs.getInt(16); String isNullable = rs.getString(18); Column column = new Column(name); column.setType(type); column.setTypeName(typeName); column.setColumnSize(columnSize); column.setDecimalDigits(decimalDigits); column.setNumPrecRadix(numPrecRadix); column.setCharOctetLength(charOctetLength); column.setIsNullable(! isNullable.equals("NO")); map.put(name, column); totalColumnSize += column.getColumnSize(); } } finally { if (rs != null) { rs.close(); } } } finally { try { conn.close(); } catch (SQLException e) { //ignore } } allColumnsLoaded = true; } } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/559834fa33e7611897a2c14dd367da2b156f894b/JdbcSchema.java/clean/src/main/mondrian/rolap/aggmatcher/JdbcSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
1262,
3380,
1435,
1216,
6483,
288,
5411,
309,
16051,
777,
3380,
8835,
13,
288,
7734,
4050,
1487,
273,
24209,
3078,
18,
2211,
18,
588,
1952,
5621,
7734,
775,
288,
10792,
5130,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
1262,
3380,
1435,
1216,
6483,
288,
5411,
309,
16051,
777,
3380,
8835,
13,
288,
7734,
4050,
1487,
273,
24209,
3078,
18,
2211,
18,
588,
1952,
5621,
7734,
775,
288,
10792,
5130,
6... |
if (qName != null) assert input.substring(pos+1).startsWith(qName); | if (qName != null) { if (!input.substring(pos+1).startsWith(qName)) { throw new IllegalArgumentException("Internal Error: should never get here."); } } | private static String stripAfter(String input, String qName) { int pos = findLastSlash(input); if (qName != null) assert input.substring(pos+1).startsWith(qName); return input.substring(0,pos); } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/24f13e9f6777c0d8e958be60ae1903715926163c/CLDRFile.java/clean/tools/java/org/unicode/cldr/util/CLDRFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1152,
760,
514,
2569,
4436,
12,
780,
810,
16,
514,
22914,
13,
288,
1082,
202,
474,
949,
273,
1104,
3024,
11033,
12,
2630,
1769,
1082,
202,
430,
261,
85,
461,
480,
446,
13,
1815,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1152,
760,
514,
2569,
4436,
12,
780,
810,
16,
514,
22914,
13,
288,
1082,
202,
474,
949,
273,
1104,
3024,
11033,
12,
2630,
1769,
1082,
202,
430,
261,
85,
461,
480,
446,
13,
1815,
... |
protected void submitToRepository() { | public void submitToRepository() { | protected void submitToRepository() { if (isDirty()) { this.doSave(new NullProgressMonitor()); } updateTask(); submitButton.setEnabled(false); showBusy(true); final JiraServer jiraServer = JiraServerFacade.getDefault().getJiraServer(repository); if (jiraServer == null) { submitButton.setEnabled(true); JiraTaskEditor.this.showBusy(false); return; } // TODO: build a new issue object rather then retrieving from server final Issue issue = jiraServer.getIssue(this.getRepositoryTaskData().getAttributeValue( JiraAttributeFactory.ATTRIBUTE_ISSUE_KEY)); if (issue == null) { MylarStatusHandler.log("Unable to retrieve issue from repository", this); submitButton.setEnabled(true); JiraTaskEditor.this.showBusy(false); return; } final String comment = getNewCommentText(); final AbstractRepositoryTask task = (AbstractRepositoryTask) TasksUiPlugin.getTaskListManager().getTaskList() .getTask(AbstractRepositoryTask.getHandle(repository.getUrl(), getRepositoryTaskData().getId())); final boolean attachContext = false; JobChangeAdapter listener = new JobChangeAdapter() { @Override public void done(final IJobChangeEvent event) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { if (event.getJob().getResult().isOK()) { if (attachContext) { // TODO check for task == null // TODO should be done as part of job try { connector.attachContext(repository, task, ""); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } //close(); } else { submitButton.setEnabled(true); JiraTaskEditor.this.showBusy(false); } } }); } }; Job submitJob = new Job(SUBMIT_JOB_LABEL) { @Override protected IStatus run(IProgressMonitor monitor) { try { Issue issue = JiraRepositoryConnector.buildJiraIssue(getRepositoryTaskData(), jiraServer); RepositoryOperation operation = getRepositoryTaskData().getSelectedOperation(); if (operation != null) { if ("leave".equals(operation.getKnobName())) { jiraServer.updateIssue(issue, comment); } else if (org.tigris.jira.core.model.Status.RESOLVED_ID.equals(operation.getKnobName())) { String value = operation.getOptionValue(operation.getOptionSelection()); jiraServer.resolveIssue(issue, jiraServer.getResolutionById(value), issue.getFixVersions(), comment, JiraServer.ASSIGNEE_CURRENT, repository.getUserName()); } else if (org.tigris.jira.core.model.Status.OPEN_ID.equals(operation.getKnobName())) { jiraServer.reopenIssue(issue, comment, JiraServer.ASSIGNEE_CURRENT, repository .getUserName()); } else if (org.tigris.jira.core.model.Status.CLOSED_ID.equals(operation.getKnobName())) { String value = operation.getOptionValue(operation.getOptionSelection()); jiraServer.closeIssue(issue, jiraServer.getResolutionById(value), issue.getFixVersions(), comment, JiraServer.ASSIGNEE_CURRENT, repository.getUserName()); } } if (task != null) { // XXX: HACK TO AVOID OVERWRITE WARNING task.setTaskData(null); TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, new JobChangeAdapter() { @Override public void done(IJobChangeEvent event) { close(); TasksUiUtil.openEditor(task, false); } }); } else { //TasksUiUtil.openRepositoryTask(...); close(); } return Status.OK_STATUS; } catch (Exception e) { MylarStatusHandler.fail(e, "Error submitting to JIRA server", true); return Status.OK_STATUS; } } }; submitJob.addJobChangeListener(listener); submitJob.schedule(); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/03f3816483b487f20214837cafbbbb03ffc5336e/JiraTaskEditor.java/clean/org.eclipse.mylyn.jira.ui/src/org/eclipse/mylyn/internal/jira/core/ui/editor/JiraTaskEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
4879,
774,
3305,
1435,
288,
202,
202,
430,
261,
291,
10785,
10756,
288,
1082,
202,
2211,
18,
2896,
4755,
12,
2704,
4112,
5491,
7187,
10663,
202,
202,
97,
202,
202,
2725,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4879,
774,
3305,
1435,
288,
202,
202,
430,
261,
291,
10785,
10756,
288,
1082,
202,
2211,
18,
2896,
4755,
12,
2704,
4112,
5491,
7187,
10663,
202,
202,
97,
202,
202,
2725,
... |
Collection ownedElements = p.getOwnedElements(); | Collection ownedElements = ModelFacade.getOwnedElements(p); | public String generatePackage(Object handle) { MPackage p = (MPackage) handle; String s = ""; String packName = generateName(p.getName()); s += "namespace " + packName + " {\n"; Collection ownedElements = p.getOwnedElements(); if (ownedElements != null) { Iterator ownedEnum = ownedElements.iterator(); while (ownedEnum.hasNext()) { MModelElement me = (MModelElement) ownedEnum.next(); s += generate(me); s += "\n\n"; } } else { s += "(no elements)"; } s += "\n}\n"; return s; } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/1866ce2aba8057ad992b7d3853a02863d492ab25/GeneratorCSharp.java/buggy/modules/csharp/src/org/argouml/language/csharp/generator/GeneratorCSharp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2103,
2261,
12,
921,
1640,
13,
288,
202,
49,
2261,
293,
273,
261,
49,
2261,
13,
1640,
31,
202,
780,
272,
273,
1408,
31,
202,
780,
2298,
461,
273,
2103,
461,
12,
84,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2103,
2261,
12,
921,
1640,
13,
288,
202,
49,
2261,
293,
273,
261,
49,
2261,
13,
1640,
31,
202,
780,
272,
273,
1408,
31,
202,
780,
2298,
461,
273,
2103,
461,
12,
84,
18,
1... |
} | } | static void extract(LocationInfo li, Throwable t, String fqnOfCallingClass) { if (t == null) { return; } Object location = null; try { Object[] stes = (Object[]) getStackTrace.invoke(t, nullArgs); boolean match = false; for (int i = 0; i < stes.length; i++) { if (((String) getClassName.invoke(stes[i], nullArgs)).equals( fqnOfCallingClass)) { match = true; } else if(match) { location = stes[i]; break; } } } catch (Throwable e) { // some trouble worth announcing... } setClassName(li, location); setFileName(li, location); setMethodName(li, location); setLineNumber(li, location); } | 45952 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45952/ff26b789d2f1613c5180772dd9fa3efc420a7547/StackTraceElementExtractor.java/buggy/src/java/org/apache/log4j/spi/location/StackTraceElementExtractor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
918,
2608,
12,
2735,
966,
4501,
16,
4206,
268,
16,
514,
23518,
951,
19677,
797,
13,
288,
565,
309,
261,
88,
422,
446,
13,
288,
1377,
327,
31,
565,
289,
3639,
1033,
2117,
273,
446... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
918,
2608,
12,
2735,
966,
4501,
16,
4206,
268,
16,
514,
23518,
951,
19677,
797,
13,
288,
565,
309,
261,
88,
422,
446,
13,
288,
1377,
327,
31,
565,
289,
3639,
1033,
2117,
273,
446... |
dumpString(marshaled.getValue()); | dumpString(marshaled.toString()); | private void userMarshal(IRubyObject value) throws IOException { out.write(TYPE_USERDEF); dumpObject(RubySymbol.newSymbol(runtime, value.getMetaClass().getName())); RubyString marshaled = (RubyString) value.callMethod("_dump", runtime.newFixnum(depthLimit)); dumpString(marshaled.getValue()); } | 49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/9f2efc63a858fa0507245b207025eab027840a04/MarshalStream.java/buggy/src/org/jruby/runtime/marshal/MarshalStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
729,
8105,
12,
7937,
10340,
921,
460,
13,
1216,
1860,
288,
3639,
596,
18,
2626,
12,
2399,
67,
4714,
12904,
1769,
3639,
4657,
921,
12,
54,
10340,
5335,
18,
2704,
5335,
12,
944... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
729,
8105,
12,
7937,
10340,
921,
460,
13,
1216,
1860,
288,
3639,
596,
18,
2626,
12,
2399,
67,
4714,
12904,
1769,
3639,
4657,
921,
12,
54,
10340,
5335,
18,
2704,
5335,
12,
944... |
throw new Error ("Not implemented"); | synchronized (services) { Class klass = bcssre.getServiceClass(); if (services.containsKey(klass)) return; Iterator it = bcsChildren(); while (it.hasNext()) { Object obj = it.next(); if (obj instanceof BeanContextServices) ((BeanContextServices) obj).serviceRevoked(bcssre); } } | public void serviceRevoked (BeanContextServiceRevokedEvent bcssre) throws NotImplementedException { throw new Error ("Not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/354ad8e724c65b6b6984f632455ce4b17f1fb1d0/BeanContextServicesSupport.java/clean/core/src/classpath/java/java/beans/beancontext/BeanContextServicesSupport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1156,
10070,
14276,
261,
3381,
1042,
1179,
10070,
14276,
1133,
324,
5212,
266,
13,
377,
1216,
10051,
503,
225,
288,
565,
3852,
261,
8387,
13,
288,
1659,
7352,
273,
324,
5212,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1156,
10070,
14276,
261,
3381,
1042,
1179,
10070,
14276,
1133,
324,
5212,
266,
13,
377,
1216,
10051,
503,
225,
288,
565,
3852,
261,
8387,
13,
288,
1659,
7352,
273,
324,
5212,
2... |
try { nameColor = ColorFactory.parseColor(defaultNameColorString, true); locationColor = ColorFactory.parseColor(defaultLocationColorString, true); } catch (NumberFormatException nfe) { nameColor = Color.black; locationColor = Color.black; } | nameDrawingAttributes = new DrawingAttributes(); locationDrawingAttributes = new DrawingAttributes(); | protected AbstractLocationHandler() { try { nameColor = ColorFactory.parseColor(defaultNameColorString, true); locationColor = ColorFactory.parseColor(defaultLocationColorString, true); } catch (NumberFormatException nfe) { nameColor = Color.black; locationColor = Color.black; } } | 47208 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47208/e99d918f8c4751eb4be2467688b01a9ebd8434ec/AbstractLocationHandler.java/buggy/src/openmap/com/bbn/openmap/layer/location/AbstractLocationHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
4115,
2735,
1503,
1435,
288,
3639,
775,
288,
5411,
508,
2957,
273,
5563,
1733,
18,
2670,
2957,
12,
1886,
461,
2957,
780,
16,
638,
1769,
5411,
2117,
2957,
273,
5563,
1733,
18,
2670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4115,
2735,
1503,
1435,
288,
3639,
775,
288,
5411,
508,
2957,
273,
5563,
1733,
18,
2670,
2957,
12,
1886,
461,
2957,
780,
16,
638,
1769,
5411,
2117,
2957,
273,
5563,
1733,
18,
2670,
... |
private void handleExceptions(Context context, InstructionHandle pei, BasicBlock etb) { | private void handleExceptions(Subroutine subroutine, InstructionHandle pei, BasicBlock etb) { | private void handleExceptions(Context context, InstructionHandle pei, BasicBlock etb) { List<CodeExceptionGen> exceptionHandlerList = exceptionHandlerMap.getHandlerList(pei); if (exceptionHandlerList == null) return; // TODO: should try to prune some obviously infeasible exception edges Iterator<CodeExceptionGen> i = exceptionHandlerList.iterator(); while (i.hasNext()) { CodeExceptionGen exceptionHandler = i.next(); InstructionHandle handlerStart = exceptionHandler.getHandlerPC(); context.addEdgeAndExplore(etb, handlerStart, HANDLED_EXCEPTION_EDGE); } } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/c8916d5ed220901717be384e46f221b5e4cf4f3f/BetterCFGBuilder2.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/ba/BetterCFGBuilder2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1640,
11416,
12,
1042,
819,
16,
24605,
3259,
2804,
77,
16,
7651,
1768,
3393,
70,
13,
288,
202,
202,
682,
32,
1085,
503,
7642,
34,
1520,
1503,
682,
273,
1520,
1503,
863,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
11416,
12,
1042,
819,
16,
24605,
3259,
2804,
77,
16,
7651,
1768,
3393,
70,
13,
288,
202,
202,
682,
32,
1085,
503,
7642,
34,
1520,
1503,
682,
273,
1520,
1503,
863,
... |
if(!pn.isReallyConnected()) throw new NotConnectedException(); | if(!pn.isConnected()) throw new NotConnectedException(); | public int allocateOutgoingPacketNumber() throws KeyChangedException, NotConnectedException { int packetNumber; if(!pn.isReallyConnected()) throw new NotConnectedException(); synchronized(this) { if(isDeprecated) throw new KeyChangedException(); packetNumber = nextPacketNumber++; Logger.minor(this, "Allocated "+packetNumber+" in allocateOutgoingPacketNumber for "+this); } while(true) { try { sentPacketsContents.lock(packetNumber); return packetNumber; } catch (InterruptedException e) { if(isDeprecated) throw new KeyChangedException(); } } } | 50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/f18d01b1fb86ddf4053d90e1f337f99ccd2ec255/KeyTracker.java/clean/src/freenet/node/KeyTracker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
10101,
24866,
6667,
1854,
1435,
1216,
1929,
5033,
503,
16,
31541,
503,
288,
3639,
509,
4414,
1854,
31,
3639,
309,
12,
5,
7449,
18,
291,
8932,
10756,
604,
394,
31541,
503,
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,
377,
1071,
509,
10101,
24866,
6667,
1854,
1435,
1216,
1929,
5033,
503,
16,
31541,
503,
288,
3639,
509,
4414,
1854,
31,
3639,
309,
12,
5,
7449,
18,
291,
8932,
10756,
604,
394,
31541,
503,
5621,... |
try { | try { | public byte[] getContent(CmsObject cms, String templateFile, String elementName, Hashtable parameters, String templateSelector) throws CmsException { // initialize the XML template this.initTemplate(cms, parameters, templateFile); // read the submitted input parameters this.readInput(cms, parameters); if ("1".equals(m_NextStep)) { // the resource was uploaded, switch to the next screen to select its type m_TemplateSection = "step1"; } else if ("2".equals(m_NextStep)) { // the type of the new resource was selected, so replace the old with the new resource //cms.lockResource(m_OldResourceName, true); cms.replaceResource(m_OldResourceName, cms.getResourceTypeId(m_UploadResourceType), null, m_UploadResourceContent); //cms.unlockResource( m_OldResourceName ); // leave the session clean this.clearSessionValues(cms.getRequestContext().getSession(true)); try { // send the user back to the file listing finally cms.getRequestContext().getResponse().sendCmsRedirect(getConfigFile(cms).getWorkplaceActionPath() + CmsWorkplaceAction.getExplorerFileUri(cms)); } catch (Exception ex) { throw new CmsException("Redirect failed: " + getConfigFile(cms).getWorkplaceActionPath() + CmsWorkplaceAction.getExplorerFileUri(cms), CmsException.C_UNKNOWN_EXCEPTION, ex); } } // pump the template with the input form out on the first submission return startProcessing(cms, m_XmlTemplateDocument, "", parameters, m_TemplateSection); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/6cce177c14c6e3885b587df5eb3efe618285760f/CmsReplace.java/clean/src/com/opencms/workplace/CmsReplace.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1160,
8526,
5154,
12,
4747,
921,
6166,
16,
514,
28215,
16,
514,
14453,
16,
18559,
1472,
16,
514,
1542,
4320,
13,
1216,
11228,
288,
202,
202,
759,
4046,
326,
3167,
1542,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1160,
8526,
5154,
12,
4747,
921,
6166,
16,
514,
28215,
16,
514,
14453,
16,
18559,
1472,
16,
514,
1542,
4320,
13,
1216,
11228,
288,
202,
202,
759,
4046,
326,
3167,
1542,
202,
2... |
public int getCookieCount(String key) { | public int getCookieCount() { if (_store == null) return 0; | public int getCookieCount(String key) { try { _rwl.readLock().acquire(); try { return _store.getCookieCount(key); } finally { _rwl.readLock().release(); } } catch (InterruptedException ie) { _logger.severe("Interrupted! " + ie); return 0; } } | 31053 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31053/5cd0631e882b72a5ed80c126194f77856e1d210a/FrameworkModel.java/clean/src/org/owasp/webscarab/model/FrameworkModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
24643,
1380,
1435,
288,
309,
261,
67,
2233,
422,
446,
13,
327,
374,
31,
3639,
775,
288,
5411,
389,
86,
21504,
18,
896,
2531,
7675,
1077,
1039,
5621,
5411,
775,
288,
7734,
327... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
24643,
1380,
1435,
288,
309,
261,
67,
2233,
422,
446,
13,
327,
374,
31,
3639,
775,
288,
5411,
389,
86,
21504,
18,
896,
2531,
7675,
1077,
1039,
5621,
5411,
775,
288,
7734,
327... |
String[] columnNames = new String[] { "", "!", "Description" }; | String[] columnNames = new String[] { "", "!", "Summary" }; | protected void configureTableViewer(TableViewer viewer) { viewer.setUseHashlookup(true); String[] columnNames = new String[] { "", "!", "Description" }; TableColumn[] columns = new TableColumn[columnNames.length]; int[] columnWidths = new int[] { 20, 20, 500 }; viewer.setColumnProperties(columnNames); viewer.getTable().setHeaderVisible(false); for (int i = 0; i < columnNames.length; i++) { columns[i] = new TableColumn(viewer.getTable(), 0, i); // SWT.LEFT columns[i].setText(columnNames[i]); columns[i].setWidth(columnWidths[i]); columns[i].setData(new Integer(i)); columns[i].addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { TableColumn col = (TableColumn) e.getSource(); Integer integer = (Integer) col.getData(); setSortOrder(integer.intValue()); } }); } IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager(); Color categoryBackground = themeManager.getCurrentTheme().getColorRegistry().get( TaskListColorsAndFonts.THEME_COLOR_TASKLIST_CATEGORY); SearchViewTableLabelProvider taskListTableLabelProvider = new SearchViewTableLabelProvider( new TaskElementLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator(), categoryBackground); viewer.setLabelProvider(taskListTableLabelProvider); viewer.setContentProvider(new SearchResultTableContentProvider(this)); // Set the order when the search view is loading so that the items are // sorted right away setSortOrder(currentSortOrder); taskContentProvider = (SearchResultContentProvider) viewer.getContentProvider(); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/56aa3635192094aca30c2e6950ac1c9489c7462d/RepositorySearchResultView.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/RepositorySearchResultView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
5068,
1388,
18415,
12,
1388,
18415,
14157,
13,
288,
202,
202,
25256,
18,
542,
3727,
2310,
8664,
12,
3767,
1769,
202,
202,
780,
8526,
19975,
273,
394,
514,
8526,
288,
23453... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5068,
1388,
18415,
12,
1388,
18415,
14157,
13,
288,
202,
202,
25256,
18,
542,
3727,
2310,
8664,
12,
3767,
1769,
202,
202,
780,
8526,
19975,
273,
394,
514,
8526,
288,
23453... |
public int getRowID() | public int getRowID( ) | public int getRowID() { if(content!=null) { return ((IRowContent)content).getRowID(); } return 0; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/6619bc4f3534f51de901bf09614a65e2d5fea713/RowArea.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/area/impl/RowArea.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
11835,
734,
1435,
202,
95,
202,
202,
430,
12,
1745,
5,
33,
2011,
13,
202,
202,
95,
1082,
202,
2463,
14015,
45,
1999,
1350,
13,
1745,
2934,
588,
1999,
734,
5621,
202,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
11835,
734,
1435,
202,
95,
202,
202,
430,
12,
1745,
5,
33,
2011,
13,
202,
202,
95,
1082,
202,
2463,
14015,
45,
1999,
1350,
13,
1745,
2934,
588,
1999,
734,
5621,
202,
20... |
return "." ; | return "Returns loadings of a character in an ordination" ; | public String getExplanation() { return "." ; } | 57538 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57538/3221679067d7d9e9039137094a2bc461aaf6a30e/CharLoadings.java/buggy/trunk/Mesquite Project/Source/mesquite/rhetenor/CharLoadings/CharLoadings.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
202,
482,
514,
26246,
15854,
1435,
288,
3196,
202,
2463,
315,
1356,
1262,
899,
434,
279,
3351,
316,
392,
4642,
1735,
6,
274,
565,
202,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
202,
482,
514,
26246,
15854,
1435,
288,
3196,
202,
2463,
315,
1356,
1262,
899,
434,
279,
3351,
316,
392,
4642,
1735,
6,
274,
565,
202,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public void widgetSelected( SelectionEvent e ) { if ( e.getSource( ).equals( btnUseReportData ) ) { ColorPalette.getInstance( ).restore( ); // Skip when selection is false if ( !btnUseReportData.getSelection( ) ) { return; } try { switchDataSet( null ); } catch ( ChartException e1 ) { ChartWizard.displayException( e1 ); } cmbDataSet.add( BLANK_DATASET, 0 ); cmbDataSet.select( 0 ); cmbDataSet.setEnabled( false ); btnNewData.setEnabled( false ); btnFilters.setEnabled( hasDataSet( ) && getDataServiceProvider( ).isInvokingSupported( ) ); btnParameters.setEnabled( hasDataSet( ) && getDataServiceProvider( ).isInvokingSupported( ) ); btnBinding.setEnabled( hasDataSet( ) && getDataServiceProvider( ).isInvokingSupported( ) ); } else if ( e.getSource( ).equals( btnUseDataSet ) ) { // Skip when selection is false if ( !btnUseDataSet.getSelection( ) ) { return; } cmbDataSet.removeAll( ); cmbDataSet.add( BLANK_DATASET, 0 ); String[] dataSets = getDataServiceProvider( ).getAllDataSets( ); if ( dataSets != null ) for ( int i = 0; i < dataSets.length; i++ ) { cmbDataSet.add( dataSets[i], i + 1 ); } cmbDataSet.select( 0 ); cmbDataSet.setEnabled( true ); btnNewData.setEnabled( getDataServiceProvider( ).isInvokingSupported( ) ); } else if ( e.getSource( ).equals( cmbDataSet ) ) { try { ColorPalette.getInstance( ).restore( ); if ( !cmbDataSet.getText( ).equals( BLANK_DATASET ) ) { int bCancel = switchDataSet( cmbDataSet.getText( ) ); if ( bCancel == Window.OK && cmbDataSet.getItem( 0 ).equals( BLANK_DATASET ) ) { cmbDataSet.remove( BLANK_DATASET ); } else if ( bCancel == Window.CANCEL ) { String[] datasetNames = cmbDataSet.getItems( ); for ( int i = 0; i < datasetNames.length; i++ ) { if ( datasetNames[i].equals( getDataServiceProvider( ).getBoundDataSet( ) ) ) { cmbDataSet.select( i ); if ( cmbDataSet.getItem( 0 ) .equals( BLANK_DATASET ) ) { cmbDataSet.remove( BLANK_DATASET ); } return; } } cmbDataSet.select( 0 ); } } } catch ( ChartException e1 ) { ChartWizard.displayException( e1 ); } btnNewData.setEnabled( getDataServiceProvider( ).isInvokingSupported( ) ); btnFilters.setEnabled( hasDataSet( ) && getDataServiceProvider( ).isInvokingSupported( ) ); btnParameters.setEnabled( hasDataSet( ) && getDataServiceProvider( ).isInvokingSupported( ) ); btnBinding.setEnabled( hasDataSet( ) && getDataServiceProvider( ).isInvokingSupported( ) ); } else if ( e.getSource( ).equals( btnNewData ) ) { // Bring up the dialog to create a dataset int result = getDataServiceProvider( ).invoke( IDataServiceProvider.COMMAND_NEW_DATASET ); if ( result == Window.CANCEL ) { return; } String[] sAllDS = getDataServiceProvider( ).getAllDataSets( ); String currentDataSet = cmbDataSet.getText( ); int dataSetCount = cmbDataSet.getItemCount( ); if ( currentDataSet.equals( BLANK_DATASET ) ) { dataSetCount = dataSetCount - 1; } if ( sAllDS.length == dataSetCount ) { return; } if ( currentDataSet.equals( BLANK_DATASET ) ) { cmbDataSet.removeAll( ); cmbDataSet.add( BLANK_DATASET, 0 ); for ( int i = 0; i < sAllDS.length; i++ ) { cmbDataSet.add( sAllDS[i], i + 1 ); } } else { cmbDataSet.setItems( sAllDS ); } cmbDataSet.setText( currentDataSet ); } else if ( e.getSource( ).equals( btnFilters ) ) { if ( getDataServiceProvider( ).invoke( IDataServiceProvider.COMMAND_EDIT_FILTER ) == Window.OK ) { refreshTablePreview( ); doLivePreview( ); updateApplyButton( ); } } else if ( e.getSource( ).equals( btnParameters ) ) { if ( getDataServiceProvider( ).invoke( IDataServiceProvider.COMMAND_EDIT_PARAMETER ) == Window.OK ) { refreshTablePreview( ); doLivePreview( ); updateApplyButton( ); } } else if ( e.getSource( ).equals( btnBinding ) ) { if ( getDataServiceProvider( ).invoke( IDataServiceProvider.COMMAND_EDIT_BINDING ) == Window.OK ) { refreshTablePreview( ); doLivePreview( ); updateApplyButton( ); } } else if ( e.getSource( ) instanceof MenuItem ) { MenuItem item = (MenuItem) e.getSource( ); IAction action = (IAction) item.getData( ); action.setChecked( !action.isChecked( ) ); action.run( ); } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/51342f37efb819d66eb6bfa56ebaba4fb7f4fa8b/TaskSelectData.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/TaskSelectData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3604,
7416,
12,
12977,
1133,
425,
262,
202,
95,
202,
202,
430,
261,
425,
18,
588,
1830,
12,
262,
18,
14963,
12,
10638,
3727,
4820,
751,
262,
262,
202,
202,
95,
1082,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3604,
7416,
12,
12977,
1133,
425,
262,
202,
95,
202,
202,
430,
261,
425,
18,
588,
1830,
12,
262,
18,
14963,
12,
10638,
3727,
4820,
751,
262,
262,
202,
202,
95,
1082,
20... | ||
Iterator iter = errors.iterator( ); while ( iter.hasNext( ) ) { SemanticException e = (SemanticException) iter.next( ); | ErrorDetail errorDetail = new ErrorDetail( e ); errorDetail.setValidationID( triggerDefn.getValidationID( ) ); errorDetailList.add( errorDetail ); } | final List perform( Module module, boolean sendEvent ) { AbstractSemanticValidator validator = triggerDefn.getValidator( ); if ( module instanceof ReportDesign && !validator.canApplyToDesign( ) || module instanceof Library && !validator.canApplyToLibrary( ) ) return Collections.EMPTY_LIST; // Locate the target element of validation. DesignElement toValidate = element; if ( !StringUtil.isBlank( triggerDefn.getTargetElement( ) ) ) { ElementDefn targetDefn = (ElementDefn) MetaDataDictionary .getInstance( ) .getElement( triggerDefn.getTargetElement( ) ); while ( toValidate != null ) { ElementDefn elementDefn = (ElementDefn) toValidate.getDefn( ); if ( targetDefn.isKindOf( elementDefn ) ) break; toValidate = toValidate.getContainer( ); } } // If the target is not found, no validation is needed. This case is // usually for the element which is not added into report. if ( toValidate == null ) return Collections.EMPTY_LIST; // Perform validation. List errors = null; if ( validator instanceof AbstractPropertyValidator ) { errors = ( (AbstractPropertyValidator) validator ).validate( module, toValidate, triggerDefn.getPropertyName( ) ); } else if ( validator instanceof AbstractElementValidator ) { errors = ( (AbstractElementValidator) validator ).validate( module, toValidate ); } assert errors != null; // Send validation event if it's needed if ( sendEvent ) { List errorDetailList = new ArrayList( ); Iterator iter = errors.iterator( ); while ( iter.hasNext( ) ) { SemanticException e = (SemanticException) iter.next( ); ErrorDetail errorDetail = new ErrorDetail( e ); errorDetail.setValidationID( triggerDefn.getValidationID( ) ); errorDetailList.add( errorDetail ); } ValidationEvent event = new ValidationEvent( toValidate, triggerDefn.getValidationID( ), errorDetailList ); module.broadcastValidationEvent( toValidate, event ); } return errors; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/26aec383876c6a173a1201e4a536ece9fe6fe527/ValidationNode.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/validators/ValidationNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6385,
987,
3073,
12,
5924,
1605,
16,
1250,
1366,
1133,
262,
202,
95,
202,
202,
7469,
13185,
9941,
5126,
4213,
273,
3080,
3262,
82,
18,
588,
5126,
12,
11272,
202,
202,
430,
261,
160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6385,
987,
3073,
12,
5924,
1605,
16,
1250,
1366,
1133,
262,
202,
95,
202,
202,
7469,
13185,
9941,
5126,
4213,
273,
3080,
3262,
82,
18,
588,
5126,
12,
11272,
202,
202,
430,
261,
160... |
Item parentItem = session.getItem(path); | Item parentItem = session.getItem(repoPath); | public Object doInJcr(Session session) throws RepositoryException { if (! session.itemExists(path)) { throw new DataRetrievalFailureException("item at path " + path + " not found"); } Item parentItem = session.getItem(path); if (! parentItem.isNode()) { throw new InvalidDataAccessResourceUsageException("item at path " + path + " not a node"); } Node parentNode = (Node) parentItem; NodeIterator i = parentNode.getNodes(NN_TICKET); Set tickets = new HashSet(); while (i.hasNext()) { Node child = i.nextNode(); tickets.add(TicketMapper.nodeToTicket(child)); } return tickets; } | 47226 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47226/1ad8910d16d8d029d0265eac960bb5199e5191f3/JcrTicketDao.java/clean/src/main/java/org/osaf/cosmo/dao/jcr/JcrTicketDao.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
1033,
741,
382,
46,
3353,
12,
2157,
1339,
13,
10792,
1216,
13367,
288,
10792,
309,
16051,
1339,
18,
1726,
4002,
12,
803,
3719,
288,
13491,
604,
394,
1910,
27356,
14389,
2932,
1726,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
1033,
741,
382,
46,
3353,
12,
2157,
1339,
13,
10792,
1216,
13367,
288,
10792,
309,
16051,
1339,
18,
1726,
4002,
12,
803,
3719,
288,
13491,
604,
394,
1910,
27356,
14389,
2932,
1726,
... |
if (ProjectManagerEx.getInstanceEx().isProjectOpened(getProject())) { WindowManager.getInstance().getStatusBar(getProject()).setInfo(text); | final Project project = getProject(); if (projectManager.isProjectOpened(project)) { WindowManager.getInstance().getStatusBar(project).setInfo(text); | public void run() { if (ProjectManagerEx.getInstanceEx().isProjectOpened(getProject())) { WindowManager.getInstance().getStatusBar(getProject()).setInfo(text); myStatusText = null; } } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/f01ecca3253db887067f0d4f2be77b2878f856ba/DebugProcessImpl.java/clean/debugger/impl/com/intellij/debugger/engine/DebugProcessImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1086,
1435,
288,
3639,
309,
261,
4109,
1318,
424,
18,
588,
1442,
424,
7675,
291,
4109,
23115,
12,
588,
4109,
1435,
3719,
288,
1850,
6076,
1318,
18,
588,
1442,
7675,
588,
1482,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
1435,
288,
3639,
309,
261,
4109,
1318,
424,
18,
588,
1442,
424,
7675,
291,
4109,
23115,
12,
588,
4109,
1435,
3719,
288,
1850,
6076,
1318,
18,
588,
1442,
7675,
588,
1482,... |
index, "Connection closed due to the exception: " + e.getMessage()); | index, "Connection closed due to the exception: " + e.getMessage()); | synchronized static void connectionClosedOnError(EnhancedDebugger debugger, Exception e) { int index = getInstance().tabbedPane.indexOfComponent(debugger.tabbedPane); getInstance().tabbedPane.setToolTipTextAt( index, "Connection closed due to the exception: " + e.getMessage()); getInstance().tabbedPane.setIconAt( index, connectionClosedOnErrorIcon); } | 45655 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45655/78becc3d7305388cff280b2bc0e2842644b0cd9b/EnhancedDebuggerWindow.java/clean/source/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3852,
760,
918,
1459,
7395,
11427,
12,
664,
17221,
24113,
19977,
16,
1185,
425,
13,
288,
3639,
509,
770,
273,
3694,
7675,
7032,
2992,
8485,
18,
31806,
1841,
12,
4148,
693,
18,
7032,
2992,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
760,
918,
1459,
7395,
11427,
12,
664,
17221,
24113,
19977,
16,
1185,
425,
13,
288,
3639,
509,
770,
273,
3694,
7675,
7032,
2992,
8485,
18,
31806,
1841,
12,
4148,
693,
18,
7032,
2992,... |
public void insert_octet(byte value) | public void insert_octet( byte value ) | public void insert_octet(byte value) throws InvalidValue, TypeMismatch { if( any == null ) throw new TypeMismatch(); if( any.type().kind() != org.omg.CORBA.TCKind.tk_octet) throw new InvalidValue(); any.insert_octet(value); } | 46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/e136d8c058d595db4952932ede9ea22e46d261f4/DynAny.java/clean/src/org/jacorb/orb/dynany/DynAny.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2243,
67,
17909,
12,
1160,
460,
262,
540,
1216,
1962,
620,
16,
1412,
16901,
565,
288,
3639,
309,
12,
1281,
422,
446,
262,
5411,
604,
394,
1412,
16901,
5621,
3639,
309,
12,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2243,
67,
17909,
12,
1160,
460,
262,
540,
1216,
1962,
620,
16,
1412,
16901,
565,
288,
3639,
309,
12,
1281,
422,
446,
262,
5411,
604,
394,
1412,
16901,
5621,
3639,
309,
12,
12... |
Font font = parent.getFont(); | private final void createProjectLocationGroup(Composite parent) { // project specification group Composite projectGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; projectGroup.setLayout(layout); projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // new project label Label projectContentsLabel = new Label(projectGroup, SWT.NONE); projectContentsLabel.setText(WorkbenchMessages.getString("WizardNewProjectCreationPage.projectContentsLabel")); //$NON-NLS-1$ GridData labelData = new GridData(); labelData.horizontalSpan = 3; projectContentsLabel.setLayoutData(labelData); final Button useDefaultsButton = new Button(projectGroup, SWT.CHECK | SWT.RIGHT); useDefaultsButton.setText(WorkbenchMessages.getString("WizardNewProjectCreationPage.useDefaultLabel")); //$NON-NLS-1$ useDefaultsButton.setSelection(useDefaults); GridData buttonData = new GridData(); buttonData.horizontalSpan = 3; useDefaultsButton.setLayoutData(buttonData); createUserSpecifiedProjectLocationGroup(projectGroup, !useDefaults); SelectionListener listener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { useDefaults = useDefaultsButton.getSelection(); browseButton.setEnabled(!useDefaults); locationPathField.setEnabled(!useDefaults); locationLabel.setEnabled(!useDefaults); if (useDefaults) { customLocationFieldValue = locationPathField.getText(); setLocationForSelection(); } else { locationPathField.setText(customLocationFieldValue); } } }; useDefaultsButton.addSelectionListener(listener); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/b4f6cfdee8616a27914e9515373f5aa2637208be/WizardNewProjectNameAndLocationPage.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WizardNewProjectNameAndLocationPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
5711,
3512,
273,
982,
18,
588,
5711,
5621,
727,
5711,
3512,
273,
982,
18,
588,
5711,
5621,
918,
5711,
3512,
273,
982,
18,
588,
5711,
5621,
752,
4109,
2735,
1114,
12,
9400,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5711,
3512,
273,
982,
18,
588,
5711,
5621,
727,
5711,
3512,
273,
982,
18,
588,
5711,
5621,
918,
5711,
3512,
273,
982,
18,
588,
5711,
5621,
752,
4109,
2735,
1114,
12,
9400,
57... | |
public Comparator<String> getRegistrationOrderComparator() { return new Comparator<String>() { public int compare(String id1, String id2) { return myId2Index.get(id1) - myId2Index.get(id2); } }; } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/4972de74093751aa507c641e7a852c8feb15d5e3/ActionManagerImpl.java/clean/action-system/impl/com/intellij/openapi/actionSystem/impl/ActionManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
5559,
32,
780,
34,
588,
7843,
2448,
5559,
1435,
95,
2463,
2704,
5559,
32,
780,
34,
1435,
95,
482,
474,
9877,
12,
780,
350,
21,
16,
780,
350,
22,
15329,
2463,
4811,
548,
22,
1016,
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,
1071,
5559,
32,
780,
34,
588,
7843,
2448,
5559,
1435,
95,
2463,
2704,
5559,
32,
780,
34,
1435,
95,
482,
474,
9877,
12,
780,
350,
21,
16,
780,
350,
22,
15329,
2463,
4811,
548,
22,
1016,
18,... | ||
AST __t2456 = _t; AST tmp2446_AST_in = (AST)_t; | AST __t2460 = _t; AST tmp2450_AST_in = (AST)_t; | public final void sqlexpression(AST _t) throws RecognitionException { AST sqlexpression_AST_in = (_t == ASTNULL) ? null : (AST)_t; if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case OR: { AST __t2432 = _t; AST tmp2428_AST_in = (AST)_t; match(_t,OR); _t = _t.getFirstChild(); sqlexpression(_t); _t = _retTree; sqlexpression(_t); _t = _retTree; _t = __t2432; _t = _t.getNextSibling(); break; } case AND: { AST __t2433 = _t; AST tmp2429_AST_in = (AST)_t; match(_t,AND); _t = _t.getFirstChild(); sqlexpression(_t); _t = _retTree; sqlexpression(_t); _t = _retTree; _t = __t2433; _t = _t.getNextSibling(); break; } case NOT: { AST __t2434 = _t; AST tmp2430_AST_in = (AST)_t; match(_t,NOT); _t = _t.getFirstChild(); sqlexpression(_t); _t = _retTree; _t = __t2434; _t = _t.getNextSibling(); break; } case MATCHES: { AST __t2435 = _t; AST tmp2431_AST_in = (AST)_t; match(_t,MATCHES); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_40.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2435; _t = _t.getNextSibling(); break; } case BEGINS: { AST __t2437 = _t; AST tmp2432_AST_in = (AST)_t; match(_t,BEGINS); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_40.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2437; _t = _t.getNextSibling(); break; } case CONTAINS: { AST __t2439 = _t; AST tmp2433_AST_in = (AST)_t; match(_t,CONTAINS); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_40.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2439; _t = _t.getNextSibling(); break; } case EQ: { AST __t2441 = _t; AST tmp2434_AST_in = (AST)_t; match(_t,EQ); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_40.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2441; _t = _t.getNextSibling(); break; } case NE: { AST __t2443 = _t; AST tmp2435_AST_in = (AST)_t; match(_t,NE); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_40.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2443; _t = _t.getNextSibling(); break; } case GTHAN: { AST __t2445 = _t; AST tmp2436_AST_in = (AST)_t; match(_t,GTHAN); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_40.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2445; _t = _t.getNextSibling(); break; } case GE: { AST __t2447 = _t; AST tmp2437_AST_in = (AST)_t; match(_t,GE); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_40.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2447; _t = _t.getNextSibling(); break; } case LTHAN: { AST __t2449 = _t; AST tmp2438_AST_in = (AST)_t; match(_t,LTHAN); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_40.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2449; _t = _t.getNextSibling(); break; } case LE: { AST __t2451 = _t; AST tmp2439_AST_in = (AST)_t; match(_t,LE); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_40.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2451; _t = _t.getNextSibling(); break; } case EXISTS: { AST __t2453 = _t; AST tmp2440_AST_in = (AST)_t; match(_t,EXISTS); _t = _t.getFirstChild(); AST tmp2441_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); selectstatea(_t); _t = _retTree; AST tmp2442_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); _t = __t2453; _t = _t.getNextSibling(); break; } case Sql_begins: { AST __t2454 = _t; AST tmp2443_AST_in = (AST)_t; match(_t,Sql_begins); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOT: { AST tmp2444_AST_in = (AST)_t; match(_t,NOT); _t = _t.getNextSibling(); break; } case BEGINS: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp2445_AST_in = (AST)_t; match(_t,BEGINS); _t = _t.getNextSibling(); sqlscalar(_t); _t = _retTree; _t = __t2454; _t = _t.getNextSibling(); break; } case Sql_between: { AST __t2456 = _t; AST tmp2446_AST_in = (AST)_t; match(_t,Sql_between); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOT: { AST tmp2447_AST_in = (AST)_t; match(_t,NOT); _t = _t.getNextSibling(); break; } case BETWEEN: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp2448_AST_in = (AST)_t; match(_t,BETWEEN); _t = _t.getNextSibling(); sqlscalar(_t); _t = _retTree; AST tmp2449_AST_in = (AST)_t; match(_t,AND); _t = _t.getNextSibling(); sqlscalar(_t); _t = _retTree; _t = __t2456; _t = _t.getNextSibling(); break; } case Sql_in: { AST __t2458 = _t; AST tmp2450_AST_in = (AST)_t; match(_t,Sql_in); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOT: { AST tmp2451_AST_in = (AST)_t; match(_t,NOT); _t = _t.getNextSibling(); break; } case IN_KW: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp2452_AST_in = (AST)_t; match(_t,IN_KW); _t = _t.getNextSibling(); AST tmp2453_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case SELECT: { selectstatea(_t); _t = _retTree; break; } case LEXDATE: case NUMBER: case QSTRING: case BIGENDIAN: case EXCLUSIVELOCK: case FALSE_KW: case FINDCASESENSITIVE: case FINDGLOBAL: case FINDNEXTOCCURRENCE: case FINDPREVOCCURRENCE: case FINDSELECT: case FINDWRAPAROUND: case HOSTBYTEORDER: case LITTLEENDIAN: case NO: case NOLOCK: case NOWAIT: case NULL_KW: case READAVAILABLE: case READEXACTNUM: case SEARCHSELF: case SEARCHTARGET: case SHARELOCK: case TRUE_KW: case USERID: case WINDOWDELAYEDMINIMIZE: case WINDOWMAXIMIZED: case WINDOWMINIMIZED: case WINDOWNORMAL: case YES: case UNKNOWNVALUE: case Field_ref: case FUNCTIONCALLTYPE: case GETATTRCALLTYPE: case PROCEDURECALLTYPE: case SAXCOMPLETE: case SAXPARSERERROR: case SAXRUNNING: case SAXUNINITIALIZED: case SETATTRCALLTYPE: case ROWUNMODIFIED: case ROWDELETED: case ROWMODIFIED: case ROWCREATED: { sql_in_val(_t); _t = _retTree; { _loop2462: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp2454_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); sql_in_val(_t); _t = _retTree; } else { break _loop2462; } } while (true); } break; } default: { throw new NoViableAltException(_t); } } } AST tmp2455_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); _t = __t2458; _t = _t.getNextSibling(); break; } case Sql_like: { AST __t2463 = _t; AST tmp2456_AST_in = (AST)_t; match(_t,Sql_like); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOT: { AST tmp2457_AST_in = (AST)_t; match(_t,NOT); _t = _t.getNextSibling(); break; } case LIKE: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp2458_AST_in = (AST)_t; match(_t,LIKE); _t = _t.getNextSibling(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ESCAPE: { AST tmp2459_AST_in = (AST)_t; match(_t,ESCAPE); _t = _t.getNextSibling(); sqlscalar(_t); _t = _retTree; break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t2463; _t = _t.getNextSibling(); break; } case Sql_null_test: { AST __t2466 = _t; AST tmp2460_AST_in = (AST)_t; match(_t,Sql_null_test); _t = _t.getFirstChild(); AST tmp2461_AST_in = (AST)_t; match(_t,IS); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOT: { AST tmp2462_AST_in = (AST)_t; match(_t,NOT); _t = _t.getNextSibling(); break; } case NULL_KW: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp2463_AST_in = (AST)_t; match(_t,NULL_KW); _t = _t.getNextSibling(); _t = __t2466; _t = _t.getNextSibling(); break; } default: if (_t==null) _t=ASTNULL; if ((_tokenSet_40.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/JPTreeParser.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparserbase/JPTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
4744,
4149,
1337,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4744,
4149,
1337,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
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,
225,
202,
482,
727,
918,
4744,
4149,
1337,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4744,
4149,
1337,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
29... |
paintNonLeaf(g, indentation, descent, tree, curr); | paintNode(g, indentation + 4, descent, tree, curr, false); | private int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return descent; int halfHeight = getRowHeight() / 2; int halfWidth = rightChildIndent / 2; int y0 = descent + halfHeight; int heightOfLine = descent + halfHeight; if (mod.isLeaf(curr)) { paintLeaf(g, indentation, descent, tree, curr); descent += getRowHeight(); } else { if (depth > 0 || tree.isRootVisible()) { paintNonLeaf(g, indentation, descent, tree, curr); descent += getRowHeight(); y0 += halfHeight; } int max = mod.getChildCount(curr); if (tree.isExpanded(new TreePath(((DefaultMutableTreeNode) curr) .getPath()))) for (int i = 0; i < max; ++i) { g.setColor(getHashColor()); heightOfLine = descent + halfHeight; g.drawLine(indentation + halfWidth, heightOfLine, indentation + rightChildIndent, heightOfLine); descent = paintRecursive(g, indentation + rightChildIndent, descent, i, depth + 1, tree, mod, mod.getChild(curr, i)); } } if (tree.isExpanded(new TreePath(((DefaultMutableTreeNode) curr) .getPath()))) if (y0 != heightOfLine) { g.setColor(getHashColor()); g.drawLine(indentation + halfWidth, y0, indentation + halfWidth, heightOfLine); } return descent; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicTreeUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
509,
12574,
10483,
12,
17558,
314,
16,
509,
12018,
16,
509,
3044,
319,
16,
1082,
202,
474,
1151,
1854,
16,
509,
3598,
16,
804,
2471,
2151,
16,
4902,
1488,
681,
16,
1033,
4306... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
509,
12574,
10483,
12,
17558,
314,
16,
509,
12018,
16,
509,
3044,
319,
16,
1082,
202,
474,
1151,
1854,
16,
509,
3598,
16,
804,
2471,
2151,
16,
4902,
1488,
681,
16,
1033,
4306... |
try { serializer.serialize(tempFile, original); clone1 = (ExtMapBean)deserializer1.deserialize(tempFile); clone2 = (ExtMapBean)deserializer2.deserialize(tempFile); assertEquals(clone1.getMap(), clone2.getMap()); } finally { tempFile.deleteOnExit(); } | serializer.serialize(tempFile, original); clone1 = (ExtMapBean)deserializer1.deserialize(tempFile); clone2 = (ExtMapBean)deserializer2.deserialize(tempFile); assertEquals(clone1.getMap(), clone2.getMap()); | public void testDeserializeTwice() throws Exception { // Set up needed objects ObjectSerializer serializer = makeObjectSerializer_ExtMapBean(); ObjectSerializer deserializer1 = makeObjectSerializer_ExtMapBean(); ObjectSerializer deserializer2 = makeObjectSerializer_ExtMapBean(); ExtMapBean original = makeSample_ExtMapBean(); ExtMapBean clone1; ExtMapBean clone2; File tempFile = File.createTempFile("test", ".xml"); try { // Serialize serializer.serialize(tempFile, original); // Deserialize twice clone1 = (ExtMapBean)deserializer1.deserialize(tempFile); clone2 = (ExtMapBean)deserializer2.deserialize(tempFile); // Test assertEquals(clone1.getMap(), clone2.getMap()); } finally { tempFile.deleteOnExit(); // clean up } } | 8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/08e8b0badc278881c1fcc132d42015e054ac3cca/ObjectSerializerTest.java/clean/test/src/org/lockss/util/ObjectSerializerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
20423,
23539,
1812,
1435,
1377,
1216,
1185,
288,
565,
368,
1000,
731,
3577,
2184,
565,
1033,
6306,
6340,
273,
1221,
921,
6306,
67,
2482,
863,
3381,
5621,
565,
1033,
6306,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
20423,
23539,
1812,
1435,
1377,
1216,
1185,
288,
565,
368,
1000,
731,
3577,
2184,
565,
1033,
6306,
6340,
273,
1221,
921,
6306,
67,
2482,
863,
3381,
5621,
565,
1033,
6306,
... |
ResourceDef.ResourceBundle resourceList, PrintWriter pw) { String fullClassName = getClassName(null); pw.println("# This file contains the resources for"); pw.println("# class '" + fullClassName + "'; the base locale is '" + resourceList.locale + "'."); pw.println("# It was generated by " + ResourceGen.class); pw.println("# from " + getFile()); pw.println("# on " + new Date().toString() + "."); pw.println(); for (int i = 0; i < resourceList.resources.length; i++) { ResourceDef.Resource resource = resourceList.resources[i]; final String name = resource.name; if (resource.text == null) { throw new BuildException( "Resource '" + name + "' has no message"); } final String message = resource.text.cdata; if (message == null) { continue; } pw.println(name + "=" + Util.quoteForProperties(message)); } pw.println("# End " + fullClassName + ".properties"); } | ResourceDef.ResourceBundle resourceList, PrintWriter pw) { String fullClassName = getClassName(null); pw.println("# This file contains the resources for"); pw.println("# class '" + fullClassName + "'; the base locale is '" + resourceList.locale + "'."); pw.println("# It was generated by " + ResourceGen.class); pw.println("# from " + getFile()); pw.println("# on " + new Date().toString() + "."); pw.println(); for (int i = 0; i < resourceList.resources.length; i++) { ResourceDef.Resource resource = resourceList.resources[i]; final String name = resource.name; if (resource.text == null) { throw new BuildException( "Resource '" + name + "' has no message"); } final String message = resource.text.cdata; if (message == null) { continue; } pw.println(name + "=" + Util.quoteForProperties(message)); } pw.println("# End " + fullClassName + ".properties"); } | private void generateBaseProperties( ResourceDef.ResourceBundle resourceList, PrintWriter pw) { String fullClassName = getClassName(null); pw.println("# This file contains the resources for"); pw.println("# class '" + fullClassName + "'; the base locale is '" + resourceList.locale + "'."); pw.println("# It was generated by " + ResourceGen.class); pw.println("# from " + getFile()); pw.println("# on " + new Date().toString() + "."); pw.println(); for (int i = 0; i < resourceList.resources.length; i++) { ResourceDef.Resource resource = resourceList.resources[i]; final String name = resource.name; if (resource.text == null) { throw new BuildException( "Resource '" + name + "' has no message"); } final String message = resource.text.cdata; if (message == null) { continue; } pw.println(name + "=" + Util.quoteForProperties(message)); } pw.println("# End " + fullClassName + ".properties"); } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/b5b5168edc3af09cb74945a80b0c36e6630ed502/XmlFileTask.java/buggy/src/main/mondrian/resource/XmlFileTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2103,
2171,
2297,
12,
1082,
202,
1420,
3262,
18,
18731,
1058,
682,
16,
14071,
8772,
13,
288,
202,
202,
780,
1983,
3834,
273,
11819,
12,
2011,
1769,
202,
202,
14921,
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,
1152,
918,
2103,
2171,
2297,
12,
1082,
202,
1420,
3262,
18,
18731,
1058,
682,
16,
14071,
8772,
13,
288,
202,
202,
780,
1983,
3834,
273,
11819,
12,
2011,
1769,
202,
202,
14921,
18,
... |
Form defaultForm = get(defaultLocale, formKey); | Form defaultForm = get(defaultLocale, formKey); | public void processForms() { //hFormSets.put(buildKey(fs), fs); String defaultKey = defaultLocale.toString(); // Loop through FormSets for (Iterator i = hFormSets.keySet().iterator(); i.hasNext(); ) { String key = (String)i.next(); FormSet fs = (FormSet)hFormSets.get(key); // Skip default FormSet if (key.equals(defaultKey)) continue; // Loop through Forms and copy/clone fields from default locale for (Iterator x = fs.getForms().keySet().iterator(); x.hasNext(); ) { String formKey = (String)x.next(); Form form = (Form)fs.getForms().get(formKey); // Create a new Form object so the order from the default is // maintained (very noticable in the JavaScript). Form newForm = new Form(); newForm.setName(form.getName()); // Loop through the default locale form's fields // If they don't exist in the current locale's form, then clone them. Form defaultForm = get(defaultLocale, formKey); for (Iterator defaultFields = defaultForm.getFields().iterator(); defaultFields.hasNext(); ) { Field defaultField = (Field)defaultFields.next(); String fieldKey = defaultField.getKey(); if (form.getFieldMap().containsKey(fieldKey)) { newForm.addField((Field)form.getFieldMap().get(fieldKey)); } else { Field field = getClosestLocaleField(fs, formKey, fieldKey); newForm.addField((Field)field.clone()); } } fs.addForm(newForm); } } // Process Fully Constructed FormSets for (Iterator i = hFormSets.values().iterator(); i.hasNext(); ) { FormSet fs = (FormSet)i.next(); if (!fs.isProcessed()) fs.process(hConstants); } } | 54522 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54522/9ac8d2b8797bcd5beb9e8514b2858d9024b4673d/ValidatorResources.java/buggy/src/share/org/apache/commons/validator/ValidatorResources.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1207,
18529,
1435,
288,
4202,
368,
76,
1204,
2785,
18,
458,
12,
3510,
653,
12,
2556,
3631,
2662,
1769,
4202,
514,
805,
653,
273,
30108,
18,
10492,
5621,
2868,
368,
9720,
3059,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1207,
18529,
1435,
288,
4202,
368,
76,
1204,
2785,
18,
458,
12,
3510,
653,
12,
2556,
3631,
2662,
1769,
4202,
514,
805,
653,
273,
30108,
18,
10492,
5621,
2868,
368,
9720,
3059,
... |
"Expecting SOAP 1.2 implementation of SOAP Fault Code. But received some other implementation"); | "Expecting SOAP 1.2 implementation of SOAP Fault Code. " + "But received some other implementation"); | public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException { if (!(soapFaultCode instanceof SOAP12FaultCodeImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault Code. But received some other implementation"); } super.setCode(soapFaultCode); } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/46a014bae8b3bdea6efef1d984a295027545ce0c/SOAP12FaultImpl.java/buggy/modules/doom/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
24724,
12,
27952,
7083,
1085,
9930,
7083,
1085,
13,
1216,
16434,
23684,
288,
3639,
309,
16051,
12,
19215,
7083,
1085,
1276,
16434,
2138,
7083,
1085,
2828,
3719,
288,
5411,
604,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
24724,
12,
27952,
7083,
1085,
9930,
7083,
1085,
13,
1216,
16434,
23684,
288,
3639,
309,
16051,
12,
19215,
7083,
1085,
1276,
16434,
2138,
7083,
1085,
2828,
3719,
288,
5411,
604,
3... |
taskSummaryEditor = new TaskSummaryEditor(); | taskSummaryEditor = new TaskInfoEditor(); | public MylarTaskEditor() { super(); IWorkbench workbench = MylarTasklistPlugin.getDefault().getWorkbench(); IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); IWorkbenchPage activePage = window.getActivePage(); TaskEditorListener listener = new TaskEditorListener(); activePage.addPartListener(listener); taskSummaryEditor = new TaskSummaryEditor(); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/c66e1abc548299095f0992ffd278426ba0fc3203/MylarTaskEditor.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/MylarTaskEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8005,
7901,
2174,
6946,
1435,
288,
202,
202,
9565,
5621,
202,
202,
45,
2421,
22144,
1440,
22144,
273,
8005,
7901,
2174,
1098,
3773,
18,
588,
1868,
7675,
588,
2421,
22144,
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,
225,
202,
482,
8005,
7901,
2174,
6946,
1435,
288,
202,
202,
9565,
5621,
202,
202,
45,
2421,
22144,
1440,
22144,
273,
8005,
7901,
2174,
1098,
3773,
18,
588,
1868,
7675,
588,
2421,
22144,
5621,
... |
getBounds(); | Rectangle getBounds(); | getBounds(); | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/3865f3b02ec80f548b6118000220225af62c866d/Shape.java/buggy/java/awt/Shape.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
22107,
5621,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
22107,
5621,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.