__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/50579161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doStartTag() throws JspTagException {
HttpServletRequest request = (HttpServletRequest) getPageContext().getRequest();
boolean isServlet = ((environmentService.isPortlet() == false) || (request.getAttribute("javax.portlet.request") == null));
if (isServlet) {
return EVAL_BODY_INCLUDE;
} else {
//portlet
return SKIP_BODY;
}
}
COM: <s> method called at start of tag </s>
|
funcom_train/40441066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Context getInitialContext() throws NamingException {
final Hashtable<String, String> env = new Hashtable<String, String>();
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
return new InitialContext(env);
}
COM: <s> utility method for creating and returning a naming context for looking </s>
|
funcom_train/40856164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Query getRangeQuery(QParser parser, SchemaField sf, Date part1, Date part2, boolean minInclusive, boolean maxInclusive) {
return new TermRangeQuery(
sf.getName(),
part1 == null ? null : toInternal(part1),
part2 == null ? null : toInternal(part2),
minInclusive, maxInclusive);
}
COM: <s> date field specific range query </s>
|
funcom_train/41482999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean prolog(String methodId, Object[] inputArgs) {
// Acquire the right to update internal structures
acquireUpdate();
// Register the current couple (thread,object) to the runtime
GaloisRuntime.registerObject(this);
// Grab the ownership (this method may raise conflicts)
boolean ret = acquireOwnership();
// Release the update lock
releaseUpdate();
return ret;
}
COM: <s> prolog implementation for object ownership register acquire ownership </s>
|
funcom_train/32161829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ctrlPERIOD() {
Point p=wordAtCaret();
if(p.x>=p.y) {
searchTarget=null;
return;
}
String txt=getText().toLowerCase();
String wrd=txt.substring(p.x,p.y);
if(searchTarget==null || wrd.indexOf(searchTarget)<0) {
searchTarget=wrd;
}
else {
wrd=searchTarget;
}
int i=txt.indexOf(wrd, p.y);
if(i<0) i=txt.indexOf(wrd);
setCaretPosition(i);
}
COM: <s> search next word under cursor </s>
|
funcom_train/44887814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IExpression parseExpression() throws ParseException {
Token token = this.getNextToken();
AST ast = token.dispatchParsingTo(this);
if (ast == null || !ast.isExpression())
throw new ParseException("Expression expected.");
if (ast.isAtom())
return this.parsePrimary((IAtom) ast);
return (IExpression) ast;
}
COM: <s> parse an expression </s>
|
funcom_train/26206353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte getProperty(final String key, byte defaultValue) {
final Object value = get(key);
if (value != null) {
if (value instanceof String) {
defaultValue = Byte.parseByte((String) value);
} else if (value instanceof Byte) {
defaultValue = ((Byte) value).byteValue();
}
}
return defaultValue;
}
COM: <s> return the byte value for the given code key code </s>
|
funcom_train/17689352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GnuPlotContext set(String variable, String value) {
Preconditions.checkNotNull(variable, "variable");
if (value == null) {
value = "";
}
vars.add(new SimpleImmutableEntry<String, String>(variable, value));
return this;
}
COM: <s> adds an entry of the given variable to a value </s>
|
funcom_train/45250997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void layoutTopControl(Control control) {
GridData data = new GridData(GridData.FILL_BOTH);
int availableRows = DialogUtil.availableRows(control.getParent());
//Only give a height hint if the dialog is going to be too small
if (availableRows > 50) {
data.heightHint = SIZING_LISTS_HEIGHT;
} else {
data.heightHint = availableRows * 3;
}
control.setLayoutData(data);
}
COM: <s> layout for the given control </s>
|
funcom_train/49866216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void returnConnection(Connection connection) {
synchronized (pool) {
MultithreadedConnection jc = pool.get(connection.toString());
if (jc != null) {
try {
connection.createStatement();
if (connection.isClosed()) {
throw new SQLException();
}
jc.setIsInUse(false);
} catch (Exception e) {
try {
connection.close();
} catch (SQLException e1) {
}
pool.remove(jc);
}
this.jcc.decreaseConnectionsInUse();
}
}
}
COM: <s> method that return connection back to the pool </s>
|
funcom_train/10788222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PurchaseOrder deliver(PurchaseOrder o) {
if (o.isDelivered())
return o;
EntityManager em = begin();
o = em.merge(o);
for (LineItem item : o.getItems()) {
item.getBook().getInventory().decrement(item.getQuantity());
}
o.setDelivered();
commit();
return o;
}
COM: <s> a name deliver </s>
|
funcom_train/32198189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object accessAttributeFromMBean(ObjectName nodeAgent, MBeanServer server) throws DiagnoseException {
Object result = null;
try {
result = server.getAttribute(nodeAgent, this.getAttribute());
} catch (Exception e1) {
throw new DiagnoseException("Unable to access attribute [" + this.getAttribute() + "] from ["+nodeAgent+"]", e1);
}
return result;
}
COM: <s> access the attribute of the mbean using the mbean server </s>
|
funcom_train/17269315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsFormatted2() {
System.out.println("isFormatted");
StyledEditorImpl instance = new StyledEditorImpl(testEAM,desktopManager);
instance.getTextComponent().setContentType("text/txt");
boolean expResult = false;
boolean result = instance.isFormatted();
assertEquals(expResult, result);
}
COM: <s> t c se 6 1 </s>
|
funcom_train/34128508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isModelChanged() {
boolean result = false;
UndoableEdit undo = editToBeUndone();
// see if the last undoable edit was a significant text edit???
if ( undo != syncMark && (undo instanceof UndoableDesignerEdit)&& !(undo instanceof UndoablePluginEditAbstact)) {
result = true;
} else if ( syncMark instanceof UndoableDesignerEdit && undo == null) {
result = true;
}
if (DEBUG) System.out.println( "ChangeManager.isModelChanged() ["+result+"]");
return result;
}
COM: <s> check to see if the last undo item was a significant model change </s>
|
funcom_train/19142474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Group getMethodGroupByName(String name) {
for (Iterator iter = methodGroups.iterator(); iter.hasNext();) {
Group group = (Group) iter.next();
if (StringUtils.equalsIgnoreCase(name, group.getName())) {
return group;
}
}
return null;
}
COM: <s> returns a given method group by name </s>
|
funcom_train/34339752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTelefono1() {
if (Telefono1 == null) {//GEN-END:|27-getter|0|27-preInit
// write pre-init user code here
Telefono1 = new TextField("Telefono1", null, 9, TextField.NUMERIC);//GEN-LINE:|27-getter|1|27-postInit
// write post-init user code here
}//GEN-BEGIN:|27-getter|2|
return Telefono1;
}
COM: <s> returns an initiliazed instance of telefono1 component </s>
|
funcom_train/46573916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readInfo(Reader fr) {
try {
BufferedReader br = new BufferedReader(fr);
ServerGui.lt.setText("");
String zeile;
while ( (zeile = br.readLine() ) != null) {
ServerGui.lt.append(zeile+"\n");
}
}
catch (Exception e) {
System.out.println(e);
}
}
COM: <s> reads the information from a selected file and write it into the </s>
|
funcom_train/34888182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getLocationFileNameType(String locationElement) {
String fileNameType = xmlParseUtils.getAttributeValueFromGrandChildNode(
aProcessorNode,
XmultraConfig.LOCATIONS_ELEMENT,
locationElement,
XmultraConfig.FILE_NAME_TYPE_ATTR);
if ( fileNameType == null || fileNameType.equals("") ) {
fileNameType = XmultraConfig.SOURCE_NAME_VALUE;
}
return fileNameType;
}
COM: <s> gets the file name type attribute of a location element </s>
|
funcom_train/48601043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProgressValue(String text) {
progress.setIndeterminate(false);
progress.setMaximum(MainFrame.PROGRESS_MAX + 1);
progress.setValue(progress.getValue() + 1);
progress.setStringPainted(true);
progress.setString(LocalMessage.get("message:" + text));
}
COM: <s> increases value of progress bar and displays a message </s>
|
funcom_train/28208929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(Composite parent) {
container = new Composite(parent, SWT.NONE);
container.setLayout(new FillLayout());
//label = new Label(container, SWT.NONE);
DBExplorerView explorerView = (DBExplorerView) findView(DBExplorerView.class.getName());
if (explorerView == null) {
synchronizeView((INode) null);
return;
}
synchronizeView(explorerView);
}
COM: <s> this is a callback that will allow us to create the viewer and </s>
|
funcom_train/40699477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Comment getCommentFromKey(final String commentKey) {
final String commentSerial = LocalDbService.getPersistent(commentKey);
if (commentSerial == null) {
return null;
}
final JsoComment jsoComment =
(JsoComment) JSONParser.parse(commentSerial).isObject().getJavaScriptObject();
return jsoComment.getComment();
}
COM: <s> get comment by key </s>
|
funcom_train/326270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSquareDrawnPolygon(int x1, int y1, int x2, int y2) {
int[] xp = {x1, x1, x2, x2};
int[] yp = {y1, y2, y2, y1};
drawnPolygon = new Polygon(xp, yp, 4);
}
COM: <s> called to set a square drawn polygon when </s>
|
funcom_train/14615518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFactory( CompileableFactory cFactory ) {
Map<String, CompileableFactory> cNewTemplates = (Map<String, CompileableFactory>)((HashMap<String, CompileableFactory>)m_cTemplates).clone();
String aName = cFactory.getName();
// For thread-safety, we clone the old map before adding the
// new template.
cNewTemplates.put( aName, cFactory );
m_cTemplates = cNewTemplates;
}
COM: <s> adds a prototype template to the registry </s>
|
funcom_train/40359991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddedPropertyValues() throws Exception {
Document filter = createFilter(false, "foo", CLEAN_STRING, EXTRA_STRING);
Map<String, List<Value>> expectedProps = createProperties();
expectedProps.put("foo", expectedProps.get(PROP4));
checkDocument(filter, expectedProps);
}
COM: <s> test added property should return all the configured values </s>
|
funcom_train/20073400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MdatAtom cut(long skip) {
try {
in.skipBytes((int)skip);
long newSize = dataSize() - skip;
setSize(ATOM_HEADER_SIZE + newSize);
} catch (IOException e) {
throw new AtomError("Unable to cut the mdat atom");
}
return this;
}
COM: <s> cut the mdat atom by skipping the specified number of bytes </s>
|
funcom_train/12153128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createSourcePage() {
try {
sourceEditor = new StructuredTextEditor();
sourcePageIndex = addPage(sourceEditor, getEditorInput());
setPageText(
sourcePageIndex,
Messages.getString("XMLEditorWithHTMLPreview.sourcePageTitle")); //$NON-NLS-1$
} catch (PartInitException e) {
ErrorDialog.openError(
getSite().getShell(),
Messages.getString("XMLEditorWithHTMLPreview.errorCreatingSourcePage"), null, e.getStatus()); //$NON-NLS-1$
}
}
COM: <s> creates page 1 of the multi page source editor which contains a text </s>
|
funcom_train/20828450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocumentNode getDocument(String systemId, String schemaLocation)throws InputException, MalformedURIException{
DocumentNode result = null;
try {
systemId = makeSystemId(systemId);
}
catch(URISyntaxException e) {
throw new MalformedURIException(e.getMessage());
}
result = documents.get(systemId);
if(result == null) {
result = loadDocument(systemId, systemId, schemaLocation);
documents.put(systemId, result);
}
return result;
}
COM: <s> method get document </s>
|
funcom_train/26571775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storePieceInfo (Piece p, int i){
this.row[i] = (p.getRow());
this.col[i] = (p.getCol());
this.lastRow[i] = (p.getLastRow());
this.lastCol[i] = (p.getLastCol());
this.moved[i] = (p.getMoved());
}
COM: <s> stores piece information of p at location i </s>
|
funcom_train/3074220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean runRadar(String arg[], String expectedMessage) throws MalformedURLException, IOException, XRadarException {
try {
XRadar.main(arg);
} catch (IllegalArgumentException e) {
//e.printStackTrace();
//System.out.println(e.getMessage().replace(File.separator, "/"));
return e.getMessage().replace(File.separator, "/").equals(expectedMessage);
}
return true;
}
COM: <s> p a handy method to run xradar with a set of argument plus </s>
|
funcom_train/9197213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(final Text text) {
// Overrides Text.append(Text) because this needs to check that CDATA
// rules are enforced. We could have a separate Verifier check for CDATA
// beyond Text and call that alone before super.setText().
if (text == null) {
return;
}
append(text.getText());
}
COM: <s> this will append the content of another code text code node </s>
|
funcom_train/31739356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int gamesWonBy(int pair) {
try {
int c = 0;
for (int i = 0; i < NUM_GAMES; i++)
if (game[pair][i] >= 100)
c++;
return c;
} catch (ArrayIndexOutOfBoundsException x) {
throw new IllegalArgumentException("Please use one of the constants NORTH_SOUTH or EAST_WEST as argument");
}
}
COM: <s> returns the number of games that were won by the given pair </s>
|
funcom_train/11102911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String start() {
if (log.isInfoEnabled()) {
log.info("Starting a wizard dialog programmatically");
}
FacesContext context = FacesContext.getCurrentInstance();
DialogContextManager manager =
DialogHelper.getDialogContextManager(context);
DialogContext dcontext = manager.create(context, "wizard");
dcontext.start(context);
return null;
}
COM: <s> p programmatically start an instance of the wizard dialog </s>
|
funcom_train/36785489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onClose(DisclosureEvent event) {
int height = Window.getClientHeight();
if(mapContainer.isOpen())
{
map.setHeight(String.valueOf(height - ABSOLUTE_HEIGHT));
}
else if(resultContainer.isOpen())
{
result.setHeight(String.valueOf(height - ABSOLUTE_HEIGHT - 10));
}
}
COM: <s> resize the opened window to full height </s>
|
funcom_train/39395244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Icon getIcon(Class<?> type, boolean expanded) {
URL url = getImageURL((Class<? extends TcoObject>)type);
if (url != null) {
try {
return new ImageIcon(url);
} catch (Exception e) {
ch.softenvironment.util.Tracer.getInstance().developerError("image not found for =>" + type);
}
}
return null;
}
COM: <s> returns the appropriate icon for node element </s>
|
funcom_train/123558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set( T value) {
LocalContext ctx = Context.current().inheritedLocalContext;
if (ctx != null) {
FastMap references = ctx._references;
references.put(this, value);
_hasBeenLocallyOverriden = true;
return;
}
// No local context, sets default value.
_defaultValue = value;
}
COM: <s> sets the local value referent for this reference </s>
|
funcom_train/48211947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void editDsType(JDBCDataSourceType dst) {
dataSourceType = dst;
dtm.setRoot(new DefaultMutableTreeNode());
if (dst != null) {
doLoad(dataSourceType.getJdbcJarList());
}
// enabled when a datasource has been selected
addButton.setEnabled(dst != null);
}
COM: <s> switches to edit the given data source type </s>
|
funcom_train/25569501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileConverter (File configFile, File rawTextFile) {
try {
configReader = new BufferedReader(new FileReader(configFile));
rawTextReader = new BufferedReader(new FileReader(rawTextFile));
} catch (FileNotFoundException ex) {
ex.printStackTrace();
System.exit(1);
}
}
COM: <s> creates a file converter object </s>
|
funcom_train/3345756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() throws IOException {
SuperBlock vh = fs.getVolumeHeader();
long offset = vh.getCatalogFile().getExtent(0).getStartOffset(vh.getBlockSize());
fs.getApi().write(offset, this.getBytes());
}
COM: <s> save catalog file to disk </s>
|
funcom_train/4595986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateQueryString(String where, String orderBy) {
final StringBuffer sb = new StringBuffer(256);
sb.append("FROM " + User.class.getName());
if (!Strings.isBlank(where)) {
sb.append(" WHERE "+where);
}
if (!Strings.isBlank(orderBy)) {
sb.append(" ORDER BY "+orderBy);
}
return sb.toString();
}
COM: <s> generate query string </s>
|
funcom_train/13720124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAcceleration(Acceleration mode) throws InterruptedException, IOException {
isActive(true);
try{
// Establish baseline
int val = MathUtilities.hex2int(getSetting(Acceleration.COMMANDCODE));
logger.finest("Old setting: " + val);
setSetting(Acceleration.COMMANDCODE, (val & ~Acceleration.MASK)
| mode.getCode());
}catch(InterruptedException e){
logger.log(Level.SEVERE, "Unable to setAcceleration", e);
throw e;
}catch(IOException e){
logger.log(Level.SEVERE, "Unable to setAcceleration", e);
throw e;
}
}
COM: <s> this command allows the changing of the acceleration on the unit </s>
|
funcom_train/26450653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MemoryReadAddress createMemoryReadAddress() {
MemoryReadAddress mra = new MemoryReadAddress(memory[0]);
mra.set( 0x0000, 0x1fff, MemoryReadAddress.MRA_ROM );
mra.set( 0x2000, 0x3fff, MemoryReadAddress.MRA_RAM );
mra.set( 0x4000, 0x63ff, MemoryReadAddress.MRA_ROM );
return mra;
}
COM: <s> creates the memory map for reading </s>
|
funcom_train/17977495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double Bothers(){
double pro=1;
//System.out.println("Neighbors " + neighbourComponents.size());
for(int i=0; i<neighbors.size(); i++){
ModelObject neighborFrom = neighbors.get(i);
for(int j=i+1; j<neighbors.size(); j++){
ModelObject neighborTo = neighbors.get(j);
pro *= gUtil.squaredRobotDistance(neighborFrom, neighborTo);
}
}
//System.out.println(" B others " + pro);
return correct_NaN(pro);
}
COM: <s> communication oldugunda cagiriliyor </s>
|
funcom_train/2029977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerEagerInstantiation(Component c){
if(!globallyDefined){
raise("only global tags can be registered as eager instantiated");
}
/*
if(id==null){
raise("id is required to eager initialize a Component");
}*/
env.registerEagerInstantiation(seq_no, id, c);
}
COM: <s> register a component to be eagerly instantiated using the current tags id </s>
|
funcom_train/18599607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MetadataPermissions getPermissions(String metadataUuid, String authToken) throws GaapServiceFault {
try {
boolean canInvoke = authorizationManager.hasAuthorization(MetadataPermissionsService.class, "getPermissions", authToken);
if (!canInvoke)
throw new GaapServiceException("Not authorized to retrieve metadata permissions.");
return permissionsService.getPermissions(metadataUuid);
} catch (GaapServiceException e) {
throw new GaapServiceFault(e.getMessage());
}
}
COM: <s> routes request from axis to the logical service layer metadata permissions service impl </s>
|
funcom_train/17705704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recordTurnFwCCW(char leftMotor, char rightMotor, int speed){
this.nxcCode.append(" // Turn Forward, Counter-clockwise\n");
this.nxcCode.append(" OnFwd(OUT_" + leftMotor + ", " + 0 + ");\n");
this.nxcCode.append(" OnFwd(OUT_" + rightMotor + ", " + Math.abs(speed) + ");\n");
}
COM: <s> records the forward turns for nxt that are counter clockwise </s>
|
funcom_train/1666458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Container createButtonArea() {
JPanel bottom = new JPanel();
if (LiquidLookAndFeel.areStipplesUsed()) {
bottom.setOpaque(false);
}
bottom.setBorder(UIManager.getBorder("OptionPane.buttonAreaBorder"));
bottom.setLayout(new ButtonAreaLayout(true, 6));
addButtonComponents(bottom, getButtons(), getInitialValueIndex());
mnemonics = null;
return bottom;
}
COM: <s> creates and returns a container containing the buttons </s>
|
funcom_train/38354832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean sendHello() {
String me = connection.getLocalAddress().toString();
output.println("HELO" + me);
output.flush();
SMTPResponse[] reply = getResponses();
if (reply.length == 0) return false;
if (reply[0].code != 250) return false;
return true;
}
COM: <s> send smtp hello helo command </s>
|
funcom_train/50338187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int nextContent(int location) {
currentPage = location/PAGESIZE;
int offset = location % PAGESIZE;
for (; currentPage < PAGES; currentPage++) {
if (pageArray[currentPage] != null)
for (; offset<pageArray[currentPage].length; offset++)
if (pageArray[currentPage][offset] != DEFAULT ) return offset+currentPage*PAGESIZE;
offset = 0;
}
return -1;
}
COM: <s> return the address of the next location containing data including </s>
|
funcom_train/9536310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanelRight() {
if (jPanelRight == null) {
jPanelRight = new JPanel();
jPanelRight.setLayout(new BorderLayout());
jPanelRight.add(getJPanelCenterButtons(), BorderLayout.WEST);
jPanelRight.add(getJTabbedPaneServer(), BorderLayout.CENTER);
}
return jPanelRight;
}
COM: <s> this method initializes j panel right </s>
|
funcom_train/3032419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PersonFamily new_child(GdbiIndi child) {
assert notModified();
// child may be null, so pass in current database
PersonFamily pf = new PersonFamily(database, child, null,
(fams == null) ? null : fams);
final int indiSex = indi.getSex(true);
switch (indiSex) {
case SEX_MALE:
case SEX_FEMALE:
break;
default:
pf = null;
break;
}
return pf;
}
COM: <s> make the current person a parent of an undefined child </s>
|
funcom_train/35336186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset () {
super.reset ();
// get state of namespace-declarations parameter.
fNamespaceDeclarations =
fConfiguration.getFeature(Constants.DOM_NAMESPACE_DECLARATIONS);
// DOM Filter
if (fSkippedElemStack!=null) {
fSkippedElemStack.removeAllElements ();
}
fSchemaLocations.clear ();
fRejectedElementDepth = 0;
fFilterReject = false;
fSchemaType = null;
} // reset()
COM: <s> resets the parser state </s>
|
funcom_train/22285472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Frame getPlayerFrame() {
PlayerPanel panel = getPlayerPanel();
if (panel == null) {
return null;
}
Object parent = panel.getParent();
while (parent != null && !(parent instanceof Frame)) {
if (parent instanceof Component) {
parent = ((Component)parent).getParent();
} else {
return null;
}
}
if (parent == null) {
return null;
} else {
return (Frame)parent;
}
}
COM: <s> find the first parent frame in which this widget </s>
|
funcom_train/43667240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getCopyItem() {
if (copyItem == null) {
copyItem = new JMenuItem("Copy");
copyItem.setFont(new Font(Constants.FONT, Constants.FONT_STYLE_TOOL, 12));
copyItem.setAccelerator(KeyStroke.getKeyStroke(
KeyEvent.VK_C, ActionEvent.CTRL_MASK));
}
copyItem.setEnabled(false);
return copyItem;
}
COM: <s> this method initializes copy item </s>
|
funcom_train/13938154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateSolid(CSG_Solid solid, BoolOp boolop){
switch(boolop){
case Union:{
partSolid = CSG_BooleanOperator.Union(partSolid, solid);
break;
}
case Intersection:{
partSolid = CSG_BooleanOperator.Intersection(partSolid, solid);
break;
}
case Subtracted:{
partSolid = CSG_BooleanOperator.Subtraction(partSolid, solid);
break;
}
case SubtractFrom:{
partSolid = CSG_BooleanOperator.Subtraction(solid, partSolid);
break;
}
default:{
System.out.println("Part(updateSolid): Unknown boolean operation, aborting solid update.");
break;
}
}
AvoGlobal.glView.updateGLView = true;
}
COM: <s> modify build on this parts current solid representation </s>
|
funcom_train/8330063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCurrentMemberInCalcMember() {
Result result = executeQuery(
"with member [Measures].[Foo] as '[Measures].CurrentMember.Name'\n" +
"select {[Measures].[Foo]} on columns\n" +
"from Sales");
Assert.assertEquals("Unit Sales", result.getCell(new int[]{0}).getValue());
}
COM: <s> when evaluating a calculated member msolap regards that </s>
|
funcom_train/3105573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllRows() throws IloaException {
// Call the fonction removeAllRows() of the services
for (Iterator<IDataStoreService> iter = this.services.iterator(); iter.hasNext();) {
IDataStoreService element = iter.next();
element.removeAllRows();
}
// Clear the row list
this.rows = new ArrayList<DataStoreRow>();
this.currentPage = 0;
// Init the firstRow value.
this.firstRow = -1;
this.updateVersion();
}
COM: <s> remove all the rows of the datastore </s>
|
funcom_train/4741980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperties(String username, String password, String keyName) {
properties = new HashMap<String, Object>();
properties.put("username", username);
properties.put("password", password);
properties.put("keyName", keyName);
setRequiredRole(Role.SUPERADMIN);
}
COM: <s> the method to delete a key pair </s>
|
funcom_train/26595018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean previous() throws com.daffodilwoods.database.resource.DException {
switch(state){
case INVALIDSTATE :
throw new DException("DSE4117",null);
case BEFOREFIRST :
return false;
case AFTERLAST :
return last();
}
if(state == SECONDISCURRENT){
state = rightIterator.previous() ? state
: leftIterator.last() ? FIRSTISCURRENT : BEFOREFIRST;
}
else if(state == FIRSTISCURRENT)
state = leftIterator.previous() ? state : BEFOREFIRST;
return state != BEFOREFIRST;
}
COM: <s> this method is responsible for retriving previous record of union iterator </s>
|
funcom_train/47107827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemArmor15() {
JMenuItem menuItem = new JMenuItem();
menuItem.setText(Armor.A_15.getItemName());
menuItem.setEnabled(false);
menuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
controller.setPlrReadiedArmor(Armor.A_15);
}
});
return menuItem;
}
COM: <s> creates the sixteenth choice for the armor menu </s>
|
funcom_train/18215679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkLogin() {
userId = "0";
initService.checkIfUserIsLoggedIn(new AsyncCallback<String>() {
public void onSuccess(String authenticatedUserId) {
if (authenticatedUserId != null) {
userId = authenticatedUserId;
waitUntilBaseFilterConfigurationInitialized();
} else {
showLoginPage();
}
}
public void onFailure(Throwable caught) {
ErrorHandler.handleException(caught, "There is a problem during login check.");
}
});
}
COM: <s> initiates a login check on the server side based on the bugzilla cookies </s>
|
funcom_train/22276865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getSingleIndexErrorMessage(Object object) {
String msg = object.toString();
if ( object instanceof Throwable ) {
StackTraceElement[] stack = ((Throwable)object).getStackTrace();
if ( stack != null && stack.length > 0 ) {
msg += " at " +stack[0].getClassName() +":" +stack[0].getLineNumber();
}
}
return msg;
}
COM: <s> get an individual index error message </s>
|
funcom_train/9190138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNextPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NormalNode_next_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NormalNode_next_feature", "_UI_NormalNode_type"),
FlowPackage.Literals.NORMAL_NODE__NEXT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the next feature </s>
|
funcom_train/17774355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void redraw() {
Graphics g;
if (!updated) {
updated = true;
g = getGraphics();
g.setClip(insets.left + updateRect.x * squareSize.width,
insets.top + updateRect.y * squareSize.height,
(updateRect.width + 1) * squareSize.width,
(updateRect.height + 1) * squareSize.height);
paint(g);
}
}
COM: <s> redraws all the invalidated squares </s>
|
funcom_train/2492455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showHelp(ActionEvent evt, Window owner) {
if (helpBroker == null){
helpBroker = initializeHelpSystem( owner, getHelpSetName(), evt.getActionCommand() );
}
helpBroker.setCurrentID(evt.getActionCommand());
helpBroker.setLocation( countPositionForHelp(owner.getLocation(), owner.getSize(), helpBroker ));
new CSH.DisplayHelpFromSource(helpBroker).actionPerformed(evt);
}
COM: <s> show help window </s>
|
funcom_train/9277254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSQRTWithUnaryMinusAndPlus() throws SQLException{
PreparedStatement ps = prepareStatement("select sqrt(-?) from t1");
ps.setInt(1,-64);
int[] expectedTypes= new int[]{Types.DOUBLE};
JDBC.assertParameterTypes(ps,expectedTypes);
Object[][] expectedRows = new Object[][]{{new String("8.0")},{new String("8.0")}};
JDBC.assertFullResultSet(ps.executeQuery(), expectedRows, true);
ps.close();
}
COM: <s> tests sqrt with unary minus and unary plus </s>
|
funcom_train/8528716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File getNextTempAudioFile(boolean addToWorkingFiles) throws IOException {
//File file = File.createTempFile("tempfile-tpbnarrator-", ".wav", outputDir);
//mg20081016 shorten tempfile names to fix weird concat behavior on Ubuntu.
File file = File.createTempFile("tmp-", ".wav", outputDir);
if (addToWorkingFiles) {
workingFiles.add(file);
}
return file;
}
COM: <s> returns the next temp file to use for audio output </s>
|
funcom_train/10842834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void installBundles(List<File> toInstall, boolean startBundles) throws Exception {
for(File f : toInstall) {
webconsoleClient.installBundle(f, startBundles);
}
log.info("{} additional bundles installed from {}", toInstall.size(), toInstall.get(0).getAbsolutePath());
}
COM: <s> install a list of bundles supplied as files </s>
|
funcom_train/43607103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Context pushCode(CodeInstance ci) {
if (Report.should_report(TOPICS, 4))
Report.report(4, "push code " + ci + " " + ci.position());
Context_c v = push();
v.kind = CODE;
v.code = ci;
v.inCode = true;
v.staticContext = ci.flags().isStatic();
return v;
}
COM: <s> enters a method </s>
|
funcom_train/29831635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loginAuthorized() {
if (loginProgressDlg != null) loginProgressDlg.setMessage("Authenticated");
if (loginProgressDlg != null) loginProgressDlg.setVisible(false);
loginProgressDlg = null;
//statusesBar.setMyJID();
if (plugins != null)
plugins.connected();
openTheWindows(openWindows.getWindows(true), true);
}
COM: <s> called when authentication succeeded </s>
|
funcom_train/24118137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMessage(final String message) {
LOGGER.debug("Set message {}", message);
final int maxLenght = getConstantMessageLength();
if (message.length() > maxLenght) {
this.message = message.substring(0, maxLenght);
} else {
this.message = message;
}
}
COM: <s> sets the message </s>
|
funcom_train/34580928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getDefaultsCommand () {
if (defaultsCommand == null) {//GEN-END:|158-getter|0|158-preInit
// write pre-init user code here
defaultsCommand = new Command (lang.getProperty("command.restore_defaults"), Command.ITEM, 0);//GEN-LINE:|158-getter|1|158-postInit
// write post-init user code here
}//GEN-BEGIN:|158-getter|2|
return defaultsCommand;
}
COM: <s> returns an initiliazed instance of defaults command component </s>
|
funcom_train/17458354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getLastUpdateTime() throws MPDConnectionException, MPDDatabaseException {
try {
return (Long.parseLong(mpd.getServerStat(MPD.StatList.DBUPDATE)));
} catch (MPDResponseException re) {
throw new MPDDatabaseException(re.getMessage(), re.getCommand());
} catch (Exception e) {
throw new MPDDatabaseException(e.getMessage());
}
}
COM: <s> returns the last database update in unix time </s>
|
funcom_train/44887823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IExpression parseExpressionOrNull() throws ParseException {
Token token = this.getNextToken();
AST ast = token.dispatchParsingTo(this);
if (ast == null)
return null;
if (ast.isAtom())
return this.parsePrimary((IAtom) ast);
if (!ast.isExpression())
throw new ParseException("Expression expected.");
return (IExpression) ast;
}
COM: <s> parse an expression if possible </s>
|
funcom_train/4515493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
// Sends start signal.
synchronized (synchLock) {
synchLock.notify();
}
// Streams retrieval.
try {
inputStream = socket.getInputStream();
outputStream = socket.getOutputStream();
} catch (IOException e) {
stop();
}
// Loop.
while (!Thread.interrupted()) {
try {
String message = Message.read(inputStream);
String response = listener.messageReceived(this, message);
if (response == null) {
response = "";
}
Message.write(response, outputStream);
} catch (IOException e) {
stop();
}
}
// Listener notification.
listener.connectionClosed(this);
}
COM: <s> the connection handling routine </s>
|
funcom_train/16748755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IDocument getActiveDocument() {
IDocument doc = null;
IWorkbenchWindow myWBW = getActiveWorkbenchWindow();
if (myWBW != null) {
// get the current command service of the used editor
IEditorPart targetEditor = myWBW.getActivePage().getActiveEditor();
if (targetEditor instanceof ITextEditor) {
doc = ((ITextEditor) targetEditor).getDocumentProvider().getDocument(targetEditor.getEditorInput());
}
}
return doc;
}
COM: <s> this method determines the currently opened idocument </s>
|
funcom_train/14055652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTextContent() throws DOMException {
StringBuffer sb = new StringBuffer();
synchronized(this.treeLock) {
ArrayList<Node> nl = this.nodeList;
if(nl != null) {
Iterator<Node> i = nl.iterator();
while(i.hasNext()) {
Node node = i.next();
short type = node.getNodeType();
switch(type) {
case Node.CDATA_SECTION_NODE:
case Node.TEXT_NODE:
case Node.ELEMENT_NODE:
String textContent = node.getTextContent();
if(textContent != null) {
sb.append(textContent);
}
break;
default:
break;
}
}
}
}
return sb.toString();
}
COM: <s> gets the text content of this node </s>
|
funcom_train/42068142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNumberOfRepeatsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Segment_numberOfRepeats_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Segment_numberOfRepeats_feature", "_UI_Segment_type"),
WavPackage.Literals.SEGMENT__NUMBER_OF_REPEATS,
false,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the number of repeats feature </s>
|
funcom_train/51503210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getChDeleted() {
if (chDeleted == null) {
chDeleted = new JCheckBox();
chDeleted.setBounds(581, 372, 119, 14);
chDeleted.setText("auch gel�schte");
chDeleted.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10));
chDeleted.setSelected(false);
}
return chDeleted;
}
COM: <s> this method initializes j check box1 </s>
|
funcom_train/2854555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setId (String id) {
if (id == null)
throw new IllegalArgumentException ("null NodeID");
if (id.length() != 28)
throw new IllegalArgumentException(
"not a valid 20-byte NodeID");
nodeID_ = new NodeID( coder.decode(id) );
}
COM: <s> sets the node id from a base 64 encoded value </s>
|
funcom_train/24409268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ManifestType getManifestFromDisk(String filename) throws JAXBException {
messageText = "";
// should be able to read it straight from the file without any intermediate arsing about
/*
* This may be OK because its not the qtiUnmarshaller
*/
JAXBElement<ManifestType> manifestJE =
(JAXBElement<ManifestType>) imsmanifestUnmarshaller.unmarshal(new File(filename));
return manifestJE.getValue();
}
COM: <s> reads a manifest from disk </s>
|
funcom_train/7444275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCookies(Series<Cookie> cookies) {
synchronized (getCookies()) {
if (cookies != getCookies()) {
if (getCookies() != null) {
getCookies().clear();
}
if (cookies != null) {
getCookies().addAll(cookies);
}
}
}
}
COM: <s> sets the modifiable series of cookies provided by the client </s>
|
funcom_train/2311475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean compareChecksum(File filename, File checksumFile, String algorithm) throws FileNotFoundException, NoSuchAlgorithmException, IOException {
byte[] checksum1 = checksum(filename, algorithm).getBytes();
byte[] checksum2 = new byte[checksum1.length];
InputStream is = new FileInputStream(checksumFile);
is.read(checksum2);
if (new String(checksum2).equals(new String(checksum1))) return true;
return false;
}
COM: <s> compares if a file has a given checksum saved in a checksum file </s>
|
funcom_train/43334523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSignal(SimulinkBlock block){
if(block.getValue(SimulinkModel.ARITH_TYPE).equalsIgnoreCase("boolean")){
setSignal(BOOLEAN, 1,0);
}
else{
try{
setSignal(block.getValue("arith_type"),
Integer.parseInt(block.getValue("n_bits")),
Integer.parseInt(block.getValue("bin_pt")));
}
catch(NumberFormatException e){
System.out.println("Problem with " + block.getName() +
". Cannont parse bit width or binary point into Integer");
}
}
}
COM: <s> sets the simulink signal based on the ports parameters found in the parameter </s>
|
funcom_train/41071211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNick(String nick) throws java.beans.PropertyVetoException {
String oldNick = this.nick;
vetoableChangeSupport.fireVetoableChange(PROP_NICK, oldNick, nick);
this.nick = nick;
propertyChangeSupport.firePropertyChange(PROP_NICK, oldNick, nick);
}
COM: <s> set the value of nick </s>
|
funcom_train/16695297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsAllOf(EnumeratorSet that) {
if (that.enumeratorClass != this.enumeratorClass) {
throw new EnumeratorSetTypeException(
"Cannot compare set of type \""
+ that.enumeratorClass
+ "\" with set of different type \""
+ this.enumeratorClass
+ "\""
);
}
return this.values.containsAll(that.values);
}
COM: <s> check if this set contains all values of the given set </s>
|
funcom_train/44215791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean confirmChangeClass() {
RecordingRecord rr = model.getRecord();
if(rr.getSize() > 0) {
int result = JOptionPane.showConfirmDialog(this, Strings.getString("ChangingClassWillDeleteRecordedScriptOK"), Strings.getString("DeleteScript?"), JOptionPane.YES_NO_OPTION);
return result == JOptionPane.YES_OPTION;
}
return true;
}
COM: <s> check if script has any items in it and if so display a </s>
|
funcom_train/43539972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean nestedDialogCondition() {
//is the active shell NOT the shell on which we're waiting?
Shell active = getActiveShell();
boolean yield = active != _shell;
if (yield) {
PlatformActivator.logDebug("active shell is not condition shell --- yielding"); //$NON-NLS-1$
}
return yield;
}
COM: <s> is the known shell not active </s>
|
funcom_train/44718439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreate() throws ProcessException, TaskException {
String definitionLabel = "Task Label Definition";
String definitionDesc = "Task Label definition description";
Task task = new Task(definitionLabel, definitionDesc);
assertNotNull("Create 1: task is null", task);
// The default state should be disabled
if (task.getState() != Task.DISABLED) {
fail("Create 3: Task state not DISABLED after creation");
}
task.save();
}
COM: <s> test the create process </s>
|
funcom_train/42570851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addClassPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_ClassFigureDesc_class_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_ClassFigureDesc_class_feature",
"_UI_ClassFigureDesc_type"),
DescPackage.Literals.CLASS_FIGURE_DESC__CLASS, true, false,
true, null, null, null));
}
COM: <s> this adds a property descriptor for the class feature </s>
|
funcom_train/19417142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreationWithAnnotationHandlerAsNull() throws Exception {
try {
new SimpleAnnotation(1,
2,
"x",
"y",
100,
new Attribute[] {},
null);
fail("Oops... must throw IllegalArgumentException");
} catch (final IllegalArgumentException e) {
;
}
}
COM: <s> test the creation with code annotation handler impl null code </s>
|
funcom_train/39544803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resumeExecution() {
// System.err.println("Resume Called");
if (runnableQueueThread == null) {
throw new IllegalStateException
("RunnableQueue not started or has exited");
}
synchronized (stateLock) {
wasResumed = true;
if (state != RUNNING) {
state = RUNNING;
stateLock.notifyAll(); // wake it up.
}
}
}
COM: <s> resumes the execution of this queue </s>
|
funcom_train/17300697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeLog(LogEntry entry) {
synchronized (this) {
try {
BufferedWriter bWriter =
new BufferedWriter(new FileWriter(logFile,true));
Date currentDate = new Date();
bWriter.append(currentDate.toString());
bWriter.append(" ");
bWriter.append(entry.getCategoryString());
bWriter.newLine();
bWriter.append(entry.getLogMessage());
bWriter.newLine();
bWriter.flush();
bWriter.close();
}
catch (IOException e) {
// TODO: handle exception
}
}
}
COM: <s> write the information into the log file </s>
|
funcom_train/29768212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createSampleAppTables() {
MvcSample conf = getConf();
DataSource ds = conf.getDataSource();
Connection connection;
connection = _jdbcHelper.getConnection(ds);
try {
getClassRegistry().dropTablesAndViews(null, true);
getClassRegistry().createTablesAndViews(null, false);
} finally {
_jdbcHelper.closeConnection(connection);
}
}
COM: <s> creates the tables for the sample application </s>
|
funcom_train/9919006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadFragmentShader(URL url) {
String shaderSource;
try {
shaderSource = PApplet.join(PApplet.loadStrings(url.openStream()), "\n");
attachFragmentShader(shaderSource, url.getFile());
} catch (IOException e) {
System.err.println("Cannot load file " + url.getFile());
}
}
COM: <s> loads and compiles the fragment shader contained in the url </s>
|
funcom_train/47123871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateEdges() {
removeAllEdges(graph);
Iterator<Edge> edgeIterator = graphSettings.getEdgeIterator();
while (edgeIterator.hasNext()) {
Edge edge = edgeIterator.next();
if (graphSettings.isEdgeVisible(edge)) {
graph.addEdge(edge, Arrays.asList(new Vertex(edge.pair.getFirst()), new Vertex(edge.pair.getSecond())));
}
}
}
COM: <s> creates the nodes for every alter creates edges for entries in adjacency </s>
|
funcom_train/29374092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String name, String[] value){
props.put(name+".length", value.length);
for(int i=1; i<value.length; i++){
int n = i-1;
props.put(name+"."+n, value[n]);
}
}
COM: <s> adds the string array property </s>
|
funcom_train/24476215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HostBean getBean(String name) throws GfacGUIException{
try {
// To Get HostBean Object
return (HostBean)infoUtils.getBeanObjectInfo(super.getContext().getRegService(), name);
} catch (Exception e) {
logger.severe(e.getLocalizedMessage());
super.setErrorString(e.getLocalizedMessage());
throw new GfacGUIException(e);
}
}
COM: <s> get host object to use for edit </s>
|
funcom_train/34259624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCurrentCenterComponent(Component p_aComponent) {
if (this.getCurrentCenterComponent() != null) {
this.getUserPreferencesPanel().remove(this.getCurrentCenterComponent());}
this.setCurrentCenterComponent(p_aComponent);
this.getUserPreferencesPanel().add(this.getCurrentCenterComponent(), BorderLayout.CENTER);
}
COM: <s> removes the old center panel and adds the new one </s>
|
funcom_train/22678792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applyGuiPanel(OMElement element) {
XmlUtils.setAttribute(factory, element, ID, readerNames[1]);
XmlUtils.setAttribute(factory, element, TraserConstants.CLASS, readerOptions[1].value);
for (JTextField tf : guiTags) {
XmlUtils.addElement(factory, element, TAG, tf.getText());
}
}
COM: <s> apply changes on the gui page </s>
|
funcom_train/27779736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object readData(java.io.DataInput i, String key) throws IOException {
String s = i.readUTF();
if (key != null) {
if (s.equals(key) == false) {
return null;
}
}
IListMeta r = new IListMeta(i);
r.setKey(s);
return r;
}
COM: <s> this structure stores </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.