rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
data = TestFixture.initializeRepository1(); | data = TestFixture.init010(); | protected void setUp() throws Exception { super.setUp(); manager = TasksUiPlugin.getRepositoryManager(); manager.clearRepositories(); tasklist = TasksUiPlugin.getTaskListManager().getTaskList(); data = TestFixture.initializeRepository1(); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/312c78d721814073d17f104ab334cbe54b3954cc/TracRepositoryConnectorTest.java/buggy/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
24292,
1435,
1216,
1185,
288,
202,
202,
9565,
18,
542,
1211,
5621,
202,
202,
4181,
273,
20350,
13943,
3773,
18,
588,
3305,
1318,
5621,
202,
202,
4181,
18,
8507,
18429,
562... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
24292,
1435,
1216,
1185,
288,
202,
202,
9565,
18,
542,
1211,
5621,
202,
202,
4181,
273,
20350,
13943,
3773,
18,
588,
3305,
1318,
5621,
202,
202,
4181,
18,
8507,
18429,
562... |
VM_CompiledMethods.init(); | static void init(String vmClassPath) { // specify place where vm classes and resources live // setVmRepositories(vmClassPath); applicationRepositories = null; // create special method- and attribute- names // StandardClassInitializerMethodName = VM_Atom.findOrCreateAsciiAtom("<clinit>"); StandardClassInitializerMethodDescriptor = VM_Atom.findOrCreateAsciiAtom("()V"); StandardObjectInitializerMethodName = VM_Atom.findOrCreateAsciiAtom("<init>"); StandardObjectInitializerMethodDescriptor = VM_Atom.findOrCreateAsciiAtom("()V"); StandardObjectFinalizerMethodName = VM_Atom.findOrCreateAsciiAtom("finalize"); StandardObjectFinalizerMethodDescriptor = VM_Atom.findOrCreateAsciiAtom("()V"); codeAttributeName = VM_Atom.findOrCreateAsciiAtom("Code"); constantValueAttributeName = VM_Atom.findOrCreateAsciiAtom("ConstantValue"); lineNumberTableAttributeName = VM_Atom.findOrCreateAsciiAtom("LineNumberTable"); exceptionsAttributeName = VM_Atom.findOrCreateAsciiAtom("Exceptions"); sourceFileAttributeName = VM_Atom.findOrCreateAsciiAtom("SourceFile"); localVariableTableAttributeName = VM_Atom.findOrCreateAsciiAtom("LocalVariableTable"); deprecatedAttributeName = VM_Atom.findOrCreateAsciiAtom("Deprecated"); innerClassesAttributeName = VM_Atom.findOrCreateAsciiAtom("InnerClasses"); syntheticAttributeName = VM_Atom.findOrCreateAsciiAtom("Synthetic"); arrayNullCheckAttributeName = VM_Atom.findOrCreateAsciiAtom("ArrayNullCheckAttribute"); VM_TypeDictionary.init(); VM_FieldDictionary.init(); VM_MethodDictionary.init(); if (VM.BuildForIMTInterfaceInvocation) VM_InterfaceMethodSignatureDictionary.init(); VM_CompiledMethods.init(); dynamicLibraries = new VM_DynamicLibrary[0]; VM_Type.init(); com.ibm.oti.vm.AbstractClassLoader.setBootstrapClassLoader( VM_SystemClassLoader.getVMClassLoader() ); } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/db287c55eba4411bddd5a7b935467c602a676bbd/VM_ClassLoader.java/clean/rvm/src/vm/classLoader/VM_ClassLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
918,
1208,
12,
780,
4268,
22158,
13,
288,
565,
368,
4800,
3166,
1625,
4268,
3318,
471,
2703,
8429,
565,
368,
565,
444,
22143,
18429,
12,
3489,
22158,
1769,
565,
2521,
18429,
273,
446... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
918,
1208,
12,
780,
4268,
22158,
13,
288,
565,
368,
4800,
3166,
1625,
4268,
3318,
471,
2703,
8429,
565,
368,
565,
444,
22143,
18429,
12,
3489,
22158,
1769,
565,
2521,
18429,
273,
446... | |
if (args == null && methodArgs != null && methodArgs.length > 0) { throw new RubyArgumentException(getExceptedArgsString(methodArgs)); } else if (args == null && (methodArgs == null || methodArgs.length == 0)) { return; | if (args.length == 0) { if (methodArgs.length > 0) { throw new RubyArgumentException(getExceptedArgsString(methodArgs)); } | protected void testArgsCount(RubyObject[] methodArgs) { if (args == null && methodArgs != null && methodArgs.length > 0) { throw new RubyArgumentException(getExceptedArgsString(methodArgs)); } else if (args == null && (methodArgs == null || methodArgs.length == 0)) { return; } else if (restArgs) { if (methodArgs == null && (args.length == 1)) { return; } else if (methodArgs.length < (args.length - 1)) { throw new RubyArgumentException(getExceptedArgsString(methodArgs)); } } else { if ((methodArgs == null) || (methodArgs.length != args.length)) { throw new RubyArgumentException(getExceptedArgsString(methodArgs)); } } } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/ReflectionCallbackMethod.java/clean/org/jruby/core/ReflectionCallbackMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1842,
2615,
1380,
12,
54,
10340,
921,
8526,
707,
2615,
13,
288,
3639,
309,
261,
1968,
422,
446,
597,
707,
2615,
480,
446,
597,
707,
2615,
18,
2469,
405,
374,
13,
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,
918,
1842,
2615,
1380,
12,
54,
10340,
921,
8526,
707,
2615,
13,
288,
3639,
309,
261,
1968,
422,
446,
597,
707,
2615,
480,
446,
597,
707,
2615,
18,
2469,
405,
374,
13,
288,
5411,
... |
throw new CmsDbEntryNotFoundException( Messages.get().container(Messages.LOG_READING_RESOURCE_1, resourceId)); | throw new CmsDbEntryNotFoundException(Messages.get().container( Messages.LOG_READING_RESOURCE_1, resourceId)); | public void writeContent(CmsDbContext dbc, CmsProject project, CmsUUID resourceId, byte[] content) throws CmsDataAccessException { PreparedStatement stmt = null; PreparedStatement commit = null; PreparedStatement rollback = null; Connection conn = null; ResultSet res = null; boolean wasInTransaction = false; try { conn = m_sqlManager.getConnection(dbc, project.getId()); if (conn.getMetaData().getDriverMajorVersion()<9) { stmt = m_sqlManager.getPreparedStatement(conn, project, "C_ORACLE8_CONTENTS_UPDATECONTENT"); } else { stmt = m_sqlManager.getPreparedStatement(conn, project, "C_ORACLE_CONTENTS_UPDATECONTENT"); } wasInTransaction = !conn.getAutoCommit(); if (!wasInTransaction) { conn.setAutoCommit(false); } // update the file content in the contents table stmt.setString(1, resourceId.toString()); res = ((DelegatingResultSet)stmt.executeQuery()).getInnermostDelegate(); if (!res.next()) { throw new CmsDbEntryNotFoundException( Messages.get().container(Messages.LOG_READING_RESOURCE_1, resourceId)); } // write file content OutputStream output = CmsUserDriver.getOutputStreamFromBlob(res, "FILE_CONTENT"); output.write(content); output.close(); if (!wasInTransaction) { commit = m_sqlManager.getPreparedStatement(conn, "C_COMMIT"); commit.execute(); m_sqlManager.closeAll(dbc, null, commit, null); } m_sqlManager.closeAll(dbc, null, stmt, res); commit = null; stmt = null; res = null; if (!wasInTransaction) { conn.setAutoCommit(true); } } catch (IOException e) { throw new CmsDbIoException(Messages.get().container(Messages.ERR_WRITING_TO_OUTPUT_STREAM_1, resourceId), e); } catch (SQLException e) { throw new CmsDbSqlException(org.opencms.db.generic.Messages.get().container( org.opencms.db.generic.Messages.ERR_GENERIC_SQL_1, CmsDbSqlException.getErrorQuery(stmt)), e); } finally { if (res != null) { try { res.close(); } catch (SQLException exc) { // ignore } } if (commit != null) { try { commit.close(); } catch (SQLException exc) { // ignore } } if (!wasInTransaction) { if (stmt != null) { try { rollback = m_sqlManager.getPreparedStatement(conn, "C_ROLLBACK"); rollback.execute(); rollback.close(); } catch (SQLException se) { // ignore } try { stmt.close(); } catch (SQLException exc) { // ignore } } if (conn != null) { try { conn.setAutoCommit(true); conn.close(); } catch (SQLException se) { // ignore } } } } } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/546c122e43ad901e06bfec1c2164259c3ce08c8b/CmsVfsDriver.java/buggy/src/org/opencms/db/oracle/CmsVfsDriver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
1350,
12,
4747,
4331,
1042,
9881,
16,
2149,
4109,
1984,
16,
15792,
15035,
16,
1160,
8526,
913,
13,
1216,
2149,
751,
9773,
288,
3639,
16913,
3480,
273,
446,
31,
3639,
1691... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4747,
4331,
1042,
9881,
16,
2149,
4109,
1984,
16,
15792,
15035,
16,
1160,
8526,
913,
13,
1216,
2149,
751,
9773,
288,
3639,
16913,
3480,
273,
446,
31,
3639,
1691... |
/** * Sets our necessary style properties. */ if ( color.getRGB( ) != null ) { rule.setProperty( HighlightRule.COLOR_MEMBER, new Integer( colorValue ) ); } if ( backColor.getRGB( ) != null ) { rule.setProperty( HighlightRule.BACKGROUND_COLOR_MEMBER, new Integer( backColorValue ) ); } if ( familyValue != null ) { rule.setProperty( HighlightRule.FONT_FAMILY_MEMBER, familyValue ); } if ( sizeValue != null ) { rule.setProperty( HighlightRule.FONT_SIZE_MEMBER, sizeValue ); } if ( isItalicChanged ) { rule.setProperty( HighlightRule.FONT_STYLE_MEMBER, italicValue ); } if ( isBoldChanged ) { rule.setProperty( HighlightRule.FONT_WEIGHT_MEMBER, weightValue ); } if ( isLinethroughChanged ) { rule.setProperty( HighlightRule.TEXT_LINE_THROUGH_MEMBER, lingthroughValue ); } if ( isUnderlineChanged ) { rule.setProperty( HighlightRule.TEXT_UNDERLINE_MEMBER, underlineValue ); } | protected void okPressed( ) { try { String familyValue = getRawFontFamily( ); String sizeValue = getRawFontSize( ); int colorValue = DEUtil.getRGBInt( color.getRGB( ) ); int backColorValue = DEUtil.getRGBInt( backColor.getRGB( ) ); String italicValue = italic.getSelection( ) ? DesignChoiceConstants.FONT_STYLE_ITALIC : DesignChoiceConstants.FONT_STYLE_NORMAL; String weightValue = bold.getSelection( ) ? DesignChoiceConstants.FONT_WEIGHT_BOLD : DesignChoiceConstants.FONT_WEIGHT_NORMAL; String underlineValue = underline.getSelection( ) ? DesignChoiceConstants.TEXT_UNDERLINE_UNDERLINE : DesignChoiceConstants.TEXT_UNDERLINE_NONE; String lingthroughValue = linethrough.getSelection( ) ? DesignChoiceConstants.TEXT_LINE_THROUGH_LINE_THROUGH : DesignChoiceConstants.TEXT_LINE_THROUGH_NONE; // provider.setTestExpression( DEUtil.resolveNull( // expression.getText( ) ) ); if ( handle == null ) { HighlightRule rule = StructureFactory.createHighlightRule( ); rule.setProperty( HighlightRule.OPERATOR_MEMBER, DEUtil.resolveNull( getValueForOperator( operator.getText( ) ) ) ); rule.setProperty( HighlightRule.VALUE1_MEMBER, DEUtil.resolveNull( value1.getText( ) ) ); rule.setProperty( HighlightRule.VALUE2_MEMBER, DEUtil.resolveNull( value2.getText( ) ) ); /** * Sets our necessary style properties. */ if ( color.getRGB( ) != null ) { rule.setProperty( HighlightRule.COLOR_MEMBER, new Integer( colorValue ) ); } if ( backColor.getRGB( ) != null ) { rule.setProperty( HighlightRule.BACKGROUND_COLOR_MEMBER, new Integer( backColorValue ) ); } if ( familyValue != null ) { rule.setProperty( HighlightRule.FONT_FAMILY_MEMBER, familyValue ); } if ( sizeValue != null ) { rule.setProperty( HighlightRule.FONT_SIZE_MEMBER, sizeValue ); } if ( isItalicChanged ) { rule.setProperty( HighlightRule.FONT_STYLE_MEMBER, italicValue ); } if ( isBoldChanged ) { rule.setProperty( HighlightRule.FONT_WEIGHT_MEMBER, weightValue ); } if ( isLinethroughChanged ) { rule.setProperty( HighlightRule.TEXT_LINE_THROUGH_MEMBER, lingthroughValue ); } if ( isUnderlineChanged ) { rule.setProperty( HighlightRule.TEXT_UNDERLINE_MEMBER, underlineValue ); } // set test expression into highlight rule. rule.setTestExpression( DEUtil.resolveNull( expression.getText( ) ) ); handle = provider.doAddItem( rule, handleCount ); } else { handle.setOperator( DEUtil.resolveNull( getValueForOperator( operator.getText( ) ) ) ); handle.setValue1( DEUtil.resolveNull( value1.getText( ) ) ); if ( handle.getOperator( ) .equals( DesignChoiceConstants.MAP_OPERATOR_BETWEEN ) || handle.getOperator( ) .equals( DesignChoiceConstants.MAP_OPERATOR_NOT_BETWEEN ) ) { handle.setValue2( DEUtil.resolveNull( value2.getText( ) ) ); } handle.getFontFamilyHandle( ) .setStringValue( DEUtil.resolveNull( familyValue ) ); handle.getFontSize( ) .setStringValue( DEUtil.resolveNull( sizeValue ) ); if ( color.getRGB( ) != null ) { handle.getColor( ).setRGB( colorValue ); } else { handle.getColor( ).setValue( null ); } if ( backColor.getRGB( ) != null ) { handle.getBackgroundColor( ).setRGB( backColorValue ); } else { handle.getBackgroundColor( ).setValue( null ); } if ( isItalicChanged ) { handle.setFontStyle( italicValue ); } if ( isBoldChanged ) { handle.setFontWeight( weightValue ); } if ( isUnderlineChanged ) { handle.setTextUnderline( underlineValue ); } if ( isLinethroughChanged ) { handle.setTextLineThrough( lingthroughValue ); } // set test expression into highlight rule. handle.setTestExpression( DEUtil.resolveNull( expression.getText( ) ) ); } } catch ( Exception e ) { WidgetUtil.processError( getShell( ), e ); } super.okPressed( ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/61206e16d4577e047c9690eaab1f596d6239ab72/HighlightRuleBuilder.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/HighlightRuleBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1529,
24624,
12,
262,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
780,
6755,
620,
273,
10547,
5711,
9203,
12,
11272,
1082,
202,
780,
963,
620,
273,
10547,
22688,
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,
1117,
918,
1529,
24624,
12,
262,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
780,
6755,
620,
273,
10547,
5711,
9203,
12,
11272,
1082,
202,
780,
963,
620,
273,
10547,
22688,
12... | |
setEchoChar(echoChar); | this.echoChar = echoChar; TextFieldPeer peer = (TextFieldPeer) getPeer (); if (peer != null) peer.setEchoChar (echoChar); | setEchoCharacter(char echoChar){ setEchoChar(echoChar);} | 13625 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13625/3fe1c14284ce32b79d0e66441aec6a45a77ff684/TextField.java/buggy/libjava/java/awt/TextField.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
444,
19704,
7069,
12,
3001,
3376,
2156,
15329,
225,
444,
19704,
2156,
12,
12946,
2156,
1769,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
444,
19704,
7069,
12,
3001,
3376,
2156,
15329,
225,
444,
19704,
2156,
12,
12946,
2156,
1769,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
assertEquals(compressWhitespaces(expected), compressWhitespaces(actual)); | String processedExpected = compressWhitespaces(expected); String processedActual = compressWhitespaces(actual); assertEquals(processedExpected, processedActual); | protected void assertEqualsIgnoringWhitespaces(String expected, String actual) { assertEquals(compressWhitespaces(expected), compressWhitespaces(actual)); } | 1224 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1224/320fa876f1f19ea466d65796c45a11dd08320655/TestBase.java/buggy/src/test/org/apache/ddlutils/TestBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1815,
8867,
21702,
2888,
21693,
12,
780,
2665,
16,
514,
3214,
13,
565,
288,
3639,
514,
5204,
6861,
273,
8099,
2888,
21693,
12,
3825,
1769,
514,
5204,
11266,
282,
273,
8099,
288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1815,
8867,
21702,
2888,
21693,
12,
780,
2665,
16,
514,
3214,
13,
565,
288,
3639,
514,
5204,
6861,
273,
8099,
2888,
21693,
12,
3825,
1769,
514,
5204,
11266,
282,
273,
8099,
288... |
public void paintPseudoAtomLabel(PseudoAtom atom, Color backColor, Graphics graphics, int alignment) { if (atom.getPoint2D() == null) { logger.warn("Cannot draw atom without 2D coordinate"); return; } // The calculation fonts Font normalFont = graphics.getFont(); int normalFontSize = normalFont.getSize(); // get drawing fonts float normalScreenFontSize = getScreenSize(normalFontSize); Font normalScreenFont = normalFont.deriveFont(normalScreenFontSize); // calculate SYMBOL width, height String atomSymbol = atom.getLabel(); graphics.setFont(normalFont); FontMetrics fm = graphics.getFontMetrics(); int atomSymbolW = (new Integer(fm.stringWidth(atomSymbol))).intValue(); int atomSymbolFirstCharW = (new Integer(fm.stringWidth(atomSymbol.substring(0,1)))).intValue(); int atomSymbolLastCharW = (new Integer(fm.stringWidth(atomSymbol.substring(atomSymbol.length()-1)))).intValue(); int atomSymbolH = (new Integer(fm.getAscent())).intValue(); int labelX = 0; int labelY = 0; int labelW = atomSymbolW; int labelH = atomSymbolH; if (alignment == 1) { // left alignment labelX = (int)(atom.getPoint2D().x - (atomSymbolFirstCharW/2)); } else { // right alignment labelX = (int)(atom.getPoint2D().x - (atomSymbolW + atomSymbolLastCharW/2)); } // labelY and labelH are the same for both left/right aligned labelY = (int)(atom.getPoint2D().y - (atomSymbolH/2)); // make empty space { int border = 2; // number of pixels graphics.setColor(backColor); int[] coords = {labelX - border, labelY - border, labelW + 2*border, labelH + 2*border}; int[] screenCoords = getScreenCoordinates(coords); graphics.fillRect(screenCoords[0], screenCoords[1], screenCoords[2], screenCoords[3]); } // draw label { int[] coords = { labelX, labelY + atomSymbolH}; int[] screenCoords = getScreenCoordinates(coords); graphics.setColor(Color.black); graphics.setFont(normalScreenFont); graphics.drawString(atomSymbol, screenCoords[0], screenCoords[1]); } // reset old font & color graphics.setFont(normalFont); graphics.setColor(r2dm.getForeColor()); } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/024b5bd543555ab0427fdc6b91c9895dbe18db45/Renderer2D.java/buggy/src/org/openscience/cdk/renderer/Renderer2D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
12574,
26716,
3641,
2224,
12,
26716,
3641,
3179,
16,
5563,
1473,
2957,
16,
16830,
17313,
16,
509,
8710,
13,
288,
3639,
309,
261,
7466,
18,
588,
2148,
22,
40,
1435,
422,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
12574,
26716,
3641,
2224,
12,
26716,
3641,
3179,
16,
5563,
1473,
2957,
16,
16830,
17313,
16,
509,
8710,
13,
288,
3639,
309,
261,
7466,
18,
588,
2148,
22,
40,
1435,
422,
446,
... | ||
getForward(req, "portlet.mailx.edit_message")); | getForward(req, "portlet.mailbox.edit_message")); | public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { try { } catch (Exception e) { } return mapping.findForward( getForward(req, "portlet.mailx.edit_message")); } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/2b3752d7d06b093f46c3eed0f43fe8b37f7e48d6/EditMessageAction.java/clean/portal-ejb/src/com/liferay/portlet/mailbox/action/EditMessageAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4382,
8514,
1743,
12,
1082,
202,
1803,
3233,
2874,
16,
4382,
1204,
646,
16,
21305,
809,
642,
16,
1082,
202,
3420,
691,
1111,
16,
6987,
1064,
400,
13,
202,
202,
15069,
1185,
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,
4382,
8514,
1743,
12,
1082,
202,
1803,
3233,
2874,
16,
4382,
1204,
646,
16,
21305,
809,
642,
16,
1082,
202,
3420,
691,
1111,
16,
6987,
1064,
400,
13,
202,
202,
15069,
1185,
28... |
result.append(RubyString.newString(getRuntime(), interfaces[i].getName())); | result.append(getRuntime().newString(interfaces[i].getName())); | public RubyArray interfaces() { Class[] interfaces = javaClass.getInterfaces(); RubyArray result = RubyArray.newArray(getRuntime(), interfaces.length); for (int i = 0; i < interfaces.length; i++) { result.append(RubyString.newString(getRuntime(), interfaces[i].getName())); } return result; } | 45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/870e1da9b41bfdbae259e1fc5f18fc8b76686998/JavaClass.java/buggy/src/org/jruby/javasupport/JavaClass.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
1076,
7349,
1435,
288,
3639,
1659,
8526,
7349,
273,
2252,
797,
18,
588,
10273,
5621,
3639,
19817,
1076,
563,
273,
19817,
1076,
18,
2704,
1076,
12,
588,
5576,
9334,
7349,
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,
19817,
1076,
7349,
1435,
288,
3639,
1659,
8526,
7349,
273,
2252,
797,
18,
588,
10273,
5621,
3639,
19817,
1076,
563,
273,
19817,
1076,
18,
2704,
1076,
12,
588,
5576,
9334,
7349,
18,
... |
public void report() { declaredFields.removeAll(readFields); for(Iterator<FieldAnnotation> i = declaredFields.iterator(); i.hasNext(); ) { FieldAnnotation f = i.next(); String fieldName = f.getFieldName(); String className = f.getClassName();/* int lastDollar = className.lastIndexOf('$'); boolean isAnonymousInnerClass = (lastDollar > 0) && (lastDollar < className.length() - 1) && Character.isDigit(className.charAt(className.length() - 1));*/ boolean allUpperCase = fieldName.equals(fieldName.toUpperCase()); if (superReadFields.contains(f.getFieldName())) continue; if (!fieldName.startsWith("this$")) { if (allUpperCase || constantFields.contains(f) ) bugReporter.reportBug(new BugInstance("SS_SHOULD_BE_STATIC", NORMAL_PRIORITY) .addClass(className) .addField(f)); else if (!writtenFields.contains(f) && !superWrittenFields.contains(f.getFieldName())) bugReporter.reportBug(new BugInstance("UUF_UNUSED_FIELD", NORMAL_PRIORITY) .addClass(className) .addField(f)); else bugReporter.reportBug(new BugInstance("URF_UNREAD_FIELD", NORMAL_PRIORITY) .addClass(className) .addField(f)); } else if ( !innerClassCannotBeStatic.contains(className) // && !isAnonymousInnerClass ) bugReporter.reportBug(new BugInstance("SIC_INNER_SHOULD_BE_STATIC", NORMAL_PRIORITY) .addClass(className)); } } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/c0995c86035f0b520e5089b73422f60ad5545010/UnreadFields.java/clean/findbugs/src/java/edu/umd/cs/findbugs/UnreadFields.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
6006,
1435,
95,
202,
16571,
2314,
18,
4479,
1595,
12,
896,
2314,
1769,
202,
1884,
12,
3198,
32,
974,
3257,
34,
77,
33,
16571,
2314,
18,
9838,
5621,
77,
18,
5332,
2134,
5621,
1532... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6006,
1435,
95,
202,
16571,
2314,
18,
4479,
1595,
12,
896,
2314,
1769,
202,
1884,
12,
3198,
32,
974,
3257,
34,
77,
33,
16571,
2314,
18,
9838,
5621,
77,
18,
5332,
2134,
5621,
1532... | ||
return getMoreResults(CLOSE_CURRENT_RESULT); | return getMoreResults(CLOSE_ALL_RESULTS); | public boolean getMoreResults() throws SQLException { checkOpen(); return getMoreResults(CLOSE_CURRENT_RESULT); } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/de1e78f5176d5f9840fddf80f0ab81fe7e718dbc/JtdsStatement.java/buggy/src/main/net/sourceforge/jtds/jdbc/JtdsStatement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
2108,
479,
3447,
1435,
1216,
6483,
288,
3639,
866,
3678,
5621,
3639,
327,
2108,
479,
3447,
12,
13384,
67,
4685,
67,
20602,
1769,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
2108,
479,
3447,
1435,
1216,
6483,
288,
3639,
866,
3678,
5621,
3639,
327,
2108,
479,
3447,
12,
13384,
67,
4685,
67,
20602,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-10... |
return getCallbackMethod().execute(recv, args, ruby); | return getCallbackMethod().execute(recv, args == null ? null : args.toRubyArray(), ruby); | public RubyObject call(Ruby ruby, RubyObject recv, RubyId id, RubyObject[] args, boolean noSuper) { // HACK +++ try { // HACK --- return getCallbackMethod().execute(recv, args, ruby); // HACK +++ } catch (RaiseException rrExcptn) { System.out.print("[BUG] Cannot call method \"" + id.toName() + "\". "); System.out.println(rrExcptn.getMessage()); return ruby.getNil(); } // HACK --- } | 50993 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50993/f629550c5947df9c1dbe414645f3dc76bcb70df4/CFuncNode.java/buggy/org/jruby/nodes/CFuncNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
745,
12,
54,
10340,
22155,
16,
19817,
921,
10665,
16,
19817,
548,
612,
16,
19817,
921,
8526,
833,
16,
1250,
1158,
8051,
13,
288,
3639,
368,
670,
3649,
965,
15,
3639,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
745,
12,
54,
10340,
22155,
16,
19817,
921,
10665,
16,
19817,
548,
612,
16,
19817,
921,
8526,
833,
16,
1250,
1158,
8051,
13,
288,
3639,
368,
670,
3649,
965,
15,
3639,
7... |
public void saveProperties(Properties props) { Enumeration names = props.propertyNames(); while (names.hasMoreElements()) { String propertyName = (String) names.nextElement(); if (propertyName.equals("UserProfile") || propertyName.equals("Store") || propertyName.equals("OutgoingServer") || propertyName.equals("AddressBook")) { // skip } else { transferProperty(props, propertyName); } } transferProperty(props, "UserProfile"); transferProperty(props, "Store"); transferProperty(props, "OutgoingServer"); if (useLocalFiles) { transferProperty(props, "AddressBook"); } } | 967 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/967/ad1d7a526540019e033079228544b3a802a556d3/NewAccountPooka.java/clean/src/net/suberic/pooka/gui/NewAccountPooka.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1923,
2297,
12,
2297,
3458,
13,
288,
565,
13864,
1257,
273,
3458,
18,
4468,
1557,
5621,
565,
1323,
261,
1973,
18,
5332,
7417,
3471,
10756,
288,
1377,
514,
5470,
273,
261,
780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1923,
2297,
12,
2297,
3458,
13,
288,
565,
13864,
1257,
273,
3458,
18,
4468,
1557,
5621,
565,
1323,
261,
1973,
18,
5332,
7417,
3471,
10756,
288,
1377,
514,
5470,
273,
261,
780,
... | ||
if (binding instanceof ICPPInternalFunction) modifiers |= (((ICPPInternalFunction)function).isStatic(false) ? 1 : 0) << PDOMCAnnotation.STATIC_OFFSET; | public static byte encodeAnnotation(IBinding binding) throws DOMException { byte modifiers = 0; if (binding instanceof IVariable) { IVariable variable = (IVariable) binding; modifiers |= (variable.isAuto() ? 1 : 0) << PDOMCAnnotation.AUTO_OFFSET; modifiers |= (variable.isExtern() ? 1 : 0) << PDOMCAnnotation.EXTERN_OFFSET; modifiers |= (variable.isRegister() ? 1 : 0) << PDOMCAnnotation.REGISTER_OFFSET; modifiers |= (variable.isStatic() ? 1 : 0) << PDOMCAnnotation.STATIC_OFFSET; } if (binding instanceof IFunction) { IFunction function = (IFunction) binding; modifiers |= (function.isAuto() ? 1 : 0) << PDOMCAnnotation.AUTO_OFFSET; modifiers |= (function.isExtern() ? 1 : 0) << PDOMCAnnotation.EXTERN_OFFSET; modifiers |= (function.isRegister() ? 1 : 0) << PDOMCAnnotation.REGISTER_OFFSET;// modifiers |= (function.isStatic() ? 1 : 0) << PDOMCAnnotation.STATIC_OFFSET; modifiers |= (function.isInline() ? 1 : 0) << PDOMCAnnotation.INLINE_OFFSET; modifiers |= (function.takesVarArgs() ? 1 : 0) << PDOMCAnnotation.VARARGS_OFFSET; } return modifiers; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/0a1cff1dd519a602b19a2c0d74186c2807882cdd/PDOMCAnnotation.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCAnnotation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
430,
261,
7374,
1276,
467,
4258,
52,
3061,
2083,
13,
10429,
5626,
261,
12443,
2871,
6584,
3061,
2083,
13,
915,
2934,
291,
5788,
12,
5743,
13,
692,
404,
294,
374,
13,
2296,
453... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
430,
261,
7374,
1276,
467,
4258,
52,
3061,
2083,
13,
10429,
5626,
261,
12443,
2871,
6584,
3061,
2083,
13,
915,
2934,
291,
5788,
12,
5743,
13,
692,
404,
294,
374,
13,
2296,
453... | |
} | private void updateSelection(boolean controlPressed) { // Update the rows int lo_row = table.rowAtPoint(begin); int hi_row = table.rowAtPoint(curr); ListSelectionModel rowModel = table.getSelectionModel(); if (lo_row != -1 && hi_row != -1) { if (controlPressed && rowModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) rowModel.addSelectionInterval(lo_row, hi_row); else rowModel.setSelectionInterval(lo_row, hi_row); } // Update the columns int lo_col = table.columnAtPoint(begin); int hi_col = table.columnAtPoint(curr); ListSelectionModel colModel = table.getColumnModel(). getSelectionModel(); if (lo_col != -1 && hi_col != -1) { if (controlPressed && colModel.getSelectionMode() != ListSelectionModel.SINGLE_SELECTION) colModel.addSelectionInterval(lo_col, hi_col); else colModel.setSelectionInterval(lo_col, hi_col); } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTableUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTableUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
6233,
12,
6494,
3325,
24624,
13,
3639,
288,
1377,
368,
2315,
326,
2595,
1377,
509,
437,
67,
492,
273,
1014,
18,
492,
861,
2148,
12,
10086,
1769,
1377,
509,
10118,
67,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
6233,
12,
6494,
3325,
24624,
13,
3639,
288,
1377,
368,
2315,
326,
2595,
1377,
509,
437,
67,
492,
273,
1014,
18,
492,
861,
2148,
12,
10086,
1769,
1377,
509,
10118,
67,
4... | |
saveProjectItemActionPerformed(evt); } | saveProjectItemActionPerformed(evt); } | public void actionPerformed(java.awt.event.ActionEvent evt) { saveProjectItemActionPerformed(evt); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/dd94e0f0954c1e9589257268d889aee9506f807e/FindBugsFrame.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/gui/FindBugsFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
918,
26100,
12,
6290,
18,
2219,
88,
18,
2575,
18,
1803,
1133,
6324,
13,
288,
6862,
202,
5688,
4109,
1180,
19449,
12,
73,
11734,
1769,
9506,
202,
97,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
918,
26100,
12,
6290,
18,
2219,
88,
18,
2575,
18,
1803,
1133,
6324,
13,
288,
6862,
202,
5688,
4109,
1180,
19449,
12,
73,
11734,
1769,
9506,
202,
97,
2,
-100,
-100,
-100,
-100... |
buf.append("<li><a href=\"/"+key.toString(false)+"?type=application/x-msdownload\">Click here</a> to force your browser to download the file to disk.</li>\n"); | buf.append("<li><a href=\"/"+key.toString(false)+"?forcedownload\">Click here</a> to force your browser to download the file to disk.</li>\n"); | public void handleGet(URI uri, ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { //String ks = uri.toString(); String ks = uri.getPath(); HTTPRequest httprequest = new HTTPRequest(uri); if (ks.equals("/")) { if (httprequest.isParameterSet("key")) { MultiValueTable headers = new MultiValueTable(); headers.put("Location", "/"+httprequest.getParam("key")); ctx.sendReplyHeaders(302, "Found", headers, null, 0); return; } RedirectException re = new RedirectException(); try { String querystring = uri.getQuery(); if (querystring == null) { re.newuri = new URI("/welcome/"); } else { // TODP possibly a proper URLEncode method querystring = querystring.replace(' ', '+'); re.newuri = new URI("/welcome/?"+querystring); } } catch (URISyntaxException e) { // HUH!?! } throw re; }else if(ks.equals("/favicon.ico")){ byte[] buf = new byte[1024]; int len; InputStream strm = getClass().getResourceAsStream("staticfiles/favicon.ico"); if (strm == null) { this.sendErrorPage(ctx, 404, "Path not found", "The specified path does not exist."); return; } ctx.sendReplyHeaders(200, "OK", null, "image/x-icon", strm.available()); while ( (len = strm.read(buf)) > 0) { ctx.writeData(buf, 0, len); } return; } if(ks.startsWith("/")) ks = ks.substring(1); long maxSize = httprequest.getLongParam("max-size", MAX_LENGTH); FreenetURI key; try { key = new FreenetURI(ks); } catch (MalformedURLException e) { this.writeReply(ctx, 400, "text/html", "Invalid key", "<html><head><title>Invalid key</title></head><body>Expected a freenet key, but got "+HTMLEncoder.encode(ks)+"</body></html>"); return; } try { Logger.minor(this, "Fproxy fetching "+key); FetchResult result = fetch(key, maxSize); // Now, is it safe? Bucket data = result.asBucket(); String typeName = result.getMimeType(); String reqParam = httprequest.getParam("type", null); if(reqParam != null) typeName = reqParam; Logger.minor(this, "Type: "+typeName+" ("+result.getMimeType()+" "+reqParam+")"); long now = System.currentTimeMillis(); String forceString = httprequest.getParam("force"); boolean force = false; if(forceString != null) { if(forceString.equals(getForceValue(key, now)) || forceString.equals(getForceValue(key, now-FORCE_GRAIN_INTERVAL))) force = true; } if(typeName.equals("application/x-msdownload")) { // Download to disk, this should be safe, and is set when we do "force download to disk" from a dangerous-content-warning page. force = true; } try { if(!force) data = ContentFilter.filter(data, ctx.getBucketFactory(), typeName); // Send the data, intact writeReply(ctx, 200, typeName, "OK", data); } catch (UnsafeContentTypeException e) { StringBuffer buf = new StringBuffer(); ctx.getPageMaker().makeHead(buf, "Potentially Dangerous Content"); buf.append("<h1>"); buf.append(e.getHTMLEncodedTitle()); buf.append("</h1>\n"); buf.append(e.getExplanation()); buf.append("<p>Your options are:</p><ul>\n"); buf.append("<li><a href=\"/"+key.toString(false)+"?type=text/plain\">Click here</a> to open the file as plain text (this should not be dangerous, but it may be garbled).</li>\n"); // FIXME: is this safe? See bug #131 buf.append("<li><a href=\"/"+key.toString(false)+"?type=application/x-msdownload\">Click here</a> to force your browser to download the file to disk.</li>\n"); buf.append("<li><a href=\"/"+key.toString(false)+"?force="+getForceValue(key, now)+"\">Click here</a> to open the file as "+HTMLEncoder.encode(typeName)+".</li>\n"); buf.append("<li><a href=\"/\">Click here</a> to go to the FProxy home page.</li>\n"); buf.append("</ul>"); ctx.getPageMaker().makeTail(buf); writeReply(ctx, 200, "text/html", "OK", buf.toString()); } } catch (FetchException e) { String msg = e.getMessage(); String extra = ""; if(e.mode == FetchException.NOT_ENOUGH_METASTRINGS) { this.writePermanentRedirect(ctx, "Not enough meta-strings", "/" + URLEncoder.encode(key.toString(false)) + "/"); } else if(e.newURI != null) { this.writePermanentRedirect(ctx, msg, "/"+e.newURI.toString()); } else if(e.mode == FetchException.TOO_BIG) { StringBuffer buf = new StringBuffer(); ctx.getPageMaker().makeHead(buf, "Large file"); buf.append("<table border=\"0\">\n"); String fnam = getFilename(e, key, e.getExpectedMimeType()); buf.append("<tr><td><b>Filename</b></td>"); buf.append("<a href=\"/"+URLEncoder.encode(key.toString(false))+"\">"); buf.append(fnam); buf.append("</a>"); buf.append("</td></tr>\n"); boolean finalized = e.finalizedSize(); if(e.expectedSize > 0) { buf.append("<tr><td><b>"); if(!finalized) buf.append("Expected size (may change)"); else buf.append("Size"); buf.append("</b></td><td>"); buf.append(SizeUtil.formatSize(e.expectedSize)); buf.append("</td></tr>\n"); } String mime = e.getExpectedMimeType(); if(mime != null) { buf.append("<tr><td><b>"); if(!finalized) buf.append("Expected MIME type"); else buf.append("MIME type"); buf.append("</b></td><td>"); buf.append(mime); buf.append(" bytes </td></tr>\n"); } // FIXME filename buf.append("</table>\n"); buf.append("<br>This is a large file, so it has not been streamed direct" + " to your browser, because Freenet cannot send any data to the " + "browser until it has the whole file, and this may take some time, " + "and also for resource usage reasons.\n"); buf.append("<br>What would you like to do with it?:<ul>"); buf.append("<li>"); buf.append("<form method=\"get\" action=\"/"+key.toString(false)+"\">"); buf.append("<input type=\"hidden\" name=\"max-size\" value=\""+e.expectedSize+"\">"); buf.append("<input type=\"submit\" name=\"fetch\" value=\"Fetch anyway\">"); buf.append("</form></li>"); buf.append("<li><form method=\"post\" action=\"/queue/\">"); buf.append("<input type=\"hidden\" name=\"key\" value=\""+key.toString(false)+"\">"); buf.append("<input type=\"hidden\" name=\"return-type\" value=\"disk\">"); buf.append("<input type=\"hidden\" name=\"persistence\" value=\"forever\">"); if(mime != null) buf.append("<input type=\"hidden\" name=\"type\" value=\""+URLEncoder.encode(mime)+"\">"); buf.append("<input type=\"submit\" name=\"download\" value=\"Download to disk in background\">"); buf.append("</form></li>"); // FIXME add a queue-a-download option.// buf.append("<li>Save it to disk at </li>"); // FIXME add return-to-referring-page //buf.append("<li>Return to the referring page: "); buf.append("<li>Return to the fproxy home page: <a href=\"/\">here</a>"); buf.append("</ul>"); ctx.getPageMaker().makeTail(buf); writeReply(ctx, 200, "text/html", "OK", buf.toString()); // FIXME provide option to queue write to disk. } else { if(e.errorCodes != null) extra = "<pre>"+e.errorCodes.toVerboseString()+"</pre>"; this.writeReply(ctx, 500 /* close enough - FIXME probably should depend on status code */, "text/html", msg, "<html><head><title>"+msg+"</title></head><body>Error: "+HTMLEncoder.encode(msg)+extra+"</body></html>"); } } catch (Throwable t) { Logger.error(this, "Caught "+t, t); String msg = "<html><head><title>Internal Error</title></head><body><h1>Internal Error: please report</h1><pre>"; StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); t.printStackTrace(pw); pw.flush(); msg = msg + sw.toString() + "</pre></body></html>"; this.writeReply(ctx, 500, "text/html", "Internal Error", msg); } } | 46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/a7064bfffe3ac1414491d365150286309d4162a2/FproxyToadlet.java/clean/src/freenet/clients/http/FproxyToadlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
1875,
202,
15069,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
202,
202,
759,
780,
1165... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
1875,
202,
15069,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
202,
202,
759,
780,
1165... |
/* * DG: If we can't find an exact match, narrow the parameters and try again! */ | public Object execute(Object obj, JexlContext jc) throws Exception { String methodName = ((ASTIdentifier)jjtGetChild(0)).val; int paramCount = jjtGetNumChildren()-1; /* * get our params */ Object params[] = new Object[paramCount]; try { for (int i=0; i<paramCount; i++) { params[i] = ( (SimpleNode) jjtGetChild(i+1)).value(jc); } VelMethod vm = Introspector.getUberspect().getMethod(obj, methodName, params, DUMMY); if (vm == null) return null; return vm.invoke(obj, params); } catch(InvocationTargetException e) { Throwable t = e.getTargetException(); if (t instanceof Exception) { throw (Exception) t; } throw e; } } | 54229 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54229/4baef09cdb9f3df0a62d18b370bc3b21af09db42/ASTMethod.java/clean/src/java/org/apache/commons/jexl/parser/ASTMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1748,
380,
463,
43,
30,
971,
732,
848,
1404,
1104,
392,
5565,
845,
16,
17383,
326,
1472,
471,
775,
3382,
5,
1195,
1748,
380,
463,
43,
30,
971,
732,
848,
1404,
1104,
392,
5565,
845,
16,
173... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1748,
380,
463,
43,
30,
971,
732,
848,
1404,
1104,
392,
5565,
845,
16,
17383,
326,
1472,
471,
775,
3382,
5,
1195,
1748,
380,
463,
43,
30,
971,
732,
848,
1404,
1104,
392,
5565,
845,
16,
173... | |
if(headerLen > HEADER_BLOCK_SIZE-2 || headerLen < 0) { | if(headerLen > HEADER_BLOCK_SIZE-2) { | public synchronized CHKBlock fetch(NodeCHK chk) throws IOException { byte[] data = dataStore.getDataForBlock(chk); if(data == null) { if(headersStore.getDataForBlock(chk) != null) { Logger.normal(this, "Deleting: "+chk+" headers, no data"); headersStore.delete(chk); } return null; } byte[] headers = headersStore.getDataForBlock(chk); if(headers == null) { // No headers, delete Logger.normal(this, "Deleting: "+chk+" data, no headers"); dataStore.delete(chk); } // Decode int headerLen = ((headers[0] & 0xff) << 8) + (headers[1] & 0xff); if(headerLen > HEADER_BLOCK_SIZE-2 || headerLen < 0) { Logger.normal(this, "Invalid header data on "+chk+", deleting"); dataStore.delete(chk); headersStore.delete(chk); return null; } byte[] buf = new byte[headerLen]; System.arraycopy(headers, 2, buf, 0, headerLen); Logger.minor(this, "Get key: "+chk); Logger.minor(this, "Raw headers: "+headers.length+" bytes, hash "+Fields.hashCode(headers)); Logger.minor(this, "Headers: "+headerLen+" bytes, hash "+Fields.hashCode(buf)); Logger.minor(this, "Data: "+data.length+" bytes, hash "+Fields.hashCode(data)); try { return new CHKBlock(data, buf, chk); } catch (CHKVerifyException e) { Logger.normal(this, "Does not verify, deleting: "+chk); dataStore.delete(chk); headersStore.delete(chk); return null; } } | 50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/0400e73e7503ab43211657c44d8448afd6346cce/BaseFreenetStore.java/buggy/src/freenet/store/BaseFreenetStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
6469,
47,
1768,
2158,
12,
907,
1792,
47,
15000,
13,
1216,
1860,
288,
3639,
1160,
8526,
501,
273,
31927,
18,
588,
751,
1290,
1768,
12,
27038,
1769,
3639,
309,
12,
892,
422,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
6469,
47,
1768,
2158,
12,
907,
1792,
47,
15000,
13,
1216,
1860,
288,
3639,
1160,
8526,
501,
273,
31927,
18,
588,
751,
1290,
1768,
12,
27038,
1769,
3639,
309,
12,
892,
422,
4... |
byte[][] answer = new byte[nf][0]; | byte[][] answer = bytePoolDim2.allocByte(nf); | public byte[][] ReceiveTuple(int nf, boolean bin) throws SQLException { int i, bim = (nf + 7)/8; byte[] bitmask = Receive(bim); byte[][] answer = new byte[nf][0]; int whichbit = 0x80; int whichbyte = 0; for (i = 0 ; i < nf ; ++i) { boolean isNull = ((bitmask[whichbyte] & whichbit) == 0); whichbit >>= 1; if (whichbit == 0) { ++whichbyte; whichbit = 0x80; } if (isNull) answer[i] = null; else { int len = ReceiveIntegerR(4); if (!bin) len -= 4; if (len < 0) len = 0; answer[i] = Receive(len); } } return answer; } | 45497 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45497/f41dcbe4d810f0906f43d1b345cf506d72c792ac/PG_Stream.java/clean/src/interfaces/jdbc/org/postgresql/PG_Stream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1160,
63,
6362,
65,
17046,
9038,
12,
474,
13958,
16,
1250,
4158,
13,
1216,
6483,
225,
288,
565,
509,
277,
16,
324,
381,
273,
261,
82,
74,
397,
2371,
13176,
28,
31,
565,
1160,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1160,
63,
6362,
65,
17046,
9038,
12,
474,
13958,
16,
1250,
4158,
13,
1216,
6483,
225,
288,
565,
509,
277,
16,
324,
381,
273,
261,
82,
74,
397,
2371,
13176,
28,
31,
565,
1160,
85... |
obj.addAsPrototype(cx, scope, sealed); | obj.addAsPrototype(MAX_PROTOTYPE_ID, cx, scope, sealed); | public static void init(Context cx, Scriptable scope, boolean sealed) { NativeError obj = new NativeError(); obj.defineProperty("message", "", ScriptableObject.EMPTY); obj.defineProperty("name", "Error", ScriptableObject.EMPTY); obj.addAsPrototype(cx, scope, sealed); } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/35caf7c2bb93872680ae16e34746d94fe1e533e3/NativeError.java/buggy/js/rhino/src/org/mozilla/javascript/NativeError.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1208,
12,
1042,
9494,
16,
22780,
2146,
16,
1250,
695,
18931,
13,
288,
3639,
16717,
668,
1081,
273,
394,
16717,
668,
5621,
3639,
1081,
18,
11255,
1396,
2932,
2150,
3113,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
12,
1042,
9494,
16,
22780,
2146,
16,
1250,
695,
18931,
13,
288,
3639,
16717,
668,
1081,
273,
394,
16717,
668,
5621,
3639,
1081,
18,
11255,
1396,
2932,
2150,
3113,
23... |
throw new TypeError(runtime, name() + " must have write method, " + | throw runtime.newTypeError(name() + " must have write method, " + | public IRubyObject set(IRubyObject value) { if (value == get()) { return value; } if (value instanceof RubyIO) { ((RubyIO) value).checkWriteable(); } if (! value.respondsTo("write")) { throw new TypeError(runtime, name() + " must have write method, " + value.getType().getName() + " given"); } return super.set(value); } | 48072 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48072/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyGlobal.java/buggy/src/org/jruby/RubyGlobal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
15908,
10340,
921,
444,
12,
7937,
10340,
921,
460,
13,
288,
5411,
309,
261,
1132,
422,
336,
10756,
288,
7734,
327,
460,
31,
5411,
289,
5411,
309,
261,
1132,
1276,
19817,
4294,
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,
540,
1071,
15908,
10340,
921,
444,
12,
7937,
10340,
921,
460,
13,
288,
5411,
309,
261,
1132,
422,
336,
10756,
288,
7734,
327,
460,
31,
5411,
289,
5411,
309,
261,
1132,
1276,
19817,
4294,
13,
... |
return "DATABASE,IFNULL,USER"; | return "database,ifnull,user,convert"; | public String getSystemFunctions() throws SQLException { return "DATABASE,IFNULL,USER"; } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/0a7ebc6de64e4f3e83cd11c83fd69cd327106d66/JtdsDatabaseMetaData.java/buggy/src/main/net/sourceforge/jtds/jdbc/JtdsDatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
12996,
7503,
1435,
1216,
6483,
288,
3639,
327,
315,
6231,
16,
430,
2011,
16,
1355,
16,
6283,
14432,
565,
289,
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,
0,
0,
0,
0,
0,
0,
0,
0,
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,
12996,
7503,
1435,
1216,
6483,
288,
3639,
327,
315,
6231,
16,
430,
2011,
16,
1355,
16,
6283,
14432,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
public org.quickfix.field.LegRepurchaseRate getLegRepurchaseRate() throws FieldNotFound { org.quickfix.field.LegRepurchaseRate value = new org.quickfix.field.LegRepurchaseRate(); | public quickfix.field.LegRepurchaseRate getLegRepurchaseRate() throws FieldNotFound { quickfix.field.LegRepurchaseRate value = new quickfix.field.LegRepurchaseRate(); | public org.quickfix.field.LegRepurchaseRate getLegRepurchaseRate() throws FieldNotFound { org.quickfix.field.LegRepurchaseRate value = new org.quickfix.field.LegRepurchaseRate(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityList.java/buggy/src/java/src/quickfix/fix44/SecurityList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
426,
12688,
12104,
4727,
336,
8329,
426,
12688,
12104,
4727,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
426,
12688,
12104,
4727,
336,
8329,
426,
12688,
12104,
4727,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
42... |
iVisited.accept(_Payload); | _Payload.visitAliasNode(iVisited); | public void visitAliasNode(AliasNode iVisited) { iVisited.accept(_Payload); } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/043fa4419ad506aa6f8843684eb8114b226fe4b5/DefaultIteratorVisitor.java/clean/org/jruby/nodes/visitor/DefaultIteratorVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
2936,
907,
12,
2936,
907,
277,
30019,
13,
288,
202,
202,
77,
30019,
18,
9436,
24899,
6110,
1769,
202,
97,
2,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
2936,
907,
12,
2936,
907,
277,
30019,
13,
288,
202,
202,
77,
30019,
18,
9436,
24899,
6110,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if (!dejavu) { init(); } try { Object params[] = {cx_, tds_, sql_}; return (java.sql.PreparedStatement)preparedStatementCtor.newInstance(params); } catch (java.lang.reflect.InvocationTargetException e) { throw new java.sql.SQLException(e.getTargetException().getMessage()); } catch (Throwable e) { throw new java.sql.SQLException(e.getMessage()); } | return new PreparedStatement_base( (TdsConnection)cx_, tds_, sql_ ); | public static java.sql.PreparedStatement newPreparedStatement( Object cx_, com.internetcds.jdbc.tds.Tds tds_, java.lang.String sql_) throws java.sql.SQLException { if (!dejavu) { init(); } try { Object params[] = {cx_, tds_, sql_}; return (java.sql.PreparedStatement)preparedStatementCtor.newInstance(params); } catch (java.lang.reflect.InvocationTargetException e) { throw new java.sql.SQLException(e.getTargetException().getMessage()); } catch (Throwable e) { throw new java.sql.SQLException(e.getMessage()); } } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/68d090e16c5812940a9f369b9de5da0f86523923/Constructors.java/clean/src.old/main/com/internetcds/jdbc/tds/Constructors.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
760,
2252,
18,
4669,
18,
29325,
394,
29325,
12,
1377,
1033,
13491,
9494,
67,
16,
1377,
532,
18,
267,
798,
14175,
2377,
18,
24687,
18,
88,
2377,
18,
56,
2377,
225,
268,
2377,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
760,
2252,
18,
4669,
18,
29325,
394,
29325,
12,
1377,
1033,
13491,
9494,
67,
16,
1377,
532,
18,
267,
798,
14175,
2377,
18,
24687,
18,
88,
2377,
18,
56,
2377,
225,
268,
2377,
67,
... |
debug = "remove first line of buffer"; | public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException { Row r = null; boolean retval = true; boolean putrow = false; debug = "start of readRowOfData"; if (first) // we just got started { if (meta.isAcceptingFilenames()) { // Read the files from the specified input stream... data.files.getFiles().clear(); int idx = -1; Row fileRow = getRowFrom(meta.getAcceptingStepName()); while (fileRow!=null) { if (idx<0) { idx = fileRow.searchValueIndex(meta.getAcceptingField()); if (idx<0) { logError(Messages.getString("TextFileInput.Log.Error.UnableToFindFilenameField", meta.getAcceptingField())); setErrors(1); stopAll(); return false; } } Value fileValue = fileRow.getValue(idx); data.files.addFile(new File(fileValue.getString())); // Grab another row fileRow = getRowFrom(meta.getAcceptingStepName()); } if (data.files.nrOfFiles()==0) { logBasic(Messages.getString("TextFileInput.Log.Error.NoFilesSpecified")); return false; } } handleMissingFiles(); debug = "first"; first = false; // Open the first file & read the required rows in the buffer, stop // if it fails... if (!openNextFile()) { closeLastFile(); setOutputDone(); return false; } debug = "first repeat fields"; // Count the number of repeat fields... for (int i = 0; i < meta.getInputFields().length; i++) { if (meta.getInputFields()[i].isRepeated()) data.nr_repeats++; } } else { if (!data.doneReading) { int repeats = 1; if (meta.isLineWrapped()) repeats = meta.getNrWraps() > 0 ? meta.getNrWraps() : repeats; // Read a number of lines... for (int i = 0; i < repeats && !data.doneReading; i++) { debug = "get a new line of data"; String line = getLine(log, data.isr, meta.getFileFormat()); // Get one line of data; if (line != null) { linesInput++; lineNumberInFile++; // Filter row? boolean isFilterLastLine = false; boolean filterOK = checkFilterRow(line, isFilterLastLine); if (filterOK) { // logRowlevel("LINE READ: "+line); data.lineBuffer.add(new TextFileLine(line, lineNumberInFile, data.file)); } else { if (isFilterLastLine) { data.doneReading = true; } repeats++; // grab another line, this one got filtered } } else { data.doneReading = true; } } } } /* If the buffer is empty: open the next file. * (if nothing in there, open the next, etc.) */ while (data.lineBuffer.size() == 0) { debug = "empty buffer: open next file"; if (!openNextFile()) // Open fails: done processing! { debug = "empty buffer: close last file"; closeLastFile(); setOutputDone(); // signal end to receiver(s) return false; } } /* Take the first line available in the buffer & remove the line from the buffer */ debug = "take first line of buffer"; TextFileLine textLine = (TextFileLine) data.lineBuffer.get(0); debug = "remove first line of buffer"; data.lineBuffer.remove(0); if (meta.isLayoutPaged()) { debug = "paged layout"; /* Different rules apply: on each page: a header a number of data lines a footer */ if (!data.doneWithHeader && data.pageLinesRead == 0) // We are reading header lines { debug = "paged layout : header line " + data.headerLinesRead; if (log.isRowLevel()) logRowlevel("P-HEADER (" + data.headerLinesRead + ") : " + textLine.line); data.headerLinesRead++; if (data.headerLinesRead >= meta.getNrHeaderLines()) { data.doneWithHeader = true; } } else // data lines or footer on a page { debug = "paged layout : data or footer"; if (data.pageLinesRead < meta.getNrLinesPerPage()) { // See if we are dealing with wrapped lines: if (meta.isLineWrapped()) { for (int i = 0; i < meta.getNrWraps(); i++) { String extra = ""; if (data.lineBuffer.size() > 0) { extra = ((TextFileLine) data.lineBuffer.get(0)).line; data.lineBuffer.remove(0); } textLine.line += extra; } } debug = "paged layout : data line"; if (log.isRowLevel()) logRowlevel("P-DATA: " + textLine.line); // Read a normal line on a page of data. data.pageLinesRead++; r = convertLineToRow(log, textLine, meta, data.df, data.dfs, data.daf, data.dafs, data.filename, linesWritten + 1, data.dataErrorLineHandler); if (r != null) putrow = true; } else // done reading the data lines, skip the footer lines { debug = "paged layout : footer line"; if (meta.hasFooter() && data.footerLinesRead < meta.getNrFooterLines()) { if (log.isRowLevel()) logRowlevel("P-FOOTER: " + textLine.line); data.footerLinesRead++; } if (!meta.hasFooter() || data.footerLinesRead >= meta.getNrFooterLines()) { debug = "paged layout : end of page: restart"; /* OK, we are done reading the footer lines, start again on 'next page' with the header */ data.doneWithHeader = false; data.headerLinesRead = 0; data.pageLinesRead = 0; data.footerLinesRead = 0; if (log.isRowLevel()) logRowlevel("RESTART PAGE"); } } } } else // A normal data line, can also be a header or a footer line { debug = "normal"; if (!data.doneWithHeader) // We are reading header lines { debug = "normal : header line"; data.headerLinesRead++; if (data.headerLinesRead >= meta.getNrHeaderLines()) { data.doneWithHeader = true; } } else { debug = "normal : data and footer"; /* IF we are done reading and we have a footer AND the number of lines in the buffer is smaller then the number of footer lines THEN we can remove the remaining rows from the buffer: they are all footer rows. */ if (data.doneReading && meta.hasFooter() && data.lineBuffer.size() < meta.getNrFooterLines()) { debug = "normal : footer"; data.lineBuffer.clear(); } else // Not yet a footer line: it's a normal data line. { // See if we are dealing with wrapped lines: if (meta.isLineWrapped()) { for (int i = 0; i < meta.getNrWraps(); i++) { String extra = ""; if (data.lineBuffer.size() > 0) { extra = ((TextFileLine) data.lineBuffer.get(0)).line; data.lineBuffer.remove(0); } textLine.line += extra; } } debug = "normal : data"; if (data.filePlayList.isProcessingNeeded(textLine.file, textLine.lineNumber, AbstractFileErrorHandler.NO_PARTS)) { r = convertLineToRow(log, textLine, meta, data.df, data.dfs, data.daf, data.dafs, data.filename, linesWritten + 1, data.dataErrorLineHandler); if (r != null) { // System.out.println("Found data row: "+r); putrow = true; } } else putrow = false; } } } if (putrow && r != null && !r.isIgnored()) { // See if the previous values need to be repeated! if (data.nr_repeats > 0) { debug = "repeats"; if (data.previous_row == null) // First invocation... { debug = "init repeats"; data.previous_row = new Row(); for (int i = 0; i < meta.getInputFields().length; i++) { if (meta.getInputFields()[i].isRepeated()) { Value value = r.getValue(i); data.previous_row.addValue(new Value(value)); // Copy // the // first // row } } } else { debug = "check repeats"; int repnr = 0; for (int i = 0; i < meta.getInputFields().length; i++) { if (meta.getInputFields()[i].isRepeated()) { Value value = r.getValue(i); if (value.isNull()) // if it is empty: take the // previous value! { Value prev = data.previous_row.getValue(repnr); r.removeValue(i); r.addValue(i, prev); } else // not empty: change the previous_row entry! { data.previous_row.removeValue(repnr); data.previous_row.addValue(repnr, new Value(value)); } repnr++; } } } } if (log.isRowLevel()) logRowlevel("Putting row: " + r.toString()); putRow(r); } if ((linesInput > 0) && (linesInput % Const.ROWS_UPDATE) == 0) logBasic("linenr " + linesInput); debug = "end of readRowOfData"; return retval; } | 58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/b8c6b02ffc35cf6ae44d1cb0cdf4ecec0144af21/TextFileInput.java/clean/kettle/src/be/ibridge/kettle/trans/step/textfileinput/TextFileInput.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1207,
1999,
12,
4160,
2781,
1358,
3029,
77,
16,
8693,
751,
1358,
272,
3211,
13,
1216,
1475,
278,
5929,
503,
202,
95,
202,
202,
1999,
436,
273,
446,
31,
202,
202,
6494,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1207,
1999,
12,
4160,
2781,
1358,
3029,
77,
16,
8693,
751,
1358,
272,
3211,
13,
1216,
1475,
278,
5929,
503,
202,
95,
202,
202,
1999,
436,
273,
446,
31,
202,
202,
6494,
... | |
public SequenceIterator iterate(XPathContext xpathContext) throws XPathException { // Get instance id final Expression contextIdExpression = (argument == null || argument.length == 0) ? null : argument[0]; final String contextId = (contextIdExpression == null) ? null : XFormsUtils.namespaceId(getXFormsContainingDocument(), contextIdExpression.evaluateAsString(xpathContext)); // Get context for id final XFormsControls xformsControls = getXFormsControls(); final List currentNodeset = xformsControls.getContextForId(contextId); return new ListIterator(currentNodeset); // Build results by wrapping each node// final List results = new ArrayList(currentNodeset.size());//// for (Iterator k = currentNodeset.iterator(); k.hasNext();) {// final Node currentNode = (Node) k.next();// results.add(xformsControls.getInstanceForNode(currentNode).wrapNode(currentNode));// }//// return new ListIterator(results); } | 52783 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52783/ec3dbe800a2b452f9fb2283660e00ef34f4c320f/XXFormsContext.java/buggy/src/java/org/orbeon/oxf/xforms/function/xxforms/XXFormsContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8370,
3198,
7401,
12,
14124,
1042,
6748,
1042,
13,
1216,
10172,
503,
288,
3639,
368,
968,
791,
612,
3639,
727,
5371,
819,
548,
2300,
273,
261,
3446,
422,
446,
747,
1237,
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,
8370,
3198,
7401,
12,
14124,
1042,
6748,
1042,
13,
1216,
10172,
503,
288,
3639,
368,
968,
791,
612,
3639,
727,
5371,
819,
548,
2300,
273,
261,
3446,
422,
446,
747,
1237,
18,
2469,
... | ||
installationService.doInstallSharedLibrary(tmp, root.getSharedLibrary()); | installationService.doInstallSharedLibrary(tmpDir, root.getSharedLibrary()); | public void updateArchive(String location, ArchiveEntry entry, boolean autoStart) throws DeploymentException{ File tmp=AutoDeploymentService.unpackLocation(environmentContext.getTmpDir(),location); Descriptor root = DescriptorFactory.buildDescriptor(tmp); if (root != null) { try{ container.getBroker().suspend(); if (root.getComponent() != null) { String componentName = root.getComponent().getIdentification().getName(); entry.type = "component"; entry.name = componentName; installationService.unloadInstaller(componentName, true); installationService.install(tmp, root, autoStart); checkPendingSAs(); } else if (root.getSharedLibrary() != null) { String libraryName = root.getSharedLibrary().getIdentification().getName(); entry.type = "component"; entry.name = libraryName; installationService.doInstallSharedLibrary(tmp, root.getSharedLibrary()); } else if (root.getServiceAssembly() != null) { ServiceAssembly sa = root.getServiceAssembly(); String name = sa.getIdentification().getName(); entry.type = "assembly"; entry.name = name; try { if (deploymentService.isSaDeployed(name)) { deploymentService.shutDown(name); deploymentService.undeploy(name); deploymentService.deployServiceAssembly(tmp, sa); if (autoStart) { deploymentService.start(name); } } else { // see if components are installed entry.componentNames = getComponentNames(sa); String missings = null; boolean canDeploy = true; for (Iterator it = entry.componentNames.iterator(); it.hasNext();) { String componentName = (String) it.next(); if (container.getComponent(componentName) == null) { canDeploy = false; if (missings != null) { missings += ", " + componentName; } else { missings = componentName; } } } if (canDeploy) { deploymentService.deployServiceAssembly(tmp, sa); if (autoStart){ deploymentService.start(name); } } else { // TODO: check that the assembly is not already pending entry.pending = true; log.info("Components " + missings + " are not installed yet - adding ServiceAssembly " + name + " to pending list"); pendingSAs.put(tmp, entry); } } } catch (Exception e) { String errStr="Failed to update Service Assembly: "+name; log.error(errStr,e); throw new DeploymentException(errStr,e); } } } finally { container.getBroker().resume(); } } } | 6264 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6264/dd64fcde8b086a270c1c6f686791e209b7f0cce7/AutoDeploymentService.java/clean/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
7465,
12,
780,
2117,
16,
13124,
1622,
1241,
16,
1250,
3656,
1685,
13,
1216,
8587,
503,
95,
3639,
1387,
1853,
33,
4965,
6733,
1179,
18,
17309,
2735,
12,
10274,
1042,
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,
1089,
7465,
12,
780,
2117,
16,
13124,
1622,
1241,
16,
1250,
3656,
1685,
13,
1216,
8587,
503,
95,
3639,
1387,
1853,
33,
4965,
6733,
1179,
18,
17309,
2735,
12,
10274,
1042,
18,
... |
(Errors) mv.getModel().get(BindException.ERROR_KEY_PREFIX + "user"); | (Errors) mv.getModel().get(BindException.MODEL_KEY_PREFIX + "user"); | public void testSignupUser() throws Exception { MockHttpServletRequest request = newPost("/signup.html"); request.addParameter("username", "self-registered"); request.addParameter("password", "Password1"); request.addParameter("confirmPassword", "Password1"); request.addParameter("firstName", "First"); request.addParameter("lastName", "Last"); request.addParameter("address.city", "Denver"); request.addParameter("address.province", "Colorado"); request.addParameter("address.country", "USA"); request.addParameter("address.postalCode", "80210"); request.addParameter("email", "self-registered@raibledesigns.com"); request.addParameter("website", "http://raibledesigns.com"); request.addParameter("passwordHint", "Password is one with you."); HttpServletResponse response = new MockHttpServletResponse(); SimpleSmtpServer server = SimpleSmtpServer.start(2525); ModelAndView mv = c.handleRequest(request, response); Errors errors = (Errors) mv.getModel().get(BindException.ERROR_KEY_PREFIX + "user"); assertTrue("no errors returned in model", errors == null); // verify an account information e-mail was sent server.stop(); assertTrue(server.getReceivedEmailSize() == 1); // verify that success messages are in the request assertNotNull(request.getSession().getAttribute("messages")); assertNotNull(request.getSession().getAttribute(Constants.REGISTERED)); } | 30015 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/30015/24e468222d23592c808bc2909b2f619f8372db1e/SignupControllerTest.java/clean/web/spring/src/test/java/org/appfuse/webapp/action/SignupControllerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2766,
416,
1299,
1435,
1216,
1185,
288,
3639,
7867,
2940,
18572,
590,
273,
394,
3349,
2932,
19,
2977,
416,
18,
2620,
8863,
3639,
590,
18,
1289,
1662,
2932,
5053,
3113,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2766,
416,
1299,
1435,
1216,
1185,
288,
3639,
7867,
2940,
18572,
590,
273,
394,
3349,
2932,
19,
2977,
416,
18,
2620,
8863,
3639,
590,
18,
1289,
1662,
2932,
5053,
3113,
31... |
if (curGlobalSingleton == appHandle) curGlobalSingleton = null; else if (curScopedSingleton == appHandle) curScopedSingleton = null; else if (((EclipseAppDescriptor)appHandle.getApplicationDescriptor()).getCardinalityType() == EclipseAppDescriptor.FLAG_CARD_LIMITED) { if (curLimited != null) { ArrayList limited = (ArrayList) curLimited.get(((EclipseAppDescriptor)appHandle.getApplicationDescriptor()).getApplicationId()); | if (activeGlobalSingleton == appHandle) activeGlobalSingleton = null; else if (activeScopedSingleton == appHandle) activeScopedSingleton = null; else if (((EclipseAppDescriptor) appHandle.getApplicationDescriptor()).getCardinalityType() == EclipseAppDescriptor.FLAG_CARD_LIMITED) { if (activeLimited != null) { ArrayList limited = (ArrayList) activeLimited.get(((EclipseAppDescriptor) appHandle.getApplicationDescriptor()).getApplicationId()); | synchronized void unlock(EclipseAppHandle appHandle) { if (curGlobalSingleton == appHandle) curGlobalSingleton = null; else if (curScopedSingleton == appHandle) curScopedSingleton = null; else if (((EclipseAppDescriptor)appHandle.getApplicationDescriptor()).getCardinalityType() == EclipseAppDescriptor.FLAG_CARD_LIMITED) { if (curLimited != null) { ArrayList limited = (ArrayList) curLimited.get(((EclipseAppDescriptor)appHandle.getApplicationDescriptor()).getApplicationId()); if (limited != null) limited.remove(appHandle); } } if (curMain == appHandle) curMain = null; if (curHandles.remove(appHandle)) refreshAppDescriptors(); // only refresh descriptors if we really unlocked something } | 13530 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13530/69e29887bf68f7503d8dc0d191acd678768e0b0e/EclipseAppContainer.java/clean/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppContainer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
22043,
918,
7186,
12,
23057,
10472,
3371,
3259,
595,
3259,
13,
288,
202,
202,
430,
261,
1397,
5160,
19571,
422,
595,
3259,
13,
1082,
202,
1397,
5160,
19571,
273,
446,
31,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
22043,
918,
7186,
12,
23057,
10472,
3371,
3259,
595,
3259,
13,
288,
202,
202,
430,
261,
1397,
5160,
19571,
422,
595,
3259,
13,
1082,
202,
1397,
5160,
19571,
273,
446,
31,
202,
202,
... |
public org.quickfix.field.StrikeCurrency getStrikeCurrency() throws FieldNotFound { org.quickfix.field.StrikeCurrency value = new org.quickfix.field.StrikeCurrency(); | public quickfix.field.StrikeCurrency getStrikeCurrency() throws FieldNotFound { quickfix.field.StrikeCurrency value = new quickfix.field.StrikeCurrency(); | public org.quickfix.field.StrikeCurrency getStrikeCurrency() throws FieldNotFound { org.quickfix.field.StrikeCurrency value = new org.quickfix.field.StrikeCurrency(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/QuoteResponse.java/clean/src/java/src/quickfix/fix44/QuoteResponse.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
1585,
2547,
7623,
24017,
2547,
7623,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
1585,
2547,
7623,
460,
273,
394,
2358,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
1585,
2547,
7623,
24017,
2547,
7623,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
1585,
2547,
7623,
460,
273,
394,
2358,... |
return new RubyString(recv.getRuntime(), System.getProperty("user.dir")); | return recv.getRuntime().newString(System.getProperty("user.dir")); | public static RubyString getwd(IRubyObject recv) { return new RubyString(recv.getRuntime(), System.getProperty("user.dir")); } | 1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyDir.java/buggy/src/org/jruby/RubyDir.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
780,
336,
3623,
12,
7937,
10340,
921,
10665,
13,
288,
3639,
327,
10665,
18,
588,
5576,
7675,
2704,
780,
12,
3163,
18,
588,
1396,
2932,
1355,
18,
1214,
7923,
1769,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
19817,
780,
336,
3623,
12,
7937,
10340,
921,
10665,
13,
288,
3639,
327,
10665,
18,
588,
5576,
7675,
2704,
780,
12,
3163,
18,
588,
1396,
2932,
1355,
18,
1214,
7923,
1769,
565,
... |
writer.startElement("detail"); writer.endElement(); | if (phase != PROCESS_HEADER_PHASE) { writer.startElement("detail"); writer.startElement(FAULT_NS_PREFIX +":error", new String[] { "xmlns:" +FAULT_NS_PREFIX, MONDRIAN_NAMESPACE }); writer.startElement("code"); writer.characters(code); writer.endElement(); writer.startElement("desc"); writer.characters(detail); writer.endElement(); writer.endElement(); writer.endElement(); } | protected byte[] handleFault(Throwable t, String charEncoding) { t = XmlaUtil.rootThrowable(t); ByteArrayOutputStream osBuf = new ByteArrayOutputStream(); try { SaxWriter writer = new DefaultSaxWriter(osBuf, charEncoding); writer.startDocument(); writer.startElement("SOAP-ENV:Fault", new String[]{ "xmlns:SOAP-ENV", NS_SOAP, }); writer.startElement("faultcode"); writer.characters(t.getClass().getName()); writer.endElement(); writer.startElement("faultstring"); writer.characters(t.getMessage()); writer.endElement(); writer.startElement("faultactor"); writer.characters("Mondrian"); writer.endElement(); writer.startElement("detail"); writer.endElement(); writer.endElement(); // </Fault> writer.endDocument(); } catch (UnsupportedEncodingException uee) { LOGGER.warn("This should be handled at begin of processing request", uee); } catch (Exception e) { LOGGER.error("Unexcepted runimt exception when handing SOAP fault :("); } return osBuf.toByteArray(); } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/41e43f806f666da1ff483ebb20820e61433739e2/DefaultXmlaServlet.java/buggy/src/main/mondrian/xmla/impl/DefaultXmlaServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1160,
8526,
1640,
7083,
12,
15155,
268,
16,
514,
1149,
4705,
13,
288,
3639,
268,
273,
5714,
69,
1304,
18,
3085,
15155,
12,
88,
1769,
3639,
11559,
1140,
5503,
273,
394,
11559,
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,
4750,
1160,
8526,
1640,
7083,
12,
15155,
268,
16,
514,
1149,
4705,
13,
288,
3639,
268,
273,
5714,
69,
1304,
18,
3085,
15155,
12,
88,
1769,
3639,
11559,
1140,
5503,
273,
394,
11559,
5621,
... |
public EditBindingAction(IWorkbenchPart part) { super(part); setId(ID); setText(Messages.getString("DesignerActionBarContributor.menu.element.editDataBinding")); } | public EditBindingAction( IWorkbenchPart part ) { super( part ); setId( ID ); setText( Messages.getString( "DesignerActionBarContributor.menu.element.editDataBinding" ) ); } | public EditBindingAction(IWorkbenchPart part) { super(part); setId(ID); setText(Messages.getString("DesignerActionBarContributor.menu.element.editDataBinding")); //$NON-NLS-1$ } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/b6cfb45854b21e148cd7d00999f1f6ebdd480335/EditBindingAction.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/editors/schematic/actions/EditBindingAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15328,
5250,
1803,
12,
45,
2421,
22144,
1988,
1087,
13,
565,
288,
3639,
2240,
12,
2680,
1769,
3639,
10446,
12,
734,
1769,
3639,
7883,
12,
5058,
18,
588,
780,
2932,
15478,
264,
1803,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15328,
5250,
1803,
12,
45,
2421,
22144,
1988,
1087,
13,
565,
288,
3639,
2240,
12,
2680,
1769,
3639,
10446,
12,
734,
1769,
3639,
7883,
12,
5058,
18,
588,
780,
2932,
15478,
264,
1803,... |
"InputImport.java:7: Avoid using the '.*' form of import.", "InputImport.java:7: Redundant import from the same package.", "InputImport.java:8: Redundant import from the same package.", "InputImport.java:9: Avoid using the '.*' form of import.", "InputImport.java:10: Avoid using the '.*' form of import.", "InputImport.java:10: Redundant import from the java.lang package.", "InputImport.java:11: Redundant import from the java.lang package.", "InputImport.java:13: Unused import - java.util.List", "InputImport.java:14: Duplicate import to line 13.", "InputImport.java:14: Unused import - java.util.List", | filepath + ":7: Avoid using the '.*' form of import.", filepath + ":7: Redundant import from the same package.", filepath + ":8: Redundant import from the same package.", filepath + ":9: Avoid using the '.*' form of import.", filepath + ":10: Avoid using the '.*' form of import.", filepath + ":10: Redundant import from the java.lang package.", filepath + ":11: Redundant import from the java.lang package.", filepath + ":13: Unused import - java.util.List", filepath + ":14: Duplicate import to line 13.", filepath + ":14: Unused import - java.util.List", | public void testImport() throws Exception { final Checker c = new Checker(mConfig, mStream); assertNotNull(c); final String[] expected = { "InputImport.java:7: Avoid using the '.*' form of import.", "InputImport.java:7: Redundant import from the same package.", "InputImport.java:8: Redundant import from the same package.", "InputImport.java:9: Avoid using the '.*' form of import.", "InputImport.java:10: Avoid using the '.*' form of import.", "InputImport.java:10: Redundant import from the java.lang package.", "InputImport.java:11: Redundant import from the java.lang package.", "InputImport.java:13: Unused import - java.util.List", "InputImport.java:14: Duplicate import to line 13.", "InputImport.java:14: Unused import - java.util.List", }; verify(c, "InputImport.java", expected); } | 31427 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31427/a6df885ae1a2b681c4d6f739aa190f622c6b4106/CheckerTest.java/buggy/src/tests/com/puppycrawl/tools/checkstyle/CheckerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
5010,
1435,
3639,
1216,
1185,
565,
288,
3639,
727,
31577,
276,
273,
394,
31577,
12,
81,
809,
16,
312,
1228,
1769,
3639,
25395,
12,
71,
1769,
3639,
727,
514,
8526,
2665,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5010,
1435,
3639,
1216,
1185,
565,
288,
3639,
727,
31577,
276,
273,
394,
31577,
12,
81,
809,
16,
312,
1228,
1769,
3639,
25395,
12,
71,
1769,
3639,
727,
514,
8526,
2665,
... |
if ((_tokenSet_2.member(LA(1)))) { | if ((_tokenSet_1.member(LA(1)))) { | public final void mCONST(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = CONST; int _saveIndex; switch ( LA(1)) { case '"': { _saveIndex=text.length(); match('"'); text.setLength(_saveIndex); { _loop66: do { if ((_tokenSet_1.member(LA(1)))) { { match(_tokenSet_1); } } else { break _loop66; } } while (true); } _saveIndex=text.length(); match('"'); text.setLength(_saveIndex); break; } case '\'': { _saveIndex=text.length(); match('\''); text.setLength(_saveIndex); { _loop69: do { if ((_tokenSet_2.member(LA(1)))) { { match(_tokenSet_2); } } else { break _loop69; } } while (true); } _saveIndex=text.length(); match('\''); text.setLength(_saveIndex); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/1c0cc42431436631d1b2e9ea8af63bb6dd883496/XPathLexer.java/buggy/src/org/exist/parser/XPathLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
312,
26411,
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,
2316,
33,
2011,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
312,
26411,
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,
2316,
33,
2011,
3... |
handleHTTPClientException(ex, out, targetRequest, usingWWWProxy, wwwProxy); | handleHTTPClientException(ex, out, targetRequest, usingWWWProxy, currentProxy); | protected void clientConnectionRun(Socket s) { OutputStream out = null; String targetRequest = null; boolean usingWWWProxy = false; InactivityTimeoutThread timeoutThread = null; try { out = s.getOutputStream(); BufferedReader br = new BufferedReader(new InputStreamReader(s.getInputStream(), "ISO-8859-1")); String line, method = null, protocol = null, host = null, destination = null; StringBuffer newRequest = new StringBuffer(); while ((line = br.readLine()) != null) { if (_log.shouldLog(Log.DEBUG)) _log.debug(getPrefix() + "Line=[" + line + "]"); if (line.startsWith("Connection: ") || line.startsWith("Keep-Alive: ") || line.startsWith("Proxy-Connection: ")) continue; if (method == null) { // first line (GET /base64/realaddr) if (_log.shouldLog(Log.DEBUG)) _log.debug(getPrefix() + "Method is null for [" + line + "]"); int pos = line.indexOf(" "); if (pos == -1) break; method = line.substring(0, pos); String request = line.substring(pos + 1); if (request.startsWith("/") && getTunnel().getClientOptions().getProperty("i2ptunnel.noproxy") != null) { request = "http://i2p" + request; } pos = request.indexOf("//"); if (pos == -1) { method = null; break; } protocol = request.substring(0, pos + 2); request = request.substring(pos + 2); targetRequest = request; pos = request.indexOf("/"); if (pos == -1) { method = null; break; } host = request.substring(0, pos); // Quick hack for foo.bar.i2p if (host.toLowerCase().endsWith(".i2p")) { destination = host; host = getHostName(destination); line = method + " " + request.substring(pos); } else if (host.indexOf(".") != -1) { // The request must be forwarded to a WWW proxy destination = wwwProxy; usingWWWProxy = true; if (_log.shouldLog(Log.DEBUG)) _log.debug(getPrefix() + "Host doesnt end with .i2p and it contains a period [" + host + "]: wwwProxy!"); } else { request = request.substring(pos + 1); pos = request.indexOf("/"); destination = request.substring(0, pos); line = method + " " + request.substring(pos); } boolean isValid = usingWWWProxy || isSupportedAddress(host, protocol); if (!isValid) { if (_log.shouldLog(Log.INFO)) _log.info(getPrefix() + "notValid(" + host + ")"); method = null; destination = null; break; } else if (!usingWWWProxy) { if (_log.shouldLog(Log.INFO)) _log.info(getPrefix() + "host=getHostName(" + destination + ")"); host = getHostName(destination); // hide original host } if (_log.shouldLog(Log.DEBUG)) { _log.debug(getPrefix() + "METHOD:" + method + ":"); _log.debug(getPrefix() + "PROTOC:" + protocol + ":"); _log.debug(getPrefix() + "HOST :" + host + ":"); _log.debug(getPrefix() + "DEST :" + destination + ":"); } } else { if (line.startsWith("Host: ") && !usingWWWProxy) { line = "Host: " + host; if (_log.shouldLog(Log.INFO)) _log.info(getPrefix() + "Setting host = " + host); } } if (line.length() == 0) { newRequest.append("Connection: close\r\n\r\n"); break; } else { newRequest.append(line).append("\r\n"); // HTTP spec } } if (_log.shouldLog(Log.DEBUG)) _log.debug(getPrefix() + "NewRequest header: [" + newRequest.toString() + "]"); while (br.ready()) { // empty the buffer (POST requests) int i = br.read(); if (i != -1) { newRequest.append((char) i); } } if (method == null || destination == null) { l.log("No HTTP method found in the request."); if (out != null) { out.write(ERR_REQUEST_DENIED); out.write("<p /><i>Generated on: ".getBytes()); out.write(new Date().toString().getBytes()); out.write("</i></body></html>\n".getBytes()); out.flush(); } s.close(); return; } if (_log.shouldLog(Log.DEBUG)) _log.debug(getPrefix() + "Destination: " + destination); Destination dest = I2PTunnel.destFromName(destination); if (dest == null) { l.log("Could not resolve " + destination + "."); if (_log.shouldLog(Log.WARN)) _log.warn("Unable to resolve " + destination + " (proxy? " + usingWWWProxy + ", request: " + targetRequest); writeErrorMessage(ERR_DESTINATION_UNKNOWN, out, targetRequest, usingWWWProxy, destination); s.close(); return; } String remoteID; I2PSocket i2ps = createI2PSocket(dest); byte[] data = newRequest.toString().getBytes("ISO-8859-1"); I2PTunnelRunner runner = new I2PTunnelRunner(s, i2ps, sockLock, data); timeoutThread = new InactivityTimeoutThread(runner, out, targetRequest, usingWWWProxy, s); timeoutThread.start(); } catch (SocketException ex) { if (timeoutThread != null) timeoutThread.disable(); _log.info(getPrefix() + "Error trying to connect", ex); l.log(ex.getMessage()); handleHTTPClientException(ex, out, targetRequest, usingWWWProxy, wwwProxy); closeSocket(s); } catch (IOException ex) { if (timeoutThread != null) timeoutThread.disable(); _log.info(getPrefix() + "Error trying to connect", ex); l.log(ex.getMessage()); handleHTTPClientException(ex, out, targetRequest, usingWWWProxy, wwwProxy); closeSocket(s); } catch (I2PException ex) { if (timeoutThread != null) timeoutThread.disable(); _log.info("getPrefix() + Error trying to connect", ex); l.log(ex.getMessage()); handleHTTPClientException(ex, out, targetRequest, usingWWWProxy, wwwProxy); closeSocket(s); } } | 45677 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45677/cdb4576bd72401095510b903ee1e9e77bc207bec/I2PTunnelHTTPClient.java/clean/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1004,
1952,
1997,
12,
4534,
272,
13,
288,
3639,
8962,
596,
273,
446,
31,
3639,
514,
1018,
691,
273,
446,
31,
3639,
1250,
1450,
19989,
59,
3886,
273,
629,
31,
3639,
657,
9653,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1004,
1952,
1997,
12,
4534,
272,
13,
288,
3639,
8962,
596,
273,
446,
31,
3639,
514,
1018,
691,
273,
446,
31,
3639,
1250,
1450,
19989,
59,
3886,
273,
629,
31,
3639,
657,
9653,... |
_interactionsPane.setCursor(null); | _interactionsPane.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR)); | private void _compile() { final SwingWorker worker = new SwingWorker() { public Object construct() { try { _interactionsPane.setEditable(false); _interactionsPane.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); _model.getActiveDocument().startCompile(); _interactionsPane.setCursor(null); _interactionsPane.setEditable(true); } catch (IOException ioe) { _showIOError(ioe); } return null; } }; worker.start(); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/e782d4da2d7bff038017015047af677bda357a17/MainFrame.java/buggy/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
389,
11100,
1435,
288,
565,
727,
26145,
6671,
4322,
273,
394,
26145,
6671,
1435,
288,
1377,
1071,
1033,
4872,
1435,
288,
3639,
775,
288,
1850,
389,
2761,
4905,
8485,
18,
542,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
389,
11100,
1435,
288,
565,
727,
26145,
6671,
4322,
273,
394,
26145,
6671,
1435,
288,
1377,
1071,
1033,
4872,
1435,
288,
3639,
775,
288,
1850,
389,
2761,
4905,
8485,
18,
542,
1... |
int ifIndex = dbIpIfEntry.getIfIndex(); | private void updateSnmpInfo(Connection dbc, DbNodeEntry node, DbIpInterfaceEntry dbIpIfEntry, IfSnmpCollector snmpc) throws SQLException { Category log = ThreadCategory.getInstance(getClass()); InetAddress ifaddr = dbIpIfEntry.getIfAddress(); /* * If SNMP info is available update the snmpInterface table entry with * anything that has changed. */ int ifIndex = dbIpIfEntry.getIfIndex(); if (snmpc != null && !snmpc.failed() && ifIndex != -1) { if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: updating snmp interface for nodeId/ifIndex=" + +node.getNodeId() + "/" + ifIndex); } // Create and load SNMP Interface entry from the database boolean newSnmpIfTableEntry = false; DbSnmpInterfaceEntry dbSnmpIfEntry = DbSnmpInterfaceEntry.get(dbc, node.getNodeId(), ifIndex); if (dbSnmpIfEntry == null) { /* * SNMP Interface not found with this nodeId, create new * interface */ if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: SNMP interface index " + ifIndex + " not in database, creating new interface object."); } dbSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); newSnmpIfTableEntry = true; } /* * Create SNMP interface entry representing latest information * retrieved for the interface via the collector */ DbSnmpInterfaceEntry currSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); // Find the ifTable entry for this interface IfTable ift = snmpc.getIfTable(); Iterator ifiter = ift.getEntries().iterator(); IfTableEntry ifte = null; while (ifiter.hasNext()) { ifte = (IfTableEntry) ifiter.next(); // index Integer sint = ifte.getIfIndex(); if (sint != null) { if (ifIndex == sint.intValue()) { break; } else { ifte = null; } } } // Make sure we have a valid IfTableEntry object if (ifte == null && ifIndex == CapsdConfigFactory.LAME_SNMP_HOST_IFINDEX) { currSnmpIfEntry.setIfAddress(snmpc.getCollectorTargetAddress()); if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: interface " + snmpc.getCollectorTargetAddress().getHostAddress() + " appears to be a lame SNMP host. Setting ipaddr only."); } } else if (ifte != null) { /* * IP address and netmask * * WARNING: IfSnmpCollector.getIfAddressAndMask() ONLY returns * the FIRST IP address and mask for a given interface as * specified in the ipAddrTable. */ InetAddress[] aaddrs = snmpc.getIfAddressAndMask(ifIndex); // Address array should NEVER be null but just in case.. if (aaddrs == null) { log.warn("updateSnmpInfo: unable to retrieve address and netmask for nodeId/ifIndex: " + node.getNodeId() + "/" + ifIndex); aaddrs = new InetAddress[2]; // Set interface address to current interface aaddrs[0] = ifaddr; // Set netmask to NULL aaddrs[1] = null; } // IP address currSnmpIfEntry.setIfAddress(aaddrs[0]); // netmask if (aaddrs[1] != null) { if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: interface " + aaddrs[0].getHostAddress() + " has netmask: " + aaddrs[1].getHostAddress()); } currSnmpIfEntry.setNetmask(aaddrs[1]); } // type Integer sint = ifte.getIfType(); currSnmpIfEntry.setType(sint.intValue()); // description String str = ifte.getIfDescr(); if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: " + ifaddr + " has ifDescription: " + str); } if (str != null && str.length() > 0) { currSnmpIfEntry.setDescription(str); } String physAddr = ifte.getPhysAddr(); if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: " + ifaddr + " has phys address: -" + physAddr + "-"); } if (physAddr != null && physAddr.length() == 12) { currSnmpIfEntry.setPhysicalAddress(physAddr); } // speed Long uint = ifte.getIfSpeed(); //set the default speed to 10MB if not retrievable. currSnmpIfEntry.setSpeed((uint == null ? 10000000L : uint.longValue())); // admin status sint = ifte.getIfAdminStatus(); currSnmpIfEntry.setAdminStatus(sint.intValue()); // oper status sint = ifte.getIfOperStatus(); currSnmpIfEntry.setOperationalStatus(sint.intValue()); // name (from interface extensions table) String ifName = snmpc.getIfName(ifIndex); if (ifName != null && ifName.length() > 0) { currSnmpIfEntry.setName(ifName); } // alias (from interface extensions table) String ifAlias = snmpc.getIfAlias(ifIndex); if (ifAlias != null) { currSnmpIfEntry.setAlias(ifAlias); } else { currSnmpIfEntry.setAlias(""); } } // end if valid ifTable entry // Update any fields which have changed // dbSnmpIfEntry.updateIfIndex(currSnmpIfEntry.getIfIndex()); dbSnmpIfEntry.updateIfAddress(currSnmpIfEntry.getIfAddress()); dbSnmpIfEntry.updateNetmask(currSnmpIfEntry.getNetmask()); dbSnmpIfEntry.updatePhysicalAddress(currSnmpIfEntry.getPhysicalAddress()); dbSnmpIfEntry.updateDescription(currSnmpIfEntry.getDescription()); dbSnmpIfEntry.updateName(currSnmpIfEntry.getName()); dbSnmpIfEntry.updateType(currSnmpIfEntry.getType()); dbSnmpIfEntry.updateSpeed(currSnmpIfEntry.getSpeed()); dbSnmpIfEntry.updateAdminStatus(currSnmpIfEntry.getAdminStatus()); dbSnmpIfEntry.updateOperationalStatus(currSnmpIfEntry.getOperationalStatus()); dbSnmpIfEntry.updateAlias(currSnmpIfEntry.getAlias()); /* * If this is a new interface or if any of the following * key fields have changed set the m_snmpIfTableChangedFlag * variable to TRUE. This will potentially trigger an event * which will cause the poller to reinitialize the primary * SNMP interface for the node. */ // dbSnmpIfEntry.hasIfIndexChanged() || if (!m_snmpIfTableChangedFlag && newSnmpIfTableEntry || dbSnmpIfEntry.hasIfAddressChanged() || dbSnmpIfEntry.hasTypeChanged() || dbSnmpIfEntry.hasNameChanged() || dbSnmpIfEntry.hasDescriptionChanged() || dbSnmpIfEntry.hasPhysicalAddressChanged() || dbSnmpIfEntry.hasAliasChanged()) { m_snmpIfTableChangedFlag = true; } // Update the database dbSnmpIfEntry.store(dbc); // end if complete snmp info available } else if (snmpc != null && snmpc.hasIpAddrTable() && ifIndex != -1) { if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: updating snmp interface for nodeId/ifIndex/ipAddr=" + +node.getNodeId() + "/" + ifIndex + "/" + ifaddr + " based on ipAddrTable only - No ifTable available"); } // Create and load SNMP Interface entry from the database boolean newSnmpIfTableEntry = false; DbSnmpInterfaceEntry dbSnmpIfEntry = DbSnmpInterfaceEntry.get(dbc, node.getNodeId(), ifIndex); if (dbSnmpIfEntry == null) { /* * SNMP Interface not found with this nodeId, create new * interface */ if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: SNMP interface index " + ifIndex + " not in database, creating new interface object."); } dbSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); newSnmpIfTableEntry = true; } /* * Create SNMP interface entry representing latest information * retrieved for the interface via the collector */ DbSnmpInterfaceEntry currSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); // IP address currSnmpIfEntry.setIfAddress(ifaddr); // Update any fields which have changed dbSnmpIfEntry.updateIfAddress(currSnmpIfEntry.getIfAddress()); // Update the database dbSnmpIfEntry.store(dbc); // end if partial snmp info available } else if (snmpc != null) { // allow for lame snmp hosts with no ipAddrTable ifIndex = CapsdConfigFactory.LAME_SNMP_HOST_IFINDEX; if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: updating snmp interface for nodeId/ipAddr=" + +node.getNodeId() + "/" + ifaddr + " based on ip address only - No ipAddrTable available"); } // Create and load SNMP Interface entry from the database boolean newSnmpIfTableEntry = false; DbSnmpInterfaceEntry dbSnmpIfEntry = DbSnmpInterfaceEntry.get(dbc, node.getNodeId(), ifIndex); if (dbSnmpIfEntry == null) { /* * SNMP Interface not found with this nodeId, create new * interface */ if (log.isDebugEnabled()) { log.debug("updateSnmpInfo: SNMP interface index " + ifIndex + " not in database, creating new interface object."); } dbSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); newSnmpIfTableEntry = true; } /* * Create SNMP interface entry representing latest information * retrieved for the interface via the collector */ DbSnmpInterfaceEntry currSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); // IP address currSnmpIfEntry.setIfAddress(ifaddr); // Update any fields which have changed dbSnmpIfEntry.updateIfAddress(currSnmpIfEntry.getIfAddress()); // Update the database dbSnmpIfEntry.store(dbc); } } | 48885 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48885/2d7d01a6c8884e6784a932ca6408a4304fe577cf/RescanProcessor.java/buggy/opennms-services/src/main/java/org/opennms/netmgt/capsd/RescanProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
10461,
1291,
966,
12,
1952,
9881,
16,
8408,
907,
1622,
756,
16,
8408,
5273,
1358,
1622,
1319,
5273,
2047,
1622,
16,
971,
10461,
1291,
7134,
15366,
71,
13,
1216,
6483,
288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
10461,
1291,
966,
12,
1952,
9881,
16,
8408,
907,
1622,
756,
16,
8408,
5273,
1358,
1622,
1319,
5273,
2047,
1622,
16,
971,
10461,
1291,
7134,
15366,
71,
13,
1216,
6483,
288... | |
log.debug( "No category accession value for '" + characteristic.getCategory() + "'" ); | if ( log.isDebugEnabled() ) log.debug( "No category accession value for '" + characteristic.getCategory() + "'" ); | private void specialFillInCharacteristicOntologyEntries( Characteristic characteristic, Element elm ) { assert mgedOntologyHelper != null; if ( characteristic == null ) { log.warn( "Null characteristic passed, ignoring" ); return; } if ( characteristic.getCategory() == null ) throw new IllegalArgumentException( "Category cannot be null" ); boolean isCategoryMo = false; boolean isValueMo = false; boolean hasCategoryAcc = false; boolean hasValueAcc = false; String categoryDb = elm.valueOf( "@CategoryDatabaseIdentifier" ); String categoryAcc = elm.valueOf( "@CategoryDatabaseAccession" ); String valueDb = elm.valueOf( "@ValueDatabaseIdentifier" ); String valueAcc = elm.valueOf( "@ValueDatabaseAccession" ); if ( categoryDb.length() > 0 ) { isCategoryMo = this.mgedOntologyAliases.contains( categoryDb ); if ( isCategoryMo ) { categoryDb = MGED_DATABASE_IDENTIFIER; } } else if ( mgedOntologyHelper.classExists( characteristic.getCategory() ) ) { isCategoryMo = true; categoryDb = MGED_DATABASE_IDENTIFIER; } else { log.debug( "No category database for '" + characteristic.getCategory() + "'" ); } if ( categoryAcc.length() > 0 ) { if ( isCategoryMo ) { categoryAcc = formMgedOntologyAccession( categoryAcc ); } } else if ( isCategoryMo ) { categoryAcc = formMgedOntologyAccession( characteristic.getCategory() ); } else { hasCategoryAcc = false; log.debug( "No category accession value for '" + characteristic.getCategory() + "'" ); } if ( characteristic.getValue().length() > 0 ) { if ( valueDb.length() > 0 ) { isValueMo = this.mgedOntologyAliases.contains( valueDb ); if ( isValueMo ) { valueDb = MGED_DATABASE_IDENTIFIER; } } else if ( isCategoryMo && mgedOntologyHelper.getInstanceNamesForClass( characteristic.getCategory() ) != null && mgedOntologyHelper.getInstanceNamesForClass( characteristic.getCategory() ).contains( characteristic.getValue() ) ) { isValueMo = true; valueDb = MGED_DATABASE_IDENTIFIER; } else if ( isCategoryMo ) { String instanceCategory = this.mgedOntologyHelper.getClassNameForInstance( characteristic.getValue() ); if ( instanceCategory != null ) { log.debug( "'" + characteristic.getValue() + "' is actually an instance of '" + instanceCategory + "', not '" + characteristic.getCategory() + "', but we just go with the flow." ); isValueMo = true; valueDb = MGED_DATABASE_IDENTIFIER; } else { log.debug( "No value database available for '" + characteristic.getValue() + "'" ); } } else { log.debug( "No value database available for '" + characteristic.getValue() + "'" ); } if ( valueAcc.length() > 0 ) { if ( isValueMo ) { valueAcc = formMgedOntologyAccession( valueAcc ); } } else if ( isValueMo ) { valueAcc = formMgedOntologyAccession( characteristic.getValue() ); } else { hasValueAcc = false; } } if ( hasCategoryAcc ) { ExternalDatabase categoryExternalDatabase = ExternalDatabase.Factory.newInstance(); categoryExternalDatabase.setName( categoryDb ); ubic.gemma.model.common.description.OntologyEntry categoryOntologyEntry = ubic.gemma.model.common.description.OntologyEntry.Factory .newInstance(); categoryOntologyEntry.setAccession( categoryAcc ); categoryOntologyEntry.setExternalDatabase( categoryExternalDatabase ); categoryOntologyEntry.setCategory( characteristic.getCategory() ); categoryOntologyEntry.setValue( characteristic.getCategory() ); characteristic.setCategoryTerm( categoryOntologyEntry ); } if ( hasValueAcc ) { ExternalDatabase valueExternalDatabase = ExternalDatabase.Factory.newInstance(); valueExternalDatabase.setName( valueDb ); ubic.gemma.model.common.description.OntologyEntry valueOntologyEntry = ubic.gemma.model.common.description.OntologyEntry.Factory .newInstance(); valueOntologyEntry.setAccession( valueAcc ); valueOntologyEntry.setExternalDatabase( valueExternalDatabase ); valueOntologyEntry.setCategory( characteristic.getValue() ); valueOntologyEntry.setValue( characteristic.getValue() ); characteristic.setValueTerm( valueOntologyEntry ); } log.debug( "Category: '" + characteristic.getCategory() + "' Value: '" + characteristic.getValue() + "' CatDb: '" + categoryDb + "' ValDb: '" + valueDb + "' CatAcc: '" + categoryAcc + "' ValAcc: " + valueAcc ); } | 4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/3c425ed09e57d6c9d829aedb2fb6033a1097bae8/MageMLConverterHelper.java/buggy/gemma-core/src/main/java/ubic/gemma/loader/expression/mage/MageMLConverterHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4582,
8026,
382,
7069,
5846,
51,
19610,
5400,
12,
6577,
5846,
23158,
16,
3010,
12531,
262,
288,
3639,
1815,
312,
2423,
51,
19610,
2276,
480,
446,
31,
3639,
309,
261,
23158,
422... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4582,
8026,
382,
7069,
5846,
51,
19610,
5400,
12,
6577,
5846,
23158,
16,
3010,
12531,
262,
288,
3639,
1815,
312,
2423,
51,
19610,
2276,
480,
446,
31,
3639,
309,
261,
23158,
422... |
return RubyString.newString(getRuntime(), str.substring(0, begin[0])); | return getRuntime().newString(str.substring(0, begin[0])); | public RubyString pre_match() { return RubyString.newString(getRuntime(), str.substring(0, begin[0])); } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyMatchData.java/clean/src/org/jruby/RubyMatchData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
780,
675,
67,
1916,
1435,
288,
3639,
327,
18814,
7675,
2704,
780,
12,
701,
18,
28023,
12,
20,
16,
2376,
63,
20,
5717,
1769,
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,
19817,
780,
675,
67,
1916,
1435,
288,
3639,
327,
18814,
7675,
2704,
780,
12,
701,
18,
28023,
12,
20,
16,
2376,
63,
20,
5717,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
StringTokenizer strtok = new StringTokenizer((String) event.data, Const.CR); if (strtok.countTokens() == 1) { String entry = strtok.nextToken(); JobEntryCopy jge = chef.jobMeta.findJobEntry(entry, 0, true); | String xml = (String) event.data; try { DragAndDropContainer container = new DragAndDropContainer(xml); String entry = container.getData(); switch(container.getType()) { case DragAndDropContainer.TYPE_BASE_JOB_ENTRY: { JobEntryCopy jge = chef.newChefGraphEntry(entry, false); if (jge != null) { jge.setLocation(p.x, p.y); jge.setDrawn(); redraw(); } } break; case DragAndDropContainer.TYPE_JOB_ENTRY: { JobEntryCopy jge = chef.jobMeta.findJobEntry(entry, 0, true); if (jge != null) { if (jge.isStart() && jge.isDrawn()) { MessageBox mb = new MessageBox(shell, SWT.YES | SWT.ICON_ERROR); mb.setMessage(Messages.getString("ChefGraph.Dialog.OnlyUseStartOnce.Message")); mb.setText(Messages.getString("ChefGraph.Dialog.OnlyUseStartOnce.Title")); mb.open(); | public void drop(DropTargetEvent event) { // no data to copy, indicate failure in event.detail if (event.data == null) { event.detail = DND.DROP_NONE; return; } Point p = getRealPosition(canvas, event.x, event.y); StringTokenizer strtok = new StringTokenizer((String) event.data, Const.CR); if (strtok.countTokens() == 1) { String entry = strtok.nextToken(); //System.out.println("new entry: "+entry); JobEntryCopy jge = chef.jobMeta.findJobEntry(entry, 0, true); if (jge != null) // Create duplicate of existing entry { log.logDebug(toString(), "DROP "+jge.toString()+", type="+ JobEntryCopy.getTypeDesc(jge.getType())+", start="+jge.isStart()+", drawn="+jge.isDrawn()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ // There can be only 1 start! if (jge.isStart() && jge.isDrawn()) { MessageBox mb = new MessageBox(shell, SWT.YES | SWT.ICON_ERROR); mb.setMessage(Messages.getString("ChefGraph.Dialog.OnlyUseStartOnce.Message")); //$NON-NLS-1$ mb.setText(Messages.getString("ChefGraph.Dialog.OnlyUseStartOnce.Title")); //$NON-NLS-1$ mb.open(); return; } boolean jge_changed=false; // For undo : JobEntryCopy before = (JobEntryCopy)jge.clone_deep(); JobEntryCopy newjge = jge; if (jge.isDrawn()) { newjge = (JobEntryCopy)jge.clone(); if (newjge!=null) { // newjge.setEntry(jge.getEntry()); log.logDebug(toString(), "entry aft = "+((Object)jge.getEntry()).toString()); //$NON-NLS-1$ newjge.setNr(chef.jobMeta.findUnusedNr(newjge.getName())); chef.jobMeta.addJobEntry(newjge); chef.addUndoNew(new JobEntryCopy[] {newjge}, new int[] { chef.jobMeta.indexOfJobEntry(newjge)} ); } else { log.logDebug(toString(), "jge is not cloned!"); //$NON-NLS-1$ } } else { log.logDebug(toString(), jge.toString()+" is not drawn"); //$NON-NLS-1$ jge_changed=true; } newjge.setLocation(p.x, p.y); newjge.setDrawn(); if (jge_changed) { chef.addUndoChange(new JobEntryCopy[] { before }, new JobEntryCopy[] {newjge}, new int[] { chef.jobMeta.indexOfJobEntry(newjge)}); } redraw(); chef.refreshTree(); log.logBasic("DropTargetEvent", "DROP "+newjge.toString()+"!, type="+ JobEntryCopy.getTypeDesc(newjge.getType())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } else // Entry doesn't exist: create new one. { log.logDebug(toString(), "New entry of type ["+entry+"]"); //$NON-NLS-1$ //$NON-NLS-2$ jge = chef.newChefGraphEntry(entry, false); if (jge != null) { jge.setLocation(p.x, p.y); jge.setDrawn(); redraw(); } } } } | 58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/b92c1d5544fa9ac7984ecbc06531b4393629fc89/ChefGraph.java/clean/kettle/src/be/ibridge/kettle/chef/ChefGraph.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
3640,
12,
7544,
2326,
1133,
871,
13,
1875,
202,
95,
9506,
202,
759,
1158,
501,
358,
1610,
16,
10768,
5166,
316,
871,
18,
8992,
4697,
202,
430,
261,
2575,
18,
892,
422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
3640,
12,
7544,
2326,
1133,
871,
13,
1875,
202,
95,
9506,
202,
759,
1158,
501,
358,
1610,
16,
10768,
5166,
316,
871,
18,
8992,
4697,
202,
430,
261,
2575,
18,
892,
422,
... |
state = percStatusMap.get(e.getValue()); | state = (String) percStatusMap.get(e.getValue().toInt()); | public PollStatus poll(MonitoredService svc, Map parameters, org.opennms.netmgt.config.poller.Package pkg) { NetworkInterface iface = svc.getNetInterface(); PollStatus status = PollStatus.unavailable(); InetAddress ipaddr = (InetAddress) iface.getAddress(); // Retrieve this interface's SNMP peer object // SnmpAgentConfig agentConfig = (SnmpAgentConfig) iface.getAttribute(SNMP_AGENTCONFIG_KEY); if (agentConfig == null) throw new RuntimeException("SnmpAgentConfig object not available for interface " + ipaddr); // Get configuration parameters // // set timeout and retries on SNMP peer object // agentConfig.setTimeout(ParameterMap.getKeyedInteger(parameters, "timeout", agentConfig.getTimeout())); agentConfig.setRetries(ParameterMap.getKeyedInteger(parameters, "retries", agentConfig.getRetries())); agentConfig.setPort(ParameterMap.getKeyedInteger(parameters, "port", agentConfig.getPort())); if (log().isDebugEnabled()) log().debug("poll: service= SNMP address= " + agentConfig); // Create a hash map of available statuses for both physical and // logical disks HashMap percStatusMap = new HashMap(); percStatusMap.put(1,"Other"); percStatusMap.put(2,"Unknown"); percStatusMap.put(3,"OK"); percStatusMap.put(4,"Non-Critical"); percStatusMap.put(5,"Critical"); percStatusMap.put(6,"Non-Recoverable"); // Create a variable to hold the state String state = null; // Establish SNMP session with interface // try { if (log().isDebugEnabled()) { log().debug("OmsaStorageMonitor.poll: SnmpAgentConfig address: " +agentConfig); } SnmpObjId snmpObjectId = new SnmpObjId(PHYSICAL_BASE_OID); // First walk the physical OID Tree and check the returned values Map<SnmpInstId, SnmpValue> results = SnmpUtils.getOidValues(agentConfig, "percPoller", snmpObjectId); if(results.size() == 0) { log().debug("SNMP poll failed: no results, addr=" + ipaddr.getHostAddress() + " oid=" + snmpObjectId); return status; } for (Map.Entry<SnmpInstId, SnmpValue> e : results.entrySet()) { state = percStatusMap.get(e.getValue()); log().debug("poll: SNMPwalk poll succeeded, addr=" + ipaddr.getHostAddress() + " oid=" + snmpObjectId + " instance=" + e.getKey() + " value=" + state); /* Name arrayDiskRollUpStatus Object ID 1.3.6.1.4.1.674.10893.1.20.130.4.1.23 Description Severity of the array disk state. This is the combined status of the array disk and its components. Possible values: 1: Other 2: Unknown 3: OK 4: Non-critical 5: Critical 6: Non-recoverable */ // If disk is not "OK" based on the above generate an error if (meetsCriteria(e.getValue(), "=", "3")) { status = PollStatus.available(); state = percStatusMap.get(e.getValue()); log().debug("poll: SNMP physical poll succeeded, addr=" + ipaddr.getHostAddress() + " oid=" + snmpObjectId + " instance=" + e.getKey() + " value=" + state); } else { state = percStatusMap.get(e.getValue()); status = logDown(Level.DEBUG, "SNMP physical poll failed, addr=" + ipaddr.getHostAddress() + " oid=" + snmpObjectId + " instance=" + e.getKey() + " value=" + state); return status; } } // If we get here, that means all of the physical drives returned a value not equal to "5" // Now we need to check logical drives SnmpObjId snmpLogObjectId = new SnmpObjId(LOGICAL_BASE_OID); // Next walk the physical OID Tree and check the returned values Map<SnmpInstId, SnmpValue> lresults = SnmpUtils.getOidValues(agentConfig, "percPoller", snmpLogObjectId); if(lresults.size() == 0) { log().debug("SNMP poll failed: no logical results, addr=" + ipaddr.getHostAddress() + " oid=" + snmpLogObjectId); return status; } for (Map.Entry<SnmpInstId, SnmpValue> e : lresults.entrySet()) { state = percStatusMap.get(e.getValue()); log().debug("poll: SNMPwalk poll succeeded, addr=" + ipaddr.getHostAddress() + " oid=" + snmpLogObjectId + " instance=" + e.getKey() + " value=" + state); /* Name virtualDiskRollUpStatus Object ID 1.3.6.1.4.1.674.10893.1.20.140.1.1.19 Description Severity of the virtual disk state. This is the combined status of the virtual disk and its components. Possible values: 1: Other 2: Unknown 3: OK 4: Non-critical 5: Critical 6: Non-recoverable */ if (meetsCriteria(e.getValue(), "=", "3")) { status = PollStatus.available(); state = percStatusMap.get(e.getValue()); log().debug("poll: SNMP physical poll succeeded, addr=" + ipaddr.getHostAddress() + " oid=" + snmpObjectId + " instance=" + e.getKey() + " value=" + state); } else { state = percStatusMap.get(e.getValue()); status = logDown(Level.DEBUG, "SNMP logical disk poll failed, addr=" + ipaddr.getHostAddress() + " oid=" + snmpLogObjectId + " instance=" + e.getKey() + " value=" + state); return status; } } } catch (NumberFormatException e) { status = logDown(Level.ERROR, "Number operator used on a non-number " + e.getMessage()); } catch (IllegalArgumentException e) { status = logDown(Level.ERROR, "Invalid Snmp Criteria: " + e.getMessage()); } catch (Throwable t) { status = logDown(Level.WARN, "Unexpected exception during SNMP poll of interface " + ipaddr.getHostAddress(), t); } return status; } | 11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/55f858e2f3d251fab007b4d300dcc2deb55f804d/OmsaStorageMonitor.java/clean/opennms-services/src/main/java/org/opennms/netmgt/poller/monitors/OmsaStorageMonitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19160,
1482,
7672,
12,
11415,
20425,
1179,
7538,
16,
1635,
1472,
16,
2358,
18,
3190,
82,
959,
18,
2758,
81,
4521,
18,
1425,
18,
3915,
749,
18,
2261,
3475,
13,
288,
3639,
21109,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19160,
1482,
7672,
12,
11415,
20425,
1179,
7538,
16,
1635,
1472,
16,
2358,
18,
3190,
82,
959,
18,
2758,
81,
4521,
18,
1425,
18,
3915,
749,
18,
2261,
3475,
13,
288,
3639,
21109,
97... |
SeismogramImageOutputLocator out = SeismogramImageOutputLocator.createForLocalSeismogramTemplate(outputLocEl); | out = SeismogramImageOutputLocator.createForLocalSeismogramTemplate(outputLocEl); | public LocalSeismogramTemplateGenerator(Element el) throws Exception { Element waveformSeismogramConfig = TemplateFileLoader.getTemplate(el); Element outputLocEl = SodUtil.getElement(waveformSeismogramConfig, "outputLocation"); SeismogramImageOutputLocator out = SeismogramImageOutputLocator.createForLocalSeismogramTemplate(outputLocEl); waveformSeismogramConfig.removeChild(outputLocEl); seismoImageProcess = new SeismogramImageProcess(out); Element fileEl = SodUtil.getElement(waveformSeismogramConfig, "filename"); if(fileEl != null) { fileName = fileEl.getFirstChild().getNodeValue(); waveformSeismogramConfig.removeChild(fileEl); } if(waveformSeismogramConfig == null) { throw new IllegalArgumentException("The configuration requires a template"); } if(fileName != null) { template = new LocalSeismogramTemplate(waveformSeismogramConfig, fileDir + "/"); } } | 45996 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45996/02378d132be12ba5fd5782fe15a14c73d9c835d4/LocalSeismogramTemplateGenerator.java/clean/src/edu/sc/seis/sod/process/waveform/LocalSeismogramTemplateGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3566,
1761,
6228,
5553,
2283,
3908,
12,
1046,
415,
13,
1216,
1185,
288,
3639,
3010,
31511,
1761,
6228,
5553,
809,
273,
5035,
22283,
18,
588,
2283,
12,
292,
1769,
3639,
3010,
876,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3566,
1761,
6228,
5553,
2283,
3908,
12,
1046,
415,
13,
1216,
1185,
288,
3639,
3010,
31511,
1761,
6228,
5553,
809,
273,
5035,
22283,
18,
588,
2283,
12,
292,
1769,
3639,
3010,
876,
13... |
return getRuntime().newFixnum(toString().hashCode()); | return getRuntime().newFixnum(hashCode()); | public RubyFixnum hash() { return getRuntime().newFixnum(toString().hashCode()); } | 48072 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48072/accd69543aeec606dd2490c5f67964fb52c543a5/RubyString.java/clean/src/org/jruby/RubyString.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
8585,
2107,
1651,
1435,
288,
3639,
327,
18814,
7675,
2704,
8585,
2107,
12,
2816,
1085,
10663,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
8585,
2107,
1651,
1435,
288,
3639,
327,
18814,
7675,
2704,
8585,
2107,
12,
2816,
1085,
10663,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
ResourceBundle.getBundle( Messages.ENGINE ) ); | ResourceBundle.getBundle( Messages.ENGINE, Locale.getDefault( ) ) ); | public PrimitiveRenderEvent copy( ) throws ChartException { throw new ChartException( ChartEnginePlugin.ID, ChartException.UNSUPPORTED_FEATURE, "exception.unsupported.copy", //$NON-NLS-1$ new Object[]{ this }, ResourceBundle.getBundle( Messages.ENGINE ) ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/2d20506054849c42d48678ae5d0e59f9c37d95e8/PrimitiveRenderEvent.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/event/PrimitiveRenderEvent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
14488,
3420,
1133,
1610,
12,
262,
1216,
14804,
503,
202,
95,
202,
202,
12849,
394,
14804,
503,
12,
14804,
4410,
3773,
18,
734,
16,
9506,
202,
7984,
503,
18,
2124,
21134,
67,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
14488,
3420,
1133,
1610,
12,
262,
1216,
14804,
503,
202,
95,
202,
202,
12849,
394,
14804,
503,
12,
14804,
4410,
3773,
18,
734,
16,
9506,
202,
7984,
503,
18,
2124,
21134,
67,
1... |
if (first != null) { openBodyEnd= CharArrayOps.indexOf('{', fDocument, fNameRange[1] + 1); if (openBodyEnd < 0 || openBodyEnd >= first.getStartPosition()) { openBodyEnd= first.getStartPosition() - 1; | scanner.resetTo(openBodyEnd, fDocument.length); try { int currentToken = scanner.getNextToken(); while(currentToken != TerminalSymbols.TokenNameRBRACE && currentToken != TerminalSymbols.TokenNameEOF) { currentToken = scanner.getNextToken(); } if(currentToken == TerminalSymbols.TokenNameRBRACE) { closeBodyStart = scanner.startPosition; closeBodyEnd = scanner.currentPosition - 1; | void normalize(ILineStartFinder finder) { // perform final changes to the open and close body ranges int openBodyEnd, closeBodyStart; DOMNode first = (DOMNode) getFirstChild(); closeBodyStart = fCloseBodyRange[1]; if (isDetailed()) { if (first == null) { openBodyEnd = fCloseBodyRange[0] - 1; } else { openBodyEnd = first.getStartPosition(); int lineStart = finder.getLineStart(openBodyEnd); openBodyEnd--; if (lineStart > fOpenBodyRange[0]) openBodyEnd = lineStart - 1; } } else { if (first != null) { // look for the open body openBodyEnd= CharArrayOps.indexOf('{', fDocument, fNameRange[1] + 1); if (openBodyEnd < 0 || openBodyEnd >= first.getStartPosition()) { openBodyEnd= first.getStartPosition() - 1; } else { int lineStart = finder.getLineStart(first.getStartPosition()); if (lineStart > openBodyEnd) { openBodyEnd = lineStart - 1; } else { openBodyEnd = first.getStartPosition() - 1; } } if (fDocument[closeBodyStart] != '}') { // look for the body end Scanner scanner = new Scanner(); scanner.setSourceBuffer(CharArrayOps.subarray(fDocument, fLastChild.getEndPosition() + 1, closeBodyStart - fLastChild.getEndPosition() + 1)); try { int currentToken = scanner.getNextToken(); while(currentToken != TerminalSymbols.TokenNameRBRACE && currentToken != TerminalSymbols.TokenNameEOF) { currentToken = scanner.getNextToken(); } if(currentToken == TerminalSymbols.TokenNameRBRACE) { closeBodyStart = fLastChild.getEndPosition() + scanner.currentPosition; } } catch(InvalidInputException e) { // leave closeBodyStart as is } } } else { openBodyEnd = fCloseBodyRange[0] - 1; } } setOpenBodyRangeEnd(openBodyEnd); setCloseBodyRangeStart(closeBodyStart); fInsertionPosition = finder.getLineStart(closeBodyStart); if (fInsertionPosition < openBodyEnd) { fInsertionPosition = getCloseBodyPosition(); } super.normalize(finder);} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/45f363221504243f87ba612b5fa2787cfaa05c75/DOMType.java/clean/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
918,
3883,
12,
45,
1670,
1685,
8441,
7532,
13,
288,
202,
759,
3073,
727,
3478,
358,
326,
1696,
471,
1746,
1417,
7322,
202,
474,
1696,
2250,
1638,
16,
1746,
2250,
1685,
31,
202,
8168,
907,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
918,
3883,
12,
45,
1670,
1685,
8441,
7532,
13,
288,
202,
759,
3073,
727,
3478,
358,
326,
1696,
471,
1746,
1417,
7322,
202,
474,
1696,
2250,
1638,
16,
1746,
2250,
1685,
31,
202,
8168,
907,
11... |
ArrayList queryResult = sqlProcessor.executeQuery( sql, paramValues, new ResultProcessor() { | ArrayList queryResult = noTransactionSqlProcessor.executeQuery( sql, paramValues, new ResultProcessor() { | getUserPermissionSetForDocument( int meta_id, int user_id ) { // Check if user is superadmin if( sproc_CheckAdminRights( user_id ) ) { JoinedTables_permissions result = new JoinedTables_permissions(); result.set_id = 0; result.permission_id = 0; return result; } String sql = "SELECT rr.set_id,dps.permission_id " + "FROM user_roles_crossref urc " + "JOIN roles_rights rr " + "ON urc.role_id = rr.role_id " + "AND urc.user_id = ? " + "AND rr.meta_id = ? " + "LEFT JOIN doc_permission_sets dps " + "ON dps.meta_id = ? " + "AND dps.set_id = rr.set_id " + "ORDER BY rr.set_id"; Integer metaId = new Integer(meta_id); Object[] paramValues = new Object[]{ new Integer(user_id) , metaId, metaId }; ArrayList queryResult = sqlProcessor.executeQuery( sql, paramValues, new ResultProcessor() { public Object mapOneRow( ResultSet rs ) throws SQLException { return new JoinedTables_permissions(rs); } } ); if( queryResult.isEmpty() ) { return null; } else { return (JoinedTables_permissions)queryResult.get(0); } } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/1006917dfe63a5d85d047011540205a2b02407a8/DatabaseService.java/clean/server/src/imcode/server/db/DatabaseService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4735,
5041,
694,
1290,
2519,
12,
509,
2191,
67,
350,
16,
509,
729,
67,
350,
262,
288,
3639,
368,
2073,
309,
729,
353,
2240,
3666,
3639,
309,
12,
272,
9381,
67,
1564,
4446,
18464,
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,
540,
4735,
5041,
694,
1290,
2519,
12,
509,
2191,
67,
350,
16,
509,
729,
67,
350,
262,
288,
3639,
368,
2073,
309,
729,
353,
2240,
3666,
3639,
309,
12,
272,
9381,
67,
1564,
4446,
18464,
12,
... |
if (collectors.length == 0) clearSingleton(); | if (collectors.length == 0) { clearSingleton(); } | void removeCollector(IProgressUpdateCollector provider) { HashSet newCollectors = new HashSet(); for (int i = 0; i < collectors.length; i++) { if (!collectors[i].equals(provider)) newCollectors.add(collectors[i]); } IProgressUpdateCollector[] newArray = new IProgressUpdateCollector[newCollectors .size()]; newCollectors.toArray(newArray); collectors = newArray; //Remove ourselves if there is nothing to update if (collectors.length == 0) clearSingleton(); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/ProgressViewUpdater.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressViewUpdater.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1206,
7134,
12,
45,
5491,
1891,
7134,
2893,
13,
288,
3639,
6847,
394,
10808,
1383,
273,
394,
6847,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
3274,
1383,
18,
2469,
31,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1206,
7134,
12,
45,
5491,
1891,
7134,
2893,
13,
288,
3639,
6847,
394,
10808,
1383,
273,
394,
6847,
5621,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
3274,
1383,
18,
2469,
31,... |
if (update) { this.content = lines; this.baseDir = targetDir; updateFile(); save(); } else { File targetFile = new File( targetDir + File.separatorChar + this.fileName ); FileUtil.writeTextFile(targetFile, lines); } | saveToDir( targetDir, this.content, false ); | public void saveToDir(String targetDir, String[] lines, boolean update) throws IOException { if (update) { this.content = lines; this.baseDir = targetDir; updateFile(); save(); } else { File targetFile = new File( targetDir + File.separatorChar + this.fileName ); FileUtil.writeTextFile(targetFile, lines); } } | 9804 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9804/3b8c8b6c4d94de23963f563b591ccfed1277b62e/TextFile.java/buggy/build/source/src/de/enough/polish/util/TextFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1923,
774,
1621,
12,
780,
19410,
16,
514,
8526,
2362,
16,
1250,
1089,
13,
225,
202,
15069,
1860,
225,
202,
95,
202,
202,
430,
261,
2725,
13,
288,
1082,
202,
2211,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1923,
774,
1621,
12,
780,
19410,
16,
514,
8526,
2362,
16,
1250,
1089,
13,
225,
202,
15069,
1860,
225,
202,
95,
202,
202,
430,
261,
2725,
13,
288,
1082,
202,
2211,
18,
1... |
Object[] listeners = selectionChangedListeners.getListeners(); for (int i = 0; i < listeners.length; i++) { final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i]; SafeRunnable.run(new SafeRunnable() { public void run() { l.selectionChanged(event); } }); } | Object[] listeners = selectionChangedListeners.getListeners(); for (int i = 0; i < listeners.length; i++) { final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i]; SafeRunnable.run(new SafeRunnable() { public void run() { l.selectionChanged(event); } }); } | protected void fireSelectionChanged(final SelectionChangedEvent event) { Object[] listeners = selectionChangedListeners.getListeners(); for (int i = 0; i < listeners.length; i++) { final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i]; SafeRunnable.run(new SafeRunnable() { public void run() { l.selectionChanged(event); } }); } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/5863a0e5bb8b4443a2fdcf6102d50aae66ef1287/AbstractBugEditor.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/AbstractBugEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
4452,
6233,
5033,
12,
6385,
12977,
27553,
871,
13,
288,
3639,
1033,
8526,
4679,
273,
4421,
5033,
5583,
18,
588,
5583,
5621,
202,
565,
364,
261,
474,
277,
273,
374,
31,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
4452,
6233,
5033,
12,
6385,
12977,
27553,
871,
13,
288,
3639,
1033,
8526,
4679,
273,
4421,
5033,
5583,
18,
588,
5583,
5621,
202,
565,
364,
261,
474,
277,
273,
374,
31,
2... |
if (autoBuild) { removeManualIncrementalBuildAction(); } else { addManualIncrementalBuildAction(); } | updateBuildActions(autoBuild); | public void run() { if (autoBuild) { removeManualIncrementalBuildAction(); } else { addManualIncrementalBuildAction(); } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/a28eb1ef10e772648cd789827e54d2e08b8df441/WorkbenchActionBuilder.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/WorkbenchActionBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
15106,
202,
482,
918,
1086,
1435,
288,
6862,
9506,
202,
430,
261,
6079,
3116,
13,
288,
6862,
6862,
202,
4479,
25139,
10798,
287,
3116,
1803,
5621,
6862,
9506,
202,
97,
6862,
9506,
202,
12107,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
15106,
202,
482,
918,
1086,
1435,
288,
6862,
9506,
202,
430,
261,
6079,
3116,
13,
288,
6862,
6862,
202,
4479,
25139,
10798,
287,
3116,
1803,
5621,
6862,
9506,
202,
97,
6862,
9506,
202,
12107,
... |
if (rowIndex < 0) throw new SQLException("No current row in the result set"); else if (rowIndex >= rowCount) throw new SQLException("no more results in ResultSet"); | if( rowIndex < 0 ) throw new SQLException("No current row in the ResultSet"); else if( rowIndex >= rowCount ) throw new SQLException("No more results in ResultSet"); | public PacketRowResult currentRow() throws SQLException { if (rowIndex < 0) throw new SQLException("No current row in the result set"); else if (rowIndex >= rowCount) throw new SQLException("no more results in ResultSet"); return rowCache[rowIndex]; } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/b37dd297238df8f121a81692dcec67885161e550/TdsResultSet.java/clean/trunk/jtds/src.old/main/com/internetcds/jdbc/tds/TdsResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
11114,
1999,
1253,
31185,
1435,
1216,
6483,
565,
288,
1377,
309,
261,
492,
1016,
411,
374,
13,
3639,
604,
394,
6483,
2932,
2279,
783,
1027,
316,
326,
563,
444,
8863,
1377,
469,
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,
11114,
1999,
1253,
31185,
1435,
1216,
6483,
565,
288,
1377,
309,
261,
492,
1016,
411,
374,
13,
3639,
604,
394,
6483,
2932,
2279,
783,
1027,
316,
326,
563,
444,
8863,
1377,
469,
3639... |
for(int i=0; i<max; i++) { xmlDataBlock.setData("navText", navText[i]); xmlDataBlock.setData("count", new Integer(i+1).toString()); xmlDataBlock.setData("level", new Integer(extractLevel(cms,navLink[i])).toString()); if (navLink[i].endsWith("/")) { String navIndex=cms.readProperty(navLink[i],C_PROPERTY_NAVINDEX); if (navIndex==null) { navIndex=C_NAVINDEX; } try { cms.readFile(navLink[i] + navIndex); xmlDataBlock.setData("navLink", servletPath + navLink[i] + navIndex ); } catch (CmsException e) { xmlDataBlock.setData("navLink", servletPath + requestedUri ); } } else { try { cms.readFile(navLink[i]); xmlDataBlock.setData("navLink", servletPath + navLink[i] ); } catch (CmsException e) { xmlDataBlock.setData("navLink", servletPath + requestedUri ); } } if (navLink[i].equals(currentFolder) || navLink[i].equals(requestedUri)) { result.append(xmlDataBlock.getProcessedDataValue("navCurrent", this, userObject)); } else { result.append(xmlDataBlock.getProcessedDataValue("navEntry", this, userObject)); } } } return result.toString(); | } return result.toString(); | protected String buildNav(CmsObject cms, A_CmsXmlContent doc,Object userObject, Vector resources) throws CmsException { String requestedUri = cms.getRequestContext().getUri(); String currentFolder=cms.getRequestContext().currentFolder().getAbsolutePath(); String servletPath = ((HttpServletRequest)cms.getRequestContext().getRequest().getOriginalRequest()).getServletPath(); CmsXmlTemplateFile xmlDataBlock=(CmsXmlTemplateFile)doc; StringBuffer result = new StringBuffer(); int size = resources.size(); String navLink[] = new String[size]; String navText[] = new String[size]; float navPos[] = new float[size]; int max=extractNav(cms,resources,navLink,navText,navPos); // The arrays folderNames and folderTitles now contain all folders // that should appear in the nav. // Loop through all folders and generate output if (xmlDataBlock.hasData("navEntry")) { if (!xmlDataBlock.hasData("navCurrent")) { xmlDataBlock.setData("navCurrent", xmlDataBlock.getData("navEntry")); } for(int i=0; i<max; i++) { xmlDataBlock.setData("navText", navText[i]); xmlDataBlock.setData("count", new Integer(i+1).toString()); xmlDataBlock.setData("level", new Integer(extractLevel(cms,navLink[i])).toString()); // this if condition is necessary because of url parameter, // if there is no filename then the parameters are ignored, so I // can't use e.g. ?cmsframe=body. if (navLink[i].endsWith("/")) { String navIndex=cms.readProperty(navLink[i],C_PROPERTY_NAVINDEX); if (navIndex==null) { navIndex=C_NAVINDEX; } try { cms.readFile(navLink[i] + navIndex); xmlDataBlock.setData("navLink", servletPath + navLink[i] + navIndex ); } catch (CmsException e) { xmlDataBlock.setData("navLink", servletPath + requestedUri ); } } else { try { cms.readFile(navLink[i]); xmlDataBlock.setData("navLink", servletPath + navLink[i] ); } catch (CmsException e) { xmlDataBlock.setData("navLink", servletPath + requestedUri ); } } // Check if nav is current nav if (navLink[i].equals(currentFolder) || navLink[i].equals(requestedUri)) { result.append(xmlDataBlock.getProcessedDataValue("navCurrent", this, userObject)); } else { result.append(xmlDataBlock.getProcessedDataValue("navEntry", this, userObject)); } } } return result.toString(); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/e830ba5cf98ad761b43337a5f53977c1a7689de2/CmsXmlNav.java/clean/src/com/opencms/defaults/CmsXmlNav.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
1361,
12599,
12,
4747,
921,
6166,
16,
432,
67,
4747,
27415,
997,
16,
921,
729,
921,
16,
5589,
2703,
13,
202,
202,
15069,
11228,
288,
202,
202,
780,
3764,
3006,
273,
6166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
1361,
12599,
12,
4747,
921,
6166,
16,
432,
67,
4747,
27415,
997,
16,
921,
729,
921,
16,
5589,
2703,
13,
202,
202,
15069,
11228,
288,
202,
202,
780,
3764,
3006,
273,
6166... |
if (glyphMetrics[glyphIndex] == null) { /* GlyphMetrics gm = awtGlyphVector.getGlyphMetrics(glyphIndex); Rectangle2D gmB = gm.getBounds2D(); */ Point2D glyphPos = defaultGlyphPositions[glyphIndex]; char c = ci.setIndex(ci.getBeginIndex()+glyphIndex); ci.setIndex(ci.getBeginIndex()); AWTGlyphGeometryCache.Value v = AWTGVTFont.getGlyphGeometry (gvtFont, c, awtGlyphVector, glyphIndex, glyphPos); Rectangle2D gmB = v.getBounds2D(); | if (glyphMetrics[glyphIndex] != null) return glyphMetrics[glyphIndex]; | public GVTGlyphMetrics getGlyphMetrics(int glyphIndex) { if (glyphMetrics[glyphIndex] == null) {/* GlyphMetrics gm = awtGlyphVector.getGlyphMetrics(glyphIndex); Rectangle2D gmB = gm.getBounds2D();*/ // -- start glyph cache code -- Point2D glyphPos = defaultGlyphPositions[glyphIndex]; char c = ci.setIndex(ci.getBeginIndex()+glyphIndex); ci.setIndex(ci.getBeginIndex()); AWTGlyphGeometryCache.Value v = AWTGVTFont.getGlyphGeometry (gvtFont, c, awtGlyphVector, glyphIndex, glyphPos); Rectangle2D gmB = v.getBounds2D(); // -- end glyph cache code -- Rectangle2D bounds = new Rectangle2D.Double (gmB.getX() * scaleFactor, gmB.getY() * scaleFactor, gmB.getWidth() * scaleFactor, gmB.getHeight() * scaleFactor); // defaultGlyphPositions has one more entry than glyphs // the last entry stores the total advance for the // glyphVector. float adv = (float)(defaultGlyphPositions[glyphIndex+1].getX()- defaultGlyphPositions[glyphIndex] .getX()); glyphMetrics[glyphIndex] = new GVTGlyphMetrics (adv*scaleFactor, (ascent+descent), bounds, GlyphMetrics.STANDARD); } return glyphMetrics[glyphIndex]; } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/094c967522990f8887bb01eb4eaa8ad2c4d6d6e9/AWTGVTGlyphVector.java/clean/sources/org/apache/batik/gvt/font/AWTGVTGlyphVector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
611,
58,
56,
15141,
5653,
7162,
6451,
5653,
12,
474,
9440,
1016,
13,
288,
3639,
309,
261,
19426,
5653,
63,
19426,
1016,
65,
422,
446,
13,
288,
20308,
5411,
31572,
5653,
14125,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
611,
58,
56,
15141,
5653,
7162,
6451,
5653,
12,
474,
9440,
1016,
13,
288,
3639,
309,
261,
19426,
5653,
63,
19426,
1016,
65,
422,
446,
13,
288,
20308,
5411,
31572,
5653,
14125,
273,
... |
= (ClassCPInfo)constantPool.getEntry(thisClassIndex); | = (ClassCPInfo) constantPool.getEntry(thisClassIndex); | public void read(InputStream stream) throws IOException, ClassFormatError { DataInputStream classStream = new DataInputStream(stream); if (classStream.readInt() != CLASS_MAGIC) { throw new ClassFormatError("No Magic Code Found " + "- probably not a Java class file."); } // right we have a good looking class file. int minorVersion = classStream.readUnsignedShort(); int majorVersion = classStream.readUnsignedShort(); // read the constant pool in and resolve it constantPool = new ConstantPool(); constantPool.read(classStream); constantPool.resolve(); int accessFlags = classStream.readUnsignedShort(); int thisClassIndex = classStream.readUnsignedShort(); int superClassIndex = classStream.readUnsignedShort(); ClassCPInfo classInfo = (ClassCPInfo)constantPool.getEntry(thisClassIndex); className = classInfo.getClassName(); } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/c6c232893c39257745a8f7a618bcdb5c59791cae/ClassFile.java/buggy/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
855,
12,
4348,
1407,
13,
1216,
1860,
16,
1659,
29874,
288,
3639,
29382,
667,
1228,
273,
394,
29382,
12,
3256,
1769,
3639,
309,
261,
1106,
1228,
18,
896,
1702,
1435,
480,
7383,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
855,
12,
4348,
1407,
13,
1216,
1860,
16,
1659,
29874,
288,
3639,
29382,
667,
1228,
273,
394,
29382,
12,
3256,
1769,
3639,
309,
261,
1106,
1228,
18,
896,
1702,
1435,
480,
7383,
... |
public void setCounter(int handle, int index, double value) { | public void setCounter(int handle, int index, double value) { | public void setCounter(int handle, int index, double value) { counterArrays[handle][index] = value; } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/adc94596e6496781a4e0763b29a52be3daab1a7a/VM_CounterArrayManager.java/clean/rvm/src/vm/adaptive/runtimeMeasurements/instrumentation/VM_CounterArrayManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
4789,
12,
474,
1640,
16,
509,
770,
16,
1645,
460,
13,
225,
288,
565,
3895,
12726,
63,
4110,
6362,
1615,
65,
273,
460,
31,
225,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
4789,
12,
474,
1640,
16,
509,
770,
16,
1645,
460,
13,
225,
288,
565,
3895,
12726,
63,
4110,
6362,
1615,
65,
273,
460,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
if (auditManager.isEnabled() && auditManager.isAuditPresence()) { | if (auditManager.isAuditPresence()) { | public void audit(XMPPPacket packet) { if (auditManager.isEnabled()) { if (packet instanceof Message) { if (auditManager.isEnabled() && auditManager.isAuditMessage()) { writePacket(packet, false); } } else if (packet instanceof Presence) { if (auditManager.isEnabled() && auditManager.isAuditPresence()) { writePacket(packet, false); } } else if (packet instanceof IQ) { if (auditManager.isEnabled() && auditManager.isAuditIQ()) { writePacket(packet, false); } } } } | 6161 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6161/ef3386062646bfe3c35659ccd3ccc0750b3bd075/AuditorImpl.java/clean/src/java/org/jivesoftware/messenger/audit/spi/AuditorImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
8215,
12,
60,
19388,
6667,
4414,
13,
288,
3639,
309,
261,
17413,
1318,
18,
291,
1526,
10756,
288,
5411,
309,
261,
11482,
1276,
2350,
13,
288,
7734,
309,
261,
17413,
1318,
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,
8215,
12,
60,
19388,
6667,
4414,
13,
288,
3639,
309,
261,
17413,
1318,
18,
291,
1526,
10756,
288,
5411,
309,
261,
11482,
1276,
2350,
13,
288,
7734,
309,
261,
17413,
1318,
18,
... |
_indicators = new Hashtable(); | private void make_indicator_lists(Vector inds_from_server) { Enumeration ind_iter; String s; int ind_count = inds_from_server.size(); Hashtable valid_indicators; if (ind_count > 0) { valid_indicators = new Hashtable(inds_from_server.size()); } else { valid_indicators = new Hashtable(); } ordered_indicator_list = new Vector(); int i; for (i = 0; i < inds_from_server.size(); ++i) { Object o = inds_from_server.elementAt(i); valid_indicators.put(o, new Integer(i + 1)); } // User-selected indicators, in order: ind_iter = MA_Configuration.application_instance().indicator_order(). elements(); _indicators = new Hashtable(); Vector special_indicators = new Vector(); special_indicators.addElement(No_lower_indicator); special_indicators.addElement(No_upper_indicator); special_indicators.addElement(Volume); if (data_builder.has_open_interest()) { special_indicators.addElement(Open_interest); } // Insert into _indicators all user-selected indicators that // are either in the list returned by the server or are one of // the special strings for no upper/lower indicator, volume, // or open interest. while (ind_iter.hasMoreElements()) { s = (String) ind_iter.nextElement(); if (valid_indicators.containsKey(s)) { // Add valid indicators (from the server's point of view) // to both `_indicators' and `ordered_indicator_list'. _indicators.put(s, valid_indicators.get(s)); ordered_indicator_list.addElement(s); } else { for (i = 0; i < special_indicators.size(); ++i) { if (s.equals(special_indicators.elementAt(i))) { // Add special indicators only to // `ordered_indicator_list'. ordered_indicator_list.addElement(s); special_indicators.removeElement(s); break; } } } } // Insert the special indicators (no-upper indicator, ...) if // they aren't already there. for (i = 0; i < special_indicators.size(); ++i) { s = (String) special_indicators.elementAt(i); if (!_indicators.containsKey(s)) { _indicators.put(s, new Integer(_indicators.size() + 1)); ordered_indicator_list.addElement(s); } } // Update current_lower_indicators and current_upper_indicators: // remove any elements that are no longer valid. Vector remove_list = new Vector(); for (ind_iter = current_lower_indicators.elements(); ind_iter.hasMoreElements(); ) { s = (String) ind_iter.nextElement(); if (! ordered_indicator_list.contains(s)) { remove_list.addElement(s); } } for (i = 0; i < remove_list.size(); ++i) { while (current_lower_indicators.lastIndexOf( remove_list.elementAt(i)) != -1) { current_lower_indicators.removeElement( remove_list.elementAt(i)); } } remove_list.removeAllElements(); for (ind_iter = current_upper_indicators.elements(); ind_iter.hasMoreElements(); ) { s = (String) ind_iter.nextElement(); if (! ordered_indicator_list.contains(s)) { remove_list.addElement(s); } } for (i = 0; i < remove_list.size(); ++i) { while (current_upper_indicators.lastIndexOf( remove_list.elementAt(i)) != -1) { current_upper_indicators.removeElement( remove_list.elementAt(i)); } } if (ma_menu_bar != null) ma_menu_bar.update_indicators(); } | 13245 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13245/f2d79bff77febe04aef94aeaae7be8abf07198cd/Chart.java/clean/src/clients/mas_gui/Chart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1221,
67,
18741,
67,
9772,
12,
5018,
19173,
67,
2080,
67,
3567,
13,
288,
202,
202,
21847,
1547,
67,
2165,
31,
202,
202,
780,
272,
31,
202,
202,
474,
1547,
67,
1883,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1221,
67,
18741,
67,
9772,
12,
5018,
19173,
67,
2080,
67,
3567,
13,
288,
202,
202,
21847,
1547,
67,
2165,
31,
202,
202,
780,
272,
31,
202,
202,
474,
1547,
67,
1883,
27... | |
RubyString name = RubyString.newString(runtime, file); | RubyString name = runtime.newString(file); | public boolean require(String file) { RubyString name = RubyString.newString(runtime, file); if (loadedFeatures.contains(name)) { return false; } if (load(file)) { loadedFeatures.add(name); return true; } return false; } | 45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/870e1da9b41bfdbae259e1fc5f18fc8b76686998/LoadService.java/buggy/src/org/jruby/internal/runtime/load/LoadService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
2583,
12,
780,
585,
13,
288,
3639,
19817,
780,
508,
273,
3099,
18,
2704,
780,
12,
768,
1769,
3639,
309,
261,
4230,
8696,
18,
12298,
12,
529,
3719,
288,
5411,
327,
629,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
2583,
12,
780,
585,
13,
288,
3639,
19817,
780,
508,
273,
3099,
18,
2704,
780,
12,
768,
1769,
3639,
309,
261,
4230,
8696,
18,
12298,
12,
529,
3719,
288,
5411,
327,
629,
31,
... |
throw new ArgumentError(recv.getRuntime(), "wrong # of arguments(at least 1)"); | throw recv.getRuntime().newArgumentError("wrong # of arguments(at least 1)"); | public static IRubyObject dump(IRubyObject recv, IRubyObject[] args) { if (args.length < 1) { throw new ArgumentError(recv.getRuntime(), "wrong # of arguments(at least 1)"); } IRubyObject objectToDump = args[0]; RubyIO io = null; int depthLimit = -1; if (args.length >= 2) { if (args[1] instanceof RubyIO) { io = (RubyIO) args[1]; } else if (args[1] instanceof RubyFixnum) { depthLimit = (int) ((RubyFixnum) args[1]).getLongValue(); } if (args.length == 3) { depthLimit = (int) ((RubyFixnum) args[2]).getLongValue(); } } try { if (io != null) { dumpToStream(objectToDump, io.getOutStream(), depthLimit); return io; } ByteArrayOutputStream stringOutput = new ByteArrayOutputStream(); dumpToStream(objectToDump, stringOutput, depthLimit); return RubyString.newString(recv.getRuntime(), stringOutput.toByteArray()); } catch (IOException ioe) { throw IOError.fromException(recv.getRuntime(), ioe); } } | 45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyMarshal.java/buggy/src/org/jruby/RubyMarshal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
4657,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
411,
404,
13,
288,
5411,
604,
10665,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
4657,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
411,
404,
13,
288,
5411,
604,
10665,
18,
588,
... |
return RECOGNIZED_PROPERTIES; | return (String[])(RECOGNIZED_PROPERTIES.clone()); | public String[] getRecognizedProperties() { return RECOGNIZED_PROPERTIES; } // getRecognizedProperties():String[] | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/0602ac3eb8cf221dfe3af87516f142be37431477/XIncludeHandler.java/buggy/src/org/apache/xerces/xinclude/XIncludeHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
8526,
5561,
71,
9367,
2297,
1435,
288,
3639,
327,
261,
780,
63,
5717,
12,
30724,
8318,
24131,
67,
17421,
18,
14056,
10663,
565,
289,
368,
5561,
71,
9367,
2297,
13332,
780,
8526... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8526,
5561,
71,
9367,
2297,
1435,
288,
3639,
327,
261,
780,
63,
5717,
12,
30724,
8318,
24131,
67,
17421,
18,
14056,
10663,
565,
289,
368,
5561,
71,
9367,
2297,
13332,
780,
8526... |
public void setHierarchyRoots(Set roots, boolean flat); | public void setHierarchyRoots(Set roots, boolean flat, boolean refresh); | public void setHierarchyRoots(Set roots, boolean flat); | 55464 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55464/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/HiViewer.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/HiViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
12074,
17540,
12,
694,
12876,
16,
1250,
3569,
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... | [
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,
918,
444,
12074,
17540,
12,
694,
12876,
16,
1250,
3569,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return mGranteeName; | return mGranteeName == null ? mGranteeId : mGranteeName; | public String getGranteeName() { return mGranteeName; } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/194b2a548daf9d1e2564f728a589b47fe7f4f60f/ZSoapGrant.java/clean/ZimbraServer/src/java/com/zimbra/cs/zclient/soap/ZSoapGrant.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
7162,
2450,
22579,
461,
1435,
288,
3639,
327,
312,
43,
2450,
22579,
461,
422,
446,
692,
312,
43,
2450,
22579,
548,
294,
312,
43,
2450,
22579,
461,
31,
565,
289,
2,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7162,
2450,
22579,
461,
1435,
288,
3639,
327,
312,
43,
2450,
22579,
461,
422,
446,
692,
312,
43,
2450,
22579,
548,
294,
312,
43,
2450,
22579,
461,
31,
565,
289,
2,
-100,
-100... |
if(bindTo != get()) | if(!bindTo.equals(get())) | public void set(String bindTo) throws InvalidConfigValueException { if(bindTo != get()) throw new InvalidConfigValueException("Cannot change FProxy bind address on the fly"); } | 50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/344365449d05d9c31812fb984ef314991878f09a/SimpleToadletServer.java/clean/src/freenet/clients/http/SimpleToadletServer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
444,
12,
780,
1993,
774,
13,
1216,
1962,
809,
9738,
288,
1082,
202,
430,
12,
4376,
774,
480,
336,
10756,
9506,
202,
12849,
394,
1962,
809,
9738,
2932,
4515,
2549,
478,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
444,
12,
780,
1993,
774,
13,
1216,
1962,
809,
9738,
288,
1082,
202,
430,
12,
4376,
774,
480,
336,
10756,
9506,
202,
12849,
394,
1962,
809,
9738,
2932,
4515,
2549,
478,
3... |
Oprand[] op = this.operation.getOprand( ); String taskid = null; if ( op != null ) { for ( int i = 0; i < op.length; i++ ) { String paramName = op[i].getName( ); String paramValue = op[i].getValue( ); if ( IBirtConstants.OPRAND_TASKID.equalsIgnoreCase( paramName ) ) { taskid = paramValue; break; } } } if ( taskid == null ) return; HttpSession session = context.getRequest( ).getSession( ); if ( session == null ) return; Map map = (Map) session.getAttribute( IBirtConstants.TASK_MAP ); if ( map != null && map.containsKey( taskid ) ) { IEngineTask task = (IEngineTask) map.get( taskid ); if ( task != null ) { task.cancel( ); } synchronized ( map ) { map.remove( taskid ); } } | BirtUtility.cancelTask( context.getRequest( ), attrBean.getTaskId( ) ); | protected void __execute( ) throws Exception { ViewerAttributeBean attrBean = (ViewerAttributeBean) context.getBean( ); assert attrBean != null; // get task id Oprand[] op = this.operation.getOprand( ); String taskid = null; if ( op != null ) { for ( int i = 0; i < op.length; i++ ) { String paramName = op[i].getName( ); String paramValue = op[i].getValue( ); if ( IBirtConstants.OPRAND_TASKID.equalsIgnoreCase( paramName ) ) { taskid = paramValue; break; } } } if ( taskid == null ) return; // get task map HttpSession session = context.getRequest( ).getSession( ); if ( session == null ) return; Map map = (Map) session.getAttribute( IBirtConstants.TASK_MAP ); if ( map != null && map.containsKey( taskid ) ) { // cancel task IEngineTask task = (IEngineTask) map.get( taskid ); if ( task != null ) { task.cancel( ); } // remove task from task map synchronized ( map ) { map.remove( taskid ); } } handleUpdate( ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/2591dfb188879f4c0d3e0302096700c9326b5fdb/BirtCancelTaskActionHandler.java/buggy/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/actionhandler/BirtCancelTaskActionHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1001,
8837,
12,
262,
1216,
1185,
202,
95,
202,
202,
18415,
1499,
3381,
1604,
3381,
273,
261,
18415,
1499,
3381,
13,
819,
18,
588,
3381,
12,
11272,
202,
202,
11231,
1604,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
8837,
12,
262,
1216,
1185,
202,
95,
202,
202,
18415,
1499,
3381,
1604,
3381,
273,
261,
18415,
1499,
3381,
13,
819,
18,
588,
3381,
12,
11272,
202,
202,
11231,
1604,
... |
showFatalError( "Unable to read settings.xml", e, debug ); | showFatalError( "Unable to read settings.xml", e, showErrors ); | public static int main( String[] args, ClassWorld classWorld ) { // ---------------------------------------------------------------------- // Setup the command line parser // ---------------------------------------------------------------------- CLIManager cliManager = new CLIManager(); CommandLine commandLine; try { commandLine = cliManager.parse( args ); } catch ( ParseException e ) { System.err.println( "Unable to parse command line options: " + e.getMessage() ); cliManager.displayHelp(); return 1; } // TODO: maybe classworlds could handle this requirement... if ( System.getProperty( "java.class.version", "44.0" ).compareTo( "48.0" ) < 0 ) { System.err.println( "Sorry, but JDK 1.4 or above is required to execute Maven" ); System.err.println( "You appear to be using Java version: " + System.getProperty( "java.version", "<unknown>" ) ); return 1; } // ---------------------------------------------------------------------- // // 1) maven user configuration directory ( ~/.m2 ) // 2) maven home // 3) local repository // // ---------------------------------------------------------------------- // File userConfigurationDirectory = getUserConfigurationDirectory(); // Properties mavenProperties = getMavenProperties( userConfigurationDirectory ); // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- initializeSystemProperties( commandLine ); boolean debug = commandLine.hasOption( CLIManager.DEBUG ); // ---------------------------------------------------------------------- // Process particular command line options // ---------------------------------------------------------------------- if ( commandLine.hasOption( CLIManager.HELP ) ) { cliManager.displayHelp(); return 0; } if ( commandLine.hasOption( CLIManager.VERSION ) ) { showVersion(); return 0; } EventDispatcher eventDispatcher = new DefaultEventDispatcher(); // ---------------------------------------------------------------------- // Now that we have everything that we need we will fire up plexus and // bring the maven component to life for use. // ---------------------------------------------------------------------- ArtifactEnabledEmbedder embedder = new ArtifactEnabledEmbedder(); try { embedder.start( classWorld ); } catch ( PlexusContainerException e ) { showFatalError( "Unable to start the embedded plexus container", e, debug ); return 1; } Settings settings; try { MavenSettingsBuilder settingsBuilder = (MavenSettingsBuilder) embedder.lookup( MavenSettingsBuilder.ROLE ); settings = settingsBuilder.buildSettings(); } catch ( IOException e ) { showFatalError( "Unable to read settings.xml", e, debug ); return 1; } catch ( XmlPullParserException e ) { showFatalError( "Unable to read settings.xml", e, debug ); return 1; } catch ( ComponentLookupException e ) { showFatalError( "Unable to read settings.xml", e, debug ); return 1; } List projectFiles = null; try { projectFiles = getProjectFiles( commandLine ); } catch ( IOException e ) { showFatalError( "Error locating project files for reactor execution", e, debug ); return 1; } Maven maven = null; MavenExecutionRequest request = null; try { // logger must be created first LoggerManager manager = (LoggerManager) embedder.lookup( LoggerManager.ROLE ); if ( debug ) { manager.setThreshold( Logger.LEVEL_DEBUG ); } request = createRequest( projectFiles, embedder, commandLine, settings, eventDispatcher, manager ); maven = createMavenInstance( embedder ); } catch ( ComponentLookupException e ) { showFatalError( "Unable to configure the Maven application", e, debug ); return 1; } // TODO: this should be in default maven, and should accommodate default goals if ( request.getGoals().isEmpty() ) { System.err.println( "You must specify at least one goal. Try 'install'" ); cliManager.displayHelp(); return 1; } MavenExecutionResponse response = null; try { response = maven.execute( request ); } catch ( ReactorException e ) { showFatalError( "Error executing Maven for a project", e, debug ); return 1; } if ( response != null && response.isExecutionFailure() ) { return 1; } else { return 0; } } | 47160 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47160/469f96a4f1aa4b5dc7ccfc0e75abdbd278902c44/MavenCli.java/buggy/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
2774,
12,
514,
8526,
833,
16,
1659,
18071,
667,
18071,
262,
565,
288,
3639,
368,
8879,
13465,
3639,
368,
10939,
326,
1296,
980,
2082,
3639,
368,
8879,
13465,
3639,
8276,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
2774,
12,
514,
8526,
833,
16,
1659,
18071,
667,
18071,
262,
565,
288,
3639,
368,
8879,
13465,
3639,
368,
10939,
326,
1296,
980,
2082,
3639,
368,
8879,
13465,
3639,
8276,
1... |
if (jj_scan_token(CONDITIONAL_AND)) return true; if (jj_3R_264()) return true; | if (jj_scan_token(INTERFACE)) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_428()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_429()) jj_scanpos = xsp; if (jj_scan_token(LBRACE)) return true; while (true) { xsp = jj_scanpos; if (jj_3R_430()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; | final private boolean jj_3R_297() { if (jj_scan_token(CONDITIONAL_AND)) return true; if (jj_3R_264()) return true; return false; } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/9aa0c6bec51662a685ea4b86bc02a52c9e593d8a/Parser.java/clean/dynamicjava/src/koala/dynamicjava/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
5540,
27,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
22017,
1013,
67,
4307,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
23,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
5540,
27,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
22017,
1013,
67,
4307,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
23,... |
if (e instanceof UMOException) { handleException(e); } else { handleException(new MessagingException(new Message(Messages.EVENT_PROCESSING_FAILED_FOR_X, | handleException(new MessagingException(new Message(Messages.EVENT_PROCESSING_FAILED_FOR_X, | public Object onCall(UMOEvent event) throws UMOException { logger.trace("MuleProxy: sync call for Mule UMO " + descriptor.getName()); UMOMessage returnMessage = null; try { if (event.getEndpoint().canReceive()) { RequestContext.setEvent(event); Object replyTo = event.getMessage().getReplyTo(); ReplyToHandler replyToHandler = getReplyToHandler(event); InterceptorsInvoker invoker = new InterceptorsInvoker(interceptorList, descriptor, event.getMessage()); // stats long startTime = 0; if (stat.isEnabled()) { startTime = System.currentTimeMillis(); } returnMessage = invoker.execute(); // stats if (stat.isEnabled()) { stat.addExecutionTime(System.currentTimeMillis() - startTime); } // this is the request event event = RequestContext.getEvent(); if (event.isStopFurtherProcessing()) { logger.debug("Event stop further processing has been set, no outbound routing will be performed."); } if (returnMessage != null && !event.isStopFurtherProcessing()) { if(descriptor.getOutboundRouter().hasEndpoints()) { UMOMessage outboundReturnMessage = descriptor.getOutboundRouter().route(returnMessage, event.getSession(), event.isSynchronous()); if(outboundReturnMessage!=null) { returnMessage = outboundReturnMessage; } } else { logger.debug("Outbound router on component '" + descriptor.getName() + "' doesn't have any endpoints configured."); } } //Process Response Router if (returnMessage != null && descriptor.getResponseRouter() != null) { logger.debug("Waiting for response router message"); returnMessage = descriptor.getResponseRouter().getResponse(returnMessage); } // process repltyTo if there is one if (returnMessage != null && replyToHandler != null) { String requestor = (String) returnMessage.getProperty(MuleProperties.MULE_REPLY_TO_REQUESTOR_PROPERTY); if ((requestor != null && !requestor.equals(descriptor.getName())) || requestor == null) { replyToHandler.processReplyTo(event, returnMessage, replyTo); } } } else { returnMessage = event.getSession().sendEvent(event); processReplyTo(returnMessage); } // stats if (stat.isEnabled()) { stat.incSentEventSync(); } } catch (Exception e) { event.getSession().setValid(false); if (e instanceof UMOException) { handleException(e); } else { handleException(new MessagingException(new Message(Messages.EVENT_PROCESSING_FAILED_FOR_X, descriptor.getName()), event.getMessage(), e)); } if(returnMessage==null) { returnMessage = new MuleMessage(new NullPayload(), (Map)null); } returnMessage.setExceptionPayload(new ExceptionPayload(e)); } return returnMessage; } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/589f59b15144184ea22999b384d5ea92ddec8bb9/DefaultMuleProxy.java/buggy/mule/src/java/org/mule/impl/model/DefaultMuleProxy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
603,
1477,
12,
2799,
51,
1133,
871,
13,
1216,
587,
5980,
503,
565,
288,
3639,
1194,
18,
5129,
2932,
49,
725,
3886,
30,
3792,
745,
364,
490,
725,
587,
5980,
315,
397,
4950,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
603,
1477,
12,
2799,
51,
1133,
871,
13,
1216,
587,
5980,
503,
565,
288,
3639,
1194,
18,
5129,
2932,
49,
725,
3886,
30,
3792,
745,
364,
490,
725,
587,
5980,
315,
397,
4950,
... |
public void addDocumentListener( DocumentListener listener ) { this.documentListeners.put( listener, listener ); | public void addDocumentListener(DocumentListener listener) { this.documentListeners.put(listener, listener); | public void addDocumentListener( DocumentListener listener ) { this.documentListeners.put( listener, listener ); } | 52947 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52947/b8e7e882552e228be1abb30206bccdead75ecbac/BasicPanel.java/buggy/src/java/org/xhtmlrenderer/swing/BasicPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
2519,
2223,
12,
4319,
2223,
2991,
262,
288,
3639,
333,
18,
5457,
5583,
18,
458,
12,
2991,
16,
2991,
11272,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
2519,
2223,
12,
4319,
2223,
2991,
262,
288,
3639,
333,
18,
5457,
5583,
18,
458,
12,
2991,
16,
2991,
11272,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
aClass.domainList = (ArrayList) domainList.clone(); aClass.addDomains = (ArrayList) addDomains.clone(); aClass.hitPointMap = new HashMap(hitPointMap); | aClass.domainList = (ArrayList<String>) domainList.clone(); aClass.addDomains = (ArrayList<String>) addDomains.clone(); aClass.hitPointMap = new HashMap<String, Integer>(hitPointMap); | public Object clone() { PCClass aClass = null; try { aClass = (PCClass) super.clone(); aClass.setSubClassKey(getSubClassKey());// aClass.setSubClassString(getSubClassString()); aClass.setProhibitedString(getProhibitedString()); aClass.setHitDie(hitDie);// aClass.setSkillPoints(skillPoints); aClass.setSkillPointFormula(skillPointFormula); aClass.setInitialFeats(initialFeats); aClass.setSpellBaseStat(spellBaseStat); aClass.setBonusSpellBaseStat(bonusSpellBaseStat); aClass.setSpellType(spellType); aClass.setAttackBonusType(attackBonusType); aClass.specialtyknownList = (ArrayList) specialtyknownList.clone(); aClass.knownList = (ArrayList) knownList.clone(); aClass.castMap = new HashMap(castMap); aClass.uattList = (ArrayList) uattList.clone(); aClass.acList = (ArrayList) acList.clone(); aClass.languageBonus = (TreeSet) languageBonus.clone(); aClass.weaponProfBonus = (ArrayList) weaponProfBonus.clone(); aClass.featList = (ArrayList) featList.clone();// aClass.vFeatList = (ArrayList) vFeatList.clone(); aClass.vFeatMap = new HashMap<String, List<Ability>>(vFeatMap); aClass.hitDieLockMap = new HashMap(hitDieLockMap); aClass.featAutos = (ArrayList<String>) featAutos.clone(); aClass.skillList = new ArrayList(); aClass.classSkillString = classSkillString; aClass.classSkillList = null; aClass.classSpellString = classSpellString; aClass.classSpellList = null; aClass.stableSpellKey = null; aClass.setSpecialsString(specialsString); aClass.setExClass(exClass); aClass.setLevelExchange(levelExchange); aClass.maxCastLevel = maxCastLevel; aClass.maxKnownLevel = maxKnownLevel; aClass.abbrev = abbrev; aClass.memorizeSpells = memorizeSpells; aClass.multiPreReqs = multiPreReqs; aClass.deityList = new ArrayList(deityList); aClass.maxLevel = maxLevel; aClass.knownSpellsList = new ArrayList(knownSpellsList); aClass.attackCycle = attackCycle; aClass.attackCycleMap = new HashMap(attackCycleMap); aClass.castAs = castAs; aClass.preRaceType = preRaceType; aClass.modToSkills = modToSkills; aClass.levelsPerFeat = levelsPerFeat; aClass.initMod = initMod; aClass.specialtyList = new ArrayList(specialtyList); //aClass.ageSet = ageSet; aClass.domainList = (ArrayList) domainList.clone(); aClass.addDomains = (ArrayList) addDomains.clone(); aClass.hitPointMap = new HashMap(hitPointMap); aClass.hasSubClass = hasSubClass; aClass.subClassList = subClassList; aClass.hasSpellFormulas = hasSpellFormulas; if (naturalWeapons != null) { aClass.naturalWeapons = (ArrayList) naturalWeapons.clone(); } } catch (CloneNotSupportedException exc) { ShowMessageDelegate.showMessageDialog(exc.getMessage(), Constants.s_APPNAME, MessageType.ERROR); } return aClass; } | 48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/746f9fbe7d3bb98c609b2f38fbc5ffad4e685726/PCClass.java/buggy/code/src/java/pcgen/core/PCClass.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
3236,
1435,
202,
95,
202,
202,
3513,
797,
20148,
273,
446,
31,
202,
202,
698,
202,
202,
95,
1082,
202,
69,
797,
273,
261,
3513,
797,
13,
2240,
18,
14056,
5621,
1082,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
3236,
1435,
202,
95,
202,
202,
3513,
797,
20148,
273,
446,
31,
202,
202,
698,
202,
202,
95,
1082,
202,
69,
797,
273,
261,
3513,
797,
13,
2240,
18,
14056,
5621,
1082,
2... |
protected Update createUpdateData( String target, Data data ) { UpdateData updateData = new UpdateData( ); updateData.setTarget( target ); updateData.setData( data ); Update update = new Update( ); update.setUpdateData( updateData ); return update; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/ef88ebb73afe5cc4540d743ddd181952658bcf20/AbstractBaseActionHandler.java/buggy/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/actionhandler/AbstractBaseActionHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
2315,
752,
1891,
751,
12,
514,
1018,
16,
1910,
501,
262,
202,
95,
202,
202,
1891,
751,
1089,
751,
273,
394,
2315,
751,
12,
11272,
202,
202,
2725,
751,
18,
542,
2326,
12,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
2315,
752,
1891,
751,
12,
514,
1018,
16,
1910,
501,
262,
202,
95,
202,
202,
1891,
751,
1089,
751,
273,
394,
2315,
751,
12,
11272,
202,
202,
2725,
751,
18,
542,
2326,
12,
10... | ||
if(LDMLUtilities.isDraft(fullyResolvedDoc, xpath)){ | if(fullyResolvedDoc!=null && LDMLUtilities.isDraft(fullyResolvedDoc, xpath)){ | private boolean isDraft(Node node, StringBuffer xpath){ //if the xpath contains : then it is a special node // turn off checking of draftness for this node if(xpath.indexOf(":")!=-1){ return false; } if(LDMLUtilities.isNodeDraft(node)){ return true; } if(LDMLUtilities.isDraft(fullyResolvedDoc, xpath)){ return true; } return false; } | 5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/eef8f63b22a2686e8cdebf9353ec6974b139783b/LDML2ICUConverter.java/buggy/icu4j/src/com/ibm/icu/dev/tool/cldr/LDML2ICUConverter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
353,
12714,
12,
907,
756,
16,
6674,
6748,
15329,
3639,
368,
430,
326,
6748,
1914,
294,
1508,
518,
353,
279,
4582,
756,
3639,
368,
7005,
3397,
6728,
434,
12246,
4496,
364,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
353,
12714,
12,
907,
756,
16,
6674,
6748,
15329,
3639,
368,
430,
326,
6748,
1914,
294,
1508,
518,
353,
279,
4582,
756,
3639,
368,
7005,
3397,
6728,
434,
12246,
4496,
364,
333,... |
return RubyFixnum.newFixnum(runtime, cal.get(Calendar.SECOND)); | return getRuntime().newFixnum(cal.get(Calendar.SECOND)); | public RubyInteger sec() { return RubyFixnum.newFixnum(runtime, cal.get(Calendar.SECOND)); } | 49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyTime.java/buggy/src/org/jruby/RubyTime.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
4522,
1428,
1435,
288,
3639,
327,
18814,
7675,
2704,
8585,
2107,
12,
771,
18,
588,
12,
7335,
18,
16328,
10019,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
4522,
1428,
1435,
288,
3639,
327,
18814,
7675,
2704,
8585,
2107,
12,
771,
18,
588,
12,
7335,
18,
16328,
10019,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
public boolean eIsSet(EStructuralFeature eFeature) { switch (eDerivedStructuralFeatureID(eFeature)) { case NotationPackage.NODE_ENTRY__VALUE: return value != VALUE_EDEFAULT; case NotationPackage.NODE_ENTRY__KEY: return key != null; } return eDynamicIsSet(eFeature); } | public boolean eIsSet(int featureID) { switch (featureID) { case NotationPackage.NODE_ENTRY__VALUE: return value != VALUE_EDEFAULT; case NotationPackage.NODE_ENTRY__KEY: return key != null; } return super.eIsSet(featureID); } | public boolean eIsSet(EStructuralFeature eFeature) { switch (eDerivedStructuralFeatureID(eFeature)) { case NotationPackage.NODE_ENTRY__VALUE: return value != VALUE_EDEFAULT; case NotationPackage.NODE_ENTRY__KEY: return key != null; } return eDynamicIsSet(eFeature); } | 1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/1d1e28c0f7853dd16bd3fe819770773ed4e61d20/NodeEntryImpl.java/buggy/org.eclipse.gmf.notation/plugins/org.eclipse.gmf.runtime.notation/src/org/eclipse/gmf/runtime/notation/impl/NodeEntryImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
20372,
12,
41,
14372,
4595,
425,
4595,
13,
288,
202,
202,
9610,
261,
73,
21007,
14372,
4595,
734,
12,
73,
4595,
3719,
288,
1082,
202,
3593,
2288,
367,
2261,
18,
8744,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
20372,
12,
41,
14372,
4595,
425,
4595,
13,
288,
202,
202,
9610,
261,
73,
21007,
14372,
4595,
734,
12,
73,
4595,
3719,
288,
1082,
202,
3593,
2288,
367,
2261,
18,
8744,
67... |
return (null != m_parentNode) ? m_parentNode.getSystemId() : null; | return this.getStylesheet().getHref(); | public String getSystemId () { return (null != m_parentNode) ? m_parentNode.getSystemId() : null; // return m_parentNode.getSystemId(); } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/4997f42cce0ddea6d8f0225a48d55beba0b66368/ElemTemplateElement.java/clean/src/org/apache/xalan/templates/ElemTemplateElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
12996,
548,
1832,
225,
288,
565,
327,
333,
18,
588,
24656,
7675,
588,
15962,
5621,
282,
368,
327,
312,
67,
2938,
907,
18,
588,
3163,
548,
5621,
225,
289,
2,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
12996,
548,
1832,
225,
288,
565,
327,
333,
18,
588,
24656,
7675,
588,
15962,
5621,
282,
368,
327,
312,
67,
2938,
907,
18,
588,
3163,
548,
5621,
225,
289,
2,
-100,
-100,
-100,... |
++segCount; if (coalescing && segCount > 1) { fail("Didn't expect multiple CHARACTERS segments when coalescing: first segment contained "+segOffset+" chars from the whole expected "+totalLen+" chars"); } StringBuffer sb = new StringBuffer(); int count; int offset = 0; int readCount = 0; | ++segCount; if (coalescing && segCount > 1) { fail("Didn't expect multiple CHARACTERS segments when coalescing: first segment contained "+segOffset+" chars from the whole expected "+totalLen+" chars"); } StringBuffer sb = new StringBuffer(); int count; int offset = 0; int readCount = 0; | private void doTest(boolean ns, boolean coalescing, boolean autoEntity) throws Exception { // This is bit hacky, but speeds up testing... if (sXmlInput == null) { initData(); } // And let's also check using different buffer sizes: for (int sz = 0; sz < 3; ++sz) { // Let's test different input methods too: for (int j = 0; j < 3; ++j) { XMLInputFactory f = getFactory(ns, coalescing, autoEntity); XMLStreamReader sr; switch (j) { case 0: // simple StringReader: sr = constructStreamReader(f, sXmlInput); break; case 1: // via InputStream and auto-detection /* It shouldn't really contain anything outside ISO-Latin; * however, detection may be tricky.. so let's just * test with UTF-8, for now? */ { ByteArrayInputStream bin = new ByteArrayInputStream (sXmlInput.getBytes("UTF-8")); sr = f.createXMLStreamReader(bin); } break; case 2: // explicit UTF-8 stream { ByteArrayInputStream bin = new ByteArrayInputStream (sXmlInput.getBytes("UTF-8")); Reader br = new InputStreamReader(bin, "UTF-8"); sr = f.createXMLStreamReader(br); } break; default: throw new Error("Internal error"); } char[] cbuf; if (sz == 0) { cbuf = new char[23]; } else if (sz == 1) { cbuf = new char[384]; } else { cbuf = new char[4005]; } assertEquals(START_ELEMENT, sr.next()); int segCount = 0; int totalLen = sExpResult.length(); StringBuffer totalBuf = new StringBuffer(totalLen); /* Ok; for each segment let's test separately first, * and then combine all the results together as well */ while (sr.next() == CHARACTERS) { // Where are we within the whole String? int segOffset = totalBuf.length(); ++segCount; // Should not get multiple when coalescing... if (coalescing && segCount > 1) { fail("Didn't expect multiple CHARACTERS segments when coalescing: first segment contained "+segOffset+" chars from the whole expected "+totalLen+" chars"); } StringBuffer sb = new StringBuffer(); int count; int offset = 0; int readCount = 0; while ((count = sr.getTextCharacters(offset, cbuf, 0, cbuf.length)) > 0) { ++readCount; sb.append(cbuf, 0, count); offset += count; } int expLen = sr.getTextLength(); // Sanity check #1: should get matching totals assertEquals ("Expected segment #"+segOffset+" (one-based; read with "+readCount+" reads) to have length of " +expLen+"; reported to have gotten just "+offset+" chars", expLen, offset); // Sanity check #2: and string buf should have it too assertEquals ("Expected segment #"+segOffset+" (one-based; read with "+readCount+" reads) to get " +expLen+" chars; StringBuffer only has "+sb.length(), expLen, sb.length()); totalBuf.append(sb); } assertTokenType(END_ELEMENT, sr.getEventType()); // Ok; all gotten, does it match? assertEquals("Expected total of "+totalLen+" chars, got "+totalBuf.length(), sExpResult.length(), totalBuf.length()); // Lengths are ok, but how about content? assertEquals(sExpResult, totalBuf.toString()); sr.close(); } } } | 2047 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2047/989e21e501d1e905cc7740f2f8572d6246280c93/TestGetSegmentedText.java/clean/dev/src/org/codehaus/stax/test/stream/TestGetSegmentedText.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
741,
4709,
12,
6494,
3153,
16,
1250,
1825,
287,
742,
310,
16,
1250,
3656,
1943,
13,
3639,
1216,
1185,
565,
288,
3639,
368,
1220,
353,
2831,
11769,
93,
16,
1496,
8632,
87,
731... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
4709,
12,
6494,
3153,
16,
1250,
1825,
287,
742,
310,
16,
1250,
3656,
1943,
13,
3639,
1216,
1185,
565,
288,
3639,
368,
1220,
353,
2831,
11769,
93,
16,
1496,
8632,
87,
731... |
method.offset = VM_Statics.allocateSlot(VM_Statics.METHOD) << LOG_BYTES_IN_INT; | method.offset = VM_Statics.allocateSlot(VM_Statics.METHOD); | public final synchronized void resolve() { if (isResolved()) return; if (VM.TraceClassLoading && VM.runningVM) VM.sysWriteln("VM_Class: (begin) resolve "+this); if (VM.VerifyAssertions) VM._assert(state == CLASS_LOADED); // Resolve superclass and super interfaces // if (superClass != null) { superClass.resolve(); } for (int i=0; i<declaredInterfaces.length; i++) { declaredInterfaces[i].resolve(); } if (isInterface()) { if (VM.VerifyAssertions) VM._assert(superClass == null); depth = 1; } else if (isJavaLangObjectType()) { if (VM.VerifyAssertions) VM._assert(superClass == null); instanceSize = VM_ObjectModel.computeScalarHeaderSize(this); alignment = BYTES_IN_ADDRESS; } else { if (VM.VerifyAssertions) VM._assert(superClass != null); depth = superClass.depth + 1; thinLockOffset = superClass.thinLockOffset; instanceSize = superClass.instanceSize; emptySlot = superClass.emptySlot; alignment= superClass.alignment; } if (isSynchronizedObject() || this == VM_Type.JavaLangClassType) VM_ObjectModel.allocateThinLock(this); if (VM.verboseClassLoading) VM.sysWrite("[Preparing "+this+"]\n"); // build field and method lists for this class // { VM_FieldVector staticFields = new VM_FieldVector(); VM_FieldVector instanceFields = new VM_FieldVector(); VM_MethodVector staticMethods = new VM_MethodVector(); VM_MethodVector constructorMethods = new VM_MethodVector(); VM_MethodVector virtualMethods = new VM_MethodVector(); // start with fields and methods of superclass // if (superClass != null) { VM_Field fields[] = superClass.getInstanceFields(); for (int i = 0, n = fields.length; i < n; ++i) instanceFields.addElement(fields[i]); VM_Method methods[] = superClass.getVirtualMethods(); for (int i = 0, n = methods.length; i < n; ++i) virtualMethods.addElement(methods[i]); } // append fields defined by this class // VM_Field fields[] = getDeclaredFields(); for (int i = 0, n = fields.length; i < n; ++i) { VM_Field field = fields[i]; if (field.isStatic()) staticFields.addElement(field); else instanceFields.addElement(field); } // append/overlay methods defined by this class // VM_Method methods[] = getDeclaredMethods(); for (int i = 0, n = methods.length; i < n; ++i) { VM_Method method = methods[i]; if (VM.VerifyUnint) { if (!method.isInterruptible() && method.isSynchronized()) { if (VM.ParanoidVerifyUnint || !LogicallyUninterruptiblePragma.declaredBy(method)) { VM.sysWriteln("WARNING: "+method+" cannot be both uninterruptible and synchronized"); } } } if (method.isObjectInitializer()) { VM_Callbacks.notifyMethodOverride(method, null); constructorMethods.addElement(method); } else if (method.isStatic()) { if (!method.isClassInitializer()) { VM_Callbacks.notifyMethodOverride(method, null); staticMethods.addElement(method); } } else { // Virtual method if (method.isSynchronized()) { VM_ObjectModel.allocateThinLock(this); } // method could override something in superclass - check for it // int superclassMethodIndex = -1; for (int j = 0, m = virtualMethods.size(); j < m; ++j) { VM_Method alreadyDefinedMethod = virtualMethods.elementAt(j); if (alreadyDefinedMethod.getName() == method.getName() && alreadyDefinedMethod.getDescriptor() == method.getDescriptor()) { // method already defined in superclass superclassMethodIndex = j; break; } } if (superclassMethodIndex == -1) { VM_Callbacks.notifyMethodOverride(method, null); virtualMethods.addElement(method); // append } else { VM_Method superc = (VM_Method)virtualMethods.elementAt(superclassMethodIndex); if (VM.VerifyUnint) { if (!superc.isInterruptible() && method.isInterruptible()) { VM.sysWriteln("WARNING: interruptible "+method+" overrides uninterruptible "+superc); } } VM_Callbacks.notifyMethodOverride(method, superc); virtualMethods.setElementAt(method, superclassMethodIndex); // override } } } // Deal with Miranda methods. // If this is an abstract class, then for each // interface that this class implements, ensure that a corresponding virtual // method is declared. If one is not, then create an abstract method to fill the void. if (!isInterface() && isAbstract()) { for (int i=0; i<declaredInterfaces.length; i++) { VM_Class I = declaredInterfaces[i]; VM_Method[] iMeths = I.getVirtualMethods(); outer: for (int j=0; j<iMeths.length; j++) { VM_Method iMeth = iMeths[j]; VM_Atom iName = iMeth.getName(); VM_Atom iDesc = iMeth.getDescriptor(); for (int k=0; k<virtualMethods.size(); k++) { VM_Method vMeth = virtualMethods.elementAt(k); if (vMeth.getName() == iName && vMeth.getDescriptor() == iDesc) continue outer; } VM_MemberReference mRef = VM_MemberReference.findOrCreate(typeRef, iName, iDesc); virtualMethods.addElement(new VM_AbstractMethod(this, mRef, ACC_ABSTRACT | ACC_PUBLIC, iMeth.getExceptionTypes())); } } } // If this is an interface, inherit methods from its superinterfaces if (isInterface()) { for (int i=0; i<declaredInterfaces.length; i++) { VM_Method[] meths = declaredInterfaces[i].getVirtualMethods(); for (int j=0; j<meths.length; j++) { virtualMethods.addUniqueElement(meths[j]); } } } this.staticFields = staticFields.finish(); this.instanceFields = instanceFields.finish(); this.staticMethods = staticMethods.finish(); this.constructorMethods = constructorMethods.finish(); this.virtualMethods = virtualMethods.finish(); } // allocate space for class fields // for (int i = 0, n = staticFields.length; i < n; ++i) { VM_Field field = staticFields[i]; VM_TypeReference fieldType = field.getType(); byte slotType; if (fieldType.isReferenceType()) slotType = VM_Statics.REFERENCE_FIELD; else if (fieldType.getSize() == BYTES_IN_LONG) slotType = VM_Statics.WIDE_NUMERIC_FIELD; else slotType = VM_Statics.NUMERIC_FIELD; field.offset = (VM_Statics.allocateSlot(slotType) << LOG_BYTES_IN_INT); // (SJF): Serialization nastily accesses even final private static // fields via pseudo-reflection! So, we must shove the // values of final static fields into the JTOC. Now // seems to be a good time. if (field.isFinal()) { setFinalStaticJTOCEntry(field,field.offset); } } // lay out instance fields // VM_ObjectModel.layoutInstanceFields(this); // count reference fields int referenceFieldCount = 0; for (int i = 0, n = instanceFields.length; i < n; ++i) { VM_Field field = instanceFields[i]; if (field.getType().isReferenceType()) referenceFieldCount += 1; } // record offsets of those instance fields that contain references // referenceOffsets = new int[referenceFieldCount]; for (int i = 0, j = 0, n = instanceFields.length; i < n; ++i) { VM_Field field = instanceFields[i]; if (field.getType().isReferenceType()) referenceOffsets[j++] = field.offset; } // Allocate space for <init> method pointers // for (int i = 0, n = constructorMethods.length; i < n; ++i) { VM_Method method = constructorMethods[i]; method.offset = VM_Statics.allocateSlot(VM_Statics.METHOD) << LOG_BYTES_IN_INT; } // Allocate space for static method pointers // for (int i = 0, n = staticMethods.length; i < n; ++i) { VM_Method method = staticMethods[i]; if (method.isClassInitializer()) { method.offset = 0xdeadbeef; // should never be used. } else { method.offset = VM_Statics.allocateSlot(VM_Statics.METHOD) << LOG_BYTES_IN_INT; } } // create "type information block" and initialize its first four words // if (isInterface()) { // the TIB for an Interface doesn't need space for IMT and VTable; will never be used. typeInformationBlock = MM_Interface.newTIB(TIB_FIRST_INTERFACE_METHOD_INDEX); } else { typeInformationBlock = MM_Interface.newTIB(TIB_FIRST_VIRTUAL_METHOD_INDEX + virtualMethods.length); } VM_Statics.setSlotContents(tibSlot, typeInformationBlock); // Initialize dynamic type checking data structures typeInformationBlock[TIB_TYPE_INDEX] = this; typeInformationBlock[TIB_SUPERCLASS_IDS_INDEX] = VM_DynamicTypeCheck.buildSuperclassIds(this); typeInformationBlock[TIB_DOES_IMPLEMENT_INDEX] = VM_DynamicTypeCheck.buildDoesImplement(this); // (element type for arrays not used classes) if (!isInterface()) { // lay out virtual method section of type information block // (to be filled in by instantiate) for (int i = 0, n = virtualMethods.length; i < n; ++i) { VM_Method method = virtualMethods[i]; method.offset = (TIB_FIRST_VIRTUAL_METHOD_INDEX + i) << LOG_BYTES_IN_ADDRESS; } } // RCGC: Determine if class is inherently acyclic acyclic = false; // must initially be false for recursive types boolean foundCyclic = false; for (int i = 0; i < instanceFields.length; i++) { VM_TypeReference ft = instanceFields[i].getType(); if (!(ft.isResolved() && ft.peekResolvedType().isAcyclicReference())) { foundCyclic = true; break; } } if (!foundCyclic) { acyclic = true; } state = CLASS_RESOLVED; // can't move this beyond "finalize" code block if (VM.writingBootImage) { //-#if RVM_WITH_OPT_COMPILER OptCLDepManager.classInitialized(this, true); //-#endif } VM_Callbacks.notifyClassResolved(this); MM_Interface.notifyClassResolved(this); // check for a "finalize" method that overrides the one in java.lang.Object // finalizeMethod = null; if (!isInterface()) { VM_Method finalize = findVirtualMethod(VM_ClassLoader.StandardObjectFinalizerMethodName, VM_ClassLoader.StandardObjectFinalizerMethodDescriptor); if (!finalize.getDeclaringClass().isJavaLangObjectType()) { finalizeMethod = finalize; } } if (VM.TraceClassLoading && VM.runningVM) VM.sysWriteln("VM_Class: (end) resolve " + this); } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/512b7ae853c6979c3f6acf302871ef9527123d44/VM_Class.java/buggy/rvm/src/vm/classLoader/VM_Class.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
3852,
918,
2245,
1435,
288,
565,
309,
261,
291,
12793,
10756,
327,
31,
565,
309,
261,
7397,
18,
3448,
797,
10515,
597,
8251,
18,
8704,
7397,
13,
8251,
18,
9499,
4913,
292,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
918,
2245,
1435,
288,
565,
309,
261,
291,
12793,
10756,
327,
31,
565,
309,
261,
7397,
18,
3448,
797,
10515,
597,
8251,
18,
8704,
7397,
13,
8251,
18,
9499,
4913,
292,
82... |
public QueuedDataRequest(ClientKey key, boolean localOnly, boolean cache, QueueingSimpleLowLevelClient client) { | public QueuedDataRequest(ClientKey key, boolean localOnly, boolean cache, QueueingSimpleLowLevelClient client, boolean ignoreStore) { | public QueuedDataRequest(ClientKey key, boolean localOnly, boolean cache, QueueingSimpleLowLevelClient client) { this.key = key; this.localOnly = localOnly; this.client = client; this.cache = cache; } | 49933 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49933/87760d0ac57e5e39f75661e91adeb3a9ffcc5dfb/QueuedDataRequest.java/buggy/src/freenet/node/QueuedDataRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
27949,
5957,
751,
691,
12,
1227,
653,
498,
16,
1250,
1191,
3386,
16,
1250,
1247,
16,
7530,
310,
5784,
10520,
2355,
1227,
1004,
13,
288,
202,
202,
2211,
18,
856,
273,
498,
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,
27949,
5957,
751,
691,
12,
1227,
653,
498,
16,
1250,
1191,
3386,
16,
1250,
1247,
16,
7530,
310,
5784,
10520,
2355,
1227,
1004,
13,
288,
202,
202,
2211,
18,
856,
273,
498,
31,
... |
public int getDeleted() { | public Integer getDeleted() { | public int getDeleted() { return this.deleted; } | 57211 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57211/b8a8391889e8b5c603d8e7c5baf0cf04fd9cf0c2/Habitat.java/buggy/trunk/src/net/sf/plantlore/common/record/Habitat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2144,
2343,
2993,
1435,
288,
3639,
327,
333,
18,
8600,
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,
... | [
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,
2144,
2343,
2993,
1435,
288,
3639,
327,
333,
18,
8600,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
return make.Literal(Position.NOPOS, new Long( 0 )) | return make.Literal(Position.NOPOS, new Float( 0 )) | Tree ignoreValue( Type asType ) { if( asType.isSameAs(defs.BYTE_TYPE )) return make.Literal(Position.NOPOS, new Long( 0 )) .setType( defs.INT_TYPE ); else if( asType.isSameAs( defs.CHAR_TYPE )) return make.Literal(Position.NOPOS, new Long( 0 )) .setType( defs.CHAR_TYPE ); else if( asType.isSameAs(defs.SHORT_TYPE )) return make.Literal(Position.NOPOS, new Long( 0 )) .setType( defs.SHORT_TYPE ); else if( asType.isSameAs(defs.INT_TYPE )) return Int( 0 ); else if( asType.isSameAs(defs.LONG_TYPE )) return make.Literal(Position.NOPOS, new Long( 0 )) .setType( defs.LONG_TYPE ); else if( asType.isSameAs(defs.FLOAT_TYPE )) return make.Literal(Position.NOPOS, new Long( 0 )) .setType( defs.FLOAT_TYPE ); else if( asType.isSameAs(defs.DOUBLE_TYPE )) return make.Literal(Position.NOPOS, new Long( 0 )) .setType( defs.DOUBLE_TYPE ); else if( asType.isSameAs(defs.BOOLEAN_TYPE )) return gen.mkBooleanLit(Position.NOPOS, false); else if( asType.isSameAs(defs.STRING_TYPE )) return make.Literal(Position.NOPOS, "") .setType( defs.STRING_TYPE ); /** FIX ME FOR THE NEW VERSION else return gen.Apply( Null( asType ), Tree.EMPTY_ARRAY); */ return null; // should not happen FIXME } | 48012 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48012/04e4c7ee186590b54a88ef33290d319d4cd4b60d/CodeFactory.java/buggy/sources/scalac/transformer/matching/CodeFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
4902,
2305,
620,
12,
1412,
31658,
262,
288,
5411,
309,
12,
31658,
18,
291,
8650,
1463,
12,
12537,
18,
15377,
67,
2399,
8623,
5375,
327,
1221,
18,
6177,
12,
2555,
18,
3417,
7057,
16,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
4902,
2305,
620,
12,
1412,
31658,
262,
288,
5411,
309,
12,
31658,
18,
291,
8650,
1463,
12,
12537,
18,
15377,
67,
2399,
8623,
5375,
327,
1221,
18,
6177,
12,
2555,
18,
3417,
7057,
16,
39... |
add(new ComponentDescription( "community-init", Agent.INSERTION_POINT+".Init", "org.cougaar.community.init.CommunityInitializerServiceComponent", null, null, null, null, null, ComponentDescription.PRIORITY_COMPONENT)); | if (isCommunityEnabled) { add(new ComponentDescription( "community-init", Agent.INSERTION_POINT+".Init", "org.cougaar.community.init.CommunityInitializerServiceComponent", null, null, null, null, null, ComponentDescription.PRIORITY_COMPONENT)); } | protected void loadComponentPriorityComponents() { add(new ComponentDescription( "community-init", Agent.INSERTION_POINT+".Init", "org.cougaar.community.init.CommunityInitializerServiceComponent", null, //codebase null, //params null, //certificate null, //lease null, //policy ComponentDescription.PRIORITY_COMPONENT)); add(new ComponentDescription( "asset-init", Agent.INSERTION_POINT+".Init", "org.cougaar.planning.ldm.AssetInitializerServiceComponent", null, //codebase null, //params null, //certificate null, //lease null, //policy ComponentDescription.PRIORITY_COMPONENT)); super.loadComponentPriorityComponents(); } | 7981 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7981/2ebb49f74d5cae06c9f0b6ea0d57759fd5bc91f4/NodeAgent.java/buggy/core/src/org/cougaar/core/node/NodeAgent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1262,
1841,
8183,
7171,
1435,
288,
565,
527,
12,
2704,
5435,
3291,
12,
1850,
315,
20859,
17,
2738,
3113,
1850,
8669,
18,
11356,
1146,
67,
8941,
9078,
18,
2570,
3113,
1850,
315,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1262,
1841,
8183,
7171,
1435,
288,
565,
527,
12,
2704,
5435,
3291,
12,
1850,
315,
20859,
17,
2738,
3113,
1850,
8669,
18,
11356,
1146,
67,
8941,
9078,
18,
2570,
3113,
1850,
315,... |
int nextB = 1; int nextC = 1; for (int i = 1; i < 500; i++) { stmt.executeUpdate("insert into #t0020a " + " values(" + i + ", " + " 'row" + i + "') " + ""); for (int j = nextB; (nextB % 5) != 0; j++, nextB++) { stmt.executeUpdate("insert into #t0020b " + " values(" + i + ", " + " " + j + ", " + " 'row" + i + "." + j + "' " + " )" + ""); for (int k = nextC; (nextC % 3) != 0; k++, nextC++) { stmt.executeUpdate("insert into #t0020c " + " values(" + j + ", " + " 'row" + i + "." + j + "." + k + "' " + " )" + ""); } } } | int nextB = 1; int nextC = 1; for (int i = 1; i < 500; i++) { stmt.executeUpdate("insert into #t0020a " + " values(" + i + ", " + " 'row" + i + "') " + ""); for (int j = nextB; (nextB % 5) != 0; j++, nextB++) { stmt.executeUpdate("insert into #t0020b " + " values(" + i + ", " + " " + j + ", " + " 'row" + i + "." + j + "' " + " )" + ""); for (int k = nextC; (nextC % 3) != 0; k++, nextC++) { stmt.executeUpdate("insert into #t0020c " + " values(" + j + ", " + " 'row" + i + "." + j + "." + k + "' " + " )" + ""); } } } | public void testStatements0020() throws Exception { Connection cx = getConnection(); dropTable("#t0020a"); dropTable("#t0020b"); dropTable("#t0020c"); Statement stmt = cx.createStatement(); stmt.executeUpdate("create table #t0020a ( " + " i1 int not null, " + " s1 char(10) not null " + ") " + ""); stmt.executeUpdate("create table #t0020b ( " + " i2a int not null, " + " i2b int not null, " + " s2 char(10) not null " + ") " + ""); stmt.executeUpdate("create table #t0020c ( " + " i3 int not null, " + " s3 char(10) not null " + ") " + ""); int nextB = 1; int nextC = 1; for (int i = 1; i < 500; i++) { stmt.executeUpdate("insert into #t0020a " + " values(" + i + ", " + " 'row" + i + "') " + ""); for (int j = nextB; (nextB % 5) != 0; j++, nextB++) { stmt.executeUpdate("insert into #t0020b " + " values(" + i + ", " + " " + j + ", " + " 'row" + i + "." + j + "' " + " )" + ""); for (int k = nextC; (nextC % 3) != 0; k++, nextC++) { stmt.executeUpdate("insert into #t0020c " + " values(" + j + ", " + " 'row" + i + "." + j + "." + k + "' " + " )" + ""); } } } Statement stmtA = cx.createStatement(); PreparedStatement stmtB = cx.prepareStatement( "select i2b, s2 from #t0020b where i2a=?"); PreparedStatement stmtC = cx.prepareStatement( "select s3 from #t0020c where i3=?"); ResultSet rs1 = stmtA.executeQuery("select i1 from #t0020a"); assertNotNull(rs1); while (rs1.next()) { int i1 = rs1.getInt("i1"); stmtB.setInt(1, rs1.getInt("i1")); ResultSet rs2 = stmtB.executeQuery(); assertNotNull(rs2); while (rs2.next()) { stmtC.setInt(1, rs2.getInt(1)); ResultSet rs3 = stmtC.executeQuery(); assertNotNull(rs3); if (rs3.next()) { // nop } } } } | 2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/7df6dc0065b654cd4e2b156461e0394d01dd13aa/TimestampTest.java/buggy/src.old/test/freetds/TimestampTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
14663,
713,
3462,
1435,
1216,
1185,
202,
95,
202,
202,
1952,
9494,
273,
6742,
5621,
202,
202,
7285,
1388,
2932,
7,
88,
713,
3462,
69,
8863,
202,
202,
7285,
1388,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
14663,
713,
3462,
1435,
1216,
1185,
202,
95,
202,
202,
1952,
9494,
273,
6742,
5621,
202,
202,
7285,
1388,
2932,
7,
88,
713,
3462,
69,
8863,
202,
202,
7285,
1388,
29... |
if (! (data[1] instanceof PAToken)) { throw new PainterException("repeat: wrong arguments"); | if (! (data[0] instanceof ArrayList)) { throw new PainterException("setdash: wrong arguments"); | public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[1] instanceof PAToken)) { throw new PainterException("repeat: wrong arguments"); } if (! (data[0] instanceof Number)) { throw new PainterException("repeat: wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("repeat: wrong arguments"); } int n = ( (Number) data[0]).intValue(); for (int i = 0; i < n; i++) { context.engine.process(patoken); } } | 3506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3506/3cd4a973dbdca1f7072d8e189d388c5a878cc9a6/PAContext.java/clean/itext/src/com/lowagie/text/pdf/codec/postscript/PAContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
8526,
31,
3639,
17988,
969,
9670,
969,
31,
3639,
501,
273,
819,
18,
5120,
3542,
5708,
12,
22,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
8526,
31,
3639,
17988,
969,
9670,
969,
31,
3639,
501,
273,
819,
18,
5120,
3542,
5708,
12,
22,
176... |
Scriptable s = ScriptRuntime.toObject(funObj, val); Scriptable scope = s.getParentScope(); return ScriptRuntime.call(cx, val, scope, ScriptRuntime.emptyArgs, scope); | Scriptable s = ScriptRuntime.toObject(scope, val); Scriptable topScope = s.getParentScope(); return ScriptRuntime.call(cx, val, topScope, ScriptRuntime.emptyArgs, topScope); | private static Object jsFunction_call(Context cx, Scriptable thisObj, Object[] args, Function funObj) throws JavaScriptException { Object val = thisObj.getDefaultValue(ScriptRuntime.FunctionClass); if (args.length == 0) { Scriptable s = ScriptRuntime.toObject(funObj, val); Scriptable scope = s.getParentScope(); return ScriptRuntime.call(cx, val, scope, ScriptRuntime.emptyArgs, scope); } else { Scriptable newThis = args[0] == null ? ScriptableObject.getTopLevelScope(thisObj) : ScriptRuntime.toObject(funObj, args[0]); Object[] newArgs = new Object[args.length - 1]; System.arraycopy(args, 1, newArgs, 0, newArgs.length); return ScriptRuntime.call(cx, val, newThis, newArgs, newThis); } } | 12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/ea784f12624d5ef9899dfbae006ec438e546253e/BaseFunction.java/buggy/js/rhino/src/org/mozilla/javascript/BaseFunction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1033,
3828,
2083,
67,
1991,
12,
1042,
9494,
16,
22780,
15261,
16,
29159,
1033,
8526,
833,
16,
4284,
9831,
2675,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
1033,
1244,
273,
152... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1991,
12,
1042,
9494,
16,
22780,
15261,
16,
29159,
1033,
8526,
833,
16,
4284,
9831,
2675,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
1033,
1244,
273,
152... |
HttpServletRequest request = ( HttpServletRequest ) runOptions | HttpServletRequest request = (HttpServletRequest) runOptions | public String runReport( IViewerReportDesignHandle design, String outputDocName, InputOptions runOptions, Map parameters ) throws ReportServiceException { IReportRunnable runnable; String reportDesignName = design.getFileName( ); HttpServletRequest request = ( HttpServletRequest ) runOptions .getOption( InputOptions.OPT_REQUEST ); Locale locale = ( Locale ) runOptions .getOption( InputOptions.OPT_LOCALE ); try { runnable = ReportEngineService.getInstance( ).openReportDesign( reportDesignName ); } catch ( EngineException e ) { throw new ReportServiceException( e.getLocalizedMessage( ) ); } Map parsedParams = getParsedParameters( design, runOptions, parameters ); try { ReportEngineService.getInstance( ).runReport( request, runnable, outputDocName, locale, ( HashMap ) parsedParams ); } catch ( RemoteException e ) { e.printStackTrace( ); throw new ReportServiceException( e.getLocalizedMessage( ) ); } return outputDocName; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/4f2d0a24ff9ec8881defea107bb54374df18cb9c/BirtViewerReportService.java/buggy/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/BirtViewerReportService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1086,
4820,
12,
467,
18415,
4820,
15478,
3259,
8281,
16,
1082,
202,
780,
876,
1759,
461,
16,
2741,
1320,
1086,
1320,
16,
1635,
1472,
262,
1082,
202,
15069,
8706,
15133,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1086,
4820,
12,
467,
18415,
4820,
15478,
3259,
8281,
16,
1082,
202,
780,
876,
1759,
461,
16,
2741,
1320,
1086,
1320,
16,
1635,
1472,
262,
1082,
202,
15069,
8706,
15133,
202... |
getJsp().include(CmsWorkplaceAction.C_JSP_WORKPLACE_COMMONS_PATH + "error.html"); | getJsp().include(CmsWorkplaceAction.C_PATH_JSP_WORKPLACE_COMMONS + "error.html"); | public void actionRename() throws JspException { // save initialized instance of this class in request attribute for included sub-elements getJsp().getRequest().setAttribute(C_SESSION_WORKPLACE_CLASS, this); try { performRenameOperation(); // if no exception is caused rename operation was successful getJsp().include(CmsWorkplaceAction.C_JSP_WORKPLACE_FILELIST); } catch (CmsException e) { // prepare common message part String message = "<p>\n" + key("source") + ": " + getParamFile() + "<br>\n" + key("target") + ": " + getParamTarget() + "\n</p>\n"; // error during copy, show error dialog setParamErrorstack(e.getStackTraceAsString()); setParamMessage(message + key("error.message." + getParamDialogtype())); getJsp().include(CmsWorkplaceAction.C_JSP_WORKPLACE_COMMONS_PATH + "error.html"); } } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/b578cd7fdb67e88db69ff83766c892199ea7498f/CmsRename.java/buggy/src/org/opencms/workplace/CmsRename.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1301,
16019,
1435,
1216,
27485,
288,
3639,
368,
1923,
6454,
791,
434,
333,
667,
316,
590,
1566,
364,
5849,
720,
17,
6274,
3639,
31162,
7675,
588,
691,
7675,
542,
1499,
12,
39,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1301,
16019,
1435,
1216,
27485,
288,
3639,
368,
1923,
6454,
791,
434,
333,
667,
316,
590,
1566,
364,
5849,
720,
17,
6274,
3639,
31162,
7675,
588,
691,
7675,
542,
1499,
12,
39,
... |
((NSWindowController) familyEditWindow.delegate()).setDocument(this); if (((NSButton) sender).tag() == 1) { ((FamilyEditController) familyEditWindow.delegate()).setFamily(primaryIndividual.getFamilyAsChild()); } NSApplication nsapp = NSApplication.sharedApplication(); nsapp.beginSheet(familyEditWindow, mainWindow, this, new NSSelector("sheetDidEndShouldClose2", new Class[]{}), null); } | ( (NSWindowController) familyEditWindow.delegate()).setDocument(this); if ( ( (NSButton) sender).tag() == 1) { ( (FamilyEditController) familyEditWindow.delegate()).setFamily(primaryIndividual.getFamilyAsChild()); } NSApplication nsapp = NSApplication.sharedApplication(); nsapp.beginSheet(familyEditWindow, mainWindow, this, new NSSelector("sheetDidEndShouldClose2", new Class[] {}), null); } | public void openFamilyEditSheet(Object sender) { /* IBAction */ ((NSWindowController) familyEditWindow.delegate()).setDocument(this); if (((NSButton) sender).tag() == 1) { ((FamilyEditController) familyEditWindow.delegate()).setFamily(primaryIndividual.getFamilyAsChild()); } NSApplication nsapp = NSApplication.sharedApplication(); nsapp.beginSheet(familyEditWindow, mainWindow, this, new NSSelector("sheetDidEndShouldClose2", new Class[]{}), null); //nsapp.runModalForWindow(familyEditWindow); //nsapp.endSheet(familyEditWindow); //familyEditWindow.orderOut(this); } | 6190 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6190/7b30da2f47cbda6e16406770c133332adb1b4079/MyDocument.java/clean/MacPAF/src/MyDocument.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1696,
9203,
4666,
8229,
12,
921,
5793,
13,
288,
1748,
23450,
1803,
1195,
3639,
14015,
3156,
3829,
2933,
13,
6755,
4666,
3829,
18,
22216,
1435,
2934,
542,
2519,
12,
2211,
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,
918,
1696,
9203,
4666,
8229,
12,
921,
5793,
13,
288,
1748,
23450,
1803,
1195,
3639,
14015,
3156,
3829,
2933,
13,
6755,
4666,
3829,
18,
22216,
1435,
2934,
542,
2519,
12,
2211,
1769,
... |
return getValue() > otherVal ? 1 : getValue() < otherVal ? -1 : 0; | return getLongValue() > otherVal ? 1 : getLongValue() < otherVal ? -1 : 0; | protected int compareValue(RubyNumeric other) { if (other instanceof RubyBignum) { return ((RubyBignum)other).compareValue(this) * -1; } else if (other instanceof RubyFloat) { double otherVal = other.getDoubleValue(); double thisVal = getDoubleValue(); return thisVal > otherVal ? 1 : thisVal < otherVal ? -1 : 0; } else { long otherVal = other.getLongValue(); return getValue() > otherVal ? 1 : getValue() < otherVal ? -1 : 0; } } | 50993 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50993/786cea08c1dd2092a02d1254b49fbee371ace5f9/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
509,
3400,
620,
12,
54,
10340,
9902,
1308,
13,
288,
3639,
309,
261,
3011,
1276,
19817,
38,
724,
379,
13,
288,
5411,
327,
14015,
54,
10340,
38,
724,
379,
13,
3011,
2934,
9877,
620,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
3400,
620,
12,
54,
10340,
9902,
1308,
13,
288,
3639,
309,
261,
3011,
1276,
19817,
38,
724,
379,
13,
288,
5411,
327,
14015,
54,
10340,
38,
724,
379,
13,
3011,
2934,
9877,
620,... |
if (connection.haveMinimumServerVersion("7.1")) { | if (connection.haveMinimumServerVersion("7.2")) { | public java.sql.ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String types[]) throws SQLException { String select; String orderby; String useSchemas; if (connection.haveMinimumServerVersion("7.3")) { useSchemas = "SCHEMAS"; select = "SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS TABLE_NAME, "+ " CASE n.nspname LIKE 'pg\\\\_%' "+ " WHEN true THEN CASE n.nspname "+ " WHEN 'pg_catalog' THEN CASE c.relkind "+ " WHEN 'r' THEN 'SYSTEM TABLE' "+ " WHEN 'v' THEN 'SYSTEM VIEW' "+ " WHEN 'i' THEN 'SYSTEM INDEX' "+ " ELSE NULL "+ " END "+ " WHEN 'pg_toast' THEN CASE c.relkind "+ " WHEN 'r' THEN 'SYSTEM TOAST TABLE' "+ " WHEN 'i' THEN 'SYSTEM TOAST INDEX' "+ " ELSE NULL "+ " END "+ " ELSE CASE c.relkind "+ " WHEN 'r' THEN 'TEMPORARY TABLE' "+ " WHEN 'i' THEN 'TEMPORARY INDEX' "+ " ELSE NULL "+ " END "+ " END "+ " WHEN false THEN CASE c.relkind "+ " WHEN 'r' THEN 'TABLE' "+ " WHEN 'i' THEN 'INDEX' "+ " WHEN 'S' THEN 'SEQUENCE' "+ " WHEN 'v' THEN 'VIEW' "+ " ELSE NULL "+ " END "+ " ELSE NULL "+ " END "+ " AS TABLE_TYPE, d.description AS REMARKS "+ " FROM pg_catalog.pg_namespace n, pg_catalog.pg_class c "+ " LEFT JOIN pg_catalog.pg_description d ON (c.oid = d.objoid AND d.objsubid = 0) "+ " LEFT JOIN pg_catalog.pg_class dc ON (d.classoid=dc.oid AND dc.relname='pg_class') "+ " LEFT JOIN pg_catalog.pg_namespace dn ON (dn.oid=dc.relnamespace AND dn.nspname='pg_catalog') "+ " WHERE c.relnamespace = n.oid "; if (schemaPattern != null && !"".equals(schemaPattern)) { select += " AND n.nspname LIKE '"+escapeQuotes(schemaPattern)+"' "; } if (tableNamePattern != null) { select += " AND c.relname LIKE '"+escapeQuotes(tableNamePattern)+"' "; } orderby = " ORDER BY TABLE_TYPE,TABLE_SCHEM,TABLE_NAME "; } else { useSchemas = "NOSCHEMAS"; String tableType = ""+ " CASE c.relname LIKE 'pg\\\\_%' "+ " WHEN true THEN CASE c.relname LIKE 'pg\\\\_toast\\\\_%' "+ " WHEN true THEN CASE c.relkind "+ " WHEN 'r' THEN 'SYSTEM TOAST TABLE' "+ " WHEN 'i' THEN 'SYSTEM TOAST INDEX' "+ " ELSE NULL "+ " END "+ " WHEN false THEN CASE c.relname LIKE 'pg\\\\_temp\\\\_%' "+ " WHEN true THEN CASE c.relkind "+ " WHEN 'r' THEN 'TEMPORARY TABLE' "+ " WHEN 'i' THEN 'TEMPORARY INDEX' "+ " ELSE NULL "+ " END "+ " WHEN false THEN CASE c.relkind "+ " WHEN 'r' THEN 'SYSTEM TABLE' "+ " WHEN 'v' THEN 'SYSTEM VIEW' "+ " WHEN 'i' THEN 'SYSTEM INDEX' "+ " ELSE NULL "+ " END "+ " ELSE NULL "+ " END "+ " ELSE NULL "+ " END "+ " WHEN false THEN CASE c.relkind "+ " WHEN 'r' THEN 'TABLE' "+ " WHEN 'i' THEN 'INDEX' "+ " WHEN 'S' THEN 'SEQUENCE' "+ " WHEN 'v' THEN 'VIEW' "+ " ELSE NULL "+ " END "+ " ELSE NULL "+ " END "; orderby = " ORDER BY TABLE_TYPE,TABLE_NAME "; if (connection.haveMinimumServerVersion("7.1")) { select = "SELECT NULL AS TABLE_CAT, NULL AS TABLE_SCHEM, c.relname AS TABLE_NAME, "+tableType+" AS TABLE_TYPE, d.description AS REMARKS "+ " FROM pg_class c "+ " LEFT JOIN pg_description d ON (c.oid=d.objoid AND d.objsubid = 0) "+ " LEFT JOIN pg_class dc ON (d.classoid = dc.oid AND dc.relname='pg_class') "+ " WHERE true "; } else { select = "SELECT NULL AS TABLE_CAT, NULL AS TABLE_SCHEM, c.relname AS TABLE_NAME, "+tableType+" AS TABLE_TYPE, NULL AS REMARKS "+ " FROM pg_class c "+ " WHERE true "; } } if (types == null) { types = defaultTableTypes; } String sql = select; sql += " AND (false "; for (int i=0; i<types.length; i++) { Hashtable clauses = (Hashtable)tableTypeClauses.get(types[i]); if (clauses != null) { String clause = (String)clauses.get(useSchemas); sql += " OR ( "+clause+" ) "; } } sql += ") "; sql += orderby; return connection.createStatement().executeQuery(sql); } | 46409 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46409/d9d59ca65ef44a3c330ff41d90fedf57e34aadd1/AbstractJdbc1DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
29002,
12,
780,
6222,
16,
514,
1963,
3234,
16,
514,
4775,
3234,
16,
514,
1953,
63,
5717,
1216,
6483,
202,
95,
202,
202,
780,
2027,
31,
202,
202,
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,
225,
202,
482,
2252,
18,
4669,
18,
13198,
29002,
12,
780,
6222,
16,
514,
1963,
3234,
16,
514,
4775,
3234,
16,
514,
1953,
63,
5717,
1216,
6483,
202,
95,
202,
202,
780,
2027,
31,
202,
202,
7... |
skipBytes(18); readColor(data.gradientBackgroundColors[0]); skipBytes(18); | data.gradientBackgroundColors[0] = data.gradientBackgroundColors[1]; | private void readMeshChunk(int bytesToRead, ObjectMesh data) throws IOException { int bytes_read = 0; while(bytes_read < bytesToRead) { int type = readUnsignedShort(); int size = readInt(); switch(type) { case MaxConstants.NAMED_OBJECT: readObjectBlock(size - 6, data); break; case MaxConstants.MATERIAL_BLOCK: readMaterialBlock(size - 6, data); break; case MaxConstants.MASTER_SCALE: data.masterScale = readFloat(); break; case MaxConstants.MESH_VERSION: data.meshVersion = readInt(); break; case MaxConstants.AMBIENT_LIGHT: data.ambientLight = new float[3]; int read = readColor(data.ambientLight); if(size - read - 6 != 0) skipBytes(size - read - 6); break; // Deliberately ignored case MaxConstants.LOW_SHADOW_BIAS: case MaxConstants.HI_SHADOW_BIAS: case MaxConstants.SHADOW_MAP_SIZE: case MaxConstants.SHADOW_MAP_SAMPLES: case MaxConstants.SHADOW_MAP_RANGE: case MaxConstants.SHADOW_MAP_FILTER: case MaxConstants.RAY_BIAS: case MaxConstants.O_CONST: case MaxConstants.VIEWPORT_LAYOUT_OLD: case MaxConstants.VIEWPORT_LAYOUT: case MaxConstants.NETWORK_VIEW: skipBytes(size - 6); break; case MaxConstants.BITMAP: data.backgroundBitmap = readString(); break; case MaxConstants.SOLID_BG: data.solidBackgroundColor = new float[3]; if(releaseVersion == 3) { // Skip the COLOR_F section skipBytes(18); readColor(data.solidBackgroundColor); } else { readColor(data.solidBackgroundColor); } break; case MaxConstants.V_GRADIENT: data.backgroundMidpoint = readFloat(); // midpoint of gradient data.gradientBackgroundColors = new float[3][3]; if(releaseVersion == 3) { // Basically need to skip each of the COLOR_F sections, // which are 18 bytes each. skipBytes(18); readColor(data.gradientBackgroundColors[0]); skipBytes(18); readColor(data.gradientBackgroundColors[1]); skipBytes(18); readColor(data.gradientBackgroundColors[2]); } else { readColor(data.gradientBackgroundColors[0]); readColor(data.gradientBackgroundColors[1]); readColor(data.gradientBackgroundColors[2]); } break; case MaxConstants.USE_V_GRADIENT: data.selectedBackground = ObjectMesh.USE_GRADIENT; break; case MaxConstants.USE_SOLID_BG: data.selectedBackground = ObjectMesh.USE_SOLID_BG; break; case MaxConstants.USE_BITMAP: data.selectedBackground = ObjectMesh.USE_BITMAP; break; case MaxConstants.FOG: data.linearFogDetails = new float[4]; data.fogColor = new float[3]; data.linearFogDetails[0] = readFloat(); data.linearFogDetails[1] = readFloat(); data.linearFogDetails[2] = readFloat(); data.linearFogDetails[3] = readFloat(); read = readColor(data.fogColor); // have the fog background flag? if(size - read - 16 - 6 != 0) { readUnsignedShort(); readInt(); data.fogBackground = true; } break; case MaxConstants.LAYER_FOG: data.layerFogDetails = new float[4]; data.fogColor = new float[3]; data.layerFogDetails[0] = readFloat(); data.layerFogDetails[1] = readFloat(); data.layerFogDetails[2] = readFloat(); data.layerFogFlags = readInt(); readColor(data.fogColor); break; case MaxConstants.DISTANCE_CUE: data.distanceFogDetails = new float[4]; data.distanceFogDetails[0] = readFloat(); data.distanceFogDetails[1] = readFloat(); data.distanceFogDetails[2] = readFloat(); data.distanceFogDetails[3] = readFloat(); if(size - 16 - 6 != 0) { readUnsignedShort(); readInt(); data.fogBackground = true; } break; case MaxConstants.USE_FOG: data.selectedBackground = ObjectMesh.USE_LINEAR_FOG; break; case MaxConstants.USE_LAYER_FOG: data.selectedBackground = ObjectMesh.USE_LAYER_FOG; break; case MaxConstants.USE_DISTANCE_CUE: data.selectedBackground = ObjectMesh.USE_DISTANCE_FOG; break; case MaxConstants.DEFAULT_VIEW: // Ignore it. Only used for commandline rendering. skipBytes(size - 6); break; default: System.out.println("Unknown mesh chunk ID 0x" + Integer.toHexString(type) + " size " + size); skipBytes(size - 6); } bytes_read += size; } if(bytes_read != bytesToRead) System.out.println("Incorrect bytes read from file for mesh chunk. " + "Read: " + bytes_read + " required " + bytesToRead); } | 46075 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46075/f69ae03316b731655ae04df7e6d331bd7d3809c5/MaxParser.java/clean/src/java/org/j3d/loaders/discreet/MaxParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
855,
16748,
5579,
12,
474,
1731,
23321,
16,
1033,
16748,
501,
13,
3639,
1216,
1860,
565,
288,
3639,
509,
1731,
67,
896,
273,
374,
31,
3639,
1323,
12,
3890,
67,
896,
411,
1731... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
855,
16748,
5579,
12,
474,
1731,
23321,
16,
1033,
16748,
501,
13,
3639,
1216,
1860,
565,
288,
3639,
509,
1731,
67,
896,
273,
374,
31,
3639,
1323,
12,
3890,
67,
896,
411,
1731... |
if (element instanceof IActivityManager || element instanceof ICategory) return true; | if (element instanceof IActivityManager || element instanceof ICategory) { return true; } | public boolean hasChildren(Object element) { if (element instanceof IActivityManager || element instanceof ICategory) return true; return false; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/ActivityCategoryContentProvider.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ws/ActivityCategoryContentProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
27780,
12,
921,
930,
13,
288,
3639,
309,
261,
2956,
1276,
467,
6193,
1318,
747,
930,
1276,
467,
4457,
13,
5411,
327,
638,
31,
3639,
327,
629,
31,
565,
289,
2,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
27780,
12,
921,
930,
13,
288,
3639,
309,
261,
2956,
1276,
467,
6193,
1318,
747,
930,
1276,
467,
4457,
13,
5411,
327,
638,
31,
3639,
327,
629,
31,
565,
289,
2,
-100,
-100,
... |
super.endJob(); | taxas.removeListener(this); } super.endJob(); | public void endJob(){ if (taxas!=null) { int numTaxas = taxas.size(); for (int i=0; i<numTaxas; i++){ Taxa taxa = (Taxa)taxas.elementAt(i); taxa.removeListener(this); } taxas.removeListener(this); } super.endJob(); } | 55939 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55939/4206c41443aabb1ef72acb8448b91615c4d37d47/ManageTrees.java/clean/Source/mesquite/trees/ManageTrees/ManageTrees.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
679,
2278,
1435,
95,
1082,
202,
430,
261,
8066,
345,
5,
33,
2011,
13,
288,
9506,
202,
474,
818,
7731,
345,
273,
5320,
345,
18,
1467,
5621,
9506,
202,
1884,
261,
474,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
679,
2278,
1435,
95,
1082,
202,
430,
261,
8066,
345,
5,
33,
2011,
13,
288,
9506,
202,
474,
818,
7731,
345,
273,
5320,
345,
18,
1467,
5621,
9506,
202,
1884,
261,
474,
27... |
ruby.getCBase().setClassVar(iVisited.getName(), result.toRubyObject()); | ruby.getCBase().setClassVar(iVisited.getName(), result); | public void visitClassVarAsgnNode(ClassVarAsgnNode iVisited) { eval(iVisited.getValueNode()); ruby.getCBase().setClassVar(iVisited.getName(), result.toRubyObject()); } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/f235ab756f32ea9496f8f880066b46ad95ebb692/EvaluateVisitor.java/clean/org/jruby/evaluator/EvaluateVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
797,
1537,
37,
1055,
82,
907,
12,
797,
1537,
37,
1055,
82,
907,
277,
30019,
13,
288,
3639,
5302,
12,
77,
30019,
18,
24805,
907,
10663,
3639,
22155,
18,
588,
39,
2171,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
797,
1537,
37,
1055,
82,
907,
12,
797,
1537,
37,
1055,
82,
907,
277,
30019,
13,
288,
3639,
5302,
12,
77,
30019,
18,
24805,
907,
10663,
3639,
22155,
18,
588,
39,
2171,
... |
public void setAlbumList( ArrayList albumList ) { if ( albumList == null ) { throw new IllegalArgumentException( "Must supply non-null album list." ); } ArrayList oldList = this.albumList; this.albumList = albumList; if ( albumList.size() > 0 ) { selectedAlbum = (Album) this.albumList.get(0); } if (oldList != null) { for (Iterator i = oldList.iterator(); i.hasNext(); ) { Album a = (Album) i.next(); Log.log(Log.TRACE, MODULE, a.toString()); if (! a.getPicturesVector().isEmpty()) { Log.log(Log.TRACE, MODULE, "Album " + a + " had pictures"); int j = albumList.indexOf(a); if (j != -1) { Album newAlbum = (Album) albumList.get(j); newAlbum.setPicturesVector(a.getPicturesVector()); } } } } notifyListeners(); } | 9402 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9402/ea127f323e1d7cd189022722ec6a07daf7a18368/Gallery.java/clean/com/gallery/GalleryRemote/model/Gallery.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
30330,
682,
12,
2407,
14844,
682,
262,
288,
202,
202,
430,
261,
14844,
682,
422,
446,
262,
288,
1082,
202,
12849,
394,
2754,
12,
315,
10136,
14467,
1661,
17,
2011,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
30330,
682,
12,
2407,
14844,
682,
262,
288,
202,
202,
430,
261,
14844,
682,
422,
446,
262,
288,
1082,
202,
12849,
394,
2754,
12,
315,
10136,
14467,
1661,
17,
2011,
1... | ||
assertNull(JspStringUtil.escapeHtmlEntities(null)); assertEquals(JspStringUtil.escapeHtmlEntities(""), ""); assertEquals(JspStringUtil.escapeHtmlEntities(" abc def "), " abc def "); assertEquals(JspStringUtil.escapeHtmlEntities("&"), "&"); assertEquals(JspStringUtil.escapeHtmlEntities("&&&\n<<< >>>\t\"\"\""), "&&&\n<<< >>>\t""""); | public void testStringUtils(){ // underlineAccessKey assertEquals(JspStringUtil.underlineAccessKey("",""), ""); assertEquals(JspStringUtil.underlineAccessKey("aaa",""), "aaa"); assertNull(JspStringUtil.underlineAccessKey(null, "a")); assertEquals(JspStringUtil.underlineAccessKey("Some string", "So"), "Some string"); assertEquals(JspStringUtil.underlineAccessKey("Some string", null), "Some string"); assertEquals(JspStringUtil.underlineAccessKey("Some string", "s"), "<u>S</u>ome string"); assertEquals(JspStringUtil.underlineAccessKey("s", "s"), "<u>s</u>"); assertEquals(JspStringUtil.underlineAccessKey(" \n\tõüöä\n\t", "Õ"), " \n\t<u>õ</u>üöä\n\t"); assertEquals(JspStringUtil.underlineAccessKey("<u>this</u>","U"),"<<u>u</u>>this</u>"); // escapeHtmlEntities assertNull(JspStringUtil.escapeHtmlEntities(null)); assertEquals(JspStringUtil.escapeHtmlEntities(""), ""); assertEquals(JspStringUtil.escapeHtmlEntities(" abc def "), " abc def "); assertEquals(JspStringUtil.escapeHtmlEntities("&"), "&"); assertEquals(JspStringUtil.escapeHtmlEntities("&&&\n<<< >>>\t\"\"\""), "&&&\n<<< >>>\t""""); } | 53585 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53585/ad0af2022e5921dc9a36d0d5cf62e390b55b6743/StringUtilTest.java/clean/src/org/araneaframework/jsp/tests/StringUtilTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
780,
1989,
1435,
95,
202,
202,
759,
25985,
21241,
202,
202,
11231,
8867,
12,
21796,
13565,
18,
9341,
1369,
21241,
2932,
3113,
3660,
3631,
1408,
1769,
202,
202,
11231,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
780,
1989,
1435,
95,
202,
202,
759,
25985,
21241,
202,
202,
11231,
8867,
12,
21796,
13565,
18,
9341,
1369,
21241,
2932,
3113,
3660,
3631,
1408,
1769,
202,
202,
11231,
... | |
cdiTarget=session.getCurrentTarget(); | ICDITarget[] targets = session.getTargets(); assertNotNull(targets); assertTrue(targets.length > 0); cdiTarget = targets[0]; | public void testIsEquals() throws CoreException, MIException, IOException, CDIException { ICDITarget cdiTarget; ICDILocation location, location2; ICDIBreakpoint[] breakpoints; ICDILocationBreakpoint curbreak; session=CDebugHelper.createSession("main",testProject); assertNotNull(session); cdiTarget=session.getCurrentTarget(); assertNotNull(cdiTarget); /********************************************************************** * Simple test.. this should work. **********************************************************************/ location=cdiTarget.createLocation("main.c", "func1", 0); location2=cdiTarget.createLocation("main.c", "func1", 0); assertTrue(location.equals(location2)); /********************************************************************** * Simple test.. this should work. **********************************************************************/ location=cdiTarget.createLocation("main.c", null, 10); location2=cdiTarget.createLocation("main.c", null, 10); assertTrue(location.equals(location2)); /********************************************************************** * make sure that the location returned from getLocation on the * ICDILocationBreakpoint.getLocation that is returned from * setLocationBreakpoint is the same as the breakpoint returned from * BreakpointManager.getBreakpoints.getLocation() **********************************************************************/ location=cdiTarget.createLocation("main.c", "func1", 0); assertNotNull(location); location2=cdiTarget.setLocationBreakpoint(0, location, null, false).getLocation(); breakpoints=cdiTarget.getBreakpoints(); assertNotNull(breakpoints); assertTrue(breakpoints.length==1); if (breakpoints[0] instanceof ICDILocationBreakpoint) { curbreak=(ICDILocationBreakpoint) breakpoints[0]; } else curbreak=null; assertNotNull(curbreak); assertTrue(curbreak.getLocation().equals(location2)); cdiTarget.deleteAllBreakpoints(); /* Create a break point on a generic function with a file name that * gdb will change to the relitive path of the source file. This * should work, but at the time of writing (Sept 25, 2002) does not. */ location=cdiTarget.createLocation("main.c", "func1", 0); assertNotNull(location); cdiTarget.setLocationBreakpoint(0, location, null, false); breakpoints=cdiTarget.getBreakpoints(); assertNotNull(breakpoints); assertTrue(breakpoints.length==1); if (breakpoints[0] instanceof ICDILocationBreakpoint) { curbreak=(ICDILocationBreakpoint) breakpoints[0]; } else curbreak=null; assertNotNull(curbreak); assertTrue("PR:23879",curbreak.getLocation().equals(location)); /* clean up the session */ session.terminate(); session=null; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/479dfcc366623938310d4ddfe76e24068050e6de/LocationTests.java/buggy/debug/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/LocationTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2520,
8867,
1435,
1216,
30015,
16,
20806,
503,
16,
1860,
16,
385,
2565,
503,
288,
3639,
467,
10160,
1285,
826,
276,
3211,
2326,
31,
3639,
26899,
2565,
2735,
2117,
16,
211... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2520,
8867,
1435,
1216,
30015,
16,
20806,
503,
16,
1860,
16,
385,
2565,
503,
288,
3639,
467,
10160,
1285,
826,
276,
3211,
2326,
31,
3639,
26899,
2565,
2735,
2117,
16,
211... |
protected abstract void delegatePhase(); | public static final void delegatePhase(int phaseId) { delegatePhase(phases[phaseId]); } | protected abstract void delegatePhase(); | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/4c66aa27cec27f8dd5902baec018ff86d7f49ee2/Phase.java/buggy/MMTk/src/org/mmtk/plan/Phase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
8770,
918,
7152,
11406,
5621,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
8770,
918,
7152,
11406,
5621,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.