__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/18788179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MdrUmlClass findClass(MdrUmlPackage context, String unqualifiedName) {
assert (context != null) && (unqualifiedName != null);
MdrUmlClass mClass = null;
for (MdrUmlClass clazz : context.getClasses()) {
if (unqualifiedName.equals(clazz.getName())) {
mClass = clazz;
break;
}
mClass = null;
}
return mClass;
}
COM: <s> finds a class within a package </s>
|
funcom_train/46766578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String runSettings(String mode){
String s = "";
for (int y = 0;y<options.size();y++){
Option t = options.get(y); Option t2 = suboptions.get(y);
if (t.getValue().length()>0){
if (t.getValue().equalsIgnoreCase("VOID")==false)
s+=t.getRunTimeCommand(mode);
}
if (t2 != null){
if (t2.getValue().length()>0){
if (t2.getValue().equalsIgnoreCase("VOID")==false)
s+=t2.getRunTimeCommand(mode);
}
}
}
return s;
}
COM: <s> returns the command line as it should be run </s>
|
funcom_train/16818464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getImplementsDesc() {
Class ifs[] = cl.getInterfaces();
if (ifs.length == 0) return "";
int i;
String s = "implements ";
for (i = 0; i < ifs.length; i++) {
s = s + ifs[i].getName();
if (i != ifs.length-1) {
s = s + ", ";
}
}
return s;
}
COM: <s> returns the string tt implements tt followed by the list of </s>
|
funcom_train/4174103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getSize(String column) throws SQLException {
if (index.containsKey(column)) {
return size[index.get(column).intValue()];
} else {
final SQLExceptionState state = SQLExceptionState.COLUMN_NOT_FOUND;
throw new SQLException("Column " + column + " does not exist in dataset.", state.name(), state.code());
}
}
COM: <s> returns the designated columns total size in characters bytes or digits </s>
|
funcom_train/4190489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCurrentDate() {
String result = "";
String offstr = null;
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf1,sdf2,offset = null;
sdf1 = new SimpleDateFormat("yyyy-MM-dd");
sdf2 = new SimpleDateFormat("HH:mm:ss");
offset = new SimpleDateFormat("Z");
offstr = offset.format(cal.getTime());
result = sdf1.format(cal.getTime()) + "T" + sdf2.format(cal.getTime()) + offstr.substring(0,3) + ":" + offstr.substring(3,5);
return result;
}
COM: <s> returns a string with the current date in atom conform structure </s>
|
funcom_train/18748384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getFreshNode(int creatorIndex, Graph graph) {
Node result = null;
Collection<Node> currentFreshNodes = getFreshNodes(creatorIndex);
Iterator<Node> freshNodeIter = currentFreshNodes.iterator();
while (result == null && freshNodeIter.hasNext()) {
Node freshNode = freshNodeIter.next();
if (!graph.containsElement(freshNode)) {
result = freshNode;
}
}
if (result == null) {
result = createNode();
currentFreshNodes.add(result);
}
return result;
}
COM: <s> returns a node that is fresh with respect to a given graph </s>
|
funcom_train/40022714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean tryDB(){
try {
Class.forName("org.h2.Driver");
conn = DriverManager.getConnection("jdbc:h2:" + DBUrl + "store/" + graph_id, username, passwd);
stmt = conn.createStatement();
} catch (SQLException e) {
//e.printStackTrace();
log("tryDB() -> DB Connection Exception");
return false;
} catch (ClassNotFoundException e) {
//e.printStackTrace();
log("tryDB() -> DB Connector ClassNotFoundException");
}
return true;
}
COM: <s> try to connect db </s>
|
funcom_train/33772645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteMessage(String receiptHandle) throws SQSException {
Map<String, String> params = new HashMap<String, String>();
params.put("ReceiptHandle", receiptHandle);
GetMethod method = new GetMethod();
try {
//DeleteMessageResponse response =
makeRequestInt(method, "DeleteMessage", params, DeleteMessageResponse.class);
} finally {
method.releaseConnection();
}
}
COM: <s> deletes the message identified by receipt handle on the queue this object represents </s>
|
funcom_train/22347638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showMessages() {
Iterator fieldsIt = getFields();
while(fieldsIt.hasNext()) {
Field field = (Field) fieldsIt.next();
if(field.getConstraints() != null) {
Vector messages = field.getConstraints().getMessages();
for(int i = 0; i < messages.size(); i++) {
field.getElement().addElement("message").addText(
(String) messages.get(i));
}
}
}
}
COM: <s> show error messages for all forms fields constraints </s>
|
funcom_train/48809407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefaultMutableTreeNode addNode(DefaultMutableTreeNode parent, String name) {
DefaultMutableTreeNode reply = null;
if (parent == null)
top.add(reply = new DefaultMutableTreeNode(name));
else
parent.add(reply = new DefaultMutableTreeNode(name));
return reply;
}
COM: <s> adds a node with a given name to the tree </s>
|
funcom_train/45801431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isReadOnly() {
TopicMap tm = getTopicMap();
TopicIF aType = OntopolyModelUtils.getTopicIF(tm, PSI.ON_IS_READONLY_TYPE);
TopicIF rType = OntopolyModelUtils.getTopicIF(tm, PSI.ON_ONTOLOGY_TYPE);
TopicIF player = getTopicIF();
return OntopolyModelUtils.isUnaryPlayer(tm, aType, player, rType);
}
COM: <s> returns true if this typing topic is read only </s>
|
funcom_train/14092989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTreePath2Elements() {
JTree tree = this.createTree();
m_pathData = new PathData(new String[] {"TreeDemo",
"Classical",
"Beethoven",
"concertos",
"No. 1 - C"});
TreePath actualReturn = m_pathData.getTreePath(tree);
assertTrue(actualReturn.getPathCount() == 5);
}
COM: <s> test get tree path with 2 elements </s>
|
funcom_train/23393659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUnmetRequirementPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TaskViolation_unmetRequirement_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TaskViolation_unmetRequirement_feature", "_UI_TaskViolation_type"),
FactPackage.Literals.TASK_VIOLATION__UNMET_REQUIREMENT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the unmet requirement feature </s>
|
funcom_train/17539012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endGame(Notification n) {
// reset game-related state variables. The board controller and hud
// controller also receive this notification, and they will remove their
// views from the screen.
boardController_ = null;
hudController_ = null;
Properties config = (Properties) n.argument();
if (config == null || !config.containsKey("hideMainMenu"))
// show the main menu again, but this time with gameInProgress =
// false
toggleMainMenu(null);
}
COM: <s> called when an end game notification is received </s>
|
funcom_train/44694991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseReleased(MouseEvent e) {
if (finished) {
return;
}
finished = true;
xCurrent = e.getX();
yCurrent = e.getY();
clear();
JGVTComponent c = (JGVTComponent)e.getSource();
consume();
//System.err.println("Mouse released with");
//System.err.println("\txStart=" + xStart +" yStart=" + yStart);
//System.err.println("\txCurrent=" + xCurrent + " yCurrent=" + yCurrent);
c.repaint();
}
COM: <s> invoked when a mouse button has been released on a component </s>
|
funcom_train/27810634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String resolveThemeName(HttpServletRequest request) {
String themeId = (String) request.getAttribute("subsonic.theme");
if (themeId != null) {
return themeId;
}
// Optimization: Cache theme in the request.
themeId = doResolveThemeName(request);
request.setAttribute("subsonic.theme", themeId);
return themeId;
}
COM: <s> resolve the current theme name via the given request </s>
|
funcom_train/41440131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sbbCreate() throws CreateException {
if (doTraceLogs) {
log.trace("sbbCreate()");
}
if (this.getState() != SbbObjectState.POOLED) {
throw new SLEEException("sbbCreate: should be pooled state was "
+ this.getState());
}
if (sbbComponent.getAbstractSbbClassInfo().isInvokeSbbCreate()) {
this.invocationState = SbbInvocationState.INVOKING_SBB_CREATE;
this.sbbConcrete.sbbCreate();
this.invocationState = SbbInvocationState.NOT_INVOKING;
}
}
COM: <s> an sbb object transitions from the pooled state to the ready state when </s>
|
funcom_train/14232765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData(NetworkInterface dev, byte[] dst_mac, byte[] src_mac, InetAddress src_addr, JpcapSender sender) throws IOException{
this.dev = dev;
this.dst_mac = dst_mac;
this.src_mac = src_mac;
this.src_addr = src_addr;
this.sender = sender;
this.init = true;
this.hostIP = src_addr.getHostAddress();
}
COM: <s> prepares a singleton with necessary information regarding the device in use </s>
|
funcom_train/47528847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void proxyPut(ByteArray key, Versioned<byte[]> value) throws VoldemortException {
List<Versioned<byte[]>> proxyValues = proxyGet(key);
try {
for(Versioned<byte[]> proxyValue: proxyValues) {
getInnerStore().put(key, proxyValue);
}
} catch(ObsoleteVersionException e) {
// ignore these
}
// finally put client value
getInnerStore().put(key, value);
}
COM: <s> in rebalancing stealer state put should be commited on stealer node </s>
|
funcom_train/50485723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean doRename(Object object, String newName) {
if (!getAdministration().rename(getContext(), getDatabaseConnection(), object, newName)) {
error();
return false;
} else {
refreshContent();
setSelectedName(newName);
return true;
}
}
COM: <s> override to handle default rename action behavior </s>
|
funcom_train/12157115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void analyze(ShorthandAnalyzer[] analyzers) {
for (int i = 0; i < analyzers.length; i++) {
ShorthandAnalyzer analyzer = analyzers[i];
analyzer.analyze(target, inputValues, deviceValues);
Priority priority = analyzer.getShorthandPriority();
if (priority.isGreaterThan(shorthandPriority)) {
shorthandPriority = priority;
}
}
}
COM: <s> invoke the set of analyzers </s>
|
funcom_train/14609263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String addFiles(String fileString, String host, String path, String user,String pass) {
String returnMessage="";
String cmd = "pcli addFiles -m\"First Version\" -z "+"-id"+user+((pass==null||pass.length()==0)?"":":"+pass)+" -pr\""+host+"\""+ " "+path;
returnMessage=runShellCommand(cmd);
setFileReadOnly(fileString);
return returnMessage;
}
COM: <s> add a workfile to pvcs </s>
|
funcom_train/4741844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Connection connect(String host, String key) {
try {
/* Create a connection instance */
Connection conn = new Connection(host);
/* Now connect */
conn.connect();
/* Authenticate */
boolean isAuthenticated = conn.authenticateWithPublicKey("root", key.toCharArray(), "");
if (isAuthenticated == false)
throw new IOException("Authentication failed.");
return conn;
} catch (IOException e) {
e.printStackTrace(System.err);
return null;
}
}
COM: <s> private helper function etablishes a connection to a remote host </s>
|
funcom_train/22560499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PropertyLineWrapper addProperty() {
PropertyLineWrapper line = new PropertyLineWrapper();
line.setKey("");
for (Iterator it = handler.getLocales().keySet().iterator(); it
.hasNext();) {
String locale = (String) it.next();
line.setValue(locale, "");
}
line.setCommentedProperty(false);
line.setComment("");
Iterator iterator = changeListeners.iterator();
while (iterator.hasNext())
((IPropertyListViewer) iterator.next()).addProperty(line);
list.add(line);
return line;
}
COM: <s> add a new task to the collection of tasks </s>
|
funcom_train/45354465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getJMenu3() {
if (jMenu3 == null) {
jMenu3 = new JMenu();
jMenu3.setText("Register");
jMenu3.add(new PayOutForm(this).getMenuItem());
jMenu3.add(new BalanceForm(this).getMenuItem());
}
return jMenu3;
}
COM: <s> this method initializes j menu3 </s>
|
funcom_train/3945774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateIdentifierrefType1_MaxLength(String identifierrefType1, DiagnosticChain diagnostics, Map context) {
int length = identifierrefType1.length();
boolean result = length <= 2000;
if (!result && diagnostics != null)
reportMaxLengthViolation(ImscpRootv1p1p2Package.eINSTANCE.getIdentifierrefType1(), identifierrefType1, length, 2000, diagnostics, context);
return result;
}
COM: <s> validates the max length constraint of em identifierref type1 em </s>
|
funcom_train/10834841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String formatArray(final String[] array) {
if ( array == null || array.length == 0 ) {
return "";
}
final StringBuilder sb = new StringBuilder();
boolean first = true;
for(final String s : array ) {
if ( !first ) {
sb.append('\n');
}
first = false;
sb.append(s);
}
return escape(sb.toString());
}
COM: <s> format an array for html rendering </s>
|
funcom_train/48267622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reportInvalid(String invalid) {
log("About to report invalid...");
Xhr.post(WindowExt.getHostWindow(), GWT.getModuleBaseURL() + "invalid",
invalid, "text/plain", new XhrCb());
}
COM: <s> tell the breaky server that this data set contained an invalid record </s>
|
funcom_train/17544338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void attachEdgeSourceAnchor(String edge, String oldSourcePin, String sourcePin) {
/** I added the first part of this if statement - it is needed for removing widgets. */
if (sourcePin == null) {
((ConnectionWidget) findWidget(edge)).setSourceAnchor(null);
} else {
((ConnectionWidget) findWidget(edge)).setSourceAnchor(getPinAnchor(sourcePin));
}
}
COM: <s> attaches an anchor of a source pin an edge </s>
|
funcom_train/7984830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prependSortPath(final String path) {
if (this.sort != null) {
for (int i = 0; i < this.sort.length; i++) {
if (this.sort[i] != null) {
final Sort sort = this.sort[i];
this.sort[i] = new Sort() {
public Serializable getData() {
return path + "." + sort.getData().toString();
}
public boolean isAscending() {
return sort.isAscending();
}
};
}
}
}
}
COM: <s> prepends a path e </s>
|
funcom_train/42337608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawRectangle(int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (width < 0) {
x = x + width;
width = -width;
}
if (height < 0) {
y = y + height;
height = -height;
}
CGRect rect = new CGRect();
rect.x = x + 0.5f;
rect.y = y + 0.5f;
rect.width = width;
rect.height = height;
OS.CGContextStrokeRect(handle, rect);
}
COM: <s> draws the outline of the rectangle specified by the arguments </s>
|
funcom_train/20044078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _setDataArea() {
executeMethod("getDataArea()");
CellRangeAddress newCRA = new CellRangeAddress();
newCRA.Sheet = oldCRA.Sheet;
newCRA.StartColumn = COL;
newCRA.EndColumn = COL;
newCRA.StartRow = STARTROW;
newCRA.EndRow = ENDROW;
oObj.setDataArea(newCRA);
tRes.tested("setDataArea()", true);
}
COM: <s> test creates new cell range address and calls the method </s>
|
funcom_train/3112447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(ConfigParam property, String value) {
switch (property) {
case LIBGL_PATH: libGL_path = value; break;
case ROM_PATH: rom_path = value; break;
case ROMRCDIR_PATH: romrcdir_path = value; break;
case BIOS_PATH: bios_path = value; break;
}
}
COM: <s> sets the value of an string property </s>
|
funcom_train/8092932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double getZ(double actual, double p) {
double z;
if (actual == 1) {
z = 1.0 / p;
if (z > Z_MAX) { // threshold
z = Z_MAX;
}
} else {
z = -1.0 / (1.0 - p);
if (z < -Z_MAX) { // threshold
z = -Z_MAX;
}
}
return z;
}
COM: <s> computes the logit boost response variable from y p values </s>
|
funcom_train/18577303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int length() {
int l_ = 1;
length_ = payloadLength();
// length_ bytes
if (length_ > 0 && length_ <= 0xFF)
l_ += 1;
else if (length_ > 0xFF && length_ <= 0xFFFF)
l_ += 2;
else if (length_ > 0xFFFF) // unbound!!
l_ += 3;
l_ += name_.length();
return l_ + length_;
}
COM: <s> calculate the length of the tree packet header child packets payload </s>
|
funcom_train/20612458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDefineByDescriptorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ComponentInstance_defineByDescriptor_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ComponentInstance_defineByDescriptor_feature", "_UI_ComponentInstance_type"),
GCLACSPackage.Literals.COMPONENT_INSTANCE__DEFINE_BY_DESCRIPTOR,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the define by descriptor feature </s>
|
funcom_train/40767967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getBibleInfo() {
// draw loading
loading.show();
// remote procedure call to the server to get the bible info
rpc.getBibleInfo(new AsyncCallback<BibleData[]>() {
public void onSuccess(BibleData[] bibleData) {
// draw bible info
drawBibleInfo(bibleData);
// hide loading
loading.hide();
}
public void onFailure(Throwable caught) {
RootPanel.get().add(new HTML(caught.toString()));
}
});
}
COM: <s> rpc request to get the bible info </s>
|
funcom_train/3471948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeItemFromList(JList list, int index) {
DefaultListModel listModel = (DefaultListModel) list.getModel();
if (index <= listModel.getSize()) {
listModel.remove(index);
//removed item in last position
if (index == listModel.getSize()) {
index--;
}
//otherwise select same index
list.setSelectedIndex(index);
}
}
COM: <s> this removes the item with the given index from the given jlist </s>
|
funcom_train/7748546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if ( expr instanceof ASTExpr ) {
AST tree = ((ASTExpr)expr).getAST();
if ( tree.getType()==ActionEvaluatorTokenTypes.INCLUDE ) {
return "$include$";
}
return "$"+((ASTExpr)expr).getAST().toStringList()+"$";
}
if ( expr instanceof StringRef ) {
return expr.toString();
}
return "<invalid node type>";
}
COM: <s> display different things depending on the astexpr type </s>
|
funcom_train/17059902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void undeployApp(Object app) {
String appPath = app.toString();
appPath = appPath.substring(0, appPath.indexOf(":"));
ServiceHub.log("undeployApp " + appPath, getClass(), Level.FINEST);
try {
server.undeploy(appPath);
} catch (Exception ex) {
ServiceHub.logStackTrace(ex, getClass());
}
}
COM: <s> stop and remove a web application from the servlet container </s>
|
funcom_train/50609817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int do_QUERY_REPLY(MessageToken msg){
if (!dep_query_reply.contains(msg.getSender()))
throw new PlaceManagerException(OVER_REPLY);
// remove the sender from the dependency list
dep_query_reply.remove(msg.getSender());
// save the contents of the received message
in_objects.put(getConnectingPort(msg.getSender()), msg.getData());
return processQueryEnd();
}
COM: <s> response to a tk query reply message </s>
|
funcom_train/43326959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void writeCASP(Printf outfile) throws IOException {
outfile.printf("%c",type);
if (predStructure=='H')
outfile.printf(" H %.2f\n",predH);
else if (predStructure=='E')
outfile.printf(" E %.2f\n",predE);
else
outfile.printf(" C %.2f\n",1.0 - predH - predE);
}
COM: <s> writes out this residue in casp format </s>
|
funcom_train/39370459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleFailedPublishAttempt(IPublisher aPublisher, IContext aContext, Event anEvent) {
synchronized (aPublisher) {
setEventDeliveryFailed(true);
BasicFSEventPersister aPersister = getPublisherPersisterMap().get(aPublisher);
if(aPersister == null) {
aPersister = new BasicFSEventPersister(aPublisher.getClass());
getPublisherPersisterMap().put(aPublisher, aPersister);
}
aPersister.persist(aContext, anEvent);
}
}
COM: <s> store the event on the file system </s>
|
funcom_train/3773778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isCollection(NodeRevisionDescriptor revisionDescriptor) {
boolean result = false;
if (revisionDescriptor == null)
return true;
NodeProperty property = revisionDescriptor.getProperty("resourcetype");
if ((property != null)
&& (property.getValue().equals("<collection/>"))) {
result = true;
}
return result;
}
COM: <s> tests if a resource is a collection </s>
|
funcom_train/19422735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getRootApplication() {
EaasyStreet.logTrace(METHOD_IN + GET_ROOT_APPLICATION);
String rootAppl = EaasyStreet.getProperty(Constants.CFG_ROOT_APPLICATION);
User profile = UserProfileManager.getUserProfile();
if (!StringUtils.nullOrBlank(profile.getForcedApplication())) {
rootAppl = profile.getForcedApplication();
EaasyStreet.logTrace("Forced application in effect: " + rootAppl);
}
EaasyStreet.logTrace(METHOD_OUT + GET_ROOT_APPLICATION);
return rootAppl;
}
COM: <s> returns the name of the root application in effect for the current user </s>
|
funcom_train/37752260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object next() throws NoSuchElementException {
int object_length;
long object_offset;
try {
if ( ! hasNext()) {
throw new NoSuchElementException();
}
// Get the next index entry and post-increment
return get_from_position(position++);
} catch (IOException e) {
throw new NoSuchElementException();
}
}
COM: <s> gets the next object in the interation </s>
|
funcom_train/29939837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void resetProgressBar() {
log.info("stopping timer for progress bar");
if (timer != null)
timer.stop();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
parent.status.print(GUI.res.getString("progresslabel"));
parent.mainp.getProgressBar().setIndeterminate(false); // TODO: is this necessary? or is indeterminate always followed by determinate?
parent.mainp.getProgressBar().setValue(0);
parent.mainp.getProgressBar().setEnabled(false);
}
});
}
COM: <s> reset the bar to standard label stopped and empty </s>
|
funcom_train/18095768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanelAddRow() {
JPanel jPanelAddRow = new JPanel();
HelperPanel.formatPanel(jPanelAddRow);
jPanelAddRow.setLayout(new FlowLayout());
jPanelAddRow.add(getJButtonAddRow());
if(panelPPMQuestion!=null)jPanelAddRow.add(getJButtonInsertQuestion(), null);
return jPanelAddRow;
}
COM: <s> this method initializes j panel add row </s>
|
funcom_train/41026603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel2() {
if (jPanel2 == null) {
jPanel2 = new JPanel();
jPanel2.setLayout(new BoxLayout(getJPanel2(), BoxLayout.Y_AXIS));
jPanel2.add(getJTypeAllCheckBox(), null);
jPanel2.add(getJTypeLocomotionCheckBox(), null);
jPanel2.add(getJLocalCheckBox(), null);
}
return jPanel2;
}
COM: <s> this method initializes j panel2 </s>
|
funcom_train/26324709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getAsURL() {
if (_storedAs == OBJECT) {
if (_object instanceof URL) {
return (URL)_object;
} else {
try {
return new URL(String.valueOf(_object));
} catch (MalformedURLException e) {
throw new NumberFormatException("Invalid URL.");
}
}
} else {
throw new NumberFormatException("Invalid URL.");
}
}
COM: <s> returns an url representatioin of this value </s>
|
funcom_train/15406385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void postSetter(PropertyChangeEvent event, Object newValue){
if (pcs != null && event != null){
if (newValue != null && newValue.equals(event.getNewValue())){
pcs.firePropertyChange(event);
} else {
pcs.firePropertyChange(event.getPropertyName(), event.getOldValue(), newValue);
}
}
}
COM: <s> called for subclassed post setter processing </s>
|
funcom_train/1684228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initColorManagerForPlayers() {
colorManagerForPlayers = new ColorManager(new String(""), true);
for (int i=0; i<serverInfo.getPlayers().size(); i++){
colorManagerForPlayers.addItem(serverInfo.getPlayers().get(i));
}
}
COM: <s> initiates the color manager for players </s>
|
funcom_train/22228523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMouseListenerToTable(JTable _table) {
// first check, if listener allready exist
for (int count = 0; count < _table.getMouseListeners().length;
count++) {
if (_table.getMouseListeners()[count] ==
SpatialRenderer.srMouseListener) {
return;
}
}
// add new listener
_table.addMouseListener(srMouseListener);
}
COM: <s> add mouse listener for spatial renderer if not yet added </s>
|
funcom_train/31677851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void exit() {
// store width and height
try {
final Dimension d = this.getSize();
props.set("frameWidth", d.width);
props.set("frameHeight", d.height);
// store frame pos
final Point p = this.getLocation();
props.set("framePosX", p.x);
props.set("framePosY", p.y);
//
props.save(iniFileStr);
} catch (final Exception e) {
e.printStackTrace();
}
System.exit(0);
}
COM: <s> common exit method to use in exit events </s>
|
funcom_train/9854296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImage(String image) {
if (image != null && image.length() == 0)
image = null;
if (!Objects.equals(_src, image)) {
_src = image;
if (_image == null) {
smartUpdate("im", getEncodedSrc());
}
//_src is meaningful only if _image is null
}
}
COM: <s> sets the image source of this listitem </s>
|
funcom_train/48653906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void percolateDown(int hole) {
int child;
BinaryHeapItem tmp = array[hole];
for(; hole * 2 <= currentSize; hole = child)
{
child = hole * 2;
if(child != currentSize && array[child + 1].compareTo(array[child]) < 0)
child++;
if(array[child].compareTo(tmp) < 0)
{
array[hole] = array[child];
array[hole].setPosition(hole);
}
else
break;
}
array[hole] = tmp;
array[hole].setPosition(hole);
}
COM: <s> internal method to percolate down in the heap </s>
|
funcom_train/50338591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void waitMsec( int milliseconds ) {
long target = System.currentTimeMillis() + milliseconds;
while (true) {
long stillToGo = target - System.currentTimeMillis();
if (stillToGo <= 0) {
break;
}
try {
Thread.sleep(stillToGo);
} catch (InterruptedException e) {
Thread.currentThread().interrupt(); // retain if needed later
}
}
}
COM: <s> wait for a specified number of milliseconds and then </s>
|
funcom_train/50605374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTrimsTheLeftOfStrings () {
assertEquals(0, Expression.ltrim("1", 0, 1));
assertEquals(1, Expression.ltrim(" 1", 0, 2));
assertEquals(2, Expression.ltrim(" 1", 0, 3));
assertEquals(3, Expression.ltrim(" 1", 0, 4));
}
COM: <s> ensures expression is capable of trimming the left hand side of strings </s>
|
funcom_train/51130131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getJerseyNumber(Player player) {
for (Iterator<Map.Entry<Integer, Player>> iter = jerseyNumbers.entrySet().iterator(); iter.hasNext();) {
Map.Entry<Integer, Player> entry = iter.next();
if (entry.getValue().equals(player)) {
return entry.getKey();
}
}
return null;
}
COM: <s> returns the jersey number of a player </s>
|
funcom_train/1444741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(String message) throws IOException {
this.sendBuffer.reset();
this.sendBuffer.setString(message);
this.sendPacket.setData(this.sendBuffer.getByteArray());
this.sendPacket.setLength(this.sendBuffer.length());
this.sendPacket.setAddress(this.host);
this.sendPacket.setPort(this.port);
this.socket.send(this.sendPacket);
// debug only
this.command = message;
}
COM: <s> method for sending data to the rcssserver </s>
|
funcom_train/27678693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveAsJpeg(String path) {
Object jpegWriter = null;
WindowManager.setTempCurrentImage(imp);
if (IJ.isJava2())
IJ.runPlugIn("ij.plugin.JpegWriter", path);
else
IJ.runPlugIn("Jpeg_Writer", path);
WindowManager.setTempCurrentImage(null);
if (!(imp.getType()==ImagePlus.GRAY16 || imp.getType()==ImagePlus.GRAY32))
updateImp(fi, fi.GIF_OR_JPG);
return true;
}
COM: <s> save the image in jpeg format using the specified path </s>
|
funcom_train/24087654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String removeRecord() {
log.info("Removing SampleObject from Plan: " + record.getFullname());
recordsToRemove.add(record);
selectedPlan.removeSampleObject(record);
if (record == identifiedRecord) {
identifiedRecord = null;
possibleFormats.clear();
possibleFormatsString = null;
}
allowRemove = -1;
return null;
}
COM: <s> removes a record from the list of samplerecords in the project and also </s>
|
funcom_train/13419134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanup() {
super.cleanup();
for (WorldState state : states.values()) {
if (state instanceof CommandChangeListener) {
if (getCommandStack() != null)
getCommandStack()
.removeCommandChangedListener(
(CommandChangeListener) state);
if (state instanceof ISelectionChangedListener) {
((WorldContext) getContext()).getSelectionManager()
.removeSelectionChangedListener(
(ISelectionChangedListener) state);
}
}
}
}
COM: <s> perform the clean up here </s>
|
funcom_train/51601509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel2() {
if (jPanel2 == null) {
jPanel2 = new JPanel();
jPanel2.setLayout(new BorderLayout());
jPanel2.add(getJComboBox(), BorderLayout.CENTER);
jPanel2.add(getJComboBox1(), BorderLayout.WEST);
jPanel2.setVisible(false);
}
return jPanel2;
}
COM: <s> this method initializes j panel2 </s>
|
funcom_train/35727411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PatternResource getPattern(int idx) {
byte[] pat = new byte[8];
for (int j=0, k=2+(idx<<3); j<pat.length && k<data.length; j++, k++) pat[j] = data[k];
return new PatternResource(id, getAttributes(), name, pat);
}
COM: <s> returns a pattern in this pattern list as a pattern resource </s>
|
funcom_train/50030269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCountOccurancesOfValue(int value) {
int result = 0;
for (int y = 0; y < 9; y++) {
for (int x = 0; x < 9; x++) {
if (cells[y][x].getValue() == value)
result++;
}
}
return result;
}
COM: <s> get the number of occurances of a given value in this grid </s>
|
funcom_train/51616024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Type getType(Object object) {
Type result = null;
if (my_class.isInstance(object)) {
ListIterator i = subtypes.listIterator();
while (i.hasNext() && result == null) result = ((Type)i.next()).getType(object);
if (result == null) result = this;
}
return result;
}
COM: <s> find the actual type of some object </s>
|
funcom_train/8812114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isActivePhase(PhaseDTO phaseDTO) {
final ProjectDTO currentProjectDTO = projectPresenter.getCurrentProjectDTO();
return currentProjectDTO != null && currentProjectDTO.getCurrentPhaseDTO() != null && phaseDTO != null
&& currentProjectDTO.getCurrentPhaseDTO().getId() == phaseDTO.getId();
}
COM: <s> returns if a phase is the active phase of the current project </s>
|
funcom_train/40452239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdAgregarProducto2() {
if (cmdAgregarProducto2 == null) {//GEN-END:|154-getter|0|154-preInit
// write pre-init user code here
cmdAgregarProducto2 = new Command("Agregar este producto", Command.OK, 0);//GEN-LINE:|154-getter|1|154-postInit
// write post-init user code here
}//GEN-BEGIN:|154-getter|2|
return cmdAgregarProducto2;
}
COM: <s> returns an initiliazed instance of cmd agregar producto2 component </s>
|
funcom_train/24130536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeSource(int sourceId) throws ElementDoesNotExistException{
int position=-1;
for(int i=0;i<_vActiveSources.size(); i++){
if(_vActiveSources.elementAt(i)._sourceId==sourceId){
position = i;
break;
}
}
if(position!=-1){
_vActiveSources.removeElementAt(position);
return true;
}
else throw new ElementDoesNotExistException("Source "+sourceId+" does not exist.");
}
COM: <s> removes a source with the given session id </s>
|
funcom_train/45255876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JRadioButton getJRadioButtonTaxaArvoreNao() {
if (jRadioButtonTaxaArvoreNao == null) {
jRadioButtonTaxaArvoreNao = new JRadioButton();
jRadioButtonTaxaArvoreNao.setLocation(new Point(520, 211));
jRadioButtonTaxaArvoreNao.setBackground(new Color(173, 200, 226));
jRadioButtonTaxaArvoreNao.setText("Não");
jRadioButtonTaxaArvoreNao.setSize(new Dimension(49, 21));
}
return jRadioButtonTaxaArvoreNao;
}
COM: <s> this method initializes j radio button taxa arvore nao </s>
|
funcom_train/16689447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDbNames(){
DatabaseMetaData meta;
String dbnames="";
try {
meta = conn.getMetaData();
ResultSet res = meta.getCatalogs();
System.out.println("List of databases: ");
dbnames="";
while (res.next()) {
System.out.println(" " + res.getString("TABLE_CAT"));
dbnames+=res.getString("TABLE_CAT")+",";
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return dbnames;
}
COM: <s> return a comma delimeted list of avalaible databases </s>
|
funcom_train/41290532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean verifyConfiguration(String[] cc){
for(String s:cc){
//System.err.print("Verifying: "+s+"..");
if(s!=null&&!istruzioni.containsKey(s.toLowerCase()))return false;
//System.err.println("OK!");
}
return true;
}
COM: <s> verifies if a configuration is valid </s>
|
funcom_train/5344977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ArrayList getNodeList(Object prefix, Comparator comp) {
if (isEmpty()) {
return null;
}
long length = length(prefix);
if (length == 0l) {
return traverse();
} else {
ArrayList list = new ArrayList();
if (!getByPrefix(prefix, length, list, comp)) {
return null;
}
return list;
}
}
COM: <s> returns a fast node list for the given prefix and comp </s>
|
funcom_train/48655428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String process(HttpServletRequest request, HttpServletResponse response) throws Exception {
System.out.println("Myname is (regular request object):" + request.getParameter("myname"));
HttpSession session = request.getSession();
//session.getAttribute();
return "rental.jsp";
}//process
COM: <s> process add transaction </s>
|
funcom_train/31415871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Template t) {
Activator.getServices().debug("TemplateMap::add():template " + t.getKey());
//1. prepare template accordingly
t.prepareTemplate(m_Group);
//2. add template to hashmap
m_Templates.put(t.getKey(), t);
}//add
COM: <s> adds a pool for a template to this map </s>
|
funcom_train/9637672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void nodesChanged(Object node, int[] childIndices) {
if (node != null && childIndices != null) {
final int cCount = childIndices.length;
if (cCount > 0) {
Object[] cChildren = new Object[cCount];
for (int counter = 0; counter < cCount; counter++) {
cChildren[counter] = getChild(node, childIndices[counter]);
}
fireTreeNodesChanged(this, getPathToRoot(node), childIndices,
cChildren);
}
}
}
COM: <s> invoke this method after youve changed how the children identified by </s>
|
funcom_train/37816450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parse() {
if (formula.equals("")) {
top = null;
if (editor!=null) {
editor.receiveParseMessage(FormulaEditor.MESSAGE_OKAY);
}
}
else {
try {
top = ParserAccess.parse(formula);
if (editor!=null) {
editor.receiveParseMessage(FormulaEditor.MESSAGE_OKAY);
}
}
catch (ParseException e) {
handleParseException();
}
catch (Exception e) {
handleParseException();
}
catch (Error e) {
handleParseException();
}
}
}
COM: <s> parses the current formula </s>
|
funcom_train/18436371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSubtitles() {
DefaultPieDataset dataset = new DefaultPieDataset();
JFreeChart chart = ChartFactory.createPieChart("title", dataset, true);
List subtitles = chart.getSubtitles();
assertEquals(1, chart.getSubtitleCount());
// adding something to the returned list should NOT change the chart
subtitles.add(new TextTitle("T"));
assertEquals(1, chart.getSubtitleCount());
}
COM: <s> some checks for the get subtitles method </s>
|
funcom_train/15884793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isToExclude(String classname) {
if ((excludeClasses != null) && excludeClasses.contains(classname)) {
return true;
}
if (excludePackages == null) {
return false;
}
Enumeration<String> expackages = excludePackages.elements();
while (expackages.hasMoreElements()) {
if (classname.startsWith(expackages.nextElement().toString())) {
return true;
}
}
return false;
}
COM: <s> check whether this class is among the ones to be excluded from the </s>
|
funcom_train/36185178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isInferrable(ICtxEntityIdentifier scope, String attributeType, boolean continuous) throws ContextException {
boolean inferrable = false;
try {
inferrable = remoteHelper.isInferrableMaster(scope, attributeType, continuous);
} catch (ContextException e) {
if (log.isDebugEnabled()) {
log.debug("could not check if inferrable on master: " + e.getLocalizedMessage());
}
inferrable = localHelperPlatform.isInferableLocal(scope, attributeType, continuous);
}
return inferrable;
}
COM: <s> determines if the attribute value is inferrable </s>
|
funcom_train/51343145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _resetState(final ByteBuffer tmp) {
if (tmp == null)
throw new IllegalArgumentException();
// clear the index since all records were flushed to disk.
recordMap.clear();
// clear to well known invalid offset.
firstOffset.set(-1L);
// position := 0; limit := capacity.
tmp.clear();
// Martyn: I moved your debug flag here so it is always cleared by reset().
m_written = false;
}
COM: <s> reset the internal state of the </s>
|
funcom_train/28749925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWorkflowtemplateid(Long newVal) {
if ((newVal != null && this.workflowtemplateid != null && (newVal.compareTo(this.workflowtemplateid) == 0)) ||
(newVal == null && this.workflowtemplateid == null && workflowtemplateid_is_initialized)) {
return;
}
this.workflowtemplateid = newVal;
workflowtemplateid_is_modified = true;
workflowtemplateid_is_initialized = true;
}
COM: <s> setter method for workflowtemplateid </s>
|
funcom_train/41466863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SilenceSuppression decodeSilenceSuppression(String value) throws ParseException {
// silenceSuppression ="on"/"off"
if (value.equalsIgnoreCase("on")) {
return SilenceSuppression.SilenceSuppressionOn;
} else if (value.equalsIgnoreCase("off")) {
return SilenceSuppression.SilenceSuppressionOff;
} else {
throw new ParseException("Invalid value for SilenceSuppression :" + value, 0);
}
}
COM: <s> decode silence suppression object from given text </s>
|
funcom_train/5679808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerThings(int numberOfRegisters) {
Random r = new Random();
for (int i = 0; i < numberOfRegisters; i++) {
int itemNumber = r.nextInt(items.length);
Node n = g.findNode()[0];
pool.addTask(new RegisterTask(n, items[itemNumber]));
}
}
COM: <s> perform a series of registrations on nodes of the simulation graph </s>
|
funcom_train/48463645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeGridSize(int steps) {
final double FACTOR = Math.sqrt(Math.sqrt(2));
for (int i = 1; i <= steps; i++)
gridSize *= FACTOR;
for (int i = 1; i <= -steps; i++)
gridSize /= FACTOR;
grid.setGrid((int) gridSize, (int) gridSize);
graph.layout((Graphics2D) getGraphics(), grid);
repaint();
}
COM: <s> changes the grid size of this panel </s>
|
funcom_train/20889672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getNodeIdAtPosition(int theNodesRow, int theNodesCol) {
int nodeId = -1;
// if the position does not exist then return -1
if ((theNodesCol > nodesPerRow)
|| (nodesPerRow * theNodesRow + theNodesCol) > config.getNodeCount()
|| theNodesRow < 0
|| theNodesCol <= 0) {
return nodeId;
}
nodeId = theNodesRow * nodesPerRow + theNodesCol;
return nodeId;
}
COM: <s> calculates the node id at a given position </s>
|
funcom_train/41770811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
try {
//find displaymode
mode = findDisplayMode(800, 600, Display.getDisplayMode().getBitsPerPixel());
// start of in windowed mode
Display.create();
glInit();
quadPosition = new Vector2f(100f, 100f);
quadVelocity = new Vector2f(1.0f, 1.0f);
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> initializes the test </s>
|
funcom_train/47844570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Article query() {
if ( isWaitQuery == true ) {
queryArticle = getRandomArticle();
if ( queryArticle == null ) {
return null;
}
isWaitQuery = false;
return dict.new Article( queryArticle.getKey(), "");
} else {
isWaitQuery = true;
return queryArticle;
}
}
COM: <s> get first call key from random article </s>
|
funcom_train/43526362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addGroupIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ExplicitCall_groupId_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ExplicitCall_groupId_feature", "_UI_ExplicitCall_type"),
CallGraphPackage.Literals.EXPLICIT_CALL__GROUP_ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the group id feature </s>
|
funcom_train/16911418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLearningRule(SynapseUpdateRule newLearningRule) {
SynapseUpdateRule oldRule = learningRule;
this.learningRule = newLearningRule;
initSpikeResponder();
if (parentNetwork != null) {
getRootNetwork().fireSynapseTypeChanged(oldRule, learningRule);
// getRootNetwork().rootNetwork.updateTimeType();
// Currently synapses don't have a time type
}
}
COM: <s> change this synapses learning rule </s>
|
funcom_train/28753932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRefsampleid(Long newVal) {
if ((newVal != null && this.refsampleid != null && (newVal.compareTo(this.refsampleid) == 0)) ||
(newVal == null && this.refsampleid == null && refsampleid_is_initialized)) {
return;
}
this.refsampleid = newVal;
refsampleid_is_modified = true;
refsampleid_is_initialized = true;
}
COM: <s> setter method for refsampleid </s>
|
funcom_train/32144183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws InstallerException {
String regKey = INSTALL_DIR_KEY + getVersion();
setDescription(new I18nKey(ADD_REGISTRY_MESSAGE, ADD_REGISTRY_DEFAULT_MESSAGE), getLanguage(), regKey);
prefs.put(regKey, installDir);
}
COM: <s> executes this operation </s>
|
funcom_train/46590886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String playSound(InputStream input, boolean loop, int step, boolean randomStep) {
if (step < 0) {
throw new IllegalArgumentException("stepping is negative");
}
String ref = UUID.randomUUID().toString();
try {
AudioPlayer player = playClip(input, loop, step, randomStep);
soundPlayers.put(ref, player);
} catch (LineUnavailableException e) {
return null;
}
return ref;
}
COM: <s> plays a sound stream optionally looping </s>
|
funcom_train/35357461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setWidth(int cWidth) throws jjil.core.Error {
if (cWidth <= 0) {
throw new Error(
Error.PACKAGE.ALGORITHM,
ErrorCodes.OUTPUT_IMAGE_SIZE_NEGATIVE,
new Integer(cWidth).toString(),
null,
null);
}
this.cWidth = cWidth;
}
COM: <s> changes target width </s>
|
funcom_train/10911902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PFMFile loadPFM(String filename) throws IOException {
log.info("Reading " + filename + "...");
log.info("");
InputStream in = new java.io.FileInputStream(filename);
try {
PFMFile pfm = new PFMFile();
pfm.load(in);
return pfm;
} finally {
in.close();
}
}
COM: <s> read a pfm file and returns it as an object </s>
|
funcom_train/35566841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addNode(Node node) {
if (! this.m_linkGraph.addNode(node)) {
if (this.m_nodeSet.contains(node))
throw new IllegalArgumentException(
"Inconsistent data structure.");
return false;
}
if (! m_nodeSet.add(node))
throw new IllegalArgumentException("Inconsistent data structure.");
//this.computeHull();
return true;
}
COM: <s> adds a specified node to the link graph and updates link graphs hull </s>
|
funcom_train/21913329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWidthPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UIMControl_width_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UIMControl_width_feature", "_UI_UIMControl_type"),
UIMPackage.Literals.UIM_CONTROL__WIDTH,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the width feature </s>
|
funcom_train/12071319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAllNodes() {
List result = new ArrayList();
result.add(this);
Iterator theChildren = Arrays.asList(this.getChildren()).iterator();
while (theChildren.hasNext()) {
SpinalNode current = (SpinalNode) theChildren.next();
result.addAll(current.getAllNodes());
}
return result;
}
COM: <s> returns a list of all the descendents of this spinal node including itself </s>
|
funcom_train/3915204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCopyFolder_FilesValid() throws Exception {
File folderSrc = new File(pathTestData, CP_Package1.folderCP);
File folderTgt = FileSupport.getTempFolder("tgt");
FileUtils.copyFolder(folderSrc, folderTgt);
FileSupport.checkSourceAndTargetFolderSame(folderSrc, folderTgt);
assertTrue(true);
}
COM: <s> copy folder works ok </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.