__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/36817570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getBits(long bits, int bitsToRead) {
String bitString = "";
long mask = 1;
for (int i = 0; i < bitsToRead; i++) {
long test = bits & mask;
if (test == mask)
bitString = "1" + bitString;
else
bitString = "0" + bitString;
mask = mask << 1;
}
return bitString;
}
COM: <s> this wont trim the leading zeros like the </s>
|
funcom_train/17047074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int skipImmediateBreaks(int startPosition) {
int result = startPosition;
final Map<Integer, Break> pos2break = getPos2Break();
while (result < text.length()) {
final Break posBreak = pos2break.get(result);
if (posBreak != null && posBreak.breaks() && posBreak.getBWidth() > 0) {
result += posBreak.getBWidth();
}
else break;
}
return result;
}
COM: <s> find the first non break position from start position inclusive </s>
|
funcom_train/11344430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void save(InputStream is, File file) throws IOException {
FileOutputStream writer = new FileOutputStream(file);
int cc = 0;
do {
int i = is.read();
if (i == -1) {
break;
}
cc++;
writer.write(i);
} while (true);
System.out.println(cc + " bytes copied");
is.close();
writer.close();
}
COM: <s> saves the content of the input stream to the given file </s>
|
funcom_train/4779787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean removeMember(final AuthzGroup group) throws AuthzNotGroupMemberException {
assert groups != null;
LOGGER.debug("removeMember(AuthzGroup) entered. group={}", group);
Preconditions.checkNotNull(group, "Group is null");
if (!groups.contains(group)) {
LOGGER.error("removeMember(AuthzGroup) group is not a member of this group");
throw new AuthzNotGroupMemberException();
}
return groups.remove(group);
}
COM: <s> remove group member </s>
|
funcom_train/46993102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printData(String title, String separator){
if (separator == null){
separator ="|";
}
out.println(title);
for (int i=0; i< this.data.length; i++){
out.println(StringUtils.join(this.data[i], separator));
}
}
COM: <s> prints the data field of a code data table code object </s>
|
funcom_train/42970387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isConnectionExpired(ClientConnection c){
CachedConnectionData connectionData = connectionCache.get(c);
Calendar cal = Calendar.getInstance();
cal.setTime(connectionData.getLastAccess());
cal.add(Calendar.MILLISECOND, connectionTimeout);
Date timeout = cal.getTime();
logger.trace("LastAccess: '"+connectionData.getLastAccess()+"' timeout: '"+timeout+"' result: "+timeout.before(connectionData.getLastAccess()));
return timeout.before(new Date());
}
COM: <s> check if a connecion has expired </s>
|
funcom_train/7658764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigInteger nextProbablePrime() {
if (sign < 0) {
// math.1A=start < 0: {0}
throw new ArithmeticException(Messages.getString("math.1A", this)); //$NON-NLS-1$
}
return Primality.nextProbablePrime(this);
}
COM: <s> returns the smallest integer x </s>
|
funcom_train/22573130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doEditCompetenceProfile() {
// The dialog fires off a few events we can ignore them
DataModel.getInstance().removeListener(CompetenceProfileComposite.this);
CompetenceProfileDialog dialog = new CompetenceProfileDialog(getShell(), fCompetenceProfile);
if (dialog.open() == IDialogConstants.OK_ID) {
fCompetenceProfileTreeViewer.refresh();
}
DataModel.getInstance().addListener(CompetenceProfileComposite.this);
}
COM: <s> edit competence profile </s>
|
funcom_train/44496038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void abort(TransactionID transactionID) {
if (transactionID == null) {
throw new IllegalArgumentException("TransactionID is null");
}
if (writer != null && writer.equals(transactionID)) {
writer = null;
this.removeOrder = 0;
}
readers.remove(transactionID);
}
COM: <s> aborts this code cache entry code by the given code transaction id code </s>
|
funcom_train/26594263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public _BVEPlan getBveExecutionPlan() throws DException {
_BVEPlan bvePlan1 = _tablereference4.getBveExecutionPlan();
_BVEPlan bvePlan2 = _tablereference1.getBveExecutionPlan();
bvePlan1 = BVEPlanMerger.mergeTablePlansWithAnd(bvePlan1, bvePlan2);
return bvePlan1;
}
COM: <s> this method returns the merged bve execution plans from both the table references </s>
|
funcom_train/11663721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object setAttribute(final Object name, final Object value) {
if (attrs == null) {
attrs = new Hashtable();
dirty = true;
}
Object prev = attrs.put(name, value);
if (prev == null || !prev.equals(value)) {
dirty = true;
}
return prev;
}
COM: <s> sets the attribute by name </s>
|
funcom_train/50896808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReaperDaemonDelay(long lDelayMs) throws IllegalArgumentException {
if (lDelayMs>0l) {
if (reaper==null) reaper = new ConnectionReaper(this);
reaper.setDelay(lDelayMs);
}
else {
if (reaper!=null) reaper.halt();
reaper=null;
}
}
COM: <s> set delay betwwen connection reaper executions default value is 5 mins </s>
|
funcom_train/27824430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EntityInfoPage createElement(int elementIndex) throws KAONException {
if (m_entity instanceof Property)
return m_propertyInspector.createElement(elementIndex);
else if (m_entity instanceof Concept)
return m_conceptInspector.createElement(elementIndex);
else if (m_entity instanceof Instance)
return m_instanceInspector.createElement(elementIndex);
else
return null;
}
COM: <s> creates the element with given index </s>
|
funcom_train/12842419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean finish() {
List resourcesToExport = getWhiteCheckedResources();
if (!ensureTargetIsValid()) {
return false;
}
//Save dirty editors if possible but do not stop if not all are saved
saveDirtyEditors();
// about to invoke the operation so save our state
saveWidgetValues();
return executeExportOperation(new ArchiveFileExportOperation(null,
resourcesToExport, getDestinationValue()));
}
COM: <s> the finish button was pressed </s>
|
funcom_train/10190295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void call(Message invite)
{ m_inviteDialog=new ExtendedInviteDialog(m_sipProvider,this);
m_strLocalSDP=invite.getBody();
if (m_strLocalSDP!=null)
m_inviteDialog.invite(invite);
else m_inviteDialog.inviteWithoutOffer(invite);
}
COM: <s> starts a new call with the i invite i message request </s>
|
funcom_train/25766659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void train(InstanceList trainingData, double splitRatio) {
InstanceList[] split = null;
if (splitRatio == 1.0) {
split = new InstanceList[] { trainingData, null };
} else {
split = trainingData.split(new Random(), new double[] { splitRatio, 1 - splitRatio });
}
train(split[0], split[1]);
}
COM: <s> uses split ratio to split the training data for model training </s>
|
funcom_train/39315225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLeft1ActionPerformed() {
System.out.println("testLeft1ActionPerformed");
f.left1ActionPerformed(actionEvent);
assertEquals(f.curBrush,f.left1);
assertEquals(f.toolBrush.getBrushType(), f.toolBrush.LEFT1);
//t.left1ActionPerformed(actionEvent);
//assertEquals(t.curBrush,t.left1);
}
COM: <s> test of left1 action performed method of class terp paint </s>
|
funcom_train/16794769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(int x, int y, int width, int height){
if (win!=null) {
ImageCanvas ic = win.getCanvas();
double mag = ic.getMagnification();
x = ic.screenX(x);
y = ic.screenY(y);
width = (int)(width*mag);
height = (int)(height*mag);
ic.repaint(x, y, width, height);
if (listeners.size()>0 && roi!=null && roi.getPasteMode()!=Roi.NOT_PASTING)
notifyListeners(UPDATED);
}
}
COM: <s> draws image and roi outline using a clip rect </s>
|
funcom_train/14406052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getConvertedControlValue() {
if (component instanceof JTextField)
{
return converter.convertForModel(component);
}
else if (component instanceof JLabel)
{
return converter.convertForModel(component);
}
else if (component instanceof JCheckBox)
{
return converter.convertForModel(component);
}
else if (component instanceof JComboBox)
{
return converter.convertForModel(component);
}
else
{
throw new IllegalArgumentException("Controls wth Type " + component.getClass().getName() + " are not supported.");
}
}
COM: <s> gets and converts the values from the control </s>
|
funcom_train/18045204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkCompounds() {
return (
(0.0f <= red) && (red <= 1.0f)
&& (0.0f <= green) && (green <= 1.0f)
&& (0.0f <= blue) && (blue <= 1.0f)
&& (0.0f <= alpha) && (alpha <= 1.0f)
);
}
COM: <s> check if all compounds are ok </s>
|
funcom_train/17944292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reSort() {
Alarm[] alarms = new Alarm[list.size()];
for (int i = 0; i < list.size(); i++) {
alarms[i] = list.get(i);
}
list.clear();
for (int i = 0; i < alarms.length; i++) {
this.addAlarm(alarms[i]);
}
}
COM: <s> sorts whole list of alarms </s>
|
funcom_train/28749945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWorkflowtype(String newVal) {
if ((newVal != null && this.workflowtype != null && (newVal.compareTo(this.workflowtype) == 0)) ||
(newVal == null && this.workflowtype == null && workflowtype_is_initialized)) {
return;
}
this.workflowtype = newVal;
workflowtype_is_modified = true;
workflowtype_is_initialized = true;
}
COM: <s> setter method for workflowtype </s>
|
funcom_train/8231723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTextField() {
if (textField == null) {//GEN-END:|31-getter|0|31-preInit
// write pre-init user code here
textField = new TextField("Buscar:", null, 32, TextField.ANY);//GEN-LINE:|31-getter|1|31-postInit
// write post-init user code here
}//GEN-BEGIN:|31-getter|2|
return textField;
}
COM: <s> returns an initiliazed instance of text field component </s>
|
funcom_train/27822028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() throws IOException {
File parentFile=m_configurationFile.getParentFile();
if (parentFile!=null)
parentFile.mkdirs();
OutputStream outputStream=new FileOutputStream(m_configurationFile);
try {
m_properties.store(outputStream,null);
}
finally {
outputStream.close();
}
}
COM: <s> saves the configuration </s>
|
funcom_train/2844882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLoaded(String path) {
ProjectItemTreeNode node = (ProjectItemTreeNode) nodeMap.get(path);
if (node != null) {
return ((ProjectItem) node.getUserObject()).isLoaded();
}
System.err.println("Project: Can't determine isLoaded value for " + path);
return false;
}
COM: <s> returns the current loaded state of the specifed specified file path </s>
|
funcom_train/106152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertDeferedCode() throws BadLocationException {
for (InsertCodeFragmentsRunnable code : deferecCodeToInsert) {
code.run();
}
if(isDeferedCodeInsertion()) {
System.err.println("\t\t** DEBUG: ThreadPoolOclCodeGenerator.insertDeferedCode - turning compilation-lastUnit to lastSource again after code-insertion");
CodeGenerationBeautifier.compilationUnitToSource(lastSource, lastUnit);
}
}
COM: <s> is save to call even if its unneeded because </s>
|
funcom_train/28312757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOrder(int orderNumber, TrainOrdersModel order) {
orders.add(orderNumber, order);
if (nextScheduledOrder >= orderNumber) {
nextScheduledOrder++;
}
if (-1 == nextScheduledOrder && 0 < numberOfScheduledStops()) {
nextScheduledOrder = firstScheduleStop();
}
}
COM: <s> inserts an order at the specified position </s>
|
funcom_train/18513634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void distributeThumbs(double min, double max) {
double step = Math.abs(max - min) / (getThumbNum() + 1.0);
for (int i = 0; i < getThumbNum(); i++) {
setValueAt(min + step * (i + 1.0), i);
}
fireStateChanged();
}
COM: <s> evenly distributes thumbs in the slider </s>
|
funcom_train/7511091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SourceMode getCurrentSourceMode() {
if (currentSourceMode != null) {
return currentSourceMode;
}
final SourceMode default_ = SourceMode.LEFT_TOP;
if (this.virualMode) {
return default_;
}
try {
currentSourceMode = SourceMode.valueOf(this.currentConfigInstance.getString(
PARAM_CURRENT_SOURCE_MODE, default_.name()));
return currentSourceMode;
} catch (IllegalArgumentException iae) {
return default_;
}
}
COM: <s> return current mode of source </s>
|
funcom_train/40927783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getLlamarABaseCommand() {
if (llamarABaseCommand == null) {//GEN-END:|201-getter|0|201-preInit
// write pre-init user code here
llamarABaseCommand = new Command("Llamar", Command.OK, 0);//GEN-LINE:|201-getter|1|201-postInit
// write post-init user code here
}//GEN-BEGIN:|201-getter|2|
return llamarABaseCommand;
}
COM: <s> returns an initiliazed instance of llamar abase command component </s>
|
funcom_train/36821332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void announce() {
double euclidean = getEuclidean(currentNode, targetNode);
messageList.add(new String[]{String.valueOf(euclidean), currentNode.getLocation().toString(), "0"});
if (localDist > euclidean) {
localDist = euclidean;
localBestNode = currentNode;
}
}
COM: <s> announces the current euclidean distance for the robot cooresponding to </s>
|
funcom_train/1889969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void skipNew() {
int oldLine;
printStatus = idle;
for(;;) {
if (++printNewLine > newInfo.maxLine) {
break; /* end of file */
}
oldLine = newInfo.other[printNewLine];
if (oldLine < 0) {
break; /* end of block */
}
if (blocklen[oldLine] != 0) {
break; /* start of another */
}
}
}
COM: <s> skip new part of printout </s>
|
funcom_train/21530528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getJTextArea() {
if (jTextArea == null) {
jTextArea = new JTextArea();
jTextArea.setText("");
jTextArea.setFont(new java.awt.Font("sansserif", 0, 10));
//provide a generic output variable to allow the output source to be chagned easily
output = jTextArea;
}
return jTextArea;
}
COM: <s> this method initializes j text area </s>
|
funcom_train/34594279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEditor(ApplicationType application, UserType user) {
UserRolesType userRoles = application.getUserRoles();
List<UserRoleType> rolesList = userRoles.getUserRoleList();
for (UserRoleType uRole : rolesList) {
if (uRole.getUserId().equals(user.getId())) {
return ( uRole.getRole() == RoleTypeEnum.EDITOR );
}
}
return false;
}
COM: <s> return true of the user is an editor on the application </s>
|
funcom_train/22277137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void describeClassInfo(ClassInfo info) {
info.addClass("netscape.constructor.Script", 2);
info.addField(SCRIPT_KEY, STRING_TYPE);
info.addField(TARGET_KEY, OBJECT_TYPE);
info.addField(COMMAND_KEY, STRING_TYPE);
info.addField(LIVECONNECT_KEY, BOOLEAN_TYPE);
}
COM: <s> describes the script class coding info </s>
|
funcom_train/48184434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAmt(String token) {
if (token.length() < 4) return false;
String code = token.substring(token.length()-3);
try { Currency.getInstance(code); }
catch (IllegalArgumentException exc) { return false; }
String num = token.substring(0,token.length()-3).trim();
return isNum(num);
}
COM: <s> returns true iff the token is recognized as an amount </s>
|
funcom_train/3102318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean canDecreaseSelectedElements() {
if (fListControl != null && Display.getCurrent() != null && !fListControl.isDisposed()) {
final int[] indices= fListViewer.getTable().getSelectionIndices();
for (int index= 0; index < indices.length; index++) {
if (indices[index] != index) {
return true;
}
}
}
return false;
}
COM: <s> can the indices of the selected list elements be decreased </s>
|
funcom_train/2805734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String showDirectoryBrowserDialog(String defaultDirectory) {
DirectoryDialog popup = new DirectoryDialog(new Frame());
//popup.setMode(DirectoryDialog.SAVE);
popup.setDirectory(defaultDirectory);
popup.show(this);
String returnValue = popup.getDirectory();
popup = null;
return returnValue;
}
COM: <s> displays a directory browser and gets a directory </s>
|
funcom_train/2968761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finishTask(long millis) {
IWorker w = getWorkingWorker();
if(w != null) {
w.stopWork();
try {
w.join(millis);
} catch(InterruptedException ex) {
GLog.warn(L.tr("Interrupted while waiting on worker:") + w.getName(), ex);
}
}
}
COM: <s> this method finishes the possible working task and wait specified millis </s>
|
funcom_train/13860490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initIViewerViewIdentityProperties(Class<?> factoryClass, String mediaId) {
// may be called after normal init
viewIdentityProperties.clear();
viewIdentityProperties.put(IInternalFrame.VIEWER_FACTORY_PROPERTY, factoryClass.getName());
viewIdentityProperties.put(IInternalFrame.MEDIA_ID_PROPERTY, mediaId);
}
COM: <s> initialise view identity properties for an iviewer </s>
|
funcom_train/10521573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmployeeAddressLabel() throws Exception {
_employeeJdbc.setConnection(_con);
AddressLabel al = _employeeJdbc.getEmployeeAddressLabel(2);
assertEquals("Jane Doe", al.getLine1());
assertEquals("3433 Any Place", al.getLine2());
assertEquals("Denver, CO 80201", al.getLine3());
}
COM: <s> test a jdbc control method which uses a custom result set mapper </s>
|
funcom_train/17704354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean delete(Long id) {
logger.debug("Deleting person with id: " + id);
try {
for (Person person:persons) {
if (person.getId().longValue() == id.longValue()) {
logger.debug("Found record");
persons.remove(person);
return true;
}
}
logger.debug("No records found");
return false;
} catch (Exception e) {
logger.error(e);
return false;
}
}
COM: <s> deletes an existing person </s>
|
funcom_train/16915972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPrioritiesVisible(final boolean prioritiesOn) {
this.prioritiesVisible = prioritiesOn;
actionManager.getShowPrioritiesAction().setState(prioritiesOn);
for (Iterator<NeuronNode> neuronNodes = this.getNeuronNodes()
.iterator(); neuronNodes.hasNext();) {
NeuronNode node = neuronNodes.next();
node.setPriorityView(prioritiesVisible);
}
}
COM: <s> turns the displaying of neuron priorities on or off </s>
|
funcom_train/2852869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testContentLanguage() throws Exception {
String languages = "mi, en";
header = new ContentLanguageHeader(languages);
assertTrue (header instanceof EntityHeader);
assertEquals ("Content-Language: " + languages + "\n", header.toString());
assertEquals (languages, ((ContentLanguageHeader)header).getValue());
assertEquals ("Content-Language", header.getTag());
}
COM: <s> content language 14 </s>
|
funcom_train/1238175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List findType(String type) {
// look at each entry for the type we want
ArrayList ret = null;
for (Iterator i = list.iterator(); i.hasNext();) {
Entry e = (Entry) i.next();
if (e.type.equals(type)) {
if (ret == null) {
ret = new ArrayList();
}
ret.add(e);
}
}
return ret;
}
COM: <s> lookup an entry by type </s>
|
funcom_train/8012829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection find(Collection dataRows, Object findBean, Method findMethod) throws DataStoreException {
Collection beans = getBeans(dataRows);
try {
Object[] storeParams = {beans};
if (findMethod != null) {
Collection result = (Collection) findMethod.invoke(findBean, storeParams);
return result;
} else
return null;
} catch (Exception e) {
throw new DataStoreException("Unable to retrieve bean data from physical storage.", e);
}
}
COM: <s> retrieve bean data for the specified data rows </s>
|
funcom_train/19396767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected BaseObject createLargeObject(ObjectManager om) {
byte[] data = new byte[ _data.length ];
System.arraycopy(_data,0,data,0,_data.length);
MyObject obj = new MyObject(om); // insert into OM.
obj.data = data;
return obj;
}
COM: <s> clones a large array of random data and creates inserts and returns a </s>
|
funcom_train/34557664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getHeight() {
if(!isRendered()) {
String height = getAttribute("height");
if(height == null || height.equals("")) {
return 0;
} else if(height.equals("auto")) {
return -1;
} else {
return Integer.parseInt(height);
}
} else {
return getEl().getHeight();
}
}
COM: <s> the height of this component in pixels </s>
|
funcom_train/7687115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSideMargins(ViewGroup vg, int margin) {
ViewGroup.MarginLayoutParams lp =
(ViewGroup.MarginLayoutParams) vg.getLayoutParams();
// Equivalent to setting android:layout_marginLeft/Right in XML
lp.leftMargin = margin;
lp.rightMargin = margin;
vg.setLayoutParams(lp);
}
COM: <s> sets the left and right margins of the specified view group whose </s>
|
funcom_train/39393500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPnlContent() {
if (pnlContent == null) {
try {
pnlContent = new JPanel();
pnlContent.setLayout(new BorderLayout());
pnlContent.add(getTlbToolbar(), BorderLayout.NORTH);
} catch (java.lang.Throwable e) {
BaseFrame.showException(this, e);
}
}
return pnlContent;
}
COM: <s> this method initializes pnl content </s>
|
funcom_train/45255994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillActionBars(IActionBarConfigurer2 proxyBars, int flags) {
Assert.isNotNull(proxyBars);
WorkbenchWindowConfigurer.WindowActionBarConfigurer wab = (WorkbenchWindowConfigurer.WindowActionBarConfigurer) getWindowConfigurer()
.getActionBarConfigurer();
wab.setProxy(proxyBars);
try {
getActionBarAdvisor().fillActionBars(
flags | ActionBarAdvisor.FILL_PROXY);
} finally {
wab.setProxy(null);
}
}
COM: <s> fills the windows proxy action bars </s>
|
funcom_train/4124771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element handle(FreeColServer server, Connection connection) {
/* Do not trust the client-supplied sender name */
player = server.getPlayer(connection);
sender = player.getId();
server.getServer().sendToAll(toXMLElement(), connection);
return null;
}
COM: <s> handle a chat message </s>
|
funcom_train/14012417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int toPoint() {
switch (units) {
case PT:
return value;
case PC:
return value * 12;
case IN:
return value * 72;
case MM:
return (int) ((value / 25.4) * 72);
case CM:
return (int) ((value / 2.54) * 72);
}
throw new IllegalStateException("Cannot convert to pt.");
}
COM: <s> returns the value of the extent in points </s>
|
funcom_train/8407640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsKey(Object key1, Object key2) {
int hashCode = hash(key1, key2);
AbstractHashedMap.HashEntry entry = map.data[map.hashIndex(hashCode, map.data.length)];
while (entry != null) {
if (entry.hashCode == hashCode && isEqualKey(entry, key1, key2)) {
return true;
}
entry = entry.next;
}
return false;
}
COM: <s> checks whether the map contains the specified multi key </s>
|
funcom_train/43244857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetLockKey() {
System.out.println("setLockKey");
String lockKey = "";
LockInfoObject instance = new LockInfoObject();
instance.setLockKey(lockKey);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set lock key method of class org </s>
|
funcom_train/4615356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String runHTMLSuite(String browser, String browserURL, String suiteURL, File outputFile, int timeoutInSeconds, boolean multiWindow) throws IOException {
return runHTMLSuite(browser, browserURL, suiteURL, outputFile,
timeoutInSeconds, multiWindow, "info");
}
COM: <s> launches a single html selenium test suite </s>
|
funcom_train/45692184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNextSongNumberPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Song_nextSongNumber_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Song_nextSongNumber_feature", "_UI_Song_type"),
EsxPackage.Literals.SONG__NEXT_SONG_NUMBER,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the next song number feature </s>
|
funcom_train/33918053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pauseSession() throws Exception {
// log.info("in reset session...");
//
// SalesforceSession newSession =
// SalesforceSessionFactory.factory.build(this.getSalesforceCredentials());
//
// this.setSalesforceSession(newSession);
//
// log.info("reset session complete...");
this.publishStatus("resting");
log.debug("waiting for 10 seconds (instead of resetting session)...");
Thread.sleep(10000);
}
COM: <s> sleeps for 10 seconds useful when executing a lot of tasks dependent </s>
|
funcom_train/32779436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setState(String state, long time) throws ModelException{
if(this.entityTyp.existPosibleState(state)){
Attribute last = null;
try{ last = this.state.lastElement();
}catch(NoSuchElementException e){}
if(last != null && !last.getValue().equals(state)){
this.state.add(new Attribute("state", state, time));
}
if(this.grafic != null) this.grafic.setImage();
}
}
COM: <s> set new state value </s>
|
funcom_train/65589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void referenceData(Map model, Object command, Object context) {
for (Iterator iter = chainedOptions.iterator(); iter.hasNext();) {
ChainedOption chainedOption = (ChainedOption) iter.next();
List options = chainedOption.retrieveOptions(command, context);
model.put(chainedOption.getOptionsKey(), options);
chainedOption.updateValue(command, options, context);
}
}
COM: <s> iterate through the collection of code chained option code objects and </s>
|
funcom_train/33604970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PointSet2D getPathX() {
xPath = new PointSet2D();
Vector<R2> phase = new Vector<R2>();
for (R3 p : path.points) { phase.add(new R2(p.z,p.x)); }
xPath.setPath(phase);
return xPath;
}
COM: <s> returns coords 1 2 of the solution </s>
|
funcom_train/29985181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HTTPHeader getHeader (String statusLine) {
HTTPHeader ret = new HTTPHeader ();
ret.setStatusLine (statusLine);
ret.setHeader ("Server", con.getProxy ().getServerIdentity ());
ret.setHeader ("Content-type", "text/html");
ret.setHeader ("Pragma", "no-cache");
return ret;
}
COM: <s> get a new httpheader initialized with some data </s>
|
funcom_train/45856783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateWoonplaats(nl.vrom.www.bag.stuf._0120.WoonplaatsVraag[] param){
if ((param != null) && (param.length > 4)){
throw new java.lang.RuntimeException();
}
if ((param != null) && (param.length < 1)){
throw new java.lang.RuntimeException();
}
}
COM: <s> validate the array for woonplaats </s>
|
funcom_train/13683069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getMainContainer() {
if (mainContainer == null) {
mainContainer = new JTabbedPane();
mainContainer.setBounds(new java.awt.Rectangle(0,0,402,253));
mainContainer.addTab("General", null, getGeneral(), null);
mainContainer.addTab("Attributes", null, getAttribute(), null);
}
return mainContainer;
}
COM: <s> this method initializes main container </s>
|
funcom_train/50915208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CMLAtom deleteAnyLigandHydrogenAtom() {
CMLAtom ligand = null;
List<CMLAtom> hydrogens = getLigandHydrogenAtoms();
if (hydrogens.size() > 0) {
CMLMolecule molecule = this.getMolecule();
ligand = hydrogens.get(0);
CMLBond bond = molecule.getBond(this, ligand);
molecule.deleteBond(bond);
molecule.deleteAtom(ligand);
}
return ligand;
}
COM: <s> if atom has one or more hydrogen atoms deletes one </s>
|
funcom_train/33639523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator getInRelated() {
ArrayList related = new ArrayList(m_in.size());
for (int i = 0; i < m_in.size(); i++) {
DirectedEdge e = (DirectedEdge)m_in.get(i);
related.add(e.getInNode());
}
return(related.iterator());
}
COM: <s> returns all in nodes of in edges </s>
|
funcom_train/21644706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getRobotEditorMenuItem() {
if (robotEditorMenuItem == null) {
robotEditorMenuItem = new JMenuItem();
robotEditorMenuItem.setText("Editor");
robotEditorMenuItem.setMnemonic('E');
robotEditorMenuItem.setDisplayedMnemonicIndex(0);
robotEditorMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.CTRL_MASK, false));
robotEditorMenuItem.addActionListener(eventHandler);
}
return robotEditorMenuItem;
}
COM: <s> return the robot editor menu item </s>
|
funcom_train/13568408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final DBSimVehicle veh) {
double now = SimulationTimer.getTime();
activateLink();
this.add(veh, now);
veh.setCurrentLink(this.getLink());
DBSimulation.getEvents().processEvent(
new LinkEnterEventImpl(now, veh.getDriver().getPerson().getId(),
this.getLink().getId(), null));
}
COM: <s> adds a vehicle to the link called by </s>
|
funcom_train/17526919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int update(Connection conn, String sql, Map pStmntValues) throws SQLException {
PreparedStatement pstmnt = null;
try {
// Build prepared statement
pstmnt = this.buildPreparedStatement(new NamedParameterStatement(conn, sql), pStmntValues);
// Attempt to exceute the statement
int rows = pstmnt.executeUpdate();
return rows;
} catch (SQLException sqle) {
DbUtils.close(pstmnt);
throw sqle;
} finally {
DbUtils.close(pstmnt);
}
}
COM: <s> insert update delete sql </s>
|
funcom_train/48089055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getConfigHttpCommand() {
if (configHttpCommand == null) {//GEN-END:|37-getter|0|37-preInit
// write pre-init user code here
configHttpCommand = new Command("Configurar", Command.SCREEN, 0);//GEN-LINE:|37-getter|1|37-postInit
// write post-init user code here
}//GEN-BEGIN:|37-getter|2|
return configHttpCommand;
}
COM: <s> returns an initiliazed instance of config http command component </s>
|
funcom_train/42950713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void progressStarted(ProgressEvent evt) {
// Set up the progress bar to handle a new progress event.
boolean indeterminate = evt.isIndeterminate();
progressBar.setIndeterminate(indeterminate);
if (indeterminate == false) {
progressBar.setValue(evt.getMinimum());
progressBar.setMinimum(evt.getMinimum());
progressBar.setMaximum(evt.getMaximum());
}
progressBar.setVisible(true);
}
COM: <s> indicates the begining of a long operation </s>
|
funcom_train/32710004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkActions(LexScan scanner, LexParse parser) {
EOFActions eofActions = parser.getEOFActions();
for (Action a : scanner.actions)
if ( !a.equals(usedActions.get(a)) && !eofActions.isEOFAction(a) )
Out.warning(scanner.file, ErrorMessages.NEVER_MATCH, a.priority-1, -1);
}
COM: <s> check that all actions can actually be matched in this dfa </s>
|
funcom_train/41835130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
try {
if (_socket != null) {
_socket.close();
}
if (_socketOut != null) {
_socketOut.close();
}
if (_socketIn != null) {
_socketIn.close();
}
} catch (IOException e) {
}
_socketIn = null;
_socketOut = null;
_socket = null;
}
COM: <s> close the socket connection an set everything to null </s>
|
funcom_train/10584978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setDirectory(Directory dir) throws IOException {
boolean locked = false;
this.directory = dir;
// if index is locked
if (IndexReader.isLocked(directory)) {
IndexReader.unlock(directory);
locked = true;
}
// create index if the index doesn't exist
if (!IndexReader.indexExists(directory)) {
(new IndexWriter(directory, null, true)).close();
}
return locked;
}
COM: <s> set the lucene directory </s>
|
funcom_train/8879467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public V get(K key) throws OperationFailedException {
assert key != null;
// try to get the key-value entry from the cache
Entry<K, V> entry = map.get(key);
if (entry == null) {
// cache miss, use data retreiver to obtain the key
// atomically put the new value to the cache if still missing
entry = setIfAbsent(key, retriever.retrieve(key));
} else {
// move the entry to the head of the queue
queue.pop(entry);
}
// return the requested value
return entry.value;
}
COM: <s> get value for the key </s>
|
funcom_train/26635612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRedundantGenerations(byte[] data) {
int walker = 0;
int redGens = 0;
while (data[walker] == signedT140PayloadType) {
redGens++;
walker += AudioConstants.REDUNDANT_HEADER_SIZE;
}
if (data[walker] != t140PayloadType) {
logger.warning("Malformed redundancy in RTP text packet, could " +
"not fint primary data!");
redGens = 0;
}
return redGens;
}
COM: <s> find out how many redundant generations there are in the received packet </s>
|
funcom_train/25659350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show( ManageMappingsSearchResults search, String path, String dto, String flow, String role, String userRole ) {
for ( ManageMappingsNode node : search.getNodes() ) {
if ( node.getDto().getDtoClass().equals(dto) ) {
blomoFlowService.show(node,path,role,flow,userRole);
break;
}
}
}
COM: <s> shows a mapping </s>
|
funcom_train/51733514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public C_Port addTCPclient() {
//add client from TCP listning
if (slave instanceof T_IP) {
if (((T_IP) slave).getTCPsocket() == null) {
return null;
} // if listner receive client socket=> creation of client port
C_Port a = (C_Port) Parent.addCX(this, "Port");
return a;
}
return null;
}
COM: <s> ask new port creationstop lclient for connexion to listener </s>
|
funcom_train/24088796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateRootModified() {
/*
* We are not using root.lastModified() as is here as that gives
* inconsistent results and its behavior varies on different platforms.
* Instead, we explicitly set it to the current time in nanoseconds.
*/
boolean ok = root.setLastModified(System.nanoTime());
if (!ok) {
log.warning("Could not set root modified time");
}
}
COM: <s> updates the last modification time to the current time </s>
|
funcom_train/50077062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getAllElements() {
Component[] all = this.getComponents();
Collection result = new ArrayList();
for(int k = 0; k < all.length; k++) {
try{
SofaaElement current = (SofaaElement) all[k];
result.add(current);
}
catch (ClassCastException e) {
/* We skip selection Rectangle */
}
}
return result;
}
COM: <s> gets all sofaa elements of this work tab </s>
|
funcom_train/38542505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void releaseObject(final Object obj) {
final Object pooledObject = getObjectFromUsed(obj);
// return the object only if the max size is not exceeded.
// this is to accomodate a change in the maxSize.
if (this.usedObjects.size() + this.freeObjects.size() < this.maxSize) {
putInFreeObjects(pooledObject);
} else {
removeOld(obj);
}
}
COM: <s> this method enables to return an object to the object pool </s>
|
funcom_train/33453172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DetachedCriteria createCriteria(ThemeSearchRequest request) {
DetachedCriteria criteria = DetachedCriteria.forClass(getDomainClass());
String sortedField = request.getSortedField();
if (sortedField == null || sortedField.length() == 0) {
throw new IllegalArgumentException("sorted field is not specefied");
}
return criteria;
}
COM: <s> creates a basic criteries from search requests </s>
|
funcom_train/32368865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUpdateUser() throws Exception {
String testName = "UpdateUser";
if (LOGGER.isInfoEnabled()) {
LOGGER.info("\n\t\tRunning Test: " + testName);
}
UserServiceImpl fixture = getFixture();
User user = getStoredUser();
fixture.update(user);
if (LOGGER.isInfoEnabled()) {
LOGGER.info(testName + " - end "); //$NON-NLS-1$
}
}
COM: <s> run the void update user user method test </s>
|
funcom_train/17788452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getOffset(int row, int elementInRow) {
if ((v == 0) || (v == 2)) {
return getIntOffset(row,elementInRow);
} else if ((v == 1) || (v == 3)) {
return getLongOffset(row,elementInRow);
} else {
assert(true);
}
return -1;
}
COM: <s> returns the j th offset in row i of the array </s>
|
funcom_train/23969179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Statement compileCommit() {
boolean chain = false;
read();
readIfThis(Tokens.WORK);
if (token.tokenType == Tokens.AND) {
read();
if (token.tokenType == Tokens.NO) {
read();
} else {
chain = true;
}
readThis(Tokens.CHAIN);
}
return chain ? StatementSession.commitAndChainStatement
: StatementSession.commitNoChainStatement;
}
COM: <s> responsible for handling the execution of commit work </s>
|
funcom_train/9994178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNeedTermine() throws AssertionFailedException {
System.out.println("needTermine");
UpdateScreen instance = null;
boolean expResult_1 = false;
boolean result_1 = instance.needTermine();
assertEquals(expResult_1, result_1);
fail("The test case is a prototype.");
}
COM: <s> test of test need termine method of class update screen </s>
|
funcom_train/32762703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void resetBestPoint() {
final List variables = _problem.getVariables();
final MutableTrialPoint trialPoint = new MutableTrialPoint( variables.size() );
final Iterator variableIter = variables.iterator();
while ( variableIter.hasNext() ) {
final Variable variable = (Variable)variableIter.next();
final double value = variable.getInitialValue();
trialPoint.setValue( variable, value );
}
_bestPoint = trialPoint.getTrialPoint();
}
COM: <s> reset the trial points variables to their starting values </s>
|
funcom_train/18059251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String format_data( HyphenBreak[] breaks ) {
StringBuilder sb = new StringBuilder();
for ( int i = 0; i < breaks.length; i++ ) {
if ( breaks[ i ] == null ) {
sb.append( "0" );
} else {
sb.append( breaks[ i ].toString() );
}
}
return sb.toString();
}
COM: <s> formats an array of </s>
|
funcom_train/38352683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireExceptionIfParameterIsUnassigned(String parameter) throws UnassignedParameterException {
// get ParameterWrapper for paraName
ParameterWrapper pw = (ParameterWrapper)parameters.get(parameter);
if (pw == null)
throw new RuntimeException("No Parameter " + parameter + " in parameters map");
if (pw.operator == null)
throw new UnassignedParameterException("Parameter " + parameter + " is unassigned in Parameter Controller " + this.getName());
}
COM: <s> this method fires an unassigned parameter exception if </s>
|
funcom_train/9759534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ImageDescriptor getImageDescriptor(String iconPath, IConfigurationElement element) {
String pluginId= element.getContributor().getName();
Bundle bundle= Platform.getBundle(pluginId);
if (bundle == null)
return null;
URL url= FileLocator.find(bundle, new Path(iconPath), null);
if (url != null)
return ImageDescriptor.createFromURL(url);
return ImageDescriptor.getMissingImageDescriptor();
}
COM: <s> returns the image descriptor for the icon path specified by the given configuration </s>
|
funcom_train/15607009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveChildInFrontOf(Glyph child, Glyph referenceChild) {
if (Assert.debug)
Assert.vAssert(hasChild(child) && hasChild(referenceChild));
int childIndex = getOrderIndexOfChild(child);
int referenceChildIndex = getOrderIndexOfChild(referenceChild);
if (childIndex <= referenceChildIndex)
moveChildToOrderIndex(child, Math.min(referenceChildIndex+1, FOREGROUND));
}
COM: <s> move a child in front of another child </s>
|
funcom_train/11730248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPrimaryType() throws Exception {
// get default workspace test root node using superuser session
Node defaultRootNode = (Node) superuser.getItem(testRootNode.getPath());
Node testNode = defaultRootNode.addNode(nodeName1, testNodeType);
assertEquals("The primary node type is not properly stored in jcr:primaryType",testNodeType,testNode.getProperty(jcrPrimaryType).getString());
}
COM: <s> tests if the primary node type is properly stored in jcr primary type </s>
|
funcom_train/45843373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createUI(WorldManager wm) {
SwingFrame frame = new SwingFrame(wm);
// center the frame
frame.setLocationRelativeTo(null);
// show frame with focus
frame.canvas.requestFocusInWindow();
frame.setVisible(true);
// Add to the wm to set title string later during debugging
wm.addUserData(OnscreenRenderBuffer.class, frame.m_renderBuffer);
}
COM: <s> create all of the swing windows and the 3 d window </s>
|
funcom_train/1581738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
final List oldSelection = new ArrayList();
final List newSelection = new ArrayList();
final Iterator iter = this.selection.iterator();
//noinspection WhileLoopReplaceableByForEach
while (iter.hasNext()) {
Object t = iter.next();
//noinspection unchecked
oldSelection.add(t);
}
SelectionChangedEvent event = new SelectionChangedEvent(this, oldSelection, newSelection);
this.selection.clear();
this.eventSupport.fireEvent(event);
}
COM: <s> this clears the selection list </s>
|
funcom_train/15493185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class TestInterImpl implements TestInter {
/**
*
*/
public String helloWorld(String msg) throws java.rmi.RemoteException {
if (throwException) {
throw new java.rmi.RemoteException("This is a test ex");
}
System.out.println("Message is :" + msg);
called = true;
return "Bob is your uncle";
}
}
COM: <s> the test interface implementation </s>
|
funcom_train/10352643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTable getJTableNumberFound() {
if (jTableNumberFound == null) {
numbersFound = new SudokuEventTableNumberFound();
sudokuManager.subscribe((SudokuEventTableNumberFound)numbersFound);
jTableNumberFound = new JTable(numbersFound);
jTableNumberFound.setRowSorter(new TableRowSorter<SudokuEventTableModel>(numbersFound));
}
return jTableNumberFound;
}
COM: <s> this method initializes j table number found </s>
|
funcom_train/4230873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getNextLayerConnectedCells(int layer) {
if (nextLayerConnectedCells == null) {
nextLayerConnectedCells = new ArrayList[temp.length];
for (int i = 0; i < nextLayerConnectedCells.length; i++){
nextLayerConnectedCells[i] = new ArrayList(2);
if (i == nextLayerConnectedCells.length-1) {
nextLayerConnectedCells[i].add(source);
} else {
nextLayerConnectedCells[i].add(this);
}
}
}
return nextLayerConnectedCells[layer - minRank - 1];
}
COM: <s> returns the cells this cell connects to on the next layer up </s>
|
funcom_train/21317796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ITestDataTable getITestDataTable() {
ITestDataTable myTable = null;
//aek - didn't work for swing
if (getTestDataTypes().containsKey("grid"))
myTable = (ITestDataTable) getTestData("grid");
else if (getTestDataTypes().containsKey("contents"))
myTable = (ITestDataTable) getTestData("contents");
return myTable;
}
COM: <s> returns the itest data table object for the particular table in this object </s>
|
funcom_train/2537809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rotateZ(Vector3D rotationPoint, float degree, TransformSpace transformSpace) {
switch (transformSpace) {
case LOCAL:
rotationPoint = MTComponent.getLocalVecToParentRelativeSpace(this, rotationPoint);
break;
case RELATIVE_TO_PARENT:
//default
break;
case GLOBAL:
rotationPoint = MTComponent.getGlobalVecToParentRelativeSpace(this, rotationPoint);
break;
default:
break;
}
this.rotateZ(rotationPoint, degree);
}
COM: <s> rotates the component around the specified point on the z axis </s>
|
funcom_train/20286306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RequirementMapItem getItem(int position) {
return (RequirementMapItem) this.get(position - 1);
/*
* Iterator i = this.iterator();
* while (i.hasNext()) {
* RequirementMapItem thisItem = (RequirementMapItem) i.next();
* if (thisItem.getPosition() == position) {
* return thisItem;
* }
* }
* return null;
*/
}
COM: <s> gets the item attribute of the requirement map list object </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.