__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/24642233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RmeConditional removeLiteralFromBody(Literal literal){
List<Literal> body = new ArrayList<Literal>(this.getBody());
body.remove(literal);
try{
return new RmeConditional(this.getHead(),body,this.getProbability(),(VariableFactory)this.getVariables().clone());
}catch(InvalidLanguageExpressionException e){
// this should not happen
throw new RuntimeException("This should not happen: new conditional has different language than original conditional.");
}
}
COM: <s> removes the given literal from this conditionals body and returns the new conditional </s>
|
funcom_train/5379983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getClientArea(Composite c) {
Rectangle rect = c.getClientArea();
rect.x = rect.x + marginWidth;
rect.y = rect.y + marginHeight;
rect.width = rect.width - 2 * marginWidth;
rect.height = rect.height - 2 * marginHeight;
return rect;
}
COM: <s> returns the client area for the given composite according to this layout </s>
|
funcom_train/20245348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTotalDistance(double totalDistance) {
if (totalDistanceTF != null) {
Format f = new DecimalFormat("#0.000\"");
String totalDistanceText = f.format(new Double(totalDistance));
if (SwingUtilities.isEventDispatchThread()) {
totalDistanceTF.setText(totalDistanceText);
} else {
final String finalText = totalDistanceText;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
totalDistanceTF.setText(finalText);
}
});
}
}
}
COM: <s> set the total distance </s>
|
funcom_train/1240279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TypeMappingRegistry getTypeMappingRegistry() throws ConfigurationException {
if (tmr != null)
return tmr;
if (defaultConfiguration != null)
return defaultConfiguration.getTypeMappingRegistry();
// No default config, but we need a TypeMappingRegistry...
// (perhaps the TMRs could just be chained?)
tmr = new TypeMappingRegistryImpl();
return tmr;
}
COM: <s> get our type mapping registry </s>
|
funcom_train/25833754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setPositionAndScale(Object obj, PositionAndScale newPosAndScale, PointInfo touchPoint) {
currTouchPoints.set(touchPoint);
x = newPosAndScale.getXOff();
y = newPosAndScale.getYOff();
scale = newPosAndScale.getScale();
angle = newPosAndScale.getAngle();
invalidate();
return true;
}
COM: <s> set the position and scale of the dragged stretched image </s>
|
funcom_train/9280385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws IOException {
if (lobReader != null) {
lobReader.close();
// above call also will close the
// stream under it.
} else {
if (lobLimitIn != null) {
lobLimitIn.close();
// above close call , will also
// close the lobInputStream
} else {
if (lobInputStream != null)
lobInputStream.close();
}
}
}
COM: <s> close all the resources realated to the lob file </s>
|
funcom_train/26064624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyFrom(Object src) {
for (Field dstField : this.getColumnFieldsWithoutID()) {
try {
Field srcField = src.getClass().getField(dstField.getName());
dstField.set(this, srcField.get(src));
} catch (SecurityException e) {
} catch (NoSuchFieldException e) {
} catch (IllegalArgumentException e) {
} catch (IllegalAccessException e) {
}
}
}
COM: <s> copies values of fields from src to current object </s>
|
funcom_train/45231278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initDefaults() throws JSONException {
put("function_name", "");
put("input_arguments", new InputArgumentArray());
put("output_arguments", new OutputArgumentArray());
put("return_code", - 1);
put("reason_code", - 1);
put("request_id", - 1);
}
COM: <s> init some output fields with defaults </s>
|
funcom_train/16358357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String unixTimeToString(long unix) {
String time = null;
// Check for the output format
if (duration) { // A duration is waiting
double unixWithNewReference = (double) (unix - reference);
double conv = (double) unitMs[unit];
double d = unixWithNewReference / conv ;
time = Double.toString(d);
} else { // A date is waiting
Date d = new Date(unix);
time = sdf.format(d);
}
return time;
}
COM: <s> p align justify convert unix time duration in ms since 1st january 1970 </s>
|
funcom_train/1975578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected OFXServer loadOFXServer() throws ServletException {
String serverClassname = getServletConfig().getInitParameter("ofx-server-class");
if (serverClassname == null) {
throw new ServletException("Missing init parameter: ofx-server-class");
}
try {
return (OFXServer) Class.forName(serverClassname).newInstance();
}
catch (Exception e) {
throw new ServletException(e);
}
}
COM: <s> load the ofx server instance that is to be used for this servlet </s>
|
funcom_train/44466123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toggleEnabled(final String dirName) {
//cat.debug("Toggling directory : " + dirName);
RandomMediaDirectory dir = manager.getDirectory(dirName);
assert dir!=null : "Toggling nexist dir " + dirName;
manager.toggleDirectory(dir);
clearCache();
notifyListeners();
}
COM: <s> toggles the enabled state of the named random media directory </s>
|
funcom_train/21954304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void messagesRemoved(MessageCountEvent e) {
//getFolderStatusBar().messagesRemoved(e);
Runnable updateAdapter = new Runnable() {
public void run() {
Pooka.getMainPanel().refreshActiveMenus();
}
};
if (SwingUtilities.isEventDispatchThread())
updateAdapter.run();
else
SwingUtilities.invokeLater(updateAdapter);
}
COM: <s> called in response to a messages removed event </s>
|
funcom_train/16763139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Geometry removeSkinGeometry(String geoName) {
if (skins == null) return null;
int childCount = skins.getQuantity();
Geometry g;
validateSkins();
for (int i = 0; i < childCount; i++)
if (getSkin(i).getName().equals(geoName))
return removeSkinGeometry(i);
return null;
}
COM: <s> detaches the named skin mesh from the skin node removing the associated </s>
|
funcom_train/50084867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPredictedRaw(double[][] predicted) {
this.predvalraw = new double[predicted.length][this.noutput];
for (int i = 0; i < predicted.length; i++) {
for (int j = 0; j < this.noutput; j++) {
this.predvalraw[i][j] = predicted[i][j];
}
}
}
COM: <s> get the raw probabilities of the classification result </s>
|
funcom_train/39313797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
BufferedImage im = Parent.center.getBufferedImage();
int x = (this.getWidth() - im.getWidth())/2;
int y = (this.getHeight() - im.getHeight())/2;
Graphics2D g2d = (Graphics2D)g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.drawImage(im,x,y,im.getWidth(),im.getHeight(),null);
im.flush();
}
COM: <s> paints the image </s>
|
funcom_train/51792369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEnable(int index) {
if (items == null) return;
if (index < 0 || index > items.size() - 1) {
throw new IndexOutOfBoundsException(
"Index of item out of range: " + index);
}
((MenuItem)items.elementAt(index)).disable = false;
GameLogic.frameManager.repaint();
}
COM: <s> set enable specified menus item </s>
|
funcom_train/40438781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTableModelService(TableModelServiceAsync tableModelService) {
this.tableModelService = tableModelService;
this.updateTableColumns(new AsyncCallback() {
public void onFailure(Throwable caught) {
AdvancedTable.this.showStatus(
"Can not get table columns from the server.",
STATUS_ERROR);
}
public void onSuccess(Object result) {
AdvancedTable.this.updateTableData();
}
});
}
COM: <s> sets a table model for this table updates its columns and rows </s>
|
funcom_train/2664625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean objectTreeTabIsSelected() {
boolean result = false;
ISession session = _treePanel.getSession();
if (session != null) {
SessionPanel sessionPanel = session.getSessionSheet();
if (sessionPanel != null) {
result = sessionPanel.isObjectTreeTabSelected();
}
}
return result;
}
COM: <s> returns true if the object tree tab is selected </s>
|
funcom_train/9055102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchAllSafetyStopEntries() {
return mDb.query(SAFETY_DATABASE_TABLE, new String[] {KEY_SAFETY_ROWID,
KEY_SAFETY_TABLEID,
KEY_SAFETY_DEPTH,
KEY_SAFETY_NITROLEVEL,
KEY_SAFETY_REQUIRED_SAFETY_STOP_TIME}, null, null, null, null, null);
}
COM: <s> return a cursor over the list of all safety entries in the database </s>
|
funcom_train/9818739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WireList getAtomicWires() {
WireList ret_list = new WireList();
if (isAtomic())
ret_list.add(this);
else
for (int i=value_array.length - 1; i >= 0; i--)
ret_list.add(getAtomicWire(i));
return ret_list;
}
COM: <s> this blasts a wire into its atomic constituents </s>
|
funcom_train/11105843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TokenProcessor getTokenProcessor(FacesContext context) {
TokenProcessor tp = (TokenProcessor) context.getExternalContext().
getApplicationMap().get(ShaleConstants.TOKEN_PROCESSOR);
if (tp == null) {
tp = new TokenProcessor();
context.getExternalContext().
getApplicationMap().put(ShaleConstants.TOKEN_PROCESSOR, tp);
}
return tp;
}
COM: <s> p retrieve the </s>
|
funcom_train/22782571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addImage(BufferedImage image, ImageQuality quality) {
// get index within internal list
int index = quality.ordinal();
// create new soft reference
images[index] = new SoftReference<BufferedImage>(image);
// removed stored images with "weaker" quality
for (int i = index + 1; i < images.length; i++) {
images[i] = null;
}
}
COM: <s> add a new image with the given quality to this store </s>
|
funcom_train/21799402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getNextToken(String line, int fromIndex) {
int n = line.length();
n = getNextTokenIndex(n, line.indexOf(BLOCKSTART, fromIndex));
n = getNextTokenIndex(n, line.indexOf(COLON, fromIndex));
n = getNextTokenIndex(n, line.indexOf(COMMA, fromIndex));
return line.substring(fromIndex, n).trim();
}
COM: <s> find the part of the line from offset to something else begins </s>
|
funcom_train/18662004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateDescription() {
Object userObject = pictureViewerController.getCurrentNode().getUserObject();
if ( userObject != null ) {
if ( userObject instanceof PictureInfo ) {
LOGGER.fine( "Sending description update to " + descriptionJTextField.getText() );
( (PictureInfo) userObject ).setDescription(
descriptionJTextField.getText() );
}
}
}
COM: <s> this method sends the text of the textbox to the pictureinfo </s>
|
funcom_train/40675740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writePreparedYamlFile(String yamlName, String yamlString) throws IOException {
File f = new File(GenerationDirectory.getGenerationDirectory(stageDir), yamlName + ".yaml");
if (yamlString != null && f.createNewFile()) {
FileWriter fw = new FileWriter(f);
fw.write(yamlString);
fw.close();
}
}
COM: <s> write yaml file to generation subdirectory within stage directory </s>
|
funcom_train/34810999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String convertToBED(Interval[] intervals){
int num = intervals.length;
StringBuffer b = new StringBuffer();
for (int i=0; i< num; i++){
b.append(chromosomePrefix);
b.append(intervals[i].getChromosome());
b.append("\t");
b.append(intervals[i].getStart1stOligo());
b.append("\t");
int end = intervals[i].getStartLastOligo()+intervals[i].getSizeOfOligoMinusOne();
b.append(end);
b.append("\n");
}
return b.toString();
}
COM: <s> converts an array of interval to a </s>
|
funcom_train/7275971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadFinished(int revision) {
if(LOG.isDebugEnabled())
LOG.debug("Finished loading revision: " + revision);
// Various cleanup & persisting...
trim();
fileManagerController.loadFinished();
save();
fileManagerController.loadFinishedPostSave();
dispatchFileEvent(new FileManagerEvent(this, Type.FILEMANAGER_LOADED));
}
COM: <s> kicks off necessary stuff for loading being done </s>
|
funcom_train/3313228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PrintService showPrintDialog( HashPrintRequestAttributeSet attribs ){
// return if no printers are available
if((allPrinters == null)||(allPrinters.length == 0)){
JOptionPane.showMessageDialog(panel.getParent(),lang.get("ppnoprinters"),
lang.get("error"),JOptionPane.ERROR_MESSAGE);
return null;
}
// else let the user make his choice
PrintService service = null;
service = ServiceUI.printDialog
(null,200,200,allPrinters,defaultPrinter,
DocFlavor.SERVICE_FORMATTED.PRINTABLE,attribs);
return service;
}
COM: <s> this lets the user choose a printer by the service ui interface </s>
|
funcom_train/7894788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void move(double x, double y) {
Rect r = shape.getBounds();
int newX = Math.max((int) x, 0);
int newY = Math.max((int) y, 0);
r.offsetTo(newX, newY);
shape.setBounds(r);
componentBounds.offsetTo((int) (newX / Editor.DisplayScale), (int) (newY / Editor.DisplayScale));
}
COM: <s> move the node origin </s>
|
funcom_train/29954513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetComment() {
System.out.println("getComment");
SimuParamObject instance = new SimuParamObject(el);
String expResult = "Short run";
String result = instance.getComment();
System.out.println(result);
assertEquals(expResult, result);
}
COM: <s> test of get comment method of class hbm </s>
|
funcom_train/5078222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActiveTool(ToolEntry newMode) {
if (newMode == null)
newMode = getPaletteRoot().getDefaultEntry();
if (activeEntry != null)
getToolEntryEditPart(activeEntry).setToolSelected(false);
activeEntry = newMode;
if (activeEntry != null) {
ToolEntryEditPart editpart = getToolEntryEditPart(activeEntry);
editpart.setToolSelected(true);
}
fireModeChanged();
}
COM: <s> sets the active entry for this palette </s>
|
funcom_train/21530470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel getJLabel1() {
if (jLabel1 == null) {
jLabel1 = new JLabel();
jLabel1.setBounds(91, 7, 82, 15);
jLabel1.setText("Username");
jLabel1.setFont(new java.awt.Font("Arial", 1, 10));
jLabel1.setHorizontalAlignment(SwingConstants.RIGHT);
}
return jLabel1;
}
COM: <s> this method initializes j label1 </s>
|
funcom_train/17003167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadUdpCommunicationType() {
//load communication channel
Properties properties = new Properties();
localPort = getRandomPortNumber();
properties.put("UDPListenerPort", Integer.toString(localPort));
try {
transportHandler.loadCommunicationsOfType(properties, "udp");
} catch (TransportException transEx) {
System.out.println(transEx);
}
}
COM: <s> loads the udp communication type to transport handler </s>
|
funcom_train/12775190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CAstNode visit(FieldAccess n, WalkContext context) {
CAstNode targetNode = visitNode(n.getExpression(), context);
return createFieldAccess(targetNode, n.getName().getIdentifier(), n.resolveFieldBinding(), n, context);
}
COM: <s> process a field access </s>
|
funcom_train/29021611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkIfObservational(List<FormulaVariable> vars) throws IllegalFormulaException {
int count = 0;
FormulaVariable temp = null;
for (FormulaVariable var : vars) {
if (var.getDataset().isObs()) {
count++;
temp = var;
}
}
if (count > 1 || (count == 1 && vars.size() > 1))
throw new IllegalFormulaException("Observational variable is not supported (" + temp.getAliasedName() + ").");
}
COM: <s> check if any variable is from an observational dataset for constructing a </s>
|
funcom_train/33352851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DSScriptBuilder sceneObjectColor(String objectName, DSDelayRateTime drt, Color color, String opacity) {
body.append(String.format("\tScene \"%s\" Color %s %s %s %s %s \n", objectName, drt,
DSColor.getRedPct(color), DSColor.getGreenPct(color), DSColor.getBluePct(color), opacity));
return this;
}
COM: <s> scene object color object br br </s>
|
funcom_train/48406621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addConnectedPortPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_WorkProductPortConnector_connectedPort_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_WorkProductPortConnector_connectedPort_feature", "_UI_WorkProductPortConnector_type"),
SpemxtcompletePackage.eINSTANCE.getWorkProductPortConnector_ConnectedPort(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the connected port feature </s>
|
funcom_train/38732334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Context createContext(String ctx) {
Context context;
//SessionId
String sessionId = securityManager.getSessionIdFromThread(Thread.currentThread());
if(sessionId==null) sessionId = securityManager.createGuestSessionId("127.0.0.1");
String userId= securityManager.getUserId(sessionId);
if(userId==null) userId = "anonymous";
context = new Context(ctx);
context.setSessionId(sessionId);
context.setUserId(userId);
Environment.getContextManager().addContext(context);
return context;
}
COM: <s> creates a new context </s>
|
funcom_train/45256505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void readView(IConfigurationElement element) {
try {
viewRegistry.add(new ViewDescriptor(element));
} catch (CoreException e) {
// log an error since its not safe to open a dialog here
WorkbenchPlugin.log(
"Unable to create view descriptor.", e.getStatus());//$NON-NLS-1$
}
}
COM: <s> reads the view element </s>
|
funcom_train/51338499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test01() {
Throwable t1 = null;
try {
ex1();
} catch (Throwable t) {
t1 = t;
}
Throwable t2 = null;
try {
ex2();
} catch (Throwable t) {
t2 = t;
}
throw new ClientException("test", Arrays.asList(new Throwable[] { t1,
t2 }));
}
COM: <s> this test throws an exception which should print out two causes </s>
|
funcom_train/7308760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(BitOutputStream os) throws IOException {
os.writeRawULong(sampleNumber, SEEKPOINT_SAMPLE_NUMBER_LEN);
os.writeRawULong(streamOffset, SEEKPOINT_STREAM_OFFSET_LEN);
os.writeRawUInt(frameSamples, SEEKPOINT_FRAME_SAMPLES_LEN);
}
COM: <s> write out an individual seek point </s>
|
funcom_train/3369707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShowsRootHandles(boolean newValue) {
boolean oldValue = showsRootHandles;
TreeModel model = getModel();
showsRootHandles = newValue;
showsRootHandlesSet = true;
firePropertyChange(SHOWS_ROOT_HANDLES_PROPERTY, oldValue,
showsRootHandles);
if (accessibleContext != null) {
((AccessibleJTree)accessibleContext).fireVisibleDataPropertyChange();
}
invalidate();
}
COM: <s> sets the value of the code shows root handles code property </s>
|
funcom_train/33588946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveSettings(String lastUpdate) {
// save last update nfo
SharedPreferences prefs = this.getSharedPreferences(Defs.PREFS_NAME, 0);
SharedPreferences.Editor editor = prefs.edit();
editor.putString(Defs.PREFS_KEY_LASTUPDATE, lastUpdate);
String theDate = DateFormat.format("yyyyMMdd", Calendar.getInstance()).toString();
editor.putString(Defs.PREFS_KEY_LASTUPDATE_TIME, theDate);
editor.commit();
}
COM: <s> save activity defaults settings </s>
|
funcom_train/31682888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void putRequestEntity(byte[] value) throws WebDAVException {
connection.setDoOutput(true);
try {
BufferedOutputStream outputStream = new BufferedOutputStream(connection.getOutputStream());
outputStream.write(value, 0, value.length);
outputStream.flush();
} catch (WebDAVException exc) {
throw exc;
} catch (java.io.IOException exc) {
throw new WebDAVException(WebDAVStatus.SC_INTERNAL_SERVER_ERROR, "IO Error");
}
}
COM: <s> write the request entity body to the web davurlconnection </s>
|
funcom_train/1653600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDoubleArray() {
SimpleFieldSet methodSFS = new SimpleFieldSet(true);
String keyPrefix = "foo";
for (int i = 0; i<15; i++)
methodSFS.putAppend(keyPrefix,String.valueOf((double)i));
double[] result = methodSFS.getDoubleArray(keyPrefix);
for (int i = 0; i<15; i++)
assertTrue(result[i]== ((double)i));
}
COM: <s> tests the get double array string method </s>
|
funcom_train/22010112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void Add(Monad pM) throws NoReferenceMatchException {
if (!this.isReferenceMatch(pM)) {
throw new NoReferenceMatchException(this, "Can't add when frames don't match.", pM);
}
double[] temp = pM.getCoeff();
for(int i=1; i<getLinearDimension()+1; i++) {
this.Coeff[i] = temp[i] + this.Coeff[i];
}
}
COM: <s> monad addition this p m </s>
|
funcom_train/16627516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String section, String command, String tooltip,ActionListener n, Icon icon) {
int i, N;
for (i = 0, N = _tb.size(); i < N && !_tb.get(i).name().equals(section); i++);
if (i != N) {
_tb.get(i).add(command, tooltip, n, icon);
}
}
COM: <s> adds a given command tooltip and actionlistener to section </s>
|
funcom_train/46187977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String addIpAddress(Response response, String list) {
if (list == null || list.trim().length() == 0) {
return response.getIpAddress();
} else if (!isListed(response, list)) {
return list + "," + response.getIpAddress();
} else {
return list;
}
}
COM: <s> adds the ip address of the specified response to the given list </s>
|
funcom_train/28424513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
if ( !open )
return ;
try {
x.java.lang.System.out().flush();
x.java.lang.System.err().flush();
System.setOut( systemOut );
System.setErr( systemErr );
if ( fileHandler != null ) {
fileHandler.close();
}
}
catch ( Exception ignored ) {}
open = false;
}
COM: <s> closes this logger </s>
|
funcom_train/8406076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection values() {
DynaProperty[] properties = getDynaProperties();
List values = new ArrayList(properties.length);
for (int i = 0; i < properties.length; i++) {
String key = properties[i].getName();
Object value = getDynaBean().get(key);
values.add(value);
}
return Collections.unmodifiableList(values);
}
COM: <s> returns the set of property values in the </s>
|
funcom_train/23678439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPrimaryKeyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Table_primaryKey_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Table_primaryKey_feature", "_UI_Table_type"),
MetadataPackage.Literals.TABLE__PRIMARY_KEY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the primary key feature </s>
|
funcom_train/7507083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Rule searchForRule(Map map, Set roles, Class clazz, String action) {
// Check for exact match - ignore any ending slash
Rule rule = (Rule) map.get(clazz);
if( ( rule != null ) && ( overlap(rule.actions, action) ) && ( overlap(rule.roles, roles) )){
return rule;
}
return null;
}
COM: <s> search for rule </s>
|
funcom_train/8569020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double diffSense(State type) {
double value = sense(cy, cx, type);
value += .25 * sense(cy + 1, cx, type);
value += .25 * sense(cy, cx + 1, type);
value += .25 * sense(cy - 1, cx, type);
value += .25 * sense(cy, cx - 1, type);
return value;
}
COM: <s> hackish diffusion sensing of a spot </s>
|
funcom_train/17596271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getXFrom(MoveDirection direction, int currentXCoordinate) {
switch (direction) {
case North : return currentXCoordinate;
case NorthEast : return currentXCoordinate + 1;
case East : return currentXCoordinate + 1;
case SouthEast : return currentXCoordinate + 1;
case South : return currentXCoordinate;
case SouthWest : return currentXCoordinate - 1;
case West : return currentXCoordinate - 1;
case NorthWest : return currentXCoordinate - 1;
default : throw new RuntimeException("Cannot calculate the x coordinate from " + direction);
}
}
COM: <s> gets the new x position given the current x coord and the direction </s>
|
funcom_train/9911832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigDecimal getBigDecimal() throws ConfigurationException {
if (value==null) throw new ConfigurationException("Property value is null", ErrorCodes.CON_1001);
try {
return new BigDecimal(value.toString());
} catch (NumberFormatException e){
throw new ConfigurationException("Property value cannot be converted to BigDecimal", e, ErrorCodes.CON_1003);
}
}
COM: <s> return big decimal from the configuration property </s>
|
funcom_train/17017245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCache() throws Exception {
ProxyUgiManager.saveToCache(root1Ugi);
UnixUserGroupInformation ugi = ProxyUgiManager.getUgiForUser(root1Ugi
.getUserName());
assertEquals(root1Ugi, ugi);
ProxyUgiManager.saveToCache(root2Ugi);
ugi = ProxyUgiManager.getUgiForUser(root2Ugi.getUserName());
assertEquals(root2Ugi, ugi);
}
COM: <s> test caching functionality </s>
|
funcom_train/4124912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int useQuantity(int usedQuantity) {
if (quantity >= usedQuantity) {
quantity -= usedQuantity;
} else if (quantity == -1) {
logger.warning("useQuantity called for unlimited resource");
} else {
// Shouldn't generally happen. Do something more drastic here?
logger.severe("Insufficient quantity in " + this);
quantity = 0;
}
return quantity;
}
COM: <s> reduces the value code quantity code </s>
|
funcom_train/22000406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean containsQuote(List quotes, EODQuote quote) {
for (Iterator iterator = quotes.iterator(); iterator.hasNext();) {
EODQuote containedQuote = (EODQuote) iterator.next();
if (containedQuote.getSymbol().equals(quote.getSymbol())
&& containedQuote.getTradingDate()
.equals(quote.getTradingDate()))
return true;
}
return false;
}
COM: <s> searches the list of quotes for the given quote </s>
|
funcom_train/4253513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPort()
{ String port=(new Parser(value)).skipString().getString();
int i=port.indexOf('/');
if (i<0) return Integer.parseInt(port); else return Integer.parseInt(port.substring(0,i));
}
COM: <s> gets the media port </s>
|
funcom_train/43416391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test
public void testTruncateEscapeA2AtEndStartsAtWord2_1() {
byte[] data = { (byte) 0x34, (byte) 0xd1, (byte) 0x44, (byte) 0xa6,
(byte) 0x84, (byte) 0x05 };
Memory mem = new DefaultMemory(data);
int length = 4;
assertEquals("hall", decoder.decode2Zscii(mem, 0, length).toString());
}
COM: <s> escape a6 starts at position 1 of the last word </s>
|
funcom_train/49469628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addOrLookupSystemAccount(String ipAddress, String userName, String userId, String fullUserName) throws Exception {
return addOrLookupSystemAccount(ipAddress, userName, userId, fullUserName, null, null, null);
}
COM: <s> wrapper of add or lookup system account with all null flags </s>
|
funcom_train/10532756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReconfiguredProperty() {
assertNotNull(_outerControl);
InnerControlBean innercontrol=_outerControl.getDeclaredNestedControl2();
assertNotNull(innercontrol);
assertEquals("Bob",innercontrol.getNameFromContext());
assertEquals("farmer",innercontrol.getJobFromContext());
}
COM: <s> tests reconfigured property </s>
|
funcom_train/39037081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void collectData(final Repair repair) {
unreliableSize += repair.getUnreliableNodes().size();
final Map<Node, NodeValue> valueNodes = repair.getValueNodes();
for (Node node : valueNodes.keySet()) {
if (repair.isNewValue(node)) {
newValueSize++;
} else {
valueChangesSize++;
}
}
}
COM: <s> collect data for statistics from repair </s>
|
funcom_train/48090026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String read() throws ConnectionException {
StringBuffer result = new StringBuffer();
try {
Thread.sleep(1000);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
while (reader.ready()) {
result.append((char) reader.read());
}
} catch (IOException e) {
throw new ConnectionException("Read failed.", e);
}
LOG.debug("Reading: " + result.toString());
return result.toString();
}
COM: <s> read data from socket </s>
|
funcom_train/6329096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasNext() {
if (!valid) {
throw new ConcurrentModificationException("iterator has been persisted and reloaded; see javadoc on FullTreeMapImpl");
}
if (knownMod != owner._org_ozoneDB_getModification())
throw new ConcurrentModificationException();
return !next.equals(max);
}
COM: <s> returns true if the iterator has more elements </s>
|
funcom_train/15719671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object obj1, Object obj2) {
if (!(obj1 instanceof String) || !(obj2 instanceof String)) {
return 0;
}
String str1 = (String) obj1;
String str2 = (String) obj2;
str1 = str1.toLowerCase();
str2 = str2.toLowerCase();
return str1.compareTo(str2); // Compare lower-case Strings.
}
COM: <s> compares two strings for alphabetically ordering </s>
|
funcom_train/49318636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setURL(URL url) {
_origURL = url;
String s = url.getProtocol();
if (s.equals("file")) {
setFilename(url.getFile());
} else if (s.equals("http")) {
downloadImageToTempFile(url);
} else {
DialogUtil.error("Unsupported URL syntax: " + s);
}
}
COM: <s> set the url for the image to display </s>
|
funcom_train/20350130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfRecordedThreads() {
Set<InstanceId<Thread>> s = new HashSet<InstanceId<Thread>>();
for (ConcurrentMap<InstanceId<Thread>, ThreadRecordings> recordingsPerId : recordingsMap.values()) {
for (ThreadRecordings recordings : recordingsPerId.values())
s.add(recordings.getThreadId());
}
return s.size();
}
COM: <s> returns the number of threads that have registered a recordings </s>
|
funcom_train/18099828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean matches( String filterText, ChoiceItem cItem, boolean checkForSelectedRadioItem ) {
if (checkForSelectedRadioItem && cItem.isSelected) {
return true;
} else if (this.filterMode == FILTER_STARTS_WITH) {
return ( cItem.getText().toLowerCase().startsWith(filterText));
} else {
return ( cItem.getText().toLowerCase().indexOf( filterText ) != -1);
}
}
COM: <s> checks if the given item matches the current input text </s>
|
funcom_train/46695966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetOutputType() {
System.out.println("getOutputType");
PropertyToLink instance = new PropertyToLink();
List<IODescriptor> expResult = null;
List<IODescriptor> result = instance.getOutputType();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get output type method of class property to link </s>
|
funcom_train/36637668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showExceptionDialog(Exception e) {
String str = "The following exception was thrown: " + e.toString() + ".\n\n" + "Would you like to see the stack trace?";
int choice = JOptionPane.showConfirmDialog(this, str, "Exception Thrown", JOptionPane.YES_NO_OPTION);
if (choice == JOptionPane.YES_OPTION) {
e.printStackTrace();
}
}
COM: <s> displays an exception in a window </s>
|
funcom_train/21439035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fromXML(Node w_node, boolean merge) throws Exception {
resetStatus();
// set glycan document
Node gd_node = XMLUtils.findChild(w_node,"Structures");
if( gd_node!=null )
theStructures.fromXML(gd_node,merge);
}
COM: <s> parse an element of a dom document containing the configuration </s>
|
funcom_train/3881857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element addElementUndoable(Object source, Element parentElement, Element childElement, boolean doSelect) {
Element newElement = addElement(source, parentElement, childElement, doSelect);
// Get Undoable Action after adding
if(_undoHandler != null && newElement != null) {
UndoableAddAction addAction = new UndoableAddAction(parentElement, newElement);
_undoHandler.addUndoableAction(addAction);
}
return newElement;
}
COM: <s> just add a new element that can be undone </s>
|
funcom_train/19309320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected RegisteredFontDesc getDefaultFreeStandingFont() {
if (this.defaultFreeStandingFont != null) {
return this.defaultFreeStandingFont;
}
this.defaultFreeStandingFont = getDefaultFont(true);
if (this.defaultFreeStandingFont == null) {
getLogger().error("A free-standing font has been requested, "
+ "but none have been registered.");
}
return this.defaultFreeStandingFont;
}
COM: <s> returns the fallback free standing font when no other font can be used </s>
|
funcom_train/49105358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createControllerObject(String baseClassname) {
String classname = ScriptJavacUtilFunc.createScriptingClassname(getId());
String javacode = CoreScriptUtilFunc.parseCMLTag(getScripts(), classname, baseClassname);
try {
anController = (AbstractAnnotateController)MemoryJavaCompiler.javac(
CoreScriptUtilFunc.CMLControllerPackageName+classname, javacode);
} catch (Exception e) {
IpssLogger.logErr(e);
}
}
COM: <s> compile the java code and create the controller object </s>
|
funcom_train/38808550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_TCM__OrgJdomElement_getParent() throws JHuPeDOMException {
final Attribute attribute = jhupeDomFactory.newAttribute("test",
"value");
assertNull("attribute returned parent when there was none",
attribute.getParent());
final Element element = jhupeDomFactory.newElement("element");
element.setAttribute(attribute);
assertNotNull("no parent element found", attribute.getParent());
assertEquals("invalid parent element", attribute.getParent(), element);
}
COM: <s> check that the attribute can return the correct parent element </s>
|
funcom_train/7989473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SensorData makeTestSensorData2() throws Exception {
return new SensorData(Tstamp.makeTimestamp("2009-07-28T09:15:00.000-10:00"), "FooTool",
makeTestSource1().toUri(server), new Property(SensorData.POWER_CONSUMED, "11000"));
}
COM: <s> creates a sensor data for use in testing 2 in a series </s>
|
funcom_train/47311764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updated() {
// for (TreeColumn column : tree.getColumns() ) {
// column.();
//// column.pack();
// }
// tree.layout(true, true);
// tree.pack();
// tree.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
// if (null != section) {
// section.pack();
// }
// if (null != managedForm) {
//// managedForm.getForm().pack();
// }
}
COM: <s> end borrowed property sheet material </s>
|
funcom_train/1589644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(ReadableInterval interval) {
if (interval == null) {
return containsNow();
}
long otherStart = interval.getStartMillis();
long otherEnd = interval.getEndMillis();
long thisStart = getStartMillis();
long thisEnd = getEndMillis();
return (thisStart <= otherStart && otherStart < thisEnd && otherEnd <= thisEnd);
}
COM: <s> does this time interval contain the specified time interval </s>
|
funcom_train/19595994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean sendRgbFrame(byte addr, PImage data) {
data.loadPixels();
int[] img = data.pixels;
data.updatePixels();
int[] resizedImage =
RainbowduinoHelper.resizeImage(img, NR_OF_LED_HORIZONTAL, NR_OF_LED_VERTICAL, data.width, data.height);
return sendFrame(addr, RainbowduinoHelper.convertRgbToRainbowduino(resizedImage));
}
COM: <s> send a pimage to a rainbowduino device </s>
|
funcom_train/34676959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRequired() {
if (getLocalFormat()==null) {
new CoreProxy().logInfo("Attribute: "+id+" has no defined format");
return false;
}
String required=getFormatOption("required");
if (required==null || required.length()==0 || "yes".equalsIgnoreCase(required)) {
return true;
}
return false;
}
COM: <s> return true if the attribute is required i </s>
|
funcom_train/9993417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void collapseRow(String id) {
Element rowElem = DOM.getElementById(addIdPrefix(id));
// set this row's state to "close" to make this row invisisble
setRowState(id, BaseTreeTableRow.STATE_CLOSE);
if (rowElem == null)
return;
// hide all the kids of this row
skipAllChildren(rowElem, true);
}
COM: <s> collapse a row </s>
|
funcom_train/16146507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final InsnList insns) {
if (insns.size == 0) {
return;
}
size += insns.size;
if (last == null) {
first = insns.first;
last = insns.last;
} else {
AbstractInsnNode elem = insns.first;
last.next = elem;
elem.prev = last;
last = insns.last;
}
cache = null;
insns.removeAll(false);
}
COM: <s> adds the given instructions to the end of this list </s>
|
funcom_train/7510762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTable getJTableData() {
if (jTableData == null) {
jTableData = this.getTableDataImpl();
jTableData.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
getDialogAdapter().save();
}
}
});
jTableData.setName("data"); //$NON-NLS-1$
}
return jTableData;
}
COM: <s> this method initializes j table data </s>
|
funcom_train/5865303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkUserError() throws WrongValueException {
if (_errmsg != null)
throw showCustomError(new WrongValueException(this, _errmsg));
//Note: we still throw exception to abort the exec flow
//It's client's job NOT to show the error box!
//(client checks z.srvald to decide whether to open error box)
if (!_valided && _constr != null)
setText(coerceToString(_value));
}
COM: <s> checks whether user entered a wrong value and not correct it yet </s>
|
funcom_train/14070552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendHouse() {
if (sender != null) {
new Thread(new Runnable() {
public void run() {
House house = Server.getServer().getConfig().getHouse();
HouseEvent msg = new HouseEvent();
msg.setType(HouseEvent.Type.HOUSE_UPDATE);
msg.setPayload(house);
sender.send(msg);
}
}).start();
}
}
COM: <s> construct and broadcast a house configuration </s>
|
funcom_train/4348129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JsonArray toJsonArray(JsonArray names) {
if (names == null || names.length() == 0) {
return null;
}
JsonArray ja = new JsonArray();
for (int i = 0; i < names.length(); i += 1) {
ja.put(this.opt(names.getString(i)));
}
return ja;
}
COM: <s> produce a json array containing the values of the members of this </s>
|
funcom_train/11011307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkPopup(MouseEvent e) {
if (e.isPopupTrigger()) {
int tab = sheetPane.getUI().tabForCoordinate(sheetPane, e.getX(), e.getY());
if (tab != -1) {
popup.show(sheetPane, e.getX(), e.getY());
}
}
}
COM: <s> this method will display the popup if the mouseevent is a popup event </s>
|
funcom_train/8107560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JFMFarmDataTSAv getAverage(int startYr,int endYr){
JFMFarmDataTSAv yearAvFarm = null;
boolean isFirst=true;
// ArrayList<JFMFarmData> inyears=new ArrayList<JFMFarmData>();
for ( int y=startYr;y<=endYr;y++){
if ( years.containsKey(y)){
if ( isFirst ){
yearAvFarm=new JFMFarmDataTSAv(years.get(y));
isFirst=false;
} else {
yearAvFarm.increment(years.get(y));
}
}
}
return yearAvFarm;
}
COM: <s> create a jfmfarm data tsav object holding all the data across the </s>
|
funcom_train/14606066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerTask(Project parent, Task task) {
if (task.getId() == null && _idGen != null) {
task.setId(_idGen.getNewId());
}
parent.addTask(task);
_taskCache.put(task.getId(), task);
fireWorkspaceChanged(new WorkspaceEvent(
WorkspaceEvent.WORKSPACE_TASK_ADDED));
}
COM: <s> sets an automatically generated task id if it has not been specified </s>
|
funcom_train/33606871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(VisometryMouseEvent<Point3D> e) {
vis.stopRotation();
pressedAt = e.getWindowPoint();
pressedAt3D = vis.getProj().getCoordinateOf(pressedAt);
mode = MouseEvent.getModifiersExText(e.getModifiersEx());
oldProj = (SpaceProjection) vis.getProj().clone();
}
COM: <s> when the mouse is pressed prepare for resizing or panning </s>
|
funcom_train/7624673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatchResume() {
mCurState = RESUMED;
if (mSingleMode) {
if (mResumed != null) {
moveToState(mResumed, RESUMED);
}
} else {
final int N = mActivityArray.size();
for (int i=0; i<N; i++) {
moveToState(mActivityArray.get(i), RESUMED);
}
}
}
COM: <s> called by the container activity in its </s>
|
funcom_train/9805804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EdifPortRef getAttachedPortRef(EdifCellInstance cell, EdifPort port) {
Iterator i = getConnectedPortRefs().iterator();
while (i.hasNext()) {
EdifPortRef epr = (EdifPortRef) i.next();
if (epr.getCellInstance() == cell && epr.getPort() == port)
return epr;
}
return null;
}
COM: <s> return the edif port ref on this edif net that references the given </s>
|
funcom_train/43525807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double pnorm(double d) {
double ret = 0;
double t = 1 / (1 + 0.2316419 * d);
// 1/sqrt(2*pi) == 0.389423
ret = 1 - 0.389423 * Math.exp(-d * d / 2)
* ((((1.330274429 * t - 1.821255978) * t + 1.781477937) * t
- 0.356563782) * t + 0.319381530);
return ret;
}
COM: <s> see abramowitz m </s>
|
funcom_train/4563180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendRedirect(HttpRequest request, HttpResponse response, String uri) {
try {
response.setHeader(HTTP.CONTENT_TYPE, "text/html; charset=" + charset);
response.setEntity(new StringEntity(
"<html><meta http-equiv=\"refresh\" content=\"0;url="
+ uri + "\"></html>", "UTF-8"));
} catch (UnsupportedEncodingException e) {
throw new UnauthorizedException();
}
}
COM: <s> redirect for login action </s>
|
funcom_train/43664046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBPackagesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BModel_bPackages_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BModel_bPackages_feature", "_UI_BModel_type"),
XmdlboPackage.Literals.BMODEL__BPACKAGES,
true,
false,
false,
null,
getString("_UI_BusinessModelPropertyCategory"),
null));
}
COM: <s> this adds a property descriptor for the bpackages feature </s>
|
funcom_train/9186666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Name append(Name n) {
int len = getByteLength();
byte[] bs = new byte[len + n.getByteLength()];
getBytes(bs, 0);
n.getBytes(bs, len);
return table.fromUtf(bs, 0, bs.length);
}
COM: <s> return the concatenation of this name and name n </s>
|
funcom_train/3080920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSelectedIndex() {
Object selectedItem = getSelectedItem();
if (selectedItem == null) {
// should not occur.
return -1;
}
int size = model.size();
for (int index = 0; index < size; ++index) {
if (model.get(index).equals(selectedItem)) {
return index;
}
}
// should not occur.
return -1;
}
COM: <s> returns the index of the currently selected item </s>
|
funcom_train/50481620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NsSet select(String sql, NsSet set) throws SQLException {
String setPointer;
if(this.handle == null) {
this.handle = this.gethandle(this.poolname);
}
setPointer = this._select(this.handle,sql,set.getPointer());
if (setPointer.length() > 0) {
return new NsSet(setPointer);
} else {
return null;
}
}
COM: <s> method which performs select operation </s>
|
funcom_train/23632065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertString(int offset, String str, AttributeSet attr) throws BadLocationException {
if (str == null) return;
if ((getLength() + str.length()) <= limit) {
if (toUppercase) str = str.toUpperCase();
super.insertString(offset, str, attr);
}
}
COM: <s> inserts the string to an already made string </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.