__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/11654318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initEngine(JMeterEngine engine, String host) {
GuiPackage gui = GuiPackage.getInstance();
HashTree testTree = gui.getTreeModel().getTestPlan();
JMeter.convertSubTree(testTree);
testTree.add(testTree.getArray()[0], gui.getMainFrame());
engine.configure(testTree);
}
COM: <s> initializes test on engine </s>
|
funcom_train/33390983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DBObject asDBObject() {
return BasicDBObjectBuilder.start()
.add(AGGREGATE_IDENTIFIER_PROPERTY, aggregateIdentifier)
.add(SEQUENCE_NUMBER_PROPERTY, sequenceNumber)
.add(SERIALIZED_EVENT_PROPERTY, serializedEvent)
.add(TIME_STAMP_PROPERTY, timeStamp)
.add(AGGREGATE_TYPE_PROPERTY, aggregateType)
.get();
}
COM: <s> returns the current event entry as a mongo dbobject </s>
|
funcom_train/1303253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StatsAccumulator readFields(DataInput dataInput) throws IOException {
label = dataInput.readUTF();
if (label.length() == 0) {
label = null;
}
n = dataInput.readInt();
sum = dataInput.readDouble();
sos = dataInput.readDouble();
min = dataInput.readDouble();
max = dataInput.readDouble();
return this;
}
COM: <s> deserialize the object from the specified data input </s>
|
funcom_train/18489643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentValue(final Boolean valueCurrent) {
if (value == null) {
this.valueCurrent = null;
return;
}
if (!Boolean.class.equals(type)) {
throw new ClassCastException("expected argument type was "
+ type + ", but given argument is of type "
+ type.getClass().getName());
}
this.valueCurrent = valueCurrent;
}
COM: <s> set current code boolean code parameter value </s>
|
funcom_train/11659055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Script compileScript(URL url) throws JellyException {
XMLParser parser = getXMLParser();
parser.setContext(this);
Script script = null;
try {
script = parser.parse(url.toString());
} catch (IOException e) {
throw new JellyException(JellyContext.BAD_PARSE, e);
} catch (SAXException e) {
throw new JellyException(JellyContext.BAD_PARSE, e);
}
return script.compile();
}
COM: <s> attempts to parse the script from the given url using the </s>
|
funcom_train/13864667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void add(CacheableObject obj) {
this.cache.add(0,new CachedItem(obj));
if (isL2Available()) this.sortLevels();
if (this.cache.size() > this.effectiveMaxSize) this.cache.setSize(this.effectiveMaxSize); // Truncate if neccesary.
}
COM: <s> adds an element to this cache </s>
|
funcom_train/49958681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ScmChangeLogRecord getScmLogRecordForRevision(Integer revision, Integer repositoryId) {
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("revision", revision);
params.put("repository_id", repositoryId);
return (ScmChangeLogRecord) this.sqlSession.selectOne("getLogRecordForRevision", params);
}
COM: <s> returns the change summary for the revision </s>
|
funcom_train/48423237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkModelMeshFilter(String modelMesh) {
boolean isFiltered = false;
try {
if (modelMeshFilters != null && modelMeshFilters.size() > 0) {
isFiltered = this.modelMeshFilters.contains(modelMesh);
}
} catch (Exception Ex) {
logger.log(Level.SEVERE, "Error checking mesh filter.", Ex);
}
return isFiltered;
}
COM: <s> method that check if a mesh its filtered </s>
|
funcom_train/21243870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update ( List pfileList ) throws Exception {
ZipItem zip = getZip();
for (int i = 0; i < pfileList.size(); i++) {
// We want to swallow any duplicate file exceptions
try {
zip.addFile((String) pfileList.get(i));
}
catch (Exception dEx) {
}
}
zip.close();
}
COM: <s> add list of files </s>
|
funcom_train/25735767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getAtom(final String symbol) throws ParseException {
if (!symbol.matches("^" + ATOM_SYMBOL_TOKEN + "$")) {
throw new ParseException(symbol + ": invalid atom symbol", 0);
}
if (!atoms.containsKey(symbol)) {
throw new ParseException(symbol + " is unknown", 0);
}
return (Element) atoms.get(symbol);
}
COM: <s> get an atom given an atomic symbol no number of mass to define </s>
|
funcom_train/12910292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Signature getSignature( String name ) {
Signature sig = _getSignature(name);
if( sig==null ) {
sig = _getSignature(value("_unsignedBlockSig_"));
}
if( sig == null ) {
error("signature "+name+" is null");
throw new IllegalStateException("null signature");
}
return sig.copy();
}
COM: <s> gets a signature if name does not denote a registered signature the </s>
|
funcom_train/25761646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePlacemark(long id) {
// Remove from tracks (might be linked to more than one)
for (Track t : tracks) {
t.removePointOfInterest(id);
}
// Remove from placemark list
for (int i = 0; i < placemarks.size(); i++) {
if (placemarks.get(i).getId() == id)
placemarks.remove(i);
}
}
COM: <s> removes a placemark by its given id from the container </s>
|
funcom_train/34672356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invoke() throws BaseException {
super.logEntry();
CoreUser cu=getArgs().getCallersCore();
getArgs().setCallersCore(new CoreUserImpl(cu));
Object[] argValues={getArgs()};
setArgs((CommandArg)invokeRemoteMethod(getRemoteMethod(), argValues));
super.logExit();
}
COM: <s> invoke the service via the ejb </s>
|
funcom_train/22356858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Locale show() {
if (languagesFound()) {
pane.selectInitialValue();
dialog.setAlwaysOnTop(true);
dialog.setVisible(true);
dialog.dispose();
Object value = pane.getInputValue();
if (value == JOptionPane.UNINITIALIZED_VALUE)
return null;
return ((Lang) value).locale;
} else {
dialog.setVisible(true);
dialog.dispose();
return null;
}
}
COM: <s> display the dialog and return users choice </s>
|
funcom_train/35085180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHeaders(String[] h) {
int x = 0;
header = new ArrayList(h.length);
for (x = 0; x < h.length; x++) {
header.add(h[x]);
data.put(h[x], new ArrayList());
}
}
COM: <s> sets the headers for the data set </s>
|
funcom_train/8528693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File getCurrentAudioFile() {
if (null == currentAudioFile) {
String numPart = String.valueOf(++fileCounter);
while (numPart.length() < digitLen) {
numPart = "0" + numPart;
}
currentAudioFile = new File(outputDir, audioOutputPrefix + numPart + audioOutputSuffix);
finishedFiles.add(currentAudioFile);
}
return currentAudioFile;
}
COM: <s> returns the name of the current audio file </s>
|
funcom_train/20822936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean testHandleQuit() {
boolean result = false;
ApplicationEvent event = new ApplicationEvent("");
for (int i = 0; !result && i < listeners.size(); i ++) {
ApplicationListener listener = listeners.get(i);
listener.handleQuit(event);
result = event.isHandled();
}
return result;
}
COM: <s> used for unit testing only perform handle quit on listeners </s>
|
funcom_train/19572201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeSQLProperties(String driver,String url,String userid,String password) {
try {
properties.setProperty("driver",driver);
properties.setProperty("url",url);
properties.setProperty("userid",userid);
properties.setProperty("password",password);
properties.store(new FileOutputStream(PROPERTIES_FILENAME), null);
} catch (IOException e) {
}
}
COM: <s> saves generic database connect information to the bestbooks </s>
|
funcom_train/42775873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getNoteFrequency() {
String tmpString = (String)noteFrequencyCombo.getSelectedItem();
if (tmpString.indexOf("/") >= 0) { //This is a fraction
int denominator = Integer.parseInt(tmpString.substring(tmpString.indexOf("/") + 1, tmpString.length()));
return PPQ_RESOLUTION / denominator;
}
else { //This is a whole number of beats
return Integer.parseInt(tmpString) * PPQ_RESOLUTION;
}
}
COM: <s> finds the value of a note frequency within the combo box </s>
|
funcom_train/26311911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMountFacingChange(int nEntity, int nEquip, int nFacing) {
Object[] data = { new Integer(nEntity), new Integer(nEquip),
new Integer(nFacing) };
send(new Packet(Packet.COMMAND_ENTITY_MOUNTED_FACINGCHANGE, data));
}
COM: <s> send mount facing change data to the server </s>
|
funcom_train/9442845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void commitText(WnnWord word, boolean withSpace) {
if (mOptLearning && mConverter != null) {
mConverter.learn(word);
}
mInputConnection.commitText(word.candidate, (FIX_CURSOR_TEXT_END ? 1 : word.candidate.length()));
if (withSpace) {
commitText(" ");
}
}
COM: <s> commit a word </s>
|
funcom_train/29837804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFreeChart createChart(final PieDataset dataset) {
final JFreeChart chart = ChartFactory.createPieChart(
"Pie Chart Demo 1", // chart title
dataset, // data
true, // include legend
true,
false
);
final PiePlot plot = (PiePlot) chart.getPlot();
plot.setLabelFont(new Font("SansSerif", Font.PLAIN, 12));
plot.setNoDataMessage("No data available");
plot.setCircular(false);
plot.setLabelLinkPaint(Color.red);
plot.setLabelGap(0.02);
return chart;
}
COM: <s> creates a chart </s>
|
funcom_train/50911315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RealArray getDeviateValues() {
double[] array = realArray.getArray();
getMean();
double[] dvArray = new double[array.length];
for (int i = 0; i < array.length; i++) {
dvArray[i] = (array[i] - mean);
}
deviateArray = new RealArray(dvArray);
return deviateArray;
}
COM: <s> get deviate values </s>
|
funcom_train/19745111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLinkedResource(ContentResource resource) {
if ( !resource.getLinkedContentFieldValues().contains(this) ) {
resource.getLinkedContentFieldValues().add(this);
}
if ( !getLinkedPages().contains(resource) ) {
getLinkedPages().add(resource);
}
}
COM: <s> adds a connection between this cfv and a given content resource </s>
|
funcom_train/41099688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Manufacturer read(String id) throws DataException {
//check to see if the object is in cache, if it is just return it
//establish a connection from the pool, then pass that connection along with the string id to the next method
//catch any exceptions you may have
//return the manufacturer
//RELEASE THE CONNECTION!!
}
COM: <s> reads an existing manufacturer from the database </s>
|
funcom_train/35442964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object arg0) {
CEdge e = (CEdge) arg0;
if (this.getStartPoint().x < e.getStartPoint().x )
return -1;
else if (this.getStartPoint().x > e.getStartPoint().x )
return 1;
else if (this.getStartPoint().y < e.getStartPoint().y)
return -1;
else if (this.getStartPoint().y > e.getStartPoint().y)
return 1;
return 0;
}
COM: <s> comparator in order to sort the edges x y </s>
|
funcom_train/3612521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getAffectedFiles() {
final Set result = new HashSet();
final Iterator it = revisions.iterator();
while (it.hasNext()) {
final Revision element = (Revision) it.next();
result.add(element.getFile().getFilenameWithPath());
}
return result;
}
COM: <s> returns a code string code code set code containing all filenames </s>
|
funcom_train/12265499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IPart readPart() throws NoMultipartTypeException, IOException, BufferUnderflowException {
if (!isMultipart()) {
throw new NoMultipartTypeException("body ist not a multipart type " + getHeader().getContentType());
}
initPartHandler(null);
PartParser partParser = bodyDataHandlerAdapterRef.get().partParserRef.get();
if (partParser != null) {
return partParser.readPart();
} else {
throw new BufferUnderflowException();
}
}
COM: <s> read the part of the multipart body </s>
|
funcom_train/27790614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SelectionManager (DataAccess da, XulTree xt) {
_tree = xt;
_dataAccess = da;
_documentSelectionSet = new SelectionSet(new DocumentAccessor());
_principalSelectionSet = new SelectionSet(new PrincipalAccessor());
_categorySelectionSet = new SelectionSet(new XulTreeAccessor());
_documentTypeSelectionSet = new SelectionSet(new DocumentTypeAccessor());
_fieldSelectionSet = new SelectionSet(new FieldAccessor());
}
COM: <s> constructor for creating selection manager from data access and xul tree </s>
|
funcom_train/15452973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
boolean result = false;
//Verify when is not null and is a instace of InternalDocument
if (obj != null && obj instanceof InternalDocument) {
InternalDocument doc = (InternalDocument) obj;
//Verify when both objects have the same path.
result = this.getPath().equals(doc.getPath());
}
return result;
}
COM: <s> specific implementation of equals method </s>
|
funcom_train/8484349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
try {
in.defaultReadObject();
} catch(ArrayStoreException e) {
Logging.Actor_LOG.fatal("Failed to deserialize instance of " + this.getClass(), e);
throw new IOException("Object deserialized as wrong type: " + e.getMessage()
+ ". Did you forget to make a type tag object an isolate?");
}
}
COM: <s> this java serialization hook is overridden merely to provide clearer error messages </s>
|
funcom_train/4312182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItem() {
if (saveItem == null) {
saveItem = new JMenuItem();
saveItem.setText("Save ALL");
saveItem.setHorizontalAlignment(SwingConstants.LEFT);
saveItem.setHorizontalTextPosition(SwingConstants.LEFT);
saveItem.setPreferredSize(new Dimension(119, 19));
saveItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, Event.CTRL_MASK, false));
saveItem.addActionListener(this);
}
return saveItem;
}
COM: <s> this method initializes j menu item </s>
|
funcom_train/48382072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJRefreshViewMenuItem() {
if (jRefreshViewMenuItem == null) {
jRefreshViewMenuItem = new JMenuItem();
jRefreshViewMenuItem.setText("Refresh View");
jRefreshViewMenuItem
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
refresh();
}
});
}
return jRefreshViewMenuItem;
}
COM: <s> this method initializes j refresh view menu item </s>
|
funcom_train/33773988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getObjectsHeads(S3Bucket bucket, S3Object[] objects) {
String[] objectKeys = new String[objects.length];
for (int i = 0; i < objects.length; i++) {
objectKeys[i] = objects[i].getKey();
}
return getObjectsHeads(bucket, objectKeys);
}
COM: <s> retrieves details but no data about multiple objects from a bucket and sends </s>
|
funcom_train/19209114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matches(String stringPattern){
boolean accepted= true;
if(!inclusions.isEmpty()){
accepted= false;
for(Iterator iter= inclusions.values().iterator(); iter.hasNext();){
final Pattern pattern= (Pattern)iter.next();
if(pattern.matcher(stringPattern).matches()){
accepted= true;
break;
}
}
}
if(accepted){
for(Iterator iter= exclusions.values().iterator(); iter.hasNext();){
final Pattern pattern= (Pattern)iter.next();
if(pattern.matcher(stringPattern).matches()){
accepted= false;
break;
}
}
}
return accepted;
}
COM: <s> main pattern matching method </s>
|
funcom_train/18074129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void log(int severity, String message, Throwable throwable) {
if (message == null) message = throwable.getMessage();
if (message == null) message = "No message";
System.out.println(message);
if (throwable != null) {
throwable.printStackTrace();
}
Status status = new Status(severity, pluginId, IStatus.OK, message, throwable);
if (plugin != null) {
plugin.getLog().log(status);
}
}
COM: <s> logs some message </s>
|
funcom_train/5437130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void attachType(PacketAnalysisDescriptor root, int type, int offset) {
String description = "Type: " + FrameType.getFrameType(type) + " (0x" +
Integer.toHexString(type).toUpperCase() + ")";
PacketAnalysisDescriptor descriptor =
new PacketAnalysisDescriptor(description, offset, offset+1);
root.addChild(descriptor);
}
COM: <s> adds the type descriptor to the root </s>
|
funcom_train/15927576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void selectFirstMatch() {
Object selectedElement= fTreeViewer.testFindItem(fInitiallySelectedType);
TreeItem element;
final Tree tree= fTreeViewer.getTree();
if (selectedElement instanceof TreeItem)
element= findElement(new TreeItem[] { (TreeItem)selectedElement });
else
element= findElement(tree.getItems());
if (element != null) {
tree.setSelection(element);
tree.showItem(element);
} else
fTreeViewer.setSelection(StructuredSelection.EMPTY);
}
COM: <s> selects the first element in the tree which </s>
|
funcom_train/13913805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProxymaHttpHeader getHeader(String headerName) {
ProxymaHttpHeader retVal = null;
Object value = this.headers.get(headerName.toLowerCase().trim());
if (value instanceof ProxymaHttpHeader)
retVal = (ProxymaHttpHeader)value;
else if (value instanceof LinkedList)
retVal = (ProxymaHttpHeader)((LinkedList)value).getFirst();
return retVal;
}
COM: <s> returns the specified response http header </s>
|
funcom_train/14654401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean existsXySeries(String name) {
int xySeriesCollectionSeriesCount = xySeriesCollection.getSeriesCount();
for (int index = 0; index < xySeriesCollectionSeriesCount; index++) {
if (xySeriesCollection.getSeries(index).getName().equals(name))
return true;
}
return false;
}
COM: <s> exists a xy series with name </s>
|
funcom_train/31426198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IAction getViewAction(String id) {
// Keep a cache, rather than creating a new action each time,
// so that image caching in ActionContributionItem works.
IAction action = (IAction) viewActions.get(id);
if (action == null) {
IViewRegistry reg = PlatformUI.getWorkbench().getViewRegistry();
IViewDescriptor desc = reg.find(id);
if (desc != null) {
action = new ShowViewAction(window, desc);
action.setActionDefinitionId(id);
viewActions.put(id, action);
}
}
return action;
}
COM: <s> returns the action for the given view id or null if not found </s>
|
funcom_train/27719882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReshapeRel() {
System.out.println("testReshapeRel");
customizer.reshapeRel(10, 15, -5, 5);
pane.doLayout();
Rectangle bounds = customizer.getBounds();
assertEquals(10, bounds.x);
assertEquals(10, bounds.y);
assertEquals(20, bounds.width);
assertEquals(10, bounds.height);
}
COM: <s> test of reshape rel method of class puce </s>
|
funcom_train/18136454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectionHandler(MarqueeSelectionHandler selectionHandler) {
JGraph selectedGraph = controller.getSelectedGraph();
if(this.selectionHandler != null && selectedGraph != null){
selectedGraph.removeMouseListener(this.selectionHandler);
selectedGraph.removeMouseMotionListener(this.selectionHandler);
}
this.selectionHandler = selectionHandler;
if (selectedGraph != null) {
selectedGraph.setCursor(selectionHandler.getCursor());
selectedGraph.addMouseListener(selectionHandler);
selectedGraph.addMouseMotionListener(selectionHandler);
}
}
COM: <s> method for setting the selection mode </s>
|
funcom_train/12553879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getDialogSize() {
Dimension size = null;
for(IGComponent c : this.components) {
Dimension cSize = c.getDialogSize();
if(cSize != null) {
if(size == null) {
size = cSize;
} else {
size = new Dimension(Math.max(size.width, cSize.width), Math.max(size.height, cSize.height));
}
}
}
return size;
}
COM: <s> check input hierarchy for a requested dialog size </s>
|
funcom_train/14354059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getTopPanel() {
if (topPanel == null) {
GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
jLable = new JLabel();
jLable.setText("Users");
topPanel = new JPanel();
topPanel.setLayout(new GridBagLayout());
topPanel.setPreferredSize(new Dimension(220, 30));
topPanel.add(jLable, gridBagConstraints);
}
return topPanel;
}
COM: <s> this method initializes top panel </s>
|
funcom_train/42180632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColor(Integer color) {
if (color != this.color
|| (color != null && !color.equals(this.color))) {
Integer oldColor = this.color;
this.color = color;
firePropertyChange("color", oldColor, color);
repaint();
}
}
COM: <s> sets the color displayed by this button </s>
|
funcom_train/18098622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean handlePointerDragged( int x, int y ) {
// translate the coordinates to the origin of this custom-item:
if ( !isInContentArea(x, y) ) {
// the content area has not been affected, so return false:
return false;
}
x -= this.contentX;
y -= this.contentY;
this.isEventHandled = false;
pointerDragged( x, y );
return (this.isEventHandled || isInitialized());
}
COM: <s> handles the dragging movement of a pointer </s>
|
funcom_train/14615310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeObject(ObjectOutputStream stream) throws IOException {
ObjectOutputStream.PutField fields = stream.putFields();
if( text == null ) {
fields.put("textValue", null);
} else {
fields.put("textValue", new String( text ));
}
stream.writeFields();
}
COM: <s> for serialization write this object as a string </s>
|
funcom_train/236219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ManagerResponse absoluteTimeout(String channel, int timeout) {
log.fine("absoluteTimeout(" + channel + "," + timeout + ")");
ManagerAction action = new ManagerAction("AbsoluteTimeout");
action.addPair("Channel", channel);
action.addPair("Timeout", "" + timeout);
ManagerResponse response = send(action);
log.fine("absoluteTimeout() response:\n" + response);
return response;
}
COM: <s> hangup a channel after a certain time </s>
|
funcom_train/2955201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRotation(int rotation) {
int newOrientation;
// Set new orientation
newOrientation = rotation % maxOrientation;
// Check new position
if (!isAttached()) {
orientation = newOrientation;
} else if (canMoveTo(xPos, yPos, newOrientation)) {
paint(Figure.EMPTY);
orientation = newOrientation;
paint(color);
board.update();
}
}
COM: <s> sets the figure rotation orientation </s>
|
funcom_train/12562173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkInfoArraySize() {
if ((mcount+pitch < minfo.length) || (mcount >= minfo.length)) {
RunningMIDletSuiteInfo[] n =
new RunningMIDletSuiteInfo[mcount+pitch];
System.arraycopy(minfo, 0, n, 0, mcount);
minfo = n;
}
}
COM: <s> ensures that info array has enough capacity </s>
|
funcom_train/37443949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processExceptions() throws Exception {
if (getRequest().getParameter("addIgnorableExceptionButton") != null) {
addIgnorableException(new InvalidArgumentException(UtilMessages.getResourceBundleName(),
UtilMessages.MSG_INTEGER_INVALID, new Object [] {"d12"}));
}
handleCatch();
handleThrown();
}
COM: <s> handles non nested exceptions </s>
|
funcom_train/14241128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection findFigsForMember(Object member) {
Collection figs = new ArrayList();
Iterator it = getDiagrams().iterator();
while(it.hasNext()) {
ArgoDiagram diagram = (ArgoDiagram)it.next();
Fig fig = diagram.getContainingFig(member);
if (fig != null) {
figs.add(fig);
}
}
return figs;
}
COM: <s> finds all figs on the diagrams for some project member including the </s>
|
funcom_train/39407141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*
* public void createPrice() { try {
* customerSaleManager.createPrice(this.currentCustomerSale,
* this.userConfig); } catch (Exception e1) { //Log Error logger.error(e1);
* JOptionPane.showMessageDialog(this, e1.toString(),
* "Price Creation Error", JOptionPane.ERROR_MESSAGE); } }
COM: <s> print a price for current customer order </s>
|
funcom_train/5624632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PyObject lookup(String name) {
PyObject[] mro = this.mro;
if (mro == null) {
return null;
}
for (PyObject element : mro) {
PyObject dict = element.fastGetDict();
if (dict != null) {
PyObject obj = dict.__finditem__(name);
if (obj != null)
return obj;
}
}
return null;
}
COM: <s> internal lookup for name through mro objects dicts </s>
|
funcom_train/21984578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int findByCriteriaCount(Criterion... criterion) {
int count = 0;
Criteria crit = getSession().createCriteria(getPersistentClass());
for (Criterion c : criterion) {
crit.add(c);
}
crit.setProjection(Projections.rowCount());
count = (Integer) crit.uniqueResult();
crit.setProjection(null);
return count;
}
COM: <s> calculate count of results returned specified query </s>
|
funcom_train/37558540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBackground (Color color) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (color == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (color.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (OS.GetBkColor(handle) == color.handle) return;
OS.SetBkColor (handle, color.handle);
int newBrush = OS.CreateSolidBrush (color.handle);
int oldBrush = OS.SelectObject (handle, newBrush);
OS.DeleteObject (oldBrush);
}
COM: <s> sets the background color </s>
|
funcom_train/46694252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCompareToDifferingMode() {
System.out.println("compareTo");
BasicUserLink o = new BasicUserLink();
o.setRelation("None");
BasicUserLink instance = new BasicUserLink();
instance.setRelation("Artist");
int expResult = -1;
int result = instance.compareTo(o);
assertTrue(result < 0);
}
COM: <s> test of compare to method of class nz </s>
|
funcom_train/11657700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean remove(Map.Entry<String, Object> entry) {
Map.Entry<String, Object> actual = entry(entry.getKey());
if (actual == null) {
return (false);
} else if (!entry.equals(actual)) {
return (false);
} else {
remove(entry.getKey());
return (true);
}
}
COM: <s> p remove the specified key value pair if it exists and return </s>
|
funcom_train/37829694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getQuestLevelWarning(Player player, String questName) {
for (final IQuest quest : quests) {
final QuestInfo questInfo = quest.getQuestInfo(player);
if (questInfo.getName().equals(questName)) {
if (questInfo.getSuggestedMinLevel() > player.getLevel()) {
return "This task may be too dangerous for your level of experience.";
}
}
}
return "";
}
COM: <s> if the quest is too dangerous add a warning </s>
|
funcom_train/13789780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetProperties() {
try {
// Open the package
OPCPackage p = OPCPackage.open(OpenXML4JTestDataSamples.openSampleStream("TestPackageCoreProperiesGetters.docx"));
compareProperties(p);
p.revert();
} catch (OpenXML4JException e) {
logger.log(POILogger.DEBUG, e.getMessage());
throw new RuntimeException(e);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
COM: <s> test package core properties getters </s>
|
funcom_train/37000656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void release() {
if(continuation != null) {
try {
continuation.release();
ctx.releaseManaged();
} catch (InterruptedException e) {
return;
}
ctx = null;
continuation = null;
script = null;
scriptClosure = null;
try {getContext().getWriter().flush();} catch (Exception e) {Util.printStackTrace(e);}
try {getContext().getErrorWriter().flush();} catch (Exception e) {Util.printStackTrace(e);}
}
}
COM: <s> release the continuation </s>
|
funcom_train/49262572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object parseValue(final Class<?> type, final String string) {
Object value = string;
if (type == Boolean.class || type == Boolean.TYPE) {
return Boolean.parseBoolean((String) value);
} else if (type == String[].class) {
return string.split(" *, *"); //$NON-NLS-1$
} else {
return string;
}
}
COM: <s> parses a string to create an object of the right type </s>
|
funcom_train/16525953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void closeAllProjects() {
/*
* get all the currently open BlueJ projects and close them
* just so the student doesn't get cluttered with tons of projects
*/
BProject[] openProjects = bluej.getOpenProjects();
for(int x=0; x<openProjects.length; x++) {
try {
openProjects[x].close();
} catch (ProjectNotOpenException e1) {
e1.printStackTrace();
}
}
}
COM: <s> closes all currently opened projects in blue j </s>
|
funcom_train/41319913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScore(Score score, int position) {
scores.add(position, score);
this.cutToLimit(LIMIT);
/*
* for(int i=9; i>=position; i--){ scores[i] = scores[i-1]; }
* scores[position-1] = score;
*/
}
COM: <s> sets a given score in a certain position </s>
|
funcom_train/26126078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendResponse() {
try {
super.input(InboundFSMSignal.getSendResponseSignal());
} catch (UnhandledConditionException e) {
Logger.e(TAG, "", e);
} catch (InterruptedException e) {
Logger.e(TAG, "", e);
} catch (TransitionActivityException e) {
Logger.e(TAG, "", e);
}
}
COM: <s> called by the fsm itself in order to send a response out </s>
|
funcom_train/8275182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ejbCreate() throws CreateException {
try {
m_statusLoggedOn = LoginStatusUtil.getLocalHome().findByPrimaryKey(new LoginStatusPK(new Integer(LoginStatusBean.LOGGED_ON)));
}
catch(NamingException e) {
throw new CreateException(e.getMessage());
}
catch(FinderException e) {
throw new CreateException(e.getMessage());
}
}
COM: <s> create the session bean </s>
|
funcom_train/32830081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Schema createSchemaForDbUnitDataSet(String schemaName, IDataSet dbUnitDataSet) {
Schema result = new Schema(schemaName);
try {
addTables(dbUnitDataSet, result);
return result;
} catch (DataSetException e) {
throw new UnitilsException("Unable to create data set for db unit data set. Schema name: " + schemaName, e);
}
}
COM: <s> creates a data set schema for the given db unit dataset </s>
|
funcom_train/47105147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveGame(String saveFile) {
if (getLocalPlayer().getIsDead())
return;
TheGame.getInstance().haltDrawing();
try {
FileOutputStream fout = new FileOutputStream(saveFile);
ObjectOutputStream oos = new ObjectOutputStream(fout);
GameWorld.getInstance().save(oos);
getLocalPlayer().save(oos);
oos.close();
} catch (Exception e) {
System.out.println("Problem saving");
}
TheGame.getInstance().resumeDrawing();
}
COM: <s> saves the game </s>
|
funcom_train/47708466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void wipeOldData() {
//Used to do a file count first. This was an unnecessary delay.
//New counter isn't 'pretty' but it is much faster especially with bigger saves.
reset("Clearing Old Data", "Wiping " + worlds.size() + " Saves", 20000);
for (String world : worlds){
File dir = new File(minePath + "\\" + world);
if (dir.exists()){
deleteDir(dir);
}
}
}
COM: <s> deletes the local worlds that will be updated from the archive </s>
|
funcom_train/17850350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean showCalendarSettings(CalendarExportSettings settings) throws IOException, ServiceException {
GoogleSettingsDialog settingsDialog;
Window wnd = CalendarExportPlugin.getInstance().getBestParentFrame();
settingsDialog = new GoogleSettingsDialog(wnd, settings, mPassword);
return settingsDialog.showDialog() == JOptionPane.OK_OPTION;
}
COM: <s> show the settings dialog for the exporter </s>
|
funcom_train/18321901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getStateMachines() {
List sms = new LinkedList();
for (Iterator i = outgoingAssociations.iterator(); i.hasNext();) {
Association association = (Association) i.next();
if (association.getTarget() instanceof StateMachine) {
sms.add(association.getTarget());
}
}
return sms;
}
COM: <s> returns all associated state machines </s>
|
funcom_train/49608998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getSelectedFacilities() throws Throwable {
EntityManager em = null;
try {
String uname = request.getParameter("username");
em = EntityManagerProvider.getInstance().getEntityManager();
List res = BusinessObjectsFacade.getInstance().getEnabledFacilitiesBO().getSelectedFacilities(username, em, uname);
ExtUtils.sendList(res,this);
}
catch (Throwable ex) {
ExtUtils.sendErrorResponse(ex.getMessage(), response);
throw ex;
}
finally {
if (em!=null)
EntityManagerProvider.getInstance().releaseEntityManager(em);
}
}
COM: <s> return a list of enabled facilities objects encoded in json format </s>
|
funcom_train/8296496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Muscle createmuscle(NamedNodeMap nodeMap) {
Mass start = (Mass) myMassMap.get(getAttrString(nodeMap, "a"));
Mass end = (Mass) myMassMap.get(getAttrString(nodeMap, "b"));
double restlength = getAttrDouble(nodeMap, "restlength");
double amplitude = getAttrDouble(nodeMap, "amplitude");
double phase = getAttrDouble(nodeMap, "phase");
return new Muscle(start, end, restlength, amplitude, phase);
}
COM: <s> creates a muscle from data must only call after my mass map </s>
|
funcom_train/28153620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object findNotMarkedElement(Set<Object> marked, Scene scene) {
for (JProgramDeclaration element : scene.getPrograms()) {
if (!marked.contains(element)) {
marked.add(element);
return element;
}
}
for (DynJAlloyModule element : scene.getModules()) {
if (!marked.contains(element)) {
marked.add(element);
return element;
}
}
for (JField element : scene.getFields()) {
if (!marked.contains(element)) {
marked.add(element);
return element;
}
}
return null;
}
COM: <s> obtain next element to analyze </s>
|
funcom_train/3340385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireContentsChanged(Object source_, int index0_, int index1_) {
if (_listeners == null)
return;
ListDataEvent event = new ListDataEvent(this,
ListDataEvent.CONTENTS_CHANGED, index0_, index1_);
for (Iterator<ListDataListener> iter = _listeners.iterator(); iter.hasNext(); ) {
ListDataListener l = (ListDataListener) iter.next();
l.contentsChanged(event);
}
}
COM: <s> subclasses of abstract list model must call this method b after b the </s>
|
funcom_train/43882226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String text(Object value) {
if (value instanceof String[]) {
String[] values = (String[]) value;
StringBuffer sb = new StringBuffer();
for (int i = 0; i < values.length; i++) {
sb.append(values[i] + " ");
}
sb.setLength(sb.length() - 1);
return sb.toString();
}
return super.text(value);
}
COM: <s> overide text to unwap the array of strings back into a space </s>
|
funcom_train/22442602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open() {
if (path == null)
return;
// use default sink == System.err
try {
File file = new File(path);
if (!file.exists())
new File(file.getParent()).mkdirs();
this.sink = new FileWriter(path);
} catch (IOException ex) {
System.err.print("Unable to open log file: "+path+"! ");
System.err.println(" Using stderr as the default.");
this.sink = defaultSink;
}
}
COM: <s> open the log will create the log file and all the parent directories </s>
|
funcom_train/18742518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addListener(SimulatorListener listener, Change... changes) {
if (changes.length == 0) {
changes = EnumSet.allOf(Change.class).toArray(new Change[0]);
}
for (Change change : changes) {
List<SimulatorListener> listeners = this.listeners.get(change);
if (!listeners.contains(listener)) {
listeners.add(listener);
}
}
}
COM: <s> adds a given simulation listener to the list </s>
|
funcom_train/34339655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getCodProducto3() {
if (CodProducto3 == null) {//GEN-END:|46-getter|0|46-preInit
// write pre-init user code here
CodProducto3 = new TextField("C\u00F3digo Producto3:", null, 8, TextField.ANY);//GEN-LINE:|46-getter|1|46-postInit
// write post-init user code here
}//GEN-BEGIN:|46-getter|2|
return CodProducto3;
}
COM: <s> returns an initiliazed instance of cod producto3 component </s>
|
funcom_train/28146067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void persist(GameOptions go) {
try {
openPropertyFileForWritting();
} catch (IOException e) {
_logger.warn("Couldn't create user perferences file", e);
return;
}
setProperty(BID_TYPE, go.getBidType().toString());
setProperty(GAME_SPEED, go.getGameSpeed().toString());
closePropertyFile();
}
COM: <s> document the persist method </s>
|
funcom_train/43556919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int setArrivalTime() {
Collection mediators = null;
try {
mediators = getTransportMediators();
CollectionUtils.forAllDo(mediators, new ExceptionalClosure() {
protected void basicExecute(final Object o) throws Exception {
((TransactionMediator) o).setArrivalTime();
}
});
} finally {
if (null != mediators) {
releaseTransportMediators(mediators);
}
}
return 0;
}
COM: <s> used to set the arrival time of the transactional scope </s>
|
funcom_train/20885153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLongXML() {
LongDTO dto = new LongDTO();
dto.longField = new Long(92837);
assertTrue(JSefaTestUtil.serialize(XML, dto).indexOf("92837") >= 0);
JSefaTestUtil.assertRepeatedRoundTripSucceeds(XML, dto);
}
COM: <s> tests long xml </s>
|
funcom_train/18320509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void performRequest(Request req) {
if (!processDirectEdit(req)) {
for (EditPolicyIterator i = getEditPolicyIterator(); i.hasNext(); ) {
EditPolicy ep = i.next();
if (ep instanceof PerformRequestEditPolicy) {
((PerformRequestEditPolicy)ep).performRequest(req);
}
}
}
}
COM: <s> direct edit support and arbitrary requests support </s>
|
funcom_train/5245063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Constraint p) {
constraints.add(p);
PredicateIndicator pi = p.getDeed().getPredicateIndicator();
List<Constraint> lc = relConstraints.get(pi);
if (lc != null) {
lc.add(p);
} else {
lc = new ArrayList<Constraint>();
lc.add(p);
relConstraints.put(pi, lc);
}
}
COM: <s> add a constraint to the library </s>
|
funcom_train/33814809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getNovoFuncionarioMenuItem() {
if (novoFuncionarioMenuItem == null) {
novoFuncionarioMenuItem = new JMenuItem();
novoFuncionarioMenuItem.setText("Novo Funcionário");
novoFuncionarioMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
FrmCadastroFuncionario frm = new FrmCadastroFuncionario();
frm.setVisible(true);
}
});
}
return novoFuncionarioMenuItem;
}
COM: <s> this method initializes novo funcionario menu item </s>
|
funcom_train/50119983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object lookup_object_by_id(String _id) {
Object o = driver.query_object_by_id(_id);
if(o == null) return null;
if(((basic) o).query_location().equals(query_id()))
return o;
else
return null;
}
COM: <s> this method returns a pointer to an object </s>
|
funcom_train/36828009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Coords getMoveCoords(int col) {
// check in what row the highest piece in that column is in
for (int k = this.numRows - 1; k >= 0; k--) {
if (this.board[k][col] == -1) {
return this.pixelCoords[k][col];
}
}
// if we get to this point, no move is made
return null;
}
COM: <s> helper method that returns the pixel coords of a move given the column </s>
|
funcom_train/46759996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OrderInstanceMedModel getOrderInstanceMed(final long orderInstanceMedId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return OrderData.getOrderInstanceMed(orderInstanceMedId, chain, call);
}}; return (OrderInstanceMedModel) call(method, call);
}
COM: <s> same transaction return the single order instance med model for the primary key </s>
|
funcom_train/17463371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void raiseExceptionEvent() {
/*
* Throwable cause = this.getCause(); if (cause != null && cause
* instanceof BaseException) return; ApplicationContext
* applicationContext = ApplicationContextHolder
* .getApplicationContext(); ExceptionEvent event = new
* ExceptionEvent(this, ExceptionEvent.APP_EXCEPTION, new Object());
* applicationContext.publishEvent(event);
*/
}
COM: <s> raise the exception event </s>
|
funcom_train/38866161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toLocalString(String tz) {
Locale alocale = Locale.getDefault();
DateFormat df= DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG,alocale);
df.setTimeZone(TimeZone.getTimeZone(tz));
return df.format(this.getTime());
}
COM: <s> convert the time to a long formated string in local time </s>
|
funcom_train/34589620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void highlight(String server) {
int i = globalServers.indexOf(server);
int j = localServers.indexOf(server);
if (i >= 0) table.getRowFormatter().addStyleName(globalRow(i), "highlight");
if (j >= 0) table.getRowFormatter().addStyleName(localRow(j), "highlight");
}
COM: <s> highlight the row corresponding to a particular server </s>
|
funcom_train/25469450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean readSize() {
initialize(false);
if (!initialized) {
if (cachedSize != -1 && !hasQueuedOperations()) {
return true;
}
else {
throwLazyInitializationExceptionIfNotConnected();
CollectionEntry entry = session.getPersistenceContext()
.getCollectionEntry(this);
CollectionPersister persister = entry.getLoadedPersister();
if (persister.isExtraLazy()) {
if (hasQueuedOperations()) {
session.flush();
}
cachedSize = persister.getSize(entry.getLoadedKey(),
session);
return true;
}
}
}
read();
return false;
}
COM: <s> called by the tt size tt method </s>
|
funcom_train/49318341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void canvasToScreenCoords(Point2D.Double p, boolean isDistance) {
PlanarImage displayImage = _imageDisplay.getDisplayImage();
if (!isDistance && displayImage != null) {
p.x += displayImage.getMinX();
p.y += displayImage.getMinY();
}
}
COM: <s> convert the given canvas coordinates to screen coordinates </s>
|
funcom_train/9893133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void navigateTop() {
if (backwardStack.size()==0 ||
!backwardStack.peek().equals(helpEditor.getPage())) {
backwardStack.push(helpEditor.getPage());
navigationCallback.navigateBackwardStateChanged(true);
}
try {
helpEditor.setPage(topUrl);
} catch (IOException e) {
log.error("error",e);
}
forwardStack.clear();
navigationCallback.navigateForwardStateChanged(false);
}
COM: <s> go back to where the user started from </s>
|
funcom_train/4853623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getObjectLabels () {
Enumeration enum = enumerateObjectLabels ();
StringBuffer buf = new StringBuffer ();
while (enum.hasMoreElements ()) {
if (buf.length() > 0)
buf.append (' ');
buf.append ((String)enum.nextElement());
}
return buf.toString();
}
COM: <s> get a string containing the labels of the region </s>
|
funcom_train/35838477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUserName(String sUserName) {
if (sUserName.equals(this.sUserName))
return;
String oldValue = setUserNameLocal(sUserName);
// call UserService to update the db
/*
IUserService us = Model.getUserService();
us.setUserName(oSession, sId, oldValue, sUserName);
*/
}
COM: <s> sets the user name currently in the local data only </s>
|
funcom_train/15676847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Shape3D clip(Box3D box) {
if (x < box.getMinX() || x > box.getMaxX())
return null;
if (y < box.getMinY() || y > box.getMaxY())
return null;
if (z < box.getMinZ() || z > box.getMaxZ())
return null;
return this;
}
COM: <s> returns the clipped point or null if empty </s>
|
funcom_train/50148966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GenericElement getOutputRepresentation(Container c) {
Span sp=new Span();
int i=c.getComponentCount();
for(int j=0;j<i;j++) {
Component comp=c.getComponent(j);
BasicWWWComponentUI ui=(BasicWWWComponentUI)comp.getUI();
GenericElement el=ui.render(comp);
sp.addElement(el);
}
return sp;
}
COM: <s> returns an representation of the supplied container formated according to the </s>
|
funcom_train/50912357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPointGroupMultiplicity(Point3 point, double eps) {
int operatorCount = 0;
CMLElements<CMLTransform3> transforms = this.getTransform3Elements();
for (CMLTransform3 tr : transforms) {
Point3 newPoint = tr.transform(point);
if (newPoint.isEqualTo(point, eps)) {
operatorCount++;
}
}
return operatorCount;
}
COM: <s> gets count of operations which transform point into itself </s>
|