__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/12163449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRenderSelectionComplexMenu() throws Exception {
doTestRenderSelection("circular-list",
"<select multiple=\"false\" name=" +
"\"testName\" type=\"spin\">" +
"<option title=\"Prompt\" value=\"Value\">Caption</option>" +
"</select>",
false);
}
COM: <s> test the complex rendering for a circular list spin </s>
|
funcom_train/44183843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actOn(File f) {
BufferedReader reader = null;
try {
reader = ArchiveUtils.getBufferedReader(f);
announceSeedsFromReader(reader, null);
} catch (IOException ioe) {
logger.log(Level.SEVERE,"problem reading seed file "+f,ioe);
} finally {
IOUtils.closeQuietly(reader);
}
}
COM: <s> treat the given file as a source of additional seeds </s>
|
funcom_train/14266816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getSupportsChat() throws BadPacketException {
parseResults();
switch (_supportsChat) {
case UNDEFINED:
throw new BadPacketException();
case TRUE:
return true;
case FALSE:
return false;
default:
Assert.that(false, "Bad value for supportsChat: "+_supportsChat);
return false;
}
}
COM: <s> returns true iff the client supports chat </s>
|
funcom_train/19604247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getSetterType(String propertyName) {
Class clazz = (Class) setTypes.get(propertyName);
if (clazz == null) {
throw new RuntimeException("There is no WRITEABLE property named '" + propertyName + "' in class '" + className + "'");
}
return clazz;
}
COM: <s> gets the type for a property setter </s>
|
funcom_train/31944163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearInput() throws IOException {
if (m_InputStream.available() > 0) {
int len = m_InputStream.available();
byte buf[] = new byte[len];
m_InputStream.read(buf, 0, len);
if(Modbus.debug) System.out.println("Clear input: " +
ModbusUtil.toHex(buf, 0, len));
}
}//cleanInput
COM: <s> clear the input if characters are found in the input stream </s>
|
funcom_train/8506583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayTuple( String[] pTuple ) {
for( int i = 0; i < pTuple.length; ++i ) {
if( pTuple[ i ].length() > 0 ) {
System.out.print( pTuple[ i ] );
if( i + 1 < pTuple.length ) {
System.out.print( " " );
}
}
}
System.out.println();
}
COM: <s> displays the specified tuple </s>
|
funcom_train/445675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCoreValidInvImplAttribute() throws Exception {
createAxiomDef("?x[ageOfHuman hasValue ?y] impliedBy ?y[ageOfHuman hasValue ?x].");
WsmlCoreValidator v = new WsmlCoreValidator(leFactory);
boolean b = v.isValid(ontology, errors, warnings);
// printWarning(warnings);
// printError(errors);
assertTrue(b);
removeAxiomDef();
}
COM: <s> this test checks for the validity of an inverse implication </s>
|
funcom_train/11023346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testElementDefault() {
boolean[] defaults = new boolean[1];
BooleanConverter bc = new BooleanConverter(Boolean.TRUE);
BooleanArrayConverter converter = new BooleanArrayConverter(bc, defaults);
boolean[] results = (boolean[]) converter.convert(null, "true,bogus");
assertEquals(2, results.length);
assertTrue(results[0]);
assertTrue(results[1]);
}
COM: <s> check that when a custom boolean converter is used and that converter </s>
|
funcom_train/10766328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Expression getJoinCondition() {
if (is11()) {
return isAttributeSet("joinCondition")
? new Expression11(getElement(),getElement().getAttributeNode("joinCondition")) : null;
}
Targets targets = getFirstChild(Targets.class);
return targets == null ? null : (Expression) targets.getFirstChild(Expression.class);
}
COM: <s> get the join condition </s>
|
funcom_train/14242049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void textEdited(FigText ft) throws PropertyVetoException {
if (ft == _name) {
MModelElement me = (MModelElement) getOwner();
if (me == null) return;
me.setName(ft.getText());
// ProjectBrowser.TheInstance.getNavPane().forceUpdate();
}
}
COM: <s> this method is called after the user finishes editing a text </s>
|
funcom_train/8467338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateTask() {
try {
ETaskController et = new ETaskController();
et.mergeTask(task);
} catch (Exception e) {
ErrorBean.printMessage(e,
"content:infoForm:taskModifiers",
"Unexpected error while connecting database. Please contact the system Administrator.");
}
}
COM: <s> merge state of </s>
|
funcom_train/22033104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File f) {
if (f.isDirectory()) return true;
String name = f.getName();
int index = name.lastIndexOf('.');
String ext = index < 0 ? "" : name.substring(index + 1);
for (int i=0; i<exts.length; i++) {
if (ext.equalsIgnoreCase(exts[i])) return true;
}
return false;
}
COM: <s> accepts files with the proper extensions </s>
|
funcom_train/38439151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object ChildRemoveEntry ( String aChildName, String aKey) {
Hashtable aChildHash = (Hashtable) main.get(aChildName);;
// Warning Child doesn't exist
if (aChildHash == null) {
aLogger.warning(aChildName+" child not registered. Can not remove key: "+aKey);
return null;
}
return aChildHash.remove(aKey);
}
COM: <s> method remove from child </s>
|
funcom_train/40324521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConceptSchemeTitle(String concept_scheme_uri, String lang, String title) {
repository.RemoveResourceTypeFromRepository(concept_scheme_uri, "http://purl.org/dc/elements/1.1/title", lang);
repository.AddResourceToRepository(concept_scheme_uri, "http://purl.org/dc/elements/1.1/title", title, lang);
}
COM: <s> adds title dc title dc title element to currently existing concept </s>
|
funcom_train/1655137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean isTextValid(String text) {
if (text == null) {
return false;
}
if (text.length() > MAX_MESSAGE_TEXT_LENGTH) {
return false;
}
try {
if (text.getBytes("UTF-8").length > MAX_MESSAGE_TEXT_BYTE_LENGTH) {
return false;
}
} catch(UnsupportedEncodingException e) {
return false;
}
return true;
}
COM: <s> checks whether the text of the message is valid </s>
|
funcom_train/42666704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void process() throws IOException {
MissingRecordAwareHSSFListener listener = new MissingRecordAwareHSSFListener(this);
formatListener = new FormatTrackingHSSFListener(listener);
HSSFEventFactory factory = new HSSFEventFactory();
HSSFRequest request = new HSSFRequest();
if (outputFormulaValues) {
request.addListenerForAllRecords(formatListener);
} else {
workbookBuildingListener = new SheetRecordCollectingListener(formatListener);
request.addListenerForAllRecords(workbookBuildingListener);
}
factory.processWorkbookEvents(request, fs);
stopProcessing = false;
}
COM: <s> initiates the processing of the xls file to csv </s>
|
funcom_train/46473449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createAnnotatedUcView() throws InvalidXMLFileException {
ProjectReader pr = new ProjectReader(prjFileName);
String path = getProjectDirectory();
ViewModelGenerator annotatedUC = new AnnotatedUcViewCreator(pr.getUnifiedFile());
annotatedUC.generateModel();
annotatedUC.saveModel(path + "view.annotateduc");
generateDiagram(path + "view.annotateduc");
//marks file for deletion when JVM terminates.
File f = new File(path + "view.annotateduc");
f.deleteOnExit();
}
COM: <s> this method creates an annotated use cases view </s>
|
funcom_train/21653244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearUpdateReqs(Player player) {
if (player == null) {
return;
}
player.getUpdate().setGlobalRequest(false);
player.getUpdate().setAppearanceRequest(false);
player.getUpdate().setAnimationRequest(false);
player.chatTextUpdateReq = false;
player.forceChatUpdateReq = false;
}
COM: <s> reset all update requests now that they have been sent </s>
|
funcom_train/34564612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Expr unary() throws QueryException {
boolean minus = false;
boolean found = false;
do {
skipWS();
if(consume('-')) {
minus ^= true;
found = true;
} else if(consume('+')) {
found = true;
} else {
final Expr e = value();
return found ? new Unary(check(e, EVALUNARY), minus) : e;
}
} while(true);
}
COM: <s> 58 parses a unary expr </s>
|
funcom_train/8468273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintRoad(Graphics2D g2) {
Composite oldComp = g2.getComposite();
try {
g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f));
g2.drawImage(roadImage, null, 0, 0);
}
finally {
g2.setComposite(oldComp);
}
}
COM: <s> paint the road </s>
|
funcom_train/22498702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateTree(final DocumentEvent event) {
updatingSelection = true;
try {
final TreeModel model = getTreeModel();
final Object root = model.getRoot();
for (int counter = model.getChildCount(root) - 1; counter >= 0; counter--) {
updateTree(event, (Element) model.getChild(root, counter));
}
}
finally {
updatingSelection = false;
}
}
COM: <s> updates the tree based on the event type </s>
|
funcom_train/19101442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LocalizedDialog getDialog(String key) throws MissingResourceException {
LocalizedDialog value = (LocalizedDialog) dialogs.get(key);
if (value == null) {
Node node = getNode("dialog", key, getCurrentLocale());
value = new LocalizedDialog();
value.setTitle(node.valueOf("title"));
value.setText(node.valueOf("text"));
value.setIcon(node.valueOf("icon"));
dialogs.put(key, value);
}
return value;
}
COM: <s> get an object from a resource bundle </s>
|
funcom_train/19272727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double toDouble(Object value) throws WrongValueTypeException {
try {
return ((Number) value).doubleValue();
} catch (ClassCastException e) {
try {
return Double.parseDouble(value.toString());
} catch (NumberFormatException e1) {
throw new WrongValueTypeException(this, Double.class);
}
}
}
COM: <s> this method gets the given value object as double </s>
|
funcom_train/1880117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void turnFrogRight(KFrogDataType a)throws RuntimeException {
double angle = 0;
if ((a instanceof KFrogDecimal))
angle = ((KFrogDecimal)a).getVariable();
else if((a instanceof KFrogReal))
angle = ((KFrogReal)a).getVariable();
else
throw new RuntimeException("Illegal type: expression in " +
"forward statement must evaluate to decimal or real");
Frog lastFrog = getFrogIfActive();
lastFrog.turnright(angle);
}
COM: <s> turns the frog to the right from its current position for the </s>
|
funcom_train/28171266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetWindingRule() {
System.out.println("setWindingRule");
int newValue = 0;
BezierPath instance = new BezierPath();
instance.setWindingRule(newValue);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set winding rule method of class org </s>
|
funcom_train/11322112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setErrorMessage(String key) {
String errorLabel = getErrorLabel();
String msg = getMessage(getName() + "." + key, errorLabel);
if (msg == null) {
msg = getMessage(key, errorLabel);
}
setError(msg);
}
COM: <s> set the error with the a label formatted message specified by the given </s>
|
funcom_train/34259859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void runInvokeExec(final String[] p_ParameterList) {
Thread t1 = new Thread() {
public void run() {
try {
Runtime.getRuntime().exec(p_ParameterList);
}
catch (IOException ioe) {
System.out.println("Executable " + p_ParameterList[0] + " is not valid.");
}
}
};
t1.start();
}
COM: <s> invoves the executable in a seperate thread </s>
|
funcom_train/23235410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeToProperties(Properties props) {
props.put("window." + name + ".minimized", minimized);
props.put("window." + name + ".visible", visible);
props.put("window." + name + ".x", x);
props.put("window." + name + ".y", y);
}
COM: <s> adds all props to the property </s>
|
funcom_train/5552359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String parseIdent(AST t) {
if(t == null) return "";
switch(t.getType()) {
case JavaTokenTypes.IDENT:
return t.getText();
case JavaTokenTypes.DOT:
return parseIdent(t.getFirstChild()) + "." +
t.getFirstChild().getNextSibling().getText();
case JavaTokenTypes.STAR:
return "*";
default:
throw new RuntimeException("Malformed identifier");
}
}
COM: <s> parse an identificator </s>
|
funcom_train/2911538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isUpdateTextAllowed() throws Exception {
if (updateTextAllowed != null)
return updateTextAllowed.booleanValue();
try {
Security sec = getSecurity();
try {
sec.checkUpdateBoardText(getBoardId());
updateTextAllowed = Boolean.TRUE;
return true;
} catch (PermissionDeniedException e) {
updateTextAllowed = Boolean.FALSE;
return false;
}
} catch (Exception e) {
cat.error("isMovingAllowed exception");
cat.debug("isMovingAllowed", e);
throw (Exception) e.fillInStackTrace();
}
}
COM: <s> checks if current user is allowed to edit texts of this board </s>
|
funcom_train/7353262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Icon getSystemIcon(File f) {
if (f.equals(getComputer())) {
return UIManager.getIcon("FileView.computerIcon");
} else {
if (OSXFile.canWorkWithAliases()) {
return OSXFile.getIcon(f, 16);
} else {
return target.getSystemIcon(f);
}
}
}
COM: <s> icon for a file directory or folder as it would be displayed in </s>
|
funcom_train/25129777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServerWidget createWidget(int id, String name, ARINCElement parent) throws InstantiationException, IllegalAccessException {
ServerWidget widget = (ServerWidget) arincEltClass.newInstance();
widget.setWidgetDefinition(this);
widget.setID(id);
widget.setName(name);
widget.setParent(parent);
return widget;
}
COM: <s> create a new widget of this definition </s>
|
funcom_train/46748330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOrderingUserRef(DisplayModel orderingUserRef) {
if (Converter.isDifferent(this.orderingUserRef, orderingUserRef)) {
DisplayModel oldorderingUserRef= new DisplayModel(this);
oldorderingUserRef.copyAllFrom(this.orderingUserRef);
this.orderingUserRef.copyAllFrom(orderingUserRef);
setModified("orderingUserRef");
firePropertyChange(String.valueOf(APPOINTMENTLOGS_ORDERINGUSERREFID), oldorderingUserRef, orderingUserRef);
}
}
COM: <s> user appointmenting this appointment </s>
|
funcom_train/8487075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keepChildAt(int i) {
if(i < children.size()){
ArrayList<Node<T>> thisOne = new ArrayList<Node<T>>(1);
thisOne.add((Node<T>) children.get(i));
children.retainAll(thisOne);
}
}
COM: <s> removes all children exept the one at index i </s>
|
funcom_train/11379413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMaxJobsPerUserToInitialize(String queue) {
String raw =
getProperty(queue, MAXIMUM_INITIALIZED_JOBS_PER_USER_PROPERTY);
int maxJobsPerUser = getInt(raw,defaultMaxJobsPerUsersToInitialize);
if(maxJobsPerUser <= 0) {
throw new IllegalArgumentException(
"Invalid maximum jobs per user configuration " + maxJobsPerUser);
}
return maxJobsPerUser;
}
COM: <s> gets the maximum number of jobs which are allowed to initialize in the </s>
|
funcom_train/36061327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDatabaseName( String sessionIdentifier ) throws NoSessionException, GeneralizedException, InsufficientPermissionException{
checkSession( sessionIdentifier );
checkRight(sessionIdentifier, "System.Information.View");
try{
return appRes.getDatabaseName();
}catch (SQLException e){
appRes.logExceptionEvent(EventLogMessage.EventType.SQL_EXCEPTION, e );
throw new GeneralizedException();
}catch (NoDatabaseConnectionException e) {
appRes.logExceptionEvent(EventLogMessage.EventType.DATABASE_FAILURE, e);
throw new GeneralizedException();
}
}
COM: <s> retrieve the database name </s>
|
funcom_train/48364762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteHostClass(HostClass hc) {
for (NameDomain nd : getNameDomains()) {
nd.getAllowedClasses().remove(hc);
saveNameDomain(nd);
}
for (NetworkClass nc : getNetworkClasses()) {
nc.getAllowedHostClasses().remove(hc);
saveNetworkClass(nc);
}
for (Subnet s : getSubnets()) {
s.getSubnetAllowedHostClasses().remove(hc);
s.getSubnetDeniedHostClasses().remove(hc);
saveSubnet(s);
}
getSession().delete(hc);
getSession().flush();
}
COM: <s> deletes a host class also removes any references to the host class from </s>
|
funcom_train/40359233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Properties getBaseProperties() {
// Create an original set of properties.
Properties props = new Properties();
props.setProperty(Context.GSA_FEED_HOST_PROPERTY_KEY, "fubar");
props.setProperty(Context.GSA_FEED_PORT_PROPERTY_KEY, "25");
return props;
}
COM: <s> returns a base set of connector manager properties </s>
|
funcom_train/4232762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(EventMarker marker) {
double time = Double.parseDouble(getProperty("timestamp"));
double otherTime = Double.parseDouble(marker.getProperty("timestamp"));
if (time < otherTime) {
return -1;
} else if (time > otherTime) {
return 1;
} else {
return 0;
}
}
COM: <s> compare two event markers </s>
|
funcom_train/4359991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void openRedirector() {
if (! redirectorConfigured) {
configureRedirector();
}
if (redirectOutput) {
redirector.createStreams();
redirectOutStream = redirector.getOutputStream();
redirectOutPrintStream = new PrintStream(redirectOutStream);
redirectErrStream = redirector.getErrorStream();
redirectErrPrintStream = new PrintStream(redirectErrStream);
}
}
COM: <s> set up properties on the redirector and create output streams </s>
|
funcom_train/25012173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Thread getThread() {
Thread theThread;
TaskState state;
synchronized (mutex) {
theThread = thread;
state = taskState;
}
if (state.isBefore(TaskState.PREPARED)) {
return null;
}
else {
if (theThread == null) {
return Thread.currentThread();
}
else {
return theThread;
}
}
}
COM: <s> gets the thread executing the task </s>
|
funcom_train/35783736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean showError(L2PcInstance player, Throwable t) {
_log.log(Level.WARNING, "", t);
if (player.getAccessLevel() > 0) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
t.printStackTrace(pw);
pw.close();
String res = "<html><body><title>Script error</title>"+sw.toString()+"</body></html>";
return showResult(player, res);
}
return false;
}
COM: <s> show message error to player who has an access level greater than 0 </s>
|
funcom_train/35847287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Fig determineFigTarget(Object target) {
if (!(target instanceof Fig)) {
Project p = ProjectManager.getManager().getCurrentProject();
Collection col = p.findFigsForMember(target);
if (col == null || col.isEmpty()) {
target = null;
} else {
target = col.iterator().next();
}
}
return target instanceof Fig ? (Fig) target : null;
}
COM: <s> calculates the most probable fig form of some target </s>
|
funcom_train/27749037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color getForeground() {
if (handle == 0) SWT.error(SWT.ERROR_WIDGET_DISPOSED);
GdkGCValues values = new GdkGCValues();
OS.gdk_gc_get_values(handle, values);
GdkColor color = new GdkColor();
int colormap = OS.gdk_colormap_get_system();
OS.gdk_colormap_query_color(colormap, values.foreground_pixel, color);
return Color.gtk_new(data.device, color);
}
COM: <s> returns the receivers foreground color </s>
|
funcom_train/5865041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActivePage(Treeitem item) {
if (item.isVisible() && item.getTree() == this && isVisible()) {
int index = getVisibleIndexOfItem(item);
if (index != -1) {
final Paginal pgi = getPaginal();
int pg = index / pgi.getPageSize();
if (pg != getActivePage())
setActivePage(pg);
}
}
}
COM: <s> sets the active page in which the specified item is </s>
|
funcom_train/26017617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String encodeMessage() {
String retval;
if (requestLine != null) {
this.setRequestLineDefaults();
retval = requestLine.encode() + super.encodeSIPHeaders();
} else if (this.isNullRequest()) {
retval = "\r\n\r\n";
} else
retval = super.encodeSIPHeaders();
return retval;
}
COM: <s> encode only the headers and not the content </s>
|
funcom_train/50504155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResourceReference addResourceReference(String name, String className, int type) {
if (getResourceReference(name) != null) {
throw new IllegalArgumentException("Invalid resource reference, already existing.");
}
ResourceReference ref = new ResourceReference(name, className, type, this);
resourceReferences.add(ref);
ref.addBeanListener(this);
fireChildBeanAdded(ref);
return ref;
}
COM: <s> adds a resource reference to the </s>
|
funcom_train/39066384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTree(Composite parent) {
markTreeViewer = new TreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);
markTreeViewer.setContentProvider(new MarkTreeContentProvider());
markTreeViewer.setLabelProvider(new MarkTreeLabelProvider());
jumpToNoteListener = new JumpToNoteListener();
markTreeViewer.addDoubleClickListener(jumpToNoteListener);
}
COM: <s> creates the tree view that will be used to visualize marks </s>
|
funcom_train/3762332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillFilterList(){
ListIterator filterIter = m_initialFilters.listIterator();
m_includeModel.clear();
m_excludeModel.clear();
while (filterIter.hasNext()) {
Filter tmp = (Filter)filterIter.next();
if ( tmp.isInclude() ) {
m_includeModel.addFilter(tmp);
}
else {
m_excludeModel.addFilter(tmp);
}
}
}
COM: <s> helper method for filling in the filters from the file or from the </s>
|
funcom_train/35323310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int setCompletion(int completion) {
for (int s;;) {
if ((s = status) < 0)
return s;
if (UNSAFE.compareAndSwapInt(this, statusOffset, s, completion)) {
if (s != 0)
synchronized (this) { notifyAll(); }
return completion;
}
}
}
COM: <s> marks completion and wakes up threads waiting to join this task </s>
|
funcom_train/41163125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoTextualUnity entity) {
EntityManagerHelper.log("deleting CoTextualUnity instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoTextualUnity.class, entity.getTextualUnityId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co textual unity entity </s>
|
funcom_train/38723816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setMeasures(CyNetwork network, Map<Integer, Point2D.Double> coordinates) {
for (String name : measures.keySet()) {
if (fitnessFunction.contains(name)) {
engine.put(name, measures.get(name).computeMeasure(network, coordinates));
}
}
}
COM: <s> this method calls the code compute measure network coordinates code </s>
|
funcom_train/17203716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Instruction do_iload(int index) {
Operand r = getLocal(index);
if (VM.VerifyAssertions) VM._assert(r.isIntLike());
if (LOCALS_ON_STACK) {
push(r);
return null;
} else {
return _moveHelper(INT_MOVE, r, TypeReference.Int);
}
}
COM: <s> simulate a load from a given local variable of an int </s>
|
funcom_train/22287785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean eventInHeader(Event evt) {
if (getColumnCount() == 0) {
return false;
} else {
TableColumn lastCol = getColumn(getColumnIndex(columnCount-1));
int maxX = Math.min(content.tx + lastCol.pos + lastCol.size + lastCol.fill + 5, content.width);
return (evt.y>0 && evt.y<=hdrHeight && evt.x>=0 && evt.x<=maxX);
}
}
COM: <s> checks whether the given event is located in the header area </s>
|
funcom_train/18433444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearSelection() {
int seriesCount = getSeriesCount();
for (int s = 0; s < seriesCount; s++) {
int itemCount = getItemCount(s);
for (int i = 0; i < itemCount; i++) {
setSelected(s, i, false, false);
}
}
}
COM: <s> clears the selection state for all data items </s>
|
funcom_train/9238043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean callChannelCTCPReply(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sType, final String sMessage, final String sHost) {
final CallbackOnChannelCTCPReply cb = (CallbackOnChannelCTCPReply)getCallbackManager().getCallbackType("OnChannelCTCPReply");
if (cb != null) { return cb.call(cChannel, cChannelClient, sType, sMessage, sHost); }
return false;
}
COM: <s> callback to all objects implementing the channel ctcpreply callback </s>
|
funcom_train/1216875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initCoverageMap(String file) throws XSLTCoverageException {
File xslt = new File(file);
if (!xslt.isDirectory() && file.contains(".xsl")) {
try {
instrument(CoverageIOUtil.toString(new FileInputStream(xslt)),
xslt);
} catch (IOException e) {
throw new XSLTCoverageException(
"Error while intrumenting XSLTs!", e);
}
}
}
COM: <s> initialiseert de coverage data op basis van een of meerdere directories </s>
|
funcom_train/19977704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ReturnValue select() throws NodataFoundException {
ReturnValue data = freeSelectQuery("SELECT * FROM " + table + " " + context.getConditions(), mpv5.usermanagement.MPSecurityManager.VIEW, null);
if (data.getData().length == 0) {
throw new NodataFoundException(context);
} else {
return data;
}
}
COM: <s> this is a convenience method to retrieve data such as select from table </s>
|
funcom_train/3289982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaults(MMObjectNode node) {
super.setDefaults(node);
// Set the default value for pos and length to 0 (0:0:0.0)
node.setValue("pos",0);
node.setValue("end",0);
node.setValue("length",0);
// All time values are default stored in milliseconds.
node.setValue("type",MILLIS);
}
COM: <s> sets defaults for a node </s>
|
funcom_train/37190265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
setHorizontalAlignment(RIGHT);
if(value == null) value = "";
value = ((String)value).trim()+" "; // Padding on right just looks better.
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
return this;
}
COM: <s> return a component that has been configured to display text right justified </s>
|
funcom_train/8417630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calculateBestCurrentWord() {
if (currLetterGroup == null
|| !currLetterGroup.getLetters().equals(currString)) {
currLetterGroup = DBWordList.getLetterGroup(currString);
}
currentBestWord = currLetterGroup.getBestSubstring();
log.debug("CurrentBestWord = " + currentBestWord.getWord()
+ " Score = " + currentBestWord.getScore());
}
COM: <s> calculates and updates best current word possible and its score given the </s>
|
funcom_train/35811787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean start() {
boolean result = false;
if (!isRunning()) {
ActivityUtils.start(messageProcessor);
ActivityUtils.start(transportQueue);
connection.connect();
if (connection.isConnected()) {
statusWatcher.watchConnection(connection);
RoomCredentials[] roomCredentials = config
.getRoomsCredentials();
if (roomCredentials != null && roomCredentials.length > 0) {
for (RoomCredentials rc : roomCredentials) {
IRoom room = connection.createRoom(rc);
statusWatcher.watchRoom(room);
}
}
setRunning(true);
}
}
return result;
}
COM: <s> starts service attempts to establish connection to remote xmpp server </s>
|
funcom_train/17202438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChild(TreeNode node) {
if (leftChild == null) {
leftChild = node;
} else {
// get to the last sibling
TreeNode siblingNode = leftChild;
while (siblingNode.rightSibling != null) {
siblingNode = siblingNode.rightSibling;
}
siblingNode.rightSibling = node;
}
node.parent = this;
}
COM: <s> adds a child to this node </s>
|
funcom_train/33631823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerTask(Task task) {
if (m_schedulingStarted) {
throw new IllegalStateException(
"Cannot register tasks after scheduling has begun!");
}
for (Object object : task.getUsedResources()) {
Resource resource = m_resources.get(object);
if (resource == null) {
m_resources.put(object, new Resource(object, task
.getOriginalPriority()));
} else if (task.getOriginalPriority() < resource.getCeiling()) {
resource.setCeiling(task.getOriginalPriority());
}
}
}
COM: <s> all tasks must be registered before any can be scheduled </s>
|
funcom_train/29516282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String outBed() {
StringBuffer s = new StringBuffer();
s.append(this.chromosome + "\t");
s.append(this.alignStart + "\t");
s.append(this.alignEnd + "\t");
s.append(this.alignseq + "\t"); //type (dual use field)
s.append(this.identity + "\t"); //colour (dual use field)
s.append(this.direction);
return s.toString();
}
COM: <s> produce a bed string from the aligned read </s>
|
funcom_train/2877548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassLoader getClassLoader(String codebase)
throws MalformedURLException { // SecurityException
ClassLoader result = defaultProviderInstance.getClassLoader(codebase);
if (debug != null) {
debug.println("getClassLoader:#1 codebase=" + codebase);
}
SFClassLoader.quickRejectObject(result);
if (debug != null) {
debug.println("getClassLoader:#2 codebase=" + codebase);
}
return result;
}
COM: <s> provides the implementation for </s>
|
funcom_train/14012825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTitle(String value) {
NodeList titles = getDocument().getElementsByTagName("title");
if (titles.getLength() == 1) {
DomUtil.setElementText((Element) titles.item(0), value == null ? "" : value);
}
}
COM: <s> convenience method to set the title of the document </s>
|
funcom_train/33509672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFeedTask(Component comp, IFeed $feed){
FeedUpdateCheckTask task = new FeedUpdateCheckTask($feed);
task.addListener(new UpdateHandler(comp));
tasks.put($feed.getURL(), task);
_pool.scheduleWithFixedDelay(task, 0, UpdateMonitorExternalComponent.CHECK_UPDATE_INTERVAL, TimeUnit.SECONDS);
}
COM: <s> add a feed check task into the </s>
|
funcom_train/25986789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object variableTableFastStore(String internedName, Object value) {
assert internedName == internedName.intern() : internedName + " not interned";
synchronized(this) {
if (variables == null) {
variables = new InstanceVariableTable(internedName, value);
} else {
variables.fastStore(internedName, value);
}
}
return value;
}
COM: <s> will store the value under the specified name where the name </s>
|
funcom_train/46591473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void validateInstance(Player player, XPathHelper helper) {
assertEquals("The Player Title is not set correctly",
helper.evaluateXPathAsString("//title/text()"), player.getTitle());
assertEquals("The Player Side is not set correctly",
helper.evaluateXPathAsString("//side/text()"), player.getSide().toString());
}
COM: <s> method validates an instance of player </s>
|
funcom_train/14373059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ChannelValueViewer (DataCellInterface cell, InputChannelInterface channel, SimpleDataSeries channelData) {
this.selectedChannelInterface = channel;
this.selectedDataSeries = channelData;
this.cell = cell;
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
// TODO Auto-generated method stub
cleanup();
}
} );
buildDetailViewer();
// setPreferredSize(new Dimension(DEFAULT_MINWIDTH, DEFAULT_MINHEIGHT));
// add(new JLabel("W H A T????"));
}
COM: <s> creates a new detail viewer </s>
|
funcom_train/16627598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSection(String defaultSection) {
if (isStandardSection(defaultSection)) {
int i,N;
for(i=0,N=_defaultSections.length;i<N && !defaultSection.equals(_defaultSections[i]);i++);
addSection(defaultSection,_defaultSectionTexts[i]);
} else {
addSection(defaultSection,defaultSection);
}
}
COM: <s> add a default section i </s>
|
funcom_train/51695996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent evt)
{
if ( evt.getSource() == this.getWizard() && evt.getPropertyName().equals("locale") )
{
/** apply the correct ResourceBundle according to the new locale */
if ( evt.getNewValue() instanceof Locale )
{
this.internationalize( (Locale)evt.getNewValue() );
}
}
}
COM: <s> this method gets called when a bound property is changed </s>
|
funcom_train/8097294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateTree() {
DefaultMutableTreeNode root;
root = new DefaultMutableTreeNode(LABEL_ROOT);
if (m_TextOptionsFull.getText().length() > 0)
parse(root, m_TextOptionsFull.getText());
m_TreeOptions.setModel(new DefaultTreeModel(root));
}
COM: <s> updates the tree with the current full options </s>
|
funcom_train/14012523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateSelection(RadioButton changedButton) {
if (buttons == null || !changedButton.isSelected()) {
return;
}
Iterator buttonIt = buttons.iterator();
while (buttonIt.hasNext()) {
RadioButton button = (RadioButton) buttonIt.next();
if (!button.equals(changedButton)) {
button.setSelected(false);
}
}
}
COM: <s> notifies the code button group code that a code radio button code </s>
|
funcom_train/37558083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData(MedicalValue mv) {
other = (Other)mv;
other.getTimeInterval().setConvertCode("yyyy-MM-dd HH:mm");
fromDate.setDate(other.getTimeInterval().getBeginning());
toDate.setDate(other.getTimeInterval().getEnd());
commentTextArea.setText(other.getComment());
}
COM: <s> sets the data about the event </s>
|
funcom_train/3364587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setModel(TreeModel model) {
completeEditing();
if(treeModel != null && treeModelListener != null)
treeModel.removeTreeModelListener(treeModelListener);
treeModel = model;
if(treeModel != null) {
if(treeModelListener != null)
treeModel.addTreeModelListener(treeModelListener);
}
if(treeState != null) {
treeState.setModel(model);
updateLayoutCacheExpandedNodesIfNecessary();
updateSize();
}
}
COM: <s> sets the tree model </s>
|
funcom_train/8065860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isMultiSelectTrigger(MouseEvent me) {
// If the control key is down and this is not a popup trigger then
// this cannot be a mac and will return true.
// If the meta key is down then this can only be a mac and will return
// true
return (me.isControlDown() && !me.isPopupTrigger()) || me.isMetaDown();
}
COM: <s> determine if a mouse event was to toggle selection of multiple items </s>
|
funcom_train/22335733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HttpClient setHttpClient(String id, HttpClient httpClient) {
if (StringUtil.isEmpty(id) || httpClient == null) throw new IllegalArgumentException("Parameters must not be null - id=" + id + " httpclient=" + httpClient);
return ivHttpClients.put(id, httpClient);
}
COM: <s> to replace a http client in current cache </s>
|
funcom_train/29722400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemServers() {
if (jMenuItemServers == null) {
jMenuItemServers = new JMenuItem();
jMenuItemServers.setText(Bundle
.getText("wizardMainFrame.menuBar.tools.servers"));
jMenuItemServers.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new ServersFrame(WizardMainFrame.this);
}
});
}
return jMenuItemServers;
}
COM: <s> this method initializes j menu item servers </s>
|
funcom_train/10779862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEvictInstance() {
populate();
assertInCache(CachedPerson.class, 10);
assertInCache(CachedPerson.class, 11);
assertNotInCache(CachedPerson.class, 1);
emf.getCache().evict(CachedPerson.class, 11);
assertInCache(CachedPerson.class, 10);
assertNotInCache(CachedPerson.class, 11);
assertNotInCache(CachedPerson.class, 1);
}
COM: <s> evict a single entity instance of type cached person from the cache </s>
|
funcom_train/24262031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRawVariableValidationN2() {
try {
RawVariable rawVariable1 = (RawVariable) ht87.clone();
rawVariable1.setLabel("");
curationService.addRawVariable(demoUser, rawVariable1);
fail();
}
catch(MacawException exception) {
int totalNumberOfErrors
= exception.getNumberOfErrors();
assertEquals(1, totalNumberOfErrors);
int numberOfErrors
= exception.getNumberOfErrors(MacawErrorType.INVALID_RAW_VARIABLE);
assertEquals(1, numberOfErrors);
}
}
COM: <s> check that label is not blank </s>
|
funcom_train/50501273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void childBeanAdded(Object parentBean, Object child) {
if(propagateChildChanges) {
synchronized(listeners) {
Iterator iter = listeners.iterator();
while(iter.hasNext()) {
IBeanListener l = (IBeanListener) iter.next();
l.childBeanAdded(parentBean, child);
}
}
}
}
COM: <s> fires a child bean added event to all registered listeners </s>
|
funcom_train/3427472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getResult() {
try {
final LiteralExpr arg = (LiteralExpr) argument();
final String qname = arg.getValue();
final int index = qname.indexOf(':');
final String localName = (index > 0) ?
qname.substring(index + 1) : qname;
return getParser().elementSupported(arg.getNamespace(),
localName);
}
catch (ClassCastException e) {
return false;
}
}
COM: <s> returns the result that this function will return </s>
|
funcom_train/45621859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void lockSearchUI() {
nameField.setEditable(false);
searchButton.setEnabled(false);
nameMatchesList.setEnabled(false);
addPwButton.setEnabled(true);
pwFieldInitial.setEditable(true);
pwFieldFinal.setEditable(true);
lockButton.setText("This is not my name");
pwFieldInitial.requestFocusInWindow();
}
COM: <s> locks the search ui forcing the users attention onto the password </s>
|
funcom_train/26216887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getKeyCode(String action) {
log.debug("getKeyCode");
for (Iterator iterator = mapping.entrySet().iterator(); iterator.hasNext(); ) {
Map.Entry entry = (Map.Entry)iterator.next();
if (action.equals((String)entry.getValue())) {
return ((Integer)entry.getKey()).intValue();
}
}
return -1;
}
COM: <s> returns the key code of the given action </s>
|
funcom_train/2325153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int rank() {
float eps = (float) Math.pow(2.0, -23.0);
float tol = Math.max(m, n) * elementsS[0] * eps;
int r = 0;
for (int i = 0; i < elementsS.length; i++) {
if (elementsS[i] > tol) {
r++;
}
}
return r;
}
COM: <s> returns the effective numerical matrix rank which is the number of </s>
|
funcom_train/19745936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AnswerOption updateAnswerOption(AnswerOption answerOption) {
AnswerOption oldAnswerOption = null;
if ( !answerOption.getQuestion().equals(this) ) {
int index = answerOption.getQuestion().answerOptions.indexOf(answerOption);
if (index != -1)
oldAnswerOption = (AnswerOption) answerOption.getQuestion().answerOptions.remove(index);
answerOptions.add(answerOption);
answerOption.setQuestion(this);
}
return oldAnswerOption;
}
COM: <s> updates changed option </s>
|
funcom_train/49791084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveModel(Resource resource, File file) throws FileNotFoundException, IOException {
// save the model
Map<?,?> options = resource.getResourceSet().getLoadOptions();
resource.save(new FileOutputStream(file), options);
System.out.println("inferred model saved to: " + file.getAbsolutePath());
}
COM: <s> save the model stored in the given resource to the given file </s>
|
funcom_train/45714977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createClone(CellOJ cell, String objectDefName, int stackIndex) {
if (ytem != null) {
ytem.setOpen(false);
}
ytem = OJ.getDataProcessor().createNewYtem(objectDefName);
ytem.setStackIndex(stackIndex);
ytem.setOpen(true);
OJ.getDataProcessor().addYtem(cell, ytem);
pointCount = 0;
closed = false;
}
COM: <s> adds an ytem of any type to the indicated cell </s>
|
funcom_train/38553167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSystemCode(){
SystemCode systemCode = null;
LogEntryQuery eq = new LogEntryQuery();
eq.setSystemCodeType(null);
assertNull("entry code test null", eq.getSystemCodeType());
eq.setSystemCodeType("Test");
assertEquals("Test for the system code",
"Test",
eq.getSystemCodeType());
}
COM: <s> test getting and setting the entry code </s>
|
funcom_train/18644026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void subSessionStarted(Session parent, Session session) {
String xml="<sd:"+TrackerEvent.SUB_SESSION_STARTED+
" "+SERVICE_INSTANCE_ID_ATTR+"=\""+
getServiceInstanceId(session)+"\" "+
PARENT_SESSION_ID_ATTR+"=\""+getSessionId(parent)+
"\" "+SESSION_ID_ATTR+"=\""+
getSessionId(session)+"\" "+TIMESTAMP_ATTR+"=\""+
System.currentTimeMillis()+"\" />";
record(getServiceName(session), session, xml, INFO, null);
}
COM: <s> this method indicates that a new sub session </s>
|
funcom_train/18895360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHostname(String newHostname) {
// Prevent the hostname from being changed while the server is up
if (this.getState() == STARTED) {
throw new IllegalStateException(
"Can't change hostname without first stopping the server");
}
// Reset the field
if (hostname == null) {
this.hostname = "localhost";
logger.warn("Hostname supplied is null, defaulting to localhost");
}
else {
hostname = newHostname;
}
}
COM: <s> sets the hostname of the server </s>
|
funcom_train/48333093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MethodInfo getInvokedMethod (ThreadInfo th) {
// since INVOKESPECIAL is only used for private methods and ctors,
// we don't have to deal with null object calls
if (invokedMethod == null) {
ClassInfo ci = ClassInfo.getResolvedClassInfo(cname);
invokedMethod = ci.getMethod(mname, true);
}
return invokedMethod; // we can store internally
}
COM: <s> we can do some more caching here the method info should be const </s>
|
funcom_train/12548545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void trace() {
Configuration[] configs = configurations.getSelected();
if (configs.length == 0) {
JOptionPane.showMessageDialog(configurations,
NO_CONFIGURATION_ERROR, NO_CONFIGURATION_ERROR_TITLE,
JOptionPane.ERROR_MESSAGE);
return;
}
for (int i = 0; i < configs.length; i++) {
TraceWindow window = (TraceWindow) configurationToTraceWindow
.get(configs[i]);
if (window == null) {
configurationToTraceWindow.put(configs[i], new TraceWindow(
configs[i]));
} else {
window.setVisible(true);
window.toFront();
}
}
}
COM: <s> given the selected configurations shows their trace </s>
|
funcom_train/15396903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasSubmitButton() {
NodeList elems = element.getElementsByTagName("INPUT");
for (int i = 0; i < elems.getLength(); i++) {
Element element = (Element) elems.item(i);
if ("SUBMIT".equalsIgnoreCase(element.getAttribute("TYPE"))) {
return true;
}
}
return false;
}
COM: <s> indicates whether the form has a submit button </s>
|
funcom_train/2713714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void renderWelcomeScreen(Graphics2D g, int start) {
g.setComposite(AlphaComposite.Clear);
g.setPaintMode();
g.setColor(Color.BLUE);
g.setFont(FontConstants.WINDOW_TITLE_FONT);
g.drawString("Loading. Please wait a while...", 60, 180);
}
COM: <s> renders the welcome screen </s>
|
funcom_train/5376442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder buf = new StringBuilder(80);
buf.append(getClassName());
buf.append('.');
buf.append(getMethodName());
if (isNativeMethod()) {
buf.append("(Native Method)");
} else {
String fName = getFileName();
if (fName == null) {
buf.append("(Unknown Source)");
} else {
int lineNum = getLineNumber();
buf.append('(');
buf.append(fName);
if (lineNum >= 0) {
buf.append(':');
buf.append(lineNum);
}
buf.append(')');
}
}
return buf.toString();
}
COM: <s> return a string representating this stack trace element object </s>
|
funcom_train/22929381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCloseDataConnection() {
StubSocket stubSocket = createTestSocket(DATA);
session.socketFactory = new StubSocketFactory(stubSocket);
session.setClientDataHost(clientHost);
session.openDataConnection();
session.closeDataConnection();
assertTrue("client data socket should be closed", stubSocket.isClosed());
}
COM: <s> test the close data connection method </s>
|
funcom_train/44161674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(ActionEvent ae) {
QueryAction qa = new QueryAction();
qa.setMode("Add");
qa.setQuery(new Query());
qa.setCurquery(new Query());
qa.getQuery().setHead(true);
qa.getCurquery().setHead(true);
getSession().setAttribute("query", qa);
}
COM: <s> add sets add query mode </s>
|