__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/5808478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAttribute(CollectionAttribute attr) {
AttributeGroup group = getGroup(attr.getAttributeType().getGroupType());
log().debug("Adding attribute " + attr.getClass().getName() + ": "
+ attr + " to group " + group);
group.addAttribute(attr);
}
COM: <s> adds the given attribute into the collection for this resource </s>
|
funcom_train/51449216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDurationString(String durationString) {
_years = parseValue(durationString, "y");
_months = parseValue(durationString, "m");
_days = parseValue(durationString, "clfps");
_hours = parseValue(durationString, "h");
_mins = parseValue(durationString, "mm");
_secs = parseValue(durationString, "s");
}
COM: <s> set and parse the duration string </s>
|
funcom_train/6458003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void process(HttpServletRequest request,HttpServletResponse response) {
logger.info("Processing Logout Command");
String id = request.getParameter(MicroProxy.MESSAGE_ID);
// Try to login to Kizna
KiznaClient client = (KiznaClient)logins.get(id);
client.disconnect();
logins.remove(id);
try {
PrintWriter writer = response.getWriter();
writer.write("DISCONNECTED");
logger.info("Completed Disconnection");
}
catch (IOException e) {
logger.error("Error occurred while trying to get PrintWriter, KiznaLogout.process()");
e.printStackTrace();
}
}
COM: <s> process a logout </s>
|
funcom_train/22278461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
if (resetOnStart) {
reset();
}
animating = true;
if (animateTimer == null) {
if (owner != null) {
owner.drawingSequenceFrameChanged(this);
}
animateTimer = new Timer(this, "nextFrame", frameRate);
animateTimer.start();
}
}
COM: <s> instructs the drawing sequence to animate itself by changing its current </s>
|
funcom_train/44702131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object anObject) {
boolean result = false;
ORF orf;
try {
orf = (ORF) anObject;
if ((orf.getOrfId() == this.orfId)
&& orf.getGroupId().equals(this.groupId)) {
result = true;
} else {
result = false;
}
} catch (Exception e) {
result = false;
}
return result;
} //equals()
COM: <s> compares another orf with this checking their orf identifiers and group </s>
|
funcom_train/3556187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TokenizerProperty insertDirect(char startChar, TokenizerProperty property) {
// the first element with the given start letter ...
if (_asciiArray[startChar] == null) {
_asciiArray[startChar] = new PropertyList(property);
return null;
// ... or inserting/replacing in an existing list
} else {
return putIntoList(_asciiArray[startChar], property);
}
}
COM: <s> insert a new property into the direct index array </s>
|
funcom_train/51342506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void scheduleNext() {
while (true) {
Runnable next = null;
if ((next = queue.poll()) != null) {
try {
executor.execute(next);
return;
} catch (RejectedExecutionException ex) {
// log error and poll the queue again.
log.error(ex, ex);
continue;
}
} else {
semaphore.release();
return;
}
}
}
COM: <s> schedule the next task if one is available non blocking </s>
|
funcom_train/529538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getInsetRect() {
Insets insets = getInsets();
int width = getWidth() - insets.left - insets.right;
int height = getHeight() - insets.top - insets.bottom;
return new Rectangle(insets.left, insets.top, width, height);
}
COM: <s> return the client rectangle inset by the components borders if any </s>
|
funcom_train/43607680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NodeVisitor disambiguateEnter(AmbiguityRemover ar) throws SemanticException {
if (ar.kind() == AmbiguityRemover.SUPER) {
return ar.bypassChildren(this);
}
else if (ar.kind() == AmbiguityRemover.SIGNATURES) {
if (body != null) {
return ar.bypass(body);
}
}
return ar;
}
COM: <s> build type objects for the method </s>
|
funcom_train/50304519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RpcCall doAddMember(int confNo, int persNo, int prio, int listPos, Bitstring type) throws IOException {
RpcCall req = new RpcCall(count(), Rpc.C_add_member);
req.add(new KomToken(confNo));
req.add(new KomToken(persNo));
req.add(new KomToken(prio));
req.add(new KomToken(listPos));
req.add(type);
writeRpcCall(req);
return req;
}
COM: <s> sends the rpc call add member to the server </s>
|
funcom_train/7270094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFilesToPlaylist(final File[] fs, final int index) {
if(fs == null || fs.length == 0)
return;
BackgroundExecutorService.schedule(new Runnable() {
public void run(){
addFilesToPlayList( createItemList(fs), index);
}
});
}
COM: <s> adds an array of files to the playlist starting at a given index </s>
|
funcom_train/3457569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
logger.info("Initializing AudioContainer " + afcLabel);
try {
dirScan(); //Directories for now
} catch (NullPointerException npe) {
logger.severe("Unable to scan directory: " +
directoryName);
//throw new FileNotFoundException();
//Need to throw exception here. Need to implement handling
}
logger.fine("Scanned " + getFileCount() + " assets");
}
COM: <s> once loaded and values are set the category can be initialized </s>
|
funcom_train/7801588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long addPhysicalPosition(final int iDataSegmentId, final long iRecordPosition, final byte iRecordType) throws IOException {
final long pos = ++total.dataPosition;
map.put(new Long(pos), new OPhysicalPosition(iDataSegmentId, iRecordPosition, iRecordType));
map.put(new Long(-1), total);
return pos;
}
COM: <s> add a new entry </s>
|
funcom_train/37890565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadSymbols() throws EXistException {
try {
FileInputStream fis = new FileInputStream(symbols.getFile());
VariableByteInput is = new VariableByteInputStream(fis);
symbols.read(is);
fis.close();
} catch (FileNotFoundException e) {
throw new EXistException("could not read "
+ symbolsFile.getAbsolutePath());
} catch (IOException e) {
throw new EXistException("io error occurred while reading "
+ symbolsFile.getAbsolutePath());
}
}
COM: <s> read the global symbol table </s>
|
funcom_train/22791689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean createLock(boolean force) {
File lock = new File(getConfigDir(), FILE_LOCK);
try {
if (lock.createNewFile() || force) {
lock.deleteOnExit();
return true;
}
return false;
} catch (IOException ex) {
throw new MessageException("Can't create a lock " + lock);
}
}
COM: <s> create new lock </s>
|
funcom_train/33281663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void jsxSet_type(final String newType) {
if (getBrowserVersion().hasFeature(BrowserVersionFeatures.GENERATED_44)) {
throw Context.reportRuntimeError("Object doesn't support this action");
}
getDomNodeOrDie().setAttribute("type", newType);
}
COM: <s> sets the value of the attribute type </s>
|
funcom_train/32239044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MJButton getModifyCustomerButton() {
if (modifyCustomerButton == null) {
modifyCustomerButton = new MJButton();
modifyCustomerButton.setPreferredSize(new Dimension(100, 26));
modifyCustomerButton.setText("Modify");
modifyCustomerButton.setToolTipText("Edits selected customer");
modifyCustomerButton.setMnemonic(KeyEvent.VK_M);
}
return modifyCustomerButton;
}
COM: <s> this method initializes button modify customer </s>
|
funcom_train/5603582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addInnerClass(Type inner) {
super.visitInnerClass(inner.getInternalName(),
onType.getInternalName(),
inner.getClassName().substring(inner.getClassName()
.lastIndexOf('$') + 1),
ACC_PRIVATE | ACC_STATIC);
}
COM: <s> adds an inner class reference to inner from the class being visited </s>
|
funcom_train/3274183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleMovePointSelect(){
// Try to finalize a Move
if(!engine.readyForActions()){
// Actions still waiting to terminate
Utilities.popUp("Finalizing Move Action: " + GameEngine.NO_ACTIONS_ALLOWED);
}
else{
// Move allowed
Point3f clickLocation = calcMovePlaneIntersect(moveMaxDist);
clickLocation = (Point3f)convertToRealWorldCoords(clickLocation);
moveDirection = new Vector3f(clickLocation);
moveDirection.sub(currentGroupLeader.location());
actionsToExecute = true;
moveActionToExecute = true;
}
endMovement();
}
COM: <s> handle the click following initiation of a move sequence </s>
|
funcom_train/32057075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testActionPerformed() {
System.out.println("testActionPerformed");
ActionEvent e = new ActionEvent(new Object(),ActionEvent.ACTION_PERFORMED,"command");
GPGraphpad gp = new GPGraphpad();
FilePrint fp = new FilePrint(gp);
fp.actionPerformed(e);
}
COM: <s> tests action performed method of class file print </s>
|
funcom_train/31667656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeMapNode buildLeaf(final String label, final double weight, final Value value, final TreeMapNode parent) {
final TreeMapNode node = new TreeMapNode(label, weight, value);
if (parent != null) {
parent.add(node);
} else if (this.root == null) {
this.root = node;
}
return node;
}
COM: <s> add a leaf to the tree </s>
|
funcom_train/18321540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateConsistency(StateMachine sm) {
if (sm.getTop() == null) {
throw new IllegalArgumentException("State machine "+sm.getName()+
" doesn't have top state");
}
setSm(sm);
try {
/* Check descendants' consistency */
sm.getTop().accept(this);
} catch (VisitorException e) {
e.printStackTrace();
}
}
COM: <s> checks if every state has consistent pairs of transitions i </s>
|
funcom_train/51605000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStarted(Date started) {
if (started == null) {
return;
}
if (this.started != null) {
if (DateFormat.getDateInstance().format(started).equals(DateFormat.getDateInstance().format(this.started))) {
return;
}
}
if(finished!=null){
if (started.before(finished)) {
this.started = finished;
return;
}
}
this.started = started;
setModified(true);
}
COM: <s> this method define started date </s>
|
funcom_train/51098287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void currentProcedureChanged(ProcedureDisplayEvent e) {
Application.getInstance().getAction(RemoveProcedureParameterAction.getActionName()).setEnabled(false);
if (e.getProcedure() == null)
setVisible(false);
else {
if (e.isTabReset()) {
this.setSelectedIndex(0);
}
this.setVisible(true);
}
}
COM: <s> invoked when currently selected procedure object is changed </s>
|
funcom_train/21634083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateSameName() {
for (int i = 0; i < this.headerList.size(); i++) {
for (int j = 0; j < this.headerList.size(); j++) {
if (i == j) {
continue;
}
if (this.headerList.get(i).equalsIgnoreCase(
this.headerList.get(j))) {
throw new AnalystError("Multiple fields named: "
+ this.headerList.get(i));
}
}
}
}
COM: <s> validate that two columns do not have the same name </s>
|
funcom_train/3274666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setValue(String value) {
if (!validateValue(value)) return false;
modified=true;
this.value=value;
if (value.equals("DBR")) {
dbr.setValue("true");
ednum.setValue("0");
} else if (value.equals("Edition")) {
if (ednum.getValue().equals("0"))
ednum.setValue("1");
dbr.setValue("false");
} else if (value.equals("One")) {
ednum.setValue("0");
dbr.setValue("false");
}
return true;
}
COM: <s> sets the value of this option </s>
|
funcom_train/2576797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTimeZone(TimeZone zone) {
if (zone == null) {
throw new IllegalArgumentException("Null 'zone' argument.");
}
if (!this.timeZone.equals(zone)) {
this.timeZone = zone;
setStandardTickUnits(createStandardDateTickUnits(zone,
this.locale));
notifyListeners(new AxisChangeEvent(this));
}
}
COM: <s> sets the time zone for the axis and sends an </s>
|
funcom_train/25567895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getPropertyValue(Object propertyId) {
if (SINK_PROP.equals(propertyId)) {
return sinkConnection == null ? null : sinkConnection.getSink();
} else if (FAUCET_PROP.equals(propertyId)) {
return faucetConnection == null ? null : faucetConnection.getFaucet();
} else {
return super.getPropertyValue(propertyId);
}
}
COM: <s> return the property value for the given property id or null </s>
|
funcom_train/25376885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void startExecutorPool() {
if (m_executorPool != null) {
m_executorPool.shutdownNow();
}
m_executorPool = new ThreadPoolExecutor(m_numExecutionSlots, m_numExecutionSlots,
120, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
}
COM: <s> start the pool of execution threads </s>
|
funcom_train/15399772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBorderHighlight(boolean x) {
if (_clusterChildren.size() == 0) {
_hasBorderHighlight = x;
} else {
for (int i = 0; i < _clusterChildren.size(); i++) {
DICOMImageCluster child = (DICOMImageCluster)_clusterChildren.get(i);
child.setBorderHighlight(x);
}
}
repaint();
revalidate();
}
COM: <s> sets whether cluster has border highlight </s>
|
funcom_train/16527789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel createButtonPanel(){
ChallengeQuestionCheckAction checkAction = getCQCheckAction();
processAttemptButton = new JButton();
processAttemptButton.setAction(checkAction);
processAttemptButton.setEnabled(false);
CommonUI.makeEnhancedButton(processAttemptButton);
JPanel buttonPanel = new JPanel();
buttonPanel.add(processAttemptButton, BorderLayout.NORTH);
buttonPanel.setPreferredSize(new Dimension(buttonPanel.getPreferredSize().width, 20));
buttonPanel.setBackground(PasColors.challengeQuestionChoiceInteractionTextAreaColor);
return buttonPanel;
}
COM: <s> creates the check action button panel </s>
|
funcom_train/33289723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object p_o1, Object p_o2) {
int x_key1 = ((NeuroGridRating) (p_o1)).intValue();
int x_key2 = ((NeuroGridRating) (p_o2)).intValue();
if (x_key1 == x_key2) {
return 1;
} else if (x_key1 < x_key2) {
return 1;
} else {
return -1;
}
}
COM: <s> compares its two arguments for order </s>
|
funcom_train/17047392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AlignmentVector getAlignmentVector() {
if (_alignmentVector == null) {
_alignmentVector = new AlignmentVector();
_alignmentVector.add(context.getKey());
_alignmentVector.add(startPos);
_alignmentVector.add(parsedText);
_alignmentVector.add(extraction.getType());
}
return _alignmentVector;
}
COM: <s> get this instances alignment vector </s>
|
funcom_train/887281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLInserter handleCmd(Node cmd, XMLInserter output, Transformer transformer, boolean fLast) {
// Insertion?
if(cmd.getNodeType() == Node.ELEMENT_NODE && cmd.getNodeName().equals(NODE_CMD_TEMPLATE))
if(((Element)cmd).getAttribute(ATTR_CMD_TEMPLATE_NAME).equals(templateName)) {
XMLInserter inserter = handleTemplate(cmd, output, transformer);
return inserter;
}
// Not recognized by this handler
return null;
}
COM: <s> called by transform cmd handler interface check for template command </s>
|
funcom_train/18118278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMatchAlias() {
testAddMailAddress();
MailAddress[] addr = namedList.matchAlias("Kevin Pors");
assertEquals(addr.length, 1);
assertEquals(addr[0].getAlias(), "Kevin Pors");
addr = namedList.matchAlias("Pete Kirk");
assertEquals(addr.length, 1);
assertEquals(addr[0].getAlias(), "Pete Kirk");
}
COM: <s> tests the match alias method </s>
|
funcom_train/37592359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ItemT getNext(ItemT doc) {
synchronized(_model) {
int i = _model.indexOf(doc);
if (i == -1)
throw new IllegalArgumentException("No such document " + doc.toString() + " found in collection of open documents");
if ( i + 1 == _model.size()) return doc;
return getFromModel(i + 1);
}
}
COM: <s> gets the next document after doc in the series </s>
|
funcom_train/18788198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MAttribute createAttribute(MClassifier context, String name) {
assert (context != null) && (name != null);
MAttribute item = findAttribute(context, name);
if (item == null) {
item = new MAttributeImpl();
item.setName(name);
context.addFeature(item);
}
return item;
}
COM: <s> finds an attribute with the given name </s>
|
funcom_train/38252936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadDocument() {
builder = new GVTBuilder();
userAgent = new SimpleSWTUserAgent(this);
loader = new DocumentLoader(userAgent);
SimpleSWTUserAgent.XercesWorkaround();
try {
svgDocument = (SVGDocument) loader.loadDocument(uri);
bridgeContext = new BridgeContext(userAgent, loader);
bridgeContext.setDynamicState(BridgeContext.STATIC);
gvtRoot = builder.build(bridgeContext, svgDocument);
getSVGPaintable().setTree(gvtRoot);
} catch (Exception e) {
userAgent.displayError(e);
}
}
COM: <s> loads an svg document </s>
|
funcom_train/5380513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean close() {
if (shell == null || shell.isDisposed())
return true;
// stop listening for font changes
if (fontChangeListener != null) {
JFaceResources.getFontRegistry().removeListener(fontChangeListener);
fontChangeListener = null;
}
// If we "close" the shell recursion will occur.
// Instead, we need to "dispose" the shell to remove it from the
// display.
shell.dispose();
shell = null;
contents = null;
if (windowManager != null) {
windowManager.remove(this);
windowManager = null;
}
return true;
}
COM: <s> closes this window disposes its shell and removes this window from its </s>
|
funcom_train/40453372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTfCantidadProducto() {
if (tfCantidadProducto == null) {//GEN-END:|172-getter|0|172-preInit
// write pre-init user code here
tfCantidadProducto = new TextField("Cantidad", null, 32, TextField.NUMERIC);//GEN-LINE:|172-getter|1|172-postInit
// write post-init user code here
}//GEN-BEGIN:|172-getter|2|
return tfCantidadProducto;
}
COM: <s> returns an initiliazed instance of tf cantidad producto component </s>
|
funcom_train/22353288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void give(Unit giver, Unit getter, int amount, ItemType item) {
String give = Resources.getOrderTranslation(EresseaConstants.O_GIVE, giver.getFaction()
.getLocale());
giver.addOrder(give + " " + getter.getID().toString() + " " + amount + " " + item.toString()
+ getComment(), false, 0);
}
COM: <s> add orders to give amount of item from giver to getter </s>
|
funcom_train/4528095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSeekBugLocalFS() throws IOException {
Configuration conf = new Configuration();
FileSystem fileSys = FileSystem.getLocal(conf);
try {
Path file1 = new Path("build/test/data", "seektest.dat");
writeFile(fileSys, file1);
seekReadFile(fileSys, file1);
cleanupFile(fileSys, file1);
} finally {
fileSys.close();
}
}
COM: <s> tests if the seek bug exists in fsdata input stream in local fs </s>
|
funcom_train/46752519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DateTimeModel getDayStart() {
DateTimeModel start = new DateTimeModel();
// required to clear all fields as new DateTimeModel is set to ms of 0 not 18000000
start.clear();
start.set(Calendar.YEAR, this.get(Calendar.YEAR));
start.set(Calendar.MONTH, this.get(Calendar.MONTH));
start.set(Calendar.DAY_OF_MONTH, this.get(Calendar.DAY_OF_MONTH));
return start;
}
COM: <s> change the time component to be the start of the day </s>
|
funcom_train/25290171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void detach() {
Group parent;
if (isLiveOrCompiled()) {
if(!this.getCapability(ALLOW_DETACH))
throw new CapabilityNotSetException(Ding3dI18N.getString("BranchGroup1"));
if (((BranchGroupRetained)this.retained).parent != null) {
parent = (Group)((BranchGroupRetained)this.retained).parent.source;
if(!parent.getCapability(Group.ALLOW_CHILDREN_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("BranchGroup2"));
}
}
((BranchGroupRetained)this.retained).detach();
}
COM: <s> detaches this branch group from its parent </s>
|
funcom_train/31801709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* private MethodGen getMethod(String name) {
for (int i = 0; i < methods.length; i++) {
if (methods[i].getName().equals(name)) {
return new MethodGen(methods[i],
"org.hanselexample.stack.StackExample",
cpg);
}
}
throw new IllegalStateException("Method not found.");
}
COM: <s> returns the method with the given name </s>
|
funcom_train/50397452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void publishServorch() {
try {
// publish Orchestrator
EndpointReferenceType epr = WSServerUtilities.newEPR();
epr.addNewAddress().setStringValue(WSServerUtilities.makeAddress(IServiceOrchestrator.ServiceName));
WSServerUtilities.addPortType(epr, IServiceOrchestrator.PORT);
RegistryHandler.getRegistryClient().addRegistryEntry(epr);
logger.info(
"Added registry entry for " + IServiceOrchestrator.ServiceName);
} catch (Exception e) {
logger.fatal("Could not publish to registry", e);
}
}
COM: <s> publishes web service s in the registry br </s>
|
funcom_train/26130596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(int x, int y) {
WormLink sl;
synchronized (worm) {
for (int i = 0; i < worm.size(); i++) {
sl = (WormLink)worm.elementAt(i);
if (sl.contains(x, y)) {
return true;
}
}
}
return false;
}
COM: <s> returns true if the worm contains the given cell coordinate </s>
|
funcom_train/22453141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean taxApplies(CmsOFBizRemoteClient remoteClient) {
boolean taxApplies = false;
Iterator i = this.iterator();
while (i.hasNext()) {
ShoppingCartItem item = (ShoppingCartItem) i.next();
if (item.taxApplies(remoteClient)) {
taxApplies = true;
break;
}
}
return taxApplies;
}
COM: <s> returns true when there are taxable items in the cart </s>
|
funcom_train/3393573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassSymbol loadClass(Name flatname) throws CompletionFailure {
boolean absent = classes.get(flatname) == null;
ClassSymbol c = enterClass(flatname);
if (c.members_field == null && c.completer != null) {
try {
c.complete();
} catch (CompletionFailure ex) {
if (absent) classes.remove(flatname);
throw ex;
}
}
return c;
}
COM: <s> load a toplevel class with given fully qualified name </s>
|
funcom_train/31186802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void jMenuHelpAbout_actionPerformed(ActionEvent e) {
PropertyEditorFrame_AboutBox dlg = new PropertyEditorFrame_AboutBox(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.setModal(true);
dlg.show();
}
COM: <s> help about action performed </s>
|
funcom_train/25657144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPropertyInt(String propertyName) {
String val = this.getProperty(propertyName);
try {
return Integer.parseInt(val);
} catch (Exception e) {
// properties broken use the default.
System.err.println("The " + propertyName + " is not an integer.");
val = this.getDefaults().getProperty(propertyName);
return Integer.parseInt(val);
}
}
COM: <s> get the property return as an integer </s>
|
funcom_train/17206456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean handleRoot(Address addr) {
if(subspace.addressInRange(addr)) {
// increment tile
int index = subspace.getIndex(addr);
rootsStream.increment(index, (short)1);
// increment summary
this.totalRoots++;
return true;
} else {
return false;
}
}
COM: <s> handle a root address </s>
|
funcom_train/34340974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTextField3() {
if (textField3 == null) {//GEN-END:|34-getter|0|34-preInit
// write pre-init user code here
textField3 = new TextField("textField3", null, 32, TextField.ANY);//GEN-LINE:|34-getter|1|34-postInit
// write post-init user code here
}//GEN-BEGIN:|34-getter|2|
return textField3;
}
COM: <s> returns an initiliazed instance of text field3 component </s>
|
funcom_train/6409980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextureId(int textureId) {
if (textureId < 0) throw new IllegalArgumentException(
"Texture ID must be >=0. ID=" + textureId);
if(CONTEXT_KEY == null) {
_defaultTextureId = textureId;
} else {
if(_textureIdMap == null) {
_textureIdMap = new HashMap<Object,Integer>();
}
_textureIdMap.put(CONTEXT_KEY, textureId);
}
}
COM: <s> sets the texture id associated with this texture and the current global </s>
|
funcom_train/1543376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void defineSometimesTrueRule(int aStackTop, int aPrecedence, ConsPointer aPredicate, ConsPointer aBody) throws Exception {
// New branching rule.
PredicateRule newRule = new PredicateRule(iEnvironment, aPrecedence, aPredicate, aBody);
LispError.check(iEnvironment, aStackTop, newRule != null, LispError.CREATING_RULE, "INTERNAL");
insertRule(aPrecedence, newRule);
}
COM: <s> add a predicate rule to the list of rules </s>
|
funcom_train/42535410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o){
if(!(o instanceof TokDef))return false;
if(o == this)return true;
TokDef oo = (TokDef)o;
return (((Object)id).equals(oo.id))&&(((Object)re).equals(oo.re));
}
COM: <s> is the given object equal to this tok def </s>
|
funcom_train/30218022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InetAddress getInetAddress() {
if ( !isBound() )
return null;
InetSocketAddress addr =
JmsSocketAdmin.getRegistry().getInetSocketAddress(listenAddress);
if ( addr == null ) { // returns the address 0.0.0.0
byte[] zeroaddr = {0,0,0,0};
InetAddress zeroinet = null;
try {
zeroinet = InetAddress.getByAddress(zeroaddr);
} catch (UnknownHostException e) { // if IP address is not 4 bytes
; // do nothing. should never happen
}
return zeroinet;
} else {
return addr.getAddress();
}
}
COM: <s> returns the inet address where the jms socket is bound </s>
|
funcom_train/28353973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendNewPhases() {
java.util.List <AcceleratorNode> cavs = controller.theDoc.theSeq.getNodesOfType("rfcavity");
for(AcceleratorNode cav : cavs) {
String name = cav.getId();
if(hasNewPhase.containsKey(name)) {
CavityController tc = controller.getCavityController((SCLCavity) cav);
tc.setPhase(((Double) cavityPhaseTrialMap.get(name)).doubleValue());
}
}
}
COM: <s> send the new phases to the cavities </s>
|
funcom_train/13692928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateLinksWithProperties(String prop){
GuiLink tmplink;
for(Enumeration en = links.elements(); en.hasMoreElements();) {
tmplink = (GuiLink)en.nextElement();
if (tmplink == null)
continue;
if (tmplink.selectionMode) {
tmplink.properties = prop;
}
}
repaint();
setNodes(nodes);
setLinks(links);
}
COM: <s> upadates the links with given properties </s>
|
funcom_train/10798307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
_main = (Map<Object, StateManagerImpl>) broker.newManagedObjectCache();
if (_conflicts != null)
_conflicts = null;
if (_news != null)
_news = null;
if (_embeds != null)
_embeds = null;
if (_untracked != null)
_untracked = null;
}
COM: <s> clear the cache </s>
|
funcom_train/23931784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calculatePositions(TreeMapNode root) {
if (root == null) {
return;
}
List<TreeMapNode> children = root.getChildren();
if (children != null) {
calculatePositionsRec(root.getBounds(), this.sumWeight(children),
children);
}
}
COM: <s> calculate the positions for all the elements of the root </s>
|
funcom_train/8304584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getCancelButton() {
if (cancelButton == null) {
cancelButton = new JButton();
cancelButton.setText("Cancel");
cancelButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
VCRSelectionDialog.this.setVisible(false);
}
});
}
return cancelButton;
}
COM: <s> this method initializes cancel button </s>
|
funcom_train/32631759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetColumns() {
System.out.println("-> getColumns");
List columns = newView.getColumns();
Iterator iterator = columns.iterator();
while (iterator.hasNext()) {
DViewColumn column = (DViewColumn) iterator.next();
System.out.println("Column: " + column.getTitle());
}
}
COM: <s> tests the method get columns </s>
|
funcom_train/40927018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getAlertaGenericaVolverCommand() {
if (alertaGenericaVolverCommand == null) {//GEN-END:|138-getter|0|138-preInit
// write pre-init user code here
alertaGenericaVolverCommand = new Command("OK", Command.OK, 0);//GEN-LINE:|138-getter|1|138-postInit
// write post-init user code here
}//GEN-BEGIN:|138-getter|2|
return alertaGenericaVolverCommand;
}
COM: <s> returns an initiliazed instance of alerta generica volver command component </s>
|
funcom_train/50034164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getFemaleRegisteredUsersNumber() throws HibouTechnicalException {
Transaction tr = null;
Session session = null;
try {
session = HibernateUtil.openSession();
tr = session.beginTransaction();
Criteria criteria = session.createCriteria(User.class)
.add(Restrictions.eq("actived", true))
.add(Restrictions.eq("sex", "F"));
return criteria.list().size();
} catch (Exception e) {
if(tr != null) {
tr.rollback();
}
throw new HibouTechnicalException(e);
} finally {
session.close();
}
}
COM: <s> get the total number of female registered users </s>
|
funcom_train/50093286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IMolecule getMolecule1()throws Exception {
IMolecule molecule = builder.newMolecule();
molecule.addAtom(builder.newAtom("C"));
molecule.getAtom(0).setFormalCharge(1);
molecule.addAtom(builder.newAtom("O"));
molecule.addBond(0, 1, IBond.Order.SINGLE);
addExplicitHydrogens(molecule);
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule);
LonePairElectronChecker lpcheck = new LonePairElectronChecker();
lpcheck.saturate(molecule);
return molecule;
}
COM: <s> get the molecule 1 c o h </s>
|
funcom_train/13509660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void userRemoveCurrentDockable(){
DockablePanel dockable = (DockablePanel) currentPerspective.getSelectedDockable();
if (dockable.isClosable()){
this.removeDockable(dockable);
} else {
MessagePaneManager.showUnRemovableDockablePane(dockable.getModelisable().getSavedTitle());
}
}
COM: <s> remove the current selected dockable </s>
|
funcom_train/28476873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLocalHostAddress() throws RouterException {
logger.debug("Get IP of localhost");
InetAddress localHostIP = null;
if (localHostIP == null) {
localHostIP = getLocalHostAddressFromSocket();
}
// We do not want an address like 127.0.0.1
if (localHostIP.getHostAddress().startsWith("127.")) {
throw new RouterException(
"Only found an address that begins with 127.");
}
return localHostIP.getHostAddress();
}
COM: <s> get the the ip of the local host </s>
|
funcom_train/11731808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resetVolatileIndex() throws IOException {
volatileIndex = new VolatileIndex(handler.getTextAnalyzer(),
handler.getSimilarity(), indexingQueue);
volatileIndex.setUseCompoundFile(handler.getUseCompoundFile());
volatileIndex.setMaxFieldLength(handler.getMaxFieldLength());
volatileIndex.setBufferSize(handler.getBufferSize());
}
COM: <s> resets the volatile index to a new instance </s>
|
funcom_train/35672167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getGenericType(final ICobolBinding binding) {
if (binding instanceof ICobolComplexBinding) {
return "complex";
}
if (binding instanceof ICobolChoiceBinding) {
return "choice";
}
if (binding instanceof ICobolArrayComplexBinding) {
return "complexArray";
}
if (ClassUtil.isEnum(BindingUtil.getJaxbTypeName(binding))) {
return "enum";
} else {
return "simple";
}
}
COM: <s> returns a generic type to simplify code generation </s>
|
funcom_train/1174156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canGainLife() {
if (AllZoneUtil.isCardInPlay("Sulfuric Vortex") || AllZoneUtil.isCardInPlay("Leyline of Punishment") ||
AllZoneUtil.isCardInPlay("Platinum Emperion", this) || AllZoneUtil.isCardInPlay("Forsaken Wastes"))
return false;
return true;
}
COM: <s> p can gain life </s>
|
funcom_train/44308200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processPair(AssociationRulesExtractor associationRulesExctractor,Object object0,Object object1) {
if (object0 instanceof Set) {
Iterator objects=((Set)object0).iterator();
while (objects.hasNext()) {
Concept concept=(Concept)objects.next();
processPair1(associationRulesExctractor,concept,object1);
}
}
else
processPair1(associationRulesExctractor,(Concept)object0,object1);
}
COM: <s> adds all pairs of concepts from two sets to the algorithm </s>
|
funcom_train/50434044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFieldProperty(String strFieldName, String strPropertyName) {
//// 1. Ensure that the field is in there.
addField(strFieldName);
//// 2. Add the value.
Field f = getField(strFieldName);
f.addValidProperty(strPropertyName);
} // of addFieldProperty
COM: <s> add a property to a field </s>
|
funcom_train/5537165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAccount() {
if(numAccounts == accounts.length) {
Properties[] accountsNew = new Properties[accounts.length + 5];
for (int i = 0; i < accounts.length; i++) {
accountsNew[i] = accounts[i];
}
this.accounts = accountsNew;
}
numAccounts++;
accounts[numAccounts - 1] = new Properties();
}
COM: <s> adds a new mail account to the accounts array </s>
|
funcom_train/3292208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String hostname_function(String url) {
if (url.startsWith("http://")) {
url=url.substring(7);
}
int pos=url.indexOf("/");
if (pos!=-1) {
url=url.substring(0,pos);
}
return url;
}
COM: <s> hostname parses the hostname from a url so http www </s>
|
funcom_train/4755396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RealMatrix getV() {
if (cachedV == null) {
final int m = eigenvectors.length;
cachedV = MatrixUtils.createRealMatrix(m, m);
for (int k = 0; k < m; ++k) {
cachedV.setColumnVector(k, eigenvectors[k]);
}
}
// return the cached matrix
return cachedV;
}
COM: <s> returns the matrix v of the decomposition </s>
|
funcom_train/47291102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTargetDescriptionsSeparator(String targetDescriptionsSeparator) {
CommanderTask.validateAttribute(targetDescriptionsSeparator, "targetDescriptionsSeparator");
//Verifies that the property is a single char.
if (targetsSeparator.length() > 1) {
throw new BuildException("invalid targetDescriptionSeparator '" + targetDescriptionsSeparator + "' : must be a single char.");
}
this.targetDescriptionsSeparator = targetDescriptionsSeparator;
}
COM: <s> sets the target description separator </s>
|
funcom_train/7635096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean sendExtraCommand(String provider, String command, Bundle extras) {
try {
return mService.sendExtraCommand(provider, command, extras);
} catch (RemoteException e) {
Log.e(TAG, "RemoteException in sendExtraCommand: ", e);
return false;
}
}
COM: <s> sends additional commands to a location provider </s>
|
funcom_train/15410284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runScript(boolean expectErrors, String content) {
StringReader sr = new StringReader(content);
List<String> statements = parseStatements(sr);
Transaction t = server.createTransaction();
try {
Connection connection = t.getConnection();
out.println("runScript");
out.flush();
runStatements(expectErrors, statements, connection);
out.println("... end of script");
out.flush();
t.commit();
} catch (Exception e){
String msg = "Error: "+e.getMessage();
throw new PersistenceException(msg, e);
} finally {
t.end();
}
}
COM: <s> execute all the ddl statements in the script </s>
|
funcom_train/12177426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Group selectLocalProjectGroup(RuntimeProject project) {
// If the project has its own cache group then use that, else
// use the root project.
Group projectGroup = project.getCacheGroup();
if (projectGroup == null) {
if (project.isRemote()) {
throw new IllegalStateException("Only supports local projects");
} else {
projectGroup = localDefaultGroup;
}
}
return projectGroup;
}
COM: <s> select the local project group </s>
|
funcom_train/2932931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRange(final TextPresentation presentation, final int offset, final int length, final TextAttribute attr) {
if (attr != null)
presentation.addStyleRange(new StyleRange(offset, length, attr.getForeground(), attr.getBackground(), attr.getStyle()));
}
COM: <s> adds style information to the given text presentation </s>
|
funcom_train/44612908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer restoreCode() {
StringBuffer code = new StringBuffer();
if (variables.isEmpty()) {
return code;
}
code.append("// restore pre-state vaules from possible recursion\n");
for (Entry e: variables) {
code.append(e.name + " = " + PREFIX + e.name + ";\n");
}
//RacNode node = RacParser.parseStatement(code.toString());
//return node.incrIndent().incrIndent();
return code;
}
COM: <s> return a piece of code that if executed restored the values </s>
|
funcom_train/45113337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String fileGetTime(String filename, int option) throws Exception {
Map<?, ?> result = null;
if (checkType(option)) {
result = runRemoteScript(commandCreate("FileGetTime", option, 1));
} else {
result = runRemoteScript(commandCreate("FileGetTime", 0, 1));
}
return result.get(STDOUT).toString();
}
COM: <s> returns the time and date information for a file </s>
|
funcom_train/10670482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result testGetByAddress() throws UnknownHostException {
byte[] ipAddr = new byte[] { 4, 6, 2, 6 };
InetAddress inetAddress = InetAddress.getByAddress(hostName, ipAddr);
assertEquals(inetAddress.getHostName(), hostName);
assertTrue(Arrays.equals(inetAddress.getAddress(), ipAddr));
return result();
}
COM: <s> test inet address get by address java </s>
|
funcom_train/18788292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Class convertType(String type) {
Class clazz = null;
if (ReflectUtilities.PRIMITIVES_TYPES.containsKey(type)) {
clazz = ReflectUtilities.PRIMITIVES_TYPES.get(type);
} else {
try {
clazz = Class.forName(type);
} catch (ClassNotFoundException e) {
log.error("Class not found for name " + type, e);
}
}
assert (clazz != null);
return clazz;
}
COM: <s> converts the mapping type to the class representing it </s>
|
funcom_train/31910795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matchesFirstGlyph(int glyphCode, String glyphUnicode) {
for (int i = 0; i < firstGlyphCodes.length; i++) {
if (firstGlyphCodes[i] == glyphCode) {
return true;
}
}
for (int i = 0; i < firstUnicodeRanges.length; i++) {
if (firstUnicodeRanges[i].contains(glyphUnicode)) {
return true;
}
}
return false;
}
COM: <s> returns true if the specified glyph is one of the glyphs considered </s>
|
funcom_train/51647040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void listenToTextChanges(boolean listen) {
if (listen) {
if (fDocumentListener == null && fDocument != null) {
fDocumentListener= new DocumentListener();
fDocument.addDocumentListener(fDocumentListener);
}
} else if (!listen) {
if (fDocumentListener != null && fDocument != null) {
fDocument.removeDocumentListener(fDocumentListener);
fDocumentListener= null;
}
}
}
COM: <s> switches the state of whether there is a text listener or not </s>
|
funcom_train/29617913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MgisButton getJButtonSubmit() {
if (jButtonSubmit == null) {
jButtonSubmit = new MgisButton();
jButtonSubmit.setBounds(550,90,39,19);
jButtonSubmit.setVisible(false);
jButtonSubmit.displayValidationIcon(true, true);
jButtonSubmit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
saveFieldContents();
m_linkedButton.setValue(m_pl);
m_linkedButton.setEnabled(true);
}
});
}
return jButtonSubmit;
}
COM: <s> this method initializes j button submit </s>
|
funcom_train/36757994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tcpip_disconnect() throws TCPCommunicationException {
if (socket.isConnected()) {
try {
dis.close(); // close input and output stream
dos.close(); // as well as the socket
socket.close();
} catch (Exception Ex) {
//throw new TCPCommunicationException(Ex.getLocalizedMessage());
throw new TCPCommunicationException("Error on disconnect");
}
}
}
COM: <s> closes the tcp ip connection </s>
|
funcom_train/4008611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connect() {
if (games != null) {
if((MainController.getInstance().isAvailable((Game)games.elementAt(pointerPos)))) {
if (MainController.getInstance().connectToGame((Game)games.elementAt(pointerPos))) {
CanvasManager.setCurrent(new RBCanvas());
} else {
CanvasManager.setCurrent(new LoginScreen((Game)games.elementAt(pointerPos)));
}
}
}
}
COM: <s> connects the client to a game </s>
|
funcom_train/3723878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Parameter createParameter(ATLASType type, ATLASElement parent, Unit unit, String value) {
if (type instanceof ParameterType) {
// needs more work: try to see if datatype library could be used
Parameter parameter = implementation.newParameter(type, parent, unit, value);
// parameter.initWith((ParameterType) type, parent, unit, value);
return parameter;
}
throw new IllegalArgumentException("An invalid parameter type was given.");
}
COM: <s> creates a parameter from given information </s>
|
funcom_train/2154106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProgressDrawable(Drawable d) {
if (d != null) {
d.setCallback(this);
// Make sure the ProgressBar is always tall enough
int drawableHeight = d.getMinimumHeight();
if (mMaxHeight < drawableHeight) {
mMaxHeight = drawableHeight;
requestLayout();
}
}
mProgressDrawable = d;
mCurrentDrawable = d;
postInvalidate();
}
COM: <s> p define the drawable used to draw the progress bar in </s>
|
funcom_train/42949670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void filter() {
sort(toPrevious.clone(), toPrevious, 0, toPrevious.length);
// Generate inverse map for implementing convertRowIndexToView();
for (int i = 0; i < toPrevious.length; i++) {
fromPrevious[toPrevious[i]] = i;
}
}
COM: <s> performs the sort </s>
|
funcom_train/18028930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFormat() {
System.out.println("format");
QDataSet ds = null;
String expResult = "";
String result = DataSetUtil.format(ds);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of format method of class data set util </s>
|
funcom_train/1416994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processKeyEvent (KeyEvent evt) {
if (inputHandler == null)
return;
switch (evt.getID ()) {
case KeyEvent.KEY_TYPED:
inputHandler.keyTyped (evt);
break;
case KeyEvent.KEY_PRESSED:
inputHandler.keyPressed (evt);
break;
case KeyEvent.KEY_RELEASED:
inputHandler.keyReleased (evt);
break;
}
}
COM: <s> forwards key events directly to the input handler </s>
|
funcom_train/4831227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logOff() throws TBCForumException{
if (!(this._currentUser instanceof LoggedUser))
throw new UserPermissionsException("Only a LOGGED IN user can LOG OFF...");
TBClogger.info(((LoggedUser)_currentUser).getUsername() +" is logging off ");
this._currentUser = this._userHandler.logOff((LoggedUser)_currentUser);
}
COM: <s> current user log off from the system </s>
|
funcom_train/1903991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public InputStream sendParameters(Properties args) throws Exception {
InputStream result = null;
URL url;
HttpMessage httpMsg;
url = new URL(metacatUrl);
httpMsg = new HttpMessage(url);
httpMsg.setCookie("JSESSIONID="+this.sessionId);
result = httpMsg.sendPostParameters(args);
return(result);
}
COM: <s> send a request to metacat </s>
|
funcom_train/42670647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getEquipe() {
if (Equipe == null) {//GEN-END:|163-getter|0|163-preInit
// write pre-init user code here
Equipe = new TextField("Equipe", "//", 11, TextField.ANY);//GEN-LINE:|163-getter|1|163-postInit
// write post-init user code here
}//GEN-BEGIN:|163-getter|2|
return Equipe;
}
COM: <s> returns an initiliazed instance of equipe component </s>
|
funcom_train/44869449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WCMDrawGeometricBean getAxisLine() {
if (axisLine == null) {
axisLine = new WCMDrawGeometricBean();
axisLine.setShape(WCMDrawGeometricBean.INFINITE_LINE_ABSOLUTE);
axisLine.setLineStyle(1);
axisLine.setX1(new Constant(0));
axisLine.setY1(getAxisInput());
axisLine.setY2(getAxisInput());
axisLine.setX2(new Constant(1));
if (presentation) {
axisLine.setLineWidth(3);
}
}
return axisLine;
}
COM: <s> this method initializes axis line </s>
|
funcom_train/45246511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JNumberFloatField getJNumberFloatFieldProporcaoDayhoff() {
if (jNumberFloatFieldProporcaoDayhoff == null) {
jNumberFloatFieldProporcaoDayhoff = new JNumberFloatField();
jNumberFloatFieldProporcaoDayhoff.setLocation(new Point(345, 106));
jNumberFloatFieldProporcaoDayhoff.setSize(new Dimension(65, 20));
}
return jNumberFloatFieldProporcaoDayhoff;
}
COM: <s> this method initializes j number float field proporcao dayhoff </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.