rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
reconstructTable( ); | tableViewer.refresh( ); | protected void refreshValues( Set propertiesSet ) { if ( input.size( ) != 1 ) { return; } dataSetName.setText( ( (ReportItemHandle) input.get( 0 ) ).getDataSet( ) .getName( ) ); reconstructTable( ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/9def0d3f4770404bae8ad9c41d93b5cca9b94576/ParameterBindingPage.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/ParameterBindingPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
4460,
1972,
12,
1000,
1790,
694,
262,
202,
95,
202,
202,
430,
261,
810,
18,
1467,
12,
262,
480,
404,
262,
202,
202,
95,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
4460,
1972,
12,
1000,
1790,
694,
262,
202,
95,
202,
202,
430,
261,
810,
18,
1467,
12,
262,
480,
404,
262,
202,
202,
95,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
... |
return fact == null; | return fact == null; | boolean isVirtual() { return fact == null; } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/b5b5168edc3af09cb74945a80b0c36e6630ed502/RolapCube.java/clean/src/main/mondrian/rolap/RolapCube.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
353,
6466,
1435,
288,
202,
202,
2463,
5410,
422,
446,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
353,
6466,
1435,
288,
202,
202,
2463,
5410,
422,
446,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
String size = (String) DesignerConstants.fontMap.get( DesignChoiceConstants.FONT_SIZE_MEDIUM ); | String size = (String) DesignerConstants.fontMap .get( DesignChoiceConstants.FONT_SIZE_MEDIUM ); | public static int getFontSizeIntValue( DesignElementHandle handle ) { if ( !( handle instanceof ReportItemHandle ) ) { if ( handle instanceof ModuleHandle ) { // return 10. String size = (String) DesignerConstants.fontMap.get( DesignChoiceConstants.FONT_SIZE_MEDIUM ); return Integer.parseInt( size ); } if ( handle instanceof GroupHandle ) { handle = handle.getContainer( ); } } Object fontSizeValue = handle.getPrivateStyle( ) .getFontSize( ) .getValue( ); if ( fontSizeValue instanceof DimensionValue ) { // use parent's font size as the base size for converting sizeValue // to a int value. int size = getFontSizeIntValue( handle.getContainer( ) ); return (int) CSSUtil.convertToPoint( fontSizeValue, size ); } else if ( fontSizeValue instanceof String ) { String fontSize = (String) fontSizeValue; if ( fontSize.equals( DesignChoiceConstants.FONT_SIZE_LARGER ) ) { return getLargerFontSizeIntValue( handle.getContainer( ) ); } else if ( fontSize.equals( DesignChoiceConstants.FONT_SIZE_SMALLER ) ) { return getSmallerFontSizeIntValue( handle.getContainer( ) ); } else { String size = (String) DesignerConstants.fontMap.get( fontSize ); return Integer.parseInt( size ); } } else { // return 10. String size = (String) DesignerConstants.fontMap.get( DesignChoiceConstants.FONT_SIZE_MEDIUM ); return Integer.parseInt( size ); } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/bd4d66f78a2177b14abd81505fa39cd4e4abe645/DEUtil.java/clean/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/DEUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
509,
18776,
1225,
1702,
620,
12,
29703,
1046,
3259,
1640,
262,
202,
95,
202,
202,
430,
261,
401,
12,
1640,
1276,
8706,
1180,
3259,
262,
262,
202,
202,
95,
1082,
202,
430,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
509,
18776,
1225,
1702,
620,
12,
29703,
1046,
3259,
1640,
262,
202,
95,
202,
202,
430,
261,
401,
12,
1640,
1276,
8706,
1180,
3259,
262,
262,
202,
202,
95,
1082,
202,
430,... |
String msg = "Exception while calling "+VERIFY+" Details: " + e.toString(); | String msg = "Exception while calling " + VERIFY + " Details: " + e.toString(); | private void generateClient(File sourceJar) { getTask().getProject().addTaskDefinition("internal_bas_generateclient", org.apache.tools.ant.taskdefs.optional.ejb.BorlandGenerateClient.class); org.apache.tools.ant.taskdefs.optional.ejb.BorlandGenerateClient gentask = null; log("generate client for "+sourceJar,Project.MSG_INFO); try { String args = verifyArgs; args += " "+sourceJar.getPath(); gentask = (BorlandGenerateClient) getTask().getProject().createTask("internal_bas_generateclient"); gentask.setEjbjar(sourceJar); gentask.setDebug(java2iiopdebug); Path classpath = getCombinedClasspath(); if (classpath != null) { gentask.setClasspath(classpath); } gentask.setTaskName("generate client"); gentask.execute(); } catch (Exception e) { //TO DO : delete the file if it is not a valid file. String msg = "Exception while calling "+VERIFY+" Details: " + e.toString(); throw new BuildException(msg, e); } } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/c6c232893c39257745a8f7a618bcdb5c59791cae/BorlandDeploymentTool.java/clean/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
1227,
12,
812,
1084,
10813,
13,
288,
3639,
11478,
7675,
588,
4109,
7675,
1289,
2174,
1852,
2932,
7236,
67,
9157,
67,
7163,
2625,
3113,
4766,
1171,
2358,
18,
19211,
18,
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,
377,
3238,
918,
2103,
1227,
12,
812,
1084,
10813,
13,
288,
3639,
11478,
7675,
588,
4109,
7675,
1289,
2174,
1852,
2932,
7236,
67,
9157,
67,
7163,
2625,
3113,
4766,
1171,
2358,
18,
19211,
18,
66... |
ITextEditor textEditor = (ITextEditor)compilationUnitEditor; | ITextEditor textEditor = (ITextEditor)editorPart; | public boolean showsHighlightRangeOnly() { if(this.getActivePage() != 0) { this.switchToJava(); } ITextEditor textEditor = (ITextEditor)compilationUnitEditor; return textEditor.showsHighlightRangeOnly(); } | 47899 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47899/7f5fba2ae90ca2a9e7d29f9d5522b9264fa6c613/ComponentEditor.java/clean/projects/wolips/plugins/org.objectstyle.wolips.componenteditor/java/org/objectstyle/wolips/componenteditor/part/ComponentEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
17975,
16205,
2655,
3386,
1435,
288,
202,
202,
430,
12,
2211,
18,
588,
3896,
1964,
1435,
480,
374,
13,
288,
1082,
202,
2211,
18,
9610,
774,
5852,
5621,
202,
202,
97,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
17975,
16205,
2655,
3386,
1435,
288,
202,
202,
430,
12,
2211,
18,
588,
3896,
1964,
1435,
480,
374,
13,
288,
1082,
202,
2211,
18,
9610,
774,
5852,
5621,
202,
202,
97,
202... |
for(ElemTemplateElement child = m_firstChild; child != null; child = child.m_nextSibling) | for (ElemTemplateElement child = m_firstChild; child != null; child = child.m_nextSibling) | public void resolvePrefixTables() throws SAXException { // Always start with a fresh prefix table! m_prefixTable = null; // If we have declared declarations, then we look for // a parent that has namespace decls, and add them // to this element's decls. Otherwise we just point // to the parent that has decls. if(null != this.m_declaredPrefixes) { // Add this element's declared prefixes to the // prefix table. int n = m_declaredPrefixes.size(); for(int i = 0; i < n; i++) { XMLNSDecl decl = (XMLNSDecl)m_declaredPrefixes.elementAt(i); String prefix = decl.getPrefix(); String uri = decl.getURI(); boolean shouldExclude = excludeResultNSDecl(prefix, uri); // Create a new prefix table if one has not already been created. if(null == m_prefixTable) m_prefixTable = new Vector(); m_prefixTable.addElement(new XMLNSDecl(prefix, uri, shouldExclude)); } } ElemTemplateElement parent = (ElemTemplateElement)this.getParentNode(); if(null != parent) { // The prefix table of the parent should never be null! Vector prefixes = parent.m_prefixTable; if(null == m_prefixTable) { // Nothing to combine, so just use parent's table! this.m_prefixTable = parent.m_prefixTable; } else { // Add the prefixes from the parent's prefix table. int n = prefixes.size(); for(int i = 0; i < n; i++) { XMLNSDecl decl = (XMLNSDecl)prefixes.elementAt(i); boolean shouldExclude = excludeResultNSDecl(decl.getPrefix(), decl.getURI()); if(shouldExclude != decl.getIsExcluded()) { decl = new XMLNSDecl(decl.getPrefix(), decl.getURI(), shouldExclude); } m_prefixTable.addElement(decl); } } } else if(null == m_prefixTable) { // Must be stylesheet element without any result prefixes! m_prefixTable = new Vector(); } // Resolve the children's prefix tables. for(ElemTemplateElement child = m_firstChild; child != null; child = child.m_nextSibling) { child.resolvePrefixTables(); } } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/77ad973f1d6ad8f28fd358f2ba4d4c63da65d953/ElemTemplateElement.java/buggy/src/org/apache/xalan/templates/ElemTemplateElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2245,
2244,
6905,
1435,
565,
1216,
14366,
225,
288,
565,
368,
14178,
787,
598,
279,
12186,
1633,
1014,
5,
565,
312,
67,
3239,
1388,
273,
446,
31,
3639,
368,
971,
732,
1240,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2245,
2244,
6905,
1435,
565,
1216,
14366,
225,
288,
565,
368,
14178,
787,
598,
279,
12186,
1633,
1014,
5,
565,
312,
67,
3239,
1388,
273,
446,
31,
3639,
368,
971,
732,
1240,
7... |
for (int j = delCol - 1; j >= 0; j--) | for (int j = delCol - 1; j >= 0; j--) { | public void setColumns(String[] columnTitles) { /* * We first need to delete all columns before adding new ones. The * number of attributes displayed can vary between functions, and the * whole layer may have to be redrawn. */ int delCol = viewer.getTree().getColumns().length; for (int j = delCol - 1; j >= 0; j--) viewer.getTree().getColumns()[j].dispose(); /* * Then create columns according to the attributes needed for the * function. */ for (int i = columnTitles.length - 1; i >= 0; i--) {// TableColumn column = new TableColumn(viewer.getTree(), SWT.NONE, 0);// column.setText(columnTitles[i]);// column.setAlignment(SWT.LEFT);// if (columnTitles[i].equalsIgnoreCase("problem_number")) {// column.setWidth(40);// } else if (columnTitles[i].equalsIgnoreCase("problem_synopsis")) {// column.setWidth(400);// } else {// column.pack();// } } } | 9108 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9108/b285e985045f40f358a5f8a02ff490c0ba010676/ShowReportView.java/buggy/csplugin/src/org/csapi/csplugin/views/ShowReportView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
3380,
12,
780,
8526,
1057,
25088,
13,
288,
3639,
1748,
540,
380,
1660,
1122,
1608,
358,
1430,
777,
2168,
1865,
6534,
394,
5945,
18,
1021,
540,
380,
1300,
434,
1677,
10453,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
3380,
12,
780,
8526,
1057,
25088,
13,
288,
3639,
1748,
540,
380,
1660,
1122,
1608,
358,
1430,
777,
2168,
1865,
6534,
394,
5945,
18,
1021,
540,
380,
1300,
434,
1677,
10453,... |
SessionContext globalContext = msgContext.getSessionContext(); | ConfigurationContext globalContext = msgContext.getSystemContext(); | protected Object getTheImplementationObject(MessageContext msgContext) throws AxisFault { ServiceDescription service = msgContext.getOperationContext().getServiceContext().getServiceConfig(); Parameter scopeParam = service.getParameter(SCOPE); QName serviceName = service.getName(); if (scopeParam != null && Constants.SESSION_SCOPE.equals(scopeParam.getValue())) { SessionContext sessionContext = msgContext.getSessionContext(); synchronized(sessionContext){ Object obj = sessionContext.getProperty(serviceName.getLocalPart()); if (obj == null) { obj = makeNewServiceObject(msgContext); sessionContext.setProperty(serviceName.getLocalPart(), obj); } return obj; } } else if (scopeParam != null && Constants.APPLICATION_SCOPE.equals(scopeParam.getValue())) { SessionContext globalContext = msgContext.getSessionContext(); synchronized(globalContext){ Object obj = globalContext.getProperty(serviceName.getLocalPart()); if (obj == null) { obj = makeNewServiceObject(msgContext); globalContext.setProperty(serviceName.getLocalPart(), obj); } return obj; } } else { return makeNewServiceObject(msgContext); } } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/38ef00272642b5c40e18b92ec59bca002ef9af2c/AbstractMessageReceiver.java/clean/modules/core/src/org/apache/axis2/receivers/AbstractMessageReceiver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1033,
336,
1986,
13621,
921,
12,
1079,
1042,
1234,
1042,
13,
1216,
15509,
7083,
288,
3639,
1956,
3291,
1156,
273,
5411,
1234,
1042,
18,
588,
2988,
1042,
7675,
588,
1179,
1042,
7675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1033,
336,
1986,
13621,
921,
12,
1079,
1042,
1234,
1042,
13,
1216,
15509,
7083,
288,
3639,
1956,
3291,
1156,
273,
5411,
1234,
1042,
18,
588,
2988,
1042,
7675,
588,
1179,
1042,
7675,
... |
public String[] supStreamFeatures(final XMPPResourceConnection session) | public Element[] supStreamFeatures(final XMPPResourceConnection session) | public String[] supStreamFeatures(final XMPPResourceConnection session) { return null; } | 21045 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/21045/3d3414a98ad9cbaf86a06efded9ca1c82d8ee7ea/XMPPProcessor.java/buggy/src/tigase/xmpp/XMPPProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
8526,
1169,
1228,
8696,
12,
6385,
23216,
1420,
1952,
1339,
13,
202,
95,
327,
446,
31,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
8526,
1169,
1228,
8696,
12,
6385,
23216,
1420,
1952,
1339,
13,
202,
95,
327,
446,
31,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
else { if (checkedStateStore.containsKey(child)) findAllSelectedListElements(child, fullLabel, | } else { if (checkedStateStore.containsKey(child)) { findAllSelectedListElements(child, fullLabel, | private void findAllSelectedListElements(Object treeElement, String parentLabel, boolean addAll, IElementFilter filter, IProgressMonitor monitor) throws InterruptedException { String fullLabel = null; if (monitor != null && monitor.isCanceled()) return; if (monitor != null) { fullLabel = getFullLabel(treeElement, parentLabel); monitor.subTask(fullLabel); } if (addAll) filter.filterElements(listContentProvider.getElements(treeElement), monitor); else { //Add what we have stored if (checkedStateStore.containsKey(treeElement)) filter.filterElements((Collection) checkedStateStore .get(treeElement), monitor); } Object[] treeChildren = treeContentProvider.getChildren(treeElement); for (int i = 0; i < treeChildren.length; i++) { Object child = treeChildren[i]; if (addAll) findAllSelectedListElements(child, fullLabel, true, filter, monitor); else { //Only continue for those with checked state if (checkedStateStore.containsKey(child)) findAllSelectedListElements(child, fullLabel, whiteCheckedTreeItems.contains(child), filter, monitor); } } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/ResourceTreeAndListGroup.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceTreeAndListGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
11135,
7416,
682,
3471,
12,
921,
2151,
1046,
16,
5411,
514,
982,
2224,
16,
1250,
5428,
16,
467,
1046,
1586,
1034,
16,
5411,
467,
5491,
7187,
6438,
13,
1216,
7558,
288,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
11135,
7416,
682,
3471,
12,
921,
2151,
1046,
16,
5411,
514,
982,
2224,
16,
1250,
5428,
16,
467,
1046,
1586,
1034,
16,
5411,
467,
5491,
7187,
6438,
13,
1216,
7558,
288,
3639,
... |
assertNotNull("Errors should be found.", ctx.getValidationError().getValue()); | assertErrorsFound(); | public void testFloatToFloatPrimitiveConverter() { ctx.bindValue(BeansObservables.observeValue(dataObject, "floatVal"), BeansObservables.observeValue(dataObject, "floatPrimitiveVal"), null); dataObject.setFloatPrimitiveVal((float) 789.5); assertEquals("float value does not match", 789.5, dataObject.getFloatPrimitiveVal(), .001); assertEquals("Float value does not match", new Float(789.5), dataObject.getFloatVal()); assertNull("No errors should be found.", ctx.getValidationError().getValue()); dataObject.setFloatVal(new Float(910.5)); assertEquals("float value does not match", 910.5, dataObject.getFloatPrimitiveVal(), .001); assertEquals("Float value does not match", new Float(910.5), dataObject.getFloatVal()); assertNull("No errors should be found.", ctx.getValidationError().getValue()); dataObject.setFloatVal(null); assertEquals("float value does not match", 910.5, dataObject.getFloatPrimitiveVal(), .001); assertNull("Float value does not match", dataObject.getFloatVal()); assertNotNull("Errors should be found.", ctx.getValidationError().getValue()); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/646de6c1228ca0820a97e225df84d75e3993e272/DefaultBindSupportFactoryFloatPrimitiveTest.java/buggy/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryFloatPrimitiveTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4723,
774,
4723,
9840,
5072,
1435,
288,
3639,
1103,
18,
4376,
620,
12,
14495,
26199,
1538,
18,
12199,
537,
620,
12,
892,
921,
16,
315,
5659,
3053,
6,
3631,
4823,
634,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4723,
774,
4723,
9840,
5072,
1435,
288,
3639,
1103,
18,
4376,
620,
12,
14495,
26199,
1538,
18,
12199,
537,
620,
12,
892,
921,
16,
315,
5659,
3053,
6,
3631,
4823,
634,
2... |
while (i < length) { d1 = arrayOctect[i]; if (!isData(d1)) return null; i++; d2 = arrayOctect[i]; if (!isData(d2)) return null; i++; d3 = arrayOctect[i]; b3isp = isPad(d3); if (!isData(d3) && !b3isp) return null; i++; if (b3isp && (d2&0xf) != 0) return null; d4 = arrayOctect[i]; b4isp = isPad(d4); if (!isData(d4) && !b4isp || b3isp && !b4isp) return null; i++; if (!b3isp && b4isp && (d3&0x3) != 0) return null; | if (!isData( (d1 = normalizedBase64Data[dataIndex++]) )|| !isData( (d2 = normalizedBase64Data[dataIndex++]) )|| !isData( (d3 = normalizedBase64Data[dataIndex++]) )|| !isData( (d4 = normalizedBase64Data[dataIndex++]) )) return null; | public static byte[] decode( byte[] base64Data ) { if (base64Data == null) return null; int length = base64Data.length; if ( length == 0 ) return null; // remove all whitespaces byte arrayOctect[] = new byte[length]; System.arraycopy(base64Data,0,arrayOctect,0,length); length = removeWS(arrayOctect); if (length == 0 || length % FOURBYTE != 0) return null; // calculate the decoded value length int numberQuadruple = length/FOURBYTE*3; if (isPad(arrayOctect[length-2])) numberQuadruple -= 2; else if (isPad(arrayOctect[length-1])) numberQuadruple--; byte decodedData[] = new byte[ numberQuadruple]; byte b1=0,b2=0,b3=0,b4=0, d1=0,d2=0,d3=0,d4=0; int decodedIndex = 0; boolean b3isp = false, b4isp = false; int i = 0; while (i < length) { // the first byte must be real data d1 = arrayOctect[i]; if (!isData(d1)) return null; i++; // the second byte must be real data d2 = arrayOctect[i]; if (!isData(d2)) return null; i++; // the third byte must be real data or pad d3 = arrayOctect[i]; b3isp = isPad(d3); if (!isData(d3) && !b3isp) return null; i++; if (b3isp && (d2&0xf) != 0) return null; // the forth byte must be real data or pad // and if the third is pad, the forth must be pad d4 = arrayOctect[i]; b4isp = isPad(d4); if (!isData(d4) && !b4isp || b3isp && !b4isp) return null; i++; if (!b3isp && b4isp && (d3&0x3) != 0) return null; // if the forth byte is pad, it should be the end of the input if (b4isp && i < length) return null; b1 = base64Alphabet[d1]; b2 = base64Alphabet[d2]; if ( !b4isp ) { //No PAD e.g 3cQl b3 = base64Alphabet[d3]; b4 = base64Alphabet[d4]; decodedData[decodedIndex++] = (byte)( b1 <<2 | b2>>4 ) ; decodedData[decodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) ); decodedData[decodedIndex++] = (byte)( b3<<6 | b4 ); } else if ( b3isp ) { //Two PAD e.g. 3c[Pad][Pad] decodedData[decodedIndex++] = (byte)( b1 <<2 | b2>>4 ) ; } else if ( b4isp ) { //One PAD e.g. 3cQ[Pad] b3 = base64Alphabet[d3]; decodedData[decodedIndex++] = (byte)( b1 <<2 | b2>>4 ); decodedData[decodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) ); } } return decodedData; } | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/8ed508e64c651e19e7e8b1df448944b1f365598c/Base64.java/buggy/src/org/apache/xerces/utils/Base64.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1160,
8526,
2495,
12,
1160,
8526,
1026,
1105,
751,
262,
288,
3639,
309,
261,
1969,
1105,
751,
422,
446,
13,
5411,
327,
446,
31,
3639,
509,
769,
273,
1026,
1105,
751,
18,
2469... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1160,
8526,
2495,
12,
1160,
8526,
1026,
1105,
751,
262,
288,
3639,
309,
261,
1969,
1105,
751,
422,
446,
13,
5411,
327,
446,
31,
3639,
509,
769,
273,
1026,
1105,
751,
18,
2469... |
super.initPlugin(daemon); | public void initPlugin(LockssDaemon daemon){ super.initPlugin(daemon); configurationMap.putString(CM_NAME_KEY, PLUGIN_NAME); configurationMap.putString(CM_VERSION_KEY, CURRENT_VERSION); configurationMap.putCollection(CM_CONFIG_PROPS_KEY, ListUtil.list(PD_BASE, PD_DIR, PD_VOL)); configurationMap.putCollection(CM_DEFINING_CONFIG_PROPS_KEY, ListUtil.list(AUPARAM_BASE_URL, AUPARAM_JOURNAL_DIR, AUPARAM_VOL)); configurationMap.setMapElement(CM_TITLE_SPEC_KEY, titleSpec); } | 8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/3860e240c90116399200df8a06da74e254b625bf/ProjectMusePlugin.java/buggy/src/org/lockss/plugin/projmuse/ProjectMusePlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1208,
3773,
12,
2531,
1049,
12858,
8131,
15329,
540,
1664,
863,
18,
458,
780,
12,
9611,
67,
1985,
67,
3297,
16,
22704,
67,
1985,
1769,
565,
1664,
863,
18,
458,
780,
12,
9611,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
3773,
12,
2531,
1049,
12858,
8131,
15329,
540,
1664,
863,
18,
458,
780,
12,
9611,
67,
1985,
67,
3297,
16,
22704,
67,
1985,
1769,
565,
1664,
863,
18,
458,
780,
12,
9611,... | |
step = new RootNode(pool); | step = new RootNode(); | public static Expression createFunction( BrokerPool pool, StaticContext context, PathExpr parent, String fnName, Vector params) throws EXistException, PermissionDeniedException { Expression step = null; if (fnName.equals("document")) { DocumentSet docs = null; DBBroker broker = null; try { broker = pool.get(); if (params.size() == 0) docs = broker.getAllDocuments(context.getUser()); else { docs = new DocumentSet(); String next; DocumentImpl doc; for (int i = 0; i < params.size(); i++) { next = ((PathExpr) params.elementAt(i)).getLiteralValue(); doc = (DocumentImpl) broker.getDocument(context.getUser(), next); if (doc != null) docs.add(doc); } } } finally { pool.release(broker); } step = new RootNode(pool); parent.add(step); parent.setDocumentSet(docs); } if (fnName.equals("collection") || fnName.equals("xcollection")) { DocumentSet docs = new DocumentSet(); DBBroker broker = null; boolean inclusive = fnName.equals("collection"); try { broker = pool.get(); String next; DocumentSet temp; for (int i = 0; i < params.size(); i++) { next = ((PathExpr) params.elementAt(i)).getLiteralValue(); temp = broker.getDocumentsByCollection(context.getUser(), next, inclusive); docs.addAll(temp); } } finally { pool.release(broker); } step = new RootNode(pool); parent.add(step); parent.setDocumentSet(docs); } if (fnName.equals("doctype")) { DocumentSet docs = new DocumentSet(); DBBroker broker = null; try { broker = pool.get(); String next; DocumentSet temp; for (int i = 0; i < params.size(); i++) { next = ((PathExpr) params.elementAt(i)).getLiteralValue(); temp = broker.getDocumentsByDoctype(context.getUser(), next); docs.addAll(temp); } } finally { pool.release(broker); } step = new RootNode(pool); parent.add(step); parent.setDocumentSet(docs); } // near(node-set, string) if (fnName.equals("near")) { if (params.size() < 2) throw new IllegalArgumentException("Function near requires two arguments"); PathExpr p1 = (PathExpr) params.elementAt(1); if (p1.getLength() == 0) throw new IllegalArgumentException("Second argument to near is empty"); Expression e1 = p1.getExpression(0); if(!(e1 instanceof Literal)) throw new IllegalArgumentException("Second argument has to be a literal expression"); ExtNear near = new ExtNear(pool); near.addTerms(((Literal)e1).getLiteral()); near.setPath((PathExpr)params.elementAt(0)); step = near; parent.addPath(near); } // ends-with(node-set, string) if (fnName.equals("starts-with")) { if (params.size() < 2) throw new IllegalArgumentException("Function starts-with requires two arguments"); PathExpr p0 = (PathExpr) params.elementAt(0); PathExpr p1 = (PathExpr) params.elementAt(1); if (p1.getLength() == 0) throw new IllegalArgumentException("Second argument to starts-with is empty"); Expression e1 = p1.getExpression(0); if (e1 instanceof Literal && p0.returnsType() == Constants.TYPE_NODELIST) { Literal l = (Literal) e1; l.setLiteral(l.getLiteral() + '%'); OpEquals op = new OpEquals(pool, p0, e1, Constants.EQ); parent.addPath(op); step = op; } } // ends-with(node-set, string) if (fnName.equals("ends-with")) { if (params.size() < 2) throw new IllegalArgumentException("Function ends-with requires two arguments"); PathExpr p0 = (PathExpr) params.elementAt(0); PathExpr p1 = (PathExpr) params.elementAt(1); if (p1.getLength() == 0) throw new IllegalArgumentException("Second argument to ends-with is empty"); Expression e1 = p1.getExpression(0); if (e1 instanceof Literal && p0.returnsType() == Constants.TYPE_NODELIST) { Literal l = (Literal) e1; l.setLiteral('%' + l.getLiteral()); OpEquals op = new OpEquals(pool, p0, e1, Constants.EQ); parent.addPath(op); step = op; } } // contains(node-set, string) if (fnName.equals("contains")) { if (params.size() < 2) throw new IllegalArgumentException("Function contains requires two arguments"); PathExpr p0 = (PathExpr) params.elementAt(0); PathExpr p1 = (PathExpr) params.elementAt(1); if (p1.getLength() == 0) throw new IllegalArgumentException("Second argument to contains is empty"); Expression e1 = p1.getExpression(0); if (e1 instanceof Literal && p0.returnsType() == Constants.TYPE_NODELIST) { Literal l = (Literal) e1; l.setLiteral('%' + l.getLiteral() + '%'); OpEquals op = new OpEquals(pool, p0, e1, Constants.EQ); parent.addPath(op); step = op; } } if (step == null) { String clazz = context.getClassForFunction(fnName); if (clazz == null) throw new EXistException("function " + fnName + " not defined"); Function func = Function.createFunction(pool, clazz); parent.addPath(func); for (int i = 0; i < params.size(); i++) func.addArgument((PathExpr) params.elementAt(i)); step = func; } return step; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/bfcf33dba9c98234a0edaa282c8909b27b6a6ac4/Util.java/buggy/src/org/exist/parser/Util.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
5371,
752,
2083,
12,
202,
202,
11194,
2864,
2845,
16,
202,
202,
5788,
1042,
819,
16,
202,
202,
743,
4742,
982,
16,
202,
202,
780,
2295,
461,
16,
202,
202,
5018,
859,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
5371,
752,
2083,
12,
202,
202,
11194,
2864,
2845,
16,
202,
202,
5788,
1042,
819,
16,
202,
202,
743,
4742,
982,
16,
202,
202,
780,
2295,
461,
16,
202,
202,
5018,
859,
13... |
return new String[0][]; | return new String[0][]; | public String[][] getAllDocumentTypes( String langPrefixStr ) { return new String[0][]; // TODO } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/c83617d9726a104623b6b1e5e60386ce5debb0ff/MockImcmsServices.java/buggy/server/src/imcode/server/MockImcmsServices.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
63,
6362,
65,
5514,
2519,
2016,
12,
514,
3303,
2244,
1585,
262,
288,
3639,
327,
394,
514,
63,
20,
6362,
15533,
225,
368,
2660,
565,
289,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
63,
6362,
65,
5514,
2519,
2016,
12,
514,
3303,
2244,
1585,
262,
288,
3639,
327,
394,
514,
63,
20,
6362,
15533,
225,
368,
2660,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100... |
if (ic>=numChars || it>=numTaxa || ic < 0 || it < 0) { return true; } if (matrix != null && (ic >= matrix.length || matrix.length<1 || matrix[0] == null || it >= matrix[0].length)) { if (!doomed) MesquiteMessage.warnProgrammer("Error: CategoricalData notInStorage #1"); return true; } if (matrixShort != null && (ic >= matrixShort.length || matrixShort.length<1 || matrixShort[0] == null || it >= matrixShort[0].length)){ if (!doomed) MesquiteMessage.warnProgrammer("Error: CategoricalData notInStorage #2"); return true; } if (matrixShort == null && matrix == null){ if (!doomed) MesquiteMessage.warnProgrammer("Error: CategoricalData notInStorage #3"); return true; } return false; } | if (ic>=numChars || it>=numTaxa || ic < 0 || it < 0) { return true; } if (matrix != null && (ic >= matrix.length || matrix.length<1 || matrix[0] == null || it >= matrix[0].length)) { if (!doomed) MesquiteMessage.warnProgrammer("Error: CategoricalData notInStorage #1"); return true; } if (matrixShort != null && (ic >= matrixShort.length || matrixShort.length<1 || matrixShort[0] == null || it >= matrixShort[0].length)){ if (!doomed) MesquiteMessage.warnProgrammer("Error: CategoricalData notInStorage #2"); return true; } if (matrixShort == null && matrix == null){ if (!doomed) MesquiteMessage.warnProgrammer("Error: CategoricalData notInStorage #3"); return true; } return false; } | protected boolean notInStorage(int ic, int it) { if (ic>=numChars || it>=numTaxa || ic < 0 || it < 0) { return true; } if (matrix != null && (ic >= matrix.length || matrix.length<1 || matrix[0] == null || it >= matrix[0].length)) { if (!doomed) MesquiteMessage.warnProgrammer("Error: CategoricalData notInStorage #1"); return true; } if (matrixShort != null && (ic >= matrixShort.length || matrixShort.length<1 || matrixShort[0] == null || it >= matrixShort[0].length)){ if (!doomed) MesquiteMessage.warnProgrammer("Error: CategoricalData notInStorage #2"); return true; } if (matrixShort == null && matrix == null){ if (!doomed) MesquiteMessage.warnProgrammer("Error: CategoricalData notInStorage #3"); return true; } return false; } | 56479 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56479/f13d81739af31354f83b14c9490772258666d61b/CategoricalData.java/clean/Source/mesquite/categ/lib/CategoricalData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
202,
1117,
1250,
486,
382,
3245,
12,
474,
13579,
16,
509,
518,
13,
288,
565,
202,
202,
430,
261,
335,
34,
33,
2107,
7803,
747,
518,
34,
33,
2107,
7731,
69,
747,
13579,
411,
374,
747,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
202,
1117,
1250,
486,
382,
3245,
12,
474,
13579,
16,
509,
518,
13,
288,
565,
202,
202,
430,
261,
335,
34,
33,
2107,
7803,
747,
518,
34,
33,
2107,
7731,
69,
747,
13579,
411,
374,
747,
... |
VM_Word mask = VM_Word.fromIntZeroExtend(BUFFER_SIZE - 1); return buf.toWord().and(mask).toOffset(); | return buf.toWord().and(BUFFER_MASK).toOffset(); | protected final VM_Offset bufferOffset(VM_Address buf) throws VM_PragmaInline { VM_Word mask = VM_Word.fromIntZeroExtend(BUFFER_SIZE - 1); return buf.toWord().and(mask).toOffset(); } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/abcf642086530af03e09efc059695a6935feb221/Deque.java/buggy/MMTk/src/org/mmtk/utility/deque/Deque.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
727,
8251,
67,
2335,
1613,
2335,
12,
7397,
67,
1887,
1681,
13,
1216,
8251,
67,
2050,
9454,
10870,
288,
565,
8251,
67,
3944,
3066,
273,
8251,
67,
3944,
18,
2080,
1702,
7170,
16675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
8251,
67,
2335,
1613,
2335,
12,
7397,
67,
1887,
1681,
13,
1216,
8251,
67,
2050,
9454,
10870,
288,
565,
8251,
67,
3944,
3066,
273,
8251,
67,
3944,
18,
2080,
1702,
7170,
16675,
... |
KoLmafia.updateDisplay( PENDING_STATE, "You couldn't make it all the way to the back door." ); | lastUpdate = "You couldn't make it all the way to the back door."; KoLmafia.updateDisplay( PENDING_STATE, lastUpdate ); | protected void processResults() { // Check for familiar growth - if a familiar is added, // make sure to update the client. if ( consumptionType == GROW_FAMILIAR ) { if ( responseText.indexOf( "You've already got a familiar of that type." ) != -1 ) { KoLmafia.updateDisplay( "You already have that familiar." ); return; } KoLCharacter.addFamiliar( FamiliarsDatabase.growFamiliarLarva( itemUsed.getItemID() ) ); // Use up the familiar larva client.processResult( itemUsed.getInstance( -1 ) ); // Pop up a window showing the result client.showHTML( trimInventoryText( responseText ), "Your new familiar" ); return; } if ( responseText.indexOf( "You may not" ) != -1 ) { KoLmafia.updateDisplay( PENDING_STATE, "Pathed ascension." ); return; } if ( responseText.indexOf( "rupture" ) != -1 ) { KoLCharacter.reachSpleenLimit(); KoLmafia.updateDisplay( "Your spleen might go kabooie." ); return; } // Check to make sure that it wasn't a food or drink // that was consumed that resulted in nothing. Eating // too much is flagged as a continuable state. if ( responseText.indexOf( "too full" ) != -1 ) { KoLmafia.updateDisplay( PENDING_STATE, "Consumption limit reached." ); return; } if ( responseText.indexOf( "too drunk" ) != -1 ) { KoLmafia.updateDisplay( PENDING_STATE, "Inebriety limit reached." ); return; } int originalEffectCount = KoLCharacter.getEffects().size(); // Perform item-specific processing switch ( itemUsed.getItemID() ) { case GIFT1: case GIFT2: case GIFT3: case GIFT4: case GIFT5: case GIFT6: case GIFT7: case GIFT8: case GIFT9: case GIFT10: case GIFT11: case GIFTV: case GIFTR: // If it's a gift package, get the inner message // "You can't receive things from other players // right now." if ( responseText.indexOf( "You can't receive things" ) != -1 ) { KoLmafia.updateDisplay( PENDING_STATE, "You can't open that package yet." ); return; } // Find out who sent it Matcher matcher = Pattern.compile( "From: <b>(.*?)</b>" ).matcher( responseText ); String title = matcher.find() ? "Gift from " + matcher.group(1) : "Your gift"; // Pop up a window showing what was in the gift. client.showHTML( trimInventoryText( responseText ), title ); break; case GATES_SCROLL: // You can only use a 64735 scroll if you have the // original dictionary in your inventory // "Even though your name isn't Lee, you're flattered // and hand over your dictionary." if ( responseText.indexOf( "you're flattered" ) == -1 ) return; // Remove the old dictionary client.processResult( FightRequest.DICTIONARY1.getNegation() ); break; case ENCHANTED_BEAN: // There are three possibilities: // If you haven't been give the quest, "you can't find // anywhere that looks like a good place to plant the // bean" and you're told to "wait until later" // If you've already planted one, "There's already a // beanstalk in the Nearby Plains." In either case, the // bean is not consumed. // Otherwise, "it immediately grows into an enormous // beanstalk". if ( responseText.indexOf( "grows into an enormous beanstalk" ) == -1 ) return; break; case HEY_DEZE_MAP: // "Your song has pleased me greatly. I will reward you // with some of my crazy imps, to do your bidding." if ( responseText.indexOf( "pleased me greatly" ) == -1 ) { KoLmafia.updateDisplay( PENDING_STATE, "You music was inadequate." ); return; } break; case GIANT_CASTLE_MAP: // "I'm sorry, adventurer, but the Sorceress is in // another castle!" if ( responseText.indexOf( "Sorceress is in another castle" ) == -1 ) { KoLmafia.updateDisplay( PENDING_STATE, "You couldn't make it all the way to the back door." ); return; } break; case DRASTIC_HEALING: // If a scroll of drastic healing was used and didn't // crumble, it is not consumed client.processResult( new AdventureResult( AdventureResult.HP, KoLCharacter.getMaximumHP() ) ); if ( responseText.indexOf( "crumble" ) == -1 ) { KoLCharacter.updateStatus(); return; } break; case TEARS: KoLCharacter.getEffects().remove( KoLAdventure.BEATEN_UP ); break; case ANTIDOTE: KoLCharacter.getEffects().remove( POISON ); break; case TINY_HOUSE: // Tiny houses remove lots of different effects. client.applyTinyHouseEffect(); break; case RAFFLE_TICKET: // The first time you use an Elf Farm Raffle ticket // with a ten-leaf clover in your inventory, the clover // disappears in a puff of smoke and you get pagoda // plans. // // Subsequent raffle tickets don't consume clovers. if ( responseText.indexOf( "puff of smoke" ) != -1 ) client.processResult( SewerRequest.CLOVER ); break; case KETCHUP_HOUND: // Successfully using a ketchup hound uses up the Hey // Deze nuts and pagoda plan. if ( responseText.indexOf( "pagoda" ) != -1 ) { client.processResult( NUTS ); client.processResult( PLAN ); } // The ketchup hound does not go away... return; case LUCIFER: // Jumbo Dr. Lucifer reduces your hit points to 1. client.processResult( new AdventureResult( AdventureResult.HP, 1 - KoLCharacter.getCurrentHP() ) ); break; case DOLPHIN_KING_MAP: // "You follow the Dolphin King's map to the bottom of // the sea, and find his glorious treasure." if ( responseText.indexOf( "find his glorious treasure" ) == -1 ) { KoLmafia.updateDisplay( PENDING_STATE, "You don't have everything you need." ); return; } break; case SLUG_LORD_MAP: // "You make your way to the deepest part of the tank, // and find a chest engraved with the initials S. L." if ( responseText.indexOf( "deepest part of the tank" ) == -1 ) { KoLmafia.updateDisplay( PENDING_STATE, "You don't have everything you need." ); return; } break; case DR_HOBO_MAP: // "You place it atop the Altar, and grab the Scalpel // at the exact same moment." if ( responseText.indexOf( "exact same moment" ) == -1 ) { KoLmafia.updateDisplay( PENDING_STATE, "You don't have everything you need." ); return; } break; case SPOOKY_TEMPLE_MAP: // "You plant your Spooky Sapling in the loose soil at // the base of the Temple. You spray it with your // Spooky-Gro Fertilizer, and it immediately grows to // 20 feet in height. You can easily climb the // branches to reach the first step of the Temple // now..." if ( responseText.indexOf( "easily climb the branches" ) == -1 ) { KoLmafia.updateDisplay( PENDING_STATE, "You don't have everything you need." ); return; } client.processResult( SAPLING ); client.processResult( FERTILIZER ); break; case DINGHY_PLANS: // "You need some planks to build the dinghy." if ( responseText.indexOf( "need some planks" ) != -1 ) { KoLmafia.updateDisplay( PENDING_STATE, "You need some dingy planks." ); return; } client.processResult( PLANKS ); break; case FENG_SHUI: // Successfully using "Feng Shui for Big Dumb Idiots" // consumes the decorative fountain and windchimes. // Only used up once if ( responseText.indexOf( "Feng Shui goodness" ) == -1 ) return; client.processResult( FOUNTAIN ); client.processResult( WINDCHIMES ); break; case WARM_SUBJECT: // The first time you use Warm Subject gift // certificates when you have the Torso Awaregness // skill consumes only one, even if you tried to // multi-use the item. // "You go to Warm Subject and browse the shirts for a // while. You find one that you wouldn't mind wearing // ironically. There seems to be only one in the store, // though." if ( responseText.indexOf( "ironically" ) != -1 ) { client.processResult( itemUsed.getInstance( -1 ) ); super.processResults(); return; } break; case PURPLE: case GREEN: case ORANGE: case RED: case BLUE: case BLACK: // "Your mouth is still cold from the last snowcone you // ate. Try again later." if ( responseText.indexOf( "still cold" ) != -1 ) { KoLmafia.updateDisplay( "Your mouth is too cold." ); return; } break; case ROLLING_PIN: // Rolling pins remove dough from your inventory // They are not consumed by being used client.processResult( DOUGH.getInstance( DOUGH.getCount( KoLCharacter.getInventory() ) ).getNegation() ); return; case UNROLLING_PIN: // Unrolling pins remove flat dough from your inventory // They are not consumed by being used client.processResult( FLAT_DOUGH.getInstance( FLAT_DOUGH.getCount( KoLCharacter.getInventory() ) ).getNegation() ); return; case PLUS_SIGN: // "Following The Oracle's advice, you treat the plus // sign as a book, and read it." if ( responseText.indexOf( "you treat the plus sign as a book" ) == -1 ) { KoLmafia.updateDisplay( PENDING_STATE, "You don't know how to use it." ); return; } break; case YETI_PROTEST_SIGN: // You don't use up a Yeti Protest Sign by protesting return; // Campground items which change character state case CHEF: case CLOCKWORK_CHEF: KoLCharacter.setChef( true ); break; case BARTENDER: case CLOCKWORK_BARTENDER: KoLCharacter.setBartender( true ); break; case TOASTER: KoLCharacter.setToaster( true ); break; case ARCHES: KoLCharacter.setArches( true ); break; case SNOWCONE_TOME: // "You read the incantation written on the pages of // the tome. Snowflakes coalesce in your // mind. Delicious snowflakes." if ( responseText.indexOf( "You read the incantation" ) == -1 ) return; KoLCharacter.addAvailableSkill( new UseSkillRequest( client, "Summon Snowcone", "", 1 ) ); break; case HILARIOUS_TOME: // "You pore over the tome, and sophomoric humor pours // into your brain. The mysteries of McPhee become // clear to you." if ( responseText.indexOf( "You pore over the tome" ) == -1 ) return; KoLCharacter.addAvailableSkill( new UseSkillRequest( client, "Summon Hilarious Objects", "", 1 ) ); break; case ASTRAL_MUSHROOM: // "You eat the mushroom, and are suddenly engulfed in // a whirling maelstrom of colors and sensations as // your awareness is whisked away to some strange // alternate dimension. Who would have thought that a // glowing, ethereal mushroom could have that kind of // effect?" // // vs. // // "Whoo, man, lemme tell you, you don't need to be // eating another one of those just now, okay?" if ( responseText.indexOf( "whirling maelstrom" ) == -1 ) return; StaticEntity.setProperty( "nextAdventure", "" ); break; } // We might have removed - or added - an effect needsRefresh |= originalEffectCount != KoLCharacter.getEffects().size(); // If we get here, we know that the item is consumed by being // used. Do so. client.processResult( itemUsed.getNegation() ); super.processResults(); } | 50364 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50364/3d6032820223caf77059ca3cf29800de7e114df2/ConsumeItemRequest.java/clean/src/net/sourceforge/kolmafia/ConsumeItemRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1207,
3447,
1435,
202,
95,
202,
202,
759,
2073,
364,
284,
11580,
77,
297,
13334,
451,
300,
309,
279,
284,
11580,
77,
297,
353,
3096,
16,
202,
202,
759,
1221,
3071,
358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1207,
3447,
1435,
202,
95,
202,
202,
759,
2073,
364,
284,
11580,
77,
297,
13334,
451,
300,
309,
279,
284,
11580,
77,
297,
353,
3096,
16,
202,
202,
759,
1221,
3071,
358,
... |
_state = STATE_END; | _state=STATE_END; | public boolean parseNext() throws IOException { if (_buffer==null) { _header = _buffers.getBuffer(_headerBufferSize); _buffer = _header; _tok0 = new View(_header); _tok1 = new View(_header); _tok0.setPutIndex(_tok0.getIndex()); _tok1.setPutIndex(_tok1.getIndex()); } if (_state == STATE_END) throw new IllegalStateException("STATE_END"); if (_state == STATE_CONTENT && _contentPosition == _contentLength) { _state = STATE_END; _handler.messageComplete(_contentPosition); return false; } int length=_buffer.length(); boolean fill_called=false; // Fill buffer if we can if (length == 0) { int filled = -1; if (_content!=null && _buffer!=_content) { _buffer=_content; filled=_buffer.length(); } if (_buffer.markIndex() == 0 && _buffer.putIndex() == _buffer.capacity()) throw new IOException("FULL"); if (_endp != null && filled<=0) { // Compress buffer if handling _content buffer // TODO check this is not moving data too much if (_buffer == _content) _buffer.compact(); if (_buffer.space() == 0) { throw new IOException("FULL"); } try { filled = _endp.fill(_buffer); fill_called=true; } catch(IOException ioe) { Log.debug(ioe); reset(true); throw new IOException("EOF"); } } if (filled < 0 && _state == STATE_EOF_CONTENT) { _state = STATE_END; _handler.messageComplete(_contentPosition); return fill_called; } if (filled < 0) { reset(true); throw new IOException("EOF"); } length=_buffer.length(); } // EventHandler header byte ch; byte[] array = _buffer.array(); Buffer cached = null; while (_state < STATE_END && length-->0) { ch = _buffer.get(); if (_eol == CARRIAGE_RETURN && ch == LINE_FEED) { _eol = LINE_FEED; continue; } _eol = 0; switch (_state) { case STATE_START: _contentLength = UNKNOWN_CONTENT; if (ch > SPACE) { _buffer.mark(); _state = STATE_FIELD0; } break; case STATE_FIELD0: if (ch == SPACE) { _tok0.update(_buffer.markIndex(), _buffer.getIndex() - 1); _state = STATE_SPACE1; continue; } else if (ch < SPACE) { throw new IOException("BAD"); } break; case STATE_SPACE1: if (ch > SPACE) { _buffer.mark(); _state = STATE_FIELD1; _response = ch >= '1' && ch <= '5'; } else if (ch < SPACE) { throw new IOException("BAD"); } break; case STATE_FIELD1: if (ch == SPACE) { _tok1.update(_buffer.markIndex(), _buffer.getIndex() - 1); _state = STATE_SPACE2; continue; } else if (ch < SPACE) { // HTTP/0.9 _handler.startRequest(HttpMethods.CACHE.lookup(_tok0), _buffer .sliceFromMark(), null); _state = STATE_END; _handler.headerComplete(); _handler.messageComplete(_contentPosition); return fill_called; } break; case STATE_SPACE2: if (ch > SPACE) { _buffer.mark(); _state = STATE_FIELD2; } else if (ch < SPACE) { // HTTP/0.9 _handler.startRequest(HttpMethods.CACHE.lookup(_tok0), _tok1, null); _state = STATE_END; _handler.headerComplete(); _handler.messageComplete(_contentPosition); return fill_called; } break; case STATE_FIELD2: if (ch == CARRIAGE_RETURN || ch == LINE_FEED) { if (_response) _handler.startResponse(HttpVersions.CACHE.lookup(_tok0), BufferUtil .toInt(_tok1), _buffer.sliceFromMark()); else _handler.startRequest(HttpMethods.CACHE.lookup(_tok0), _tok1, HttpVersions.CACHE.lookup(_buffer.sliceFromMark())); _eol = ch; _state = STATE_HEADER; _tok0.setPutIndex(_tok0.getIndex()); _tok1.setPutIndex(_tok1.getIndex()); _multiLineValue = null; return fill_called; } break; case STATE_HEADER: if (ch == COLON || ch == SPACE || ch == TAB) { // header value without name - continuation? _length = -1; _state = STATE_HEADER_VALUE; } else { // handler last header if any if (cached!=null || _tok0.length() > 0 || _tok1.length() > 0 || _multiLineValue != null) { Buffer header = cached!=null?cached:HttpHeaders.CACHE.lookup(_tok0); cached=null; Buffer value = _multiLineValue == null ? (Buffer) _tok1 : (Buffer) new ByteArrayBuffer(_multiLineValue); int ho = HttpHeaders.CACHE.getOrdinal(header); if (ho >= 0) { int vo = -1; switch (ho) { case HttpHeaders.CONTENT_LENGTH_ORDINAL: if (_contentLength != CHUNKED_CONTENT) { _contentLength = BufferUtil.toInt(value); if (_contentLength <= 0) _contentLength = HttpParser.NO_CONTENT; } break; case HttpHeaders.CONNECTION_ORDINAL: // TODO comma list of connections !!! value = HttpHeaderValues.CACHE.lookup(value); break; case HttpHeaders.TRANSFER_ENCODING_ORDINAL: value = HttpHeaderValues.CACHE.lookup(value); vo=HttpHeaderValues.CACHE.getOrdinal(value); if (HttpHeaderValues.CHUNKED_ORDINAL == vo) _contentLength = CHUNKED_CONTENT; else { // TODO avoid string conversion here String c = value.toString(); if (c.endsWith(HttpHeaderValues.CHUNKED)) _contentLength = CHUNKED_CONTENT; else if (c.indexOf(HttpHeaderValues.CHUNKED) >= 0) throw new HttpException(400,null); } break; case HttpHeaders.CONTENT_TYPE_ORDINAL: _hasContent = true; break; } } _handler.parsedHeader(header, value); _tok0.setPutIndex(_tok0.getIndex()); _tok1.setPutIndex(_tok1.getIndex()); _multiLineValue = null; } // now handle ch if (ch == CARRIAGE_RETURN || ch == LINE_FEED) { // End of header // work out the _content demarcation if (_contentLength == UNKNOWN_CONTENT) { if (_hasContent || _response) _contentLength = EOF_CONTENT; else _contentLength = NO_CONTENT; } _contentPosition = 0; _eol = ch; switch (_contentLength) { case HttpParser.EOF_CONTENT: _state = STATE_EOF_CONTENT; if(_content==null && _buffers!=null) _content=_buffers.getBuffer(_contentBufferSize); _handler.headerComplete(); // May recurse here ! break; case HttpParser.CHUNKED_CONTENT: _state = STATE_CHUNKED_CONTENT; if (_content==null && _buffers!=null) _content=_buffers.getBuffer(_contentBufferSize); _handler.headerComplete(); // May recurse here ! break; case HttpParser.NO_CONTENT: _state = STATE_END; _handler.headerComplete(); // May recurse here ! _handler.messageComplete(_contentPosition); break; default: _state = STATE_CONTENT; if(_buffers!=null && _content==null && _buffer==_header && _contentLength>(_header.capacity()-_header.getIndex())) _content=_buffers.getBuffer(_contentBufferSize); _handler.headerComplete(); // May recurse here ! break; } return fill_called; } else { // New header _length = 1; _buffer.mark(); _state = STATE_HEADER_NAME; // try cached name! cached = HttpHeaders.CACHE.getBest(array, _buffer.markIndex(), length+1); if (cached!=null) { _length=cached.length(); _buffer.setGetIndex(_buffer.markIndex()+_length); length=_buffer.length(); } } } break; case STATE_HEADER_NAME: if (ch == CARRIAGE_RETURN || ch == LINE_FEED) { if (_length > 0) _tok0.update(_buffer.markIndex(), _buffer.markIndex() + _length); _eol = ch; _state = STATE_HEADER; } else if (ch == COLON) { if (_length > 0 && cached==null) _tok0.update(_buffer.markIndex(), _buffer.markIndex() + _length); _length = -1; _state = STATE_HEADER_VALUE; } else if (ch != SPACE && ch != TAB) { // Drag the mark if (_length == -1) _buffer.mark(); _length = _buffer.getIndex() - _buffer.markIndex(); } break; case STATE_HEADER_VALUE: if (ch == CARRIAGE_RETURN || ch == LINE_FEED) { if (_length > 0) { if (_tok1.length() == 0) _tok1.update(_buffer.markIndex(), _buffer.markIndex() + _length); else { // Continuation line! // TODO - deal with CR LF and COLON? if (_multiLineValue == null) _multiLineValue = _tok1.toString(); _tok1.update(_buffer.markIndex(), _buffer.markIndex() + _length); _multiLineValue += " " + _tok1.toString(); } } _eol = ch; _state = STATE_HEADER; } else if (ch != SPACE && ch != TAB) { if (_length == -1) _buffer.mark(); _length = _buffer.getIndex() - _buffer.markIndex(); } break; } } // end of HEADER states loop // Handle _content Buffer chunk; length = _buffer.length(); while (_state > STATE_END && length > 0) { if (_eol == CARRIAGE_RETURN && _buffer.peek() == LINE_FEED) { _eol = _buffer.get(); length = _buffer.length(); continue; } _eol = 0; switch (_state) { case STATE_EOF_CONTENT: chunk = _buffer.get(_buffer.length()); _contentPosition += chunk.length(); _handler.content(chunk); return fill_called; case STATE_CONTENT: { int remaining = _contentLength - _contentPosition; if (remaining == 0) { _state = STATE_END; _handler.messageComplete(_contentPosition); return fill_called; } else if (length > remaining) length = remaining; chunk = _buffer.get(length); _contentPosition += chunk.length(); _handler.content(chunk); return fill_called; } case STATE_CHUNKED_CONTENT: { ch = _buffer.peek(); if (ch == CARRIAGE_RETURN || ch == LINE_FEED) _eol = _buffer.get(); else if (ch <= SPACE) _buffer.get(); else { _chunkLength = 0; _chunkPosition = 0; _state = STATE_CHUNK_SIZE; } break; } case STATE_CHUNK_SIZE: { ch = _buffer.get(); if (ch == CARRIAGE_RETURN || ch == LINE_FEED) { _eol = ch; if (_chunkLength == 0) { _state = STATE_END; _handler.messageComplete(_contentPosition); return fill_called; } else _state = STATE_CHUNK; } else if (ch <= SPACE || ch == SEMI_COLON) _state = STATE_CHUNK_PARAMS; else if (ch >= '0' && ch <= '9') _chunkLength = _chunkLength * 16 + (ch - '0'); else if (ch >= 'a' && ch <= 'f') _chunkLength = _chunkLength * 16 + (10 + ch - 'a'); else if (ch >= 'A' && ch <= 'F') _chunkLength = _chunkLength * 16 + (10 + ch - 'A'); else throw new IOException("bad chunk char: " + ch); break; } case STATE_CHUNK_PARAMS: { ch = _buffer.get(); if (ch == CARRIAGE_RETURN || ch == LINE_FEED) { _eol = ch; if (_chunkLength == 0) { _state = STATE_END; _handler.messageComplete(_contentPosition); return fill_called; } else _state = STATE_CHUNK; } break; } case STATE_CHUNK: { int remaining = _chunkLength - _chunkPosition; if (remaining == 0) { _state = STATE_CHUNKED_CONTENT; break; } else if (length > remaining) length = remaining; chunk = _buffer.get(length); _contentPosition += chunk.length(); _chunkPosition += chunk.length(); _handler.content(chunk); return fill_called; } } length = _buffer.length(); } return fill_called; } | 13242 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13242/ca67d639c4b4cf51ddb7b16c09566ea524f43a6f/HttpParser.java/buggy/trunk/modules/jetty/src/main/java/org/mortbay/jetty/HttpParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1109,
2134,
1435,
1216,
1860,
565,
288,
3639,
309,
261,
67,
4106,
631,
2011,
13,
3639,
288,
5411,
389,
3374,
273,
389,
28101,
18,
588,
1892,
24899,
3374,
15384,
1769,
5411,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1109,
2134,
1435,
1216,
1860,
565,
288,
3639,
309,
261,
67,
4106,
631,
2011,
13,
3639,
288,
5411,
389,
3374,
273,
389,
28101,
18,
588,
1892,
24899,
3374,
15384,
1769,
5411,
38... |
if (log.isDebugEnabled()) log .debug("run: PropVirtual interface for nodeid. Skipping "); | if (log.isInfoEnabled()) log .info("run: PropVirtual interface for nodeid. Skipping "); | public void run() { Category log = ThreadCategory.getInstance(getClass()); if (suspendCollection) { log.debug("DiscoveryLink.run: Suspended!"); } else { LinkableNode[] all_snmplinknodes = Linkd.getInstance() .getSnmpLinkableNodes(); Iterator ite = null; for (int i = 0; i < all_snmplinknodes.length; i++) { LinkableNode curNode = all_snmplinknodes[i]; if (curNode == null) { log.error("run: null linkable node found for iterator " + i); continue; } int curNodeId = curNode.getNodeId(); activenode.add(curNode); if (curNode.isBridgeNode) m_bridge.put(new Integer(curNodeId), curNode); if (curNode.hasCdpInterfaces()) cdpNodes.add(curNode); if (curNode.hasRouteInterfaces()) routerNodes.add(curNode); if (curNode.hasAtInterfaces()) { ite = curNode.getAtInterfaces().iterator(); while (ite.hasNext()) { AtInterface at = (AtInterface) ite.next(); String macAddress = at.getMacAddress(); macToAtinterface.put(macAddress, at); Integer node = new Integer(at.getNodeId()); java.util.Set<String> macs = new HashSet<String>(); if (nodeToMac.containsKey(node)) { macs = nodeToMac.get(node); } macs.add(macAddress); nodeToMac.put(node, macs); } } } if (log.isDebugEnabled()) log .debug("run: finding links among nodes using Cisco Discovery Protocol"); // First of all use quick methods to get backbone ports for speeding // up // the link discovery!!!!! // Try Cisco Discovery Protocol to found link among all nodes // Add CDP info for backbones // complete discovery!!!!! ite = cdpNodes.iterator(); while (ite.hasNext()) { LinkableNode curNode = (LinkableNode) ite.next(); int curCdpNodeId = curNode.getNodeId(); String curCdpIpAddr = curNode.getSnmpPrimaryIpAddr(); if (log.isDebugEnabled()) log.debug("run: parsing nodeid " + curCdpNodeId + " ip address " + curCdpIpAddr + " with " + curNode.getCdpInterfaces().size() + " Cdp Interfaces. "); Iterator sub_ite = curNode.getCdpInterfaces().iterator(); while (sub_ite.hasNext()) { CdpInterface cdpIface = (CdpInterface) sub_ite.next(); int cdpIfIndex = cdpIface.getCdpIfIndex(); if (cdpIfIndex < 0) { log.warn("run: found not valid CDP IfIndex " + cdpIfIndex + " . Skipping"); continue; } InetAddress targetIpAddr = cdpIface.getCdpTargetIpAddr(); int targetCdpNodeId = cdpIface.getCdpTargetNodeId(); if (targetCdpNodeId == -1) { if (log.isDebugEnabled()) log.debug("run: no node id found for ip address " + targetIpAddr.getHostAddress() + ". Skipping"); continue; } if (targetCdpNodeId == curCdpNodeId) { if (log.isDebugEnabled()) log.debug("run: node id found for ip address " + targetIpAddr.getHostAddress() + " is itself. Skipping"); continue; } int cdpDestIfindex = cdpIface.getCdpTargetIfIndex(); if (cdpDestIfindex < 0) { log .warn("run: found not valid CDP destination IfIndex " + cdpDestIfindex + " . Skipping"); continue; } if (log.isDebugEnabled()) log.debug("run: CDP link found: nodeid=" + curCdpNodeId + " ifindex=" + cdpIfIndex + " nodeparentid=" + targetCdpNodeId + " parentifindex=" + cdpDestIfindex); boolean add = true; if (curNode.isBridgeNode() && isBridgeNode(targetCdpNodeId)) { // adesso chiamo la routine che mi effettua il lavoro! LinkableNode targetNode = (LinkableNode) m_bridge .get(new Integer(targetCdpNodeId)); add = parseCdpLinkOn(curNode, cdpIfIndex,targetNode, cdpDestIfindex,log); } else if (curNode.isBridgeNode) { add = parseCdpLinkOn(curNode,cdpIfIndex,targetCdpNodeId,log); } else if (isBridgeNode(targetCdpNodeId)) { LinkableNode targetNode = (LinkableNode) m_bridge .get(new Integer(targetCdpNodeId)); add = parseCdpLinkOn(targetNode,cdpDestIfindex,curCdpNodeId,log); } // now add the cdp link if (add) { if (log.isDebugEnabled()) log.debug("run: try add CDP link found "); NodeToNodeLink lk = new NodeToNodeLink(targetCdpNodeId, cdpDestIfindex); lk.setNodeparentid(curCdpNodeId); lk.setParentifindex(cdpIfIndex); addNodetoNodeLink(lk, log); } } } // try get backbone links between switches using STP info // and store information in Bridge class if (log.isDebugEnabled()) log .debug("run: try to found backbone ethernet links among bridge nodes using Spanning Tree Protocol"); ite = m_bridge.values().iterator(); while (ite.hasNext()) { LinkableNode curNode = (LinkableNode) ite.next(); int curNodeId = curNode.getNodeId(); String cupIpAddr = curNode.getSnmpPrimaryIpAddr(); if (log.isDebugEnabled()) log.debug("run: parsing bridge nodeid " + curNodeId + " ip address " + cupIpAddr); Iterator sub_ite = curNode.getStpInterfaces().entrySet() .iterator(); if (log.isDebugEnabled()) log.debug("run: parsing " + curNode.getStpInterfaces().size() + " Vlan. "); while (sub_ite.hasNext()) { Map.Entry me = (Map.Entry) sub_ite.next(); String vlan = (String) me.getKey(); String curBaseBridgeAddress = curNode .getBridgeIdentifier(vlan); if (log.isDebugEnabled()) log.debug("run: found bridge identifier " + curBaseBridgeAddress); String designatedRoot = null; if (curNode.hasStpRoot(vlan)) { designatedRoot = curNode.getStpRoot(vlan); } else { if (log.isDebugEnabled()) log .debug("run: desigated root bridge identifier not found. Skipping" + curBaseBridgeAddress); continue; } if (designatedRoot.equals("0000000000000000")) { log.warn("run: designated root is invalid. Skipping"); continue; } // check if designated // bridge is it self // if bridge is STP root bridge itself exiting // searching on linkablesnmpnodes if (curNode.isBridgeIdentifier(designatedRoot.substring(4))) { if (log.isDebugEnabled()) log .debug("run: STP designated root is the bridge itself. Skipping"); continue; } Iterator stp_ite = ((List) me.getValue()).iterator(); // Now parse STP bridge port info to get designated bridge if (log.isDebugEnabled()) log .debug("run: STP designated root is another bridge. Parsing Stp Interface"); while (stp_ite.hasNext()) { BridgeStpInterface stpIface = (BridgeStpInterface) stp_ite .next(); // the bridge port number int stpbridgeport = stpIface.getBridgeport(); // if port is a backbone port continue if (curNode.isBackBoneBridgePort(stpbridgeport)) { if (log.isDebugEnabled()) log.debug("run: bridge port " + stpbridgeport + " already found .... Skipping"); continue; } String stpPortDesignatedPort = stpIface .getStpPortDesignatedPort(); String stpPortDesignatedBridge = stpIface .getStpPortDesignatedBridge(); if (log.isDebugEnabled()) log.debug("run: parsing bridge port " + stpbridgeport + " with stp designated bridge " + stpPortDesignatedBridge + " and with stp designated port " + stpPortDesignatedPort); if (stpPortDesignatedBridge.equals("0000000000000000")) { log.warn("run: designated bridge is invalid " + stpPortDesignatedBridge); continue; } if (curNode.isBridgeIdentifier(stpPortDesignatedBridge .substring(4))) { if (log.isDebugEnabled()) log.debug("run: designated bridge for port " + stpbridgeport + " is bridge itself "); continue; } if (stpPortDesignatedPort.equals("0000")) { log.warn("run: designated port is invalid " + stpPortDesignatedPort); continue; } //A Port Identifier shall be encoded as two octets, // taken to represent an unsigned binary number. If two // Port //Identifiers are numerically compared, the lesser // number denotes the Port of better priority. The more //significant octet of a Port Identifier is a settable // priority component that permits the relative priority // of Ports //on the same Bridge to be managed (17.13.7 and Clause // 14). The less significant twelve bits is the Port //Number expressed as an unsigned binary number. The // value 0 is not used as a Port Number. //NOTE�The number of bits that are considered to be // part of the Port Number (12 bits) differs from the // 1998 and prior //versions of this standard (formerly, the priority // component was 8 bits and the Port Number component // also 8 bits). This //change acknowledged that modern switched LAN // infrastructures call for increasingly large numbers // of Ports to be //supported in a single Bridge. To maintain management // compatibility with older implementations, the // priority //component is still considered, for management // purposes, to be an 8-bit value, but the values that // it can be set to are //restricted to those where the least significant 4 // bits are zero (i.e., only the most significant 4 bits // are settable). int designatedbridgeport = Integer.parseInt( stpPortDesignatedPort.substring(1), 16); // try to see if designated bridge is linkable // snmp node LinkableNode designatedNode = getNodeFromMacIdentifierOfBridgeNode(stpPortDesignatedBridge .substring(4)); if (designatedNode == null) { log .warn("run: no nodeid found for stp bridge address " + stpPortDesignatedBridge + " . Nothing to save to db"); continue; // no saving info if no nodeid } int designatednodeid = designatedNode.getNodeId(); if (log.isDebugEnabled()) log.debug("run: found designated nodeid " + designatednodeid); // test if there are other bridges between this link // USING MAC ADDRESS FORWARDING TABLE if (!isNearestBridgeLink(curNode, stpbridgeport, designatedNode, designatedbridgeport)) { if (log.isDebugEnabled()) log .debug("run: other bridge found between nodes. Nothing to save to db"); continue; // no saving info if no nodeid } // this is a backbone port so try adding to Bridge class // get the ifindex on node int curIfIndex = curNode.getIfindex(stpbridgeport); if (curIfIndex == -1) { log.warn("run: got invalid ifindex"); continue; } int designatedifindex = designatedNode .getIfindex(designatedbridgeport); if (designatedifindex == -1) { log .warn("run: got invalid ifindex on designated node"); continue; } if (log.isDebugEnabled()) log.debug("run: backbone port found for node " + curNodeId + ". Adding to bridge" + stpbridgeport); curNode.addBackBoneBridgePorts(stpbridgeport); m_bridge.put(new Integer(curNodeId), curNode); if (log.isDebugEnabled()) log.debug("run: backbone port found for node " + designatednodeid + " .Adding to helper class bb port " + " bridge port " + designatedbridgeport); designatedNode .addBackBoneBridgePorts(designatedbridgeport); m_bridge.put(new Integer(designatednodeid), designatedNode); if (log.isDebugEnabled()) log.debug("run: adding links on bb bridge port " + designatedbridgeport); addLinks(getMacsOnBridgeLink(curNode, stpbridgeport, designatedNode, designatedbridgeport),curNodeId,curIfIndex,log); // writing to db using class // DbDAtaLinkInterfaceEntry NodeToNodeLink lk = new NodeToNodeLink(curNodeId, curIfIndex); lk.setNodeparentid(designatednodeid); lk.setParentifindex(designatedifindex); addNodetoNodeLink(lk, log); } } } // finding backbone links using mac address on ports // Spanning Tree Running on Machine if (log.isDebugEnabled()) log .debug("run: try to found links using Mac Address Forwarding Table"); ite = m_bridge.values().iterator(); while (ite.hasNext()) { LinkableNode curNode = (LinkableNode) ite.next(); int curNodeId = curNode.getNodeId(); if (log.isDebugEnabled()) log.debug("run: parsing node bridge " + curNodeId); Iterator sub_ite = curNode.getPortMacs().keySet().iterator(); while (sub_ite.hasNext()) { Integer intePort = (Integer) sub_ite.next(); int curBridgePort = intePort.intValue(); if (log.isDebugEnabled()) log.debug("run: parsing bridge port " + curBridgePort + " with mac addresses " + curNode.getMacAddressesOnBridgePort( curBridgePort).toString()); if (curNode.isBackBoneBridgePort(curBridgePort)) { if (log.isDebugEnabled()) log.debug("run: parsing backbone bridge port " + curBridgePort + " .... Skipping"); continue; } // operazione A cerco ottengo la lista dei bridge sulla // porta Set macs = curNode.getMacAddressesOnBridgePort(curBridgePort); HashMap bridgesOnPort = new HashMap(); bridgesOnPort = getBridgesFromMacs(macs); if (bridgesOnPort.isEmpty()) { if (log.isDebugEnabled()) log.debug("run: no bridge info found on port " + curBridgePort + " .... Saving Macs"); int curIfIndex = curNode.getIfindex(curBridgePort); addLinks(macs, curNodeId, curIfIndex, log); } else { Iterator bridge_ite = bridgesOnPort.values().iterator(); BRIDGE: while (bridge_ite.hasNext()) { LinkableNode endNode = (LinkableNode) bridge_ite .next(); int endNodeid = endNode.getNodeId(); int endBridgePort = getBridgePortOnEndBridge( curNode, endNode); if (endNode.isBackBoneBridgePort(endBridgePort)) { if (log.isDebugEnabled()) log .debug("run: testing backbone bridge port " + endBridgePort + " .... Skipping"); continue; } if (log.isDebugEnabled()) log .debug("run: using mac address table found bridge port " + endBridgePort + " on node " + endNodeid); if (endBridgePort == -1) { if (log.isDebugEnabled()) log .debug("run: no port found on bridge nodeid " + endNodeid + " for node bridge identifiers nodeid " + curNodeId + " . .....Skipping"); continue; } while (true) { LinkableNode targetNode = findNearestBridgeLink( curNode, curBridgePort, endNode, endBridgePort); if (targetNode.getNodeId() == endNode .getNodeId()) { // port found save break; } else { endNode = targetNode; endNodeid = endNode.getNodeId(); endBridgePort = getBridgePortOnEndBridge( curNode, endNode); if (endNode .isBackBoneBridgePort(endBridgePort)) { if (log.isDebugEnabled()) log .debug("run: testing backbone bridge port " + endBridgePort + " .... Skipping"); continue BRIDGE; } if (log.isDebugEnabled()) log .debug("run: using mac address table found bridge port " + endBridgePort + " on node " + endNodeid); if (endBridgePort == -1) { if (log.isDebugEnabled()) log .debug("run: no port found on bridge nodeid " + endNodeid + " for node bridge identifiers nodeid " + curNodeId + " . .....Skipping"); continue BRIDGE; } if (log.isDebugEnabled()) log .debug("run: other bridge found between nodes. Iteration on bridge node"); } } // this is a backbone port so adding to Bridge class // get the ifindex int curIfIndex = curNode.getIfindex(curBridgePort); if (curIfIndex == -1) { log .warn("run: got invalid ifindex on bridge port " + curBridgePort); continue; } int endIfindex = endNode.getIfindex(endBridgePort); if (endIfindex == -1) { log .warn("run: got invalid ifindex o designated bridge port " + endBridgePort); continue; } if (log.isDebugEnabled()) log.debug("run: backbone port found for node " + curNodeId + ". Adding backbone port " + curBridgePort + " to bridge"); curNode.addBackBoneBridgePorts(curBridgePort); m_bridge.put(new Integer(curNodeId), curNode); if (log.isDebugEnabled()) log.debug("run: backbone port found for node " + endNodeid + " .Adding to helper class bb port " + " bridge port " + endBridgePort); endNode.addBackBoneBridgePorts(endBridgePort); m_bridge.put(new Integer(endNodeid), endNode); // finding links between two backbone ports addLinks(getMacsOnBridgeLink(curNode, curBridgePort, endNode, endBridgePort),curNodeId,curIfIndex,log); // writing to db using class // DbDAtaLinkInterfaceEntry NodeToNodeLink lk = new NodeToNodeLink(curNodeId, curIfIndex); lk.setNodeparentid(endNodeid); lk.setParentifindex(endIfindex); addNodetoNodeLink(lk, log); break BRIDGE; } } } } // now found remaing links (not yet parsed) present on one side of backbone link if (log.isDebugEnabled()) log .debug("run: try to found remaining links (Orfani!) on BackBoneBridgePort"); ite = m_bridge.values().iterator(); while (ite.hasNext()) { LinkableNode curNode = (LinkableNode) ite.next(); Iterator sub_ite = curNode.getBackBoneBridgePorts().iterator(); while (sub_ite.hasNext()) { Integer intePort = (Integer) sub_ite.next(); int bridgePort = intePort.intValue(); if (log.isDebugEnabled()) log.debug("run: parsing backbone bridge port " + bridgePort + " on node " + curNode.getSnmpPrimaryIpAddr()); if (!curNode.hasMacAddressesOnBridgePort(bridgePort)) { log .warn("run: bridge port has no mac address on. Skipping. "); continue; } int curIfIndex = curNode.getIfindex(bridgePort); if (curIfIndex == -1) { log .warn("run: got invalid ifindex on backbone bridge port " + bridgePort); continue; } addLinks(curNode.getMacAddressesOnBridgePort( bridgePort),curNode.getNodeId(),curIfIndex,log); } } // fourth find inter router links, // this part could have several special function to get inter router // links, but at the moment we worked much on switches. // In future we can try to extend this part. if (log.isDebugEnabled()) log .debug("run: try to found not ethernet links on Router nodes"); ite = routerNodes.iterator(); while (ite.hasNext()) { LinkableNode curNode = (LinkableNode) ite.next(); int curNodeId = curNode.getNodeId(); String curIpAddr = curNode.getSnmpPrimaryIpAddr(); if (log.isDebugEnabled()) log.debug("run: parsing router nodeid " + curNodeId + " ip address " + curIpAddr); Iterator sub_ite = curNode.getRouteInterfaces().iterator(); if (log.isDebugEnabled()) log.debug("run: parsing " + curNode.getRouteInterfaces().size() + " Route Interface. "); while (sub_ite.hasNext()) { RouterInterface routeIface = (RouterInterface) sub_ite .next(); if (routeIface.getMetric() == -1) { if (log.isDebugEnabled()) log .debug("run: Router interface has invalid metric " + routeIface.getMetric() + ". Skipping"); continue; } int snmpiftype = routeIface.getSnmpiftype(); if (snmpiftype == SNMP_IF_TYPE_ETHERNET) { if (log.isDebugEnabled()) log .debug("run: Ethernet interface for nodeid. Skipping "); continue; } else if (snmpiftype == SNMP_IF_TYPE_PROP_VIRTUAL) { if (log.isDebugEnabled()) log .debug("run: PropVirtual interface for nodeid. Skipping "); continue; } else if (snmpiftype == -1) { if (log.isDebugEnabled()) log.debug("store: interface has unknown snmpiftype " + snmpiftype + " . Skipping "); } InetAddress nexthop = routeIface.getNextHop(); if (nexthop.getHostAddress().equals("0.0.0.0")) { if (log.isDebugEnabled()) log .debug("run: nexthop address is broadcast address " + nexthop.getHostAddress() + " . Skipping "); //TODO this should be further analized // working on routeDestNet you can find hosts that // are directly connected with the dest network // This happens when routing is made in such a way: // route 10.3.2.0 255.255.255.0 Serial0 // so the router broadcasts on Serial0 continue; } if (nexthop.isLoopbackAddress()) { if (log.isDebugEnabled()) log .debug("run: nexthop address is localhost address " + nexthop.getHostAddress() + " . Skipping "); continue; } int nextHopNodeid = routeIface.getNextHopNodeid(); if (nextHopNodeid == -1) { if (log.isDebugEnabled()) log .debug("run: no node id found for ip next hop address " + nexthop.getHostAddress() + " , skipping "); continue; } if (nextHopNodeid == curNodeId) { if (log.isDebugEnabled()) log .debug("run: node id found for ip next hop address " + nexthop.getHostAddress() + " is itself, skipping "); continue; } int ifindex = routeIface.getIfindex(); if (ifindex == 0) { if (log.isDebugEnabled()) log .debug("run: route interface has ifindex " + ifindex + " . Processing"); ifindex = getIfIndexFromRouter(curNode, routeIface.getNextHopNet()); if (log.isDebugEnabled()) log .debug("run: found correct ifindex " + ifindex + " ."); } if (log.isDebugEnabled()) log .debug("run: saving route link"); // Saving link also when ifindex = -1 (not found) NodeToNodeLink lk = new NodeToNodeLink(nextHopNodeid, routeIface.getNextHopIfindex()); lk.setNodeparentid(curNodeId); lk.setParentifindex(ifindex); addNodetoNodeLink(lk, log); } } // making clean activenode.clear(); m_bridge.clear(); routerNodes.clear(); cdpNodes.clear(); macsParsed.clear(); macToAtinterface.clear(); nodeToMac.clear(); Linkd.getInstance().updateDiscoveryLinkCollection(this); links.clear(); maclinks.clear(); } // rescheduling activities isRunned = true; reschedule(); } | 47678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47678/55eabd4318d481843d78b0058af03ad5c7f202b4/DiscoveryLink.java/clean/opennms-services/src/main/java/org/opennms/netmgt/linkd/DiscoveryLink.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
202,
202,
4457,
613,
273,
4884,
4457,
18,
588,
1442,
12,
588,
797,
10663,
202,
202,
430,
261,
87,
18815,
2532,
13,
288,
1082,
202,
1330,
18,
4148,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
202,
202,
4457,
613,
273,
4884,
4457,
18,
588,
1442,
12,
588,
797,
10663,
202,
202,
430,
261,
87,
18815,
2532,
13,
288,
1082,
202,
1330,
18,
4148,
2932,
... |
public void mTokens() throws RecognitionException { // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:10: ( T14 | T15 | T16 | T17 | T18 | T19 | T20 | T21 | T22 | T23 | T24 | T25 | T26 | T27 | T28 | T29 | T30 | T31 | T32 | T33 | T34 | T35 | T36 | T37 | T38 | T39 | T40 | T41 | T42 | T43 | T44 | T45 | T46 | T47 | T48 | T49 | T50 | T51 | T52 | T53 | T54 | MISC | WS | EOL | INT | FLOAT | STRING | ID | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | MULTI_LINE_COMMENT ) int alt10=51; alt10 = dfa10.predict(input); switch (alt10) { case 1 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:10: T14 { mT14(); } break; case 2 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:14: T15 { mT15(); } break; case 3 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:18: T16 { mT16(); } break; case 4 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:22: T17 { mT17(); } break; case 5 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:26: T18 { mT18(); } break; case 6 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:30: T19 { mT19(); } break; case 7 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:34: T20 { mT20(); } break; case 8 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:38: T21 { mT21(); } break; case 9 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:42: T22 { mT22(); } break; case 10 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:46: T23 { mT23(); } break; case 11 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:50: T24 { mT24(); } break; case 12 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:54: T25 { mT25(); } break; case 13 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:58: T26 { mT26(); } break; case 14 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:62: T27 { mT27(); } break; case 15 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:66: T28 { mT28(); } break; case 16 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:70: T29 { mT29(); } break; case 17 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:74: T30 { mT30(); } break; case 18 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:78: T31 { mT31(); } break; case 19 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:82: T32 { mT32(); } break; case 20 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:86: T33 { mT33(); } break; case 21 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:90: T34 { mT34(); } break; case 22 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:94: T35 { mT35(); } break; case 23 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:98: T36 { mT36(); } break; case 24 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:102: T37 { mT37(); } break; case 25 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:106: T38 { mT38(); } break; case 26 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:110: T39 { mT39(); } break; case 27 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:114: T40 { mT40(); } break; case 28 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:118: T41 { mT41(); } break; case 29 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:122: T42 { mT42(); } break; case 30 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:126: T43 { mT43(); } break; case 31 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:130: T44 { mT44(); } break; case 32 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:134: T45 { mT45(); } break; case 33 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:138: T46 { mT46(); } break; case 34 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:142: T47 { mT47(); } break; case 35 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:146: T48 { mT48(); } break; case 36 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:150: T49 { mT49(); } break; case 37 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:154: T50 { mT50(); } break; case 38 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:158: T51 { mT51(); } break; case 39 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:162: T52 { mT52(); } break; case 40 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:166: T53 { mT53(); } break; case 41 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:170: T54 { mT54(); } break; case 42 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:174: MISC { mMISC(); } break; case 43 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:179: WS { mWS(); } break; case 44 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:182: EOL { mEOL(); } break; case 45 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:186: INT { mINT(); } break; case 46 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:190: FLOAT { mFLOAT(); } break; case 47 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:196: STRING { mSTRING(); } break; case 48 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:203: ID { mID(); } break; case 49 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:206: SH_STYLE_SINGLE_LINE_COMMENT { mSH_STYLE_SINGLE_LINE_COMMENT(); } break; case 50 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:235: C_STYLE_SINGLE_LINE_COMMENT { mC_STYLE_SINGLE_LINE_COMMENT(); } break; case 51 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1:263: MULTI_LINE_COMMENT { mMULTI_LINE_COMMENT(); } break; } } | 5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/138d9a6805db25e18a7f8c70bebca33cce7b95e5/RuleParserLexer.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
5157,
1435,
1216,
9539,
288,
3639,
368,
342,
6588,
19,
70,
947,
19,
12922,
19,
14915,
19,
10649,
8464,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
4683,
19,
3341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
5157,
1435,
1216,
9539,
288,
3639,
368,
342,
6588,
19,
70,
947,
19,
12922,
19,
14915,
19,
10649,
8464,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
4683,
19,
3341,... | ||
return "DN=" + caDnName.toString() | return "DN=" + caDnName | public String toString() { return "DN=" + caDnName.toString() + " - certVersion=" + certVersion + " - algorithmId=" + algorithmId + " - keysize=" + keySize + " - ldap=" + ldapURL; } | 12869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12869/4be1390b943227f32e6a32b9e5efbbda4eb77d33/CaPolicy.java/buggy/securityservices/src/org/cougaar/core/security/policy/CaPolicy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
1762,
1435,
288,
565,
327,
315,
8609,
1546,
397,
3474,
19053,
461,
1377,
397,
315,
300,
3320,
1444,
1546,
397,
3320,
1444,
1377,
397,
315,
300,
4886,
548,
1546,
397,
4886,
548,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1762,
1435,
288,
565,
327,
315,
8609,
1546,
397,
3474,
19053,
461,
1377,
397,
315,
300,
3320,
1444,
1546,
397,
3320,
1444,
1377,
397,
315,
300,
4886,
548,
1546,
397,
4886,
548,... |
if (sfLog().isDebugEnabled()){ sfLog().debug("Try carrying out nextAction for status '"+status.errorType+"'"); } | public void sfTerminatedWith(TerminationRecord status, Prim comp) { if (sfContainsChild(comp)) { if (primary) { primary = false; // next call is not from the primary. try { sfRemoveChild(comp); ComponentDescription nextAction = (ComponentDescription) sfResolve(status.errorType); if (sfLog().isDebugEnabled()){ sfLog().debug("Try carrying out \n"+nextAction+ " for status "+status.errorType); } sfCreateNewChild(name + "_tryActionRunning", nextAction, null); } catch (Exception e) { sfTerminate(TerminationRecord.abnormal( "error in starting follow-on component", name)); } } else { sfTerminate(status); } } } | 4987 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4987/2ceb086448d620c5d1837df6ff51652003388526/Try.java/clean/core/smartfrog/src/org/smartfrog/sfcore/workflow/combinators/Try.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
21668,
1343,
7675,
291,
2829,
1526,
10756,
95,
9033,
1343,
7675,
4148,
2932,
7833,
9331,
310,
596,
1024,
1803,
364,
1267,
2119,
15,
2327,
18,
1636,
559,
9078,
4970,
1769,
289,
309,
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,
309,
261,
21668,
1343,
7675,
291,
2829,
1526,
10756,
95,
9033,
1343,
7675,
4148,
2932,
7833,
9331,
310,
596,
1024,
1803,
364,
1267,
2119,
15,
2327,
18,
1636,
559,
9078,
4970,
1769,
289,
309,
2... | |
for (int x = 0; x < RenderState.RS_MAX_STATE; x++) if (renderStateList[x] != null) states[x].push(renderStateList[x]); } | for (int x = 0; x < RenderState.RS_MAX_STATE; x++) if (renderStateList[x] != null) states[x].push(renderStateList[x]); } | protected void propagateStatesFromRoot(Stack[] states) { // traverse to root to allow downward state propagation if (parent != null) parent.propagateStatesFromRoot(states); // push states onto current render state stack for (int x = 0; x < RenderState.RS_MAX_STATE; x++) if (renderStateList[x] != null) states[x].push(renderStateList[x]); } | 19503 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19503/6aaba14bb39fd6af9aea6f599180d9ac7dbd923d/Spatial.java/buggy/src/com/jme/scene/Spatial.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
13551,
7629,
1265,
2375,
12,
2624,
8526,
5493,
13,
288,
202,
202,
759,
10080,
358,
1365,
358,
1699,
2588,
2913,
919,
25686,
202,
202,
430,
261,
2938,
480,
446,
13,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
13551,
7629,
1265,
2375,
12,
2624,
8526,
5493,
13,
288,
202,
202,
759,
10080,
358,
1365,
358,
1699,
2588,
2913,
919,
25686,
202,
202,
430,
261,
2938,
480,
446,
13,
1082,
... |
break _loop597; | break _loop77; | protected final void mPURE_NAME(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = PURE_NAME; int _saveIndex; { mFIRST_PURE_NAME_CHAR(false); } { _loop597: do { if ((_tokenSet_2.member(LA(1)))) { mPURE_NAME_CHAR(false); } else { break _loop597; } } while (true); } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } | 48756 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48756/e64750c6db180cbb479f839977df4ff0912d0937/PerlBaseLexer.java/clean/org.epic.debug/src/org/epic/debug/varparser/PerlBaseLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
727,
918,
312,
52,
4830,
67,
1985,
12,
6494,
389,
2640,
1345,
13,
1216,
9539,
16,
3703,
1228,
503,
16,
3155,
1228,
503,
288,
202,
202,
474,
389,
88,
723,
31,
3155,
389,
231... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
918,
312,
52,
4830,
67,
1985,
12,
6494,
389,
2640,
1345,
13,
1216,
9539,
16,
3703,
1228,
503,
16,
3155,
1228,
503,
288,
202,
202,
474,
389,
88,
723,
31,
3155,
389,
231... |
public boolean derivedFrom(String ancestorNS, String ancestorName, short derivation) { // REVISIT: implement according to derivation // ancestor is null, retur false if (ancestorName == null) return false; // ancestor is anyType, return true if (URI_SCHEMAFORSCHEMA.equals(ancestorNS) && ANY_TYPE.equals(ancestorName)) { return true; } // recursively get base, and compare it with ancestor XSTypeDefinition type = this; while (!(ancestorName.equals(type.getName()) && ((ancestorNS == null && type.getNamespace() == null) || (ancestorNS != null && ancestorNS.equals(type.getNamespace())))) && // compare with ancestor type != fAnySimpleType) { // reached anySimpleType type = (XSTypeDefinition)type.getBaseType(); } return type != fAnySimpleType; } | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/b8632d1162b8572ec5348c474617947ba89f7bff/XSSimpleTypeDecl.java/buggy/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
10379,
1265,
12,
780,
9731,
3156,
16,
514,
9731,
461,
16,
3025,
4854,
8482,
13,
288,
3639,
368,
2438,
26780,
1285,
30,
2348,
4888,
358,
4854,
8482,
7734,
368,
9731,
353,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
10379,
1265,
12,
780,
9731,
3156,
16,
514,
9731,
461,
16,
3025,
4854,
8482,
13,
288,
3639,
368,
2438,
26780,
1285,
30,
2348,
4888,
358,
4854,
8482,
7734,
368,
9731,
353,
446,
... | ||
/* if (!(data instanceof Date)) { throw new ConversionException("Class: " + data.getClass() + " is not a java.util.Date"); } */ if (value.startsWith(ConversionConstants.INBOUND_ARRAY_START)) { value = value.substring(1); } if (value.endsWith(ConversionConstants.INBOUND_ARRAY_END)) { value = value.substring(0, value.length() - 1); } Calendar calendar = new GregorianCalendar(); | public Object convertInbound(Class paramType, InboundVariable iv, InboundContext inctx) throws ConversionException { String value = iv.getValue(); // If the text is null then the whole bean is null if (value.trim().equals(ConversionConstants.INBOUND_NULL)) { return null; } /* if (!(data instanceof Date)) { throw new ConversionException("Class: " + data.getClass() + " is not a java.util.Date"); } */ if (value.startsWith(ConversionConstants.INBOUND_ARRAY_START)) { value = value.substring(1); } if (value.endsWith(ConversionConstants.INBOUND_ARRAY_END)) { value = value.substring(0, value.length() - 1); } Calendar calendar = new GregorianCalendar(); try { StringTokenizer st = new StringTokenizer(value, ConversionConstants.INBOUND_ARRAY_SEPARATOR); int size = st.countTokens(); if (size != 7) { log.warn("Date does not have 7 components: " + value); //$NON-NLS-1$ } for (int i = 0; i < size && i < 7; i++) { try { String token = st.nextToken(); int intval = Integer.parseInt(token.trim()); calendar.set(FIELDS[i], intval); } catch (NumberFormatException ex) { throw new ConversionException(ex); } } Date date = calendar.getTime(); if (paramType == Date.class) { return date; } else if (paramType == java.sql.Date.class) { return new java.sql.Date(date.getTime()); } else if (paramType == Time.class) { return new Time(date.getTime()); } else if (paramType == Timestamp.class) { return new Timestamp(date.getTime()); } else { throw new ConversionException(Messages.getString("DateConverter.WrongType") + paramType.getName()); //$NON-NLS-1$ } } catch (ConversionException ex) { throw ex; } catch (Exception ex) { throw new ConversionException(Messages.getString("DateConverter.ErrorConverting", value, paramType.getName()), ex); //$NON-NLS-1$ } } | 45384 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45384/d58638ac699cd04fdd8d64194898c6edcfa69238/DateConverter.java/clean/java/uk/ltd/getahead/dwr/convert/DateConverter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1765,
20571,
12,
797,
20781,
16,
657,
3653,
3092,
4674,
16,
657,
3653,
1042,
316,
5900,
13,
1216,
16401,
503,
565,
288,
3639,
514,
460,
273,
4674,
18,
24805,
5621,
3639,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1765,
20571,
12,
797,
20781,
16,
657,
3653,
3092,
4674,
16,
657,
3653,
1042,
316,
5900,
13,
1216,
16401,
503,
565,
288,
3639,
514,
460,
273,
4674,
18,
24805,
5621,
3639,
368,
... | |
return comments; | blockStart("Comments"); return null; | public Object visitComments(JavaStyleComment[] comments) { return comments; } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/f915914ae835a6c3afad82ff26bd7adba5e3a775/Kopi2SIR.java/buggy/streams/src/at/dms/kjc/Kopi2SIR.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
3757,
9051,
12,
5852,
2885,
4469,
8526,
5678,
13,
288,
202,
2629,
1685,
2932,
9051,
8863,
327,
446,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
3757,
9051,
12,
5852,
2885,
4469,
8526,
5678,
13,
288,
202,
2629,
1685,
2932,
9051,
8863,
327,
446,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
public int getAge() { | public Integer getAge() { | public int getAge() { return age; } | 45923 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45923/de869ab14ce3f50babba1129c213b9266845f4da/Employee.java/buggy/jxls-core/src/test/java/net/sf/jxls/bean/Employee.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2144,
4506,
908,
1435,
288,
3639,
327,
9388,
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,
2144,
4506,
908,
1435,
288,
3639,
327,
9388,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Scriptable scope = getTopLevelScope(funObj); | scope = getTopLevelScope(scope); | private static Object jsFunction_splice(Context cx, Scriptable thisObj, Object[] args, IdFunction funObj) { /* create an empty Array to return. */ Scriptable scope = getTopLevelScope(funObj); Object result = ScriptRuntime.newObject(cx, scope, "Array", null); int argc = args.length; if (argc == 0) return result; double length = getLengthProperty(thisObj); /* Convert the first argument into a starting index. */ double begin = ScriptRuntime.toInteger(args[0]); double end; double delta; double count; if (begin < 0) { begin += length; if (begin < 0) begin = 0; } else if (begin > length) { begin = length; } argc--; /* Convert the second argument from a count into a fencepost index. */ delta = length - begin; if (args.length == 1) { count = delta; end = length; } else { count = ScriptRuntime.toInteger(args[1]); if (count < 0) count = 0; else if (count > delta) count = delta; end = begin + count; argc--; } long lbegin = (long)begin; long lend = (long)end; /* If there are elements to remove, put them into the return value. */ if (count > 0) { if (count == 1 && (cx.getLanguageVersion() == Context.VERSION_1_2)) { /* * JS lacks "list context", whereby in Perl one turns the * single scalar that's spliced out into an array just by * assigning it to @single instead of $single, or by using it * as Perl push's first argument, for instance. * * JS1.2 emulated Perl too closely and returned a non-Array for * the single-splice-out case, requiring callers to test and * wrap in [] if necessary. So JS1.3, default, and other * versions all return an array of length 1 for uniformity. */ result = getElem(thisObj, lbegin); } else { for (long last = lbegin; last < lend; last++) { Scriptable resultArray = (Scriptable)result; Object temp = getElem(thisObj, last); setElem(resultArray, last - lbegin, temp); } } } else if (count == 0 && cx.getLanguageVersion() == Context.VERSION_1_2) { /* Emulate C JS1.2; if no elements are removed, return undefined. */ result = Context.getUndefinedValue(); } /* Find the direction (up or down) to copy and make way for argv. */ delta = argc - count; if (delta > 0) { for (long last = (long)length - 1; last >= lend; last--) { Object temp = getElem(thisObj, last); setElem(thisObj, last + (long)delta, temp); } } else if (delta < 0) { for (long last = lend; last < length; last++) { Object temp = getElem(thisObj, last); setElem(thisObj, last + (long)delta, temp); } } /* Copy from argv into the hole to complete the splice. */ int argoffset = args.length - argc; for (int i = 0; i < argc; i++) { setElem(thisObj, lbegin + i, args[i + argoffset]); } /* Update length in case we deleted elements from the end. */ ScriptRuntime.setProp(thisObj, "length", new Double(length + delta), thisObj); return result; } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/fb69c14ae4e860dfb5b5df7d866e510acca73ed9/NativeArray.java/clean/js/rhino/src/org/mozilla/javascript/NativeArray.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1033,
3828,
2083,
67,
19535,
12,
1042,
9494,
16,
22780,
15261,
16,
4766,
2398,
1033,
8526,
833,
16,
3124,
2083,
9831,
2675,
13,
565,
288,
3639,
1748,
752,
392,
1008,
1510,
358,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1033,
3828,
2083,
67,
19535,
12,
1042,
9494,
16,
22780,
15261,
16,
4766,
2398,
1033,
8526,
833,
16,
3124,
2083,
9831,
2675,
13,
565,
288,
3639,
1748,
752,
392,
1008,
1510,
358,... |
if (this.date != this.date) | if (this.date != this.date) { | public double jsFunction_setYear(double year) { double day, result; if (year != year || Double.isInfinite(year)) { this.date = ScriptRuntime.NaN; return this.date; } if (this.date != this.date) this.date = 0; if (year >= 0 && year <= 99) year += 1900; day = MakeDay(year, MonthFromTime(this.date), DateFromTime(this.date)); result = MakeDate(day, TimeWithinDay(this.date)); result = internalUTC(result); this.date = TimeClip(result); return this.date; } | 12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/78aaa08ebc5ab6b860bf60de75ae2545b09def62/NativeDate.java/clean/js/rhino/src/org/mozilla/javascript/NativeDate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1645,
3828,
2083,
67,
542,
5593,
12,
9056,
3286,
13,
288,
3639,
1645,
2548,
16,
563,
31,
3639,
309,
261,
6874,
480,
3286,
747,
3698,
18,
291,
382,
9551,
12,
6874,
3719,
288,
5411,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1645,
3828,
2083,
67,
542,
5593,
12,
9056,
3286,
13,
288,
3639,
1645,
2548,
16,
563,
31,
3639,
309,
261,
6874,
480,
3286,
747,
3698,
18,
291,
382,
9551,
12,
6874,
3719,
288,
5411,... |
ec.addExpansionListener(new ExpansionAdapter() { | expandableComposite.addExpansionListener(new ExpansionAdapter() { | protected void createCommentLayout(FormToolkit toolkit, final ScrolledForm form) { Section section = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR | Section.TWISTIE); section.setText(LABEL_SECTION_COMMENTS); section.setExpanded(true); section.setLayout(new GridLayout()); section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); section.addExpansionListener(new IExpansionListener() { public void expansionStateChanging(ExpansionEvent e) { form.reflow(true); } public void expansionStateChanged(ExpansionEvent e) { form.reflow(true); } }); // Additional (read-only) Comments Area Composite addCommentsComposite = toolkit.createComposite(section); section.setClient(addCommentsComposite); GridLayout addCommentsLayout = new GridLayout(); addCommentsLayout.numColumns = 1; addCommentsComposite.setLayout(addCommentsLayout); // addCommentsComposite.setBackground(background); GridData addCommentsData = new GridData(GridData.FILL_BOTH); addCommentsData.horizontalSpan = 1; addCommentsData.widthHint = DESCRIPTION_WIDTH; addCommentsData.heightHint = DESCRIPTION_HEIGHT; addCommentsData.grabExcessVerticalSpace = true; addCommentsComposite.setLayoutData(addCommentsData); // End Additional (read-only) Comments Area StyledText styledText = null; for (Iterator<Comment> it = bug.getComments().iterator(); it.hasNext();) { final Comment comment = it.next(); // skip comment 0 as it is the description if (comment.getNumber() == 0) continue; ExpandableComposite ec = toolkit.createExpandableComposite(addCommentsComposite, ExpandableComposite.TREE_NODE); if (!it.hasNext()) { ec.setExpanded(true); } ec.setText(comment.getNumber() + ": " + comment.getAuthorName() + ", " + simpleDateFormat.format(comment.getCreated())); ec.addExpansionListener(new ExpansionAdapter() { public void expansionStateChanged(ExpansionEvent e) { form.reflow(true); } }); ec.setLayout(new GridLayout()); Composite ecComposite = toolkit.createComposite(ec); ecComposite.setLayout(new GridLayout()); ec.setClient(ecComposite); toolkit.paintBordersFor(ec); // TODO: Attachments are no longer 'attached' to Comments // if (comment.hasAttachment()) { // // Link attachmentLink = new Link(ecComposite, SWT.NONE); // // String attachmentHeader; // // if (!comment.isObsolete()) { // attachmentHeader = " Attached: " + // comment.getAttachmentDescription() + " [<a>view</a>]"; // } else { // attachmentHeader = " Deprecated: " + // comment.getAttachmentDescription(); // } // // String result = MessageFormat.format(attachmentHeader, new // // String[] { node // // .getLabelText() }); // // attachmentLink.addSelectionListener(new SelectionAdapter() { // /* // * (non-Javadoc) // * // * @see // org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) // */ // public void widgetSelected(SelectionEvent e) { // String address = repository.getUrl() + "/attachment.cgi?id=" + // comment.getAttachmentId() // + "&action=view"; // TaskUiUtil.openUrl(address, address, address); // // } // }); // // attachmentLink.setText(attachmentHeader); // // } // styledText = newLayout(ecComposite, 1, comment.getText(), VALUE); // styledText.addListener(SWT.FocusIn, new // CommentListener(comment)); // styledText.setFont(COMMENT_FONT); // System.err.println(comment.getNumber()+" "+comment.getText()); TextViewer viewer = addRepositoryText(repository, ecComposite, comment.getText()); styledText = viewer.getTextWidget(); // line wrapping GridData styledTextData = new GridData(GridData.FILL_BOTH); styledTextData.widthHint = DESCRIPTION_WIDTH; styledTextData.grabExcessVerticalSpace = true; styledText.setLayoutData(styledTextData); // code for outline texts.add(textsindex, styledText); textHash.put(comment, styledText); textsindex++; } Section sectionAdditionalComments = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR | Section.TWISTIE); sectionAdditionalComments.setText(LABEL_SECTION_NEW_COMMENT); sectionAdditionalComments.setExpanded(true); // sectionAdditionalComments.setLayout(new GridLayout()); // GridData newCommentCommentLayoutData = new GridData(); // newCommentCommentLayoutData.widthHint = DESCRIPTION_WIDTH; // sectionAdditionalComments.setLayoutData(newCommentCommentLayoutData); sectionAdditionalComments.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); sectionAdditionalComments.addExpansionListener(new IExpansionListener() { public void expansionStateChanging(ExpansionEvent e) { form.reflow(true); } public void expansionStateChanged(ExpansionEvent e) { form.reflow(true); } }); Composite newCommentsComposite = toolkit.createComposite(sectionAdditionalComments); newCommentsComposite.setLayout(new GridLayout()); newCommentsComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); addCommentsText = toolkit.createText(newCommentsComposite, bug.getNewComment(), SWT.MULTI | SWT.V_SCROLL | SWT.WRAP); addCommentsText.setFont(COMMENT_FONT); toolkit.paintBordersFor(newCommentsComposite); GridData addCommentsTextData = new GridData(GridData.FILL_HORIZONTAL); // addCommentsTextData.horizontalSpan = 4; // addCommentsTextData.widthHint = DESCRIPTION_WIDTH; addCommentsTextData.heightHint = DESCRIPTION_HEIGHT; addCommentsTextData.grabExcessHorizontalSpace = true; addCommentsText.setLayoutData(addCommentsTextData); // addCommentsText.setText(bug.getNewComment()); addCommentsText.addListener(SWT.KeyUp, new Listener() { public void handleEvent(Event event) { String sel = addCommentsText.getText(); if (!(bug.getNewComment().equals(sel))) { bug.setNewComment(sel); changeDirtyStatus(true); } validateInput(); } }); addCommentsText.addListener(SWT.FocusIn, new NewCommentListener()); // End Additional Comments Text addCommentsTextBox = addCommentsText; // this.createSeparatorSpace(addCommentsComposite); sectionAdditionalComments.setClient(newCommentsComposite); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/7969a26f45de436eb3eb4d646e11413b27aff751/ExistingBugEditor.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/ExistingBugEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
4469,
3744,
12,
1204,
6364,
8691,
5226,
8691,
16,
727,
2850,
25054,
1204,
646,
13,
288,
202,
202,
5285,
2442,
273,
5226,
8691,
18,
2640,
5285,
12,
687,
18,
588,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
4469,
3744,
12,
1204,
6364,
8691,
5226,
8691,
16,
727,
2850,
25054,
1204,
646,
13,
288,
202,
202,
5285,
2442,
273,
5226,
8691,
18,
2640,
5285,
12,
687,
18,
588,
225... |
return op1.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; | return op1.isConstant() ? DefUseEffect.MOVE_FOLDED : DefUseEffect.MOVE_REDUCED; | private static byte intAnd(OPT_Instruction s) { if (CF_INT) { canonicalizeCommutativeOperator(s); OPT_Operand op1 = Binary.getVal1(s); OPT_Operand op2 = Binary.getVal2(s); if (op1.similar(op2)) { // THE SAME OPERAND: x & x == x Move.mutate(s, INT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return op1.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } if (op2.isIntConstant()) { int val2 = op2.asIntConstant().value; if (op1.isIntConstant()) { // BOTH CONSTANTS: FOLD int val1 = op1.asIntConstant().value; Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(val1 & val2)); return MOVE_FOLDED; } else { // ONLY OP2 IS CONSTANT: ATTEMPT TO APPLY AXIOMS if (val2 == 0) { // x & 0 == 0 Move.mutate(s, INT_MOVE, Binary.getClearResult(s), IC(0)); return MOVE_FOLDED; } if (val2 == -1) { // x & -1 == x & 0xffffffff == x Move.mutate(s, INT_MOVE, Binary.getClearResult(s), Binary.getClearVal1(s)); return MOVE_REDUCED; } } } } return UNCHANGED; } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/eb4369b6f8fdd0cd15c56bc3cbfa8673171db226/OPT_Simplifier.java/clean/rvm/src/com/ibm/jikesrvm/opt/OPT_Simplifier.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
1160,
509,
1876,
12,
15620,
67,
11983,
272,
13,
288,
282,
309,
261,
8955,
67,
3217,
13,
288,
1377,
25839,
799,
10735,
1535,
5592,
12,
87,
1769,
1377,
16456,
67,
10265,
1061,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
1160,
509,
1876,
12,
15620,
67,
11983,
272,
13,
288,
282,
309,
261,
8955,
67,
3217,
13,
288,
1377,
25839,
799,
10735,
1535,
5592,
12,
87,
1769,
1377,
16456,
67,
10265,
1061,
... |
if (titleLabel == null || titleLabel.isDisposed()) return; | Assert.isTrue(!isDisposed()); | protected void setTitleAttributes() { if (titleLabel == null || titleLabel.isDisposed()) return; ITheme theme = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme(); Font messageFont = theme.getFontRegistry().get(IWorkbenchThemeConstants.VIEW_MESSAGE_TEXT_FONT); if (!messageFont.equals(titleLabel.getFont())) { titleLabel.setFont(messageFont); setControlSize(); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/51c6ca3914e647e528d60196af030703f9d12684/DefaultPartPresentation.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/DefaultPartPresentation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
14109,
2498,
1435,
288,
3639,
309,
261,
2649,
2224,
422,
446,
747,
2077,
2224,
18,
291,
1669,
7423,
10756,
5411,
327,
31,
3639,
467,
8335,
5006,
273,
11810,
5370,
18,
588,
2421... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
14109,
2498,
1435,
288,
3639,
309,
261,
2649,
2224,
422,
446,
747,
2077,
2224,
18,
291,
1669,
7423,
10756,
5411,
327,
31,
3639,
467,
8335,
5006,
273,
11810,
5370,
18,
588,
2421... |
return null; | return providers; | public List<AbstractRelationshipProvider> getProviders() { // TODO Auto-generated method stub return null; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/996a679a3d6bd9109e740dfa54e04ba0baf6815f/JavaStructureBridge.java/buggy/org.eclipse.mylyn.java.ui/src/org/eclipse/mylyn/java/JavaStructureBridge.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
32,
7469,
8180,
2249,
34,
3570,
7979,
1435,
288,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
202,
202,
2463,
446,
31,
202,
97,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
32,
7469,
8180,
2249,
34,
3570,
7979,
1435,
288,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
202,
202,
2463,
446,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
if (null != doctype && null != doctype.getPublicId()) { props.put(OutputKeys.DOCTYPE_PUBLIC, doctype.getPublicId()); props.put(OutputKeys.DOCTYPE_SYSTEM, doctype.getSystemId()); | if (null != doctype) { if (null != doctype.getPublicId()) { props.put(OutputKeys.DOCTYPE_PUBLIC, doctype.getPublicId()); } if (null != doctype.getSystemId()) { props.put(OutputKeys.DOCTYPE_SYSTEM, doctype.getSystemId()); } | public static void writeDocument(File file, Document document, Task task) { if ( task != null ) { task.log("Writing: " + file); } // Set the DOCTYPE output option on the transformer // if we have any DOCTYPE declaration in the input xml document final DocumentType doctype = document.getDoctype(); Properties props = new Properties(); if (null != doctype && null != doctype.getPublicId()) { props.put(OutputKeys.DOCTYPE_PUBLIC, doctype.getPublicId()); props.put(OutputKeys.DOCTYPE_SYSTEM, doctype.getSystemId()); } transformer.setOutputProperties(props); try { transformer.transform(new DOMSource(document), new StreamResult(file)); } catch (TransformerException e) { throw new BuildException("TransformerException: "+e); } } | 46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/5fe3caf2cd98c5167876833cc099a4e0202d665c/DocumentCache.java/clean/tools/src/anttasks/DocumentCache.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1045,
2519,
12,
812,
585,
16,
4319,
1668,
16,
3837,
1562,
13,
288,
3639,
309,
261,
1562,
480,
446,
262,
288,
5411,
1562,
18,
1330,
2932,
18835,
30,
315,
397,
585,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1045,
2519,
12,
812,
585,
16,
4319,
1668,
16,
3837,
1562,
13,
288,
3639,
309,
261,
1562,
480,
446,
262,
288,
5411,
1562,
18,
1330,
2932,
18835,
30,
315,
397,
585,
1769,
... |
verticalFirstOffset = (float) gv.getGlyphMetrics(i).getBounds2D().getHeight(); | verticalFirstOffset = (float)gm.getBounds2D().getHeight(); | protected void doExplicitGlyphLayout(boolean applyOffset) { char ch = aci.first(); int i=0; float baselineAscent = isVertical() ? (float) gv.getLogicalBounds().getWidth() : (metrics.getAscent() + Math.abs(metrics.getDescent())); textPath = (TextPath) aci.getAttribute( GVTAttributedCharacterIterator.TextAttribute.TEXTPATH); int numGlyphs = gv.getNumGlyphs(); float[] gp = new float[numGlyphs*2]; gp = (float[]) gv.getGlyphPositions(0, numGlyphs, gp).clone(); float init_x_pos = (float) offset.getX(); float init_y_pos = (float) offset.getY(); float curr_x_pos = init_x_pos; float curr_y_pos = init_y_pos; boolean firstChar = true; float verticalFirstOffset = 0f; float largestAdvanceY = 0; boolean glyphOrientationAuto = isGlyphOrientationAuto(); int glyphOrientationAngle = 0; if (!glyphOrientationAuto) { glyphOrientationAngle = getGlyphOrientationAngle(); } while (i < numGlyphs) { if (firstChar) { if (glyphOrientationAuto) { if (isLatinChar(ch)) { // it will be rotated 90 verticalFirstOffset = 0f; } else { // it won't be rotated verticalFirstOffset = (float) gv.getGlyphMetrics(i).getBounds2D().getHeight(); } } else { if (glyphOrientationAngle == 0) { verticalFirstOffset = (float) gv.getGlyphMetrics(i).getBounds2D().getHeight(); } else { verticalFirstOffset = 0f; } } } else { if (glyphOrientationAuto && verticalFirstOffset == 0f && !isLatinChar(ch)) { verticalFirstOffset = (float) gv.getGlyphMetrics(i).getBounds2D().getHeight(); } } // ox and oy are origin adjustments for each glyph, // computed on the basis of baseline-shifts, etc. float ox = 0f; float oy = 0f; float verticalGlyphRotation = 0f; Float rotation = null; if (ch != CharacterIterator.DONE) { Float x = (Float) aci.getAttribute( GVTAttributedCharacterIterator.TextAttribute.X); Float dx = (Float) aci.getAttribute( GVTAttributedCharacterIterator.TextAttribute.DX); Float y = (Float) aci.getAttribute( GVTAttributedCharacterIterator.TextAttribute.Y); Float dy = (Float) aci.getAttribute( GVTAttributedCharacterIterator.TextAttribute.DY); rotation = (Float) aci.getAttribute( GVTAttributedCharacterIterator.TextAttribute.ROTATION); if (isVertical()) { if (glyphOrientationAuto) { if (isLatinChar(ch)) { // If character is Latin, then rotate by // 90 degrees verticalGlyphRotation = (float) (Math.PI / 2f); } else { verticalGlyphRotation = 0f; } } else { verticalGlyphRotation = (float)Math.toRadians(glyphOrientationAngle); } if (textPath != null) { // if vertical and on a path, any x's are ignored x = null; } } else { if (textPath != null) { // if horizontal and on a path, any y's are ignored y = null; } } // calculate the total rotation for this glyph if (rotation == null || rotation.isNaN()) { rotation = new Float(verticalGlyphRotation); } else { rotation = new Float(rotation.floatValue() + verticalGlyphRotation); } if (x!= null && !x.isNaN()) { if (i==0) { if (applyOffset) { curr_x_pos = (float) offset.getX(); } else { curr_x_pos = x.floatValue(); init_x_pos = curr_x_pos; } } else { curr_x_pos = x.floatValue(); } } else if (dx != null && !dx.isNaN()) { curr_x_pos += dx.floatValue(); } if (y != null && !y.isNaN()) { if (i==0) { if (applyOffset) { curr_y_pos = (float) offset.getY(); } else { curr_y_pos = y.floatValue(); init_y_pos = curr_y_pos; } } else { curr_y_pos = y.floatValue(); } } else if (dy != null && !dy.isNaN()) { curr_y_pos += dy.floatValue(); } else if (i>0) { curr_y_pos += gp[i*2 + 1]-gp[i*2 - 1]; } float baselineAdjust = 0f; Object baseline = aci.getAttribute( GVTAttributedCharacterIterator.TextAttribute.BASELINE_SHIFT); if (baseline != null) { if (baseline instanceof Integer) { if (baseline==TextAttribute.SUPERSCRIPT_SUPER) { baselineAdjust = baselineAscent*0.5f; } else if (baseline==TextAttribute.SUPERSCRIPT_SUB) { baselineAdjust = -baselineAscent*0.5f; } } else if (baseline instanceof Float) { baselineAdjust = ((Float) baseline).floatValue(); } if (isVertical()) { ox = baselineAdjust; } else { oy = -baselineAdjust; } } if (isVertical()) { // offset due to rotation of first character oy += verticalFirstOffset; if (glyphOrientationAuto) { if (isLatinChar(ch)) { ox += metrics.getStrikethroughOffset(); } else { Rectangle2D glyphBounds = gv.getGlyphVisualBounds(i).getBounds2D(); Point2D glyphPos = gv.getGlyphPosition(i); ox -= (float)((glyphBounds.getMaxX() - glyphPos.getX()) - glyphBounds.getWidth()/2); } } else { // center the character if it's not auto orient Rectangle2D glyphBounds = gv.getGlyphVisualBounds(i).getBounds2D(); Point2D glyphPos = gv.getGlyphPosition(i); if (glyphOrientationAngle == 0) { ox -= (float)((glyphBounds.getMaxX() - glyphPos.getX()) - glyphBounds.getWidth()/2); } else if (glyphOrientationAngle == 180) { ox += (float)((glyphBounds.getMaxX() - glyphPos.getX()) - glyphBounds.getWidth()/2); } else if (glyphOrientationAngle == 90) { ox += metrics.getStrikethroughOffset(); } else { // 270 ox -= metrics.getStrikethroughOffset(); } } } } // set the new glyph position gv.setGlyphPosition(i, new Point2D.Float(curr_x_pos+ox,curr_y_pos+oy)); // calculte the position of the next glyph if (!ArabicTextHandler.arabicCharTransparent(ch)) { // only apply the advance if the current char is not transparent GVTGlyphMetrics gm = gv.getGlyphMetrics(i); if (isVertical()) { float advanceY = 0; if (glyphOrientationAuto) { if (isLatinChar(ch)) { advanceY = gm.getHorizontalAdvance(); } else { advanceY = gm.getVerticalAdvance(); } } else { if (glyphOrientationAngle == 0 || glyphOrientationAngle == 180) { advanceY = gm.getVerticalAdvance(); } else if (glyphOrientationAngle == 90) { advanceY = gm.getHorizontalAdvance(); } else { // 270 advanceY = gm.getHorizontalAdvance(); // need to translate so that the spacing // between chars is correct gv.setGlyphTransform(i, AffineTransform.getTranslateInstance(0, advanceY)); } } curr_y_pos += advanceY; } else { curr_x_pos += gm.getHorizontalAdvance(); } } // rotate the glyph if (rotation.floatValue() != 0f) { AffineTransform glyphTransform = gv.getGlyphTransform(i); if (glyphTransform == null) { glyphTransform = new AffineTransform(); } glyphTransform.rotate((double)rotation.floatValue()); gv.setGlyphTransform(i, glyphTransform); } ch = aci.setIndex(aci.getBeginIndex() + i + gv.getCharacterCount(i,i)); i++; firstChar = false; } advance = new Point2D.Float((float) (curr_x_pos - offset.getX()), (float) (curr_y_pos - offset.getY())); offset = new Point2D.Float(init_x_pos, init_y_pos); } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/ec5c7e43ea8c69519830a03c30ca27a7c284ae65/GlyphLayout.java/clean/sources/org/apache/batik/gvt/text/GlyphLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
17186,
15141,
3744,
12,
6494,
2230,
2335,
13,
288,
3639,
1149,
462,
273,
1721,
77,
18,
3645,
5621,
3639,
509,
277,
33,
20,
31,
3639,
1431,
14243,
13665,
319,
273,
353,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
17186,
15141,
3744,
12,
6494,
2230,
2335,
13,
288,
3639,
1149,
462,
273,
1721,
77,
18,
3645,
5621,
3639,
509,
277,
33,
20,
31,
3639,
1431,
14243,
13665,
319,
273,
353,
1... |
Boolean b1 = getBooleanArg(evaluator, args, 0); if ((b1 != null) && b1.booleanValue()) { return Boolean.TRUE; } Boolean b2 = getBooleanArg(evaluator, args, 1); if ((b2 != null) && b2.booleanValue()) { return Boolean.TRUE; } if (b1 == null || b2 == null) { | Double o0 = getDoubleArg(evaluator, args, 0, null); if (o0 == null) { | public Object evaluate(Evaluator evaluator, Exp[] args) { // if the first arg is known and true, we dont evaluate the second Boolean b1 = getBooleanArg(evaluator, args, 0); if ((b1 != null) && b1.booleanValue()) { return Boolean.TRUE; } Boolean b2 = getBooleanArg(evaluator, args, 1); if ((b2 != null) && b2.booleanValue()) { return Boolean.TRUE; } if (b1 == null || b2 == null) { return null; } return Boolean.valueOf(b1.booleanValue() || b2.booleanValue()); } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/6edfd201208294a63e08eefe822045d54d51622b/BuiltinFunTable.java/clean/src/main/mondrian/olap/fun/BuiltinFunTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
7734,
368,
309,
326,
1122,
1501,
353,
4846,
471,
638,
16,
732,
14046,
5956,
326,
2205,
7734,
3411,
324,
21,
273,
12835,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
7734,
368,
309,
326,
1122,
1501,
353,
4846,
471,
638,
16,
732,
14046,
5956,
326,
2205,
7734,
3411,
324,
21,
273,
12835,
... |
if (e.code != DND.ERROR_CANNOT_SET_CLIPBOARD) throw e; | if (e.code != DND.ERROR_CANNOT_SET_CLIPBOARD) { throw e; } | private void setClipboard(IResource[] resources, String[] fileNames, String names) { try { // set the clipboard contents if (fileNames.length > 0) { clipboard.setContents(new Object[] { resources, fileNames, names }, new Transfer[] { ResourceTransfer.getInstance(), FileTransfer.getInstance(), TextTransfer.getInstance() }); } else { clipboard.setContents(new Object[] { resources, names }, new Transfer[] { ResourceTransfer.getInstance(), TextTransfer.getInstance() }); } } catch (SWTError e) { if (e.code != DND.ERROR_CANNOT_SET_CLIPBOARD) throw e; if (MessageDialog .openQuestion( shell, ResourceNavigatorMessages.CopyToClipboardProblemDialog_title, ResourceNavigatorMessages.CopyToClipboardProblemDialog_message)) setClipboard(resources, fileNames, names); } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/CopyAction.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/CopyAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
11440,
3169,
3752,
12,
45,
1420,
8526,
2703,
16,
514,
8526,
27375,
16,
5411,
514,
1257,
13,
288,
3639,
775,
288,
5411,
368,
444,
326,
20304,
2939,
5411,
309,
261,
768,
1557,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11440,
3169,
3752,
12,
45,
1420,
8526,
2703,
16,
514,
8526,
27375,
16,
5411,
514,
1257,
13,
288,
3639,
775,
288,
5411,
368,
444,
326,
20304,
2939,
5411,
309,
261,
768,
1557,
... |
this.pos = (int) newPos.getLongValue(); | setPos(newPos); | public IRubyObject seek(RubyFixnum newPos) { this.pos = (int) newPos.getLongValue(); return this; } | 46258 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46258/5eacb9b98830d47a02fed1be88bea51ae0b56282/RubyDir.java/clean/src/org/jruby/RubyDir.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
6520,
12,
54,
10340,
8585,
2107,
394,
1616,
13,
288,
3639,
444,
1616,
12,
2704,
1616,
1769,
3639,
327,
333,
31,
565,
289,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
6520,
12,
54,
10340,
8585,
2107,
394,
1616,
13,
288,
3639,
444,
1616,
12,
2704,
1616,
1769,
3639,
327,
333,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return sig.toString(); | static String scriptSignature(Object[] values) { StringBuffer sig = new StringBuffer(); for (int i = 0; i < values.length; i++) { if (i != 0) sig.append(','); sig.append(scriptSignature(values[i])); } return sig.toString(); } | 19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/054499bd186d237ad7091bfd01531ac5682332b3/NativeJavaMethod.java/buggy/src/org/mozilla/javascript/NativeJavaMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
514,
2728,
5374,
12,
921,
8526,
924,
13,
565,
288,
3639,
6674,
3553,
273,
394,
6674,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
924,
18,
2469,
31,
277,
27245,
288,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
514,
2728,
5374,
12,
921,
8526,
924,
13,
565,
288,
3639,
6674,
3553,
273,
394,
6674,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
924,
18,
2469,
31,
277,
27245,
288,
5... | |
return selectionModel.getMaxSelectionIndex(); | return selectionModel.getMinSelectionIndex(); | public int getMinSelectionIndex() { return selectionModel.getMaxSelectionIndex(); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/8e6a933c7311b8af73a149d26777089b7dc8bd68/JList.java/clean/core/src/classpath/javax/javax/swing/JList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
9555,
6233,
1016,
1435,
225,
288,
565,
327,
4421,
1488,
18,
588,
2930,
6233,
1016,
5621,
225,
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,
282,
1071,
509,
9555,
6233,
1016,
1435,
225,
288,
565,
327,
4421,
1488,
18,
588,
2930,
6233,
1016,
5621,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
public String getPreviousBackoffReason() { | public synchronized String getPreviousBackoffReason() { | public String getPreviousBackoffReason() { return previousRoutingBackoffReason; } | 51738 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51738/7575bc3fb32360236cef62f655076b5de182f7d4/PeerNode.java/clean/src/freenet/node/PeerNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
17225,
16757,
8385,
1435,
288,
202,
202,
2463,
2416,
13966,
16757,
8385,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
17225,
16757,
8385,
1435,
288,
202,
202,
2463,
2416,
13966,
16757,
8385,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return requiresFileTransferDeployOnNodeCreation; } | return requiresFileTransferDeployOnNodeCreation; } | public boolean isRequiredFileTransferDeployOnNodeCreation() { return requiresFileTransferDeployOnNodeCreation; } | 50951 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50951/f44df3d99e2dc7bd6a0dc5aa3185b75fc9e53aa2/AbstractExternalProcess.java/buggy/src/org/objectweb/proactive/core/process/AbstractExternalProcess.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
14967,
812,
5912,
10015,
1398,
907,
9906,
1435,
288,
202,
202,
2463,
4991,
812,
5912,
10015,
1398,
907,
9906,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
14967,
812,
5912,
10015,
1398,
907,
9906,
1435,
288,
202,
202,
2463,
4991,
812,
5912,
10015,
1398,
907,
9906,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
cmof.reflection.Object object = new cmof.UmlClassImpl(_805, extent, null, "cmof.UmlClassImpl", new String[]{"cmof.UmlClassCustom", "cmof.ClassifierCustom", "core.abstractions.umlsuper.ClassifierCustom", "cmof.TypeCustom", "core.abstractions.classifiers.ClassifierCustom", "core.abstractions.typedelements.TypeCustom", "core.abstractions.namespaces.NamespaceCustom", "cmof.NamedElementCustom", "core.abstractions.namespaces.NamedElementCustom", "core.abstractions.ownerships.ElementCustom"});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("packageImport", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("metaClassifier", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("visibility", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("isAbstract", new Boolean(false));((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("attribute", new java.lang.Object[] {_796,_782});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("member", new java.lang.Object[] {_792,_779,_782,_796,_809,_786,_791});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedMember", new java.lang.Object[] {_796,_782});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("superClass", new java.lang.Object[] {_801});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedElement", new java.lang.Object[] {_796,_782});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("metaInstances", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedAttribute", new java.lang.Object[] {_796,_782});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("__container", _788);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedOperation", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("feature", new java.lang.Object[] {_796,_782});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("name", "Box");((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("__metaClass", "cmof.Class");((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("__components", new java.lang.Object[] {_782,_796});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("namespace", _788);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedRule", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("elementImport", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("owner", _788);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("importedMember", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("qualifiedName", "warehouse.Box");((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("general", new java.lang.Object[] {_801});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("inheritedMember", new java.lang.Object[] {_779,_792,_809,_791,_786});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("uri", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("tag", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedComment", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("package", _788); | cmof.reflection.Object object = new cmof.PropertyImpl(_781, extent, null, "cmof.PropertyImpl", new java.lang.String[]{"core.abstractions.multiplicities.MultiplicityElementCustom", "cmof.RedefinableElementCustom", "cmof.NamedElementCustom", "core.abstractions.redefinitions.RedefinableElementCustom", "core.abstractions.namespaces.NamedElementCustom", "core.abstractions.ownerships.ElementCustom"});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("visibility", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("isDerived", new Boolean(false));((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("subsettedProperty", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("redefinitionContext", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("redefinedProperty", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("datatype", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("redefinedElement", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("association", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("isComposite", new Boolean(false));((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedElement", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("upper", new Long(1));((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("lower", new Integer(1));((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("__container", _804);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("isReadOnly", new Boolean(false));((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("isOrdered", new Boolean(false));((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("isUnique", new Boolean(true));((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("featuringClassifier", new java.lang.Object[] {_804});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("name", "foo");((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("__metaClass", "cmof.Property");((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("__components", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("namespace", _804);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("owningAssociation", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("type", _783);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("owner", _804);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("class", _804);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("details", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("default", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("qualifiedName", "warehouse.Element.foo");((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("isDerivedUnion", new Boolean(false));((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("opposite", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("uri", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedBehavior", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("isID", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("tag", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedComment", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("qualifier", null); | private static cmof.reflection.Object getObject16(hub.sam.mof.reflection.ExtentImpl extent) { cmof.reflection.Object object = new cmof.UmlClassImpl(_805, extent, null, "cmof.UmlClassImpl", new String[]{"cmof.UmlClassCustom", "cmof.ClassifierCustom", "core.abstractions.umlsuper.ClassifierCustom", "cmof.TypeCustom", "core.abstractions.classifiers.ClassifierCustom", "core.abstractions.typedelements.TypeCustom", "core.abstractions.namespaces.NamespaceCustom", "cmof.NamedElementCustom", "core.abstractions.namespaces.NamedElementCustom", "core.abstractions.ownerships.ElementCustom"});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("packageImport", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("metaClassifier", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("visibility", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("isAbstract", new Boolean(false));((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("attribute", new java.lang.Object[] {_796,_782});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("member", new java.lang.Object[] {_792,_779,_782,_796,_809,_786,_791});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedMember", new java.lang.Object[] {_796,_782});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("superClass", new java.lang.Object[] {_801});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedElement", new java.lang.Object[] {_796,_782});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("metaInstances", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedAttribute", new java.lang.Object[] {_796,_782});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("__container", _788);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedOperation", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("feature", new java.lang.Object[] {_796,_782});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("name", "Box");((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("__metaClass", "cmof.Class");((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("__components", new java.lang.Object[] {_782,_796});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("namespace", _788);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedRule", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("elementImport", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("owner", _788);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("importedMember", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("qualifiedName", "warehouse.Box");((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("general", new java.lang.Object[] {_801});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("inheritedMember", new java.lang.Object[] {_779,_792,_809,_791,_786});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("uri", null);((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("tag", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("ownedComment", new java.lang.Object[] {});((hub.sam.mof.reflection.ObjectImpl)object).putAttribute("package", _788); return object; } | 11562 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11562/da796acdb9182c3e903bd702640ac50a4ab89699/WarehouseModel.java/buggy/trunk/AMOF2/resources/test/initial-src/warehouse/WarehouseModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
5003,
792,
18,
26606,
18,
921,
6455,
2313,
12,
14986,
18,
20353,
18,
81,
792,
18,
26606,
18,
17639,
2828,
11933,
13,
288,
3639,
5003,
792,
18,
26606,
18,
921,
733,
273,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
5003,
792,
18,
26606,
18,
921,
6455,
2313,
12,
14986,
18,
20353,
18,
81,
792,
18,
26606,
18,
17639,
2828,
11933,
13,
288,
3639,
5003,
792,
18,
26606,
18,
921,
733,
273,
394,
... |
return; | return null; | private void addDependency( XMLWriter writer, Artifact artifact, List reactorProjects ) { String path = getProjectPath( reactorProjects, artifact ); String kind = path == null ? "var" : "src"; // fall-through when no local project could be found in the reactor if ( path == null ) { File artifactPath = artifact.getFile(); if ( artifactPath == null ) { System.err.println( "The artifacts path was null. Artifact id: " + artifact.getId() ); return; } path = "M2_REPO/" + toRelative( localRepository, artifactPath.getPath() ); } writer.startElement( "classpathentry" ); writer.addAttribute( "kind", kind ); writer.addAttribute( "path", path ); writer.endElement(); } | 48791 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48791/b2945853430a56785876444e925145b0e900ec8e/EclipseWriter.java/buggy/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
527,
7787,
12,
3167,
2289,
2633,
16,
14022,
6462,
16,
987,
19178,
15298,
262,
565,
288,
3639,
514,
589,
273,
11080,
743,
12,
19178,
15298,
16,
6462,
11272,
7734,
514,
3846,
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,
527,
7787,
12,
3167,
2289,
2633,
16,
14022,
6462,
16,
987,
19178,
15298,
262,
565,
288,
3639,
514,
589,
273,
11080,
743,
12,
19178,
15298,
16,
6462,
11272,
7734,
514,
3846,
273... |
ourMethodsMaps.put(type, genericInfoImpl); | myMethodsMaps.put(type, genericInfoImpl); | public final GenericInfoImpl getGenericInfo(final Type type) { GenericInfoImpl genericInfoImpl = ourMethodsMaps.get(type); if (genericInfoImpl == null) { if (type instanceof Class) { genericInfoImpl = new GenericInfoImpl((Class<? extends DomElement>)type, this); ourMethodsMaps.put(type, genericInfoImpl); } else if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType)type; genericInfoImpl = new GenericInfoImpl((Class<? extends DomElement>)parameterizedType.getRawType(), this); ourMethodsMaps.put(type, genericInfoImpl); } else { assert false : "Type not supported " + type; } } return genericInfoImpl; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/b6d192964422230ab6469e53e1e7750ca08640fe/DomManagerImpl.java/buggy/dom/impl/src/com/intellij/util/xml/impl/DomManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
7928,
28015,
20135,
966,
12,
6385,
1412,
618,
13,
288,
565,
7928,
28015,
5210,
28015,
273,
3134,
4712,
8903,
18,
588,
12,
723,
1769,
565,
309,
261,
13540,
28015,
422,
446,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
7928,
28015,
20135,
966,
12,
6385,
1412,
618,
13,
288,
565,
7928,
28015,
5210,
28015,
273,
3134,
4712,
8903,
18,
588,
12,
723,
1769,
565,
309,
261,
13540,
28015,
422,
446,
13,
... |
List removedDays = model.refresh(date); freeObsoleteCalendarableEventControls(removedDays); updateVisibleRows(); computeEventRowsForDate(date); | computeLayoutFor(date); | public void refresh(Date date) { checkWidget(); List removedDays = model.refresh(date); freeObsoleteCalendarableEventControls(removedDays); updateVisibleRows(); computeEventRowsForDate(date); layoutEventControls(); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/d7ecf0aaf3caa0a30c4af1ae3f56c19363fab76a/DayEditor.java/buggy/examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/compositetable/day/DayEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4460,
12,
1626,
1509,
13,
288,
202,
202,
1893,
4609,
5621,
202,
202,
682,
3723,
9384,
273,
938,
18,
9144,
12,
712,
1769,
202,
202,
9156,
27637,
19513,
7335,
429,
1133,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4460,
12,
1626,
1509,
13,
288,
202,
202,
1893,
4609,
5621,
202,
202,
682,
3723,
9384,
273,
938,
18,
9144,
12,
712,
1769,
202,
202,
9156,
27637,
19513,
7335,
429,
1133,
16... |
elFormTag.setAction(ACTION_NAME); elFormTag.setMethod("GET"); | elFormTag.setActionExpr(ACTION_NAME); elFormTag.setMethodExpr("GET"); | public void testMethod() throws ServletException, JspException { ActionServlet actionServlet = new ActionServlet(); actionServlet.init(pageContext.getServletConfig()); actionServlet.init(); ApplicationConfig appConfig = new ApplicationConfig(""); pageContext.setAttribute(Action.APPLICATION_KEY, appConfig, PageContext.APPLICATION_SCOPE); ActionMapping mapping = new ActionMapping(); mapping.setName(ACTION_NAME); mapping.setPath(convertActionNameToPath(mapping.getName())); ActionFormBean formBean = new ActionFormBean(mapping.getName(), FORM_BEAN_CLASS); appConfig.addActionConfig(mapping); appConfig.addFormBeanConfig(formBean); HttpServletResponse response = (HttpServletResponse)pageContext.getResponse(); String encodedURL = response.encodeURL(getActionMappingURL(mapping.getName())); response.addHeader(REQUIRED_NAME_VALUE_KEY, ACTION_NAME); response.addHeader(REQUIRED_METHOD_VALUE_KEY, "GET"); response.addHeader(REQUIRED_ACTION_VALUE_KEY, encodedURL); elFormTag.setAction(ACTION_NAME); elFormTag.setMethod("GET"); int startTagReturn = elFormTag.doStartTag(); int endTagReturn = elFormTag.doEndTag(); } | 8610 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8610/2dbb705eab3659c5c2ceb6398f2eec56e1f6994d/TestELFormTag.java/clean/struts-el/src/test/org/apache/strutsel/taglib/html/TestELFormTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1305,
1435,
3639,
1216,
16517,
16,
27485,
377,
288,
3639,
4382,
4745,
282,
1301,
4745,
225,
273,
394,
4382,
4745,
5621,
3639,
1301,
4745,
18,
2738,
12,
2433,
1042,
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,
377,
1071,
918,
1842,
1305,
1435,
3639,
1216,
16517,
16,
27485,
377,
288,
3639,
4382,
4745,
282,
1301,
4745,
225,
273,
394,
4382,
4745,
5621,
3639,
1301,
4745,
18,
2738,
12,
2433,
1042,
18,
58... |
totalProcessTime = System.currentTimeMillis() - totalProcessTime; System.out.println("====== RESULTS ======"); System.out.println("TOTAL query time: " + totalQueryTime/1000 + "s" + " (" + ((float)totalQueryTime/(float)(totalQueryTime+totalProcessTime)) + ")"); System.out.println("TOTAL process time: " + totalProcessTime/1000 + "s" + " (" + ((float)totalProcessTime/(float)(totalQueryTime+totalProcessTime)) + ")"); System.out.println("====================="); | totalProcessTime = System.currentTimeMillis() - totalProcessTime; System.out.println("====== RESULTS ======"); System.out.println("TOTAL query time: " + totalQueryTime/1000 + "s" + " (" + ((float)totalQueryTime/(float)(totalQueryTime+totalProcessTime)) + ")"); System.out.println("TOTAL process time: " + totalProcessTime/1000 + "s" + " (" + ((float)totalProcessTime/(float)(totalQueryTime+totalProcessTime)) + ")"); System.out.println("====================="); | protected JFreeChart doChart(Connection con) throws JRScriptletException, SQLException { final int seriesA = 0; // datasetA (primary, first) final int seriesB = 1; // datasetB final int seriesC = 2; // datasetC TimeSeries datasetA = new TimeSeries(seriesATitle, Minute.class); TimeSeries datasetB = new TimeSeries(seriesBTitle, Minute.class); TimeSeries datasetC = new TimeSeries(seriesCTitle, Minute.class); final int BUCKETS = 1440 / MINUTES_PER_BUCKET; // TRUNCATE TIME TO MINUTES, COMPUTE NUMBER OF QUERIES long startMinuteInMillis = (startDate.getTime() / MINUTE_INTERVAL) * MINUTE_INTERVAL; long endMinuteInMillis = (endDate.getTime() / MINUTE_INTERVAL) * MINUTE_INTERVAL; long periodMillis = endMinuteInMillis - startMinuteInMillis; int periodMinutes = (int)(periodMillis / MINUTE_INTERVAL); int queries = periodMinutes/(BUCKETS*MINUTES_PER_BUCKET) + (periodMinutes%(BUCKETS*MINUTES_PER_BUCKET)>0?1:0); int periodBuckets = periodMinutes/(MINUTES_PER_BUCKET) + (periodMinutes%(MINUTES_PER_BUCKET)>0?1:0); System.out.println("====== START ======"); System.out.println("start: " + (new Timestamp(startMinuteInMillis)).toString() ); System.out.println("end: " + (new Timestamp(endMinuteInMillis)).toString() ); System.out.println("mins: " + periodMinutes); System.out.println("days: " + queries); System.out.println("==================="); // ALLOCATE COUNTS int size; if( periodMinutes >= BUCKETS*MINUTES_PER_BUCKET ) size = BUCKETS; else size = periodMinutes/(BUCKETS*MINUTES_PER_BUCKET) + (periodMinutes%(BUCKETS*MINUTES_PER_BUCKET)>0?1:0); double countsA[] = new double[ size ]; double countsB[] = new double[ size ]; double countsC[] = new double[ size ]; // SETUP TIMESTAMPS Timestamp startTimestamp, endTimestamp; startTimestamp = new Timestamp(startMinuteInMillis); endTimestamp = new Timestamp(endMinuteInMillis); totalQueryTime = System.currentTimeMillis(); String sql = "SELECT date_trunc('minute', time_stamp) as time_stamp," + " sum(nat_sessions), sum(tcp_incoming + tcp_outgoing + udp_incoming + udp_outgoing + icmp_incoming + icmp_outgoing), sum(dmz_sessions)" + " FROM tr_nat_statistic_evt where" + " time_stamp <= ? AND time_stamp >= ?" + " GROUP BY time_stamp" + " ORDER BY time_stamp"; int sidx = 1; PreparedStatement stmt = con.prepareStatement(sql); stmt.setTimestamp(sidx++, endTimestamp); stmt.setTimestamp(sidx++, startTimestamp); ResultSet rs = stmt.executeQuery(); totalQueryTime = System.currentTimeMillis() - totalQueryTime; totalProcessTime = System.currentTimeMillis(); // PROCESS EACH ROW while (rs.next()) { // GET RESULTS Timestamp eventDate = rs.getTimestamp(1); long countA = rs.getLong(2); long countB = rs.getLong(3); long countC = rs.getLong(4); // ALLOCATE COUNT TO EACH MINUTE WE WERE ALIVE EQUALLY long eventStart = (eventDate.getTime() / MINUTE_INTERVAL) * MINUTE_INTERVAL; long realStart = eventStart < startMinuteInMillis ? (long) 0 : eventStart - startMinuteInMillis; int startInterval = (int)(realStart / MINUTE_INTERVAL)/MINUTES_PER_BUCKET; // COMPUTE COUNTS IN INTERVALS countsA[startInterval%BUCKETS] += countA; countsB[startInterval%BUCKETS] += countB; countsC[startInterval%BUCKETS] += countC; } try { stmt.close(); } catch (SQLException x) { } // POST PROCESS: PRODUCE UNITS OF KBytes/sec., AVERAGED PER DAY, FROM BYTES PER BUCKET double averageACount, averageBCount, averageCCount; for(int i = 0; i < size; i++) { // MOVING AVERAGE averageACount = averageBCount = averageCCount = 0; int newIndex = 0; int denom = 0; for(int j=0; j<MOVING_AVERAGE_MINUTES; j++){ newIndex = i-j; if( newIndex >= 0 ) denom++; else continue; averageACount += countsA[newIndex] / (double)queries / (double)(60*MINUTES_PER_BUCKET); averageBCount += countsB[newIndex] / (double)queries / (double)(60*MINUTES_PER_BUCKET); averageCCount += countsC[newIndex] / (double)queries / (double)(60*MINUTES_PER_BUCKET); } averageACount /= denom; averageBCount /= denom; averageCCount /= denom; java.util.Date date = new java.util.Date(startMinuteInMillis + i * MINUTE_INTERVAL * MINUTES_PER_BUCKET ); datasetA.addOrUpdate(new Minute(date), averageACount); datasetB.addOrUpdate(new Minute(date), averageBCount); datasetC.addOrUpdate(new Minute(date), averageCCount); } totalProcessTime = System.currentTimeMillis() - totalProcessTime; System.out.println("====== RESULTS ======"); System.out.println("TOTAL query time: " + totalQueryTime/1000 + "s" + " (" + ((float)totalQueryTime/(float)(totalQueryTime+totalProcessTime)) + ")"); System.out.println("TOTAL process time: " + totalProcessTime/1000 + "s" + " (" + ((float)totalProcessTime/(float)(totalQueryTime+totalProcessTime)) + ")"); System.out.println("====================="); TimeSeriesCollection tsc = new TimeSeriesCollection(); tsc.addSeries(datasetA); tsc.addSeries(datasetB); tsc.addSeries(datasetC); JFreeChart jfChart = ChartFactory.createTimeSeriesChart(chartTitle, timeAxisLabel, valueAxisLabel, tsc, true, true, false); XYPlot xyPlot = (XYPlot) jfChart.getPlot(); XYItemRenderer xyIRenderer = xyPlot.getRenderer(); xyIRenderer.setSeriesStroke(seriesA, new BasicStroke(1.3f)); xyIRenderer.setSeriesPaint(seriesA, Color.green); xyIRenderer.setSeriesStroke(seriesB, new BasicStroke(1.3f)); xyIRenderer.setSeriesPaint(seriesB, Color.blue); xyIRenderer.setSeriesStroke(seriesC, new BasicStroke(1.3f)); xyIRenderer.setSeriesPaint(seriesC, Color.red); return jfChart; } | 49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/ad2338c4283e959effa8ec881f68d13a60ceeb7a/SummaryGraph.java/buggy/tran/nat/main/com/metavize/tran/nat/reports/SummaryGraph.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
804,
9194,
7984,
741,
7984,
12,
1952,
356,
13,
1216,
27974,
3651,
1810,
503,
16,
6483,
565,
288,
3639,
727,
509,
4166,
37,
273,
374,
31,
368,
3709,
37,
261,
8258,
16,
1122,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
804,
9194,
7984,
741,
7984,
12,
1952,
356,
13,
1216,
27974,
3651,
1810,
503,
16,
6483,
565,
288,
3639,
727,
509,
4166,
37,
273,
374,
31,
368,
3709,
37,
261,
8258,
16,
1122,
13,
... |
public boolean isSet(org.quickfix.field.PartyID field) | public boolean isSet(quickfix.field.PartyID field) | public boolean isSet(org.quickfix.field.PartyID field) { return isSetField(field); } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/MultilegOrderCancelReplaceRequest.java/clean/src/java/src/quickfix/fix44/MultilegOrderCancelReplaceRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
13532,
12,
19525,
904,
18,
1518,
18,
17619,
734,
652,
13,
225,
288,
327,
13532,
974,
12,
1518,
1769,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
13532,
12,
19525,
904,
18,
1518,
18,
17619,
734,
652,
13,
225,
288,
327,
13532,
974,
12,
1518,
1769,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
List<String> selectedLangNames = new ArrayList<String>(); | List<Language> selectedLangs = new ArrayList<Language>(); | public List<String> getToDos() { List<String> toDoList = new ArrayList<String>(); if (pc.getTotalLevels() <= 1 || Globals.checkRule(RuleConstants.INTBONUSLANG)) { int numLanguages = pc.languageNum(false); List<Language> availableLangs = new ArrayList<Language>(); List<String> selectedLangNames = new ArrayList<String>(); List<Language> excludedLangs = new ArrayList<Language>(); buildLangLists(availableLangs, selectedLangNames, excludedLangs); if (selectedLangNames.size() < (numLanguages)) { if (Globals.checkRule(RuleConstants.INTBONUSLANG)) { toDoList.add(PropertyFactory.getString("in_isaTodoLangRemain")); //$NON-NLS-1$ } else { toDoList.add(PropertyFactory.getString("in_isaTodoLangRemainFirstOnly")); //$NON-NLS-1$ } } else if (selectedLangNames.size() > (numLanguages)) { toDoList.add(PropertyFactory.getString("in_isaTodoLangTooMany")); //$NON-NLS-1$ } } return toDoList; } | 48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/c4278c23c7f75e91ab874b8ba28131550acadd47/InfoSpecialAbilities.java/clean/code/src/java/pcgen/gui/tabs/InfoSpecialAbilities.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
32,
780,
34,
19478,
40,
538,
1435,
202,
95,
202,
202,
682,
32,
780,
34,
358,
3244,
682,
273,
394,
2407,
32,
780,
34,
5621,
202,
202,
430,
261,
2436,
18,
588,
5269,
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,
225,
202,
482,
987,
32,
780,
34,
19478,
40,
538,
1435,
202,
95,
202,
202,
682,
32,
780,
34,
358,
3244,
682,
273,
394,
2407,
32,
780,
34,
5621,
202,
202,
430,
261,
2436,
18,
588,
5269,
12... |
for (int i = 0; i < restrictedColumns.length; i++) { RowsetDefinition.Column column = restrictedColumns[i]; Object value = row.get(column.name); if (value == null) { return false; } final Object requiredValue = restrictions.get(column.name); String[] requiredValues; if (requiredValue instanceof String) { requiredValues = new String[] {(String) requiredValue}; } else if (requiredValue instanceof String[]) { requiredValues = (String[]) requiredValue; } else { throw new XmlaException( CLIENT_FAULT_FC, HSB_BAD_RESTRICTION_TYPE_CODE, HSB_BAD_RESTRICTION_TYPE_FAULT_FS, Util.newInternal("Restriction value is of wrong type: " + requiredValue)); } String[] values; if (value instanceof String) { values = new String[] {(String) value}; } else if (value instanceof String[]) { values = (String[]) value; } else { throw new XmlaException( CLIENT_FAULT_FC, HSB_BAD_RESTRICTION_VALUE_CODE, HSB_BAD_RESTRICTION_VALUE_FAULT_FS, Util.newInternal("Unexpected value type: " + value)); } if (!haveCommonMember(requiredValues, values)) { return false; } } | protected final boolean addRow(Row row, List rows) throws XmlaException { for (int i = 0; i < restrictedColumns.length; i++) { RowsetDefinition.Column column = restrictedColumns[i]; Object value = row.get(column.name); if (value == null) { return false; } final Object requiredValue = restrictions.get(column.name); String[] requiredValues; if (requiredValue instanceof String) { requiredValues = new String[] {(String) requiredValue}; } else if (requiredValue instanceof String[]) { requiredValues = (String[]) requiredValue; } else { throw new XmlaException( CLIENT_FAULT_FC, HSB_BAD_RESTRICTION_TYPE_CODE, HSB_BAD_RESTRICTION_TYPE_FAULT_FS, Util.newInternal("Restriction value is of wrong type: " + requiredValue)); } String[] values; if (value instanceof String) { values = new String[] {(String) value}; } else if (value instanceof String[]) { values = (String[]) value; } else { throw new XmlaException( CLIENT_FAULT_FC, HSB_BAD_RESTRICTION_VALUE_CODE, HSB_BAD_RESTRICTION_VALUE_FAULT_FS, Util.newInternal("Unexpected value type: " + value)); } if (!haveCommonMember(requiredValues, values)) { return false; } } return rows.add(row); } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/dd3619858adf8a80618b1c4b570c84445dc1e849/Rowset.java/clean/src/main/mondrian/xmla/Rowset.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
727,
1250,
22030,
12,
1999,
1027,
16,
987,
2595,
13,
1216,
5714,
69,
503,
288,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
15693,
3380,
18,
2469,
31,
277,
27245,
288,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
727,
1250,
22030,
12,
1999,
1027,
16,
987,
2595,
13,
1216,
5714,
69,
503,
288,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
15693,
3380,
18,
2469,
31,
277,
27245,
288,
5411,
... | |
if (types!=null &&!types.isEmpty()) { T = new Table(10,types.size() + 1); | Table T = new Table(); | private PresentationObject getTypes() throws RemoteException, FinderException { Collection types = service.getApartmentTypeHome().findAll(); Table T = new Table(); if (types!=null &&!types.isEmpty()) { T = new Table(10,types.size() + 1); T.setCellpadding(4); T.setCellspacing(2); int row = 1, col = 1; T.add(getHeaderText(iwrb.getLocalizedString("name", "Name")), col++, row); T.add(getHeaderText(iwrb.getLocalizedString("area", "Area(m2)")), col++, row); T.add(getHeaderText(iwrb.getLocalizedString("rooms", "Rooms")), col++, row); T.add(getHeaderText(iwrb.getLocalizedString("kitchen", "Kitchen")), col++, row); T.add(getHeaderText(iwrb.getLocalizedString("bath", "Bath")), col++, row); T.add(getHeaderText(iwrb.getLocalizedString("storage", "Storage")), col++, row); T.add(getHeaderText(iwrb.getLocalizedString("study", "Study")), col++, row); T.add(getHeaderText(iwrb.getLocalizedString("loft", "Loft")), col++, row); T.add(getHeaderText(iwrb.getLocalizedString("furniture", "Furniture")), col++, row); T.add(getHeaderText(iwrb.getLocalizedString("balcony", "Balcony")), col++, row); T.setColumnAlignment(3, "center"); T.setColumnAlignment(4, "center"); T.setColumnAlignment(5, "center"); T.setColumnAlignment(6, "center"); T.setColumnAlignment(7, "center"); T.setColumnAlignment(8, "center"); T.setColumnAlignment(9, "center"); T.setColumnAlignment(10, "center"); for (Iterator iter = types.iterator(); iter.hasNext();) { ApartmentType type = (ApartmentType) iter.next(); row += 2; col = 1; T.add(getATLink(type.getPrimaryKey().toString(), type.getName()), col++, row); T.add(getBodyText(String.valueOf(type.getArea())), col++, row); T.add(getBodyText(type.getRoomCount()), col++, row); T.add(getBodyText(type.getKitchen() ? "X" : "N"), col++, row); T.add(getBodyText(type.getBathRoom() ? "X" : "N"), col++, row); T.add(getBodyText(type.getStorage() ? "X" : "N"), col++, row); T.add(getBodyText(type.getStudy() ? "X" : "N"), col++, row); T.add(getBodyText(type.getLoft() ? "X" : "N"), col++, row); T.add(getBodyText(type.getFurniture() ? "X" : "N"), col++, row); T.add(getBodyText(type.getBalcony() ? "X" : "N"), col++, row); } T.setBorder(0); T.setVerticalZebraColored("#942829", "#21304a"); } return T; } | 57352 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57352/f4ed842fa82d9ac1ea871a201abfe3132c20e560/BuildingEditor.java/buggy/src/java/com/idega/block/building/presentation/BuildingEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
25130,
367,
921,
20780,
1435,
1216,
18361,
16,
19307,
503,
288,
6862,
202,
2532,
1953,
273,
1156,
18,
588,
1294,
24144,
559,
8684,
7675,
4720,
1595,
5621,
1082,
202,
1388,
399,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
25130,
367,
921,
20780,
1435,
1216,
18361,
16,
19307,
503,
288,
6862,
202,
2532,
1953,
273,
1156,
18,
588,
1294,
24144,
559,
8684,
7675,
4720,
1595,
5621,
1082,
202,
1388,
399,
... |
"Item 1", "Item 2", "Item 3"} ); | "Item 1", "Item 2", "Item 3", "Item 4", "Item 5"} ); | public static final Chart createLegendScript( ) { ChartWithAxes cwaBar = ChartWithAxesImpl.create( ); cwaBar.setScript( "function beforeDrawLegendEntry(label, scriptContext)" //$NON-NLS-1$ + "{label.getCaption( ).getColor().set( 35, 184, 245 );"//$NON-NLS-1$ + "label.getCaption().getFont().setBold(true);" //$NON-NLS-1$ + "label.getCaption().getFont().setItalic(true);" //$NON-NLS-1$ + "label.getOutline().setVisible(true);" //$NON-NLS-1$ + "label.getOutline().getColor().set( 177, 12, 187);}" //$NON-NLS-1$ ); cwaBar.getLegend( ).setItemType( LegendItemType.CATEGORIES_LITERAL ); cwaBar.getTitle( ).getLabel( ).getCaption( ).setValue( "Chart with Legend Script" ); //$NON-NLS-1$ // X-Axis Axis xAxisPrimary = cwaBar.getPrimaryBaseAxes( )[0]; xAxisPrimary.setType( AxisType.TEXT_LITERAL ); xAxisPrimary.getOrigin( ).setType( IntersectionType.MIN_LITERAL ); // Y-Axisj Axis yAxisPrimary = cwaBar.getPrimaryOrthogonalAxis( xAxisPrimary ); yAxisPrimary.getMajorGrid( ).setTickStyle( TickStyle.LEFT_LITERAL ); yAxisPrimary.setType( AxisType.LINEAR_LITERAL ); // Data Set TextDataSet categoryValues = TextDataSetImpl.create( new String[]{ "Item 1", "Item 2", "Item 3"} ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ NumberDataSet orthoValues = NumberDataSetImpl.create( new double[]{ 8, 18, -15 } ); // X-Series Series seCategory = SeriesImpl.create( ); seCategory.setDataSet( categoryValues ); SeriesDefinition sdX = SeriesDefinitionImpl.create( ); xAxisPrimary.getSeriesDefinitions( ).add( sdX ); sdX.getSeries( ).add( seCategory ); // Y-Series BarSeries bs = (BarSeries) BarSeriesImpl.create( ); bs.setDataSet( orthoValues ); bs.getLabel( ).setVisible( true ); SeriesDefinition sdY = SeriesDefinitionImpl.create( ); yAxisPrimary.getSeriesDefinitions( ).add( sdY ); sdY.getSeries( ).add( bs ); return cwaBar; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/87be376b194f799be46893d03147e84946c9d70b/LegendScript.java/buggy/chart/org.eclipse.birt.chart.examples/src/org/eclipse/birt/chart/examples/view/models/LegendScript.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
727,
14804,
752,
16812,
3651,
12,
262,
202,
95,
202,
202,
7984,
1190,
26494,
14098,
69,
5190,
273,
14804,
1190,
26494,
2828,
18,
2640,
12,
11272,
202,
202,
71,
91,
69,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
727,
14804,
752,
16812,
3651,
12,
262,
202,
95,
202,
202,
7984,
1190,
26494,
14098,
69,
5190,
273,
14804,
1190,
26494,
2828,
18,
2640,
12,
11272,
202,
202,
71,
91,
69,
51... |
public boolean equals(Object obj) | private static boolean equals(BigInteger x, BigInteger y) | public boolean equals(Object obj) { if (! (obj instanceof BigInteger)) return false; return equals(this, (BigInteger) obj); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/BigInteger.java/buggy/core/src/classpath/java/java/math/BigInteger.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
1250,
1606,
12,
24198,
619,
16,
10246,
677,
13,
225,
288,
565,
309,
16051,
261,
2603,
1276,
10246,
3719,
1377,
327,
629,
31,
565,
327,
1606,
12,
2211,
16,
261,
24198,
13,
108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
760,
1250,
1606,
12,
24198,
619,
16,
10246,
677,
13,
225,
288,
565,
309,
16051,
261,
2603,
1276,
10246,
3719,
1377,
327,
629,
31,
565,
327,
1606,
12,
2211,
16,
261,
24198,
13,
108... |
"org/mozilla/javascript/ScriptRuntime", | "org/mozilla/javascript/JavaAdapter", | private static void generateEmptyCtor(ClassFileWriter cfw, String adapterName, String superName, String scriptClassName) { cfw.startMethod("<init>", "()V", ClassFileWriter.ACC_PUBLIC); // Invoke base class constructor cfw.add(ByteCode.ALOAD_0); // this cfw.add(ByteCode.INVOKESPECIAL, superName, "<init>", "()", "V"); // Load script class cfw.add(ByteCode.NEW, scriptClassName); cfw.add(ByteCode.DUP); cfw.add(ByteCode.INVOKESPECIAL, scriptClassName, "<init>", "()", "V"); // Run script and save resulting scope cfw.add(ByteCode.INVOKESTATIC, "org/mozilla/javascript/ScriptRuntime", "runScript", "(Lorg/mozilla/javascript/Script;)", "Lorg/mozilla/javascript/Scriptable;"); cfw.add(ByteCode.ASTORE_1); // Save the Scriptable in instance variable "self" cfw.add(ByteCode.ALOAD_0); // this cfw.add(ByteCode.ALOAD_1); // the Scriptable cfw.add(ByteCode.PUTFIELD, adapterName, "self", "Lorg/mozilla/javascript/Scriptable;"); // Set the prototype of the js object to be a LiveConnect // wrapper of the generated class's object cfw.add(ByteCode.ALOAD_1); // the Scriptable cfw.add(ByteCode.ALOAD_0); // this cfw.add(ByteCode.INVOKESTATIC, "org/mozilla/javascript/ScriptRuntime", "setAdapterProto", "(Lorg/mozilla/javascript/Scriptable;" + "Ljava/lang/Object;)", "V"); cfw.add(ByteCode.RETURN); cfw.stopMethod((short)20, null); // TODO: magic number "20" } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/f61a4fa629dd0699e1a2d0893806311ab8a9dfd1/JavaAdapter.java/buggy/js/rhino/src/org/mozilla/javascript/JavaAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
2103,
1921,
27425,
12,
797,
812,
2289,
6080,
91,
16,
514,
4516,
461,
16,
4766,
6647,
514,
2240,
461,
16,
514,
2728,
3834,
13,
377,
288,
3639,
6080,
91,
18,
1937,
1305,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
2103,
1921,
27425,
12,
797,
812,
2289,
6080,
91,
16,
514,
4516,
461,
16,
4766,
6647,
514,
2240,
461,
16,
514,
2728,
3834,
13,
377,
288,
3639,
6080,
91,
18,
1937,
1305,
... |
{ } | { return null; } | public java.sql.ResultSet getTableTypes() throws SQLException { // XXX-Not Implemented } | 47288 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47288/6a061da272f04e1463864065f87f1f3fd61d6162/DatabaseMetaData.java/clean/src/interfaces/jdbc/postgresql/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
5638,
2016,
1435,
1216,
6483,
202,
95,
202,
202,
759,
11329,
17,
1248,
18788,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
5638,
2016,
1435,
1216,
6483,
202,
95,
202,
202,
759,
11329,
17,
1248,
18788,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
ret = saveButtonText; break; | ret = saveButtonText; break; | public String getDialogTitle(JFileChooser fc) { String ret = fc.getDialogTitle(); if (ret != null) return ret; switch (fc.getDialogType()) { case JFileChooser.OPEN_DIALOG: ret = openButtonText; break; case JFileChooser.SAVE_DIALOG: ret = saveButtonText; break; default: ret = fc.getApproveButtonText(); break; } if (ret == null) ret = openButtonText; return ret; } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/312ed3a41bc121830464ffbc954ac1e4b19d48c2/BasicFileChooserUI.java/buggy/javax/swing/plaf/basic/BasicFileChooserUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
31774,
4247,
12,
46,
812,
17324,
8036,
13,
225,
288,
565,
514,
325,
273,
8036,
18,
588,
6353,
4247,
5621,
565,
309,
261,
1349,
480,
446,
13,
1377,
327,
325,
31,
565,
1620,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
31774,
4247,
12,
46,
812,
17324,
8036,
13,
225,
288,
565,
514,
325,
273,
8036,
18,
588,
6353,
4247,
5621,
565,
309,
261,
1349,
480,
446,
13,
1377,
327,
325,
31,
565,
1620,
... |
public final void enumerateCollect(ObjectReference object) throws InlinePragma { | public final void enumerateCollect(ObjectReference object) throws InlinePragma { | public final void enumerateCollect(ObjectReference object) throws InlinePragma { if (RCBase.isRCObject(object)) { if (RefCountSpace.isGreen(object)) RCBase.collector().addToDecBuf(object); else workQueue.push(object); } } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/4c66aa27cec27f8dd5902baec018ff86d7f49ee2/TrialDeletion.java/buggy/MMTk/src/org/mmtk/utility/TrialDeletion.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
4241,
10808,
12,
22101,
733,
13,
377,
1216,
16355,
2050,
9454,
288,
565,
309,
261,
11529,
2171,
18,
291,
11529,
921,
12,
1612,
3719,
288,
1377,
309,
261,
1957,
1380,
3819,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
4241,
10808,
12,
22101,
733,
13,
377,
1216,
16355,
2050,
9454,
288,
565,
309,
261,
11529,
2171,
18,
291,
11529,
921,
12,
1612,
3719,
288,
1377,
309,
261,
1957,
1380,
3819,... |
public void setStructureStylesheetUserPreferences(int userId,int profileId, String stylesheetName, Document upXML) throws Exception { RdbmServices rdbmService = new RdbmServices(); Connection con = rdbmService.getConnection(); try { StringWriter outString = new StringWriter (); OutputFormat format=new OutputFormat(upXML); format.setOmitXMLDeclaration(true); XMLSerializer xsl = new XMLSerializer (outString,format); xsl.serialize (upXML); Statement stmt=con.createStatement(); String sQuery = "SELECT USER_PREFERENCES_XML FROM UP_USER_SS_PREFS WHERE USER_ID="+userId+" AND STYLESHEET_NAME='"+stylesheetName+"' AND PROFILE_ID="+profileId; Logger.log(Logger.DEBUG,"DBImpl::setStructureStylesheetUserPreferences() : "+sQuery); ResultSet rs=stmt.executeQuery(sQuery); if(rs.next()) { sQuery = "UPDATE UP_USER_SS_PREFS SET USER_PREFERENCES_XML='"+outString.toString()+"' WHERE USER_ID = "+userId+" AND STYLESHEET_NAME='"+stylesheetName+"' AND PROFILE_ID="+profileId; Logger.log(Logger.DEBUG,"DBImpl::setStructureStylesheetUserPreferences() : "+sQuery); stmt.executeUpdate(sQuery); } else { sQuery = "INSERT INTO UP_USER_SS_PREFS (USER_ID,PROFILE_ID,NAME,STYLESHEET_NAME,USER_PREFERENCES_XML) VALUES ("+userId+","+profileId+",'"+stylesheetName+"','"+outString.toString()+"')"; Logger.log(Logger.DEBUG,"DBImpl::setStructureStylesheetUserPreferences() : "+sQuery); stmt.executeQuery(sQuery); } } finally { rdbmService.releaseConnection (con); } | public void setStructureStylesheetUserPreferences (int userId, int profileId, String stylesheetName, Document upXML) throws Exception { RdbmServices rdbmService = new RdbmServices(); Connection con = rdbmService.getConnection(); try { StringWriter outString = new StringWriter(); OutputFormat format = new OutputFormat(upXML); format.setOmitXMLDeclaration(true); XMLSerializer xsl = new XMLSerializer(outString, format); xsl.serialize(upXML); Statement stmt = con.createStatement(); String sQuery = "SELECT USER_ID, USER_PREFERENCES_XML FROM UP_USER_SS_PREFS WHERE USER_ID=" + userId + " AND STYLESHEET_NAME='" + stylesheetName + "' AND PROFILE_ID=" + profileId; Logger.log(Logger.DEBUG, "DBImpl::setStructureStylesheetUserPreferences() : " + sQuery); ResultSet rs = stmt.executeQuery(sQuery); if (rs.next()) { sQuery = "UPDATE UP_USER_SS_PREFS SET USER_PREFERENCES_XML='" + outString.toString() + "' WHERE USER_ID = " + userId + " AND STYLESHEET_NAME='" + stylesheetName + "' AND PROFILE_ID=" + profileId; Logger.log(Logger.DEBUG, "DBImpl::setStructureStylesheetUserPreferences() : " + sQuery); stmt.executeUpdate(sQuery); } else { sQuery = "INSERT INTO UP_USER_SS_PREFS (USER_ID,PROFILE_ID,NAME,STYLESHEET_NAME,USER_PREFERENCES_XML) VALUES (" + userId + "," + profileId + ",'" + stylesheetName + "','" + outString.toString() + "')"; Logger.log(Logger.DEBUG, "DBImpl::setStructureStylesheetUserPreferences() : " + sQuery); stmt.executeQuery(sQuery); } } finally { rdbmService.releaseConnection(con); | public void setStructureStylesheetUserPreferences(int userId,int profileId, String stylesheetName, Document upXML) throws Exception { RdbmServices rdbmService = new RdbmServices(); Connection con = rdbmService.getConnection(); try { // update the database StringWriter outString = new StringWriter (); OutputFormat format=new OutputFormat(upXML); format.setOmitXMLDeclaration(true); XMLSerializer xsl = new XMLSerializer (outString,format); xsl.serialize (upXML); Statement stmt=con.createStatement(); // this is ugly, but we have to know wether to do INSERT or UPDATE String sQuery = "SELECT USER_PREFERENCES_XML FROM UP_USER_SS_PREFS WHERE USER_ID="+userId+" AND STYLESHEET_NAME='"+stylesheetName+"' AND PROFILE_ID="+profileId; Logger.log(Logger.DEBUG,"DBImpl::setStructureStylesheetUserPreferences() : "+sQuery); ResultSet rs=stmt.executeQuery(sQuery); if(rs.next()) { sQuery = "UPDATE UP_USER_SS_PREFS SET USER_PREFERENCES_XML='"+outString.toString()+"' WHERE USER_ID = "+userId+" AND STYLESHEET_NAME='"+stylesheetName+"' AND PROFILE_ID="+profileId; Logger.log(Logger.DEBUG,"DBImpl::setStructureStylesheetUserPreferences() : "+sQuery); stmt.executeUpdate(sQuery); } else { sQuery = "INSERT INTO UP_USER_SS_PREFS (USER_ID,PROFILE_ID,NAME,STYLESHEET_NAME,USER_PREFERENCES_XML) VALUES ("+userId+","+profileId+",'"+stylesheetName+"','"+outString.toString()+"')"; Logger.log(Logger.DEBUG,"DBImpl::setStructureStylesheetUserPreferences() : "+sQuery); stmt.executeQuery(sQuery); } } finally { rdbmService.releaseConnection (con); } } | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/da068f3fc3c2a9d337780f6c72e612d14035790e/DBImpl.java/clean/source/org/jasig/portal/DBImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
6999,
24656,
1299,
12377,
12,
474,
6249,
16,
474,
25903,
16,
514,
13820,
461,
16,
4319,
731,
4201,
13,
1216,
1185,
288,
1377,
534,
1966,
81,
5676,
436,
1966,
81,
1179,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
6999,
24656,
1299,
12377,
12,
474,
6249,
16,
474,
25903,
16,
514,
13820,
461,
16,
4319,
731,
4201,
13,
1216,
1185,
288,
1377,
534,
1966,
81,
5676,
436,
1966,
81,
1179,
2... |
public void ignorableWhitespace(XMLString text) throws XNIException { | public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException { | public void ignorableWhitespace(XMLString text) throws XNIException { } // ignorableWhitespace(XMLString) | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/ee3cf4ff9e64a0ae2d3c850b7c9b40e51771781d/AbstractXMLDocumentParser.java/buggy/src/org/apache/xerces/parsers/AbstractXMLDocumentParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
9750,
15514,
9431,
12,
4201,
780,
977,
16,
432,
14870,
1012,
279,
9024,
13,
1216,
1139,
50,
45,
503,
288,
565,
289,
368,
9750,
15514,
9431,
12,
4201,
780,
13,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
9750,
15514,
9431,
12,
4201,
780,
977,
16,
432,
14870,
1012,
279,
9024,
13,
1216,
1139,
50,
45,
503,
288,
565,
289,
368,
9750,
15514,
9431,
12,
4201,
780,
13,
2,
-100,
-100,
... |
Class[] types = typer.getParameterTypes(bucket.get(0)); | private static void member_helper_size(final CodeEmitter e, List members, final ObjectSwitchCallback callback, final ParameterTyper typer, final Label def, final Label end) throws Exception { final Map buckets = CollectionUtils.bucket(members, new Transformer() { public Object transform(Object value) { return new Integer(typer.getParameterTypes(value).length); } }); e.dup(); e.arraylength(); e.process_switch(ComplexOps.getSwitchKeys(buckets), new ProcessSwitchCallback() { public void processCase(int key, Label dontUseEnd) throws Exception { List bucket = (List)buckets.get(new Integer(key)); Class[] types = typer.getParameterTypes(bucket.get(0)); member_helper_type(e, bucket, callback, typer, def, end, new TinyBitSet()); } public void processDefault() throws Exception { e.goTo(def); } }); } | 836 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/836/12fda34df59cae8ac82762052f70e80b22de9cdc/ComplexOps.java/buggy/src/proxy/net/sf/cglib/core/ComplexOps.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
3140,
67,
4759,
67,
1467,
12,
6385,
3356,
13476,
425,
16,
4766,
6647,
987,
4833,
16,
4766,
6647,
727,
1033,
10200,
2428,
1348,
16,
4766,
6647,
727,
5498,
56,
8300,
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,
3238,
760,
918,
3140,
67,
4759,
67,
1467,
12,
6385,
3356,
13476,
425,
16,
4766,
6647,
987,
4833,
16,
4766,
6647,
727,
1033,
10200,
2428,
1348,
16,
4766,
6647,
727,
5498,
56,
8300,
268,
... | |
public void testCallableStatementExec3() throws Exception { CallableStatement cstmt = con.prepareCall("execute sp_who"); makeTestTables(cstmt); makeObjects(cstmt, 8); ResultSet rs = cstmt.executeQuery(); dump(rs); cstmt.close(); rs.close(); } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/f23675b413a471c068f08551f90854f46440ea89/CallableStatementTest.java/buggy/trunk/jtds/src/test/net/sourceforge/jtds/test/CallableStatementTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
3813,
11452,
3406,
1905,
23,
1435,
15069,
503,
95,
11452,
3406,
71,
10589,
33,
591,
18,
9366,
1477,
2932,
4177,
993,
84,
67,
3350,
83,
8863,
6540,
4709,
6905,
12,
71,
10589,
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,
1071,
6459,
3813,
11452,
3406,
1905,
23,
1435,
15069,
503,
95,
11452,
3406,
71,
10589,
33,
591,
18,
9366,
1477,
2932,
4177,
993,
84,
67,
3350,
83,
8863,
6540,
4709,
6905,
12,
71,
10589,
1769,
... | ||
TaskUiUtil.openEditor(task, false); | TasksUiUtil.openEditor(task, false); | 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(); TaskUiUtil.openEditor(task, false); } }); } else { //TaskUiUtil.openRepositoryTask(...); close(); } return Status.OK_STATUS; } catch (Exception e) { MylarStatusHandler.fail(e, "Error submitting to JIRA server", true); return Status.OK_STATUS; } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/c1eb77a543e77a2d8b5d065277671c932384e413/JiraTaskEditor.java/buggy/org.eclipse.mylyn.jira.ui/src/org/eclipse/mylyn/internal/jira/core/ui/editor/JiraTaskEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
1117,
467,
1482,
1086,
12,
45,
5491,
7187,
6438,
13,
288,
9506,
202,
698,
288,
6862,
202,
12956,
5672,
273,
804,
11547,
3305,
7487,
18,
3510,
46,
11547,
12956,
12,
588,
3305,
2174,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1117,
467,
1482,
1086,
12,
45,
5491,
7187,
6438,
13,
288,
9506,
202,
698,
288,
6862,
202,
12956,
5672,
273,
804,
11547,
3305,
7487,
18,
3510,
46,
11547,
12956,
12,
588,
3305,
2174,
... |
System.out.println("\t" + id + "\t" + filename + "\t" + "FORWARD"); index.println("\t\t" + id + " {"); index.println("\t\t\t" + status + " {"); index.println("\t\t\t\tresource:process(transliterator) {\"" + filename + "\"}"); index.println("\t\t\t\tdirection {\"FORWARD\"}"); index.println("\t\t\t}"); index.println("\t\t}"); | System.out.println(" " + id + " " + filename + " " + "FORWARD"); index.println(" " + id + " {"); index.println(" " + status + " {"); index.println(" resource:process(transliterator) {\"" + filename + "\"}"); index.println(" direction {\"FORWARD\"}"); index.println(" }"); index.println(" }"); | private String addIndexInfo(PrintWriter index, String path, String transID) { parts.set(path); Map attributes = parts.findAttributes("transform"); if (attributes == null) return null; // error, not a transform file String source = (String) attributes.get("source"); String target = (String) attributes.get("target"); String variant = (String) attributes.get("variant"); String direction = (String) attributes.get("direction"); // HACK //if (transID.indexOf("InterIndic") >= 0) direction = "forward"; // END HACK String visibility = (String) attributes.get("visibility"); String status = "internal".equals(visibility) ? "internal" : "file"; String id = source + "-" + target; String rid = target + "-" + source; String filename = source + "_" + target; if (variant != null) { id += "/" + variant; rid += "/" + variant; filename += "_" + variant; } filename += ".txt"; if (direction.equals("both") || direction.equals("forward")) { System.out.println("\t" + id + "\t" + filename + "\t" + "FORWARD"); index.println("\t\t" + id + " {"); index.println("\t\t\t" + status + " {"); index.println("\t\t\t\tresource:process(transliterator) {\"" + filename + "\"}"); index.println("\t\t\t\tdirection {\"FORWARD\"}"); index.println("\t\t\t}"); index.println("\t\t}"); } if (direction.equals("both") || direction.equals("backward")) { System.out.println("\t" + id + "\t" + filename + "\t" + "BACKWARD"); index.println("\t\t" + id + " {"); index.println("\t\t\t" + status + " {"); index.println("\t\t\t\tresource:process(transliterator) {\"" + filename + "\"}"); index.println("\t\t\t\tdirection {\"BACKWARD\"}"); index.println("\t\t\t}"); index.println("\t\t}"); } index.println(); return filename; } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/001293ac7091ce9fd95ff2f4de2174bc309582c3/ConvertTransforms.java/buggy/tools/java/org/unicode/cldr/icu/ConvertTransforms.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
26794,
966,
12,
5108,
2289,
770,
16,
514,
589,
16,
514,
906,
734,
13,
288,
202,
202,
6019,
18,
542,
12,
803,
1769,
202,
202,
863,
1677,
273,
2140,
18,
4720,
2498,
2932... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
26794,
966,
12,
5108,
2289,
770,
16,
514,
589,
16,
514,
906,
734,
13,
288,
202,
202,
6019,
18,
542,
12,
803,
1769,
202,
202,
863,
1677,
273,
2140,
18,
4720,
2498,
2932... |
public void onEncode(ClientKey key, ClientPutState state) { | public void onEncode(BaseClientKey key, ClientPutState state) { | public void onEncode(ClientKey key, ClientPutState state) { this.uri = key.getURI(); client.onGeneratedURI(uri, this); } | 49933 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49933/c6aa82ac420d1cc2277bea0c09c5c8fcbaf51ad0/ClientPutter.java/buggy/src/freenet/client/async/ClientPutter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
603,
5509,
12,
1227,
653,
498,
16,
2445,
6426,
1119,
919,
13,
288,
202,
202,
2211,
18,
1650,
273,
498,
18,
588,
3098,
5621,
202,
202,
2625,
18,
265,
7823,
3098,
12,
165... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
603,
5509,
12,
1227,
653,
498,
16,
2445,
6426,
1119,
919,
13,
288,
202,
202,
2211,
18,
1650,
273,
498,
18,
588,
3098,
5621,
202,
202,
2625,
18,
265,
7823,
3098,
12,
165... |
MockHttpServletResponse response = new MockHttpServletResponse(); | GrailsHttpServletResponse response = new GrailsHttpServletResponse(new MockHttpServletResponse()); | public void testRedirectDynamicMethod() throws Exception { GroovyClassLoader gcl = new GroovyClassLoader(); MockHttpServletRequest request = new MockHttpServletRequest(); request.setCharacterEncoding("utf-8"); MockHttpServletResponse response = new MockHttpServletResponse(); request.addParameter("testParam", "testValue"); Class groovyClass = gcl.parseClass( "class TestController {\n" + "def next = {\n" + "return ['success':this.params['testParam2']]" + "}\n" + "def list = {\n" + "redirect(action:next,params:['testParam2':'testValue2'])\n" + "}\n" + "}" ); Class secondController = gcl.parseClass( "class SecondController {\n" + "def list = {\n" + "return redirect(action:'test/list',params:['testParam2':'testValue2'])\n" + "}\n" + "}" ); GrailsApplication application = createGrailsApplication(new Class[] { groovyClass,secondController },gcl); MockServletContext mockContext =new MockServletContext(); mockContext.setAttribute(GrailsApplicationAttributes.APPLICATION_CONTEXT,context); GrailsControllerHelper helper1 = new SimpleGrailsControllerHelper(application,context,mockContext); GrailsControllerHelper helper2 = new SimpleGrailsControllerHelper(application,context,mockContext); // first test redirection within the same controller try { helper1.handleURI("/test/list",request,response); } catch(MissingMethodException mme) { fail("Missing method exception should not have been thrown!"); } catch(MissingPropertyException mpex) { fail("Missing property exception should not have been thrown!"); } // now redirection to another controller try { request = new MockHttpServletRequest(); response = new MockHttpServletResponse(); request.setCharacterEncoding("utf-8"); helper2.handleURI("/second/list",request,response); } catch(MissingMethodException mme) { fail("Missing method exception should not have been thrown!"); } catch(MissingPropertyException mpex) { fail("Missing property exception should not have been thrown!"); } } | 53275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53275/a69de2359e35657b0bda15659649eb6cfeeeac77/ControllerMetaClassTests.java/clean/test/web/org/codehaus/groovy/grails/web/metaclass/ControllerMetaClassTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
5961,
9791,
1305,
1435,
1216,
1185,
288,
3639,
20841,
7805,
314,
830,
273,
394,
20841,
7805,
5621,
3639,
7867,
2940,
18572,
590,
273,
394,
7867,
2940,
18572,
5621,
3639,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5961,
9791,
1305,
1435,
1216,
1185,
288,
3639,
20841,
7805,
314,
830,
273,
394,
20841,
7805,
5621,
3639,
7867,
2940,
18572,
590,
273,
394,
7867,
2940,
18572,
5621,
3639,
59... |
public static Code create(String lang) { | public static Code create(Ruby runtime, String lang) { | public static Code create(String lang) { if (lang == null) { return NIL; } else if (lang.charAt(0) == 'n' || lang.charAt(0) == 'N') { return NONE; } else if (lang.charAt(0) == 'u' || lang.charAt(0) == 'U') { return UTF8; } else if (lang.charAt(0) == 's' || lang.charAt(0) == 'S') { return SJIS; } return NIL; } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/de4c49d21f91fafaad36890ce5108ebf5c0404e8/RubyRegexp.java/buggy/src/org/jruby/RubyRegexp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
760,
3356,
752,
12,
780,
3303,
13,
288,
1082,
202,
430,
261,
4936,
422,
446,
13,
288,
9506,
202,
2463,
423,
2627,
31,
1082,
202,
97,
469,
309,
261,
4936,
18,
3001,
861,
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,
3196,
202,
482,
760,
3356,
752,
12,
780,
3303,
13,
288,
1082,
202,
430,
261,
4936,
422,
446,
13,
288,
9506,
202,
2463,
423,
2627,
31,
1082,
202,
97,
469,
309,
261,
4936,
18,
3001,
861,
12,... |
String indent= fScanner.computeIndentation(fDocument.getLength()); | String indent= fScanner.computeIndentation(fDocument.getLength()).toString(); | public void testIndentation8() { // method definition fDocument.set("\t/* package */ void proc (int par1, int par2) {\n"); String indent= fScanner.computeIndentation(fDocument.getLength()); Assert.assertEquals("\t\t", indent); } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/8e195f216566020b3a6bc071aa20ae4681443fba/JavaHeuristicScannerTest.java/buggy/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/text/JavaHeuristicScannerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
24438,
28,
1435,
288,
202,
202,
759,
707,
2379,
202,
202,
74,
2519,
18,
542,
31458,
88,
20308,
2181,
1195,
918,
5418,
261,
474,
779,
21,
16,
509,
779,
22,
13,
188... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24438,
28,
1435,
288,
202,
202,
759,
707,
2379,
202,
202,
74,
2519,
18,
542,
31458,
88,
20308,
2181,
1195,
918,
5418,
261,
474,
779,
21,
16,
509,
779,
22,
13,
188... |
return js_NaN_date_str; | return jsFunction_NaN_date_str; | private static String date_format(double t, int format) { if (t != t) return js_NaN_date_str; StringBuffer result = new StringBuffer(60); double local = LocalTime(t); /* offset from GMT in minutes. The offset includes daylight savings, if it applies. */ int minutes = (int) Math.floor((LocalTZA + DaylightSavingTA(t)) / msPerMinute); /* map 510 minutes to 0830 hours */ int offset = (minutes / 60) * 100 + minutes % 60; String dateStr = Integer.toString(DateFromTime(local)); String hourStr = Integer.toString(HourFromTime(local)); String minStr = Integer.toString(MinFromTime(local)); String secStr = Integer.toString(SecFromTime(local)); String offsetStr = Integer.toString(offset > 0 ? offset : -offset); int year = YearFromTime(local); String yearStr = Integer.toString(year > 0 ? year : -year); /* Tue Oct 31 09:41:40 GMT-0800 (PST) 2000 */ /* Tue Oct 31 2000 */ /* 09:41:40 GMT-0800 (PST) */ if (format != FORMATSPEC_TIME) { result.append(days[WeekDay(local)]); result.append(" "); result.append(months[MonthFromTime(local)]); if (dateStr.length() == 1) result.append(" 0"); else result.append(" "); result.append(dateStr); result.append(" "); } if (format != FORMATSPEC_DATE) { if (hourStr.length() == 1) result.append("0"); result.append(hourStr); if (minStr.length() == 1) result.append(":0"); else result.append(":"); result.append(minStr); if (secStr.length() == 1) result.append(":0"); else result.append(":"); result.append(secStr); if (offset > 0) result.append(" GMT+"); else result.append(" GMT-"); for (int i = offsetStr.length(); i < 4; i++) result.append("0"); result.append(offsetStr); if (timeZoneFormatter == null) timeZoneFormatter = new java.text.SimpleDateFormat("zzz"); if (timeZoneFormatter != null) { result.append(" ("); java.util.Date date = new Date((long) t); result.append(timeZoneFormatter.format(date)); result.append(")"); } if (format != FORMATSPEC_TIME) result.append(" "); } if (format != FORMATSPEC_TIME) { if (year < 0) result.append("-"); for (int i = yearStr.length(); i < 4; i++) result.append("0"); result.append(yearStr); } return result.toString(); } | 12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/5af1999afa2517f3fdd455bd42c304be785b5b59/NativeDate.java/clean/org/mozilla/javascript/NativeDate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
1509,
67,
2139,
12,
9056,
268,
16,
509,
740,
13,
288,
3639,
309,
261,
88,
480,
268,
13,
5411,
327,
3828,
2083,
67,
21172,
67,
712,
67,
701,
31,
3639,
6674,
563,
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,
760,
514,
1509,
67,
2139,
12,
9056,
268,
16,
509,
740,
13,
288,
3639,
309,
261,
88,
480,
268,
13,
5411,
327,
3828,
2083,
67,
21172,
67,
712,
67,
701,
31,
3639,
6674,
563,
273,
... |
} | } | protected IdentityConstraint(String elementName) { fElementName = elementName; } // <init>(String) | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/3f708498a1dd05b5eca31e1877d3bb8b92144146/IdentityConstraint.java/clean/src/org/apache/xerces/validators/schema/identity/IdentityConstraint.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
7808,
5806,
12,
780,
14453,
13,
288,
3639,
284,
30584,
273,
14453,
31,
565,
289,
368,
411,
2738,
34,
12,
780,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
7808,
5806,
12,
780,
14453,
13,
288,
3639,
284,
30584,
273,
14453,
31,
565,
289,
368,
411,
2738,
34,
12,
780,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
val = 16 * val + Character.digit((char) c2, 16); c = val; | public int getToken() throws IOException { int c; tokenno++; // Check for pushed-back token if (this.pushbackToken != EOF) { int result = this.pushbackToken; this.pushbackToken = EOF; return result; } // Eat whitespace, possibly sensitive to newlines. do { c = in.read(); if (c == '\n') if ((flags & TSF_NEWLINES) != 0) break; } while (isJSSpace(c) || c == '\n'); if (c == EOF_CHAR) return EOF; // identifier/keyword/instanceof? // watch out for starting with a <backslash> boolean isUnicodeEscapeStart = false; if (c == '\\') { c = in.read(); if (c == 'u') isUnicodeEscapeStart = true; else c = '\\'; // always unread the 'u' or whatever, we need // to start the string below at the <backslash>. in.unread(); } if (isUnicodeEscapeStart || Character.isJavaIdentifierStart((char)c)) { in.startString(); boolean containsEscape = isUnicodeEscapeStart; do { c = in.read(); if (c == '\\') { c = in.read(); containsEscape = (c == 'u'); } } while (Character.isJavaIdentifierPart((char)c)); in.unread(); int result; String str = in.getString(); // OPT we shouldn't have to make a string (object!) to // check if it's a keyword. // strictly speaking we should probably push-back // all the bad characters if the <backslash>uXXXX // sequence is malformed. But since there isn't a // correct context(is there?) for a bad Unicode // escape sequence after an identifier, we can report // an error here. if (containsEscape) { char ca[] = str.toCharArray(); StringBuffer x = new StringBuffer(); int escStart = str.indexOf("\\u"); int start = 0; while (escStart != -1) { x.append(ca, start, escStart); boolean goodEscape = false; if ((escStart + 5) < ca.length) { if (isXDigit(ca[escStart + 2])) { int val = Character.digit(ca[escStart + 2], 16); if (isXDigit(ca[escStart + 3])) { val = (val << 4) | Character.digit(ca[escStart + 3], 16); if (isXDigit(ca[escStart + 4])) { val = (val << 4) | Character.digit(ca[escStart + 4], 16); if (isXDigit(ca[escStart + 5])) { val = (val << 4) | Character.digit(ca[escStart + 5], 16); x.append((char)val); start = escStart + 6; goodEscape = true; } } } } } if (!goodEscape) { reportSyntaxError("msg.invalid.escape", null); return ERROR; } escStart = str.indexOf("\\u", start); } x.append(ca, start, ca.length - start); str = x.toString(); } else // Return the corresponding token if it's a keyword if ((result = stringToKeyword(str)) != EOF) { return result; } this.string = str; return NAME; } // is it a number? if (isDigit(c) || (c == '.' && isDigit(in.peek()))) { int base = 10; in.startString(); double dval = ScriptRuntime.NaN; long longval = 0; boolean isInteger = true; if (c == '0') { c = in.read(); if (c == 'x' || c == 'X') { c = in.read(); base = 16; // restart the string, losing leading 0x in.startString(); } else if (isDigit(c)) { base = 8; } } while (isXDigit(c)) { if (base < 16) { if (isAlpha(c)) break; /* * We permit 08 and 09 as decimal numbers, which * makes our behavior a superset of the ECMA * numeric grammar. We might not always be so * permissive, so we warn about it. */ if (base == 8 && c >= '8') { Object[] errArgs = { c == '8' ? "8" : "9" }; Context.reportWarning( Context.getMessage("msg.bad.octal.literal", errArgs), getSourceName(), in.getLineno(), getLine(), getOffset()); base = 10; } } c = in.read(); } if (base == 10 && (c == '.' || c == 'e' || c == 'E')) { isInteger = false; if (c == '.') { do { c = in.read(); } while (isDigit(c)); } if (c == 'e' || c == 'E') { c = in.read(); if (c == '+' || c == '-') { c = in.read(); } if (!isDigit(c)) { in.getString(); // throw away string in progress reportSyntaxError("msg.missing.exponent", null); return ERROR; } do { c = in.read(); } while (isDigit(c)); } } in.unread(); String numString = in.getString(); if (base == 10 && !isInteger) { try { // Use Java conversion to number from string... dval = (Double.valueOf(numString)).doubleValue(); } catch (NumberFormatException ex) { Object[] errArgs = { ex.getMessage() }; reportSyntaxError("msg.caught.nfe", errArgs); return ERROR; } } else { dval = ScriptRuntime.stringToNumber(numString, 0, base); longval = (long) dval; // is it an integral fits-in-a-long value? if (longval != dval) isInteger = false; } if (!isInteger) { /* Can't handle floats right now, because postfix INC/DEC generate Doubles, but I would generate a Float through this path, and it causes a stack mismatch. FIXME (MS) if (Float.MIN_VALUE <= dval && dval <= Float.MAX_VALUE) this.number = new Xloat((float) dval); else */ this.number = new Double(dval); } else { // We generate the smallest possible type here if (Byte.MIN_VALUE <= longval && longval <= Byte.MAX_VALUE) this.number = new Byte((byte)longval); else if (Short.MIN_VALUE <= longval && longval <= Short.MAX_VALUE) this.number = new Short((short)longval); else if (Integer.MIN_VALUE <= longval && longval <= Integer.MAX_VALUE) this.number = new Integer((int)longval); else { // May lose some precision here, but that's the // appropriate semantics. this.number = new Double(longval); } } return NUMBER; } // is it a string? if (c == '"' || c == '\'') { // We attempt to accumulate a string the fast way, by // building it directly out of the reader. But if there // are any escaped characters in the string, we revert to // building it out of a StringBuffer. StringBuffer stringBuf = null; int quoteChar = c; int val = 0; c = in.read(); in.startString(); // start after the first " while(c != quoteChar) { if (c == '\n' || c == EOF_CHAR) { in.unread(); in.getString(); // throw away the string in progress reportSyntaxError("msg.unterminated.string.lit", null); return ERROR; } if (c == '\\') { // We've hit an escaped character; revert to the // slow method of building a string. if (stringBuf == null) { // Don't include the backslash in.unread(); stringBuf = new StringBuffer(in.getString()); in.read(); } switch (c = in.read()) { case 'b': c = '\b'; break; case 'f': c = '\f'; break; case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; case 'v': c = '\u000B'; break; // \v a late addition to the ECMA spec. // '\v' doesn't seem to be valid Java. default: if (isDigit(c) && c < '8') { val = c - '0'; c = in.read(); if (isDigit(c) && c < '8') { val = 8 * val + c - '0'; c = in.read(); if (isDigit(c) && c < '8') { val = 8 * val + c - '0'; c = in.read(); } } in.unread(); if (val > 0377) { reportSyntaxError("msg.oct.esc.too.large", null); return ERROR; } c = val; } else if (c == 'u') { /* * Get 4 hex digits; if the u escape is not * followed by 4 hex digits, use 'u' + the literal * character sequence that follows. Do some manual * match (OK because we're in a string) to avoid * multi-char match on the underlying stream. */ int c1, c2, c3, c4; c1 = in.read(); if (!isXDigit(c1)) { in.unread(); c = 'u'; } else { val = Character.digit((char) c1, 16); c2 = in.read(); if (!isXDigit(c2)) { in.unread(); stringBuf.append('u'); c = c1; } else { val = 16 * val + Character.digit((char) c2, 16); c3 = in.read(); if (!isXDigit(c3)) { in.unread(); stringBuf.append('u'); stringBuf.append((char)c1); c = c2; } else { val = 16 * val + Character.digit((char) c3, 16); c4 = in.read(); if (!isXDigit(c4)) { in.unread(); stringBuf.append('u'); stringBuf.append((char)c1); stringBuf.append((char)c2); c = c3; } else { // got 4 hex digits! Woo Hoo! val = 16 * val + Character.digit((char) c4, 16); c = val; } } } } } else if (c == 'x') { /* Get 2 hex digits, defaulting to 'x' + literal * sequence, as above. */ int c1, c2; c1 = in.read(); if (!isXDigit(c1)) { in.unread(); c = 'x'; } else { val = Character.digit((char) c1, 16); c2 = in.read(); if (!isXDigit(c2)) { in.unread(); stringBuf.append('x'); c = c1; } else { // got 2 hex digits val = 16 * val + Character.digit((char) c2, 16); c = val; } } } } } if (stringBuf != null) stringBuf.append((char) c); c = in.read(); } if (stringBuf != null) this.string = stringBuf.toString(); else { in.unread(); // miss the trailing " this.string = in.getString(); in.read(); } return STRING; } switch (c) { case '\n': return EOL; case ';': return SEMI; case '[': return LB; case ']': return RB; case '{': return LC; case '}': return RC; case '(': return LP; case ')': return RP; case ',': return COMMA; case '?': return HOOK; case ':': return COLON; case '.': return DOT; case '|': if (in.match('|')) { return OR; } else if (in.match('=')) { this.op = BITOR; return ASSIGN; } else { return BITOR; } case '^': if (in.match('=')) { this.op = BITXOR; return ASSIGN; } else { return BITXOR; } case '&': if (in.match('&')) { return AND; } else if (in.match('=')) { this.op = BITAND; return ASSIGN; } else { return BITAND; } case '=': if (in.match('=')) { if (in.match('=')) this.op = SHEQ; else this.op = EQ; return EQOP; } else { this.op = NOP; return ASSIGN; } case '!': if (in.match('=')) { if (in.match('=')) this.op = SHNE; else this.op = NE; return EQOP; } else { this.op = NOT; return UNARYOP; } case '<': /* NB:treat HTML begin-comment as comment-till-eol */ if (in.match('!')) { if (in.match('-')) { if (in.match('-')) { while ((c = in.read()) != EOF_CHAR && c != '\n') /* skip to end of line */; in.unread(); return getToken(); // in place of 'goto retry' } in.unread(); } in.unread(); } if (in.match('<')) { if (in.match('=')) { this.op = LSH; return ASSIGN; } else { this.op = LSH; return SHOP; } } else { if (in.match('=')) { this.op = LE; return RELOP; } else { this.op = LT; return RELOP; } } case '>': if (in.match('>')) { if (in.match('>')) { if (in.match('=')) { this.op = URSH; return ASSIGN; } else { this.op = URSH; return SHOP; } } else { if (in.match('=')) { this.op = RSH; return ASSIGN; } else { this.op = RSH; return SHOP; } } } else { if (in.match('=')) { this.op = GE; return RELOP; } else { this.op = GT; return RELOP; } } case '*': if (in.match('=')) { this.op = MUL; return ASSIGN; } else { return MUL; } case '/': // is it a // comment? if (in.match('/')) { while ((c = in.read()) != EOF_CHAR && c != '\n') /* skip to end of line */; in.unread(); return getToken(); } if (in.match('*')) { while ((c = in.read()) != -1 && !(c == '*' && in.match('/'))) { if (c == '\n') { } else if (c == '/' && in.match('*')) { if (in.match('/')) return getToken(); reportSyntaxError("msg.nested.comment", null); return ERROR; } } if (c == EOF_CHAR) { reportSyntaxError("msg.unterminated.comment", null); return ERROR; } return getToken(); // `goto retry' } // is it a regexp? if ((flags & TSF_REGEXP) != 0) { // We don't try to use the in.startString/in.getString // approach, because escaped characters (which break it) // seem likely to be common. StringBuffer re = new StringBuffer(); while ((c = in.read()) != '/') { if (c == '\n' || c == EOF_CHAR) { in.unread(); reportSyntaxError("msg.unterminated.re.lit", null); return ERROR; } if (c == '\\') { re.append((char) c); c = in.read(); } re.append((char) c); } StringBuffer flagsBuf = new StringBuffer(); while (true) { if (in.match('g')) flagsBuf.append('g'); else if (in.match('i')) flagsBuf.append('i'); else if (in.match('m')) flagsBuf.append('m'); else break; } if (isAlpha(in.peek())) { reportSyntaxError("msg.invalid.re.flag", null); return ERROR; } this.string = re.toString(); this.regExpFlags = flagsBuf.toString(); return OBJECT; } if (in.match('=')) { this.op = DIV; return ASSIGN; } else { return DIV; } case '%': this.op = MOD; if (in.match('=')) { return ASSIGN; } else { return MOD; } case '~': this.op = BITNOT; return UNARYOP; case '+': case '-': if (in.match('=')) { if (c == '+') { this.op = ADD; return ASSIGN; } else { this.op = SUB; return ASSIGN; } } else if (in.match((char) c)) { if (c == '+') { return INC; } else { return DEC; } } else if (c == '-') { return SUB; } else { return ADD; } default: reportSyntaxError("msg.illegal.character", null); return ERROR; } } | 12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/135bd46aabf0abf9692d483af253653998067e2b/TokenStream.java/buggy/src/org/mozilla/javascript/TokenStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9162,
1435,
1216,
1860,
288,
3639,
509,
276,
31,
3639,
1147,
2135,
9904,
31,
3639,
368,
2073,
364,
18543,
17,
823,
1147,
3639,
309,
261,
2211,
18,
6206,
823,
1345,
480,
6431,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9162,
1435,
1216,
1860,
288,
3639,
509,
276,
31,
3639,
1147,
2135,
9904,
31,
3639,
368,
2073,
364,
18543,
17,
823,
1147,
3639,
309,
261,
2211,
18,
6206,
823,
1345,
480,
6431,
... | |
int n = 0; | int n = 0, i; | public int setFileName(String pathInfoFileName) throws GalleryException { String s = pathInfoFileName.startsWith("/") ? pathInfoFileName .substring(1) : pathInfoFileName; String s1; int n = 0; if (s.startsWith("index")) { // GalleryException if (s.equals("index." + configData.urlExtention)) { indexNum = 1; } else { int i = 0; s1 = s.substring("index".length(), s.indexOf('.')); try { i = Integer.parseInt(s1); } catch (NumberFormatException e) { throw new GalleryNotFoundException("URL not found", e); } indexNum = 1 + i; if (indexNum > totalIndexes) { throw new GalleryNotFoundException("URL not found"); } } int maxImagesPerIndex = cols * rows; imageNum = 1 + (indexNum - 1) * maxImagesPerIndex; if (indexNum < totalIndexes) { currentCols = cols; currentRows = rows; } else { int r = totalImages % maxImagesPerIndex; currentRows = r / cols; if (r % cols > 0) currentRows++; currentCols = Math.min(r, cols); } n = INDEX; } else // a slide page { s1 = s.substring(0, s.indexOf('.')); Integer theImage = (Integer) images.get(s1); if (null == theImage) { throw new GalleryNotFoundException("URL not found"); } imageNum = theImage.intValue(); indexNum = calculateIndexNum(imageNum); image = getImage(imageNum); n = SLIDE; } return n; } | 5127 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5127/3b98092544fec20138844c0d7358037265dfbd5f/Folder.java/clean/WEB-INF/src/de/jwi/jgallery/Folder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
444,
4771,
12,
780,
17058,
4771,
13,
1216,
31398,
503,
202,
95,
202,
202,
780,
272,
273,
17058,
4771,
18,
17514,
1190,
2932,
4898,
13,
692,
17058,
4771,
9506,
202,
18,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
444,
4771,
12,
780,
17058,
4771,
13,
1216,
31398,
503,
202,
95,
202,
202,
780,
272,
273,
17058,
4771,
18,
17514,
1190,
2932,
4898,
13,
692,
17058,
4771,
9506,
202,
18,
28... |
System.err.println(" Source Init & Steady Phases: "+sdep.getNumSrcInitPhases()+", "+sdep.getNumSrcSteadyPhases()); System.err.println(" Destn. Init & Steady Phases: "+sdep.getNumDstInitPhases()+", "+sdep.getNumDstSteadyPhases()); | if (ClusterBackend.debugPrint) { System.err.println(" Source Init & Steady Phases: "+sdep.getNumSrcInitPhases()+", "+sdep.getNumSrcSteadyPhases()); System.err.println(" Destn. Init & Steady Phases: "+sdep.getNumDstInitPhases()+", "+sdep.getNumDstSteadyPhases()); } | public void calcNode(streamit.scheduler2.iriter.Iterator nodeIter, SIROperator str) { if (nodeIter.equals(firstNode)) return; System.err.println("DoSchedule Visiting node: "+str); try { streamit.scheduler2.constrained.Scheduler scheduler = streamit.scheduler2.constrained.Scheduler.createForSDEP(selfIter); streamit.scheduler2.SDEPData sdep = scheduler.computeSDEP(firstNode, nodeIter); System.err.println(" Source Init & Steady Phases: "+sdep.getNumSrcInitPhases()+", "+sdep.getNumSrcSteadyPhases()); System.err.println(" Destn. Init & Steady Phases: "+sdep.getNumDstInitPhases()+", "+sdep.getNumDstSteadyPhases()); } catch (Exception ex) { //System.out.println("!!!Exception: "+ex); ex.printStackTrace(); } } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/12b2e0b915b28084f00f6efa345dabfdf9554f9d/DoSchedules.java/clean/streams/src/at/dms/kjc/cluster/DoSchedules.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7029,
907,
12,
3256,
305,
18,
19972,
22,
18,
481,
2165,
18,
3198,
756,
2360,
16,
5705,
1457,
457,
639,
609,
13,
288,
7734,
309,
261,
2159,
2360,
18,
14963,
12,
3645,
907,
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,
7029,
907,
12,
3256,
305,
18,
19972,
22,
18,
481,
2165,
18,
3198,
756,
2360,
16,
5705,
1457,
457,
639,
609,
13,
288,
7734,
309,
261,
2159,
2360,
18,
14963,
12,
3645,
907,
3... |
checkForDuplicates(info); } | checkForDuplicates(info); } | public void addJob(JobInfo info) { checkForDuplicates(info); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/61a3852dd97cae660315c88e82302cd4c0301d5d/FinishedJobs.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/FinishedJobs.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
527,
2278,
12,
2278,
966,
1123,
13,
288,
7734,
13855,
23897,
12,
1376,
1769,
5411,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
527,
2278,
12,
2278,
966,
1123,
13,
288,
7734,
13855,
23897,
12,
1376,
1769,
5411,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (element instanceof IEditorReference) { | else if (element instanceof IEditorReference) { | public Image getImage(Object element) { if (element instanceof Node) { Node node = (Node) element; return findOrCreateImage(WorkbenchImages .getImageDescriptor(node.getImageId())); } if (element instanceof IEditorReference) { IEditorReference editorReference = (IEditorReference) element; return editorReference.getTitleImage(); } if (element instanceof IViewDescriptor) { IViewDescriptor viewDescriptor = (IViewDescriptor) element; return findOrCreateImage(viewDescriptor.getImageDescriptor()); } if (element instanceof IPerspectiveDescriptor) { IPerspectiveDescriptor perspectiveDescriptor = (IPerspectiveDescriptor) element; return findOrCreateImage(perspectiveDescriptor .getImageDescriptor()); } if (element instanceof IPreferenceNode) { IPreferenceNode preferenceNode = (IPreferenceNode) element; return preferenceNode.getLabelImage(); } if (element instanceof IWizardDescriptor) { IWizardDescriptor wizardDescriptor = (IWizardDescriptor) element; return findOrCreateImage(wizardDescriptor.getDescriptionImage()); } return super.getImage(element); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/041ca8a3dafe6b08034f15b376f6dd64af40ee6a/CtrlEAction.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/incubator/CtrlEAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
3421,
10567,
12,
921,
930,
13,
288,
1082,
202,
430,
261,
2956,
1276,
2029,
13,
288,
9506,
202,
907,
756,
273,
261,
907,
13,
930,
31,
9506,
202,
2463,
1104,
17717,
2040,
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,
3196,
202,
482,
3421,
10567,
12,
921,
930,
13,
288,
1082,
202,
430,
261,
2956,
1276,
2029,
13,
288,
9506,
202,
907,
756,
273,
261,
907,
13,
930,
31,
9506,
202,
2463,
1104,
17717,
2040,
12,
... |
throw new NoSuchChannelException("Channel '" + originateAction.getChannel() + " is not available"); | throw new NoSuchChannelException("Channel '" + originateAction.getChannel() + "' is not available"); | private AsteriskChannel originate(OriginateAction originateAction) throws ManagerCommunicationException, NoSuchChannelException { final ResponseEvents responseEvents; final Iterator<ResponseEvent> responseEventIterator; final Map<String, String> variables; AsteriskChannel channel = null; if (originateAction.getVariables() == null) { variables = new HashMap<String, String>(); } else { variables = new HashMap<String, String>(originateAction.getVariables()); } variables.put("__AJ_TRACE_ID", "trace me!"); originateAction.setVariables(variables); // must set async to true to receive OriginateEvents. originateAction.setAsync(Boolean.TRUE); // 2000 ms extra for the OriginateFailureEvent should be fine responseEvents = sendEventGeneratingAction(originateAction, originateAction.getTimeout() + 2000); responseEventIterator = responseEvents.getEvents().iterator(); if (responseEventIterator.hasNext()) { ResponseEvent responseEvent; responseEvent = responseEventIterator.next(); if (responseEvent instanceof AbstractOriginateEvent) { channel = getChannelById(((AbstractOriginateEvent) responseEvent).getUniqueId()); } } if (channel == null) { throw new NoSuchChannelException("Channel '" + originateAction.getChannel() + " is not available"); } return channel; } | 56387 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56387/704e1c66b8987f4bbfbe376a5c88b00a97750380/AsteriskServerImpl.java/clean/src/main/java/org/asteriskjava/live/internal/AsteriskServerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
432,
8190,
10175,
2909,
1647,
3322,
12,
4741,
3322,
1803,
1647,
3322,
1803,
13,
1216,
8558,
25219,
503,
16,
5823,
2909,
503,
565,
288,
3639,
727,
2306,
3783,
766,
3783,
31,
3639,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
432,
8190,
10175,
2909,
1647,
3322,
12,
4741,
3322,
1803,
1647,
3322,
1803,
13,
1216,
8558,
25219,
503,
16,
5823,
2909,
503,
565,
288,
3639,
727,
2306,
3783,
766,
3783,
31,
3639,
72... |
final boolean debug = false; | public TablePanel(Element e, TabPanel tp, OMEXMLNode on) { isTopLevel = false; //check if this TablePanel is "top level" if (tp.oNode == null) { Vector foundEles = DOMUtil.getChildElements("OMEElement", tParse.getRoot()); for (int i = 0;i < foundEles.size();i++) { Element thisNode = (Element) foundEles.get(i); if (thisNode == e) isTopLevel = true; } } else if (tp.oNode != null && tp.oNode == on) isTopLevel = true; el = e; oNode = on; tPanel = tp; id = null; JComboBox comboBox = null; if (on != null) name = getTreePathName(e,on); else name = getTreePathName(e); String thisName = name; panelList.add(this); Vector fullList = DOMUtil.getChildElements("OMEAttribute",e); attrList = new Vector(); refList = new Vector(); for (int i = 0;i<fullList.size();i++) { Element thisE = (Element) fullList.get(i); if (thisE.hasAttribute("Type") ) { if (thisE.getAttribute("Type").equals("Ref")) { if (oNode != null) { String value = oNode.getAttribute(thisE.getAttribute("XMLName")); if (value != null && !value.equals("")) { if ( addItems.indexOf("(External) " + value) < 0) { addItems.add("(External) " + value); } } } refList.add(thisE); } else if (thisE.getAttribute("Type").equals("ID") && oNode != null) { if (oNode.getDOMElement().hasAttribute("ID")) { id = oNode.getAttribute("ID"); panelsWithID.add(this); } } else attrList.add(thisE); } else attrList.add(thisE); } Element cDataEl = DOMUtil.getChildElement("CData",e); if (cDataEl != null) attrList.add(0,cDataEl); tableName = null; if (oNode == null) tableName = new JLabel(thisName, NO_DATA_BULLET, JLabel.LEFT); else tableName = new JLabel(thisName, DATA_BULLET, JLabel.LEFT); Font thisFont = tableName.getFont(); thisFont = new Font(thisFont.getFontName(), Font.BOLD,12); tableName.setFont(thisFont); if (el.hasAttribute("ShortDesc")) tableName.setToolTipText(el.getAttribute("ShortDesc")); else if (el.hasAttribute("Description")) tableName.setToolTipText(el.getAttribute("Description")); tableName.setForeground(TEXT_COLOR); noteButton = new JButton("Notes"); noteButton.setPreferredSize(new Dimension(85,17)); noteButton.addActionListener(this); noteButton.setActionCommand("getNotes"); noteButton.setToolTipText( "Display or hide the notes associated with this " + name + "."); noteButton.setForeground(TEXT_COLOR); imageLabel = null; if (name.endsWith("Pixels") || name.endsWith("Pixels (1)")) { if (thumb != null) { imageLabel = new JLabel(new ImageIcon(thumb)); imageLabel.setToolTipText("The first image of these pixels." + " Click for full sized image."); imageLabel.addMouseListener(this); } } DefaultTableModel myTableModel = new DefaultTableModel(TREE_COLUMNS, 0) { public boolean isCellEditable(int row, int col) { if(editable) { if (col < 1) return false; else return true; } else { if (col < 2) return false; else return true; } } }; VariableComboEditor vcEdit = new VariableComboEditor(panelsWithID, addItems, this, internalDefs); table = new ClickableTable(myTableModel, this, vcEdit);// table.setAutoResizeMode( JTable.AUTO_RESIZE_OFF ); table.getColumnModel().getColumn(0).setPreferredWidth(125); table.getColumnModel().getColumn(1).setPreferredWidth(430); table.getColumnModel().getColumn(2).setPreferredWidth(70); table.getColumnModel().getColumn(2).setMaxWidth(70); table.getColumnModel().getColumn(2).setMinWidth(70); tHead = table.getTableHeader(); tHead.setResizingAllowed(true); tHead.setReorderingAllowed(false);// tHead.setBackground(NotePanel.BACK_COLOR);// tHead.setOpaque(false); myTableModel.setRowCount(attrList.size() + refList.size()); String clippedName = name; if (name.endsWith(")")) clippedName = name.substring(0,name.length() - 4); addButton = new JButton("New Table"); addButton.setPreferredSize(new Dimension(110,17)); addButton.addActionListener(table); addButton.setActionCommand("bigAdd"); addButton.setToolTipText("Create a new " + clippedName + " table."); if ( !isTopLevel && tPanel.oNode == null) addButton.setEnabled(false); if ( !editable) addButton.setEnabled(false); addButton.setForeground(ADD_COLOR); delButton = new JButton("Delete Table"); delButton.setPreferredSize(new Dimension(110,17)); delButton.addActionListener(table); delButton.setActionCommand("bigRem"); delButton.setToolTipText("Delete this " + clippedName + " table."); if ( oNode == null) delButton.setVisible(false); if ( !editable) delButton.setEnabled(false); delButton.setForeground(DELETE_COLOR); noteP = new NotePanel(this); setNumNotes(noteP.getNumNotes()); FormLayout layout = new FormLayout( "pref, 10dlu, pref, 10dlu, pref, pref:grow:right, 5dlu, pref", "pref,2dlu,pref,pref,3dlu,pref,3dlu"); setLayout(layout); CellConstraints cc = new CellConstraints(); add(tableName, cc.xy(1,1)); add(noteButton, cc.xy(3,1, "left,center")); if (imageLabel != null) { add(imageLabel, cc.xy(5,1, "center,top")); } add(addButton, cc.xy(6,1, "right,center")); add(delButton, cc.xy(8,1, "right,center")); add(tHead, cc.xyw(1,3,8, "fill, center")); add(table, cc.xyw(1,4,8, "fill, center")); add(noteP, cc.xyw(1,6,8, "fill,center")); if (oNode == null) { tHead.setVisible(false); noteButton.setVisible(false); table.setVisible(false); } if (attrList.size() != 0) { // update OME-XML attributes table for (int i=0; i<attrList.size(); i++) { Element thisEle = null; if (attrList.get(i) instanceof Element) { thisEle = (Element) attrList.get(i); } if (thisEle != null) { String attrName = thisEle.getAttribute("XMLName"); if (thisEle.hasAttribute("Name")) { myTableModel.setValueAt(thisEle.getAttribute("Name"), i, 0); if (oNode != null) { if (oNode.getDOMElement().hasAttribute(attrName)) { myTableModel.setValueAt(oNode.getAttribute(attrName), i, 1); } } } else if (!thisEle.hasAttribute("Name") && thisEle.hasAttribute("XMLName")) { myTableModel.setValueAt(thisEle.getAttribute("XMLName"), i, 0); if (oNode != null) { if (oNode.getDOMElement().hasAttribute(attrName)) { myTableModel.setValueAt(oNode.getAttribute(attrName), i, 1); } } } else { if (e.hasAttribute("Name")) { myTableModel.setValueAt(e.getAttribute("Name") + " CharData", i, 0); } else { myTableModel.setValueAt(e.getAttribute("XMLName") + " CharData", i, 0); } if (oNode != null) { if (DOMUtil.getCharacterData(oNode.getDOMElement()) != null) { myTableModel.setValueAt( DOMUtil.getCharacterData(oNode.getDOMElement() ), i, 1); } } } } } } if (refList.size() > 0) { for (int i=0; i<refList.size(); i++) { Element thisEle = null; if (refList.get(i) instanceof Element) { thisEle = (Element) refList.get(i); } if (thisEle != null) { if (thisEle.hasAttribute("Name")) { myTableModel.setValueAt(thisEle.getAttribute("Name"), i + attrList.size(), 0); } else if (thisEle.hasAttribute("XMLName")) { myTableModel.setValueAt(thisEle.getAttribute("XMLName"), i + attrList.size(), 0); } } } } } | 11426 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11426/4e8c51412960105742cf467893740a131c71ec23/MetadataPane.java/buggy/loci/ome/notebook/MetadataPane.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1250,
1198,
273,
629,
31,
1377,
727,
1250,
1198,
273,
629,
31,
1377,
727,
1250,
1198,
273,
629,
31,
1377,
727,
1250,
1198,
273,
629,
31,
565,
1071,
225,
727,
1250,
1198,
273,
629,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1250,
1198,
273,
629,
31,
1377,
727,
1250,
1198,
273,
629,
31,
1377,
727,
1250,
1198,
273,
629,
31,
1377,
727,
1250,
1198,
273,
629,
31,
565,
1071,
225,
727,
1250,
1198,
273,
629,
... | |
artifactId = id; | artifactId = format( id ); | public Model translate( org.apache.maven.model.v3_0_0.Model v3Model, Reporter reporter ) throws ReportWriteException { try { String groupId = format( v3Model.getGroupId() ); String artifactId = format( v3Model.getArtifactId() ); String id = format( v3Model.getId() ); if ( StringUtils.isNotEmpty( id ) ) { if ( StringUtils.isEmpty( groupId ) ) { groupId = id; } if ( StringUtils.isEmpty( artifactId ) ) { artifactId = id; } } String version = format( v3Model.getCurrentVersion() ); if ( version == null ) { version = format( v3Model.getVersion() ); } PomKey pomKey = new PomKey( groupId, artifactId, version ); warnOfUnsupportedMainModelElements( v3Model, reporter ); Model model = null; try { model = new Model(); model.setArtifactId( artifactId ); // moved this above the translation of the build, to allow // additional plugins to be defined in v3 poms via // <dependency><type>plugin</type></dependency> model.setDependencies( translateDependencies( v3Model.getDependencies() ) ); model.setBuild( translateBuild( v3Model.getBuild(), reporter ) ); model.setCiManagement( translateCiManagementInfo( v3Model.getBuild() ) ); model.setContributors( translateContributors( v3Model.getContributors() ) ); model.setDescription( v3Model.getDescription() ); model.setDevelopers( translateDevelopers( v3Model.getDevelopers() ) ); model.setDistributionManagement( translateDistributionManagement( pomKey, v3Model ) ); model.setGroupId( groupId ); model.setInceptionYear( v3Model.getInceptionYear() ); model.setIssueManagement( translateIssueManagement( v3Model ) ); model.setLicenses( translateLicenses( v3Model.getLicenses() ) ); model.setMailingLists( translateMailingLists( v3Model.getMailingLists() ) ); model.setModelVersion( "4.0.0" ); model.setName( v3Model.getName() ); model.setOrganization( translateOrganization( v3Model.getOrganization(), reporter ) ); model.setPackaging( "jar" ); model.setReports( translateReports( v3Model.getReports(), reporter ) ); model.setScm( translateScm( v3Model ) ); model.setUrl( v3Model.getUrl() ); model.setVersion( version ); } catch ( PomTranslationException e ) { reporter.error( "Invalid POM detected. Cannot translate.", e ); } return model; } finally { this.discoveredPlugins.clear(); } } | 47050 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47050/6dbf18fceb188634f66fc3aeb41d4ac288fe35d2/PomV3ToV4Translator.java/buggy/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/translate/PomV3ToV4Translator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3164,
4204,
12,
2358,
18,
19211,
18,
81,
7638,
18,
2284,
18,
90,
23,
67,
20,
67,
20,
18,
1488,
331,
23,
1488,
16,
25585,
11528,
262,
3639,
1216,
8706,
3067,
503,
565,
288,
3639,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3164,
4204,
12,
2358,
18,
19211,
18,
81,
7638,
18,
2284,
18,
90,
23,
67,
20,
67,
20,
18,
1488,
331,
23,
1488,
16,
25585,
11528,
262,
3639,
1216,
8706,
3067,
503,
565,
288,
3639,... |
getDocument().remove(0, doc.getLength()); getDocument().insertString(0, text, null); | doc.remove(0, doc.getLength()); doc.insertString(0, text, null); | public void setText(String text) { try { getDocument().remove(0, doc.getLength()); getDocument().insertString(0, text, null); } catch (BadLocationException e) { } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50dc6879c9be89f646fdff68c58f785e3dc0b90e/JTextComponent.java/buggy/core/src/classpath/javax/javax/swing/text/JTextComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
7883,
12,
780,
977,
13,
565,
288,
565,
775,
565,
288,
202,
588,
2519,
7675,
4479,
12,
20,
16,
997,
18,
588,
1782,
10663,
202,
588,
2519,
7675,
6387,
780,
12,
20,
16,
977,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7883,
12,
780,
977,
13,
565,
288,
565,
775,
565,
288,
202,
588,
2519,
7675,
4479,
12,
20,
16,
997,
18,
588,
1782,
10663,
202,
588,
2519,
7675,
6387,
780,
12,
20,
16,
977,
... |
calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); | calendar.set(Calendar.HOUR_OF_DAY, 13); calendar.set(Calendar.MINUTE, 20); | public void testReadAnnouncementByTitleAndDateAndSite() { IAnnouncement announcement = null; //read existing Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.YEAR, 2003); calendar.set(Calendar.MONTH, Calendar.JANUARY); calendar.set(Calendar.DATE, 21); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); Timestamp date = new Timestamp(calendar.getTime().getTime()); try { persistentSupport.iniciarTransaccao(); announcement = persistentAnnouncement.readAnnouncementByTitleAndCreationDateAndSite("announcement1deTFCI", date, this.site); persistentSupport.confirmarTransaccao(); } catch(ExcepcaoPersistencia excepcaoPersistencia) { fail("testReadAnnouncementByTitleAndDateAndSite: readAnnouncementByTitleAndDateAndSite"); } assertNotNull(announcement); assertEquals(announcement.getTitle(), "announcement1deTFCI");// assertEquals(announcement.getCreationDate(), date);// assertEquals(announcement.getLastModifiedDate(), date); assertEquals(announcement.getInformation(), "information1"); assertEquals(announcement.getSite(), site); //read unexisting announcement = null; try { persistentSupport.iniciarTransaccao(); announcement = persistentAnnouncement.readAnnouncementByTitleAndCreationDateAndSite("unexistingAnnouncement", date, site); persistentSupport.confirmarTransaccao(); } catch(ExcepcaoPersistencia excepcaoPersistencia) { fail("testReadAnnouncementByTitleAndDateAndSite: readAnnouncementByTitleAndDateAndSite"); } assertNull(announcement); } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/ca3c12a09da658acb26708229e4d3c6648c501c4/AnnouncementOJBTest.java/buggy/src_tests/ServidorPersistente/OJB/AnnouncementOJBTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1994,
23137,
475,
858,
4247,
1876,
1626,
1876,
4956,
1435,
288,
3639,
467,
23137,
475,
25199,
273,
446,
31,
202,
202,
759,
896,
2062,
202,
202,
7335,
5686,
273,
5542,
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,
1994,
23137,
475,
858,
4247,
1876,
1626,
1876,
4956,
1435,
288,
3639,
467,
23137,
475,
25199,
273,
446,
31,
202,
202,
759,
896,
2062,
202,
202,
7335,
5686,
273,
5542,
18,... |
setRange(Phase.START, Phase.ANALYZER). | setRange(Phase.PARSER, Phase.ANALYZER). | public Tree() { nodes = (TreeNode[])list.toArray(new TreeNode[list.size()]); n_Bad. setDescription("Representation for parser errors"). setRange(Phase.PARSER, Phase.END); n_Empty. setDescription("A tree node for the absence of a tree"). setRange(Phase.PARSER, Phase.UNKNOWN). noFields(); n_DocDef. setDescription("Documented definition"). setRange(Phase.PARSER, Phase.ANALYZER). addField(t_String, "comment"). addField(t_Tree, "definition"); n_ClassDef. setDescription("Class and data declaration"). setRange(Phase.PARSER, Phase.END). addField(t_int, "mods", SymFlags). addField(t_TypeName, "name", SymName). addField(n_AbsTypeDef.getType(1), "tparams"). addField(n_ValDef.getType(2), "vparams"). addField(t_TypeTree, "tpe"). addField(n_Template.getType(0), "impl"); n_PackageDef. setDescription("Package declaration"). setRange(Phase.PARSER, Phase.UNKNOWN). addField(t_TermTree, "packaged"). addField(n_Template.getType(0), "impl"); n_ModuleDef. setDescription("Module declaration"). setRange(Phase.PARSER, Phase.REFCHECK). addField(t_int, "mods", SymFlags). addField(t_TermName, "name", SymName). addField(t_TypeTree, "tpe"). addField(n_Template.getType(0), "impl"); n_ValDef. setDescription("Value declaration (var or let)"). setRange(Phase.PARSER, Phase.END). addField(t_int, "mods", SymFlags). addField(t_TermName, "name", SymName). addField(t_TypeTree, "tpe"). addField(t_TermTree, "rhs"); n_PatDef. setDescription("Value declaration with patterns (val)"). setRange(Phase.PARSER, Phase.DESUGARIZER). addField(t_int, "mods"). addField(t_TermTree, "pat"). addField(t_TermTree, "rhs"); n_DefDef. setDescription("Function declaration (def)"). setRange(Phase.PARSER, Phase.END). addField(t_int, "mods", SymFlags). addField(t_TermName, "name", SymName). addField(n_AbsTypeDef.getType(1), "tparams"). addField(n_ValDef.getType(2), "vparams"). addField(t_TypeTree, "tpe"). addField(t_TermTree, "rhs"); n_AbsTypeDef. setDescription("Type declaration"). setRange(Phase.PARSER, Phase.END). // !!! needed for type params addField(t_int, "mods", SymFlags). addField(t_TypeName, "name", SymName). addField(t_TypeTree, "rhs"). addField(t_TypeTree, "lobound"); n_AliasTypeDef. setDescription("Type alias"). setRange(Phase.PARSER, Phase.EXPLICITOUTER). addField(t_int, "mods", SymFlags). addField(t_TypeName, "name", SymName). addField(n_AbsTypeDef.getType(1), "tparams"). addField(t_TypeTree, "rhs"); n_Import. setDescription("Import declaration"). setRange(Phase.START, Phase.ANALYZER). addField(t_TermTree, "expr"). addField(t_Names, "selectors"); n_CaseDef. setDescription("Case declaration"). setRange(Phase.PARSER, Phase.TRANSMATCH). addField(t_TermTree, "pat"). addField(t_TermTree, "guard"). addField(t_TermTree, "body"); n_Template. setDescription("Instantiation templates"). setRange(Phase.PARSER, Phase.END). addField(t_TermTrees, "parents"). addField(t_Trees, "body"); n_LabelDef. setDescription("Labelled expression - the symbols in the array (must be Idents!) are those the label takes as argument"). setRange(Phase.PARSER, Phase.END). addField(t_TermName, "name", SymName). addField(n_Ident.getType(1), "params"). addField(t_TermTree, "rhs"); n_Block. setDescription("Block of expressions " + "(semicolon separated expressions)"). setRange(Phase.PARSER, Phase.END). addField(t_Trees, "stats"). addField(t_TermTree, "expr"); n_Sequence. setDescription("Sequence of expressions (comma separated expressions)"). setRange(Phase.PARSER, Phase.LAMBDALIFT). addField(t_TermTrees, "trees"); n_Alternative. setDescription("Alternatives of expressions/patterns"). setRange(Phase.PARSER, Phase.TRANSMATCH). addField(t_TermTrees, "trees"); n_Bind. setDescription("Bind of a variable to a rhs pattern, possibly recursive"). setRange(Phase.PARSER, Phase.TRANSMATCH). addField(t_TermName, "name", SymName). addField(t_TermTree, "rhs"); n_Visitor. setDescription("Visitor (a sequence of cases)"). setRange(Phase.PARSER, Phase.TRANSMATCH). addField(n_CaseDef.getType(1), "cases"); n_Function. setDescription("Anonymous function"). setRange(Phase.PARSER, Phase.ANALYZER). addField(n_ValDef.getType(1), "vparams"). addField(t_TermTree, "body"); n_Assign. setDescription("Assignment"). setRange(Phase.PARSER, Phase.END). addField(t_TermTree, "lhs"). addField(t_TermTree, "rhs"); n_If. setDescription("Conditional expression"). setRange(Phase.PARSER, Phase.END). addField(t_TermTree, "cond"). addField(t_TermTree, "thenp"). addField(t_TermTree, "elsep"); n_Switch. setDescription("Switch"). setRange(Phase.TRANSMATCH, Phase.END). addField(t_TermTree, "test"). addField(t_ints, "tags"). addField(t_TermTrees, "bodies"). addField(t_TermTree, "otherwise"); n_Return. setDescription("Return"). setRange(Phase.PARSER, Phase.END). addField(t_TermTree, "expr"); n_Throw. setDescription("Throw"). setRange(Phase.PARSER, Phase.ANALYZER). addField(t_TermTree, "expr"); n_New. setDescription("Instantiation"). setRange(Phase.PARSER, Phase.END). addField(n_Template.getType(0), "templ"); n_Typed. setDescription("Type annotation"). setRange(Phase.PARSER, Phase.EXPLICITOUTER). addField(t_TermTree, "expr"). addField(t_TypeTree, "tpe"); n_TypeApply. setDescription("Type application"). setRange(Phase.PARSER, Phase.END). addField(t_Tree, "fun"). addField(t_TypeTrees, "args"); n_Apply. setDescription("Value application"). setRange(Phase.PARSER, Phase.END). addField(t_Tree, "fun"). // !!! should be t_TermTree addField(t_TermTrees, "args"); n_Super. setDescription("Super reference"). setRange(Phase.PARSER, Phase.END). addField(t_TypeName, "qualifier", SymName). addField(t_TypeName, "mixin"); n_This. setDescription("Self reference"). setRange(Phase.PARSER, Phase.END). addField(t_TypeName, "qualifier", SymName); n_Select. setDescription("Designator"). setRange(Phase.START, Phase.END). addField(t_TermTree, "qualifier"). addField(t_TestName, "selector", SymName); n_Ident. setDescription("Identifier"). setRange(Phase.START, Phase.END). addField(t_TestName, "name", SymName); n_Literal. setDescription("Literal"). setRange(Phase.PARSER, Phase.END). addField(t_AConstant, "value"); n_TypeTerm. setDescription("TypeTerm"). setRange(Phase.PARSER, Phase.END); n_SingletonType. setDescription("Singleton type"). setRange(Phase.PARSER, Phase.REFCHECK). addField(t_TermTree, "ref"); n_SelectFromType. setDescription("Type selection"). setRange(Phase.PARSER, Phase.REFCHECK). addField(t_TypeTree, "qualifier"). addField(t_TypeName, "selector", SymName); n_FunType. setDescription("Function type"). setRange(Phase.PARSER, Phase.REFCHECK). addField(t_TypeTrees, "argtpes"). addField(t_TypeTree, "restpe"); n_CompoundType. setDescription("Object type (~ Template)"). setRange(Phase.PARSER, Phase.REFCHECK). addField(t_TypeTrees, "parents"). addField(t_Trees, "refinements"); n_AppliedType. setDescription("Applied type"). setRange(Phase.PARSER, Phase.REFCHECK). addField(t_TypeTree, "tpe"). addField(t_TypeTrees, "args"); n_Try. setDescription("Try Expression"). setRange(Phase.PARSER, Phase.END). addField(t_TermTree, "block"). addField(t_TermTree, "catcher"). addField(t_TermTree, "finalizer"); } | 5590 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5590/ca4b6b4e729c4ad67d2bdfd3bb3e67bd47277a49/Tree.java/clean/sources/meta/scalac/ast/Tree.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4902,
1435,
288,
3639,
2199,
273,
261,
12513,
63,
5717,
1098,
18,
31447,
12,
2704,
20270,
63,
1098,
18,
1467,
1435,
19226,
3639,
290,
67,
6434,
18,
5411,
13812,
2932,
13742,
364,
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,
4902,
1435,
288,
3639,
2199,
273,
261,
12513,
63,
5717,
1098,
18,
31447,
12,
2704,
20270,
63,
1098,
18,
1467,
1435,
19226,
3639,
290,
67,
6434,
18,
5411,
13812,
2932,
13742,
364,
20... |
return r.toString(); | return r.toString(); | public String toString() { final StringBuffer r = new StringBuffer(); int minutes; minutes = tzOffset < 0 ? -tzOffset : tzOffset; minutes = (minutes / 100) * 60 + (minutes % 100); minutes = tzOffset < 0 ? -minutes : minutes; r.append("PersonIdent["); r.append(getName()); r.append(", "); r.append(getEmailAddress()); r.append(", "); r.append(new Date(when + minutes * 60)); r.append("]"); return r.toString(); } | 45532 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45532/a4e486719ce78b8050373e6534dfaf4a1572b269/PersonIdent.java/clean/org.spearce.jgit/src/org/spearce/jgit/lib/PersonIdent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
3639,
727,
6674,
436,
273,
394,
6674,
5621,
3639,
509,
6824,
31,
3639,
6824,
273,
6016,
2335,
411,
374,
692,
300,
12994,
2335,
294,
6016,
2335,
31,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
3639,
727,
6674,
436,
273,
394,
6674,
5621,
3639,
509,
6824,
31,
3639,
6824,
273,
6016,
2335,
411,
374,
692,
300,
12994,
2335,
294,
6016,
2335,
31,
3639,
... |
cat.debug("Interface stereo: " + MMUtil.STANDARDS.lookup("interface")); | cat.debug("Interface stereo: " + MMUtil.STANDARDS.lookup("interface")); | public void addNode(Object node) { cat.debug("adding class node!!"); if (!canAddNode(node)) return; _nodes.addElement(node); if (node instanceof MModelElement && ((MModelElement) node).getNamespace() == null) { _model.addOwnedElement((MModelElement) node); } if (node instanceof MInterface) { cat.debug("Interface stereo: " + MMUtil.STANDARDS.lookup("interface")); ((MInterface) node).setStereotype((MStereotype) MMUtil.STANDARDS.lookup("interface")); } fireNodeAdded(node); cat.debug("adding " + node + " OK"); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/23464f9cbc3169e9d2f1919998cae2c59b514985/ClassDiagramGraphModel.java/clean/src_new/org/argouml/uml/diagram/static_structure/ClassDiagramGraphModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
23063,
12,
921,
756,
13,
288,
202,
2574,
18,
4148,
2932,
3439,
667,
756,
5,
4442,
1769,
202,
430,
16051,
4169,
986,
907,
12,
2159,
3719,
327,
31,
202,
67,
4690,
18,
1289,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
23063,
12,
921,
756,
13,
288,
202,
2574,
18,
4148,
2932,
3439,
667,
756,
5,
4442,
1769,
202,
430,
16051,
4169,
986,
907,
12,
2159,
3719,
327,
31,
202,
67,
4690,
18,
1289,
1... |
} | } | public MondrianJolapLevel(mondrian.olap.Level level, Dimension dimension) { this.level = level; this.dimension = dimension; } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/b5b5168edc3af09cb74945a80b0c36e6630ed502/MondrianJolapLevel.java/clean/src/main/mondrian/jolap/MondrianJolapLevel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
490,
1434,
566,
304,
46,
355,
438,
2355,
12,
81,
1434,
566,
304,
18,
355,
438,
18,
2355,
1801,
16,
13037,
4968,
13,
288,
202,
202,
2211,
18,
2815,
273,
1801,
31,
3639,
333,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
490,
1434,
566,
304,
46,
355,
438,
2355,
12,
81,
1434,
566,
304,
18,
355,
438,
18,
2355,
1801,
16,
13037,
4968,
13,
288,
202,
202,
2211,
18,
2815,
273,
1801,
31,
3639,
333,
... |
"ome.servics.query.FindCGCPathsQueryDefinition", | PojosCGCPathsQueryDefinition.class.getName(), | public Set findCGCPaths(@NotNull @Validate(Integer.class) Set imgIds, String algorithm, Map options) { if (imgIds.size()==0){ return new HashSet(); } if (! IPojos.ALGORITHMS.contains(algorithm)) { throw new IllegalArgumentException( "No such algorithm known:"+algorithm); } PojoOptions po = new PojoOptions(options); Query q = queryFactory.lookup( "ome.servics.query.FindCGCPathsQueryDefinition", PojosQP.ids(imgIds), PojosQP.String("algorithm",algorithm), PojosQP.options(po.map())); List<List> result_set = (List) iQuery.execute(q); Map<CategoryGroup,Set<Category>> map = new HashMap<CategoryGroup,Set<Category>>(); Set<CategoryGroup> returnValues = new HashSet<CategoryGroup>(); // Parse for (List result_row : result_set) { CategoryGroup cg = (CategoryGroup) result_row.get(0); Category c = (Category) result_row.get(1); if (!map.containsKey(cg)) map.put(cg,new HashSet<Category>()); map.get(cg).add(c); } for (CategoryGroup cg : map.keySet()) { for (Category c : map.get(cg)) { iQuery.evict(cg); // FIXME does this suffice? cg.addCategory(c); } returnValues.add(cg); } collectCounts(returnValues,po); return returnValues; } | 55464 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55464/0b36a8e77f5bacb7e122d76ffce01866205b09d7/PojosImpl.java/buggy/components/server/src/ome/logic/PojosImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1000,
1104,
39,
15396,
4466,
26964,
5962,
632,
4270,
12,
4522,
18,
1106,
13,
1000,
3774,
2673,
16,
2398,
514,
4886,
16,
1635,
702,
13,
288,
202,
202,
430,
261,
6081,
2673,
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,
1000,
1104,
39,
15396,
4466,
26964,
5962,
632,
4270,
12,
4522,
18,
1106,
13,
1000,
3774,
2673,
16,
2398,
514,
4886,
16,
1635,
702,
13,
288,
202,
202,
430,
261,
6081,
2673,
18,... |
Rectangle rect = mainPanel.getVisibleRect(); Insets in = mainPanel.getInsets(); Dimension dim = new Dimension(((int)rect.getWidth()) - (in.right + in.left) * 2, ((int)rect.getHeight()) - (in.top + in.bottom) * 2); Dimension min = comp.getMinimumSize(); if(dim.width < min.width) { dim.width = min.width; } if(dim.height < min.height) { dim.height = min.height; } comp.setPreferredSize(dim); | public void setMainPanel(JComponent comp) { mainPanel.removeAll(); Rectangle rect = mainPanel.getVisibleRect(); Insets in = mainPanel.getInsets(); Dimension dim = new Dimension(((int)rect.getWidth()) - (in.right + in.left) * 2, ((int)rect.getHeight()) - (in.top + in.bottom) * 2); Dimension min = comp.getMinimumSize(); if(dim.width < min.width) { dim.width = min.width; } if(dim.height < min.height) { dim.height = min.height; } comp.setPreferredSize(dim); comp.validate(); mainPanel.add(comp); mainPanel.validate(); mainPanel.repaint(); } | 50179 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50179/243929ba25b48b2bcc2564138a8a66cb85b95389/MainFrame.java/clean/src/core/org/apache/jmeter/gui/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
6376,
5537,
12,
46,
1841,
1161,
13,
202,
95,
202,
202,
5254,
5537,
18,
4479,
1595,
5621,
202,
202,
19463,
4917,
273,
2774,
5537,
18,
588,
6207,
6120,
5621,
202,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
6376,
5537,
12,
46,
1841,
1161,
13,
202,
95,
202,
202,
5254,
5537,
18,
4479,
1595,
5621,
202,
202,
19463,
4917,
273,
2774,
5537,
18,
588,
6207,
6120,
5621,
202,
202,... | |
return new RubyFloat(runtime, op_div(other).getDoubleValue()); | return new RubyFloat(getRuntime(), op_div(other).getDoubleValue()); | public RubyNumeric quo(RubyNumeric other) { return new RubyFloat(runtime, op_div(other).getDoubleValue()); } | 46217 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46217/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
9902,
719,
83,
12,
54,
10340,
9902,
1308,
13,
288,
3639,
327,
394,
19817,
4723,
12,
588,
5576,
9334,
1061,
67,
2892,
12,
3011,
2934,
588,
5265,
620,
10663,
565,
289,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
9902,
719,
83,
12,
54,
10340,
9902,
1308,
13,
288,
3639,
327,
394,
19817,
4723,
12,
588,
5576,
9334,
1061,
67,
2892,
12,
3011,
2934,
588,
5265,
620,
10663,
565,
289,
2,
-10... |
if (placement == STabbedPane.TOP || placement == STabbedPane.LEFT) | if (placement == SConstants.TOP || placement == SConstants.LEFT) | public void writeContent(final Device device, final SComponent component) throws java.io.IOException { STabbedPane tabbedPane = (STabbedPane) component; if (tabbedPane.getTabCount() > 0) { String style = component.getStyle(); boolean childSelectorWorkaround = !component.getSession().getUserAgent().supportsCssChildSelector(); int placement = tabbedPane.getTabPlacement(); device.print("<table class=\"SLayout\""); if (childSelectorWorkaround) Utils.childSelectorWorkaround(device, style); Utils.printCSSInlineFullSize(device, component.getPreferredSize()); Utils.writeEvents(device, component); device.print(">"); if (placement == STabbedPane.TOP) device.print("<tr><th placement=\"top\""); else if (placement == STabbedPane.LEFT) device.print("<tr><th placement=\"left\""); else if (placement == STabbedPane.RIGHT) device.print("<tr><td"); else if (placement == STabbedPane.BOTTOM) device.print("<tr><td"); if (childSelectorWorkaround) { if (placement == STabbedPane.TOP) Utils.childSelectorWorkaround(device, "STabbedPane_top"); else if (placement == STabbedPane.LEFT) Utils.childSelectorWorkaround(device, "STabbedPane_left"); else Utils.childSelectorWorkaround(device, "STabbedPane_pane"); } device.print(">"); if (placement == STabbedPane.TOP || placement == STabbedPane.LEFT) writeTabs(device, tabbedPane); else writeSelectedPaneContent(device, tabbedPane); if (placement == STabbedPane.TOP) device.print("</th></tr><tr><td"); else if (placement == STabbedPane.LEFT) device.print("</th><td"); else if (placement == STabbedPane.RIGHT) device.print("</td><th placement=\"right\""); else if (placement == STabbedPane.BOTTOM) device.print("</td></tr><tr><th placement=\"bottom\""); if (childSelectorWorkaround) { if (placement == STabbedPane.RIGHT) Utils.childSelectorWorkaround(device, "STabbedPane_right"); else if (placement == STabbedPane.BOTTOM) Utils.childSelectorWorkaround(device, "STabbedPane_bottom"); else Utils.childSelectorWorkaround(device, "STabbedPane_pane"); } device.print(">"); if (placement == STabbedPane.TOP || placement == STabbedPane.LEFT) { writeSelectedPaneContent(device, tabbedPane); device.print("</td></tr></table>"); } else { writeTabs(device, tabbedPane); device.print("</th></tr></table>"); } } else { Utils.printDebug(device, "<!-- tabbedPane has no tabs -->"); } } | 3911 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3911/4efc2c1de2dc5778c7955ee5450dc3d75ebdc536/TabbedPaneCG.java/buggy/wings2/src/java/org/wings/plaf/css/TabbedPaneCG.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
1350,
12,
6385,
6077,
2346,
16,
727,
348,
1841,
1794,
13,
5411,
1216,
2252,
18,
1594,
18,
14106,
288,
3639,
2347,
378,
2992,
8485,
3246,
2992,
8485,
273,
261,
882,
378,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
1350,
12,
6385,
6077,
2346,
16,
727,
348,
1841,
1794,
13,
5411,
1216,
2252,
18,
1594,
18,
14106,
288,
3639,
2347,
378,
2992,
8485,
3246,
2992,
8485,
273,
261,
882,
378,
... |
public void pack() { | public void pack() { | public void pack() { debugGui.pack(); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/2d4fc75b74d717c754829dde488ff0a7456682cc/Main.java/clean/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2298,
1435,
565,
288,
3639,
1198,
18070,
18,
2920,
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,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2298,
1435,
565,
288,
3639,
1198,
18070,
18,
2920,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public boolean create() { | public boolean create() throws IndexCreateException { | public boolean create() { // things to do the first time in // set the ID, the startTime, and the index type ID indexID = new UID(); header.setID(indexID); header.setStartTime(Clock.time.asMicros()); header.setFirstOffset(new Offset(0)); header.setLastOffset(new Offset(0)); indexType = IndexType.INLINE; try { headerInteractor.create(getFileName()); // String indexFilename = headerInteractor.getIndexFileName()); indexInteractor.create(getFileName()); // activate the index activate(); // pass an event to the listeners eventMulticaster.firePrimaryEvent(new IndexPrimaryEvent(indexName, header.getID(), IndexPrimaryEvent.CREATED, this)); return true; } catch (IOException ioe) { return false; } } | 8679 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8679/ce3ded6e34a3e46ed62f978209b2529341eb0a4d/InlineIndex.java/clean/timeindexing/com/timeindexing/index/InlineIndex.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
752,
1435,
288,
202,
759,
9198,
358,
741,
326,
1122,
813,
316,
202,
759,
444,
326,
1599,
16,
326,
8657,
16,
471,
326,
770,
618,
202,
734,
770,
734,
273,
394,
10034,
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,
1250,
752,
1435,
288,
202,
759,
9198,
358,
741,
326,
1122,
813,
316,
202,
759,
444,
326,
1599,
16,
326,
8657,
16,
471,
326,
770,
618,
202,
734,
770,
734,
273,
394,
10034,
5621,
... |
MIPlugin.getDefault().getPluginPreferences().setValue( IMIConstants.PREF_REQUEST_TIMEOUT, fTimeoutText.getIntValue() ); | MIPlugin.getDefault().getPluginPreferences().setValue( IMIConstants.PREF_REQUEST_TIMEOUT, fDebugTimeoutText.getIntValue() ); MIPlugin.getDefault().getPluginPreferences().setValue( IMIConstants.PREF_REQUEST_LAUNCH_TIMEOUT, fLaunchTimeoutText.getIntValue() ); | private void storeValues() { MIPlugin.getDefault().getPluginPreferences().setValue( IMIConstants.PREF_REQUEST_TIMEOUT, fTimeoutText.getIntValue() ); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/dc03462d49db49e26105666d7786b44ccc1c42a2/MIPreferencePage.java/buggy/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1707,
1972,
1435,
202,
95,
202,
202,
7492,
3773,
18,
588,
1868,
7675,
588,
3773,
12377,
7675,
542,
620,
12,
6246,
45,
2918,
18,
3670,
42,
67,
5519,
67,
9503,
16,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1707,
1972,
1435,
202,
95,
202,
202,
7492,
3773,
18,
588,
1868,
7675,
588,
3773,
12377,
7675,
542,
620,
12,
6246,
45,
2918,
18,
3670,
42,
67,
5519,
67,
9503,
16,
284,
... |
Channel input = new Channel(Integer.TYPE, 1, 10); public void initIO() { this.streamInput = input; } | public void init() { add(new Filter() { int x; Channel output = new Channel(Integer.TYPE, 1); public void initIO() { this.streamOutput = output; } public void work() { output.pushInt(x++); } public void init () { } }); add(new Filter() { Channel input = new Channel(Integer.TYPE, 1, 10); public void initIO() { this.streamInput = input; } public void work() { int i; int sum = 0; for (i=0; i<10; i++) { sum += input.peekInt(i); } System.out.println(sum); input.popInt(); } public void init () { } }); } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/e4e63e1768c1661823f004fc6e0b62737906e716/PeekPipe.java/buggy/streams/apps/tests/peek-pipe/PeekPipe.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
1435,
288,
3639,
527,
12,
2704,
4008,
1435,
288,
7734,
509,
619,
31,
7734,
5307,
876,
273,
394,
5307,
12,
4522,
18,
2399,
16,
404,
1769,
7734,
1071,
918,
1208,
4294,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
1435,
288,
3639,
527,
12,
2704,
4008,
1435,
288,
7734,
509,
619,
31,
7734,
5307,
876,
273,
394,
5307,
12,
4522,
18,
2399,
16,
404,
1769,
7734,
1071,
918,
1208,
4294,
14... | |
sb.append("]"); | } sb.append("}"); | public String toString() { StringBuffer sb = new StringBuffer(); sb.append("[StyleContext.SmallattributeSet:"); for (int i = 0; i < attrs.length - 1; ++i) { sb.append(" ("); sb.append(attrs[i].toString()); sb.append("="); sb.append(attrs[i+1].toString()); sb.append(")"); } sb.append("]"); return sb.toString(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/StyleContext.java/buggy/core/src/classpath/javax/javax/swing/text/StyleContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
1377,
6674,
2393,
273,
394,
6674,
5621,
1377,
2393,
18,
6923,
2932,
63,
2885,
1042,
18,
19187,
4589,
694,
2773,
1769,
1377,
364,
261,
474,
277,
273,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
1377,
6674,
2393,
273,
394,
6674,
5621,
1377,
2393,
18,
6923,
2932,
63,
2885,
1042,
18,
19187,
4589,
694,
2773,
1769,
1377,
364,
261,
474,
277,
273,
374,
... |
void showDocument(URL url, String target); | void showDocument(URL url); | void showDocument(URL url, String target); | 1739 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1739/9dd0ffbe11bbe34132c4f0a131bbc2031118cfa6/AppletContext.java/buggy/libjava/java/applet/AppletContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
2405,
2519,
12,
1785,
880,
16,
514,
1018,
1769,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
2405,
2519,
12,
1785,
880,
16,
514,
1018,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
run("./PointIndex.x10","PointIndex","./Constructs/Point"); } | runHelper(); } | public void test_Constructs_Point_PointIndex() { run("./PointIndex.x10","PointIndex","./Constructs/Point"); } | 1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/1a6ea2938bd80dc14d182a8d312337db644d998d/TestCompiler.java/buggy/x10.test/src/polyglot/ext/x10/tests/TestCompiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
67,
13262,
67,
2148,
67,
2148,
1016,
1435,
288,
3639,
1086,
2932,
18,
19,
2148,
1016,
18,
92,
2163,
15937,
2148,
1016,
3113,
9654,
19,
13262,
19,
2148,
8863,
565,
289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
67,
13262,
67,
2148,
67,
2148,
1016,
1435,
288,
3639,
1086,
2932,
18,
19,
2148,
1016,
18,
92,
2163,
15937,
2148,
1016,
3113,
9654,
19,
13262,
19,
2148,
8863,
565,
289,
... |
public static IWorkspaceRoot setupWorkspace() throws CoreException, IOException{ | public static IWorkspaceRoot setupWorkspace() throws CoreException, IOException, InvocationTargetException, InterruptedException{ | public static IWorkspaceRoot setupWorkspace() throws CoreException, IOException{ if(isSetup){ clearDoiModel(); return workspaceRoot; } taskscape = new MylarContext("1", new ScalingFactors()); workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); project1 = ResourceHelper.createJavaPluginProjectFromZip("project1", "project1.zip"); project2 = ResourceHelper.createJavaPluginProjectFromZip("project2", "project2.zip"); jdtCoreDomProject = new TestProject("workspace-helper-project"); IPackageFragment jdtCoreDomPkg = jdtCoreDomProject.createPackage("org.eclipse.jdt.core.dom"); IType astNodeType = jdtCoreDomProject.createType(jdtCoreDomPkg, "ASTNode.java", "public class ASTNode { }" ); astNodeType.createMethod("public final void setSourceRange(int startPosition, int length) { }",null, false, null); isSetup = true; project1.open(new NullProgressMonitor()); project2.open(new NullProgressMonitor()); jdtCoreDomProject.getJavaProject().open(new NullProgressMonitor()); return workspaceRoot; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/bf11fd6cb40973a1c5532abb964c7f6924d8678d/WorkspaceSetupHelper.java/buggy/org.eclipse.mylyn.context.tests/src/org/eclipse/mylyn/core/tests/support/WorkspaceSetupHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
467,
8241,
2375,
3875,
8241,
1435,
1216,
30015,
16,
1860,
95,
202,
202,
430,
12,
291,
7365,
15329,
1082,
202,
8507,
3244,
77,
1488,
5621,
1082,
202,
2463,
6003,
2375,
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,
225,
202,
482,
760,
467,
8241,
2375,
3875,
8241,
1435,
1216,
30015,
16,
1860,
95,
202,
202,
430,
12,
291,
7365,
15329,
1082,
202,
8507,
3244,
77,
1488,
5621,
1082,
202,
2463,
6003,
2375,
31,
... |
if (_entity == null) _entity = EOModelGroup.defaultGroup().entityNamed(entityName()); return _entity; | return entity(null); | public EOEntity entity() { if (_entity == null) _entity = EOModelGroup.defaultGroup().entityNamed(entityName()); return _entity; } | 46145 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46145/407575373c57c20c17c163ba1bf0a8767593a0fc/EOGenericRecordClazz.java/buggy/Common/Frameworks/ERExtensions/Sources/er/extensions/EOGenericRecordClazz.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
512,
51,
1943,
1522,
1435,
288,
3639,
309,
261,
67,
1096,
422,
446,
13,
389,
1096,
273,
512,
51,
1488,
1114,
18,
1886,
1114,
7675,
1096,
7604,
12,
1096,
461,
10663,
3639,
327,
389... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
512,
51,
1943,
1522,
1435,
288,
3639,
309,
261,
67,
1096,
422,
446,
13,
389,
1096,
273,
512,
51,
1488,
1114,
18,
1886,
1114,
7675,
1096,
7604,
12,
1096,
461,
10663,
3639,
327,
389... |
"(DLjava/lang/Object;)", "Ljava/lang/Object;"); } else { | "(DLjava/lang/Object;)", "Ljava/lang/Object;"); break; case Node.RIGHT: | private void generateCodeFromNode(Node node, Node parent, int trueLabel, int falseLabel) { // System.out.println("gen code for " + node.toString()); int type = node.getType(); Node child = node.getFirstChild(); switch (type) { case TokenStream.LOOP: case TokenStream.WITH: case TokenStream.LABEL: visitStatement(node); while (child != null) { generateCodeFromNode(child, node, trueLabel, falseLabel); child = child.getNextSibling(); } break; case TokenStream.CASE: case TokenStream.DEFAULT: // XXX shouldn't these be StatementNodes? case TokenStream.SCRIPT: case TokenStream.BLOCK: case TokenStream.VOID: case TokenStream.NOP: // no-ops. visitStatement(node); while (child != null) { generateCodeFromNode(child, node, trueLabel, falseLabel); child = child.getNextSibling(); } break; case TokenStream.FUNCTION: if (inFunction || parent.getType() != TokenStream.SCRIPT) { FunctionNode fn = (FunctionNode) node.getProp(Node.FUNCTION_PROP); byte t = fn.getFunctionType(); if (t != FunctionNode.FUNCTION_STATEMENT) { visitFunction(fn, t == FunctionNode.FUNCTION_EXPRESSION_STATEMENT); } } break; case TokenStream.NAME: visitName(node); break; case TokenStream.NEW: case TokenStream.CALL: visitCall(node, type, child); break; case TokenStream.NUMBER: case TokenStream.STRING: visitLiteral(node); break; case TokenStream.PRIMARY: visitPrimary(node); break; case TokenStream.OBJECT: visitObject(node); break; case TokenStream.TRY: visitTryCatchFinally(node, child); break; case TokenStream.THROW: visitThrow(node, child); break; case TokenStream.RETURN: visitReturn(node, child); break; case TokenStream.SWITCH: visitSwitch(node, child); break; case TokenStream.COMMA: generateCodeFromNode(child, node, -1, -1); addByteCode(ByteCode.POP); generateCodeFromNode(child.getNextSibling(), node, trueLabel, falseLabel); break; case TokenStream.NEWSCOPE: addScriptRuntimeInvoke("newScope", "()", "Lorg/mozilla/javascript/Scriptable;"); break; case TokenStream.ENTERWITH: visitEnterWith(node, child); break; case TokenStream.LEAVEWITH: visitLeaveWith(node, child); break; case TokenStream.ENUMINIT: visitEnumInit(node, child); break; case TokenStream.ENUMNEXT: visitEnumNext(node, child); break; case TokenStream.ENUMDONE: visitEnumDone(node, child); break; case TokenStream.POP: visitStatement(node); if (child.getType() == TokenStream.SETVAR) { /* special case this so as to avoid unnecessary load's & pop's */ visitSetVar(child, child.getFirstChild(), false); } else { while (child != null) { generateCodeFromNode(child, node, trueLabel, falseLabel); child = child.getNextSibling(); } if (node.getProp(Node.ISNUMBER_PROP) != null) addByteCode(ByteCode.POP2); else addByteCode(ByteCode.POP); } break; case TokenStream.POPV: visitStatement(node); while (child != null) { generateCodeFromNode(child, node, trueLabel, falseLabel); child = child.getNextSibling(); } astore(scriptResultLocal); break; case TokenStream.TARGET: visitTarget(node); break; case TokenStream.JSR: case TokenStream.GOTO: case TokenStream.IFEQ: case TokenStream.IFNE: visitGOTO(node, type, child); break; case TokenStream.UNARYOP: visitUnary(node, child, trueLabel, falseLabel); break; case TokenStream.TYPEOF: visitTypeof(node, child); break; case TokenStream.INC: visitIncDec(node, true); break; case TokenStream.DEC: visitIncDec(node, false); break; case TokenStream.OR: case TokenStream.AND: { if (trueLabel == -1) { generateCodeFromNode(child, node, trueLabel, falseLabel); addByteCode(ByteCode.DUP); addScriptRuntimeInvoke("toBoolean", "(Ljava/lang/Object;)", "Z"); int falseTarget = acquireLabel(); if (type == TokenStream.AND) addByteCode(ByteCode.IFEQ, falseTarget); else addByteCode(ByteCode.IFNE, falseTarget); addByteCode(ByteCode.POP); generateCodeFromNode(child.getNextSibling(), node, trueLabel, falseLabel); markLabel(falseTarget); } else { int interLabel = acquireLabel(); if (type == TokenStream.AND) { generateCodeFromNode(child, node, interLabel, falseLabel); if (((child.getType() == TokenStream.UNARYOP) && (child.getInt() == TokenStream.NOT)) || (child.getType() == TokenStream.AND) || (child.getType() == TokenStream.OR) || (child.getType() == TokenStream.RELOP) || (child.getType() == TokenStream.EQOP)) { } else { addScriptRuntimeInvoke("toBoolean", "(Ljava/lang/Object;)", "Z"); addByteCode(ByteCode.IFNE, interLabel); addByteCode(ByteCode.GOTO, falseLabel); } } else { generateCodeFromNode(child, node, trueLabel, interLabel); if (((child.getType() == TokenStream.UNARYOP) && (child.getInt() == TokenStream.NOT)) || (child.getType() == TokenStream.AND) || (child.getType() == TokenStream.OR) || (child.getType() == TokenStream.RELOP) || (child.getType() == TokenStream.EQOP)) { } else { addScriptRuntimeInvoke("toBoolean", "(Ljava/lang/Object;)", "Z"); addByteCode(ByteCode.IFNE, trueLabel); addByteCode(ByteCode.GOTO, interLabel); } } markLabel(interLabel); child = child.getNextSibling(); generateCodeFromNode(child, node, trueLabel, falseLabel); if (((child.getType() == TokenStream.UNARYOP) && (child.getInt() == TokenStream.NOT)) || (child.getType() == TokenStream.AND) || (child.getType() == TokenStream.OR) || (child.getType() == TokenStream.RELOP) || (child.getType() == TokenStream.EQOP)) { } else { addScriptRuntimeInvoke("toBoolean", "(Ljava/lang/Object;)", "Z"); addByteCode(ByteCode.IFNE, trueLabel); addByteCode(ByteCode.GOTO, falseLabel); } } } break; case TokenStream.ADD: { generateCodeFromNode(child, node, trueLabel, falseLabel); generateCodeFromNode(child.getNextSibling(), node, trueLabel, falseLabel); Integer childNumberFlag = (Integer)(node.getProp(Node.ISNUMBER_PROP)); if (childNumberFlag != null) { if (childNumberFlag.intValue() == Node.BOTH) { addByteCode(ByteCode.DADD); } else { if (childNumberFlag.intValue() == Node.LEFT) { addOptRuntimeInvoke("add", "(DLjava/lang/Object;)", "Ljava/lang/Object;"); } else { addOptRuntimeInvoke("add", "(Ljava/lang/Object;D)", "Ljava/lang/Object;"); } } } else { addScriptRuntimeInvoke("add", "(Ljava/lang/Object;Ljava/lang/Object;)", "Ljava/lang/Object;"); } } break; case TokenStream.MUL: visitArithmetic(node, ByteCode.DMUL, child, parent); break; case TokenStream.SUB: visitArithmetic(node, ByteCode.DSUB, child, parent); break; case TokenStream.DIV: case TokenStream.MOD: visitArithmetic(node, type == TokenStream.DIV ? ByteCode.DDIV : ByteCode.DREM, child, parent); break; case TokenStream.BITOR: case TokenStream.BITXOR: case TokenStream.BITAND: case TokenStream.LSH: case TokenStream.RSH: case TokenStream.URSH: visitBitOp(node, type, child); break; case TokenStream.CONVERT: { Object toType = node.getProp(Node.TYPE_PROP); if (toType == ScriptRuntime.NumberClass) { addByteCode(ByteCode.NEW, "java/lang/Double"); addByteCode(ByteCode.DUP); generateCodeFromNode(child, node, trueLabel, falseLabel); addScriptRuntimeInvoke("toNumber", "(Ljava/lang/Object;)", "D"); addDoubleConstructor(); } else { if (toType == ScriptRuntime.DoubleClass) { // cnvt to double // (not Double) generateCodeFromNode(child, node, trueLabel, falseLabel); addScriptRuntimeInvoke("toNumber", "(Ljava/lang/Object;)", "D"); } else { if (toType == ScriptRuntime.ObjectClass) {// convert from double if ((child.getType() == TokenStream.NUMBER) && (child.getProp(Node.ISNUMBER_PROP) != null)) { Object oldProp = child.getProp(Node.ISNUMBER_PROP); child.putProp(Node.ISNUMBER_PROP, null); generateCodeFromNode(child, node, trueLabel, falseLabel); child.putProp(Node.ISNUMBER_PROP, oldProp); } else { addByteCode(ByteCode.NEW, "java/lang/Double"); addByteCode(ByteCode.DUP); generateCodeFromNode(child, node, trueLabel, falseLabel); addDoubleConstructor(); } } else badTree(); } } } break; case TokenStream.RELOP: if (trueLabel == -1) // need a result Object visitRelOp(node, child, parent); else visitGOTOingRelOp(node, child, parent, trueLabel, falseLabel); break; case TokenStream.EQOP: visitEqOp(node, child, parent, trueLabel, falseLabel); break; case TokenStream.GETPROP: visitGetProp(node, child); break; case TokenStream.GETELEM: while (child != null) { generateCodeFromNode(child, node, trueLabel, falseLabel); child = child.getNextSibling(); } aload(variableObjectLocal); if (node.getProp(Node.ISNUMBER_PROP) != null) { addOptRuntimeInvoke("getElem", "(Ljava/lang/Object;D" + "Lorg/mozilla/javascript/Scriptable;)", "Ljava/lang/Object;"); } else { addScriptRuntimeInvoke("getElem", "(Ljava/lang/Object;Ljava/lang/Object;" + "Lorg/mozilla/javascript/Scriptable;)", "Ljava/lang/Object;"); } break; case TokenStream.GETVAR: { OptLocalVariable lVar = (OptLocalVariable)(node.getProp(Node.VARIABLE_PROP)); visitGetVar(lVar, node.getProp(Node.ISNUMBER_PROP) != null, node.getString()); } break; case TokenStream.SETVAR: visitSetVar(node, child, true); break; case TokenStream.SETNAME: visitSetName(node, child); break; case TokenStream.SETPROP: visitSetProp(node, child); break; case TokenStream.SETELEM: while (child != null) { generateCodeFromNode(child, node, trueLabel, falseLabel); child = child.getNextSibling(); } aload(variableObjectLocal); if (node.getProp(Node.ISNUMBER_PROP) != null) { addOptRuntimeInvoke("setElem", "(Ljava/lang/Object;D" + "Ljava/lang/Object;Lorg/mozilla/javascript/Scriptable;)", "Ljava/lang/Object;"); } else { addScriptRuntimeInvoke("setElem", "(Ljava/lang/Object;Ljava/lang/Object;" + "Ljava/lang/Object;Lorg/mozilla/javascript/Scriptable;)", "Ljava/lang/Object;"); } break; case TokenStream.DELPROP: while (child != null) { generateCodeFromNode(child, node, trueLabel, falseLabel); child = child.getNextSibling(); } addScriptRuntimeInvoke("delete", "(Ljava/lang/Object;Ljava/lang/Object;)", "Ljava/lang/Object;"); break; case TokenStream.BINDNAME: case TokenStream.GETBASE: visitBind(node, type, child); break; case TokenStream.GETTHIS: generateCodeFromNode(child, node, trueLabel, falseLabel); addScriptRuntimeInvoke("getThis", "(Lorg/mozilla/javascript/Scriptable;)", "Lorg/mozilla/javascript/Scriptable;"); break; case TokenStream.PARENT: generateCodeFromNode(child, node, trueLabel, falseLabel); addScriptRuntimeInvoke("getParent", "(Ljava/lang/Object;)", "Lorg/mozilla/javascript/Scriptable;"); break; case TokenStream.NEWTEMP: visitNewTemp(node, child); break; case TokenStream.USETEMP: visitUseTemp(node, child); break; case TokenStream.NEWLOCAL: visitNewLocal(node, child); break; case TokenStream.USELOCAL: visitUseLocal(node, child); break; default: throw new RuntimeException("Unexpected node type " + TokenStream.tokenToName(type)); } } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/f6c346cc7699c007b0b9b27d9c3cdb5446052c64/Codegen.java/buggy/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
1085,
28570,
12,
907,
756,
16,
2029,
982,
16,
509,
638,
2224,
16,
4766,
4202,
509,
629,
2224,
13,
377,
288,
3639,
368,
2332,
18,
659,
18,
8222,
2932,
4507,
981,
364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2103,
1085,
28570,
12,
907,
756,
16,
2029,
982,
16,
509,
638,
2224,
16,
4766,
4202,
509,
629,
2224,
13,
377,
288,
3639,
368,
2332,
18,
659,
18,
8222,
2932,
4507,
981,
364,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.