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
persistenceType, origFilename, clientMetadata.getMIMEType(), client.isGlobalQueue);
persistenceType, origFilename, clientMetadata.getMIMEType(), client.isGlobalQueue, data == null ? -1 : data.size());
protected FCPMessage persistentTagMessage() { return new PersistentPut(identifier, uri, verbosity, priorityClass, uploadFrom, targetURI, persistenceType, origFilename, clientMetadata.getMIMEType(), client.isGlobalQueue); }
56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/93d0da52d018060c2cf0ed14e3b47b370c9e7399/ClientPut.java/clean/src/freenet/node/fcp/ClientPut.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 478, 4258, 1079, 9195, 1805, 1079, 1435, 288, 202, 202, 2463, 394, 11049, 6426, 12, 5644, 16, 2003, 16, 11561, 16, 4394, 797, 16, 3617, 1265, 16, 1018, 3098, 16, 4697, 202, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 478, 4258, 1079, 9195, 1805, 1079, 1435, 288, 202, 202, 2463, 394, 11049, 6426, 12, 5644, 16, 2003, 16, 11561, 16, 4394, 797, 16, 3617, 1265, 16, 1018, 3098, 16, 4697, 202, 2...
public static final void dumpRange(Address start, Address end) {}
public static final void dumpRange(Address start, Address end) { }
public static final void dumpRange(Address start, Address end) {}
49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/57a34fa3e6e607d84b46e06082997a4771a25a85/Util.java/buggy/MMTk/ext/vm/stub/org/mmtk/vm/gcspy/Util.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 727, 918, 4657, 2655, 12, 1887, 787, 16, 5267, 679, 13, 2618, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 727, 918, 4657, 2655, 12, 1887, 787, 16, 5267, 679, 13, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
return blankBytes;
return blankBytes[sno];
public byte[] openBytes(String id, int no) throws FormatException, IOException { int[] q = computeIndices(id, no); int fno = q[0], ino = q[1]; if (ino < readers[fno].getImageCount(files[fno])) { return readers[fno].openBytes(files[fno], ino); } // return a blank image to cover for the fact that // this file does not contain enough image planes if (blankBytes == null) { int bytes = FormatReader.getBytesPerPixel(getPixelType(currentId)); blankBytes = new byte[width * height * bytes * sizeC]; } return blankBytes; }
55415 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55415/5fc81d9344fbf5c240702b4cd09448302e7192e7/FileStitcher.java/buggy/loci/formats/FileStitcher.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 1160, 8526, 1696, 2160, 12, 780, 612, 16, 509, 1158, 13, 565, 1216, 4077, 503, 16, 1860, 225, 288, 565, 509, 8526, 1043, 273, 3671, 8776, 12, 350, 16, 1158, 1769, 565, 509, 284, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 1160, 8526, 1696, 2160, 12, 780, 612, 16, 509, 1158, 13, 565, 1216, 4077, 503, 16, 1860, 225, 288, 565, 509, 8526, 1043, 273, 3671, 8776, 12, 350, 16, 1158, 1769, 565, 509, 284, ...
public void initializePlugin(PluginManager manager, File pluginDir) { try { // Configure logging to a file, creating log dir if needed System.setProperty("org.apache.commons.logging.LogFactory", "org.mortbay.log.Factory"); File logDir = new File(JiveGlobals.getMessengerHome(), "logs"); if (!logDir.exists()) { logDir.mkdirs(); } File logFile = new File(logDir, "admin-console.log"); OutputStreamLogSink logSink = new OutputStreamLogSink(logFile.toString()); logSink.start(); LogImpl log = (LogImpl) Factory.getFactory().getInstance(""); // Ignore INFO logs. log.setVerbose(-1); log.add(logSink); jetty = new Server(); // Configure HTTP socket listener boolean plainStarted = false; // Setting this property to a not null value will imply that the Jetty server will only // accept connect requests to that IP address interfaceName = JiveGlobals.getXMLProperty("adminConsole.inteface"); port = JiveGlobals.getXMLProperty("adminConsole.port", 9090); InetAddrPort address = new InetAddrPort(interfaceName, port); if (port > 0) { jetty.addListener(address); plainStarted = true; } boolean secureStarted = false; try { securePort = JiveGlobals.getXMLProperty("adminConsole.securePort", 9091); if (securePort > 0) { SunJsseListener listener = new SunJsseListener(); // Get the keystore location. The default location is security/keystore String keyStoreLocation = JiveGlobals.getProperty("xmpp.socket.ssl.keystore", "resources" + File.separator + "security" + File.separator + "keystore"); keyStoreLocation = JiveGlobals.getMessengerHome() + File.separator + keyStoreLocation; // Get the keystore password. The default password is "changeit". String keypass = JiveGlobals.getProperty("xmpp.socket.ssl.keypass", "changeit"); keypass = keypass.trim(); // Get the truststore location; default at security/truststore String trustStoreLocation = JiveGlobals.getProperty("xmpp.socket.ssl.truststore", "resources" + File.separator + "security" + File.separator + "truststore"); trustStoreLocation = JiveGlobals.getMessengerHome() + File.separator + trustStoreLocation; // Get the truststore passwprd; default is "changeit". String trustpass = JiveGlobals.getProperty("xmpp.socket.ssl.trustpass", "changeit"); trustpass = trustpass.trim(); listener.setKeystore(keyStoreLocation); listener.setKeyPassword(keypass); listener.setPassword(keypass); listener.setHost(interfaceName); listener.setPort(securePort); jetty.addListener(listener); secureStarted = true; } } catch (Exception e) { Log.error(e); } // Add web-app WebApplicationContext webAppContext = jetty.addWebApplication("/", pluginDir.getAbsoluteFile() + File.separator + "webapp"); webAppContext.setWelcomeFiles(new String[]{"index.jsp"}); jetty.start(); if (!plainStarted && !secureStarted) { Log.info("Warning: admin console not started due to configuration settings."); System.out.println("Warning: admin console not started due to configuration settings."); } else if (!plainStarted && secureStarted) { Log.info("Admin console listening at https://" + XMPPServer.getInstance().getServerInfo().getName() + ":" + securePort); System.out.println("Admin console listening at https://" + XMPPServer.getInstance().getServerInfo().getName() + ":" + securePort); } else if (!secureStarted && plainStarted) { Log.info("Admin console listening at http://" + XMPPServer.getInstance().getServerInfo().getName() + ":" + port); System.out.println("Admin console listening at http://" + XMPPServer.getInstance().getServerInfo().getName() + ":" + port); } else { String msg = "Admin console listening at:\n" + " http://" + XMPPServer.getInstance().getServerInfo().getName() + ":" + port + "\n" + " https://" + XMPPServer.getInstance().getServerInfo().getName() + ":" + securePort; Log.info(msg); System.out.println(msg); } } catch (Exception e) { Log.error("Trouble initializing admin console", e); } }
6161 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6161/c078cad370f53d9dab9901dcfc86ea91fe98a4a6/AdminConsolePlugin.java/buggy/src/java/org/jivesoftware/messenger/container/AdminConsolePlugin.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 6459, 11160, 3773, 12, 3773, 49, 940, 1035, 1063, 16, 812, 4094, 1621, 15329, 698, 95, 759, 11207, 11167, 12799, 768, 16, 23799, 1330, 1214, 430, 17471, 3163, 18, 542, 1396, 2932, 3341, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 6459, 11160, 3773, 12, 3773, 49, 940, 1035, 1063, 16, 812, 4094, 1621, 15329, 698, 95, 759, 11207, 11167, 12799, 768, 16, 23799, 1330, 1214, 430, 17471, 3163, 18, 542, 1396, 2932, 3341, ...
this.arg4 = arg4;
this.arg4 = arg4;
public void setArg4(String arg4) { this.arg4 = arg4; }
2722 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2722/84efaca353d1744bb1552a9b539287cb8320e07b/MessageTag.java/buggy/src/share/org/apache/struts/taglib/bean/MessageTag.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 444, 4117, 24, 12, 780, 1501, 24, 13, 288, 202, 2211, 18, 3175, 24, 273, 1501, 24, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 918, 444, 4117, 24, 12, 780, 1501, 24, 13, 288, 202, 2211, 18, 3175, 24, 273, 1501, 24, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
public double [] distributionForInstance(Instance instance) throws Exception { hashKey thekey; double [] tempDist; double [] normDist; m_disTransform.input(instance); instance = m_disTransform.output(); m_delTransform.input(instance); instance = m_delTransform.output(); if (!m_classIsNominal) throw new Exception("Class is numeric!"); else { thekey = new hashKey(instance, instance.numAttributes()); // if this one is not in the table if ((tempDist = (double [])m_entries.get(thekey)) == null) { if (m_useIBk) { tempDist = m_ibk.distributionForInstance(instance); } else { tempDist = new double [m_theInstances.classAttribute().numValues()]; tempDist[(int)m_majority] = 1.0; } } else { // normalise distribution normDist = new double [tempDist.length]; System.arraycopy(tempDist,0,normDist,0,tempDist.length); Utils.normalize(normDist); tempDist=normDist; } } return tempDist; }
48918 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48918/cda0e11a5a37e91d026594d506cc5433742c7b77/DecisionTable.java/clean/weka/classifiers/rules/DecisionTable.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 9056, 8526, 16279, 1290, 1442, 12, 1442, 1336, 13, 15069, 503, 95, 2816, 653, 5787, 856, 31, 9056, 8526, 5814, 5133, 31, 9056, 8526, 7959, 5133, 31, 81, 67, 2251, 4059, 18, 2630, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 9056, 8526, 16279, 1290, 1442, 12, 1442, 1336, 13, 15069, 503, 95, 2816, 653, 5787, 856, 31, 9056, 8526, 5814, 5133, 31, 9056, 8526, 7959, 5133, 31, 81, 67, 2251, 4059, 18, 2630, 12, 1...
public static SourceLineAnnotation fromVisitedInstruction(DismantleBytecode visitor) {
public static SourceLineAnnotation fromVisitedInstruction(BetterVisitor visitor, int pc) {
public static SourceLineAnnotation fromVisitedInstruction(DismantleBytecode visitor) { LineNumberTable lineNumberTable = getLineNumberTable(visitor); if (lineNumberTable == null) return null; int pc = visitor.getPC(); int lineNumber = lineNumberTable.getSourceLine(pc); return new SourceLineAnnotation(visitor.getBetterClassName(), lineNumber, lineNumber); }
10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/969c8869444972b18ff11d389f459871c18f450a/SourceLineAnnotation.java/clean/findbugs/src/java/edu/umd/cs/findbugs/SourceLineAnnotation.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 4998, 1670, 3257, 628, 30019, 11983, 12, 1669, 81, 970, 298, 858, 16651, 8000, 13, 288, 202, 202, 31063, 1388, 13629, 1388, 273, 26089, 1388, 12, 3516, 1811, 1769, 202, 202...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 4998, 1670, 3257, 628, 30019, 11983, 12, 1669, 81, 970, 298, 858, 16651, 8000, 13, 288, 202, 202, 31063, 1388, 13629, 1388, 273, 26089, 1388, 12, 3516, 1811, 1769, 202, 202...
public abstract EditorFileCreator getDiagramFileCreator();
public abstract DiagramFileCreator getDiagramFileCreator();
public abstract EditorFileCreator getDiagramFileCreator();
1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/e7a9862e2ce75b0b75be5e902d2b4874a868063a/EditorWizardPage.java/clean/org.eclipse.gmf.runtime/plugins/org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide/src/org/eclipse/gmf/runtime/diagram/ui/resources/editor/ide/wizards/EditorWizardPage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 8770, 18451, 812, 10636, 2343, 8852, 1940, 812, 10636, 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, ...
[ 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, 225, 202, 482, 8770, 18451, 812, 10636, 2343, 8852, 1940, 812, 10636, 5621, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Debug.output( 3, " Delegate gc'ed!" );
super.finalize();
public void finalize() { if ( connection != null ) { conn_mg.releaseConnection( connection ); } orb._release( this ); if ( Debug.isDebugEnabled() ) { Debug.output( 3, " Delegate gc'ed!" ); } }
46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/49cedfb5a0efa6101b84cd792de05a1c85bfdafe/Delegate.java/buggy/src/org/jacorb/orb/Delegate.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 12409, 1435, 565, 288, 3639, 309, 261, 1459, 480, 446, 262, 3639, 288, 5411, 1487, 67, 81, 75, 18, 9340, 1952, 12, 1459, 11272, 3639, 289, 3639, 16823, 6315, 9340, 12, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 12409, 1435, 565, 288, 3639, 309, 261, 1459, 480, 446, 262, 3639, 288, 5411, 1487, 67, 81, 75, 18, 9340, 1952, 12, 1459, 11272, 3639, 289, 3639, 16823, 6315, 9340, 12, 333, 1...
proplist.add(new PropertyDescriptor("disabled", ELTextTag.class,
proplist.add(new PropertyDescriptor("disabled", ELFormTag.class,
public PropertyDescriptor[] getPropertyDescriptors() { ArrayList proplist = new ArrayList(); try { proplist.add(new PropertyDescriptor("action", ELFormTag.class, null, "setActionExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("dir", ELFormTag.class, null, "setDirExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("disabled", ELTextTag.class, null, "setDisabledExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("enctype", ELFormTag.class, null, "setEnctypeExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("focus", ELFormTag.class, null, "setFocusExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("focusIndex", ELFormTag.class, null, "setFocusIndexExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("lang", ELFormTag.class, null, "setLangExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("method", ELFormTag.class, null, "setMethodExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("name", ELFormTag.class, null, "setNameExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("onreset", ELFormTag.class, null, "setOnresetExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("onsubmit", ELFormTag.class, null, "setOnsubmitExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("readonly", ELTextTag.class, null, "setReadonlyExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("scope", ELFormTag.class, null, "setScopeExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("scriptLanguage", ELFormTag.class, null, "setScriptLanguageExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("style", ELFormTag.class, null, "setStyleExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("styleClass", ELFormTag.class, null, "setStyleClassExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("styleId", ELFormTag.class, null, "setStyleIdExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("target", ELFormTag.class, null, "setTargetExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("type", ELFormTag.class, null, "setTypeExpr")); } catch (IntrospectionException ex) { } try { proplist.add(new PropertyDescriptor("acceptCharset", ELFormTag.class, null, "setAcceptCharsetExpr")); } catch (IntrospectionException ex) { } PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()]; return ((PropertyDescriptor[]) proplist.toArray(result)); }
48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/c7abb0e2f85b9967b73694606a84b87946c7da57/ELFormTagBeanInfo.java/buggy/el/src/main/java/org/apache/strutsel/taglib/html/ELFormTagBeanInfo.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 26761, 8526, 3911, 12705, 1435, 288, 3639, 2407, 450, 17842, 273, 394, 2407, 5621, 3639, 775, 288, 5411, 450, 17842, 18, 1289, 12, 2704, 26761, 2932, 1128, 3113, 14801, 1204, 1805, 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, 26761, 8526, 3911, 12705, 1435, 288, 3639, 2407, 450, 17842, 273, 394, 2407, 5621, 3639, 775, 288, 5411, 450, 17842, 18, 1289, 12, 2704, 26761, 2932, 1128, 3113, 14801, 1204, 1805, 18...
Node item,mapNode; NodeList l,mapNodeList;
Node item, mapNode; NodeList l, mapNodeList;
private void buildMap(Document doc) throws Exception { Node item,mapNode; NodeList l,mapNodeList; NamedNodeMap nnm; Tile tile; mapNodeList = doc.getElementsByTagName("map"); for (int itr = 0; (mapNode = mapNodeList.item(itr)) != null; itr++) { // Get the map dimensions and create the map l = doc.getElementsByTagName("dimensions"); for (int i = 0; (item = l.item(i)) != null; i++) { if (item.getParentNode() == mapNode) { int mapWidth = Integer.parseInt(getAttributeValue(item, "width")); int mapHeight = Integer.parseInt(getAttributeValue(item, "height")); map = new Map(mapWidth, mapHeight); } } if (map == null) { throw new Exception("Couldn't locate map dimensions."); } // Load other map attributes map.setName(getAttributeValue(mapNode,"name")); String orientation = getAttributeValue(mapNode, "orientation"); String tileWidthString = getAttributeValue(mapNode, "tilewidth"); String tileHeightString = getAttributeValue(mapNode, "tileheight"); if (tileWidthString != null) { map.setTileWidth(Integer.parseInt(tileWidthString)); } if (tileHeightString != null) { map.setTileHeight(Integer.parseInt(tileHeightString)); } if (orientation != null) { setOrientation(orientation); } else { throw new Exception("A valid orientation must be given"); } // Load the properties l = doc.getElementsByTagName("property"); for (int i = 0; (item = l.item(i)) != null; i++) { if(item.getParentNode() == mapNode) { map.addProperty(getAttributeValue(item, "name"), getAttributeValue(item, "value")); } } // Load the tile sets l = doc.getElementsByTagName("tileset"); for (int i = 0; (item = l.item(i)) != null; i++) { if (item.getParentNode() == mapNode) { map.addTileset(unmarshalTileset(item)); } } // Load the layers l = doc.getElementsByTagName("layer"); for (int i = 0; (item = l.item(i)) != null; i++) { if (item.getParentNode() == mapNode) { map.addLayer(unmarshalLayer(item)); } } //Load the objects l = doc.getElementsByTagName("object"); for (int i = 0; (item = l.item(i)) != null; i++) { if (item.getParentNode() == mapNode) { map.addObject(unmarshalObject(item)); } } } }
6621 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6621/4a0551f0509afd3a852b098537e03cbdb63bb197/XMLMapTransformer.java/buggy/tiled/io/xml/XMLMapTransformer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1361, 863, 12, 2519, 997, 13, 1216, 1185, 288, 3639, 2029, 761, 16, 1458, 907, 31, 3639, 16781, 328, 16, 1458, 19914, 31, 3639, 9796, 907, 863, 7761, 81, 31, 3639, 13791, 476...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1361, 863, 12, 2519, 997, 13, 1216, 1185, 288, 3639, 2029, 761, 16, 1458, 907, 31, 3639, 16781, 328, 16, 1458, 19914, 31, 3639, 9796, 907, 863, 7761, 81, 31, 3639, 13791, 476...
pref.initialize(ir);
void prepare(OPT_IR ir) { // (1) if we haven't yet committed to a stack frame we // will look for operators that would require a stack frame // - LOWTABLESWITCH // - a GC Point, except for YieldPoints or IR_PROLOGUE boolean preventYieldPointRemoval = false; if (!frameRequired) { for (OPT_Instruction s = ir.firstInstructionInCodeOrder(); s != null; s = s.nextInstructionInCodeOrder()) { if (s.operator() == LOWTABLESWITCH) { // uses BL to get pc relative addressing. frameRequired = true; preventYieldPointRemoval = true; break; } else if (s.isGCPoint() && !s.isYieldPoint() && s.operator() != IR_PROLOGUE) { // frame required for GCpoints that are not yield points // or IR_PROLOGUE, which is the stack overflow check frameRequired = true; preventYieldPointRemoval = true; break; } } } pref.initialize(ir); // (2) // In non-adaptive configurations we can omit the yieldpoint if // the method contains exactly one basic block whose only successor // is the exit node. (The method may contain calls, but we believe that // in any program that isn't going to overflow its stack there must be // some invoked method that contains more than 1 basic block, and // we'll insert a yieldpoint in its prologue.) // In adaptive configurations the only methods we eliminate yieldpoints // from are those in which the yieldpoints are the only reason we would // have to allocate a stack frame for the method. Having more yieldpoints // gets us better sampling behavior. Thus, in the adaptive configuration // we only omit the yieldpoint in leaf methods with no PEIs that contain // exactly one basic block whose only successor is the exit node. // TODO: We may want to force yieldpoints in "large" PEI-free // single-block leaf methods (if any exist). // TODO: This is a kludge. Removing the yieldpoint removes // the adaptive system's ability to accurately sample program // behavior. Even if the method is absolutely trivial // eg boolean foo() { return false; }, we may still want to // sample it for the purposes of adaptive inlining. // On the other hand, the ability to do this inlining in some cases // may not be able to buy back having to create a stackframe // for all methods. // // Future feature: always insert a pseudo yield point that when taken will // create the stack frame on demand. OPT_BasicBlock firstBB = ir.cfg.entry(); boolean isSingleBlock = firstBB.hasZeroIn() && firstBB.hasOneOut() && firstBB.pointsOut(ir.cfg.exit()); boolean removeYieldpoints = isSingleBlock && ! preventYieldPointRemoval; //-#if RVM_WITH_ADAPTIVE_SYSTEM // In adaptive systems if we require a frame, we don't remove // any yield poits if (frameRequired) { removeYieldpoints = false; } //-#endif if (removeYieldpoints) { for (OPT_Instruction s = ir.firstInstructionInCodeOrder(); s != null; s = s.nextInstructionInCodeOrder()) { if (s.isYieldPoint()) { OPT_Instruction save = s; // get previous instruction, so we can continue // after we remove this instruction s = s.prevInstructionInCodeOrder(); save.remove(); ir.MIRInfo.gcIRMap.delete(save); } } prologueYieldpoint = false; } else { prologueYieldpoint = true; frameRequired = true; } // (3) initialization //initPools(ir); this.ir = ir; frameSize = spillPointer; initForArch(ir); // (4) save caughtExceptionOffset where the exception deliverer can find it ir.compiledMethod.setUnsignedExceptionOffset(caughtExceptionOffset); // (5) initialize the restrictions object restrict = new OPT_RegisterRestrictions(ir.regpool.getPhysicalRegisterSet()); }
4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/7e269d85eed20893319d3f2e3f328099181a7194/OPT_GenericStackManager.java/clean/rvm/src/vm/compilers/optimizing/regalloc/util/OPT_GenericStackManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 918, 2911, 12, 15620, 67, 7937, 9482, 13, 288, 565, 368, 261, 21, 13, 309, 732, 15032, 1404, 4671, 16015, 358, 279, 2110, 2623, 732, 377, 368, 377, 903, 2324, 364, 12213, 716, 4102, 258...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 918, 2911, 12, 15620, 67, 7937, 9482, 13, 288, 565, 368, 261, 21, 13, 309, 732, 15032, 1404, 4671, 16015, 358, 279, 2110, 2623, 732, 377, 368, 377, 903, 2324, 364, 12213, 716, 4102, 258...
return false;
return (modifiers & 4096)!=0;
public boolean isSynthetic() { return false; }
53148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53148/f05e07fbdd07acc31c7c49b595da0fe3d32f0c79/ResolvedMemberImpl.java/clean/weaver/src/org/aspectj/weaver/ResolvedMemberImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 353, 10503, 16466, 1435, 288, 202, 202, 2463, 629, 31, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 353, 10503, 16466, 1435, 288, 202, 202, 2463, 629, 31, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
void setDescription(String description) {
public void setDescription(String description) {
void setDescription(String description) { this.handle = description; }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/31f41b118f5028e8c5bd9fc2f4d1032d81968820/AbstractTaskContainer.java/buggy/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 6459, 13812, 12, 780, 2477, 13, 288, 202, 202, 2211, 18, 4110, 273, 2477, 31, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 6459, 13812, 12, 780, 2477, 13, 288, 202, 202, 2211, 18, 4110, 273, 2477, 31, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
/*System.out.println("indx=" + s.keys[si]); System.out.println("a = " + a.values[ai]); System.out.println("b = " + b.values[bi]); System.out.println("s = " + s.values[si]); */ total += a.values[ai++] * b.values[bi++] * s.values[si++];
System.out.println("ai = " + ai); System.out.println("bi = " + bi); System.out.println("si = " + si); System.exit(1);
public double evaluate(Object o1, Object o2) { SparseVector a = (SparseVector) o1; SparseVector b = (SparseVector) o2; System.out.println("o1 = " + o1); System.out.println("o2 = " + o2); int ai=0, bi=0, si=0; double total = 0.0; while (ai < a.size && bi < b.size && si < s.size) { if (a.keys[ai] < b.keys[bi] && a.keys[ai] < s.keys[si]) { ++ai; } else if (b.keys[bi] < a.keys[ai] && b.keys[ai] < s.keys[si]) { ++bi; } else if (s.keys[si] < a.keys[ai] && s.keys[si] < b.keys[bi]) { ++si; } else { /*System.out.println("indx=" + s.keys[si]); System.out.println("a = " + a.values[ai]); System.out.println("b = " + b.values[bi]); System.out.println("s = " + s.values[si]); */ total += a.values[ai++] * b.values[bi++] * s.values[si++]; } } return total; }
50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/0d10c781990e57f687c38201808be3cff8f7d798/SparseVector.java/buggy/src/org/biojava/stats/svm/SparseVector.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4202, 1071, 1645, 5956, 12, 921, 320, 21, 16, 1033, 320, 22, 13, 288, 3639, 16473, 5018, 279, 273, 261, 20565, 5018, 13, 320, 21, 31, 3639, 16473, 5018, 324, 273, 261, 20565, 5018, 13, 320, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1645, 5956, 12, 921, 320, 21, 16, 1033, 320, 22, 13, 288, 3639, 16473, 5018, 279, 273, 261, 20565, 5018, 13, 320, 21, 31, 3639, 16473, 5018, 324, 273, 261, 20565, 5018, 13, 320, ...
anticipateDown(iface);
anticipateDown(iface);
public void testInterfaceWithNoCriticalService() { m_pollerConfig.setNodeOutageProcessingEnabled(true); MockInterface iface = m_network.getInterface(3, "192.168.1.4"); MockService svc = iface.getService("SMTP"); MockService otherService = iface.getService("HTTP"); startDaemons(); anticipateDown(iface); iface.bringDown(); verifyAnticipated(8000); anticipateUp(iface); anticipateDown(otherService, true); svc.bringUp(); verifyAnticipated(8000); }
25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/e3db1312e8cc2636034eb4d7b29db88850613e3b/PollerTest.java/buggy/opennms-services/src/test/java/org/opennms/netmgt/poller/PollerTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 1358, 1190, 2279, 30286, 1179, 1435, 288, 3639, 312, 67, 3915, 749, 809, 18, 542, 907, 1182, 410, 7798, 1526, 12, 3767, 1769, 3639, 7867, 1358, 9751, 273, 312, 67, 5185, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1358, 1190, 2279, 30286, 1179, 1435, 288, 3639, 312, 67, 3915, 749, 809, 18, 542, 907, 1182, 410, 7798, 1526, 12, 3767, 1769, 3639, 7867, 1358, 9751, 273, 312, 67, 5185, ...
public MultipartElement getNextElement() throws ServletException, UnsupportedEncodingException { //retrieve the "Content-Disposition" header //and parse String disposition = readLine(); if ((disposition != null) && (disposition.startsWith("Content-Disposition"))) { String name = parseDispositionName(disposition); String filename = parseDispositionFilename(disposition); String contentType = null; boolean isFile = (filename != null); if (isFile) { filename = new File(filename).getName(); //check for windows filenames, //from linux jdk's the entire filepath //isn't parsed correctly from File.getName() int colonIndex = filename.indexOf(":"); if (colonIndex == -1) { //check for Window's SMB server file paths colonIndex = filename.indexOf("\\\\"); } int slashIndex = filename.lastIndexOf("\\"); if ((colonIndex > -1) && (slashIndex > -1)) { //then consider this filename to be a full //windows filepath, and parse it accordingly //to retrieve just the file name filename = filename.substring(slashIndex+1, filename.length()); } //get the content type contentType = readLine(); contentType = parseContentType(contentType); } //ignore next line (whitespace) (unless it's a file //without content-type) if (! ((isFile) && contentType == null)) { readLine(); } MultipartElement element = null; //process a file element if (isFile) { try { //create a local file on disk representing the element File elementFile = createLocalFile(); element = new MultipartElement(name, filename, contentType, elementFile); } catch (IOException ioe) { throw new ServletException("IOException while reading file element: " + ioe.getMessage(), ioe); } } else { //read data into String form, then convert to bytes //for text StringBuffer textData = new StringBuffer(); String line; //parse for text data line = readLine(); while ((line != null) && (!line.startsWith(boundary))) { textData.append(line); line = readLine(); } if (textData.length() > 0) { //cut off "\r" from the end if necessary if (textData.charAt(textData.length()-1) == '\r') { textData.setLength(textData.length()-1); } } //create the element element = new MultipartElement(name, textData.toString()); } return element; } //reset stream if (inputStream.markSupported()) { try { inputStream.reset(); } catch (IOException ioe) { throw new ServletException("IOException while resetting input stream: " + ioe.getMessage()); } } return null; }
2722 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2722/de71a13dd9d82d1df2a37155b9c62e4c7a504e01/MultipartIterator.java/buggy/src/share/org/apache/struts/upload/MultipartIterator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19919, 1046, 6927, 1046, 1435, 1216, 16517, 16, 15367, 288, 3639, 368, 17466, 326, 315, 1350, 17, 15087, 6, 1446, 3639, 368, 464, 1109, 3639, 514, 23913, 273, 12273, 5621, 13491, 309,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19919, 1046, 6927, 1046, 1435, 1216, 16517, 16, 15367, 288, 3639, 368, 17466, 326, 315, 1350, 17, 15087, 6, 1446, 3639, 368, 464, 1109, 3639, 514, 23913, 273, 12273, 5621, 13491, 309,...
private Collection getTransientStates() throws InvalidItemStateException, RepositoryException { // list of transient states that should be persisted ArrayList dirty = new ArrayList(); ItemState transientState; // check status of this item's state if (isTransient()) { switch (state.getStatus()) { case ItemState.STATUS_EXISTING_MODIFIED: // add this item's state to the list dirty.add(state); break; case ItemState.STATUS_NEW: { String msg = safeGetJCRPath() + ": cannot save a new item."; log.debug(msg); throw new RepositoryException(msg); } case ItemState.STATUS_STALE_MODIFIED: { String msg = safeGetJCRPath() + ": the item cannot be saved because it has been modified externally."; log.debug(msg); throw new InvalidItemStateException(msg); } case ItemState.STATUS_STALE_DESTROYED: { String msg = safeGetJCRPath() + ": the item cannot be saved because it has been deleted externally."; log.debug(msg); throw new InvalidItemStateException(msg); } case ItemState.STATUS_UNDEFINED: { String msg = safeGetJCRPath() + ": the item cannot be saved; it seems to have been removed externally."; log.debug(msg); throw new InvalidItemStateException(msg); } default: log.debug("unexpected state status (" + state.getStatus() + ")"); // ignore break; } } if (isNode()) { // build list of 'new' or 'modified' descendants Iterator iter = stateMgr.getDescendantTransientItemStates((NodeId) id); while (iter.hasNext()) { transientState = (ItemState) iter.next(); switch (transientState.getStatus()) { case ItemState.STATUS_NEW: case ItemState.STATUS_EXISTING_MODIFIED: // add modified state to the list dirty.add(transientState); break; case ItemState.STATUS_STALE_MODIFIED: { String msg = transientState.getId() + ": the item cannot be saved because it has been modified externally."; log.debug(msg); throw new InvalidItemStateException(msg); } case ItemState.STATUS_STALE_DESTROYED: { String msg = transientState.getId() + ": the item cannot be saved because it has been deleted externally."; log.debug(msg); throw new InvalidItemStateException(msg); } case ItemState.STATUS_UNDEFINED: { String msg = safeGetJCRPath() + ": the item cannot be saved; it seems to have been removed externally."; log.debug(msg); throw new InvalidItemStateException(msg); } default: log.debug("unexpected state status (" + transientState.getStatus() + ")"); // ignore break; } } } return dirty; }
49304 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49304/182e3152b160affb8013c06331a4a9fea177d0ee/ItemImpl.java/clean/core/src/java/org/apache/jackrabbit/core/ItemImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 2200, 336, 19638, 7629, 1435, 5411, 1216, 1962, 1180, 5060, 16, 13367, 288, 3639, 368, 666, 434, 12315, 5493, 716, 1410, 506, 14249, 3639, 2407, 9603, 273, 394, 2407, 5621, 3639, 4342...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2200, 336, 19638, 7629, 1435, 5411, 1216, 1962, 1180, 5060, 16, 13367, 288, 3639, 368, 666, 434, 12315, 5493, 716, 1410, 506, 14249, 3639, 2407, 9603, 273, 394, 2407, 5621, 3639, 4342...
os.write(RtfRow.tableBorder);
os.write(tStyle);
public boolean writeCellSettings(ByteArrayOutputStream os) throws DocumentException { try { // <!-- steffen if (mergeType == MERGE_HORIZ_PREV || mergeType == MERGE_BOTH_PREV) { return true; } switch(mergeType) { case MERGE_VERT_FIRST : os.write(RtfWriter.escape); os.write(cellVMergeFirst); break; case MERGE_BOTH_FIRST : os.write(RtfWriter.escape); os.write(cellVMergeFirst); break; case MERGE_HORIZ_PREV : os.write(RtfWriter.escape); os.write(cellMergePrev); break; case MERGE_VERT_PREV : os.write(RtfWriter.escape); os.write(cellVMergePrev); break; case MERGE_BOTH_PREV : os.write(RtfWriter.escape); os.write(cellMergeFirst); break; } // --> switch(store.verticalAlignment()) { case Element.ALIGN_BOTTOM : os.write(RtfWriter.escape); os.write(cellVerticalAlignBottom); break; case Element.ALIGN_CENTER : os.write(RtfWriter.escape); os.write(cellVerticalAlignCenter); break; case Element.ALIGN_TOP : os.write(RtfWriter.escape); os.write(cellVerticalAlignTop); break; } if(((store.border() & Rectangle.LEFT) == Rectangle.LEFT) && (store.borderWidth() > 0)) { os.write(RtfWriter.escape); os.write(cellBorderLeft); os.write(RtfWriter.escape); os.write(RtfRow.tableBorder); os.write(RtfWriter.escape); os.write(RtfRow.tableBorderWidth); writeInt(os, (int) (store.borderWidth() * writer.twipsFactor)); os.write(RtfWriter.escape); os.write(RtfRow.tableBorderColor); if(store.borderColor() == null) writeInt(os, writer.addColor(new Color(0,0,0))); else writeInt(os, writer.addColor(store.borderColor())); os.write((byte) '\n'); } if(((store.border() & Rectangle.TOP) == Rectangle.TOP) && (store.borderWidth() > 0)) { os.write(RtfWriter.escape); os.write(cellBorderTop); os.write(RtfWriter.escape); os.write(RtfRow.tableBorder); os.write(RtfWriter.escape); os.write(RtfRow.tableBorderWidth); writeInt(os, (int) (store.borderWidth() * writer.twipsFactor)); os.write(RtfWriter.escape); os.write(RtfRow.tableBorderColor); if(store.borderColor() == null) writeInt(os, writer.addColor(new Color(0,0,0))); else writeInt(os, writer.addColor(store.borderColor())); os.write((byte) '\n'); } if(((store.border() & Rectangle.BOTTOM) == Rectangle.BOTTOM) && (store.borderWidth() > 0)) { os.write(RtfWriter.escape); os.write(cellBorderBottom); os.write(RtfWriter.escape); os.write(RtfRow.tableBorder); os.write(RtfWriter.escape); os.write(RtfRow.tableBorderWidth); writeInt(os, (int) (store.borderWidth() * writer.twipsFactor)); os.write(RtfWriter.escape); os.write(RtfRow.tableBorderColor); if(store.borderColor() == null) writeInt(os, writer.addColor(new Color(0,0,0))); else writeInt(os, writer.addColor(store.borderColor())); os.write((byte) '\n'); } if(((store.border() & Rectangle.RIGHT) == Rectangle.RIGHT) && (store.borderWidth() > 0)) { os.write(RtfWriter.escape); os.write(cellBorderRight); os.write(RtfWriter.escape); os.write(RtfRow.tableBorder); os.write(RtfWriter.escape); os.write(RtfRow.tableBorderWidth); writeInt(os, (int) (store.borderWidth() * writer.twipsFactor)); os.write(RtfWriter.escape); os.write(RtfRow.tableBorderColor); if(store.borderColor() == null) writeInt(os, writer.addColor(new Color(0,0,0))); else writeInt(os, writer.addColor(store.borderColor())); os.write((byte) '\n'); } os.write(RtfWriter.escape); os.write(cellBackgroundColor); if(store.backgroundColor() == null) writeInt(os, writer.addColor(new Color(255,255,255))); else writeInt(os, writer.addColor(store.backgroundColor())); os.write((byte) '\n'); os.write(RtfWriter.escape); os.write(cellWidthStyle); os.write((byte) '\n'); os.write(RtfWriter.escape); os.write(cellWidthTag); writeInt(os, cellWidth); os.write((byte) '\n'); if (cellpadding > 0) { // values os.write( RtfWriter.escape ); os.write( cellPaddingLeft ); writeInt( os, cellpadding / 2 ); os.write( RtfWriter.escape ); os.write( cellPaddingTop ); writeInt( os, cellpadding / 2 ); os.write( RtfWriter.escape ); os.write( cellPaddingRight ); writeInt( os, cellpadding / 2 ); os.write( RtfWriter.escape ); os.write( cellPaddingBottom ); writeInt( os, cellpadding / 2 ); // unit os.write( RtfWriter.escape ); os.write( cellPaddingLeftUnit ); os.write( RtfWriter.escape ); os.write( cellPaddingTopUnit ); os.write( RtfWriter.escape ); os.write( cellPaddingRightUnit ); os.write( RtfWriter.escape ); os.write( cellPaddingBottomUnit ); } os.write(RtfWriter.escape); os.write(cellRightBorder); writeInt(os, cellRight); } catch(IOException e) { return false; } return true; }
4174 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4174/f21d692a0ed3366007d75f6591e1d9566a0e2a69/RtfCell.java/buggy/src/com/lowagie/text/rtf/RtfCell.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 1045, 4020, 2628, 12, 8826, 4632, 1140, 13, 1216, 4319, 503, 565, 288, 3639, 775, 3639, 288, 5411, 368, 5719, 413, 384, 17098, 275, 5411, 309, 261, 2702, 559, 422, 490, 654, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1045, 4020, 2628, 12, 8826, 4632, 1140, 13, 1216, 4319, 503, 565, 288, 3639, 775, 3639, 288, 5411, 368, 5719, 413, 384, 17098, 275, 5411, 309, 261, 2702, 559, 422, 490, 654, ...
yloc = wAttrib.parseInt(v);
ycur = wAttrib.parseInt(v);
vValue Y(String v) { if (v != null) try { yloc = wAttrib.parseInt(v); } catch (Exception e) { return null; /*FAIL*/ } return vInteger.New(yloc);}
4078 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4078/d8fb5c2fb65d48f8132aa30861c0fa5a932ea413/wTTY.java/buggy/jcon/wTTY.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 331, 620, 1624, 12, 780, 331, 13, 288, 565, 309, 261, 90, 480, 446, 13, 775, 288, 202, 93, 1397, 273, 341, 12399, 18, 2670, 1702, 12, 90, 1769, 565, 289, 1044, 261, 503, 425, 13, 288, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 331, 620, 1624, 12, 780, 331, 13, 288, 565, 309, 261, 90, 480, 446, 13, 775, 288, 202, 93, 1397, 273, 341, 12399, 18, 2670, 1702, 12, 90, 1769, 565, 289, 1044, 261, 503, 425, 13, 288, 20...
if (buffer[offset] == '\r') return '\n'; return buffer[offset];
int c = buffer[offset]; if ((c & EOL_HINT_MASK) == 0 && eolChar(c)) { return '\n'; } if (c < 128 || !formatChar(c)) { return c; } skipFormatChar(); }
int peek() throws IOException { if (end == offset && !fill()) return -1; if (buffer[offset] == '\r') return '\n'; return buffer[offset]; }
19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/d108b43f2f2a757ef20c817fe089542dd267a766/LineBuffer.java/clean/src/org/mozilla/javascript/LineBuffer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 509, 8032, 1435, 1216, 1860, 288, 3639, 309, 261, 409, 422, 1384, 597, 401, 5935, 10756, 5411, 327, 300, 21, 31, 3639, 309, 261, 4106, 63, 3348, 65, 422, 2337, 86, 6134, 5411, 327, 2337...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 509, 8032, 1435, 1216, 1860, 288, 3639, 309, 261, 409, 422, 1384, 597, 401, 5935, 10756, 5411, 327, 300, 21, 31, 3639, 309, 261, 4106, 63, 3348, 65, 422, 2337, 86, 6134, 5411, 327, 2337...
if(tmp != null && tmp.getOpt(Channel.LOCAL).equals(Boolean.FALSE)) { if(local_addr == null) local_addr=tmp.getLocalAddress(); if(local_addr != null && real_dests != null) real_dests.removeElement(local_addr); }
if (tmp != null && tmp.getOpt(Channel.LOCAL).equals(Boolean.FALSE)) { if (local_addr == null) { local_addr = tmp.getLocalAddress(); } if (local_addr != null && real_dests != null) { real_dests.removeElement(local_addr); } }
public RspList castMessage(final Vector dests, Message msg, int mode, long timeout) { GroupRequest _req=null; Vector real_dests; Channel tmp; // we need to clone because we don't want to modify the original // (we remove ourselves if LOCAL is false, see below) ! real_dests=dests != null ? (Vector)dests.clone() : (members != null? (Vector)members.clone() : null); // if local delivery is off, then we should not wait for the message from the local member. // therefore remove it from the membership tmp=channel; if(tmp == null) { if(adapter != null && adapter.getTransport() instanceof Channel) tmp=(Channel)adapter.getTransport(); } if(tmp != null && tmp.getOpt(Channel.LOCAL).equals(Boolean.FALSE)) { if(local_addr == null) local_addr=tmp.getLocalAddress(); if(local_addr != null && real_dests != null) real_dests.removeElement(local_addr); } // don't even send the message if the destination list is empty if(log.isDebugEnabled()) log.debug("real_dests=" + real_dests); if(real_dests == null || real_dests.size() == 0) { if(log.isDebugEnabled()) log.debug("destination list is empty, won't send message"); return new RspList(); // return empty response list } _req=new GroupRequest(msg, corr, real_dests, mode, timeout, 0); _req.execute(); return _req.getResults(); }
50160 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50160/146a9f744cbe901c4fe56f6ceb2100ee15e7e898/MessageDispatcher.java/buggy/src/org/jgroups/blocks/MessageDispatcher.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 534, 1752, 682, 4812, 1079, 12, 6385, 5589, 1570, 87, 16, 2350, 1234, 16, 509, 1965, 16, 1525, 2021, 13, 288, 4202, 3756, 691, 225, 389, 3658, 33, 2011, 31, 4202, 5589, 3639, 2863...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 534, 1752, 682, 4812, 1079, 12, 6385, 5589, 1570, 87, 16, 2350, 1234, 16, 509, 1965, 16, 1525, 2021, 13, 288, 4202, 3756, 691, 225, 389, 3658, 33, 2011, 31, 4202, 5589, 3639, 2863...
animationStartJob.setSystem(true); animationDoneJob = new WorkbenchJob(ProgressMessages.getString("AnimationManager.DoneJobName")) { /* * (non-Javadoc) * * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor) */ public IStatus runInUIThread(IProgressMonitor monitor) { if(monitor.isCanceled()) return Status.CANCEL_STATUS; animationProcessor.animationFinished(); return Status.OK_STATUS; } }; animationDoneJob.setSystem(true);
animationUpdateJob.setSystem(true);
AnimationManager() { animationProcessor = new ProgressAnimationProcessor(this); listener = getProgressListener(); ProgressManager.getInstance().addListener(listener); animationStartJob = new WorkbenchJob(ProgressMessages .getString("AnimationManager.AnimationStart")) {//$NON-NLS-1$ /* * (non-Javadoc) * * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor) */ public IStatus runInUIThread(IProgressMonitor monitor) { if(monitor.isCanceled()) return Status.CANCEL_STATUS; animationProcessor.animationStarted(); return Status.OK_STATUS; } }; animationStartJob.setSystem(true); animationDoneJob = new WorkbenchJob(ProgressMessages.getString("AnimationManager.DoneJobName")) { //$NON-NLS-1$ /* * (non-Javadoc) * * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor) */ public IStatus runInUIThread(IProgressMonitor monitor) { if(monitor.isCanceled()) return Status.CANCEL_STATUS; animationProcessor.animationFinished(); return Status.OK_STATUS; } }; animationDoneJob.setSystem(true); }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/c0920b0b257a92d516b831620094f80104591915/AnimationManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 10816, 1318, 1435, 288, 202, 202, 30822, 5164, 273, 394, 10980, 10816, 5164, 12, 2211, 1769, 202, 202, 12757, 273, 3570, 2329, 2223, 5621, 202, 202, 5491, 1318, 18, 588, 1442, 7675, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 10816, 1318, 1435, 288, 202, 202, 30822, 5164, 273, 394, 10980, 10816, 5164, 12, 2211, 1769, 202, 202, 12757, 273, 3570, 2329, 2223, 5621, 202, 202, 5491, 1318, 18, 588, 1442, 7675, ...
public void run( ) { ReportRequest request = new ReportRequest(DeferredGraphicalViewer.this); List list = new ArrayList(); if(getSelection() instanceof IStructuredSelection) { list = ((IStructuredSelection)getSelection()).toList(); } request.setSelectionObject(list); request.setType(ReportRequest.SELECTION); request.setRequestConvert(new EditorReportRequestConvert()); //SessionHandleAdapter.getInstance().getMediator().pushState(); SessionHandleAdapter.getInstance().getMediator().notifyRequest(request); DeferredGraphicalViewer.super.fireSelectionChanged( ); //SessionHandleAdapter.getInstance().getMediator().popState(); }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/879c6e2a73c9076aeeed74591c18318a1397dcd3/DeferredGraphicalViewer.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/editors/parts/DeferredGraphicalViewer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 918, 1086, 12, 262, 1082, 202, 95, 9506, 202, 4820, 691, 590, 273, 394, 8706, 691, 12, 16886, 4137, 1706, 18415, 18, 2211, 1769, 9506, 202, 682, 666, 273, 394, 2407, 5621, 95...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 918, 1086, 12, 262, 1082, 202, 95, 9506, 202, 4820, 691, 590, 273, 394, 8706, 691, 12, 16886, 4137, 1706, 18415, 18, 2211, 1769, 9506, 202, 682, 666, 273, 394, 2407, 5621, 95...
if (peerNodeStatuses[peerIndex] == status) {
if (peerNodeStatuses[peerIndex].getStatusValue() == status) {
private int getPeerStatusCount(int[] peerNodeStatuses, int status) { int count = 0; for (int peerIndex = 0, peerCount = peerNodeStatuses.length; peerIndex < peerCount; peerIndex++) { if (peerNodeStatuses[peerIndex] == status) { count++; } } return count; }
46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/8894de616e17a43e740747a9eb17956bab9b3b3d/DarknetConnectionsToadlet.java/buggy/src/freenet/clients/http/DarknetConnectionsToadlet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 509, 29875, 1482, 1380, 12, 474, 8526, 4261, 907, 15220, 16, 509, 1267, 13, 288, 202, 202, 474, 1056, 273, 374, 31, 202, 202, 1884, 261, 474, 4261, 1016, 273, 374, 16, 4261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 509, 29875, 1482, 1380, 12, 474, 8526, 4261, 907, 15220, 16, 509, 1267, 13, 288, 202, 202, 474, 1056, 273, 374, 31, 202, 202, 1884, 261, 474, 4261, 1016, 273, 374, 16, 4261, ...
VM_Atom.findOrCreateAsciiAtom("()V"));
VM_Atom.findOrCreateAsciiAtom("()V"), VM_SystemClassLoader.getVMClassLoader());
static int createHardwareTrapCompiledMethodId() { VM_Method method = VM_ClassLoader.findOrCreateMethod(VM_Atom.findOrCreateAsciiAtom("L<hardware>;"), VM_Atom.findOrCreateAsciiAtom("<trap>"), VM_Atom.findOrCreateAsciiAtom("()V")); INSTRUCTION[] instructions = VM_RuntimeStructures.newInstructions(0); VM_CompilerInfo compilerInfo = new VM_HardwareTrapCompilerInfo(); int compiledMethodId = VM_CompiledMethods.createCompiledMethodId(); VM_CompiledMethod compiledMethod = new VM_CompiledMethod(compiledMethodId, method, instructions, compilerInfo); VM_CompiledMethods.setCompiledMethod(compiledMethodId, compiledMethod); return compiledMethodId; }
5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/b50ef93406b2ef984f8285babf993d262ec89fae/VM_ClassLoader.java/clean/rvm/src/vm/classLoader/VM_ClassLoader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 760, 509, 752, 44, 14519, 56, 1266, 20733, 30793, 1435, 288, 565, 8251, 67, 1305, 707, 273, 8251, 67, 7805, 18, 4720, 17717, 1305, 12, 7397, 67, 3641, 18, 4720, 17717, 21363, 3641, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 760, 509, 752, 44, 14519, 56, 1266, 20733, 30793, 1435, 288, 565, 8251, 67, 1305, 707, 273, 8251, 67, 7805, 18, 4720, 17717, 1305, 12, 7397, 67, 3641, 18, 4720, 17717, 21363, 3641, 2932, ...
System.err.println("checkClass. TermDescriptor="+desc.toString());
private void checkClass(String roleName, Class c) throws OntologyException { FrameSchema fs = lookupSchema(roleName); if(fs == null) throw new OntologyException("No schema was found for " + roleName + "role."); Iterator it = fs.subSchemas(); while(it.hasNext()) { TermDescriptor desc = (TermDescriptor)it.next(); String termName = translateName(desc.getName()); try { Method[] methods = c.getMethods(); // Check for correct set and get methods for the current // descriptor and retrieve the implementation type. Class implType = checkGetAndSet(termName, methods); // If the descriptor is a complex term (Concept) // and some class C is registered for that role, // then the implementation type must be a supertype of C. if(desc.isComplex()) { RoleFactory rf = lookupFactory(desc.getTypeName()); if(rf != null) { Class roleType = rf.getClassForRole(); if(!implType.isAssignableFrom(roleType)) throw new OntologyException("Wrong class: the " + desc.getName() + " role is played by " + roleType + " class, which is not a subtype of " + implType + " class."); } } else { // Check that the returned type is compatible with the one dictated by the TermDescriptor Class primitive = (Class)primitiveTypes.get(desc.getType()); if(!implType.isAssignableFrom(primitive)) throw new OntologyException("Wrong class: the primitive term " + desc.getName() + " is of type "+ primitive + ", but must be a subtype of " + implType + " class."); } } catch(SecurityException se) { throw new OntologyException("Wrong class: some required method is not accessible."); } } }
5505 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5505/9685acce6debc4175e4d96623265eb421502e8b2/DefaultOntology.java/clean/src/jade/onto/DefaultOntology.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2332, 18, 370, 18, 8222, 2932, 1893, 797, 18, 6820, 3187, 1546, 15, 5569, 18, 10492, 10663, 2332, 18, 370, 18, 8222, 2932, 1893, 797, 18, 6820, 3187, 1546, 15, 5569, 18, 10492, 10663, 3238, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2332, 18, 370, 18, 8222, 2932, 1893, 797, 18, 6820, 3187, 1546, 15, 5569, 18, 10492, 10663, 2332, 18, 370, 18, 8222, 2932, 1893, 797, 18, 6820, 3187, 1546, 15, 5569, 18, 10492, 10663, 3238, ...
if(log.isInfoEnabled()) log.info("already received gossip from " + sender);
if(log.isDebugEnabled()) log.debug("already received gossip from " + sender);
void handleStableGossip(Address sender, Digest d) { Address mbr; long highest_seqno, my_highest_seqno; long highest_seen_seqno, my_highest_seen_seqno; if(d == null || sender == null) { if(log.isErrorEnabled()) log.error("digest or sender is null"); return; } if(log.isInfoEnabled()) log.info("received digest " + printStabilityDigest(d) + " from " + sender); if(!heard_from.contains(sender)) { // already received gossip from sender; discard it if(log.isInfoEnabled()) log.info("already received gossip from " + sender); return; } for(int i=0; i < d.size(); i++) { mbr=d.senderAt(i); highest_seqno=d.highSeqnoAt(i); highest_seen_seqno=d.highSeqnoSeenAt(i); if(digest.getIndex(mbr) == -1) { if(log.isInfoEnabled()) log.info("sender " + mbr + " not found in stability vector"); continue; } // compute the minimum of the highest seqnos deliverable (for garbage collection) my_highest_seqno=digest.highSeqnoAt(mbr); if(my_highest_seqno < 0) { if(highest_seqno >= 0) digest.setHighSeqnoAt(mbr, highest_seqno); } else { digest.setHighSeqnoAt(mbr, Math.min(my_highest_seqno, highest_seqno)); } // compute the maximum of the highest seqnos seen (for retransmission of last missing message) my_highest_seen_seqno=digest.highSeqnoSeenAt(mbr); if(my_highest_seen_seqno < 0) { if(highest_seen_seqno >= 0) digest.setHighSeqnoSeenAt(mbr, highest_seen_seqno); } else { digest.setHighSeqnoSeenAt(mbr, Math.max(my_highest_seen_seqno, highest_seen_seqno)); } } heard_from.removeElement(sender); if(heard_from.size() == 0) { if(log.isInfoEnabled()) log.info("sending stability msg " + printStabilityDigest(digest)); sendStabilityMessage(digest.copy()); initialize(); } }
48949 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48949/85b7a7c351493f88f1d6a3045b9cbd0b817f95cd/STABLE.java/buggy/src/org/jgroups/protocols/pbcast/STABLE.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 1640, 30915, 43, 15616, 12, 1887, 5793, 16, 15864, 302, 13, 288, 3639, 5267, 312, 2848, 31, 3639, 1525, 9742, 67, 5436, 2135, 16, 3399, 67, 8766, 395, 67, 5436, 2135, 31, 3639, 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, 918, 1640, 30915, 43, 15616, 12, 1887, 5793, 16, 15864, 302, 13, 288, 3639, 5267, 312, 2848, 31, 3639, 1525, 9742, 67, 5436, 2135, 16, 3399, 67, 8766, 395, 67, 5436, 2135, 31, 3639, 152...
Rectangle rect = composite.getClientArea(); Control[] children = composite.getChildren(); for (int i = 0; i < children.length; i++) { children[i].setSize(rect.width, rect.height); } }
Rectangle rect = composite.getClientArea(); Control[] children = composite.getChildren(); for (int i = 0; i < children.length; i++) { children[i].setSize(rect.width, rect.height); } }
public void layout(Composite composite, boolean force) { Rectangle rect = composite.getClientArea(); Control[] children = composite.getChildren(); for (int i = 0; i < children.length; i++) { children[i].setSize(rect.width, rect.height); } }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/d6d458c4d729d92f70d2e5d4166fe0c3ff50c883/PreferenceDialog.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 3511, 12, 9400, 9635, 16, 1250, 2944, 13, 288, 5411, 13264, 4917, 273, 9635, 18, 588, 1227, 5484, 5621, 5411, 8888, 8526, 2325, 273, 9635, 18, 588, 4212, 5621, 5411, 364, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 3511, 12, 9400, 9635, 16, 1250, 2944, 13, 288, 5411, 13264, 4917, 273, 9635, 18, 588, 1227, 5484, 5621, 5411, 8888, 8526, 2325, 273, 9635, 18, 588, 4212, 5621, 5411, 364, 261, ...
if(scope == null) {
if (scope == null) {
void load() { Scriptable scope = db.getScope(); if(scope == null) { MessageDialogWrapper.showMessageDialog(db, "Can't load scripts: no scope available", "Run", JOptionPane.ERROR_MESSAGE); } else { String fileName = url; if(fileName != null) { new Thread(new LoadFile(db,scope, fileName)).start(); } } }
51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/b9766e81693411fa600b26b9a0763dcf621b2770/Main.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 1262, 1435, 288, 3639, 22780, 2146, 273, 1319, 18, 588, 3876, 5621, 3639, 309, 261, 4887, 422, 446, 13, 288, 5411, 2350, 6353, 3611, 18, 4500, 1079, 6353, 12, 1966, 16, 315, 2568, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1262, 1435, 288, 3639, 22780, 2146, 273, 1319, 18, 588, 3876, 5621, 3639, 309, 261, 4887, 422, 446, 13, 288, 5411, 2350, 6353, 3611, 18, 4500, 1079, 6353, 12, 1966, 16, 315, 2568, ...
assertTrue(Arrays.equals(new Long[]{new Long(123), new Long(456)}, longs));
assertTrue(Arrays.equals(new Long[] {new Long(123), new Long(456)}, longs));
public void testStringArrayToPrimitiveWrappers() { Long[] longs = (Long[]) converter.convertValue(context, null, null, null, new String[]{ "123", "456" }, Long[].class); assertNotNull(longs); assertTrue(Arrays.equals(new Long[]{new Long(123), new Long(456)}, longs)); Integer[] ints = (Integer[]) converter.convertValue(context, null, null, null, new String[]{ "123", "456" }, Integer[].class); assertNotNull(ints); assertTrue(Arrays.equals(new Integer[]{ new Integer(123), new Integer(456) }, ints)); Double[] doubles = (Double[]) converter.convertValue(context, null, null, null, new String[]{ "123", "456" }, Double[].class); assertNotNull(doubles); assertTrue(Arrays.equals(new Double[]{new Double(123), new Double(456)}, doubles)); Float[] floats = (Float[]) converter.convertValue(context, null, null, null, new String[]{ "123", "456" }, Float[].class); assertNotNull(floats); assertTrue(Arrays.equals(new Float[]{new Float(123), new Float(456)}, floats)); Boolean[] booleans = (Boolean[]) converter.convertValue(context, null, null, null, new String[]{ "true", "false" }, Boolean[].class); assertNotNull(booleans); assertTrue(Arrays.equals(new Boolean[]{Boolean.TRUE, Boolean.FALSE}, booleans)); }
16468 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/16468/a864a10e0ae74db12a683fe9ded33b591590ad5b/XWorkConverterTest.java/clean/src/test/com/opensymphony/xwork/util/XWorkConverterTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 28547, 774, 9840, 24114, 1435, 288, 3639, 3407, 8526, 4281, 564, 273, 261, 3708, 63, 5717, 6027, 18, 6283, 620, 12, 2472, 16, 446, 16, 446, 16, 446, 16, 394, 514, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 28547, 774, 9840, 24114, 1435, 288, 3639, 3407, 8526, 4281, 564, 273, 261, 3708, 63, 5717, 6027, 18, 6283, 620, 12, 2472, 16, 446, 16, 446, 16, 446, 16, 394, 514, 63, ...
return result;
if (presentCount != N) { Object[] tmp = new Object[shift + presentCount]; System.arraycopy(ids, shift, tmp, shift, presentCount); ids = tmp; } System.arraycopy(superIds, 0, ids, 0, shift); return ids;
public Object[] getIds() { Object[] superIds = super.getIds(); if (dense == null) return superIds; int count = 0; int last = dense.length; if (last > length) last = (int) length; for (int i=last-1; i >= 0; i--) { if (dense[i] != NOT_FOUND) count++; } count += superIds.length; Object[] result = new Object[count]; System.arraycopy(superIds, 0, result, 0, superIds.length); for (int i=last-1; i >= 0; i--) { if (dense[i] != NOT_FOUND) result[--count] = new Integer(i); } return result; }
12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/c30fa8321c95fd94e6211a7173e7f5fbfc876607/NativeArray.java/clean/src/org/mozilla/javascript/NativeArray.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 8526, 2634, 87, 1435, 288, 3639, 1033, 8526, 2240, 2673, 273, 2240, 18, 588, 2673, 5621, 3639, 309, 261, 25942, 422, 446, 13, 5411, 327, 2240, 2673, 31, 3639, 509, 1056, 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, 1033, 8526, 2634, 87, 1435, 288, 3639, 1033, 8526, 2240, 2673, 273, 2240, 18, 588, 2673, 5621, 3639, 309, 261, 25942, 422, 446, 13, 5411, 327, 2240, 2673, 31, 3639, 509, 1056, 273, ...
public void lookedUp( Comparator a_comparator )
public void lookedUp( Comparator comparator )
public void lookedUp( Comparator a_comparator ) { }
17035 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17035/385a49334a1b7600eef5534ffcf74cdf77039bf0/ComparatorRegistryMonitorAdapter.java/buggy/backend/api/src/java/org/apache/eve/schema/ComparatorRegistryMonitorAdapter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 27321, 1211, 12, 13359, 8862, 262, 565, 288, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 27321, 1211, 12, 13359, 8862, 262, 565, 288, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
c = in.read();
c = getChar();
public int getToken() throws IOException { int c; tokenno++; // Check for pushed-back token if (this.pushbackToken != EOF) { int result = this.pushbackToken; this.pushbackToken = EOF; return result; } // Eat whitespace, possibly sensitive to newlines. do { c = in.read(); if (c == '\n') { flags &= ~TSF_DIRTYLINE; if ((flags & TSF_NEWLINES) != 0) break; } } while (isJSSpace(c) || c == '\n'); if (c == EOF_CHAR) return EOF; if (c != '-' && c != '\n') flags |= TSF_DIRTYLINE; // identifier/keyword/instanceof? // watch out for starting with a <backslash> boolean identifierStart; boolean isUnicodeEscapeStart = false; if (c == '\\') { c = in.read(); if (c == 'u') { identifierStart = true; isUnicodeEscapeStart = true; stringBufferTop = 0; } else { identifierStart = false; c = '\\'; in.unread(); } } else { identifierStart = Character.isJavaIdentifierStart((char)c); if (identifierStart) { stringBufferTop = 0; addToString(c); } } if (identifierStart) { boolean containsEscape = isUnicodeEscapeStart; for (;;) { if (isUnicodeEscapeStart) { // strictly speaking we should probably push-back // all the bad characters if the <backslash>uXXXX // sequence is malformed. But since there isn't a // correct context(is there?) for a bad Unicode // escape sequence in an identifier, we can report // an error here. int escapeVal = 0; for (int i = 0; i != 4; ++i) { c = in.read(); escapeVal = (escapeVal << 4) | xDigitToInt(c); // Next check takes care about c < 0 and bad escape if (escapeVal < 0) { break; } } if (escapeVal < 0) { reportSyntaxError("msg.invalid.escape", null); return ERROR; } addToString(escapeVal); isUnicodeEscapeStart = false; } else { c = in.read(); if (c == '\\') { c = in.read(); if (c == 'u') { isUnicodeEscapeStart = true; containsEscape = true; } else { reportSyntaxError("msg.illegal.character", null); return ERROR; } } else { if (!Character.isJavaIdentifierPart((char)c)) { break; } addToString(c); } } } in.unread(); String str = getStringFromBuffer(); if (!containsEscape) { // OPT we shouldn't have to make a string (object!) to // check if it's a keyword. // Return the corresponding token if it's a keyword int result = stringToKeyword(str); if (result != EOF) { if (result != RESERVED) { return result; } else if (!Context.getContext().hasFeature( Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER)) { return result; } else { // If implementation permits to use future reserved // keywords in violation with the EcmaScript standard, // treat it as name but issue warning Object[] errArgs = { str }; reportSyntaxWarning("msg.reserved.keyword", errArgs); } } } this.string = str; return NAME; } // is it a number? if (isDigit(c) || (c == '.' && isDigit(in.peek()))) { stringBufferTop = 0; int base = 10; if (c == '0') { c = in.read(); if (c == 'x' || c == 'X') { base = 16; c = in.read(); } else if (isDigit(c)) { base = 8; } else { addToString('0'); } } if (base == 16) { while (0 <= xDigitToInt(c)) { addToString(c); c = in.read(); } } else { while ('0' <= c && c <= '9') { /* * We permit 08 and 09 as decimal numbers, which * makes our behavior a superset of the ECMA * numeric grammar. We might not always be so * permissive, so we warn about it. */ if (base == 8 && c >= '8') { Object[] errArgs = { c == '8' ? "8" : "9" }; reportSyntaxWarning("msg.bad.octal.literal", errArgs); base = 10; } addToString(c); c = in.read(); } } boolean isInteger = true; if (base == 10 && (c == '.' || c == 'e' || c == 'E')) { isInteger = false; if (c == '.') { do { addToString(c); c = in.read(); } while (isDigit(c)); } if (c == 'e' || c == 'E') { addToString(c); c = in.read(); if (c == '+' || c == '-') { addToString(c); c = in.read(); } if (!isDigit(c)) { reportSyntaxError("msg.missing.exponent", null); return ERROR; } do { addToString(c); c = in.read(); } while (isDigit(c)); } } in.unread(); String numString = getStringFromBuffer(); double dval; if (base == 10 && !isInteger) { try { // Use Java conversion to number from string... dval = (Double.valueOf(numString)).doubleValue(); } catch (NumberFormatException ex) { Object[] errArgs = { ex.getMessage() }; reportSyntaxError("msg.caught.nfe", errArgs); return ERROR; } } else { dval = ScriptRuntime.stringToNumber(numString, 0, base); } this.number = dval; return NUMBER; } // is it a string? if (c == '"' || c == '\'') { // We attempt to accumulate a string the fast way, by // building it directly out of the reader. But if there // are any escaped characters in the string, we revert to // building it out of a StringBuffer. int quoteChar = c; int val = 0; stringBufferTop = 0; c = in.read(); strLoop: while (c != quoteChar) { if (c == '\n' || c == EOF_CHAR) { in.unread(); reportSyntaxError("msg.unterminated.string.lit", null); return ERROR; } if (c == '\\') { // We've hit an escaped character c = in.read(); switch (c) { case 'b': c = '\b'; break; case 'f': c = '\f'; break; case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; // \v a late addition to the ECMA spec, // it is not in Java, so use 0xb case 'v': c = 0xb; break; case 'u': { /* * Get 4 hex digits; if the u escape is not * followed by 4 hex digits, use 'u' + the literal * character sequence that follows. */ int escapeStart = stringBufferTop; addToString('u'); int escapeVal = 0; for (int i = 0; i != 4; ++i) { c = in.read(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { continue strLoop; } addToString(c); } // prepare for replace of stored 'u' sequence // by escape value stringBufferTop = escapeStart; c = escapeVal; } break; case 'x': { /* Get 2 hex digits, defaulting to 'x' + literal * sequence, as above. */ c = in.read(); int escapeVal = xDigitToInt(c); if (escapeVal < 0) { addToString('x'); continue strLoop; } else { int c1 = c; c = in.read(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { addToString('x'); addToString(c1); continue strLoop; } else { // got 2 hex digits c = escapeVal; } } } break; default: if ('0' <= c && c < '8') { val = c - '0'; c = in.read(); if ('0' <= c && c < '8') { val = 8 * val + c - '0'; c = in.read(); if ('0' <= c && c < '8' && val <= 037) { // c is 3rd char of octal sequence only if // the resulting val <= 0377 val = 8 * val + c - '0'; c = in.read(); } } in.unread(); c = val; } } } addToString(c); c = in.read(); } this.string = getStringFromBuffer(); return STRING; } switch (c) { case '\n': return EOL; case ';': return SEMI; case '[': return LB; case ']': return RB; case '{': return LC; case '}': return RC; case '(': return LP; case ')': return RP; case ',': return COMMA; case '?': return HOOK; case ':': return COLON; case '.': return DOT; case '|': if (in.match('|')) { return OR; } else if (in.match('=')) { this.op = BITOR; return ASSIGN; } else { return BITOR; } case '^': if (in.match('=')) { this.op = BITXOR; return ASSIGN; } else { return BITXOR; } case '&': if (in.match('&')) { return AND; } else if (in.match('=')) { this.op = BITAND; return ASSIGN; } else { return BITAND; } case '=': if (in.match('=')) { if (in.match('=')) this.op = SHEQ; else this.op = EQ; return EQOP; } else { this.op = NOP; return ASSIGN; } case '!': if (in.match('=')) { if (in.match('=')) this.op = SHNE; else this.op = NE; return EQOP; } else { this.op = NOT; return UNARYOP; } case '<': /* NB:treat HTML begin-comment as comment-till-eol */ if (in.match('!')) { if (in.match('-')) { if (in.match('-')) { skipLine(); return getToken(); // in place of 'goto retry' } in.unread(); } in.unread(); } if (in.match('<')) { if (in.match('=')) { this.op = LSH; return ASSIGN; } else { this.op = LSH; return SHOP; } } else { if (in.match('=')) { this.op = LE; return RELOP; } else { this.op = LT; return RELOP; } } case '>': if (in.match('>')) { if (in.match('>')) { if (in.match('=')) { this.op = URSH; return ASSIGN; } else { this.op = URSH; return SHOP; } } else { if (in.match('=')) { this.op = RSH; return ASSIGN; } else { this.op = RSH; return SHOP; } } } else { if (in.match('=')) { this.op = GE; return RELOP; } else { this.op = GT; return RELOP; } } case '*': if (in.match('=')) { this.op = MUL; return ASSIGN; } else { return MUL; } case '/': // is it a // comment? if (in.match('/')) { skipLine(); return getToken(); } if (in.match('*')) { while ((c = in.read()) != -1 && !(c == '*' && in.match('/'))) { ; // empty loop body } if (c == EOF_CHAR) { reportSyntaxError("msg.unterminated.comment", null); return ERROR; } return getToken(); // `goto retry' } // is it a regexp? if ((flags & TSF_REGEXP) != 0) { stringBufferTop = 0; while ((c = in.read()) != '/') { if (c == '\n' || c == EOF_CHAR) { in.unread(); reportSyntaxError("msg.unterminated.re.lit", null); return ERROR; } if (c == '\\') { addToString(c); c = in.read(); } addToString(c); } int reEnd = stringBufferTop; while (true) { if (in.match('g')) addToString('g'); else if (in.match('i')) addToString('i'); else if (in.match('m')) addToString('m'); else break; } if (isAlpha(in.peek())) { reportSyntaxError("msg.invalid.re.flag", null); return ERROR; } this.string = new String(stringBuffer, 0, reEnd); this.regExpFlags = new String(stringBuffer, reEnd, stringBufferTop - reEnd); return REGEXP; } if (in.match('=')) { this.op = DIV; return ASSIGN; } else { return DIV; } case '%': this.op = MOD; if (in.match('=')) { return ASSIGN; } else { return MOD; } case '~': this.op = BITNOT; return UNARYOP; case '+': if (in.match('=')) { this.op = ADD; return ASSIGN; } else if (in.match('+')) { return INC; } else { return ADD; } case '-': if (in.match('=')) { this.op = SUB; c = ASSIGN; } else if (in.match('-')) { if (0 == (flags & TSF_DIRTYLINE)) { // treat HTML end-comment after possible whitespace // after line start as comment-utill-eol if (in.match('>')) { skipLine(); return getToken(); } } c = DEC; } else { c = SUB; } flags |= TSF_DIRTYLINE; return c; default: reportSyntaxError("msg.illegal.character", null); return ERROR; } }
13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/8d78476dde863807579dcd20202decfcfcc9f7f1/TokenStream.java/clean/js/rhino/src/org/mozilla/javascript/TokenStream.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 9162, 1435, 1216, 1860, 288, 3639, 509, 276, 31, 3639, 1147, 2135, 9904, 31, 3639, 368, 2073, 364, 18543, 17, 823, 1147, 3639, 309, 261, 2211, 18, 6206, 823, 1345, 480, 6431, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 9162, 1435, 1216, 1860, 288, 3639, 509, 276, 31, 3639, 1147, 2135, 9904, 31, 3639, 368, 2073, 364, 18543, 17, 823, 1147, 3639, 309, 261, 2211, 18, 6206, 823, 1345, 480, 6431, ...
public void set(org.quickfix.field.PartySubID value)
public void set(quickfix.field.PartySubID value)
public void set(org.quickfix.field.PartySubID value) { setField(value); }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/Quote.java/clean/src/java/src/quickfix/fix44/Quote.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 444, 12, 19525, 904, 18, 1518, 18, 17619, 1676, 734, 460, 13, 225, 288, 16331, 12, 1132, 1769, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 444, 12, 19525, 904, 18, 1518, 18, 17619, 1676, 734, 460, 13, 225, 288, 16331, 12, 1132, 1769, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
throw getRuntime().newNameError("wrong constant name " + name);
throw wrongConstantNameError(name);
public IRubyObject const_get(IRubyObject symbol) { String name = symbol.asSymbol(); if (!IdUtil.isConstant(name)) { throw getRuntime().newNameError("wrong constant name " + name); } return getConstant(name); }
46217 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46217/1278c5bb3507a052d150d814f15453542ae41aed/RubyModule.java/clean/src/org/jruby/RubyModule.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 15908, 10340, 921, 1866, 67, 588, 12, 7937, 10340, 921, 3273, 13, 288, 3639, 514, 508, 273, 3273, 18, 345, 5335, 5621, 3639, 309, 16051, 548, 1304, 18, 291, 6902, 12, 529, 3719, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 15908, 10340, 921, 1866, 67, 588, 12, 7937, 10340, 921, 3273, 13, 288, 3639, 514, 508, 273, 3273, 18, 345, 5335, 5621, 3639, 309, 16051, 548, 1304, 18, 291, 6902, 12, 529, 3719, 2...
if ( manager != null )
if ( loggerManager != null )
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 ); if ( commandLine.hasOption( CLIManager.ACTIVATE_PROFILES ) ) { System.setProperty( ProfileActivationUtils.ACTIVE_PROFILE_IDS, commandLine.getOptionValue( CLIManager.ACTIVATE_PROFILES ) ); } boolean debug = commandLine.hasOption( CLIManager.DEBUG ); boolean showErrors = debug || commandLine.hasOption( CLIManager.ERRORS ); if ( showErrors ) { System.out.println( "+ Error stacktraces are turned on." ); } // ---------------------------------------------------------------------- // 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. // ---------------------------------------------------------------------- Embedder embedder = new Embedder(); try { embedder.start( classWorld ); } catch ( PlexusContainerException e ) { showFatalError( "Unable to start the embedded plexus container", e, showErrors ); return 1; } String userSettingsPath = null; if ( commandLine.hasOption( CLIManager.ALTERNATE_USER_SETTINGS ) ) { userSettingsPath = commandLine.getOptionValue( CLIManager.ALTERNATE_USER_SETTINGS ); } Settings settings = null; try { MavenSettingsBuilder settingsBuilder = (MavenSettingsBuilder) embedder.lookup( MavenSettingsBuilder.ROLE ); if ( userSettingsPath != null ) { File userSettingsFile = new File( userSettingsPath ); if ( userSettingsFile.exists() && !userSettingsFile.isDirectory() ) { settings = settingsBuilder.buildSettings( userSettingsFile ); } else { System.out.println("WARNING: Alternate user settings file: " + userSettingsPath + " is invalid. Using default path." ); } } if ( settings == null ) { settings = settingsBuilder.buildSettings(); } } catch ( IOException e ) { showFatalError( "Unable to read settings.xml", e, showErrors ); return 1; } catch ( XmlPullParserException e ) { showFatalError( "Unable to read settings.xml", e, showErrors ); return 1; } catch ( ComponentLookupException e ) { showFatalError( "Unable to read settings.xml", e, showErrors ); return 1; } if ( commandLine.hasOption( CLIManager.BATCH_MODE ) ) { settings.setInteractiveMode( false ); } if ( commandLine.hasOption( CLIManager.FORCE_PLUGIN_UPDATES ) || commandLine.hasOption( CLIManager.FORCE_PLUGIN_UPDATES2 ) ) { settings.getRuntimeInfo().setPluginUpdateOverride( Boolean.TRUE ); } else if ( commandLine.hasOption( CLIManager.SUPPRESS_PLUGIN_UPDATES ) ) { settings.getRuntimeInfo().setPluginUpdateOverride( Boolean.FALSE ); } if ( commandLine.hasOption( CLIManager.FORCE_PLUGIN_LATEST_CHECK ) ) { settings.getRuntimeInfo().setCheckLatestPluginVersion( Boolean.TRUE ); } else if ( commandLine.hasOption( CLIManager.SUPPRESS_PLUGIN_LATEST_CHECK ) ) { settings.getRuntimeInfo().setCheckLatestPluginVersion( Boolean.FALSE ); } if ( commandLine.hasOption( CLIManager.SUPPRESS_PLUGIN_REGISTRY ) ) { settings.setUsePluginRegistry( false ); } Maven maven = null; MavenExecutionRequest request = null; LoggerManager manager = null; try { // logger must be created first manager = (LoggerManager) embedder.lookup( LoggerManager.ROLE ); if ( debug ) { manager.setThreshold( Logger.LEVEL_DEBUG ); } request = createRequest( embedder, commandLine, settings, eventDispatcher, manager ); setProjectFileOptions( commandLine, request ); maven = createMavenInstance( embedder, settings.isInteractiveMode() ); } catch ( ComponentLookupException e ) { showFatalError( "Unable to configure the Maven application", e, showErrors ); return 1; } finally { if ( manager != null ) { try { embedder.release( manager ); } catch ( ComponentLifecycleException e ) { showFatalError( "Error releasing logging manager", e, showErrors ); 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, showErrors ); return 1; } if ( response != null && response.isExecutionFailure() ) { return 1; } else { return 0; } }
47050 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47050/fe5a91b0d626193d59db343dd9d5e582d0ef289b/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...
return links.size();
return links.size();
public int numberOfLinks() { return links.size(); }
47927 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47927/13de68466e3cf7fde6ee0bde0cee09a33e837e89/LogicalLink.java/clean/src/org/jgroups/blocks/LogicalLink.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 7922, 7100, 1435, 288, 202, 2463, 4716, 18, 1467, 5621, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 7922, 7100, 1435, 288, 202, 2463, 4716, 18, 1467, 5621, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
public void initEntryFact(LockSet result) { // FIXME: we don't try to do anything for static methods at the moment, // because we don't yet have a way of figuring out when a Class object // is loaded as a value. result.clear(); result.setDefaultLockCount(0); if (isSynchronized && !isStatic) { ValueNumber thisValue = vna.getThisValue(); result.setLockCount(thisValue.getNumber(), 1); } }
7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/647052d82ae632da1e81ed717b00f83dcbdaa292/LockAnalysis.java/clean/findbugs/src/java/edu/umd/cs/findbugs/ba/LockAnalysis.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1208, 1622, 9766, 12, 2531, 694, 563, 13, 288, 202, 202, 759, 9852, 30, 732, 2727, 1404, 775, 358, 741, 6967, 364, 760, 2590, 622, 326, 10382, 16, 202, 202, 759, 2724, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1208, 1622, 9766, 12, 2531, 694, 563, 13, 288, 202, 202, 759, 9852, 30, 732, 2727, 1404, 775, 358, 741, 6967, 364, 760, 2590, 622, 326, 10382, 16, 202, 202, 759, 2724, ...
String companyId, String plid, String languageId) {
String companyId, String plid, String languageId, boolean isIe) {
public static LayoutCacheResponseData getLayoutCacheResponseData( String companyId, String plid, String languageId) { LayoutCacheResponseData data = null; if (Validator.isNull(plid)) { return null; } plid = plid.trim().toUpperCase(); String key = _encodeKey(companyId, plid + LANGUAGE + languageId); try { data = (LayoutCacheResponseData)_cache.getFromCache(key); } catch (NeedsRefreshException nre) { _log.warn("Layout " + plid + " is not cached"); } finally { if (data == null) { _cache.cancelUpdate(key); } } return data; }
53908 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53908/ed678eafef9f21b2ca10149aaf7679c2201d8133/LayoutCacheUtil.java/buggy/portal-ejb/src/com/liferay/portal/servlet/filters/layoutcache/LayoutCacheUtil.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 9995, 1649, 1064, 751, 17670, 1649, 1064, 751, 12, 202, 202, 780, 14346, 16, 514, 886, 350, 16, 514, 23273, 13, 288, 202, 202, 3744, 1649, 1064, 751, 501, 273, 446, 31, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 9995, 1649, 1064, 751, 17670, 1649, 1064, 751, 12, 202, 202, 780, 14346, 16, 514, 886, 350, 16, 514, 23273, 13, 288, 202, 202, 3744, 1649, 1064, 751, 501, 273, 446, 31, ...
protected DataLoader createHierarchyLoader()
protected DataLoader createHierarchyLoader(boolean refresh)
protected DataLoader createHierarchyLoader() { return new DatasetLoader(component, datasetsID); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/DatasetModel.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/DatasetModel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 1910, 2886, 752, 12074, 2886, 12, 6494, 4460, 13, 565, 288, 3639, 327, 394, 10778, 2886, 12, 4652, 16, 11109, 734, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 1910, 2886, 752, 12074, 2886, 12, 6494, 4460, 13, 565, 288, 3639, 327, 394, 10778, 2886, 12, 4652, 16, 11109, 734, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
run("./Future3Boxed.x10","Future3Boxed","./Constructs/Future"); }
runHelper(); }
public void test_Constructs_Future_Future3Boxed() { run("./Future3Boxed.x10","Future3Boxed","./Constructs/Future"); }
1769 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1769/3bd1027a0e8a0edbdacb19b952cc4296d36760df/TestCompiler.java/clean/x10.test/src/polyglot/ext/x10/tests/TestCompiler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 67, 13262, 67, 4118, 67, 4118, 23, 3514, 329, 1435, 288, 3639, 1086, 2932, 18, 19, 4118, 23, 3514, 329, 18, 92, 2163, 15937, 4118, 23, 3514, 329, 3113, 9654, 19, 13262,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 67, 13262, 67, 4118, 67, 4118, 23, 3514, 329, 1435, 288, 3639, 1086, 2932, 18, 19, 4118, 23, 3514, 329, 18, 92, 2163, 15937, 4118, 23, 3514, 329, 3113, 9654, 19, 13262,...
return new Boolean(value);
return Boolean.valueOf(value);
public Object constantValue() { return new Boolean(value); }
11982 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11982/32fd4d773795d6bb04b5051a1dd3ecf27f06745e/BooleanLit_c.java/clean/src/polyglot/ast/BooleanLit_c.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 1033, 5381, 620, 1435, 288, 565, 327, 3411, 18, 1132, 951, 12, 1132, 1769, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 1033, 5381, 620, 1435, 288, 565, 327, 3411, 18, 1132, 951, 12, 1132, 1769, 225, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
while (i < length && buf.charAt(i) >= '0' && buf.charAt(i) <= '9') {
int numToTrim=0; int length=buf.length(); if ( (length>2)&&((buf.charAt(0)=='r')||(buf.charAt(0)=='R'))&& ((buf.charAt(1)=='e')||(buf.charAt(1)=='E'))) { char c=buf.charAt(2); if (c==':') { numToTrim=3; } else if ((c=='[')||(c=='(')) { int i=3; while ((i<length)&&(buf.charAt(i)>='0')&&(buf.charAt(i)<='9')) {
protected boolean stripRe(StringBuffer buf) { // Much of this code is duplicated in MessageBase. Sigh. ### if (buf == null) return false; int numToTrim = 0; int length = buf.length(); if (length > 2 && (buf.charAt(0) == 'r' || buf.charAt(0) == 'R') && (buf.charAt(1) == 'e' || buf.charAt(1) == 'E')) { char c = buf.charAt(2); if (c == ':') { numToTrim = 3; // Skip over "Re:" } else if (c == '[' || c == '(') { int i = 3; // skip over "Re[" or "Re(" // Skip forward over digits after the "[" or "(". while (i < length && buf.charAt(i) >= '0' && buf.charAt(i) <= '9') { i++; } // Now ensure that the following thing is "]:" or "):" // Only if it is do we treat this all as a "Re"-ish thing. if (i < (length-1) && (buf.charAt(i) == ']' || buf.charAt(i) == ')') && buf.charAt(i+1) == ':') { numToTrim = i+2; // Skip the whole thing. } } } if (numToTrim > 0) { int i = numToTrim; while (i < length - 1 && Character.isWhitespace(buf.charAt(i))) { i++; } for (int j=i ; j<length ; j++) { buf.setCharAt(j - i, buf.charAt(j)); } buf.setLength(length - i); return true; } return false; }
13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/0cc63cb388a13f01532486f9d178811914e6d71b/MessageExtraWrapper.java/clean/grendel/sources/grendel/storage/MessageExtraWrapper.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 1250, 2569, 426, 12, 780, 1892, 1681, 13, 288, 565, 368, 490, 2648, 434, 333, 981, 353, 16975, 316, 2350, 2171, 18, 225, 348, 2031, 18, 11849, 565, 309, 261, 4385, 422, 446, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 1250, 2569, 426, 12, 780, 1892, 1681, 13, 288, 565, 368, 490, 2648, 434, 333, 981, 353, 16975, 316, 2350, 2171, 18, 225, 348, 2031, 18, 11849, 565, 309, 261, 4385, 422, 446, 13, ...
throw new UnsupportedOperationException("Unimplemented mock service");
return "111.222.333.444";
public String getRemoteHost() { throw new UnsupportedOperationException("Unimplemented mock service"); }
47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/900d077cd99fad72f38fe6aaaff6a8fbd61fc8f0/MockMail.java/buggy/src/test/org/apache/james/test/mock/mailet/MockMail.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 14879, 2594, 1435, 288, 3639, 327, 315, 20227, 18, 28855, 18, 3707, 23, 18, 6334, 24, 14432, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 14879, 2594, 1435, 288, 3639, 327, 315, 20227, 18, 28855, 18, 3707, 23, 18, 6334, 24, 14432, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
public void setPassword(String password) {
public void setPassword(String password) {
public void setPassword(String password) { this.password = password; }
639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/6154080061f869b4e425d608da3bd61fad967564/FTP.java/clean/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 23753, 12, 780, 2201, 13, 565, 288, 3639, 333, 18, 3664, 273, 2201, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 23753, 12, 780, 2201, 13, 565, 288, 3639, 333, 18, 3664, 273, 2201, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
public void table_delete(Table table) { tablesFlow.removeTable(table);
public void table_delete(final Table table) { SwingUtilities.invokeLater(new Runnable() { public void run() { tablesFlow.removeTable(table); } });
public void table_delete(Table table) { tablesFlow.removeTable(table); }
45800 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45800/a798981435b409eb5aac9cc0b7470d72411d52ab/RoomPanel.java/buggy/java/src/ggz/ui/RoomPanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1014, 67, 3733, 12, 1388, 1014, 13, 288, 3639, 4606, 5249, 18, 4479, 1388, 12, 2121, 1769, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1014, 67, 3733, 12, 1388, 1014, 13, 288, 3639, 4606, 5249, 18, 4479, 1388, 12, 2121, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Set offTargetFalse = new HashSet();
Set offtarget = new HashSet();
private Set readCurated(BufferedReader br) throws IOException { Set offTargetFalse = new HashSet(); Iterator tsvIter = TextFileUtil.parseTabDelimitedReader(br); String[] curatedNameRow = null; Map curatedNameMap = new HashMap(); while (tsvIter.hasNext()) { String [] thisRow = (String[]) tsvIter.next(); // get rid of header and find column headings if (curatedNameRow == null) { if (thisRow[0].equals("Final Hit")) { curatedNameRow = thisRow; for (int i = 0; i < curatedNameRow.length; i++) { curatedNameMap.put(curatedNameRow[i], new Integer(i)); } } continue; } // reading actual data String amplicon = getColumnValue(curatedNameMap, thisRow, DRSC_AMPLICON_COLUMN); if (amplicon != null) { offTargetFalse.add(amplicon); } } return offTargetFalse; }
29158 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/29158/6a4312e587bd5d704d5973cebcb9125e779ceb4d/FlyRNAiScreenConverter.java/clean/bio/sources/flyrnai-screens/main/src/org/intermine/bio/dataconversion/FlyRNAiScreenConverter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1000, 855, 2408, 690, 12, 17947, 2514, 5186, 13, 1216, 1860, 288, 3639, 1000, 434, 1222, 826, 273, 394, 6847, 5621, 3639, 4498, 22731, 2360, 273, 3867, 812, 1304, 18, 2670, 5661, 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, 3238, 1000, 855, 2408, 690, 12, 17947, 2514, 5186, 13, 1216, 1860, 288, 3639, 1000, 434, 1222, 826, 273, 394, 6847, 5621, 3639, 4498, 22731, 2360, 273, 3867, 812, 1304, 18, 2670, 5661, 23...
throws SemanticException { assert_(container); assert_(argTypes); MostSpecificComparator msc = new MostSpecificComparator(); Collections.sort(acceptable, msc); Iterator i = acceptable.iterator(); ProcedureInstance maximal = (ProcedureInstance) i.next(); while (i.hasNext()) { ProcedureInstance p = (ProcedureInstance) i.next(); if (msc.compare(maximal, p) >= 0) { return null; } } return maximal;
throws SemanticException { Collection maximal = findMostSpecificProcedures(acceptable, container, argTypes, currClass); if (maximal.size() == 1) { return (ProcedureInstance) maximal.iterator().next(); } return null;
protected ProcedureInstance findProcedure(List acceptable, ReferenceType container, List argTypes, ClassType currClass) throws SemanticException { assert_(container); assert_(argTypes); // now, use JLS 15.11.2.2 // First sort from most- to least-specific. MostSpecificComparator msc = new MostSpecificComparator(); Collections.sort(acceptable, msc); Iterator i = acceptable.iterator(); ProcedureInstance maximal = (ProcedureInstance) i.next(); // Now check to make sure that we have a maximal most-specific method. while (i.hasNext()) { ProcedureInstance p = (ProcedureInstance) i.next(); if (msc.compare(maximal, p) >= 0) { return null; } } return maximal; }
11982 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11982/653fae09979f7d8830e6e50e9dafc40d7fe93ede/TypeSystem_c.java/clean/src/polyglot/types/TypeSystem_c.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 26639, 1442, 1104, 17213, 12, 682, 14206, 16, 202, 4766, 1377, 6268, 559, 1478, 16, 25083, 1377, 987, 30973, 16, 25083, 1377, 1659, 559, 4306, 797, 13, 202, 15069, 24747, 503, 288, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 26639, 1442, 1104, 17213, 12, 682, 14206, 16, 202, 4766, 1377, 6268, 559, 1478, 16, 25083, 1377, 987, 30973, 16, 25083, 1377, 1659, 559, 4306, 797, 13, 202, 15069, 24747, 503, 288, ...
if (menuMgr != null)
if (menuMgr != null) {
public void dispose() { if (actionHandlers != null) actionHandlers.clear(); if (menuMgr != null) menuMgr.disposeManager(); if (statusLineMgr != null) statusLineMgr.disposeManager(); if (toolBarMgr != null) toolBarMgr.disposeManager(); propertyChangeListeners.clear(); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/5fab247f52602e9d6d0d778abdd2a7eac94731b7/SubActionBars.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/SubActionBars.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 15825, 1435, 288, 202, 202, 430, 261, 1128, 6919, 480, 446, 13, 1082, 202, 1128, 6919, 18, 8507, 5621, 202, 202, 430, 261, 5414, 9455, 480, 446, 13, 1082, 202, 5414, 9455...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 15825, 1435, 288, 202, 202, 430, 261, 1128, 6919, 480, 446, 13, 1082, 202, 1128, 6919, 18, 8507, 5621, 202, 202, 430, 261, 5414, 9455, 480, 446, 13, 1082, 202, 5414, 9455...
public static KeyPairGenerator getInstance(String alg) throws NoSuchAlgorithmException { return getInstance(Security.getCryptInstance( ENGINE_CLASS, alg)); }
public static KeyPairGenerator getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) { try { return getInstance(algorithm, p[i]); } catch (NoSuchAlgorithmException ignored) {} } throw new NoSuchAlgorithmException(algorithm); }
public static KeyPairGenerator getInstance(String alg) throws NoSuchAlgorithmException { return getInstance(Security.getCryptInstance( ENGINE_CLASS, alg)); }
45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/c133414452f7d3f9607e77a80e3ae003b3b3fb91/KeyPairGenerator.java/clean/libraries/javalib/java/security/KeyPairGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 28968, 3908, 3694, 12, 780, 11989, 13, 1082, 202, 15069, 17684, 288, 202, 202, 2463, 3694, 12, 4368, 18, 588, 22815, 1442, 12, 1082, 202, 28980, 67, 5237, 16, 11989, 10019,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 28968, 3908, 3694, 12, 780, 11989, 13, 1082, 202, 15069, 17684, 288, 202, 202, 2463, 3694, 12, 4368, 18, 588, 22815, 1442, 12, 1082, 202, 28980, 67, 5237, 16, 11989, 10019,...
if (cx.hasFeature(Context.FEATURE_STRICT_MODE)) {
if (cx.hasFeature(Context.FEATURE_STRICT_EVAL)) {
public static Object evalSpecial(Context cx, Scriptable scope, Object thisArg, Object[] args, String filename, int lineNumber) { if (args.length < 1) return Undefined.instance; Object x = args[0]; if (!(x instanceof String)) { if (cx.hasFeature(Context.FEATURE_STRICT_MODE)) { throw Context.reportRuntimeError0("msg.eval.nonstring.strict"); } String message = ScriptRuntime.getMessage0("msg.eval.nonstring"); Context.reportWarning(message); return x; } if (filename == null) { int[] linep = new int[1]; filename = Context.getSourcePositionFromStack(linep); if (filename != null) { lineNumber = linep[0]; } else { filename = ""; } } String sourceName = ScriptRuntime. makeUrlForGeneratedScript(true, filename, lineNumber); ErrorReporter reporter; reporter = DefaultErrorReporter.forEval(cx.getErrorReporter()); // Compile with explicit interpreter instance to force interpreter // mode. Script script = cx.compileString((String)x, new Interpreter(), reporter, sourceName, 1, null); ((InterpretedFunction)script).idata.evalScriptFlag = true; // if the compile fails, an error has been reported by the // compiler, but we need to stop execution to avoid // infinite looping on while(true) { eval('foo bar') } - // so we throw an EvaluatorException. if (script == null) { String message = ScriptRuntime.getMessage0("msg.syntax"); throw new EvaluatorException(message, filename, lineNumber, null, 0); } Callable c = (Callable)script; return c.call(cx, scope, (Scriptable)thisArg, ScriptRuntime.emptyArgs); }
7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/20d9c33ab6d93fbe8c74f8c7fe04403277218a56/ScriptRuntime.java/clean/js/rhino/src/org/mozilla/javascript/ScriptRuntime.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 1033, 5302, 12193, 12, 1042, 9494, 16, 22780, 2146, 16, 19694, 1033, 20134, 16, 1033, 8526, 833, 16, 19694, 514, 1544, 16, 509, 13629, 13, 565, 288, 3639, 309, 261, 1968, 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, 760, 1033, 5302, 12193, 12, 1042, 9494, 16, 22780, 2146, 16, 19694, 1033, 20134, 16, 1033, 8526, 833, 16, 19694, 514, 1544, 16, 509, 13629, 13, 565, 288, 3639, 309, 261, 1968, 18, ...
private void executeSql(String databaseKey, String sqlScript, Map replacers, boolean abortOnError) { String filename = null; InputStreamReader reader = null;
private void executeSql(Reader inputReader, Map replacers, boolean abortOnError) { String statement = ""; LineNumberReader reader = null; String line = null;
private void executeSql(String databaseKey, String sqlScript, Map replacers, boolean abortOnError) { String filename = null; InputStreamReader reader = null; try { filename = m_basePath + "setup" + File.separator + "database" + File.separator + databaseKey + File.separator + sqlScript; executeSql(new FileReader(filename), replacers, abortOnError); } catch (FileNotFoundException e) { if (m_errorLogging) { m_errors.addElement("Database setup SQL script not found: " + filename); m_errors.addElement(CmsException.getStackTraceAsString(e)); } } finally { try { if (reader != null) { reader.close(); } } catch (Exception e) { // noop } } }
8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/81a0eece47a6b5f01a9201699d7d2364fc0b93c5/CmsSetupDb.java/clean/src/org/opencms/setup/CmsSetupDb.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1836, 5101, 12, 780, 2063, 653, 16, 514, 1847, 3651, 16, 1635, 6831, 1077, 414, 16, 1250, 6263, 11427, 13, 288, 3639, 514, 1544, 273, 446, 31, 3639, 15322, 2949, 273, 446, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1836, 5101, 12, 780, 2063, 653, 16, 514, 1847, 3651, 16, 1635, 6831, 1077, 414, 16, 1250, 6263, 11427, 13, 288, 3639, 514, 1544, 273, 446, 31, 3639, 15322, 2949, 273, 446, 31...
if (jj_scan_token(OP_LE)) return true;
Token xsp; xsp = jj_scanpos; if (jj_3R_66()) { jj_scanpos = xsp; if (jj_3R_67()) { jj_scanpos = xsp; if (jj_3R_68()) { jj_scanpos = xsp; if (jj_3R_69()) { jj_scanpos = xsp; if (jj_3R_70()) return true;
final private boolean jj_3R_59() { if (jj_scan_token(OP_LE)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/f5ebf1fa86f338484c8f14f11ac1fbcc329367a3/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 3238, 1250, 10684, 67, 23, 54, 67, 6162, 1435, 288, 565, 3155, 619, 1752, 31, 619, 1752, 273, 10684, 67, 9871, 917, 31, 309, 261, 78, 78, 67, 23, 54, 67, 6028, 10756, 288, 10684,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 3238, 1250, 10684, 67, 23, 54, 67, 6162, 1435, 288, 565, 3155, 619, 1752, 31, 619, 1752, 273, 10684, 67, 9871, 917, 31, 309, 261, 78, 78, 67, 23, 54, 67, 6028, 10756, 288, 10684,...
+ OBJ16_PATH + "border_bottom.gif" );
+ OBJ16_PATH + "border_bottom.gif" );
private final static void declareImages( ) { // common icons declareImage( ISharedImages.IMG_OBJS_ERROR_TSK, ICONS_PATH + PROGRESS_PATH + "error_tsk.gif" ); //$NON-NLS-1$ declareImage( ISharedImages.IMG_OBJ_FOLDER, ICONS_PATH + OBJ16_PATH + "fldr_obj.gif" ); //$NON-NLS-1$ declareImage( ISharedImages.IMG_TOOL_COPY, ICONS_PATH + ETOOL16_PATH + "copy_edit.gif" ); //$NON-NLS-1$ declareImage( ISharedImages.IMG_TOOL_CUT, ICONS_PATH + ETOOL16_PATH + "cut_edit.gif" ); //$NON-NLS-1$ declareImage( ISharedImages.IMG_TOOL_UNDO, ICONS_PATH + ETOOL16_PATH + "undo_edit.gif" ); //$NON-NLS-1$ declareImage( ISharedImages.IMG_TOOL_REDO, ICONS_PATH + ETOOL16_PATH + "redo_edit.gif" ); //$NON-NLS-1$ declareImage( ISharedImages.IMG_TOOL_PASTE, ICONS_PATH + ETOOL16_PATH + "paste_edit.gif" ); //$NON-NLS-1$ declareImage( ISharedImages.IMG_TOOL_DELETE, ICONS_PATH + ETOOL16_PATH + "delete_edit.gif" ); //$NON-NLS-1$ declareImage(IReportGraphicConstants.ICON_ELEMENT_TEMPLATEITEM,ICONS_PATH + OBJ16_PATH + "templatereportitem.gif"); declareImage( IReportGraphicConstants.ICON_NEW_REPORT, ICONS_PATH + OBJ16_PATH + "new_report.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NEW_LIBRARY, ICONS_PATH + OBJ16_PATH + "new_library.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NEW_TEMPLATE, ICONS_PATH + OBJ16_PATH + "new_template.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_REPORT_FILE, ICONS_PATH + EVIEW16_PATH + "report.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_QUIK_EDIT, ICONS_PATH + EVIEW16_PATH + "quick_edit.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_REPORT_PERSPECTIVE, ICONS_PATH + EVIEW16_PATH + "report_perspective.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_REPORT_PROJECT, ICONS_PATH + OBJ16_PATH + "report_project.gif" ); //$NON-NLS-1$ // element icons declareImage( IReportGraphicConstants.ICON_ELEMENT_CELL, ICONS_PATH + OBJ16_PATH + "cell.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_DATA, ICONS_PATH + OBJ16_PATH + "data.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_DATA_SET, ICONS_PATH + OBJ16_PATH + "data_set.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_DATA_SOURCE, ICONS_PATH + OBJ16_PATH + "data_source.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_ODA_DATA_SET, ICONS_PATH + OBJ16_PATH + "data_set.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_ODA_DATA_SOURCE, ICONS_PATH + OBJ16_PATH + "data_source.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_SCRIPT_DATA_SET, ICONS_PATH + OBJ16_PATH + "data_set.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_SCRIPT_DATA_SOURCE, ICONS_PATH + OBJ16_PATH + "data_source.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_GRID, ICONS_PATH + PAL_PATH + "grid.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_TEXTDATA, ICONS_PATH + PAL_PATH + "textdata.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_GROUP, ICONS_PATH + OBJ16_PATH + "group.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_IMAGE, ICONS_PATH + PAL_PATH + "image.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_LABEL, ICONS_PATH + PAL_PATH + "label.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_LINE, ICONS_PATH + OBJ16_PATH + "line.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_LIST, ICONS_PATH + PAL_PATH + "list.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_LIST_GROUP, ICONS_PATH + OBJ16_PATH + "list_group.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMNET_MASTERPAGE, ICONS_PATH + OBJ16_PATH + "master_page.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMNET_GRAPHICMASTERPAGE, ICONS_PATH + EVIEW16_PATH + "master_page.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_PARAMETER, ICONS_PATH + OBJ16_PATH + "parameter.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_PARAMETER_GROUP, ICONS_PATH + OBJ16_PATH + "parameter_group.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_CASCADING_PARAMETER_GROUP, ICONS_PATH + OBJ16_PATH + "parameter_group.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_ROW, ICONS_PATH + OBJ16_PATH + "row.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_SCALAR_PARAMETER, ICONS_PATH + OBJ16_PATH + "parameter.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMNET_SIMPLE_MASTERPAGE, ICONS_PATH + EVIEW16_PATH + "master_page.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_STYLE, ICONS_PATH + OBJ16_PATH + "style.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_TABLE, ICONS_PATH + PAL_PATH + "table.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_TABLE_GROUP, ICONS_PATH + OBJ16_PATH + "table_group.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_TEXT, ICONS_PATH + PAL_PATH + "text.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_LIBRARY, ICONS_PATH + OBJ16_PATH + "library.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_LIBRARY_REFERENCED, ICONS_PATH + OBJ16_PATH + "library_referenced.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ELEMENT_THEME, ICONS_PATH + OBJ16_PATH + "theme.gif" ); //$NON-NLS-1$ // outline icons declareImage( IReportGraphicConstants.ICON_NODE_BODY, ICONS_PATH + OBJ16_PATH + "body_icon.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NODE_MASTERPAGES, ICONS_PATH + OBJ16_PATH + "master_pages.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NODE_STYLES, ICONS_PATH + OBJ16_PATH + "styles.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NODE_HEADER, ICONS_PATH + OBJ16_PATH + "header.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NODE_DETAILS, ICONS_PATH + OBJ16_PATH + "details.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NODE_FOOTER, ICONS_PATH + OBJ16_PATH + "footer.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NODE_GROUPS, ICONS_PATH + OBJ16_PATH + "group.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NODE_GROUP_HEADER, ICONS_PATH + OBJ16_PATH + "group_header.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NODE_GROUP_FOOTER, ICONS_PATH + OBJ16_PATH + "group_footer.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NODE_LIBRARIES, ICONS_PATH + OBJ16_PATH + "library_folder.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NODE_THEMES, ICONS_PATH + OBJ16_PATH + "theme.gif" ); //$NON-NLS-1$ // layout icons declareImage( IReportGraphicConstants.ICON_LAYOUT_NORMAL, ICONS_PATH + EVIEW16_PATH + "normal_page.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_LAYOUT_MASTERPAGE, ICONS_PATH + EVIEW16_PATH + "master_page.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_LAYOUT_RULER, ICONS_PATH + EVIEW16_PATH + "show_rulers.gif" ); //$NON-NLS-1$ // border icons declareImage( IReportGraphicConstants.ICON_BORDER_ALL, ICONS_PATH + OBJ16_PATH + "borders_frame.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_BORDER_BOTTOM, ICONS_PATH + OBJ16_PATH + "border_bottom.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_BORDER_TOP, ICONS_PATH + OBJ16_PATH + "border_top.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_BORDER_LEFT, ICONS_PATH + OBJ16_PATH + "border_left.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_BORDER_RIGHT, ICONS_PATH + OBJ16_PATH + "border_right.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_BORDER_NOBORDER, ICONS_PATH + OBJ16_PATH + "border_none.gif" ); //$NON-NLS-1$ // missing image icons declareImage( IReportGraphicConstants.ICON_MISSING_IMG, ICONS_PATH + PROGRESS_PATH + "missing_image.gif" ); //$NON-NLS-1$ // data explore icons declareImage( IReportGraphicConstants.ICON_DATA_EXPLORER_VIEW, ICONS_PATH + EVIEW16_PATH + "data_explorer_view.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NODE_DATA_SETS, ICONS_PATH + OBJ16_PATH + "data_set_folder.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NODE_DATA_SOURCES, ICONS_PATH + OBJ16_PATH + "data_source_folder.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_NODE_PARAMETERS, ICONS_PATH + OBJ16_PATH + "parameter_folder.gif" ); //$NON-NLS-1$ // ********************************************************** // expression icons declareImage( IReportGraphicConstants.ICON_EXPRESSION_DATA_TABLE, ICONS_PATH + OBJ16_PATH + "data_table.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_DATA_COLUMN, ICONS_PATH + OBJ16_PATH + "data_column.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_EXPRESSION_OPERATOR, ICONS_PATH + OBJ16_PATH + "operator.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_EXPRESSION_GLOBAL, ICONS_PATH + OBJ16_PATH + "global.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_EXPRESSION_METHOD, ICONS_PATH + OBJ16_PATH + "method.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_EXPRESSION_STATIC_METHOD, ICONS_PATH + OBJ16_PATH + "static_method.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_EXPRESSION_MEMBER, ICONS_PATH + OBJ16_PATH + "property.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_EXPRESSION_STATIC_MEMBER, ICONS_PATH + OBJ16_PATH + "static_property.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_EXPRESSION_BUILDER, ICONS_PATH + OBJ16_PATH + "expression.gif" ); //$NON-NLS-1$ // data wizards declareImage( IReportGraphicConstants.ICON_WIZARD_DATASOURCE, ICONS_PATH + WIZBAN_PATH + "datasource_wizard.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_WIZARD_DATASET, ICONS_PATH + WIZBAN_PATH + "dataset_wizard.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_WIZARDPAGE_DATASETSELECTION, ICONS_PATH + WIZBAN_PATH + "dataset_wizard_table.gif" ); //$NON-NLS-1$ // ///////////////////attribute image declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_FONT_WIDTH, ICONS_PATH + OBJ16_PATH + "bold.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_FONT_WIDTH + IReportGraphicConstants.DIS, ICONS_PATH + DOBJ16_PATH + "bold_disabled.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_FONT_STYLE, ICONS_PATH + OBJ16_PATH + "italic.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_FONT_STYLE + IReportGraphicConstants.DIS, ICONS_PATH + DOBJ16_PATH + "italic_disabled.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_TEXT_UNDERLINE, ICONS_PATH + OBJ16_PATH + "underline.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_TEXT_UNDERLINE + IReportGraphicConstants.DIS, ICONS_PATH + DOBJ16_PATH + "underline_disabled.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_TEXT_LINE_THROUGH, ICONS_PATH + OBJ16_PATH + "lineSthrough.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_TEXT_LINE_THROUGH + IReportGraphicConstants.DIS, ICONS_PATH + DOBJ16_PATH + "lineSthrough_disabled.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_BORDER_NONE, ICONS_PATH + OBJ16_PATH + "border_none.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_BORDER_FRAME, ICONS_PATH + OBJ16_PATH + "border_frame.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_BORDER_LEFT, ICONS_PATH + OBJ16_PATH + "border_left.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_BORDER_RIGHT, ICONS_PATH + OBJ16_PATH + "border_right.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_BORDER_TOP, ICONS_PATH + OBJ16_PATH + "border_top.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_BORDER_BOTTOM, ICONS_PATH + OBJ16_PATH + "border_bottom.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_TEXT_ALIGN_CENTER, ICONS_PATH + OBJ16_PATH + "center_align.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_TEXT_ALIGN_CENTER + IReportGraphicConstants.DIS, ICONS_PATH + DOBJ16_PATH + "center_align_disabled.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_TEXT_ALIGN_JUSTIFY, ICONS_PATH + OBJ16_PATH + "justified_align.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_TEXT_ALIGN_JUSTIFY + IReportGraphicConstants.DIS, ICONS_PATH + DOBJ16_PATH + "justified_align_disabled.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_TEXT_ALIGN_LEFT, ICONS_PATH + OBJ16_PATH + "left_align.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_TEXT_ALIGN_LEFT + IReportGraphicConstants.DIS, ICONS_PATH + DOBJ16_PATH + "left_align_disabled.gif" );//$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_TEXT_ALIGN_RIGHT, ICONS_PATH + OBJ16_PATH + "right_align.gif" );//$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_TEXT_ALIGN_RIGHT + IReportGraphicConstants.DIS, ICONS_PATH + DOBJ16_PATH + "right_align_disabled.gif" );//$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_TOP_MARGIN, ICONS_PATH + MISC_PATH + "top_margin.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_BOTTOM_MARGIN, ICONS_PATH + MISC_PATH + "bottom_margin.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_LEFT_MARGIN, ICONS_PATH + MISC_PATH + "left_margin.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_ATTRIBUTE_RIGHT_MARGIN, ICONS_PATH + MISC_PATH + "right_margin.gif" ); //$NON-NLS-1$ // ********************************************************** // Preview icons declareImage( IReportGraphicConstants.ICON_PREVIEW_PARAMETERS, ICONS_PATH + PROGRESS_PATH + "params_ecl_show.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_PREVIEW_PARAMETERS_HIDE, ICONS_PATH + PROGRESS_PATH + "params_ecl_hide.gif" ); //$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_PREVIEW_REFRESH, ICONS_PATH + ETOOL16_PATH + "refresh.gif" ); //$NON-NLS-1$ // Auto Text Icon declareImage( IReportGraphicConstants.ICON_AUTOTEXT, ICONS_PATH + OBJ16_PATH + "autotext.gif" ); //$NON-NLS-1$ // Parameter dialog icon declareImage( IReportGraphicConstants.ICON_DEFAULT, ICONS_PATH + OBJ16_PATH + "default.gif" ); //$NON-NLS-1$ // Data editor dialog icons declareImage( IReportGraphicConstants.ICON_DATAEDIT_DLG_TITLE_BANNER, ICONS_PATH + OBJ16_PATH + "prop_dialog_title.gif" ); //$NON-NLS-1$ // Open file icon declareImage( IReportGraphicConstants.ICON_OPEN_FILE, ICONS_PATH + ETOOL16_PATH + "open_file.gif" ); //$NON-NLS-1$ declareImage( "TableRowSelector", ICONS_PATH + OBJ16_PATH + "tablerowselector.gif" ); //$NON-NLS-1$ //$NON-NLS-2$ declareImage( IReportGraphicConstants.ICON_ENABLE_LOCAL_PROPERTIES, ICONS_PATH + OBJ16_PATH + "property_reference.gif" );//$NON-NLS-1$ declareImage( IReportGraphicConstants.ICON_TEMPLATE_NO_PREVIEW, ICONS_PATH + MISC_PATH + "no_preview.gif" ); //$NON-NLS-1$ }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/fc4e6f5b2530a52954d5ca28772ebf46d133b052/ReportPlatformUIImages.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/ReportPlatformUIImages.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 727, 760, 918, 14196, 8946, 12, 262, 202, 95, 202, 202, 759, 2975, 17455, 202, 202, 29554, 2040, 12, 467, 7887, 8946, 18, 3445, 43, 67, 5704, 6479, 67, 3589, 67, 8047, 47, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 727, 760, 918, 14196, 8946, 12, 262, 202, 95, 202, 202, 759, 2975, 17455, 202, 202, 29554, 2040, 12, 467, 7887, 8946, 18, 3445, 43, 67, 5704, 6479, 67, 3589, 67, 8047, 47, ...
BugzillaUiPlugin.getDefault().getBugzillaRefreshManager().requestRefresh((BugzillaTask) obj);
BugzillaTask bugTask = (BugzillaTask)obj; BugzillaRepositoryClient client = (BugzillaRepositoryClient) MylarTaskListPlugin.getRepositoryManager().getRepositoryClient(bugTask.getRepositoryKind()); client.requestRefresh(bugTask);
public void run() { boolean offline = MylarTaskListPlugin.getPrefs().getBoolean(TaskListPreferenceConstants.WORK_OFFLINE); if (offline) { MessageDialog.openInformation(null, "Unable to refresh query", "Unable to refresh the query since you are currently offline"); return; } if (categoryToSynchronize != null) { synchronizeCategory(categoryToSynchronize); } else if (TaskListView.getDefault() != null) { ISelection selection = TaskListView.getDefault().getViewer().getSelection(); for (Object obj : ((IStructuredSelection) selection).toList()) { if (obj instanceof BugzillaQueryCategory) { BugzillaQueryCategory currCategory = (BugzillaQueryCategory) obj; synchronizeCategory(currCategory); } else if (obj instanceof TaskCategory) { TaskCategory cat = (TaskCategory) obj; for (ITask task : cat.getChildren()) { if (task instanceof BugzillaTask) { BugzillaUiPlugin.getDefault().getBugzillaRefreshManager().requestRefresh( (BugzillaTask) task); } } } else if (obj instanceof BugzillaTask) { BugzillaUiPlugin.getDefault().getBugzillaRefreshManager().requestRefresh((BugzillaTask) obj); } else if (obj instanceof BugzillaQueryHit) { BugzillaQueryHit hit = (BugzillaQueryHit) obj; if (hit.getCorrespondingTask() != null) { BugzillaUiPlugin.getDefault().getBugzillaRefreshManager().requestRefresh( hit.getCorrespondingTask()); } } for (ITask task : MylarTaskListPlugin.getTaskListManager().getTaskList().getActiveTasks()) { if (task instanceof BugzillaTask) { ITask found = MylarTaskListPlugin.getTaskListManager().getTaskForHandle( task.getHandleIdentifier(), false); if (found == null) { MylarTaskListPlugin.getTaskListManager().moveToRoot(task); MessageDialog .openInformation( Display.getCurrent().getActiveShell(), "Bugzilla Task Moved To Root", "Bugzilla Task " + TaskRepositoryManager.getTaskIdAsInt(task.getHandleIdentifier()) + " has been moved to the root since it is activated and has disappeared from a query."); } } } } } Display.getDefault().asyncExec(new Runnable() { public void run() { if (TaskListView.getDefault() != null) TaskListView.getDefault().getViewer().refresh(); } }); }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/b35a800e875f36f0f78d237843a125fc578d04d3/SynchronizeReportsAction.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/actions/SynchronizeReportsAction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 1435, 288, 202, 202, 6494, 13493, 273, 8005, 7901, 2174, 682, 3773, 18, 588, 1386, 2556, 7675, 588, 5507, 12, 2174, 682, 9624, 2918, 18, 10566, 67, 8797, 5997, 1769, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 1435, 288, 202, 202, 6494, 13493, 273, 8005, 7901, 2174, 682, 3773, 18, 588, 1386, 2556, 7675, 588, 5507, 12, 2174, 682, 9624, 2918, 18, 10566, 67, 8797, 5997, 1769, ...
private void initMaps(GameData data) { m_smallLargeRatio = ((float) m_largeMapImage.getHeight(s_observer)) / ((float) m_smallMapImage.getHeight(s_observer)); Iterator territories = data.getMap().iterator(); while(territories.hasNext()) { Territory current = (Territory) territories.next(); PlayerID id = current.getOwner(); if(!current.isWater()) setOwner(current, id); } }
8339 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8339/65dc97c8bd1d73da6a21d79d5ad468e6bb971a9b/MapImage.java/clean/src/games/strategy/triplea/image/MapImage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1208, 8903, 12, 12496, 751, 501, 13, 202, 95, 202, 202, 81, 67, 12019, 20020, 8541, 273, 14015, 5659, 13, 312, 67, 14095, 863, 2040, 18, 588, 2686, 12, 87, 67, 30971, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1208, 8903, 12, 12496, 751, 501, 13, 202, 95, 202, 202, 81, 67, 12019, 20020, 8541, 273, 14015, 5659, 13, 312, 67, 14095, 863, 2040, 18, 588, 2686, 12, 87, 67, 30971, ...
List infoTeacherDegreeFinalProjectStudentList = e.getInfoTeacherDegreeFinalProjectStudentList(); Iterator iterator = infoTeacherDegreeFinalProjectStudentList.iterator(); StringBuffer teacherArgument = new StringBuffer(); StringBuffer percentageArgument = new StringBuffer(); while (iterator.hasNext()) { InfoTeacherDegreeFinalProjectStudent infoTeacherDegreeFinalProjectStudent = (InfoTeacherDegreeFinalProjectStudent) iterator .next();
StringBuffer result = new StringBuffer(); final List<InfoTeacherDegreeFinalProjectStudent> infoTeacherDegreeFinalProjectStudentList = e .getInfoTeacherDegreeFinalProjectStudentList(); for (final InfoTeacherDegreeFinalProjectStudent infoTeacherDegreeFinalProjectStudent : infoTeacherDegreeFinalProjectStudentList) {
private Object[] getStudentPercentageExceedArgs(StudentPercentageExceed e) { List infoTeacherDegreeFinalProjectStudentList = e.getInfoTeacherDegreeFinalProjectStudentList(); Iterator iterator = infoTeacherDegreeFinalProjectStudentList.iterator(); StringBuffer teacherArgument = new StringBuffer(); StringBuffer percentageArgument = new StringBuffer(); while (iterator.hasNext()) { InfoTeacherDegreeFinalProjectStudent infoTeacherDegreeFinalProjectStudent = (InfoTeacherDegreeFinalProjectStudent) iterator .next(); InfoTeacher infoTeacher = infoTeacherDegreeFinalProjectStudent.getInfoTeacher(); Integer teacherNumber = infoTeacher.getTeacherNumber(); String teacherName = infoTeacher.getInfoPerson().getNome(); teacherArgument.append(teacherNumber).append("-").append(teacherName); percentageArgument.append(infoTeacherDegreeFinalProjectStudent.getPercentage()).append("%"); if (iterator.hasNext()) { teacherArgument.append(", "); percentageArgument.append(", "); } } Object arguments[] = { teacherArgument.toString(), percentageArgument.toString() }; return arguments; }
2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/394643d69a6ea94c4311cf98d28d1460ec6df697/CRUDTeacherDegreeFinalProjectStudent.java/buggy/src/net/sourceforge/fenixedu/presentationTier/Action/degree/finalProject/CRUDTeacherDegreeFinalProjectStudent.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1033, 8526, 336, 19943, 319, 16397, 424, 5288, 2615, 12, 19943, 319, 16397, 424, 5288, 425, 13, 288, 3639, 987, 1123, 56, 13798, 264, 22885, 7951, 4109, 19943, 319, 682, 273, 425, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1033, 8526, 336, 19943, 319, 16397, 424, 5288, 2615, 12, 19943, 319, 16397, 424, 5288, 425, 13, 288, 3639, 987, 1123, 56, 13798, 264, 22885, 7951, 4109, 19943, 319, 682, 273, 425, 1...
jjnewStateCnt = 71;
jjnewStateCnt = 74;
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 71; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 0: if ((0x3ff000000000000L & l) != 0L) { if (kind > 4) kind = 4; jjCheckNAddStates(0, 8); } else if ((0x100003600L & l) != 0L) { if (kind > 1) kind = 1; } else if ((0x8000281000000000L & l) != 0L) { if (kind > 10) kind = 10; jjCheckNAdd(21); } else if (curChar == 37) jjCheckNAddStates(9, 12); else if (curChar == 47) jjstateSet[jjnewStateCnt++] = 26; else if (curChar == 40) jjCheckNAddStates(13, 15); else if (curChar == 46) jjCheckNAdd(6); if (curChar == 45) jjCheckNAddStates(16, 21); else if (curChar == 47) jjCheckNAddTwoStates(23, 24); else if (curChar == 48) jjstateSet[jjnewStateCnt++] = 2; break; case 1: if (curChar == 48) jjstateSet[jjnewStateCnt++] = 2; break; case 3: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 4) kind = 4; jjCheckNAddTwoStates(3, 4); break; case 5: if (curChar == 46) jjCheckNAdd(6); break; case 6: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddStates(22, 24); break; case 8: if ((0x280000000000L & l) != 0L) jjCheckNAdd(9); break; case 9: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(9, 10); break; case 11: if (curChar == 40) jjCheckNAddStates(13, 15); break; case 12: if ((0xfffffdffffffffffL & l) != 0L) jjCheckNAddStates(13, 15); break; case 14: if ((0x28000000400L & l) != 0L) jjCheckNAddStates(13, 15); break; case 15: if (curChar == 41 && kind > 9) kind = 9; break; case 16: if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(25, 28); break; case 17: if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(13, 15); break; case 18: if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 19; break; case 19: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(17); break; case 20: if ((0x8000281000000000L & l) == 0L) break; if (kind > 10) kind = 10; jjCheckNAdd(21); break; case 21: if ((0x83ff681000000000L & l) == 0L) break; if (kind > 10) kind = 10; jjCheckNAdd(21); break; case 22: if (curChar == 47) jjCheckNAddTwoStates(23, 24); break; case 23: if (curChar == 46) jjCheckNAdd(24); break; case 24: if ((0x8000281000000000L & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(25); break; case 25: if ((0x83ff681000000000L & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(25); break; case 26: if (curChar == 47) jjstateSet[jjnewStateCnt++] = 27; break; case 27: if ((0x8000281000000000L & l) == 0L) break; if (kind > 12) kind = 12; jjCheckNAdd(28); break; case 28: if ((0x83ff681000000000L & l) == 0L) break; if (kind > 12) kind = 12; jjCheckNAdd(28); break; case 29: if (curChar == 47) jjstateSet[jjnewStateCnt++] = 26; break; case 30: if (curChar == 37) jjCheckNAddStates(9, 12); break; case 31: if ((0xfffffffffffffbffL & l) != 0L) jjCheckNAddTwoStates(31, 32); break; case 32: if (curChar == 10 && kind > 2) kind = 2; break; case 33: if ((0xffffffffffffdfffL & l) != 0L) jjCheckNAddTwoStates(33, 34); break; case 34: if (curChar == 13 && kind > 3) kind = 3; break; case 35: if (curChar == 45) jjCheckNAddStates(16, 21); break; case 36: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 4) kind = 4; jjCheckNAddTwoStates(36, 4); break; case 37: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if (curChar != 46) break; if (kind > 7) kind = 7; jjCheckNAddStates(29, 31); break; case 39: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddStates(29, 31); break; case 41: if ((0x280000000000L & l) != 0L) jjCheckNAdd(42); break; case 42: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(42, 10); break; case 43: if (curChar == 46) jjCheckNAdd(44); break; case 44: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddStates(32, 34); break; case 46: if ((0x280000000000L & l) != 0L) jjCheckNAdd(47); break; case 47: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(47, 10); break; case 48: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(48, 49); break; case 50: if ((0x280000000000L & l) != 0L) jjCheckNAdd(51); break; case 51: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(51, 10); break; case 52: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(35, 37); break; case 54: if ((0x280000000000L & l) != 0L) jjCheckNAdd(55); break; case 55: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(55, 10); break; case 56: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 4) kind = 4; jjCheckNAddStates(0, 8); break; case 57: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(57, 58); break; case 58: if (curChar != 46) break; if (kind > 7) kind = 7; jjCheckNAddStates(38, 40); break; case 59: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddStates(38, 40); break; case 61: if ((0x280000000000L & l) != 0L) jjCheckNAdd(62); break; case 62: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(62, 10); break; case 63: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(63, 64); break; case 65: if ((0x280000000000L & l) != 0L) jjCheckNAdd(66); break; case 66: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(66, 10); break; case 67: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(41, 43); break; case 69: if ((0x280000000000L & l) != 0L) jjCheckNAdd(70); break; case 70: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(70, 10); break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 0: case 21: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 10) kind = 10; jjCheckNAdd(21); break; case 2: if ((0x100000001000000L & l) != 0L) jjCheckNAdd(3); break; case 3: if ((0x7e0000007eL & l) == 0L) break; if (kind > 4) kind = 4; jjCheckNAddTwoStates(3, 4); break; case 4: if ((0x100000001000L & l) != 0L && kind > 4) kind = 4; break; case 7: if ((0x2000000020L & l) != 0L) jjAddStates(44, 45); break; case 10: if ((0x5000000050L & l) != 0L && kind > 7) kind = 7; break; case 12: if ((0xffffffffefffffffL & l) != 0L) jjCheckNAddStates(13, 15); break; case 13: if (curChar == 92) jjAddStates(46, 48); break; case 14: if ((0x14404410000000L & l) != 0L) jjCheckNAddStates(13, 15); break; case 24: case 25: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(25); break; case 27: case 28: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 12) kind = 12; jjCheckNAdd(28); break; case 31: jjAddStates(49, 50); break; case 33: jjAddStates(51, 52); break; case 40: if ((0x2000000020L & l) != 0L) jjAddStates(53, 54); break; case 45: if ((0x2000000020L & l) != 0L) jjAddStates(55, 56); break; case 49: if ((0x2000000020L & l) != 0L) jjAddStates(57, 58); break; case 53: if ((0x2000000020L & l) != 0L) jjAddStates(59, 60); break; case 60: if ((0x2000000020L & l) != 0L) jjAddStates(61, 62); break; case 64: if ((0x2000000020L & l) != 0L) jjAddStates(63, 64); break; case 68: if ((0x2000000020L & l) != 0L) jjAddStates(65, 66); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 0: case 21: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 10) kind = 10; jjCheckNAdd(21); break; case 12: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjAddStates(13, 15); break; case 24: case 25: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 11) kind = 11; jjCheckNAdd(25); break; case 27: case 28: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 12) kind = 12; jjCheckNAdd(28); break; case 31: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjAddStates(49, 50); break; case 33: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjAddStates(51, 52); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 71 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
3506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3506/3cd4a973dbdca1f7072d8e189d388c5a878cc9a6/PAParserTokenManager.java/buggy/itext/src/com/lowagie/text/pdf/codec/postscript/PAParserTokenManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3238, 727, 509, 10684, 7607, 50, 507, 67, 20, 12, 474, 787, 1119, 16, 509, 662, 1616, 15329, 282, 509, 8526, 1024, 7629, 31, 282, 509, 2542, 861, 273, 374, 31, 282, 10684, 2704, 1119, 11750,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3238, 727, 509, 10684, 7607, 50, 507, 67, 20, 12, 474, 787, 1119, 16, 509, 662, 1616, 15329, 282, 509, 8526, 1024, 7629, 31, 282, 509, 2542, 861, 273, 374, 31, 282, 10684, 2704, 1119, 11750,...
protected void checkLocksHeld( MultipleSubstitution ms, ExprVec expressions, int line, String msg, ModifierPragmaVec mpv ) { Expr expr; // System.out.println ("---locks " + locks.toString()); // System.out.println ("---substitutions " + ms.toString()); // System.out.println ("---expressions " + expressions.toString()); for (int i = 0; i < expressions.size(); i++) { expr = expressions.elementAt(i); //dbg(expr); if (!lockHeld(ms, expr)) { CloneWithSubstitution c = new CloneWithSubstitution(ms); int declLoc = getLocInPragmas(expr, mpv); //dbg(expr); expr = (Expr) c.clone(expr, true); //dbg(expr); ErrorMsg.print(sig, "Race", line, "Lock '" + PrettyPrint.inst.toString(expr) + "' may not be held." + " Locks currently held are '" + locks + "'.", declLoc); } } }
46634 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46634/88c3a23ce6920080a820fcffe73c2469f7571ad9/FlowInsensitiveChecks.java/buggy/src/escjava/trunk/ESCTools/Rcc/java/rcc/tc/FlowInsensitiveChecks.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 866, 19159, 44, 488, 12, 3639, 13531, 23798, 4086, 16, 540, 8074, 12991, 8041, 16, 3639, 509, 980, 16, 540, 514, 1234, 16, 540, 12832, 2050, 9454, 12991, 6749, 90, 565, 262, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 866, 19159, 44, 488, 12, 3639, 13531, 23798, 4086, 16, 540, 8074, 12991, 8041, 16, 3639, 509, 980, 16, 540, 514, 1234, 16, 540, 12832, 2050, 9454, 12991, 6749, 90, 565, 262, ...
private Document handleFile(File file) { try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(file); String shortname = Util.getElementValue( doc.getDocumentElement(), "body/taglib/shortname"); File dir = new File(destdir, shortname); dir.mkdir(); File taglibFrameHtml = new File(dir, "taglib-frame.html"); Source xml = new StreamSource(file); Source xsl = new StreamSource( this.getClass().getResourceAsStream( "/resources/taglibdoc/taglib-frame.xsl")); Result out = new StreamResult(taglibFrameHtml); TransformerFactory tf = TransformerFactory.newInstance(); Transformer t = tf.newTransformer(xsl); t.transform(xml, out); File taglibSummaryHtml = new File(dir, "taglib-summary.html"); xml = new StreamSource(file); xsl = new StreamSource( this.getClass().getResourceAsStream( "/resources/taglibdoc/taglib-summary.xsl")); out = new StreamResult(taglibSummaryHtml); t = tf.newTransformer(xsl); t.transform(xml, out); List tags = Util.getElements(doc.getDocumentElement(), "body/taglib/tag"); Iterator iter = tags.iterator(); xsl = new StreamSource( this.getClass().getResourceAsStream( "/resources/taglibdoc/tag-frame.xsl")); t = tf.newTransformer(xsl); while (iter.hasNext()) { Element tag = (Element) iter.next(); Util.addChildElement(tag, "taglib", shortname); String tagname = Util.getElementValue(tag, "name"); File tagHtml = new File(dir, tagname + ".html"); xml = new DOMSource(tag); out = new StreamResult(tagHtml); t.transform(xml, out); } return doc; } catch (Exception e) { e.printStackTrace(); } return null; }
48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/bcf54ee9560f4fd9a0ff083d3f0ea7c829a28aea/TaglibDoc.java/buggy/contrib/tag-doc/src/java/org/apache/struts/taskdefs/TaglibDoc.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 2519, 4110, 812, 12, 812, 768, 15329, 202, 202, 698, 95, 1082, 202, 2519, 20692, 1966, 74, 33, 2519, 20692, 18, 2704, 1442, 5621, 1082, 202, 2519, 1263, 1966, 33, 1966, 74, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 2519, 4110, 812, 12, 812, 768, 15329, 202, 202, 698, 95, 1082, 202, 2519, 20692, 1966, 74, 33, 2519, 20692, 18, 2704, 1442, 5621, 1082, 202, 2519, 1263, 1966, 33, 1966, 74, 1...
public EventListener[] getListeners (Class listenerType)
public EventListener[] getListeners(Class listenerType)
public EventListener[] getListeners (Class listenerType) { return listenerList.getListeners (listenerType); }
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/decc5d82ba0a18c6445f683c0d1a3d78fe4b1564/AbstractTableModel.java/buggy/core/src/classpath/javax/javax/swing/table/AbstractTableModel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 22090, 8526, 336, 5583, 12, 797, 2991, 559, 13, 225, 288, 565, 327, 2991, 682, 18, 588, 5583, 261, 12757, 559, 1769, 225, 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, 282, 1071, 22090, 8526, 336, 5583, 12, 797, 2991, 559, 13, 225, 288, 565, 327, 2991, 682, 18, 588, 5583, 261, 12757, 559, 1769, 225, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
StringBuffer sb=new StringBuffer(); sb.append("sender="); if(sender != null) sb.append(sender); else sb.append("<null>"); if(digest != null) sb.append(", digest=" + digest); if(not_seen != null) sb.append(", not_seen=" + not_seen); if(seen != null) sb.append(", seen=" + seen); sb.append(", id=" + id); return sb.toString();
StringBuffer sb=new StringBuffer(); sb.append("sender="); if(sender != null) sb.append(sender); else sb.append("<null>"); if(digest != null) sb.append(", digest=" + digest); if(not_seen != null) sb.append(", not_seen=" + not_seen); if(seen != null) sb.append(", seen=" + seen); sb.append(", id=" + id); return sb.toString();
public String toString() { StringBuffer sb=new StringBuffer(); sb.append("sender="); if(sender != null) sb.append(sender); else sb.append("<null>"); if(digest != null) sb.append(", digest=" + digest); if(not_seen != null) sb.append(", not_seen=" + not_seen); if(seen != null) sb.append(", seen=" + seen); sb.append(", id=" + id); return sb.toString(); }
49475 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49475/e25f8abcd69bfb826f6572dbd8289617fc601a19/Gossip.java/clean/src/org/jgroups/protocols/pbcast/Gossip.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 1762, 1435, 288, 202, 780, 1892, 2393, 33, 2704, 6674, 5621, 202, 18366, 18, 6923, 2932, 15330, 1546, 1769, 202, 430, 12, 15330, 480, 446, 13, 2393, 18, 6923, 12, 15330, 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, 514, 1762, 1435, 288, 202, 780, 1892, 2393, 33, 2704, 6674, 5621, 202, 18366, 18, 6923, 2932, 15330, 1546, 1769, 202, 430, 12, 15330, 480, 446, 13, 2393, 18, 6923, 12, 15330, 1769, ...
public void paintFixed(Context c, BlockBox block) { int xoff = 0; int yoff = 0; xoff = c.canvas.getWidth(); yoff = c.canvas.getHeight(); if (block.right_set) { xoff = xoff - block.width; } if (block.bottom_set) { //joshy: this should really be block.height instead of bnds.y // need to fix the setting of block.height //joshy: need to do horizontal calcs too, inc scrolling //joshy: need to make the body paint the whole canvas. // start at the bottom of the viewport yoff = c.viewport.getHeight(); // account for the width of the box yoff = yoff - block.height; // - bnds.y // account for the current y offset of the box yoff = yoff - c.getExtents().y; //orig.y; // account for the scrolling of the viewport yoff = yoff - c.canvas.getLocation().y; } c.translate(xoff, yoff); paintNormal(c,block); c.translate(-xoff, -yoff); }
57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/07ab625b03cad242caa27ac48e830592130b24a1/BoxLayout.java/clean/src/java/org/joshy/html/BoxLayout.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 6459, 84, 1598, 7505, 12, 1042, 71, 16, 1768, 3514, 2629, 15329, 474, 92, 3674, 33, 20, 31, 474, 93, 3674, 33, 20, 31, 92, 3674, 33, 71, 18, 15424, 18, 588, 2384, 5621, 93, 3674, 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, 1071, 6459, 84, 1598, 7505, 12, 1042, 71, 16, 1768, 3514, 2629, 15329, 474, 92, 3674, 33, 20, 31, 474, 93, 3674, 33, 20, 31, 92, 3674, 33, 71, 18, 15424, 18, 588, 2384, 5621, 93, 3674, 3...
public ParameterMetaDataImpl(ParameterListItem[] parameterList) {
public ParameterMetaDataImpl(ParamInfo[] parameterList) {
public ParameterMetaDataImpl(ParameterListItem[] parameterList) { if (parameterList == null) { parameterList = new ParameterListItem[0]; } this.parameterList = parameterList; }
2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/d48066e24a9a4b4edf35b9545de98ba05acafd4d/ParameterMetaDataImpl.java/clean/src/main/net/sourceforge/jtds/jdbc/ParameterMetaDataImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 5498, 6998, 2828, 12, 786, 966, 8526, 1569, 682, 13, 288, 3639, 309, 261, 6775, 682, 422, 446, 13, 288, 5411, 1569, 682, 273, 394, 5498, 13575, 63, 20, 15533, 3639, 289, 3639, 333...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 5498, 6998, 2828, 12, 786, 966, 8526, 1569, 682, 13, 288, 3639, 309, 261, 6775, 682, 422, 446, 13, 288, 5411, 1569, 682, 273, 394, 5498, 13575, 63, 20, 15533, 3639, 289, 3639, 333...
JDragTree.this.expandPath(CDropTargetListener.this._pathLast);
expandPath(_pathLast);
public CDropTargetListener() { this._colorCueLine = new Color( SystemColor.controlShadow.getRed(), SystemColor.controlShadow.getGreen(), SystemColor.controlShadow.getBlue(), 64 ); // Set up a hover timer, so that a node will be automatically expanded or collapsed // if the user lingers on it for more than a short time this._timerHover = new javax.swing.Timer(1000, new ActionListener() { public void actionPerformed(ActionEvent e) { CDropTargetListener.this._nLeftRight = 0; // Reset left/right movement trend if (JDragTree.this.isRootPath(CDropTargetListener.this._pathLast)) return; // Do nothing if we are hovering over the root node if (JDragTree.this.isExpanded(CDropTargetListener.this._pathLast)) JDragTree.this.collapsePath(CDropTargetListener.this._pathLast); else JDragTree.this.expandPath(CDropTargetListener.this._pathLast); } }); this._timerHover.setRepeats(false); // Set timer to one-shot mode }
47012 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47012/0458430a0dc8a713aa2b4d64f000cbbaaeb4adea/JDragTree.java/buggy/src/thaw/gui/JDragTree.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 1071, 385, 7544, 2326, 2223, 1435, 1082, 288, 9506, 333, 6315, 3266, 39, 344, 1670, 273, 394, 5563, 12, 25083, 2332, 2957, 18, 7098, 12957, 18, 588, 3715, 9334, 25083, 2332, 2957, 18, 70...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1071, 385, 7544, 2326, 2223, 1435, 1082, 288, 9506, 333, 6315, 3266, 39, 344, 1670, 273, 394, 5563, 12, 25083, 2332, 2957, 18, 7098, 12957, 18, 588, 3715, 9334, 25083, 2332, 2957, 18, 70...
assertTrue(_workItemRepository.getCompletedWorkItems().size() == 0); assertTrue(_workItemRepository.getEnabledWorkItems().size() == 1); assertTrue(_workItemRepository.getExecutingWorkItems().size() == 0); assertTrue(_workItemRepository.getFiredWorkItems().size() == 0);
assertTrue("" + _workItemRepository.getCompletedWorkItems().size(), _workItemRepository.getCompletedWorkItems().size() == 0); assertTrue("" + _workItemRepository.getEnabledWorkItems().size(), _workItemRepository.getEnabledWorkItems().size() == 1); assertTrue("" + _workItemRepository.getExecutingWorkItems().size(), _workItemRepository.getExecutingWorkItems().size() == 0); assertTrue("" + _workItemRepository.getFiredWorkItems().size(), _workItemRepository.getFiredWorkItems().size() == 0);
public synchronized void testImproperCompletionSubnet() throws YDataStateException, YStateException, YQueryException, YSchemaBuildingException, YPersistenceException, IOException, JDOMException { EngineClearer.clear(engine); engine.addSpecifications(yawlXMLFile, false, new ArrayList()); engine.startCase(null, _specification.getID(), null, null); assertTrue(_workItemRepository.getCompletedWorkItems().size() == 0); assertTrue(_workItemRepository.getEnabledWorkItems().size() == 1); assertTrue(_workItemRepository.getExecutingWorkItems().size() == 0); assertTrue(_workItemRepository.getFiredWorkItems().size() == 0); while (_workItemRepository.getEnabledWorkItems().size() > 0 || _workItemRepository.getFiredWorkItems().size() > 0 || _workItemRepository.getExecutingWorkItems().size() > 0) { YWorkItem item; while (_workItemRepository.getEnabledWorkItems().size() > 0) { item = (YWorkItem) _workItemRepository.getEnabledWorkItems().iterator().next(); engine.startWorkItem(item, "admin"); try{ Thread.sleep(_sleepTime);} catch(InterruptedException ie){ie.printStackTrace();} } while (_workItemRepository.getFiredWorkItems().size() > 0) { item = (YWorkItem) _workItemRepository.getFiredWorkItems().iterator().next(); engine.startWorkItem(item, "admin"); try{ Thread.sleep(_sleepTime);} catch(InterruptedException ie){ie.printStackTrace();} } while (_workItemRepository.getExecutingWorkItems().size() > 0) { item = (YWorkItem) _workItemRepository.getExecutingWorkItems("admin") .iterator().next(); engine.completeWorkItem(item, "<data/>", false); try{ Thread.sleep(_sleepTime);} catch(InterruptedException ie){ie.printStackTrace();} } } }
51637 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51637/8bb1bc0b226c7853a6ed2d9451cc4db680fe84d8/TestEngineAgainstImproperCompletionOfASubnet.java/buggy/yawl/test/au/edu/qut/yawl/engine/TestEngineAgainstImproperCompletionOfASubnet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3852, 918, 1842, 1170, 22754, 11238, 9577, 1435, 1216, 1624, 751, 5060, 16, 1624, 5060, 16, 1624, 1138, 503, 16, 1624, 3078, 16713, 503, 16, 1624, 13182, 503, 16, 1860, 16, 804, 816...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3852, 918, 1842, 1170, 22754, 11238, 9577, 1435, 1216, 1624, 751, 5060, 16, 1624, 5060, 16, 1624, 1138, 503, 16, 1624, 3078, 16713, 503, 16, 1624, 13182, 503, 16, 1860, 16, 804, 816...
return settings;
return mSettings;
public Properties storeSettings() { return settings; }
9266 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9266/d580895df229632c4b8bc798a0285d45a4d94d3c/ReminderPlugin.java/buggy/tvbrowser/src/reminderplugin/ReminderPlugin.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 6183, 1707, 2628, 1435, 288, 565, 327, 312, 2628, 31, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 6183, 1707, 2628, 1435, 288, 565, 327, 312, 2628, 31, 225, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Navigatable navigatable = (Navigatable)dataContext.getData(DataConstants.NAVIGATABLE); if (navigatable.canNavigateToSource()) { navigatable.navigate(myFocusEditor);
Navigatable[] navigatables = (Navigatable[])dataContext.getData(DataConstants.NAVIGATABLE_ARRAY); if (navigatables != null) { for (int i = 0; i < navigatables.length; i++) { Navigatable navigatable = navigatables[i]; if (navigatable.canNavigateToSource()) navigatable.navigate(myFocusEditor); }
public void actionPerformed(AnActionEvent e) { DataContext dataContext = e.getDataContext(); Navigatable navigatable = (Navigatable)dataContext.getData(DataConstants.NAVIGATABLE); if (navigatable.canNavigateToSource()) { navigatable.navigate(myFocusEditor); } }
12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/9d164aa16a71880806905dec3aae3dbc2083ba58/BaseNavigateToSourceAction.java/clean/source/com/intellij/ide/actions/BaseNavigateToSourceAction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 26100, 12, 979, 1803, 1133, 425, 13, 288, 565, 1910, 1042, 501, 1042, 273, 425, 18, 588, 751, 1042, 5621, 565, 423, 4911, 8163, 290, 4911, 8163, 273, 261, 50, 4911, 8163, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 26100, 12, 979, 1803, 1133, 425, 13, 288, 565, 1910, 1042, 501, 1042, 273, 425, 18, 588, 751, 1042, 5621, 565, 423, 4911, 8163, 290, 4911, 8163, 273, 261, 50, 4911, 8163, 13,...
private void stopTableEditing()
protected void stopTableEditing()
private void stopTableEditing() { if (table.isEditing()) { TableCellEditor cellEditor = table.getCellEditor( table.getEditingRow(), table.getEditingColumn()); cellEditor.stopCellEditing(); } }
50179 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50179/0ccb12d379924e457e096e1b15f936acb2b0fde1/ArgumentsPanel.java/buggy/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 2132, 1388, 28029, 1435, 565, 288, 3639, 309, 261, 2121, 18, 291, 28029, 10756, 3639, 288, 5411, 3555, 4020, 6946, 2484, 6946, 273, 7734, 1014, 18, 588, 4020, 6946, 12, 10792, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2132, 1388, 28029, 1435, 565, 288, 3639, 309, 261, 2121, 18, 291, 28029, 10756, 3639, 288, 5411, 3555, 4020, 6946, 2484, 6946, 273, 7734, 1014, 18, 588, 4020, 6946, 12, 10792, ...
return exists; }
return exists; }
public boolean isDefined(){ return exists; }
57538 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57538/a91149c19b00c1cdf9394fec00126d570cf567b4/MesquiteTree.java/buggy/trunk/Mesquite Project/Source/mesquite/lib/MesquiteTree.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 202, 482, 1250, 25048, 1435, 95, 3196, 202, 2463, 1704, 31, 225, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 282, 202, 482, 1250, 25048, 1435, 95, 3196, 202, 2463, 1704, 31, 225, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
public void init( RuntimeServices rs )
public void init( RuntimeServices rs )
public void init( RuntimeServices rs ) throws Exception { Object obj = rs.getApplicationAttribute(ServletContext.class.getName()); if (obj == null) { throw new IllegalStateException("Could not retrieve ServletContext from application attributes!"); } servletContext = (ServletContext)obj; }
52538 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52538/b42c23a0eb3b4663a69304b938b98019a6cff8be/ServletLogger.java/buggy/src/java/org/apache/velocity/tools/view/servlet/ServletLogger.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1208, 12, 2509, 5676, 3597, 262, 540, 1216, 1185, 565, 288, 3639, 1033, 1081, 273, 3597, 18, 588, 3208, 1499, 12, 4745, 1042, 18, 1106, 18, 17994, 10663, 3639, 309, 261, 2603, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1208, 12, 2509, 5676, 3597, 262, 540, 1216, 1185, 565, 288, 3639, 1033, 1081, 273, 3597, 18, 588, 3208, 1499, 12, 4745, 1042, 18, 1106, 18, 17994, 10663, 3639, 309, 261, 2603, ...
submodeID=modeid;
submodeID = modeid;
public int encode(final Bits bits, final float[] in) { int i; float[] mem, innov, syn_resp; float[] low_pi_gain, low_exc, low_innov; int dtx; /* Compute the two sub-bands by filtering with h0 and h1*/ Filters.qmf_decomp(in, h0, x0d, x1d, fullFrameSize, QMF_ORDER, h0_mem); /* Encode the narrowband part*/ lowenc.encode(bits, x0d); /* High-band buffering / sync with low band */ for (i=0;i<windowSize-frameSize;i++) high[i] = high[frameSize+i]; for (i=0;i<frameSize;i++) high[windowSize-frameSize+i]=x1d[i]; System.arraycopy(excBuf, frameSize, excBuf, 0, bufSize-frameSize); low_pi_gain = lowenc.getPiGain(); low_exc = lowenc.getExc(); low_innov = lowenc.getInnov(); int low_mode = lowenc.getMode(); if (low_mode==0) dtx=1; else dtx=0; /* Start encoding the high-band */ for (i=0; i<windowSize; i++) buf[i] = high[i] * window[i]; /* Compute auto-correlation */ Lpc.autocorr(buf, autocorr, lpcSize+1, windowSize); autocorr[0] += 1; /* prevents NANs */ autocorr[0] *= lpc_floor; /* Noise floor in auto-correlation domain */ /* Lag windowing: equivalent to filtering in the power-spectrum domain */ for (i=0; i<lpcSize+1; i++) autocorr[i] *= lagWindow[i]; /* Levinson-Durbin */ Lpc.wld(lpc, autocorr, rc, lpcSize); // tmperr System.arraycopy(lpc, 0, lpc, 1, lpcSize); lpc[0]=1; /* LPC to LSPs (x-domain) transform */ int roots = Lsp.lpc2lsp (lpc, lpcSize, lsp, 15, 0.2f); if (roots != lpcSize) { roots = Lsp.lpc2lsp (lpc, lpcSize, lsp, 11, 0.02f); if (roots != lpcSize) { /*If we can't find all LSP's, do some damage control and use a flat filter*/ for (i=0; i<lpcSize; i++) { lsp[i]=(float)Math.cos(Math.PI*((float)(i+1))/(lpcSize+1)); } } } /* x-domain to angle domain*/ for (i=0; i<lpcSize; i++) lsp[i] = (float) Math.acos(lsp[i]); float lsp_dist=0; for (i=0;i<lpcSize;i++) lsp_dist += (old_lsp[i] - lsp[i])*(old_lsp[i] - lsp[i]); /*VBR stuff*/ if ((vbr_enabled != 0 || vad_enabled != 0) && dtx == 0) { float e_low=0, e_high=0; float ratio; if (abr_enabled != 0) { float qual_change=0; if (abr_drift2 * abr_drift > 0) { /* Only adapt if long-term and short-term drift are the same sign */ qual_change = -.00001f*abr_drift/(1+abr_count); if (qual_change>.1f) qual_change=.1f; if (qual_change<-.1f) qual_change=-.1f; } vbr_quality += qual_change; if (vbr_quality>10) vbr_quality=10; if (vbr_quality<0) vbr_quality=0; } for (i=0;i<frameSize;i++) { e_low += x0d[i]* x0d[i]; e_high += high[i]* high[i]; } ratio = (float) Math.log((1+e_high)/(1+e_low)); relative_quality = lowenc.getRelativeQuality(); if (ratio<-4) ratio=-4; if (ratio>2) ratio=2; /*if (ratio>-2)*/ if (vbr_enabled != 0) { int modeid; modeid = nb_modes-1; relative_quality+=1.0*(ratio+2); if (relative_quality<-1) { relative_quality=-1; } while (modeid != 0) { int v1; float thresh; v1=(int)Math.floor(vbr_quality); if (v1==10) thresh = Vbr.hb_thresh[modeid][v1]; else thresh = (vbr_quality-v1) * Vbr.hb_thresh[modeid][v1+1] + (1+v1-vbr_quality) * Vbr.hb_thresh[modeid][v1]; if (relative_quality >= thresh) break; modeid--; } setMode(modeid); if (abr_enabled != 0) { int bitrate; bitrate = getBitRate(); abr_drift+=(bitrate-abr_enabled); abr_drift2 = .95f*abr_drift2 + .05f*(bitrate-abr_enabled); abr_count += 1.0; } } else { /* VAD only */ int modeid; if (relative_quality<2.0) modeid=1; else modeid=submodeSelect; /*speex_encoder_ctl(state, SPEEX_SET_MODE, &mode);*/ submodeID=modeid; } /*fprintf (stderr, "%f %f\n", ratio, low_qual);*/ } bits.pack(1, 1); if (dtx != 0) bits.pack(0, SB_SUBMODE_BITS); else bits.pack(submodeID, SB_SUBMODE_BITS); /* If null mode (no transmission), just set a couple things to zero*/ if (dtx != 0 || submodes[submodeID] == null) { for (i=0; i<frameSize; i++) excBuf[excIdx+i]=swBuf[i]=VERY_SMALL; for (i=0; i<lpcSize; i++) mem_sw[i]=0; first=1; /* Final signal synthesis from excitation */ Filters.iir_mem2(excBuf, excIdx, interp_qlpc, high, 0, subframeSize, lpcSize, mem_sp); /* Reconstruct the original */ filters.fir_mem_up(x0d, h0, y0, fullFrameSize, QMF_ORDER, g0_mem); filters.fir_mem_up(high, h1, y1, fullFrameSize, QMF_ORDER, g1_mem); for (i=0; i<fullFrameSize; i++) in[i]=2*(y0[i]-y1[i]); if (dtx != 0) return 0; else return 1; } /* LSP quantization */ submodes[submodeID].lsqQuant.quant(lsp, qlsp, lpcSize, bits); if (first != 0) { for (i=0; i<lpcSize; i++) old_lsp[i] = lsp[i]; for (i=0; i<lpcSize; i++) old_qlsp[i] = qlsp[i]; } mem = new float[lpcSize]; syn_resp = new float[subframeSize]; innov = new float[subframeSize]; for (int sub=0; sub<nbSubframes; sub++) { float tmp, filter_ratio; int exc, sp, sw, resp; int offset; float rl, rh, eh=0, el=0; int fold; offset = subframeSize*sub; sp=offset; exc=excIdx+offset; resp=offset; sw=offset; /* LSP interpolation (quantized and unquantized) */ tmp = (1.0f + sub)/nbSubframes; for (i=0; i<lpcSize; i++) interp_lsp[i] = (1-tmp)*old_lsp[i] + tmp*lsp[i]; for (i=0; i<lpcSize; i++) interp_qlsp[i] = (1-tmp)*old_qlsp[i] + tmp*qlsp[i]; Lsp.enforce_margin(interp_lsp, lpcSize, .05f); Lsp.enforce_margin(interp_qlsp, lpcSize, .05f); /* Compute interpolated LPCs (quantized and unquantized) */ for (i=0; i<lpcSize; i++) interp_lsp[i] = (float) Math.cos(interp_lsp[i]); for (i=0; i<lpcSize; i++) interp_qlsp[i] = (float) Math.cos(interp_qlsp[i]); m_lsp.lsp2lpc(interp_lsp, interp_lpc, lpcSize); m_lsp.lsp2lpc(interp_qlsp, interp_qlpc, lpcSize); Filters.bw_lpc(gamma1, interp_lpc, bw_lpc1, lpcSize); Filters.bw_lpc(gamma2, interp_lpc, bw_lpc2, lpcSize); /* Compute mid-band (4000 Hz for wideband) response of low-band and high-band filters */ rl=rh=0; tmp=1; pi_gain[sub]=0; for (i=0; i<=lpcSize; i++) { rh += tmp*interp_qlpc[i]; tmp = -tmp; pi_gain[sub]+=interp_qlpc[i]; } rl = low_pi_gain[sub]; rl=1/(Math.abs(rl)+.01f); rh=1/(Math.abs(rh)+.01f); /* Compute ratio, will help predict the gain */ filter_ratio=Math.abs(.01f+rh)/(.01f+Math.abs(rl)); fold = filter_ratio<5 ? 1 : 0; /*printf ("filter_ratio %f\n", filter_ratio);*/ fold=0; /* Compute "real excitation" */ Filters.fir_mem2(high, sp, interp_qlpc, excBuf, exc, subframeSize, lpcSize, mem_sp2); /* Compute energy of low-band and high-band excitation */ for (i=0; i<subframeSize; i++) eh+=excBuf[exc+i]*excBuf[exc+i]; if (submodes[submodeID].innovation == null) {/* 1 for spectral folding excitation, 0 for stochastic */ float g; /*speex_bits_pack(bits, 1, 1);*/ for (i=0; i<subframeSize; i++) el+=low_innov[offset+i]*low_innov[offset+i]; /* Gain to use if we want to use the low-band excitation for high-band */ g=eh/(.01f+el); g=(float) Math.sqrt(g); g *= filter_ratio; /*print_vec(&g, 1, "gain factor");*/ /* Gain quantization */ { int quant = (int) Math.floor(.5 + 10 + 8.0 * Math.log((g+.0001))); /*speex_warning_int("tata", quant);*/ if (quant<0) quant=0; if (quant>31) quant=31; bits.pack(quant, 5); g=(float)(.1*Math.exp(quant/9.4)); } /*printf ("folding gain: %f\n", g);*/ g /= filter_ratio; } else { float gc, scale, scale_1; for (i=0; i<subframeSize; i++) el+=low_exc[offset+i]*low_exc[offset+i]; /*speex_bits_pack(bits, 0, 1);*/ gc = (float) (Math.sqrt(1+eh)*filter_ratio/Math.sqrt((1+el)*subframeSize)); { int qgc = (int)Math.floor(.5+3.7*(Math.log(gc)+2)); if (qgc<0) qgc=0; if (qgc>15) qgc=15; bits.pack(qgc, 4); gc = (float) Math.exp((1/3.7)*qgc-2); } scale = gc*(float)Math.sqrt(1+el)/filter_ratio; scale_1 = 1/scale; for (i=0; i<subframeSize; i++) excBuf[exc+i]=0; excBuf[exc]=1; Filters.syn_percep_zero(excBuf, exc, interp_qlpc, bw_lpc1, bw_lpc2, syn_resp, subframeSize, lpcSize); /* Reset excitation */ for (i=0; i<subframeSize; i++) excBuf[exc+i]=0; /* Compute zero response (ringing) of A(z/g1) / ( A(z/g2) * Aq(z) ) */ for (i=0; i<lpcSize; i++) mem[i]=mem_sp[i]; Filters.iir_mem2(excBuf, exc, interp_qlpc, excBuf, exc, subframeSize, lpcSize, mem); for (i=0; i<lpcSize; i++) mem[i]=mem_sw[i]; Filters.filter_mem2(excBuf, exc, bw_lpc1, bw_lpc2, res, resp, subframeSize, lpcSize, mem, 0); /* Compute weighted signal */ for (i=0; i<lpcSize; i++) mem[i]=mem_sw[i]; Filters.filter_mem2(high, sp, bw_lpc1, bw_lpc2, swBuf, sw, subframeSize, lpcSize, mem, 0); /* Compute target signal */ for (i=0; i<subframeSize; i++) target[i]=swBuf[sw+i]-res[resp+i]; for (i=0; i<subframeSize; i++) excBuf[exc+i]=0; for (i=0; i<subframeSize; i++) target[i]*=scale_1; /* Reset excitation */ for (i=0; i<subframeSize; i++) innov[i]=0; /*print_vec(target, st->subframeSize, "\ntarget");*/ submodes[submodeID].innovation.quant(target, interp_qlpc, bw_lpc1, bw_lpc2, lpcSize, subframeSize, innov, 0, syn_resp, bits, (complexity+1)>>1); /*print_vec(target, st->subframeSize, "after");*/ for (i=0; i<subframeSize; i++) excBuf[exc+i] += innov[i]*scale; if (submodes[submodeID].double_codebook != 0) { float[] innov2 = new float[subframeSize]; for (i=0; i<subframeSize; i++) innov2[i]=0; for (i=0; i<subframeSize; i++) target[i]*=2.5; submodes[submodeID].innovation.quant(target, interp_qlpc, bw_lpc1, bw_lpc2, lpcSize, subframeSize, innov2, 0, syn_resp, bits, (complexity+1)>>1); for (i=0; i<subframeSize; i++) innov2[i]*=scale*(1/2.5); for (i=0; i<subframeSize; i++) excBuf[exc+i] += innov2[i]; } } /*Keep the previous memory*/ for (i=0; i<lpcSize; i++) mem[i]=mem_sp[i]; /* Final signal synthesis from excitation */ Filters.iir_mem2(excBuf, exc, interp_qlpc, high, sp, subframeSize, lpcSize, mem_sp); /* Compute weighted signal again, from synthesized speech (not sure it's the right thing) */ Filters.filter_mem2(high, sp, bw_lpc1, bw_lpc2, swBuf, sw, subframeSize, lpcSize, mem_sw, 0); }//#ifndef RELEASE /* Reconstruct the original */ filters.fir_mem_up(x0d, h0, y0, fullFrameSize, QMF_ORDER, g0_mem); filters.fir_mem_up(high, h1, y1, fullFrameSize, QMF_ORDER, g1_mem); for (i=0; i<fullFrameSize; i++) in[i]=2*(y0[i]-y1[i]);//#endif for (i=0; i<lpcSize; i++) old_lsp[i] = lsp[i]; for (i=0; i<lpcSize; i++) old_qlsp[i] = qlsp[i]; first=0; return 1; }
6221 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6221/81112208859292bc5ef5f9b0033ab2ea6dab38c0/SbEncoder.java/buggy/main/trunk/codec/src/main/java/org/xiph/speex/SbEncoder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 509, 2017, 12, 6385, 18690, 4125, 16, 727, 1431, 8526, 316, 13, 225, 288, 565, 509, 277, 31, 565, 1431, 8526, 1663, 16, 316, 82, 1527, 16, 6194, 67, 12243, 31, 565, 1431, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 509, 2017, 12, 6385, 18690, 4125, 16, 727, 1431, 8526, 316, 13, 225, 288, 565, 509, 277, 31, 565, 1431, 8526, 1663, 16, 316, 82, 1527, 16, 6194, 67, 12243, 31, 565, 1431, 8526, ...
} else if (attributeName.equals(IParserTags.DIALOG)) { item.setDialog(attribute.getNodeValue().equals(TRUE_STRING));
private void handleItemAttributes(Item item, Node itemNode) throws CheatSheetParserException { Assert.isNotNull(item); Assert.isNotNull(itemNode); ArrayList itemExtensionElements = new ArrayList(); boolean title = false; NamedNodeMap attributes = itemNode.getAttributes(); if (attributes != null) { for (int x = 0; x < attributes.getLength(); x++) { Node attribute = attributes.item(x); String attributeName = attribute.getNodeName(); if (attribute == null || attributeName == null) continue; if (attributeName.equals(IParserTags.TITLE)) { title = true; item.setTitle(attribute.getNodeValue()); } else if (attributeName.equals(IParserTags.CONTEXTID)) { item.setContextId(attribute.getNodeValue()); } else if (attributeName.equals(IParserTags.HREF)) { item.setHref(attribute.getNodeValue()); } else if (attributeName.equals(IParserTags.SKIP)) { item.setSkip(attribute.getNodeValue().equals(TRUE_STRING)); } else if (attributeName.equals(IParserTags.DIALOG)) { item.setDialog(attribute.getNodeValue().equals(TRUE_STRING)); } else { AbstractItemExtensionElement[] ie = handleUnknownItemAttribute(attribute, itemNode); if (ie != null) itemExtensionElements.add(ie); } } } if(!title) { String message = NLS.bind(Messages.ERROR_PARSING_NO_TITLE, (new Object[] {itemNode.getNodeName()})); throw new CheatSheetParserException(message); } if (itemExtensionElements != null) item.setItemExtensions(itemExtensionElements); }
13822 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13822/628db94aaa99b71dca013422eeb098e185b37103/CheatSheetParser.java/clean/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1640, 1180, 2498, 12, 1180, 761, 16, 2029, 761, 907, 13, 1216, 22682, 270, 8229, 25746, 288, 202, 202, 8213, 18, 291, 5962, 12, 1726, 1769, 202, 202, 8213, 18, 291, 5962...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1640, 1180, 2498, 12, 1180, 761, 16, 2029, 761, 907, 13, 1216, 22682, 270, 8229, 25746, 288, 202, 202, 8213, 18, 291, 5962, 12, 1726, 1769, 202, 202, 8213, 18, 291, 5962...
public String toString() { return ScriptRuntime.numberToString(doubleValue);
public String toString(Object base) { if (base == Undefined.instance) return ScriptRuntime.numberToString(doubleValue, 10); else return ScriptRuntime.numberToString(doubleValue, ScriptRuntime.toInt32(base));
public String toString() { return ScriptRuntime.numberToString(doubleValue); }
13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/4bf675b98aeb91f7b1aa93aa6af7bc7944745bed/NativeNumber.java/buggy/js/rhino/src/org/mozilla/javascript/NativeNumber.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 1762, 1435, 288, 202, 565, 327, 7739, 5576, 18, 2696, 5808, 12, 9056, 620, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 1762, 1435, 288, 202, 565, 327, 7739, 5576, 18, 2696, 5808, 12, 9056, 620, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
public org.quickfix.field.UnderlyingRepoCollateralSecurityType getUnderlyingRepoCollateralSecurityType() throws FieldNotFound { org.quickfix.field.UnderlyingRepoCollateralSecurityType value = new org.quickfix.field.UnderlyingRepoCollateralSecurityType();
public quickfix.field.UnderlyingRepoCollateralSecurityType getUnderlyingRepoCollateralSecurityType() throws FieldNotFound { quickfix.field.UnderlyingRepoCollateralSecurityType value = new quickfix.field.UnderlyingRepoCollateralSecurityType();
public org.quickfix.field.UnderlyingRepoCollateralSecurityType getUnderlyingRepoCollateralSecurityType() throws FieldNotFound { org.quickfix.field.UnderlyingRepoCollateralSecurityType value = new org.quickfix.field.UnderlyingRepoCollateralSecurityType(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/ExecutionReport.java/buggy/src/java/src/quickfix/fix44/ExecutionReport.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 14655, 6291, 8791, 13535, 2045, 287, 4368, 559, 10833, 765, 6291, 8791, 13535, 2045, 287, 4368, 559, 1435, 1216, 2286, 2768, 225, 288, 2358, 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, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 14655, 6291, 8791, 13535, 2045, 287, 4368, 559, 10833, 765, 6291, 8791, 13535, 2045, 287, 4368, 559, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, ...
if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; Map columnCache = searchMaxColumnWidth( liha ); for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); if ( !seBase.isVisible( ) ) { continue; } lirh = (LegendItemRenderingHints) htRenderers.get( seBase );
if ( lilh.getLegendItemHints( ) == null ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.null.legend.item.hints", Messages.getResourceBundle( rtc.getULocale( ) ) ); } LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; Map columnCache = searchMaxColumnWidth( liha ); for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); if ( !seBase.isVisible( ) ) { continue; } lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); if ( k < liha.length ) {
public void renderLegend( IPrimitiveRenderer ipr, Legend lg, Map htRenderers ) throws ChartException { if ( !lg.isVisible( ) ) // CHECK VISIBILITY { return; } renderBlock( ipr, lg, StructureSource.createLegend( lg ) ); final IDisplayServer xs = getDevice( ).getDisplayServer( ); final double dScale = getDeviceScale( ); Bounds bo = lg.getBounds( ).scaledInstance( dScale ); Size sz = null; /* --- Start bound computing --- */ // TODO Refactoring: create function double dX, dY; if ( lg.getPosition( ) != Position.INSIDE_LITERAL ) { try { sz = lg.getPreferredSize( xs, cm, rtc ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } sz.scale( dScale ); // validate legend size, restrict within the bounds. // TODO this is requried due to the 1/3 size constraints policy in // layoutManager, // should use better solution. if ( sz.getWidth( ) > bo.getWidth( ) ) { sz.setWidth( bo.getWidth( ) ); } if ( sz.getHeight( ) > bo.getHeight( ) ) { sz.setHeight( bo.getHeight( ) ); } // USE ANCHOR IN POSITIONING THE LEGEND CLIENT AREA WITHIN THE BLOCK // SLACK SPACE dX = bo.getLeft( ) + ( bo.getWidth( ) - sz.getWidth( ) ) / 2; dY = 0; if ( lg.isSetAnchor( ) ) { int iAnchor = lg.getAnchor( ).getValue( ); // swap west/east if ( isRightToLeft( ) ) { if ( iAnchor == Anchor.EAST ) { iAnchor = Anchor.WEST; } else if ( iAnchor == Anchor.NORTH_EAST ) { iAnchor = Anchor.NORTH_WEST; } else if ( iAnchor == Anchor.SOUTH_EAST ) { iAnchor = Anchor.SOUTH_WEST; } else if ( iAnchor == Anchor.WEST ) { iAnchor = Anchor.EAST; } else if ( iAnchor == Anchor.NORTH_WEST ) { iAnchor = Anchor.NORTH_EAST; } else if ( iAnchor == Anchor.SOUTH_WEST ) { iAnchor = Anchor.SOUTH_EAST; } } switch ( iAnchor ) { case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : dY = bo.getTop( ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : dY = bo.getTop( ) + bo.getHeight( ) - sz.getHeight( ); break; default : // CENTERED dY = bo.getTop( ) + ( bo.getHeight( ) - sz.getHeight( ) ) / 2; break; } switch ( iAnchor ) { case Anchor.WEST : case Anchor.NORTH_WEST : case Anchor.SOUTH_WEST : dX = bo.getLeft( ); break; case Anchor.EAST : case Anchor.SOUTH_EAST : case Anchor.NORTH_EAST : dX = bo.getLeft( ) + bo.getWidth( ) - sz.getWidth( ); break; default : // CENTERED dX = bo.getLeft( ) + ( bo.getWidth( ) - sz.getWidth( ) ) / 2; break; } } else { dX = bo.getLeft( ) + ( bo.getWidth( ) - sz.getWidth( ) ) / 2; dY = bo.getTop( ) + ( bo.getHeight( ) - sz.getHeight( ) ) / 2; } } else { // USE PREVIOUSLY COMPUTED POSITION IN THE GENERATOR FOR LEGEND // 'INSIDE' PLOT dX = bo.getLeft( ); dY = bo.getTop( ); sz = SizeImpl.create( bo.getWidth( ), bo.getHeight( ) ); } // get cached legend info. final LegendLayoutHints lilh = rtc.getLegendLayoutHints( ); // consider legend title size. Label lgTitle = lg.getTitle( ); double lgTitleWidth = 0, lgTitleHeight = 0; double yOffset = 0, xOffset = 0, wOffset = 0, hOffset = 0; final boolean bRenderLegendTitle = lgTitle != null && lgTitle.isSetVisible( ) && lgTitle.isVisible( ); int iTitlePos = Position.ABOVE; if ( bRenderLegendTitle ) { lgTitle = LabelImpl.copyInstance( lgTitle ); // handle external resource string final String sPreviousValue = lgTitle.getCaption( ).getValue( ); lgTitle.getCaption( ) .setValue( rtc.externalizedMessage( sPreviousValue ) ); if ( lilh != null ) { // use cached value Size titleSize = lilh.getTitleSize( ); lgTitleWidth = titleSize.getWidth( ); lgTitleHeight = titleSize.getHeight( ); } else { BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, lgTitle, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } lgTitleWidth = bb.getWidth( ); lgTitleHeight = bb.getHeight( ); } iTitlePos = lg.getTitlePosition( ).getValue( ); // swap left/right if ( isRightToLeft( ) ) { if ( iTitlePos == Position.LEFT ) { iTitlePos = Position.RIGHT; } else if ( iTitlePos == Position.RIGHT ) { iTitlePos = Position.LEFT; } } switch ( iTitlePos ) { case Position.ABOVE : yOffset = lgTitleHeight; hOffset = -yOffset; break; case Position.BELOW : hOffset = -lgTitleHeight; break; case Position.LEFT : xOffset = lgTitleWidth; wOffset = -xOffset; break; case Position.RIGHT : wOffset = -lgTitleWidth; break; } } // RENDER THE LEGEND CLIENT AREA final ClientArea ca = lg.getClientArea( ); final Insets lgIns = lg.getInsets( ).scaledInstance( dScale ); LineAttributes lia = ca.getOutline( ); bo = BoundsImpl.create( dX, dY, sz.getWidth( ), sz.getHeight( ) ); bo = bo.adjustedInstance( lgIns ); dX = bo.getLeft( ); dY = bo.getTop( ); // Adjust bounds. bo.delta( xOffset, yOffset, wOffset, hOffset ); dX = bo.getLeft( ); dY = bo.getTop( ); /* --- End of bounds computing --- */ final double dBaseX = dX; final double dBaseY = dY; final RectangleRenderEvent rre = (RectangleRenderEvent) ( (EventObjectCache) ir ).getEventObject( StructureSource.createLegend( lg ), RectangleRenderEvent.class ); // render client area shadow. if ( ca.getShadowColor( ) != null ) { rre.setBounds( bo.translateInstance( 3, 3 ) ); rre.setBackground( ca.getShadowColor( ) ); ipr.fillRectangle( rre ); } // render client area rre.setBounds( bo ); rre.setOutline( lia ); rre.setBackground( ca.getBackground( ) ); ipr.fillRectangle( rre ); ipr.drawRectangle( rre ); lia = LineAttributesImpl.copyInstance( lia ); lia.setVisible( true ); // SEPARATOR LINES MUST BE VISIBLE LineAttributes liSep = lg.getSeparator( ) == null ? lia : lg.getSeparator( ); final SeriesDefinition[] seda = cm.getSeriesForLegend( ); // INITIALIZATION OF VARS USED IN FOLLOWING LOOPS final Orientation o = lg.getOrientation( ); final Direction d = lg.getDirection( ); final Label la = LabelImpl.create( ); la.setCaption( TextImpl.copyInstance( lg.getText( ) ) ); la.getCaption( ).setValue( "X" ); //$NON-NLS-1$ final ITextMetrics itm = xs.getTextMetrics( la ); final double maxWrappingSize = lg.getWrappingSize( ) * dScale; final double dItemHeight = itm.getFullHeight( ); final double dHorizontalSpacing = 4; final double dVerticalSpacing = 4; double dSeparatorThickness = lia.getThickness( ); Insets insCA = ca.getInsets( ).scaledInstance( dScale ); Series seBase; List al; LegendItemRenderingHints lirh; Palette pa; int iPaletteCount; EList elPaletteEntries; Fill fPaletteEntry; final boolean bPaletteByCategory = ( cm.getLegend( ) .getItemType( ) .getValue( ) == LegendItemType.CATEGORIES ); // Get available maximum block width/height. Block bl = cm.getBlock( ); Bounds boFull = bl.getBounds( ).scaledInstance( dScale ); Insets ins = bl.getInsets( ).scaledInstance( dScale ); double dMaxX = boFull.getLeft( ) + boFull.getWidth( ) - ins.getRight( ) - lgIns.getRight( ); double dMaxY = boFull.getTop( ) + boFull.getHeight( ) - ins.getBottom( ) - lgIns.getBottom( ); // Calculate if minSlice applicable. String sMinSliceLabel = null; boolean bMinSliceApplied = false; if ( lilh != null ) { // use cached value. sMinSliceLabel = lilh.getMinSliceText( ); bMinSliceApplied = lilh.isMinSliceApplied( ); } else { boolean bMinSliceDefined = false; double dMinSlice = 0; boolean bPercentageMinSlice = false; if ( cm instanceof ChartWithoutAxes ) { bMinSliceDefined = ( (ChartWithoutAxes) cm ).isSetMinSlice( ); dMinSlice = ( (ChartWithoutAxes) cm ).getMinSlice( ); bPercentageMinSlice = ( (ChartWithoutAxes) cm ).isMinSlicePercent( ); sMinSliceLabel = ( (ChartWithoutAxes) cm ).getMinSliceLabel( ); if ( sMinSliceLabel == null || sMinSliceLabel.length( ) == 0 ) { sMinSliceLabel = IConstants.UNDEFINED_STRING; } else { sMinSliceLabel = rtc.externalizedMessage( sMinSliceLabel ); } } // calculate if need an extra legend item when minSlice defined. if ( bMinSliceDefined && bPaletteByCategory && cm instanceof ChartWithoutAxes ) { if ( !( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS SeriesDefinition sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); SeriesDefinition[] sdOrtho = (SeriesDefinition[]) sdBase.getSeriesDefinitions( ) .toArray( ); DataSetIterator dsiOrtho = null; double dCurrentMinSlice = 0; for ( int i = 0; i < sdOrtho.length && !bMinSliceApplied; i++ ) { try { dsiOrtho = new DataSetIterator( ( (Series) sdOrtho[i].getRunTimeSeries( ) .get( 0 ) ).getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } // TODO Check dataset type, throw exception or ignore?. if ( bPercentageMinSlice ) { double total = 0; while ( dsiOrtho.hasNext( ) ) { Object obj = dsiOrtho.next( ); if ( obj instanceof Number ) { total += ( (Number) obj ).doubleValue( ); } } dsiOrtho.reset( ); dCurrentMinSlice = total * dMinSlice / 100d; } else { dCurrentMinSlice = dMinSlice; } while ( dsiOrtho.hasNext( ) ) { Object obj = dsiOrtho.next( ); if ( obj instanceof Number ) { double val = ( (Number) obj ).doubleValue( ); if ( val < dCurrentMinSlice ) { bMinSliceApplied = true; break; } } } } } } } // COMPUTATIONS HERE MUST BE IN SYNC WITH THE ACTUAL RENDERER if ( o.getValue( ) == Orientation.VERTICAL ) { double dXOffset = 0, dMaxW = 0; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; FormatSpecifier fs = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); } // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); pa = sdBase.getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); if ( lilh != null && lilh.getLegendItemHints( ) != null ) { // use cached value LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; Map columnCache = searchMaxColumnWidth( liha ); for ( int i = 0; i < liha.length; i++ ) { // render each legend item. lih = liha[i]; if ( ( lih.getType( ) & IConstants.LEGEND_ENTRY ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( lih.getCategoryIndex( ) % iPaletteCount ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); double columnWidth = bo.getWidth( ); Double cachedWidth = (Double) columnCache.get( lih ); if ( cachedWidth != null ) { columnWidth = cachedWidth.doubleValue( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ); } renderLegendItem( ipr, lg, la, null, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), 0, columnWidth, insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); } } } else { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int i = 0; while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); // TODO filter the not-used legend. // render legend item. dY += insCA.getTop( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( i++ % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); if ( dY + itm.getFullHeight( ) + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ) + insCA.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, itm.getFullWidth( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, itm.getFullWidth( ), dItemHeight, itm.getFullHeight( ), 0, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); dY += itm.getFullHeight( ) + insCA.getBottom( ); } // render the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { dY += insCA.getTop( ); la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( dsiBase.size( ) % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); if ( dY + itm.getFullHeight( ) + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ) + insCA.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, itm.getFullWidth( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, itm.getFullWidth( ), dItemHeight, itm.getFullHeight( ), 0, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); dY += itm.getFullHeight( ) + insCA.getBottom( ); } } } else if ( d.getValue( ) == Direction.TOP_BOTTOM ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; Map columnCache = searchMaxColumnWidth( liha ); for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); if ( !seBase.isVisible( ) ) { continue; } lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); double columnWidth = bo.getWidth( ); Double cachedWidth = (Double) columnCache.get( lih ); if ( cachedWidth != null ) { columnWidth = cachedWidth.doubleValue( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ); } renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), columnWidth, insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); } } if ( j < seda.length - 1 && k < liha.length ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), lih.getWidth( ), Orientation.HORIZONTAL_LITERAL ); } } } } else { dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); dY += insCA.getTop( ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dY + dFHeight + valueHeight + 2 + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ) + insCA.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, dFWidth ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); dY += dFHeight + insCA.getBottom( ) + valueHeight + 2; } if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX, dY + dSeparatorThickness / 2, dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2, Orientation.HORIZONTAL_LITERAL ); dY += dSeparatorThickness; } } } } else if ( d.getValue( ) == Direction.LEFT_RIGHT ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; Map columnCache = searchMaxColumnWidth( liha ); for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); if ( !seBase.isVisible( ) ) { continue; } lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); double columnWidth = bo.getWidth( ); Double cachedWidth = (Double) columnCache.get( lih ); if ( cachedWidth != null ) { columnWidth = cachedWidth.doubleValue( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ); } renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), columnWidth, insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); } } if ( j < seda.length - 1 && k < liha.length ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), bo.getHeight( ), Orientation.VERTICAL_LITERAL ); } } } } else { dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { dMaxW = 0; al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { dY += insCA.getTop( ); seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dY + dFHeight + valueHeight + 2 + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, dFWidth ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); dY += dFHeight + insCA.getBottom( ) + valueHeight + 2; } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING // + // MAX ITEM WIDTH + RIGHT INSETS dXOffset += insCA.getLeft( ) + ( 3 * dItemHeight / 2 ) + dHorizontalSpacing + dMaxW + insCA.getRight( ); dX += insCA.getLeft( ) + ( 3 * dItemHeight / 2 ) + dHorizontalSpacing + dMaxW + insCA.getRight( ); dY = bo.getTop( ); // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX + dSeparatorThickness / 2, dY, bo.getHeight( ), Orientation.VERTICAL_LITERAL ); dX += dSeparatorThickness; } } } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.illegal.legend.direction", //$NON-NLS-1$ new Object[]{ d.getName( ) }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } } else if ( o.getValue( ) == Orientation.HORIZONTAL ) { double dYOffset = 0, dMaxH = 0; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; FormatSpecifier fs = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); } // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); pa = sdBase.getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); if ( lilh != null && lilh.getLegendItemHints( ) != null ) { // use cached value LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; for ( int i = 0; i < liha.length; i++ ) { // render each legend item. lih = liha[i]; if ( ( lih.getType( ) & IConstants.LEGEND_ENTRY ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( lih.getCategoryIndex( ) % iPaletteCount ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); renderLegendItem( ipr, lg, la, null, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), 0, lih.getWidth( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); } } } else { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int i = 0; double dFullWidth = 0; dY += insCA.getTop( ); while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); // TODO filter the not-used legend. dX += insCA.getLeft( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( i++ % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); dFullWidth = itm.getFullWidth( ); if ( dX + dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + insCA.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, itm.getFullHeight( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, dFullWidth, dItemHeight, itm.getFullHeight( ), 0, dFullWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); dX += dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); } // render the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { dX += insCA.getLeft( ); la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( dsiBase.size( ) % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); dFullWidth = itm.getFullWidth( ); if ( dX + dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + insCA.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, itm.getFullHeight( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, dFullWidth, dItemHeight, itm.getFullHeight( ), 0, dFullWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING // + MAX ITEM WIDTH + RIGHT INSETS dX += dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); } } } else if ( d.getValue( ) == Direction.TOP_BOTTOM ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); if ( !seBase.isVisible( ) ) { continue; } lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), lih.getWidth( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); } } if ( j < seda.length - 1 && k < liha.length ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), bo.getWidth( ), Orientation.HORIZONTAL_LITERAL ); } } } } else { dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { dMaxH = 0; dY += insCA.getTop( ); dX = bo.getLeft( ) + insCA.getLeft( ); al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dX + insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + insCA.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, dFHeight + valueHeight + 2 ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, dFWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL // SPACING // + MAX ITEM WIDTH + RIGHT INSETS dX += insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dFWidth + insCA.getRight( ); } dYOffset += insCA.getTop( ) + insCA.getBottom( ) + dMaxH + dVerticalSpacing; dY += insCA.getTop( ) + insCA.getBottom( ) + dMaxH + dVerticalSpacing; dX = bo.getLeft( ) + insCA.getLeft( ); // SETUP HORIZONTAL SEPARATOR SPACING if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX, dY + dSeparatorThickness / 2, bo.getWidth( ), Orientation.HORIZONTAL_LITERAL ); dY += dSeparatorThickness; } } } } else if ( d.getValue( ) == Direction.LEFT_RIGHT ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); if ( !seBase.isVisible( ) ) { continue; } lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), lih.getWidth( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); } } if ( j < seda.length - 1 && k < liha.length ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), lih.getHeight( ), Orientation.VERTICAL_LITERAL ); } } } } else { dSeparatorThickness += dHorizontalSpacing; dX += insCA.getLeft( ); dY += insCA.getTop( ); for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dX + insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, dFHeight + valueHeight + 2 ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, dFWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i ); // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL // SPACING // + MAX ITEM WIDTH + RIGHT INSETS dX += insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + dFWidth + insCA.getRight( ); } // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX + dSeparatorThickness / 2, dY, dMaxH, Orientation.VERTICAL_LITERAL ); dX += dSeparatorThickness; } } } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.illegal.legend.direction", //$NON-NLS-1$ new Object[]{ d.getName( ) }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.illegal.legend.orientation", //$NON-NLS-1$ new Object[]{ o.getName( ) }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } // Render legend title if defined. if ( bRenderLegendTitle ) { double lX = bo.getLeft( ); double lY = bo.getTop( ); switch ( iTitlePos ) { case Position.ABOVE : lX = bo.getLeft( ) + ( bo.getWidth( ) - lgTitleWidth ) / 2d; lY = bo.getTop( ) - lgTitleHeight; break; case Position.BELOW : lX = bo.getLeft( ) + ( bo.getWidth( ) - lgTitleWidth ) / 2d; lY = bo.getTop( ) + bo.getHeight( ); break; case Position.LEFT : lX = bo.getLeft( ) - lgTitleWidth; lY = bo.getTop( ) + ( bo.getHeight( ) - lgTitleHeight ) / 2d; break; case Position.RIGHT : lX = bo.getLeft( ) + bo.getWidth( ); lY = bo.getTop( ) + ( bo.getHeight( ) - lgTitleHeight ) / 2d; break; } final TextRenderEvent tre = (TextRenderEvent) ( (EventObjectCache) ir ).getEventObject( WrappedStructureSource.createLegendTitle( lg, lgTitle ), TextRenderEvent.class ); tre.setBlockBounds( BoundsImpl.create( lX, lY, lgTitleWidth, lgTitleHeight ) ); TextAlignment ta = TextAlignmentImpl.create( ); ta.setHorizontalAlignment( HorizontalAlignment.CENTER_LITERAL ); ta.setVerticalAlignment( VerticalAlignment.CENTER_LITERAL ); tre.setBlockAlignment( ta ); tre.setLabel( lgTitle ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); ipr.drawText( tre ); } itm.dispose( ); // DISPOSE RESOURCES AFTER USE }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/bdbe857d641e2e27600409e7bb20f1950ed1536b/BaseRenderer.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/BaseRenderer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1743, 16812, 12, 467, 9840, 6747, 277, 683, 16, 17167, 409, 15266, 16, 1635, 14049, 3420, 414, 262, 1082, 202, 15069, 14804, 503, 202, 95, 202, 202, 430, 261, 401, 23623, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1743, 16812, 12, 467, 9840, 6747, 277, 683, 16, 17167, 409, 15266, 16, 1635, 14049, 3420, 414, 262, 1082, 202, 15069, 14804, 503, 202, 95, 202, 202, 430, 261, 401, 23623, ...
list.add( elementHandle.getName( ) );
list.add( elementHandle.getQualifiedName() );
public static String[] getStyles( ) { ArrayList list = new ArrayList( ); list.add( CHOICE_NONE ); Iterator iterator = DEUtil.getStyles( ); if ( iterator != null ) { while ( iterator.hasNext( ) ) { ReportElementHandle elementHandle = (ReportElementHandle) iterator.next( ); list.add( elementHandle.getName( ) ); } } return (String[]) list.toArray( new String[0] ); }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/46391ca6598965d83bfc34ce19f4abb02bb2143d/ChoiceSetFactory.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/views/attributes/providers/ChoiceSetFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 514, 8526, 336, 9725, 12, 262, 202, 95, 202, 202, 19558, 666, 273, 394, 2407, 12, 11272, 202, 202, 1098, 18, 1289, 12, 6469, 51, 11774, 67, 9826, 11272, 202, 202, 3198, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 514, 8526, 336, 9725, 12, 262, 202, 95, 202, 202, 19558, 666, 273, 394, 2407, 12, 11272, 202, 202, 1098, 18, 1289, 12, 6469, 51, 11774, 67, 9826, 11272, 202, 202, 3198, ...
QuickFixAction.registerQuickFixAction(highlightInfo, new VariableAccessFromInnerClassFix(variable, innerClass), null);
QuickFixAction.registerQuickFixAction(highlightInfo, new VariableAccessFromInnerClassFix(variable, innerClass));
static HighlightInfo checkVariableMustBeFinal(PsiVariable variable, PsiJavaCodeReferenceElement context) { if (variable.hasModifierProperty(PsiModifier.FINAL)) return null; final PsiClass innerClass = getInnerClassVariableReferencedFrom(variable, context); if (innerClass != null) { String description = JavaErrorMessages.message("variable.must.be.final", context.getText()); final HighlightInfo highlightInfo = HighlightInfo.createHighlightInfo(HighlightInfoType.ERROR, context, description); QuickFixAction.registerQuickFixAction(highlightInfo, new VariableAccessFromInnerClassFix(variable, innerClass), null); return highlightInfo; } return null; }
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/dee9b62fe1ee40a1d6ca8afc95e5e1eca32dd11f/HighlightControlFlowUtil.java/clean/codeInsight/impl/com/intellij/codeInsight/daemon/impl/analysis/HighlightControlFlowUtil.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 760, 31386, 966, 866, 3092, 10136, 1919, 7951, 12, 52, 7722, 3092, 2190, 16, 453, 7722, 5852, 1085, 2404, 1046, 819, 13, 288, 565, 309, 261, 6105, 18, 5332, 9829, 1396, 12, 52, 7722, 98...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 31386, 966, 866, 3092, 10136, 1919, 7951, 12, 52, 7722, 3092, 2190, 16, 453, 7722, 5852, 1085, 2404, 1046, 819, 13, 288, 565, 309, 261, 6105, 18, 5332, 9829, 1396, 12, 52, 7722, 98...
Marker star = Marker.getMarker("*"); assertTrue(blue.matches("*")); assertTrue(blue.matches(star)); assertTrue(star.matches("asdasd")); assertTrue(star.matches(star)); assertTrue(star.matches(blue));
public void testStar() { Marker blue = Marker.getMarker(BLUE); assertEquals(BLUE, blue.getName()); Marker star = Marker.getMarker("*"); //assertTrue(blue.isImmutable()); assertTrue(blue.matches("*")); assertTrue(blue.matches(star)); assertTrue(star.matches("asdasd")); assertTrue(star.matches(star)); assertTrue(star.matches(blue)); }
49526 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49526/5813ec1f27de9d0b21969c4da66ee09180dbddd4/MarkerTest.java/buggy/tests/src/java/org/slf4j/MarkerTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1842, 18379, 1435, 288, 565, 14742, 8024, 273, 14742, 18, 588, 7078, 12, 14618, 1821, 1769, 565, 1815, 8867, 12, 14618, 1821, 16, 8024, 18, 17994, 10663, 565, 14742, 10443, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1842, 18379, 1435, 288, 565, 14742, 8024, 273, 14742, 18, 588, 7078, 12, 14618, 1821, 1769, 565, 1815, 8867, 12, 14618, 1821, 16, 8024, 18, 17994, 10663, 565, 14742, 10443, 273, ...
m_replaceMissing.setInputFormat(data); data = weka.filters.Filter.useFilter(data, m_replaceMissing);
Instances instances = new Instances(data); instances.setClassIndex(-1); m_replaceMissing.setInputFormat(instances); data = weka.filters.Filter.useFilter(instances, m_replaceMissing); instances = null;
public void buildClusterer (Instances data) throws Exception { if (data.checkForStringAttributes()) { throw new Exception("Can't handle string attributes!"); } m_replaceMissing = new ReplaceMissingValues(); m_replaceMissing.setInputFormat(data); data = weka.filters.Filter.useFilter(data, m_replaceMissing); m_theInstances = data; // calculate min and max values for attributes m_minValues = new double [m_theInstances.numAttributes()]; m_maxValues = new double [m_theInstances.numAttributes()]; for (int i = 0; i < m_theInstances.numAttributes(); i++) { m_minValues[i] = m_maxValues[i] = Double.NaN; } for (int i = 0; i < m_theInstances.numInstances(); i++) { updateMinMax(m_theInstances.instance(i)); } doEM(); // save memory m_theInstances = new Instances(m_theInstances,0); }
4179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4179/0ad5194076aaf90e4dc08e840126c9629d3acc41/EM.java/buggy/branches/book2ndEd-branch/weka/clusterers/EM.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1361, 3629, 264, 261, 5361, 501, 13, 565, 1216, 1185, 288, 565, 309, 261, 892, 18, 1893, 1290, 780, 2498, 10756, 288, 1377, 604, 225, 394, 1185, 2932, 2568, 1404, 1640, 533, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1361, 3629, 264, 261, 5361, 501, 13, 565, 1216, 1185, 288, 565, 309, 261, 892, 18, 1893, 1290, 780, 2498, 10756, 288, 1377, 604, 225, 394, 1185, 2932, 2568, 1404, 1640, 533, ...
Expression expression = new Expression( exprString ); namedExpressions.put( name, expression );
namedExpressions.put( name, exprString );
private void setupNamedExpressions( DesignElementHandle handle, Map namedExpressions ) { List userProperties = handle.getUserProperties( ); if ( userProperties == null || namedExpressions == null ) return; for ( int i = 0; i < userProperties.size( ); i++ ) { UserPropertyDefn userDef = (UserPropertyDefn) userProperties .get( i ); if ( userDef.getTypeCode( ) == IPropertyType.EXPRESSION_TYPE ) { String name = userDef.getName( ); String exprString = handle.getStringProperty( name ); if ( exprString != null && !exprString.trim( ).equals( "" ) ) { Expression expression = new Expression( exprString ); namedExpressions.put( name, expression ); } } } }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/7246d39aba16a9656ec9841ec35032d0d3084995/EngineIRVisitor.java/clean/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/parser/EngineIRVisitor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 3875, 7604, 8927, 12, 29703, 1046, 3259, 1640, 16, 1082, 202, 863, 4141, 8927, 262, 202, 95, 202, 202, 682, 729, 2297, 273, 1640, 18, 588, 1299, 2297, 12, 11272, 202, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 3875, 7604, 8927, 12, 29703, 1046, 3259, 1640, 16, 1082, 202, 863, 4141, 8927, 262, 202, 95, 202, 202, 682, 729, 2297, 273, 1640, 18, 588, 1299, 2297, 12, 11272, 202, 20...
String message = (String) context. getJobDetail().getJobDataMap().get(MESSAGE);
String message = (String) context. getJobDetail().getJobDataMap().get(MESSAGE);
public void execute(JobExecutionContext context) throws JobExecutionException { // This job simply prints out its job name and the // date and time that it is running String jobName = context.getJobDetail().getFullName(); String message = (String) context. getJobDetail().getJobDataMap().get(MESSAGE); _log.info("SimpleJob: " + jobName + " executing at " + new Date()); _log.info("SimpleJob: msg: " + message); }
3431 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3431/8441c8be6e16f3f87693ab6cfeae2bf90caf7159/SimpleJob.java/clean/examples/src/java/org/quartz/examples/example12/SimpleJob.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1836, 12, 31498, 1042, 819, 13, 1082, 202, 15069, 3956, 14576, 288, 202, 202, 759, 1220, 1719, 8616, 14971, 596, 2097, 1719, 508, 471, 326, 202, 202, 759, 1509, 471, 813, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1836, 12, 31498, 1042, 819, 13, 1082, 202, 15069, 3956, 14576, 288, 202, 202, 759, 1220, 1719, 8616, 14971, 596, 2097, 1719, 508, 471, 326, 202, 202, 759, 1509, 471, 813, ...
};
} } };
private void hbCreateDecodeTables(int[] limit, int[] base, int[] perm, char[] length, int minLen, int maxLen, int alphaSize) { int pp, i, j, vec; pp = 0; for(i = minLen; i <= maxLen; i++) for(j = 0; j < alphaSize; j++) if (length[j] == i) { perm[pp] = j; pp++; }; for(i = 0; i < MAX_CODE_LEN; i++) base[i] = 0; for(i = 0; i < alphaSize; i++) base[length[i]+1]++; for(i = 1; i < MAX_CODE_LEN; i++) base[i] += base[i-1]; for (i = 0; i < MAX_CODE_LEN; i++) limit[i] = 0; vec = 0; for (i = minLen; i <= maxLen; i++) { vec += (base[i+1] - base[i]); limit[i] = vec-1; vec <<= 1; } for (i = minLen + 1; i <= maxLen; i++) base[i] = ((limit[i-1] + 1) << 1) - base[i]; }
17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/8cc971dacd78a055a205267a2dc768de88454260/CBZip2InputStream.java/clean/src/main/org/apache/tools/bzip2/CBZip2InputStream.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 21749, 1684, 6615, 6905, 12, 474, 8526, 1800, 16, 509, 8526, 1026, 16, 4766, 1377, 509, 8526, 4641, 16, 1149, 8526, 769, 16, 4766, 1377, 509, 1131, 2891, 16, 509, 29618, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 21749, 1684, 6615, 6905, 12, 474, 8526, 1800, 16, 509, 8526, 1026, 16, 4766, 1377, 509, 8526, 4641, 16, 1149, 8526, 769, 16, 4766, 1377, 509, 1131, 2891, 16, 509, 29618, 16, ...
pushOnAstLengthStack(0);
if (this.scanner.source[endStatementPosition] == ';') { pushOnAstStack(new EmptyStatement(endStatementPosition, endStatementPosition)); } else { pushOnAstStack(new EmptyStatement(endStatementPosition - 5, endStatementPosition)); }
protected void consumeEmptyStatement() { // EmptyStatement ::= ';' pushOnAstLengthStack(0);}
10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/cde18c9ebe2e7f75615c5208e3a92c8a80764a80/Parser.java/buggy/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4750, 918, 7865, 1921, 3406, 1435, 288, 202, 759, 8953, 3406, 493, 33, 7554, 202, 6206, 1398, 21385, 1782, 2624, 12, 20, 1769, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4750, 918, 7865, 1921, 3406, 1435, 288, 202, 759, 8953, 3406, 493, 33, 7554, 202, 6206, 1398, 21385, 1782, 2624, 12, 20, 1769, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
retEnv = SunRound2Client.sendMsg(util, url, soapAction);
retEnv = client.sendMsg(util, url, soapAction);
public void testR2BaseEchoBase64() throws AxisFault { url = "http://www.cincomsmalltalk.com/soap/interop"; soapAction = "http://soapinterop.org/"; util = new Round2EchoBase64ClientUtil(); retEnv = SunRound2Client.sendMsg(util, url, soapAction); tempPath = resFilePath + "sunBaseBase64Res.xml"; compare(retEnv, tempPath); }
49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/95f09abc768fee06d65b12836e31273ac0e15eb3/VWRound2InteropTest.java/clean/modules/integration/itest/test/interop/whitemesa/round2/VWRound2InteropTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 54, 22, 2171, 19704, 2171, 1105, 1435, 1216, 15509, 7083, 225, 288, 3639, 880, 273, 315, 2505, 2207, 5591, 18, 71, 267, 832, 12019, 88, 2960, 18, 832, 19, 19215, 19, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 54, 22, 2171, 19704, 2171, 1105, 1435, 1216, 15509, 7083, 225, 288, 3639, 880, 273, 315, 2505, 2207, 5591, 18, 71, 267, 832, 12019, 88, 2960, 18, 832, 19, 19215, 19, 30...
int index = tokenVal.indexOf('-'); String aaa = tokenVal.substring(0, index); String bbb = tokenVal.substring(index+1, tokenVal.length());
int index = tokenVal.indexOf('-'); String aaa = tokenVal.substring(0, index); String bbb = tokenVal.substring(index + 1, tokenVal.length());
private void dashToWords(String tokenVal) { int index = tokenVal.indexOf('-'); String aaa = tokenVal.substring(0, index); String bbb = tokenVal.substring(index+1, tokenVal.length()); if (matches(digitsPattern, aaa) && matches(digitsPattern, bbb)) { FeatureSet featureSet = tokenItem.getFeatures(); featureSet.setString("name", aaa); tokenToWords(aaa); wordRelation.addWord("to"); featureSet.setString("name", bbb); tokenToWords(bbb); featureSet.setString("name", ""); } else { tokenToWords(aaa); tokenToWords(bbb); } }
24259 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24259/6a55df45b5e749262e5610405145a505d38c6c9e/TokenToWords.java/clean/java/de/dfki/lt/mary/modules/en/TokenToWords.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 12558, 774, 7363, 12, 780, 1147, 3053, 13, 288, 202, 474, 770, 273, 1147, 3053, 18, 31806, 2668, 6627, 1769, 202, 780, 279, 7598, 273, 1147, 3053, 18, 28023, 12, 20, 16, 770,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12558, 774, 7363, 12, 780, 1147, 3053, 13, 288, 202, 474, 770, 273, 1147, 3053, 18, 31806, 2668, 6627, 1769, 202, 780, 279, 7598, 273, 1147, 3053, 18, 28023, 12, 20, 16, 770,...
final int mod = listItem.getIndex() % 2; String text = (mod == 0 ? "<tr>" : ""); final String href = getPage().urlFor("0", NewAndUpdatedAddons.class, new PageParameters("category=" + category.getId())); text += "<td width=\"50%\"><a class=\"lm\" href=\"" + href + "\">" + category.getName() + " (" + category.getAddonCount() + ")</a></td>"; if ((mod != 0) || (categoryCount.size() == (listItem.getIndex() + 1)) && ((categoryCount.size() % 2) != 0)) { text += "</tr>"; } final Label label = new Label("text", text); label.setEscapeModelStrings(false); listItem.add(label); } }; add(this.table); final Link hrefAll = new BookmarkablePageLink("allHref", NewAndUpdatedAddons.class, new PageParameters("category=-1")); add(hrefAll); this.allCount = new Label("allCount", Integer.toString(allCategoryCount)); hrefAll.add(allCount); }
final int mod = listItem.getIndex() % 2; String text = (mod == 0 ? "<tr>" : ""); final String href = getPage().urlFor(NewAndUpdatedAddons.class, new PageParameters("category=" + category.getId())).toString(); text += "<td width=\"50%\"><a class=\"lm\" href=\"" + href + "\">" + category.getName() + " (" + category.getAddonCount() + ")</a></td>"; if ((mod != 0) || (categoryCount.size() == (listItem.getIndex() + 1)) && ((categoryCount.size() % 2) != 0)) { text += "</tr>"; } final Label label = new Label("text", text); label.setEscapeModelStrings(false); listItem.add(label); } }; add(this.table); final Link hrefAll = new BookmarkablePageLink("allHref", NewAndUpdatedAddons.class, new PageParameters("category=-1")); add(hrefAll); this.allCount = new Label("allCount", Integer.toString(allCategoryCount)); hrefAll.add(allCount); }
private void addComponents() { // TODO make it a detachable model this.table = new ListView("table", (List)null) { protected void populateItem(ListItem listItem) { final Category category = (Category)listItem.getModelObject(); final int mod = listItem.getIndex() % 2; String text = (mod == 0 ? "<tr>" : ""); final String href = getPage().urlFor("0", NewAndUpdatedAddons.class, new PageParameters("category=" + category.getId())); text += "<td width=\"50%\"><a class=\"lm\" href=\"" + href + "\">" + category.getName() + " (" + category.getAddonCount() + ")</a></td>"; if ((mod != 0) || (categoryCount.size() == (listItem.getIndex() + 1)) && ((categoryCount.size() % 2) != 0)) { text += "</tr>"; } final Label label = new Label("text", text); label.setEscapeModelStrings(false); listItem.add(label); } }; add(this.table); final Link hrefAll = new BookmarkablePageLink("allHref", NewAndUpdatedAddons.class, new PageParameters("category=-1")); add(hrefAll); this.allCount = new Label("allCount", Integer.toString(allCategoryCount)); hrefAll.add(allCount); }
51612 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51612/8c7fded16a75ce2a1f0300235fd1af96b502ea2e/Categories.java/buggy/wicket-library/src/java/wicket/addons/Categories.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 527, 7171, 1435, 565, 288, 3639, 368, 2660, 1221, 518, 279, 10199, 429, 938, 3639, 333, 18, 2121, 273, 394, 987, 1767, 2932, 2121, 3113, 261, 682, 13, 2011, 13, 3639, 288, 54...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 527, 7171, 1435, 565, 288, 3639, 368, 2660, 1221, 518, 279, 10199, 429, 938, 3639, 333, 18, 2121, 273, 394, 987, 1767, 2932, 2121, 3113, 261, 682, 13, 2011, 13, 3639, 288, 54...
_graph.setDatum(new Datum("Group Transitivity", new Double(m_grpTransitivity)));
_graph.setDatum(new Datum(DATUM_GRP_TRANSITIVITY, new Double(m_grpTransitivity)));
private void calculate() { if (_vtx_index_tbl == null || _vtx_index_tbl.length < 1) { System.out.println("[SNA] Warning: no graph loaded or graph contains no vertices."); return; } int v; double m_grpDensity = grp_density(); double m_grpTransitivity = grp_transitivity(); double [] m_betweenness = compute_betweenness(); double m_grpBetweenness = grp_betweenness(m_betweenness); double [] m_closeness = compute_closeness(); double m_grpCloseness = grp_closeness(m_closeness); int [] m_degree = compute_totaldegree(); int [] m_indegree = compute_indegree(); int [] m_outdegree = compute_outdegree(); double m_grpDegree = grp_degree(m_degree); _graph.setDatum(new Datum("Group Density", new Double(m_grpDensity))); System.out.println(" Group Density = " + m_grpDensity); _graph.setDatum(new Datum("Group Transitivity", new Double(m_grpTransitivity))); System.out.println(" Group Transitivity = " + m_grpTransitivity); _graph.setDatum(new Datum("Group Betweenness", new Double(m_grpBetweenness))); System.out.println(" Group Betweenness= " + m_grpBetweenness); _graph.setDatum(new Datum("Group Closeness", new Double(m_grpCloseness))); System.out.println(" Group Closeness= " + m_grpCloseness); _graph.setDatum(new Datum("Group Degree", new Double(m_grpDegree))); System.out.println(" Group Degree = " + m_grpDegree); System.out.println(" Betweenness:"); for(v = 0; v < _graph.numVertices(); v++) { _vtx_index_tbl[v].setDatum(new Datum("Betweenness", new Double(m_betweenness[v]))); System.out.println(" [" + v + "] " + m_betweenness[v]); } System.out.println(" Closeness:"); for(v = 0; v < _graph.numVertices(); v++) { _vtx_index_tbl[v].setDatum(new Datum("Closeness", new Double(m_closeness[v]))); System.out.println(" [" + v + "] " + m_closeness[v]); } System.out.println(" Degree:"); for(v = 0; v < _graph.numVertices(); v++) { _vtx_index_tbl[v].setDatum(new Datum("Total Degree", new Double(m_degree[v]))); System.out.println(" [" + v + "] " + m_degree[v]); } System.out.println(" In-Degree:"); for(v = 0; v < _graph.numVertices(); v++) { _vtx_index_tbl[v].setDatum(new Datum("In-Degree", new Double(m_indegree[v]))); System.out.println(" [" + v + "] " + m_indegree[v]); } System.out.println(" Out-Degree:"); for(v = 0; v < _graph.numVertices(); v++) { _vtx_index_tbl[v].setDatum(new Datum("Out-Degree", new Double(m_outdegree[v]))); System.out.println(" [" + v + "] " + m_outdegree[v]); } }
11096 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11096/1c8a644e00bc1a70d27b11b030299d7b90c1809d/SNA.java/clean/nv2d/trunk/src/nv2d/plugins/standard/SNA.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 4604, 1435, 288, 202, 202, 430, 261, 67, 90, 978, 67, 1615, 67, 16187, 422, 446, 747, 389, 90, 978, 67, 1615, 67, 16187, 18, 2469, 411, 404, 13, 288, 1082, 202, 3163, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4604, 1435, 288, 202, 202, 430, 261, 67, 90, 978, 67, 1615, 67, 16187, 422, 446, 747, 389, 90, 978, 67, 1615, 67, 16187, 18, 2469, 411, 404, 13, 288, 1082, 202, 3163, ...
remove (getIndexOf (comp));
Component c = getComponent (index); int layer = getLayer (c); decrLayer (new Integer(layer)); componentToLayer.remove (c); super.remove (index); revalidate(); repaint();
public void remove (Component comp) { remove (getIndexOf (comp)); }
45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/363fe84fd732aa8ca3562fb0734fe48ee20c2c65/JLayeredPane.java/buggy/libraries/javalib/javax/swing/JLayeredPane.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1206, 261, 1841, 1161, 13, 225, 288, 565, 5435, 276, 273, 10322, 261, 1615, 1769, 509, 3018, 273, 25763, 261, 71, 1769, 2109, 86, 4576, 261, 2704, 2144, 12, 6363, 10019, 1794, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1206, 261, 1841, 1161, 13, 225, 288, 565, 5435, 276, 273, 10322, 261, 1615, 1769, 509, 3018, 273, 25763, 261, 71, 1769, 2109, 86, 4576, 261, 2704, 2144, 12, 6363, 10019, 1794, ...
try { Value ref = new NodeRef(doc.getDocId()); IndexQuery query = new IndexQuery(IndexQuery.TRUNC_RIGHT, ref); domDb.remove(query, null); domDb.flush(); } catch (BTreeException e) { LOG.warn("btree error while removing document", e); } catch (DBException e) { LOG.warn("db error while removing document", e); } catch (IOException e) { LOG.warn("io error while removing document", e); } catch (TerminatedException e) { LOG.warn("method terminated", e); } return null; }
try { Value ref = new NodeRef(doc.getDocId()); IndexQuery query = new IndexQuery(IndexQuery.TRUNC_RIGHT, ref); domDb.remove(query, null); domDb.flush(); } catch (BTreeException e) { LOG.warn("btree error while removing document", e); } catch (DBException e) { LOG.warn("db error while removing document", e); } catch (IOException e) { LOG.warn("io error while removing document", e); } catch (TerminatedException e) { LOG.warn("method terminated", e); } return null; }
public Object start() { try { Value ref = new NodeRef(doc.getDocId()); IndexQuery query = new IndexQuery(IndexQuery.TRUNC_RIGHT, ref); domDb.remove(query, null); domDb.flush(); } catch (BTreeException e) { LOG.warn("btree error while removing document", e); } catch (DBException e) { LOG.warn("db error while removing document", e); } catch (IOException e) { LOG.warn("io error while removing document", e); } catch (TerminatedException e) { LOG.warn("method terminated", e); } return null; }
2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/7f8b9e1ed7cd1231abcaa3236c78e26e77e01501/NativeBroker.java/clean/src/org/exist/storage/NativeBroker.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 5411, 1071, 1033, 787, 1435, 288, 202, 7734, 775, 288, 202, 10792, 1445, 1278, 273, 394, 2029, 1957, 12, 2434, 18, 588, 1759, 548, 10663, 202, 10792, 3340, 1138, 843, 273, 202, 13491, 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, 3196, 5411, 1071, 1033, 787, 1435, 288, 202, 7734, 775, 288, 202, 10792, 1445, 1278, 273, 394, 2029, 1957, 12, 2434, 18, 588, 1759, 548, 10663, 202, 10792, 3340, 1138, 843, 273, 202, 13491, 39...
if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) {
if (getAtomTypeXCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 1) {
public DescriptorValue calculate(AtomContainer ac) throws CDKException { RingSet rs = (new AllRingsFinder()).findAllRings(ac); HueckelAromaticityDetector.detectAromaticity(ac, rs, true); double xlogP = 0; org.openscience.cdk.interfaces.Atom[] atoms = ac.getAtoms(); String symbol = ""; int bondCount = 0; int hsCount = 0; double maxBondOrder = 0; for (int i = 0; i < atoms.length; i++) { symbol = atoms[i].getSymbol(); bondCount = ac.getBondCount(atoms[i]); hsCount = getHydrogenCount(ac, atoms[i]); maxBondOrder = ac.getMaximumBondOrder(atoms[i]); if (symbol.equals("C")) { if (bondCount == 2) { // C sp if (hsCount >= 1) { xlogP += 0.209; // // System.out...println("XLOGP: 1"); } else { if (maxBondOrder == 2.0) { xlogP += 2.073; // // System.out...println("XLOGP: 2"); } else if (maxBondOrder == 3.0) { xlogP += 0.33; // // System.out...println("XLOGP: 3"); } } } if (bondCount == 3) { // C sp2 if (atoms[i].getFlag(CDKConstants.ISAROMATIC)) { if (getAromaticCarbonsCount(ac, atoms[i]) == 2) { if (hsCount == 0) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { xlogP += 0.296; // // System.out...println("XLOGP: 4"); } else { xlogP -= 0.151; // // System.out...println("XLOGP: 5"); } } else { xlogP += 0.337; // // System.out...println("XLOGP: 6"); } } else if (getAromaticCarbonsCount(ac, atoms[i]) < 2 && getAromaticNitrogensCount(ac, atoms[i]) > 1) { if (hsCount == 0) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { xlogP += 0.174; // // System.out...println("XLOGP: 7"); } else { xlogP += 0.366; // // System.out...println("XLOGP: 8"); } } else if (getHydrogenCount(ac, atoms[i]) == 1) { xlogP += 0.126; // // System.out...println("XLOGP: 9"); } } } else { if (hsCount == 0) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.05; // // System.out...println("XLOGP: 10"); } else { xlogP += 0.013; // // System.out...println("XLOGP: 11"); } } if (getNitrogenOrOxygenCount(ac, atoms[i]) == 1) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP -= 0.03; // // System.out...println("XLOGP: 12"); } else { xlogP -= 0.027; // // System.out...println("XLOGP: 13"); } } if (getNitrogenOrOxygenCount(ac, atoms[i]) == 2) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.005; // // System.out...println("XLOGP: 14"); } else { xlogP -= 0.315; // // System.out...println("XLOGP: 15"); } } } if (hsCount == 1) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.466; // // System.out...println("XLOGP: 16"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.136; // // System.out...println("XLOGP: 17"); } } else { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.001; // // System.out...println("XLOGP: 18"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.31; // // System.out...println("XLOGP: 19"); } } } if (hsCount == 2) { xlogP += 0.42; // // System.out...println("XLOGP: 20"); } } if (getIfCarbonIsHydrophobic(ac, atoms[i]) >= 0) { xlogP += 0.211; // // System.out...println("XLOGP: 21"); } } if (bondCount == 4) { // C sp3 if (getIfCarbonIsHydrophobic(ac, atoms[i]) >= 0) { xlogP += 0.211; // // System.out...println("XLOGP: 22"); } if (hsCount == 0) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP -= 0.006; // // System.out...println("XLOGP: 23"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.57; // // System.out...println("XLOGP: 24"); } if (getPiSystemsCount(ac, atoms[i]) >= 2) { xlogP -= 0.317; // // System.out...println("XLOGP: 25"); } } else { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP -= 0.316; // // System.out...println("XLOGP: 26"); } else { xlogP -= 0.723; // // System.out...println("XLOGP: 27"); } } } if (hsCount == 1) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.127; // // System.out...println("XLOGP: 28"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.243; // // System.out...println("XLOGP: 29"); } if (getPiSystemsCount(ac, atoms[i]) >= 2) { xlogP -= 0.499; // // System.out...println("XLOGP: 30"); } } else { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP -= 0.205; // // System.out...println("XLOGP: 31"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.305; // // System.out...println("XLOGP: 32"); } if (getPiSystemsCount(ac, atoms[i]) >= 2) { xlogP -= 0.709; // // System.out...println("XLOGP: 33"); } } } if (hsCount == 2) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.358; // // System.out...println("XLOGP: 34"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.008; // // System.out...println("XLOGP: 35"); } if (getPiSystemsCount(ac, atoms[i]) == 2) { xlogP -= 0.185; // // System.out...println("XLOGP: 36"); } } else { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.137; // // System.out...println("XLOGP: 37"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.303; // // System.out...println("XLOGP: 38"); } if (getPiSystemsCount(ac, atoms[i]) == 2) { xlogP -= 0.815; // // System.out...println("XLOGP: 39"); } } } if (hsCount > 2) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.528; // // System.out...println("XLOGP: 40"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.267; // // System.out...println("XLOGP: 41"); } } if (getNitrogenOrOxygenCount(ac, atoms[i]) == 1) { xlogP -= 0.032; // // System.out...println("XLOGP: 42"); } } } } if (symbol.equals("N")) { if (ac.getBondOrderSum(atoms[i]) == 5.0) { xlogP += 1.178; // // System.out...println("XLOGP: 43"); } // NO2 else { if (getPresenceOfCarbonil(ac, atoms[i]) == 1) { // amidic nitrogen if (hsCount == 0) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { xlogP += 0.078; // // System.out...println("XLOGP: 44"); } if (getNitrogenOrOxygenCount(ac, atoms[i]) == 1) { xlogP -= 0.118; // // System.out...println("XLOGP: 45"); } } if (hsCount == 1) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { xlogP -= 0.096; // // System.out...println("XLOGP: 46"); } else { xlogP -= 0.044; // // System.out...println("XLOGP: 47"); } } if (hsCount == 2) { xlogP -= 0.646; // // System.out...println("XLOGP: 48"); } } else { if (bondCount == 1) { // -C#N if (getCarbonsCount(ac, atoms[i]) == 1) { xlogP -= 0.566; // // System.out...println("XLOGP: 49"); } } if (bondCount == 2) { // N sp2 if (atoms[i].getFlag(CDKConstants.ISAROMATIC)) { xlogP -= 0.493; // // System.out...println("XLOGP: 50"); } else { if (getDoubleBondedCarbonsCount(ac, atoms[i]) == 0) { if (getDoubleBondedNitrogenCount(ac, atoms[i]) == 0) { if (getDoubleBondedOxygenCount(ac, atoms[i]) == 1) { xlogP += 0.427; // // System.out...println("XLOGP: 51"); } } if (getDoubleBondedNitrogenCount(ac, atoms[i]) == 1) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { xlogP += 0.536; // // System.out...println("XLOGP: 52"); } if (getNitrogenOrOxygenCount(ac, atoms[i]) == 1) { xlogP -= 0.597; // // System.out...println("XLOGP: 53"); } } } if (getDoubleBondedCarbonsCount(ac, atoms[i]) == 1) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.007; // // System.out...println("XLOGP: 54"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.275; // // System.out...println("XLOGP: 55"); } } if (getNitrogenOrOxygenCount(ac, atoms[i]) == 1) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.366; // // System.out...println("XLOGP: 56"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.251; // // System.out...println("XLOGP: 57"); } } } } } if (bondCount == 3) { // N sp3 if (hsCount == 0) { if (rs.contains(atoms[i])) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { xlogP += 0.881; // // System.out...println("XLOGP: 58"); } else { xlogP -= 0.01; // // System.out...println("XLOGP: 59"); } } else { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.159; // // System.out...println("XLOGP: 60"); } if (getPiSystemsCount(ac, atoms[i]) > 0) { xlogP += 0.761; // // System.out...println("XLOGP: 61"); } } else { xlogP -= 0.239; } } } if (hsCount == 1) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { if (atoms[i].getFlag(CDKConstants.ISAROMATIC)) { xlogP += 0.545; // // System.out...println("XLOGP: 62"); } // like pyrrole else { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP -= 0.112; // // System.out...println("XLOGP: 63"); } if (getPiSystemsCount(ac, atoms[i]) > 0) { xlogP += 0.166; // // System.out...println("XLOGP: 64"); } } } else { if (rs.contains(atoms[i])) { xlogP += 0.153; // // System.out...println("XLOGP: 65"); } else { xlogP += 0.324; // // System.out...println("XLOGP: 66"); } } } if (hsCount == 2) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP -= 0.534; // // System.out...println("XLOGP: 66"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.329; // // System.out...println("XLOGP: 67"); } } else { xlogP -= 1.082; // // System.out...println("XLOGP: 68"); } } } } } } if (symbol.equals("O")) { if (bondCount == 1) { xlogP -= 0.399; // // System.out...println("XLOGP: 69"); } if (bondCount == 2) { if (hsCount == 0) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.084; // // System.out...println("XLOGP: 70"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.435; // // System.out...println("XLOGP: 71"); } } if (getNitrogenOrOxygenCount(ac, atoms[i]) == 1) { xlogP += 0.105; // // System.out...println("XLOGP: 72"); } } else { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP -= 0.467; // // System.out...println("XLOGP: 73"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.082; // // System.out...println("XLOGP: 74"); } } if (getNitrogenOrOxygenCount(ac, atoms[i]) == 1) { xlogP -= 0.522; // // System.out...println("XLOGP: 75"); } } } } if (symbol.equals("S")) { if (bondCount == 1) { xlogP -= 0.148; // // System.out...println("XLOGP: 76"); } if (bondCount == 2) { if (hsCount == 0) { xlogP += 0.255; // // System.out...println("XLOGP: 77"); } else { xlogP += 0.419; // // System.out...println("XLOGP: 78"); } } if (bondCount == 3) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 1) { xlogP -= 1.375; // // System.out...println("XLOGP: 79"); } } if (bondCount == 4) { if (getNitrogenOrOxygenCount(ac, atoms[i]) == 2) { xlogP -= 0.168; // // System.out...println("XLOGP: 80"); } } } if (symbol.equals("P")) { if (getDoubleBondedSulfurCount(ac, atoms[i]) == 1) { xlogP += 1.253; // // System.out...println("XLOGP: 81"); } if (getDoubleBondedOxygenCount(ac, atoms[i]) == 1) { xlogP -= 0.477; // // System.out...println("XLOGP: 82"); } } if (symbol.equals("F")) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.375; // // System.out...println("XLOGP: 84"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.202; // // System.out...println("XLOGP: 85"); } } if (symbol.equals("Cl")) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.512; // // System.out...println("XLOGP: 86"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.663; // // System.out...println("XLOGP: 87"); } } if (symbol.equals("Br")) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.85; // // System.out...println("XLOGP: 88"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.839; // // System.out...println("XLOGP: 89"); } } if (symbol.equals("I")) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 1.05; // // System.out...println("XLOGP: 90"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 1.109; // // System.out...println("XLOGP: 91"); } } if (getAlogenCount(ac, atoms[i]) >= 2) { xlogP += 0.137; // // System.out...println("XLOGP: 92"); } // more than 2 alogens on the same atom if (getPresenceOfCarbonil(ac, atoms[i]) == 2) {// sp2 oxygen 1-5 pair if(!rs.contains(atoms[i])) { xlogP += 0.580; } } } Descriptor acc = new HBondAcceptorCountDescriptor(); Object[] paramsAcc = {new Boolean(false)}; acc.setParameters(paramsAcc); Descriptor don = new HBondDonorCountDescriptor(); Object[] paramsDon = {new Boolean(false)}; don.setParameters(paramsDon); int acceptors = ((IntegerResult) acc.calculate(ac).getValue()).intValue(); int donors = ((IntegerResult) don.calculate(ac).getValue()).intValue(); if (donors > 0 && acceptors > 0) { xlogP += 0.429; // internal H-bonds } SmilesParser sp = new SmilesParser(); AtomContainer paba = sp.parseSmiles("CS(=O)(=O)c1ccc(N)cc1"); // p-amino sulphonic acid if (UniversalIsomorphismTester.isSubgraph((org.openscience.cdk.AtomContainer)ac, paba)) { xlogP -= 0.501; } AtomContainer aminoacid = sp.parseSmiles("NC=O"); // alpha amino acid if (UniversalIsomorphismTester.isSubgraph((org.openscience.cdk.AtomContainer)ac, aminoacid)) { xlogP -= 2.166; } AtomContainer salicilic = sp.parseSmiles("O=C(O)c1ccccc1O"); // salicylic acid if (UniversalIsomorphismTester.isSubgraph((org.openscience.cdk.AtomContainer)ac, salicilic)) { xlogP += 0.554; } AtomContainer orthopair = sp.parseSmiles("OCCO"); // ortho oxygen pair if (UniversalIsomorphismTester.isSubgraph((org.openscience.cdk.AtomContainer)ac, orthopair)) { xlogP -= 0.268; } return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(xlogP)); }
1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/11cd872c3dbcc51a117ad375706e7a5334b88daa/XLogPDescriptor.java/clean/src/org/openscience/cdk/qsar/XLogPDescriptor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 12823, 620, 4604, 12, 3641, 2170, 1721, 13, 1216, 24570, 288, 202, 202, 10369, 694, 3597, 273, 261, 2704, 4826, 54, 899, 8441, 1435, 2934, 4720, 1595, 54, 899, 12, 1077, 1769, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 12823, 620, 4604, 12, 3641, 2170, 1721, 13, 1216, 24570, 288, 202, 202, 10369, 694, 3597, 273, 261, 2704, 4826, 54, 899, 8441, 1435, 2934, 4720, 1595, 54, 899, 12, 1077, 1769, ...
Class clazz = cl.parseClass("class OverviewController { @Property String listView = \"listPage\"; @Property Closure list = { request, response -> return null }; } ");
Class clazz = cl.parseClass("class TestController { @Property action = { return null }; } ");
public void testDefaultGrailsControllerViewNames() throws Exception { GroovyClassLoader cl = new GroovyClassLoader(); Class clazz = cl.parseClass("class OverviewController { @Property String listView = \"listPage\"; @Property Closure list = { request, response -> return null }; } "); GrailsControllerClass grailsClass = new DefaultGrailsControllerClass(clazz); assertEquals("Overview", grailsClass.getName()); assertEquals("OverviewController", grailsClass.getFullName()); assertEquals("/overview/listPage", grailsClass.getViewByURI("/overview/list")); assertEquals(4, grailsClass.getURIs().length); }
51576 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51576/63d5a2d5141ac0cac6f4223429ce5f4401f63ffb/DefaultGrailsControllerClassTests.java/clean/test/commons/org/codehaus/groovy/grails/commons/DefaultGrailsControllerClassTests.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 1868, 14571, 14573, 2933, 1767, 1557, 1435, 1216, 1185, 288, 202, 202, 43, 12859, 7805, 927, 273, 394, 20841, 7805, 5621, 202, 202, 797, 4003, 273, 927, 18, 2670, 797...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 1868, 14571, 14573, 2933, 1767, 1557, 1435, 1216, 1185, 288, 202, 202, 43, 12859, 7805, 927, 273, 394, 20841, 7805, 5621, 202, 202, 797, 4003, 273, 927, 18, 2670, 797...
if (file.equals(snip.getName())) {
if (snip.getName().equals("calendar-"+name+"-"+file)) {
protected void get(String name, String file, HttpServletRequest request, HttpServletResponse response) throws IOException { SnipSpace space = SnipSpace.getInstance(); if (space.exists(name)) { PrintWriter w = response.getWriter(); Snip userSnip = space.load(name); Iterator it = userSnip.getChildren().iterator(); while (it.hasNext()) { Snip snip = (Snip) it.next(); if (file.equals(snip.getName())) { String content = snip.getContent(); response.setContentLength(content.length()); response.setContentType("application/octet-stream"); w.print(content); w.flush(); w.close(); return; } } } }
6853 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6853/3e9972025e94c71a72fcb6f6fe84c66e64f595ed/iCalServlet.java/clean/src/org/snipsnap/net/iCalServlet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 336, 12, 780, 508, 16, 514, 585, 16, 5397, 9984, 590, 16, 12446, 766, 13, 1216, 1860, 288, 565, 18961, 625, 3819, 3476, 273, 18961, 625, 3819, 18, 588, 1442, 5621, 565, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 336, 12, 780, 508, 16, 514, 585, 16, 5397, 9984, 590, 16, 12446, 766, 13, 1216, 1860, 288, 565, 18961, 625, 3819, 3476, 273, 18961, 625, 3819, 18, 588, 1442, 5621, 565, 309, ...
fail("VersionHistory should not be lockable: VersionHistory.lock(false,false) did not throw an UnsupportedRepositoryOperationException"); } catch (UnsupportedRepositoryOperationException success) {
fail("VersionHistory should not be lockable: VersionHistory.lock(false,false) did not throw a UnsupportedRepositoryOperationException"); } catch (LockException success) {
public void testLock() throws Exception { try { vHistory.lock(true, true); fail("VersionHistory should not be lockable: VersionHistory.lock(true,true) did not throw an UnsupportedRepositoryOperationException"); } catch (UnsupportedRepositoryOperationException success) { } try { vHistory.lock(true, false); fail("VersionHistory should not be lockable: VersionHistory.lock(true,false) did not throw an UnsupportedRepositoryOperationException"); } catch (UnsupportedRepositoryOperationException success) { } try { vHistory.lock(false, true); fail("VersionHistory should not be lockable: VersionHistory.lock(false,true) did not throw an UnsupportedRepositoryOperationException"); } catch (UnsupportedRepositoryOperationException success) { } try { vHistory.lock(false, false); fail("VersionHistory should not be lockable: VersionHistory.lock(false,false) did not throw an UnsupportedRepositoryOperationException"); } catch (UnsupportedRepositoryOperationException success) { } }
49304 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49304/64f7876b57599dff89167dea13bbc7b2decccd97/VersionHistoryTest.java/buggy/core/src/test/org/apache/jackrabbit/test/api/version/VersionHistoryTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 2531, 1435, 1216, 1185, 288, 3639, 775, 288, 5411, 331, 5623, 18, 739, 12, 3767, 16, 638, 1769, 5411, 2321, 2932, 1444, 5623, 1410, 486, 506, 2176, 429, 30, 4049, 5623, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2531, 1435, 1216, 1185, 288, 3639, 775, 288, 5411, 331, 5623, 18, 739, 12, 3767, 16, 638, 1769, 5411, 2321, 2932, 1444, 5623, 1410, 486, 506, 2176, 429, 30, 4049, 5623, ...
departmentID, degreeID };
parameters.getDepartmentID(), parameters.getDegreeID() };
public String disassociateParentUnit() throws FenixFilterException, FenixServiceException { String costCenterCodeString = getValidCosteCenterCode(); Integer departmentID = null, degreeID = null; if (this.getUnit().getDepartment() != null) { departmentID = this.getUnit().getDepartment().getIdInternal(); } if (this.getUnit().getDegree() != null) { degreeID = this.getUnit().getDegree().getIdInternal(); } final Object[] argsToRead = { this.getUnit().getIdInternal(), this.getChooseUnit().getIdInternal(), this.getUnit().getName(), costCenterCodeString, this.getUnit().getBeginDate(), this.getUnit().getEndDate(), this.getUnit().getType(), departmentID, degreeID }; try { ServiceUtils.executeService(getUserView(), "CreateNewUnit", argsToRead); } catch (FenixServiceException e) { setErrorMessage(e.getMessage()); return ""; } return "backToUnitDetails"; }
2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/afb7ae842cf4ded1a54e47faca3b122fbe978e80/OrganizationalStructureBackingBean.java/buggy/src/net/sourceforge/fenixedu/presentationTier/backBeans/manager/organizationalStructureManagement/OrganizationalStructureBackingBean.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 1015, 11577, 3054, 2802, 1435, 1216, 478, 275, 697, 1586, 503, 16, 478, 275, 697, 15133, 288, 3639, 514, 6991, 8449, 1085, 780, 273, 22574, 8018, 73, 8449, 1085, 5621, 3639, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 1015, 11577, 3054, 2802, 1435, 1216, 478, 275, 697, 1586, 503, 16, 478, 275, 697, 15133, 288, 3639, 514, 6991, 8449, 1085, 780, 273, 22574, 8018, 73, 8449, 1085, 5621, 3639, 21...
assignedTypes = matcher.getAdditionalResourceTypes(); } catch (Throwable t) {
assignedTypes = matcher.getAdditionalResourceTypes(); } catch (Throwable t) {
private void initialize(Document document, String editorUri) { // set the label of the editor setEditorLabel(document.getRootElement().elementText(C_NODE_EDITORLABEL)); // set the URI of the editor setEditorUri(editorUri); // create the map of valid resource types Iterator i = document.getRootElement().element(C_NODE_RESOURCETYPES).elementIterator(C_NODE_TYPE); Map resTypes = new HashMap(); while (i.hasNext()) { Element currentType = (Element)i.next(); float ranking; String name = currentType.elementText(C_NODE_NAME); if (name == null || "".equals(name.trim())) { logConfigurationError(Messages.get().key(Messages.ERR_INVALID_RESTYPE_NAME_0), null); continue; } try { ranking = Float.parseFloat(currentType.elementText(C_NODE_RANKING)); } catch (Throwable t) { logConfigurationError(Messages.get().key(Messages.ERR_INVALID_RESTYPE_RANKING_1, name), t); continue; } String mapTo = currentType.elementText(C_NODE_MAPTO); if ("".equals(mapTo)) { mapTo = null; } resTypes.put(name, new String[] {"" + ranking, mapTo}); } // add the additional resource types i = document.getRootElement().element(C_NODE_RESOURCETYPES).elementIterator(C_NODE_CLASS); while (i.hasNext()) { Element currentClass = (Element)i.next(); String name = currentClass.elementText(C_NODE_NAME); List assignedTypes = new ArrayList(); try { // get the editor type matcher class I_CmsEditorTypeMatcher matcher = (I_CmsEditorTypeMatcher)Class.forName(name).newInstance(); assignedTypes = matcher.getAdditionalResourceTypes(); } catch (Throwable t) { logConfigurationError(Messages.get().key(Messages.ERR_INVALID_RESTYPE_CLASS_1, name), t); continue; } float ranking; try { ranking = Float.parseFloat(currentClass.elementText(C_NODE_RANKING)); } catch (Throwable t) { logConfigurationError(Messages.get().key(Messages.ERR_INVALID_RESTYPE_RANKING_1, name), t); continue; } String mapTo = currentClass.elementText(C_NODE_MAPTO); if ("".equals(mapTo)) { mapTo = null; } // now loop through all types found and add them Iterator j = assignedTypes.iterator(); while (j.hasNext()) { String typeName = (String)j.next(); resTypes.put(typeName, new String[] {"" + ranking, mapTo}); } } setResourceTypes(resTypes); // create the list of user agents & compiled patterns for editor i = document.getRootElement().element(C_NODE_USERAGENTS).elementIterator(C_NODE_AGENT); List pattern = new ArrayList(); List userAgents = new ArrayList(); while (i.hasNext()) { Element currentAgent = (Element)i.next(); String agentName = currentAgent.getText(); if (agentName != null && !"".equals(agentName.trim())) { userAgents.add(agentName); try { pattern.add(Pattern.compile(agentName)); } catch (PatternSyntaxException e) { logConfigurationError(Messages.get().key(Messages.ERR_COMPILE_EDITOR_REGEX_1, agentName), e); } } else { logConfigurationError(Messages .get().key(Messages.ERR_INVALID_USERAGENT_DEF_0), null); } } setBrowserPattern(pattern); setUserAgentsRegEx(userAgents); }
51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/2fa0efcae8f9aa5971c7763269a3b033e9256d4b/CmsWorkplaceEditorConfiguration.java/clean/src/org/opencms/workplace/editors/CmsWorkplaceEditorConfiguration.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 4046, 12, 2519, 1668, 16, 514, 4858, 3006, 13, 288, 3639, 368, 444, 326, 1433, 434, 326, 4858, 3639, 444, 6946, 2224, 12, 5457, 18, 588, 2375, 1046, 7675, 2956, 1528, 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, 3238, 918, 4046, 12, 2519, 1668, 16, 514, 4858, 3006, 13, 288, 3639, 368, 444, 326, 1433, 434, 326, 4858, 3639, 444, 6946, 2224, 12, 5457, 18, 588, 2375, 1046, 7675, 2956, 1528, 12, 39,...
if(metadata.compressed) {
if(metadata.isCompressed()) {
private FetchResult runMetadata(ClientMetadata dm, int recursionLevel, ClientKey key, LinkedList metaStrings, Metadata metadata, ArchiveHandler container, FreenetURI thisKey, boolean dontEnterImplicitArchives, boolean localOnly) throws MetadataParseException, FetchException, ArchiveFailureException, ArchiveRestartException { if(metadata.isSimpleManifest()) { String name; if(metaStrings.isEmpty()) name = null; else name = (String) metaStrings.removeFirst(); // Since metadata is a document, we just replace metadata here if(name == null) { metadata = metadata.getDefaultDocument(); } else { metadata = metadata.getDocument(name); thisKey = thisKey.pushMetaString(name); } return runMetadata(dm, recursionLevel, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives, localOnly); } else if(metadata.isArchiveManifest()) { container = ctx.archiveManager.makeHandler(thisKey, metadata.getArchiveType(), false); Bucket metadataBucket = container.getMetadata(archiveContext, ctx, dm, recursionLevel, true); try { metadata = Metadata.construct(metadataBucket); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR); } return runMetadata(dm, recursionLevel+1, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives, localOnly); } else if(metadata.isArchiveInternalRedirect()) { if(container == null) throw new FetchException(FetchException.NOT_IN_ARCHIVE); else { /* Implicit archive handling: * Sooner or later we reach a SimpleFileRedirect to data, a Splitfile to data, * or an ArchiveInternalRedirect to data. * * In this case, if it is an archive type, if implicit archive handling is enabled, and if * we have more meta-strings, we can try to enter it. */ if((!dontEnterImplicitArchives) && ArchiveManager.isUsableArchiveType(dm.getMIMEType()) && (!metaStrings.isEmpty())) { // Possible implicit archive inside archive? container = ctx.archiveManager.makeHandler(thisKey, ArchiveManager.getArchiveType(dm.getMIMEType()), false); Bucket metadataBucket = container.getMetadata(archiveContext, ctx, dm, recursionLevel, true); try { metadata = Metadata.construct(metadataBucket); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR); } return runMetadata(dm, recursionLevel+1, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives, localOnly); } Bucket result = container.get(metadata.getZIPInternalName(), archiveContext, ctx, dm, recursionLevel, true); dm.mergeNoOverwrite(metadata.getClientMetadata()); return new FetchResult(dm, result); } } else if(metadata.isMultiLevelMetadata()) { // Doesn't have to be a splitfile; could be from a ZIP or a plain file. metadata.setSimpleRedirect(); FetchResult res = runMetadata(dm, recursionLevel, key, metaStrings, metadata, container, thisKey, true, localOnly); try { metadata = Metadata.construct(res.data); } catch (MetadataParseException e) { throw new FetchException(FetchException.INVALID_METADATA, e); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR, e); } return runMetadata(dm, recursionLevel, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives, localOnly); } else if(metadata.isSingleFileRedirect()) { FreenetURI uri = metadata.getSingleTarget(); dm.mergeNoOverwrite(metadata.getClientMetadata()); if((!dontEnterImplicitArchives) && ArchiveManager.isUsableArchiveType(dm.getMIMEType()) && (!metaStrings.isEmpty())) { // Is probably an implicit archive. ClientKey target; try { target = ClientKey.getBaseKey(uri); } catch (MalformedURLException e1) { throw new FetchException(FetchException.INVALID_URI, "Invalid URI: "+uri); } // Probably a usable archive as-is. We may not have to fetch it. container = ctx.archiveManager.makeHandler(uri, ArchiveManager.getArchiveType(dm.getMIMEType()), true); if(container != null) { Bucket metadataBucket = container.getMetadata(archiveContext, ctx, dm, recursionLevel, true); try { metadata = Metadata.construct(metadataBucket); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR); } return runMetadata(dm, recursionLevel+1, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives, localOnly); } // else just fetch it, create context later } FetchResult fr = realRun(dm, recursionLevel, uri, dontEnterImplicitArchives, localOnly); if(metadata.compressed) { Compressor codec = Compressor.getCompressionAlgorithmByMetadataID(metadata.compressionCodec); Bucket data = fr.data; Bucket output; try { long maxLen = ctx.maxTempLength; if(maxLen < 0) maxLen = Long.MAX_VALUE; output = codec.decompress(data, ctx.bucketFactory, maxLen); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR, e); } catch (CompressionOutputSizeException e) { throw new FetchException(FetchException.TOO_BIG); } return new FetchResult(fr, output); } return fr; } else if(metadata.isSplitfile()) { // Straight data splitfile. // Might be used by parents for something else, in which case they will set dontEnterImplicitArchives. dm.mergeNoOverwrite(metadata.getClientMetadata()); // even splitfiles can have mime types! if((!dontEnterImplicitArchives) && ArchiveManager.isUsableArchiveType(dm.getMIMEType()) && (!metaStrings.isEmpty())) { // We know target is not metadata. container = ctx.archiveManager.makeHandler(thisKey, ArchiveManager.getArchiveType(dm.getMIMEType()), false); Bucket metadataBucket = container.getMetadata(archiveContext, ctx, dm, recursionLevel, true); try { metadata = Metadata.construct(metadataBucket); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR, e); } return runMetadata(dm, recursionLevel+1, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives, localOnly); } FetcherContext newCtx; if(metadata.splitUseLengths) newCtx = new FetcherContext(ctx, FetcherContext.SPLITFILE_USE_LENGTHS_MASK); else newCtx = new FetcherContext(ctx, FetcherContext.SPLITFILE_DEFAULT_MASK); SplitFetcher sf = new SplitFetcher(metadata, archiveContext, newCtx, recursionLevel); Bucket sfResult = sf.fetch(); // will throw in event of error if(metadata.compressed) { Compressor codec = Compressor.getCompressionAlgorithmByMetadataID(metadata.compressionCodec); try { long maxLen = ctx.maxTempLength; if(maxLen < 0) maxLen = Long.MAX_VALUE; sfResult = codec.decompress(sfResult, ctx.bucketFactory, maxLen); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR, e); } catch (CompressionOutputSizeException e) { throw new FetchException(FetchException.TOO_BIG); } } return new FetchResult(dm, sfResult); } else { Logger.error(this, "Don't know what to do with metadata: "+metadata); throw new FetchException(FetchException.UNKNOWN_METADATA); } }
8026 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8026/1309aed4b19c609108b71fcf53c44157f11b35df/Fetcher.java/buggy/src/freenet/client/Fetcher.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 8065, 1253, 1086, 2277, 12, 1227, 2277, 9113, 16, 509, 13917, 2355, 16, 2445, 653, 498, 16, 10688, 2191, 7957, 16, 1875, 202, 2277, 1982, 16, 13124, 1503, 1478, 16, 478, 2842, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8065, 1253, 1086, 2277, 12, 1227, 2277, 9113, 16, 509, 13917, 2355, 16, 2445, 653, 498, 16, 10688, 2191, 7957, 16, 1875, 202, 2277, 1982, 16, 13124, 1503, 1478, 16, 478, 2842, ...
System.err.println("New sum of residuals squared : "+sum);
if (m_debug) { System.err.println("Sum of squared residuals " +"(predicting the mean) : "+sum); }
public void buildClassifier(Instances data) throws Exception { m_additiveModels = new FastVector(); if (m_Classifier == null) { throw new Exception("No base classifiers have been set!"); } if (data.classAttribute().isNominal()) { throw new Exception("Class must be numeric!"); } Instances newData = new Instances(data); newData.deleteWithMissingClass(); m_classIndex = newData.classIndex(); double sum = 0; double temp_sum = 0; // Add the model for the mean first ZeroR zr = new ZeroR(); zr.buildClassifier(newData); m_additiveModels.addElement(zr); newData = residualReplace(newData, zr); sum = newData.attributeStats(m_classIndex).numericStats.sumSq; System.err.println("New sum of residuals squared : "+sum); do { temp_sum = sum; Classifier nextC = Classifier.makeCopies(m_Classifier, 1)[0]; nextC.buildClassifier(newData); m_additiveModels.addElement(nextC); newData = residualReplace(newData, nextC); sum = newData.attributeStats(m_classIndex).numericStats.sumSq; System.err.println("sum of residuals squared : "+sum); } while ((temp_sum - (sum = newData.attributeStats(m_classIndex). numericStats.sumSq)) > Utils.SMALL); // remove last classifier m_additiveModels.removeElementAt(m_additiveModels.size()-1); }
4179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4179/e6690c3e29ee5280c99ba1879b0466f2c83a39c6/AdditiveRegression.java/buggy/trunk/weka/classifiers/meta/AdditiveRegression.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1361, 13860, 12, 5361, 501, 13, 1216, 1185, 288, 377, 312, 67, 1289, 3720, 8430, 273, 394, 9545, 5018, 5621, 565, 309, 261, 81, 67, 13860, 422, 446, 13, 288, 1377, 604, 394, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1361, 13860, 12, 5361, 501, 13, 1216, 1185, 288, 377, 312, 67, 1289, 3720, 8430, 273, 394, 9545, 5018, 5621, 565, 309, 261, 81, 67, 13860, 422, 446, 13, 288, 1377, 604, 394, ...
JInternalFrame w = (JInternalFrame)fileWindows.get(value); if (w != null) { try { w.show(); w.setSelected(true); } catch (Exception exc) { } }
swingGui.showFileWindow(value, -1);
public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); if (cmd.equals("Cancel")) { setVisible(false); value = null; } else if (cmd.equals("Select")) { value = (String)list.getSelectedValue(); setVisible(false); JInternalFrame w = (JInternalFrame)fileWindows.get(value); if (w != null) { try { w.show(); w.setSelected(true); } catch (Exception exc) { } } } }
19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/6d3fa8c797c9e1e6b515ec210130e233da92913d/SwingGui.java/clean/toolsrc/org/mozilla/javascript/tools/debugger/SwingGui.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 26100, 12, 1803, 1133, 425, 13, 288, 3639, 514, 1797, 273, 425, 18, 588, 1803, 2189, 5621, 3639, 309, 261, 4172, 18, 14963, 2932, 6691, 6, 3719, 288, 5411, 16697, 12, 5743, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 26100, 12, 1803, 1133, 425, 13, 288, 3639, 514, 1797, 273, 425, 18, 588, 1803, 2189, 5621, 3639, 309, 261, 4172, 18, 14963, 2932, 6691, 6, 3719, 288, 5411, 16697, 12, 5743, 1...