__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/1786635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void interruptThread(long threadId) {
try {
Thread thread = ThreadUtils.getThread(threadId);
// then send interrupt signal, which is caught in code and
// used to trigger termination of job
thread.interrupt();
} catch (NullPointerException e) {
i18nLog.error("kill.error.null");
}
}
COM: <s> interrupts the thread </s>
|
funcom_train/44222243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String extractAbstract() {
if (broken)return null;
StringBuffer sb = new StringBuffer();
for (int i = 0; i < this.pgs.size(); i++) {
TextBlock pg = (TextBlock)this.pgs.get(i);
if (pg.type == DISREGARDED ||
pg.type == FIGURE ||
pg.type == FOOTER ||
pg.type == HEADER)
continue;
if (pg.section != ABSTRACT)
continue;
sb.append(pg.s);
}
return sb.toString();
}
COM: <s> extracts the abstract from the pdf file </s>
|
funcom_train/45246988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JNumberFloatField getJNumberFloatFieldProporcaoJC69() {
if (jNumberFloatFieldProporcaoJC69 == null) {
jNumberFloatFieldProporcaoJC69 = new JNumberFloatField();
jNumberFloatFieldProporcaoJC69.setLocation(new Point(345, 153));
jNumberFloatFieldProporcaoJC69.setSize(new Dimension(65, 20));
}
return jNumberFloatFieldProporcaoJC69;
}
COM: <s> this method initializes j number float field proporcao jc69 </s>
|
funcom_train/39182708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
if(System.err instanceof SystemLogHandler)
System.setErr(((SystemLogHandler)System.err).getWrapped());
threadStop();
Iterator servlets = jsps.values().iterator();
while (servlets.hasNext()) {
((JspServletWrapper) servlets.next()).destroy();
}
}
COM: <s> process a destory event for this web application context </s>
|
funcom_train/22582327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateLimiting() {
// First of all, if we are going active after a period
// of being inactive, we need to start the stopwatch, and
// also mark the last check we did (which we'll pretend was
// right now).
if (temp_active && !active) {stamp = getCount(); sw.reset(); sw.start();}
// Now we perform a simple variable set operation.
active = temp_active;
}
COM: <s> changes the limiting state </s>
|
funcom_train/9920788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dealSharedCards(int numCards){
// Reset number of raises to zero
numRaises = 0;
raiserIndex = getIndexNextPlayer(dealerIndex);
long newCard;
for (int i=0; i<numCards; i++){
newCard = createUnusedCard();
communityCards = communityCards | newCard;
}
}
COM: <s> deals the specified number of cards as shared cards </s>
|
funcom_train/22428976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getChkUseProxyChain() {
if (chkUseProxyChain == null) {
chkUseProxyChain = new JCheckBox();
chkUseProxyChain.setText("Use an outgoing proxy server");
chkUseProxyChain.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setProxyChainEnabled(chkUseProxyChain.isSelected());
}
});
}
return chkUseProxyChain;
}
COM: <s> this method initializes chk use proxy chain </s>
|
funcom_train/2292444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setResourceTypes(Map types) {
if ((types == null) || (types.size() == 0)) {
setValidConfiguration(false);
LOG.error(Messages.get().getBundle().key(Messages.LOG_NO_RESOURCE_TYPES_0));
}
m_resTypes = types;
}
COM: <s> sets the valid resource types of the editor </s>
|
funcom_train/8905809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print_monsters() {
int size = mob.size();
System.out.print("There ");
if (size > 1) {
System.out.print("are ");
} else {
System.out.print("is ");
}
System.out.print(size + " monster");
if (size > 1) {
System.out.println("s here:");
} else {
System.out.println(" here:");
}
Iterator<Monster> iter = mob.iterator();
while(iter.hasNext())
Utility.println(iter.next().name);
}
COM: <s> prints the names of all monsters in this mob </s>
|
funcom_train/18032114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getCheckAspectRatio() {
if (m_checkAspectRatio == null) {
m_checkAspectRatio = new JCheckBox(Messages.getString("ImportDialog.2")); //$NON-NLS-1$
m_checkAspectRatio.setEnabled(false);
m_checkAspectRatio.addActionListener(new MyActionListener());
}
return m_checkAspectRatio;
}
COM: <s> returns the checkbox keep aspect ratio </s>
|
funcom_train/46640190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void pickOutputFile() {
FileDialog dlg = new FileDialog(shell, SWT.SAVE);
dlg.open();
// now get our output file
String filename = dlg.getFileName();
// if a filename was selected then create our full path
if (filename.length() > 0) {
filename = dlg.getFilterPath() + File.separator + filename;
}
outputFile.setText(filename);
}
COM: <s> allows the user to pick the output file for the extract </s>
|
funcom_train/31468088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(UnsignedShiftRightAssignExpression node) {
Node left = node.getLeftExpression();
LeftHandSideModifier mod = NodeProperties.getModifier(left);
Object lhs = mod.prepare(this, context);
// Perform the operation
Object result = InterpreterUtilities.unsignedShiftRight
(NodeProperties.getType(node),
lhs,
node.getRightExpression().acceptVisitor(this));
// Cast the result
result = performCast(NodeProperties.getType(left), result);
// Modify the variable and return
mod.modify(context, result);
return result;
}
COM: <s> visits a unsigned shift right assign expression </s>
|
funcom_train/29783850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void prepareContext() {
Map<String, Object> addCtx = new HashMap<String, Object>();
// make this object available in template
addCtx.put("tool", this); //$NON-NLS-1$
addCtx.put("outputDir", getOutputDir());
addCtx.put("outputFile", getOutputFile());
addCtx.put("filename", getOutputFile().getName());
generator.addToContext(addCtx);
}
COM: <s> prepare velocity context for generator and template </s>
|
funcom_train/45018366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEndTimePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NXentry_endTime_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NXentry_endTime_feature", "_UI_NXentry_type"),
NexusPackageImpl.Literals.NXENTRY__END_TIME,
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the end time feature </s>
|
funcom_train/45502457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSpeedFactorDown( double val ) throws IllegalArgumentException {
if( val <= 0 )
throw new IllegalArgumentException( ZLocalization.getSingleton().getString( "ds.z.DelayArea.SpeedFactorNegativeException" ) );
else if( val > 1 )
throw new IllegalArgumentException( ZLocalization.getSingleton().getString( "ds.z.DelayArea.SpeedFactorToHighException" ) );
else
this.speedFactorDown = val;
}
COM: <s> sets a new value for the speed factor in the area </s>
|
funcom_train/12119463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean or(BitString set) {
if (this == set) { // should help alias analysis
return false;
}
int setLength = set.bits.length;
boolean changed = false;
for (int i = setLength; i-- > 0;) {
int old = bits[i];
bits[i] |= set.bits[i];
changed |= (old != bits[i]);
}
return changed;
}
COM: <s> logically ors this bit set with the specified set of bits </s>
|
funcom_train/37653511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void write(String filename, StringBuilder buf) throws IOException {
BufferedWriter bw = new BufferedWriter(new FileWriter(new File(baseDir + FILE_SEPARATOR + filename)));
bw.write(buf.toString(), 0, buf.length());
IOUtil.closeQuietly(bw);
}
COM: <s> writes the buffer to file </s>
|
funcom_train/40685814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMapDragHandler(final MapDragHandler handler) {
maybeInitMapDragHandlers();
mapDragHandlers.addHandler(handler, new VoidCallback() {
@Override
public void callback() {
MapDragEvent e = new MapDragEvent(MapWidget.this);
handler.onDrag(e);
}
});
}
COM: <s> this event is repeatedly fired while the user drags the map </s>
|
funcom_train/1825954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Geometry removeRepeatedPoints(Geometry geometry) {
if (geometry.isEmpty()) {
return geometry;
}
return edit(geometry, new CoordinateOperation() {
public Coordinate[] edit(Coordinate[] coordinates, boolean linearRing) {
//May return the same Coordinate array. [Jon Aquino]
return com.vividsolutions.jts.geom.CoordinateArrays.removeRepeatedPoints(
coordinates);
}
});
}
COM: <s> the input and output geometries may share some coordinate arrays </s>
|
funcom_train/20765872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeEvents() {
// eventList=new ArrayList<E>(DEFAULT_INITIAL_CAPACITY);
// elementData = (E[])new BasicEvent[DEFAULT_INITIAL_CAPACITY];
elementData=(E[]) Array.newInstance(eventClass, DEFAULT_INITIAL_CAPACITY);
fillWithDefaultEvents(0, DEFAULT_INITIAL_CAPACITY);
size=0;
capacity=DEFAULT_INITIAL_CAPACITY;
}
COM: <s> fills this with default initial capacity of the event class </s>
|
funcom_train/43898457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOrthodromicDistance() throws Exception {
final Parser parser = new Parser();
final DefaultProjectedCRS crs = (DefaultProjectedCRS) parser.parseObject(NAD83_BC);
double d = JTS.orthodromicDistance(new Coordinate(1402848.1938534670, 651571.1729878788),
new Coordinate(1389481.3104009738, 641990.9430108378), crs);
double realValue = 16451.33114;
assertEquals(realValue, d, 0.1);
}
COM: <s> tests the distance between points function </s>
|
funcom_train/9503643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public GeoLine Tangent(String label, NumberValue a, GeoFunction f) {
AlgoTangentFunctionNumber algo = new AlgoTangentFunctionNumber(cons, label,
a, f);
GeoLine t = algo.getTangent();
t.setToExplicit();
t.update();
notifyUpdate(t);
return t;
}
COM: <s> tangent to f in x a </s>
|
funcom_train/12573594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTextAreaGroup() {
textAreaGroup = new Group(textAreaComposite, SWT.NONE);
textAreaGroup.setLayout(new FillLayout());
textAreaGroup.setText("Body");
textArea = new Text(textAreaGroup, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.BORDER);
textArea.setEditable(false);
}
COM: <s> this method initializes text area group </s>
|
funcom_train/17492131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(FormalParameter node) {
ClassInfo ci = (ClassInfo) node.getType().acceptVisitor(this);
if (node.isFinal()) {
context.defineConstant(node.getName(), ci);
} else {
context.define(node.getName(), ci);
}
return null;
}
COM: <s> visits a formal parameter </s>
|
funcom_train/49794833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void revert(File file, List<VcsException> exceptions) {
logger.debug("MksRollbackEnvironment.revert " + file);
// si revert --overwriteChanged
/*
si revert --batch --overwriteUnchanged --overwriteChanged --overwriteDeferred --restoreTimestamp [(-S sandbox|--sandbox=sandbox)] [(-F file|--selectionFile=file)]
--------------------------------------------------------------------------------
*/
// todo throw new UnsupportedOperationException("Method revert not yet implemented");
}
COM: <s> reverts the file using si revert </s>
|
funcom_train/8637010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUserPattern(final String userPattern) {
this.userPattern = userPattern;
if (userPattern == null) {
this.userPatternArray = null;
} else {
this.userPatternArray = this.parseUserPatternString(userPattern);
final int len = this.userPatternArray.length;
this.userPatternFormatArray = new MessageFormat[len];
for (int i = 0; i < len; i++) {
this.userPatternFormatArray[i] = new MessageFormat(
this.userPatternArray[i]);
}
}
}
COM: <s> set the message format pattern for selecting users in this realm </s>
|
funcom_train/43207074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object friends_get(Long friendListId)
throws FacebookException, IOException {
FacebookMethod method = FacebookMethod.FRIENDS_GET;
Collection params =
new ArrayList(method.numParams());
if (null != friendListId) {
if (0L >= friendListId.longValue()) {
throw new IllegalArgumentException("given invalid friendListId " + friendListId.toString());
}
params.add(new Pair("flid", friendListId.toString()));
}
return this.callMethod(method, params);
}
COM: <s> retrieves the friends of the currently logged in user that </s>
|
funcom_train/44830814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NoisyPIM (InteractionModel im,Deployment dep, int[] numProps) {
this.im = im;
this.numProps = numProps;
this.deploy = dep;
seeds = new Vector();
seeds.add( new Long( rnd.nextLong() ) ); // First time round will have same seed everywhere & only one.
numPops = im.getNumEvolvers();
}
COM: <s> creates new noisy im </s>
|
funcom_train/2624483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void editProject() {
Project project = ((ProjectListModel) projectManagement.getListModel()).getList().get(list.getSelectedIndex());
projectManagement.saveTemporary(project);
CreateProject createProject = new CreateProject(projectManagement, true);
createProject.showDialog();
}
COM: <s> loads the edit project dialog </s>
|
funcom_train/39474841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfRounds() {
/*
* that's tricky:
* if p1 started it is: (entries.size()+1) / 2 to ensure ceiling-round
* if p2 started it is: (entries.size()+1+1) /2 to ensure ceiling-round
* ergo:
*/
return (entries.size() + startingPlayer) / 2;
}
COM: <s> return the number of rounds that are kept in this history </s>
|
funcom_train/7757746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getMessenger(MessengerEventListener listener, EndpointAddress addr, Object hint) {
Messenger m = getMessengerImmediate(addr, hint);
if (m == null) {
return false;
}
if (!listenerAdaptor.watchMessenger(listener, m)) {
return false;
}
// Make sure that resolution is being attempted if not already
// in progress.
m.resolve();
return true;
}
COM: <s> convenience legacy methods </s>
|
funcom_train/37078791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setRangeThatHasSequence() {
if (curation != null && curation.getRefSequence() != null) {
RangeI refSeqRange = curation.getRefSequence().getRange();
startOfRange = refSeqRange.getLow();
endOfRange = refSeqRange.getHigh();
}
}
COM: <s> record start end positions of range that has sequence </s>
|
funcom_train/43067629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addViewChange(ViewChange vc2){
if (vc2.getView() != viewNumber)
throw new RuntimeException("cant add vc for "+vc2.getView()+
" to cert for "+viewNumber);
Digest tmp = new Digest(vc2.getBytes());
if (!tmp.equals(vcDigest))
clear();
vc = vc2;
vcDigest = tmp;
for (int i = 0;i < ackCache.length; i++)
if (ackCache[i] != null)
addAck(ackCache[i]);
}
COM: <s> add the view change to the certificate </s>
|
funcom_train/3340796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllChildren() {
if (_children == null) return;
Enumeration<TreeNode> e = _children.elements();
while (e.hasMoreElements()) {
MutableTreeNode node = (MutableTreeNode) e.nextElement();
node.setParent(null);
}
_children.removeAllElements();
}
COM: <s> removes all of this nodes children setting their parents to null </s>
|
funcom_train/27843028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getExpandedPath() {
BeanUtilsVariables var = (BeanUtilsVariables) getVariables();
if ((var != null) && var.isChanged()) {
synchronized (var) {
_expandedPath = expandPath(getPath(), var);
var.resetChanges();
}
}
return _expandedPath;
}
COM: <s> gets the path with the variables replaced by their actual value </s>
|
funcom_train/3156656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getRawStorageSize(ProductSubsetDef subsetDef) {
long size = 0L;
if (isPartOfSubset(subsetDef)) {
size += 256; // add estimated overhead of 256 bytes
size += ProductData.getElemSize(getDataType()) * getNumDataElems();
}
return size;
}
COM: <s> gets the estimated size in bytes of this product node </s>
|
funcom_train/669285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private HashMap addChildToParent(HashMap answer, int parentId, StudyBean child) {
Integer key = new Integer(parentId);
ArrayList children = (ArrayList) answer.get(key);
if (children == null) {
children = new ArrayList();
}
children.add(child);
answer.put(key, children);
return answer;
}
COM: <s> only for use by get children by parent ids </s>
|
funcom_train/18241874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_offsetToPosition_Gapped_ValidPosition_BeforeGap(){
String gappedSequence = "ABCDE-FG";
int gappedOffset = 3; //0-based
//pos is 1 based
int ungappedPos = SeqdataUtil.offsetToPosition(gappedSequence,gappedOffset);
assertEquals(ungappedPos -1, gappedOffset);
}
COM: <s> this test the offset is before any </s>
|
funcom_train/25391765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String inString(byte[] bytes){
byte[] result = new byte[bytes.length];
int j=bytes.length-1;
for(int i=0; i<bytes.length;i++){
result[i]=bytes[j--];
}
return new String(bytes);
}
COM: <s> covert a byte array to a java string value </s>
|
funcom_train/19973021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showSplashText(int msgId) {
splashText.setText(msgId);
if (viewSwitcher.getDisplayedChild() != 1) {
// Stop the game.
boardView.surfaceStop();
viewSwitcher.setInAnimation(animSlideInRight);
viewSwitcher.setOutAnimation(animSlideOutRight);
viewSwitcher.setDisplayedChild(1);
}
// Any key dismisses it, so we need focus.
splashText.requestFocus();
}
COM: <s> set the status text to the given text message </s>
|
funcom_train/4378141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getWap2Connection( int index ) throws NoMoreTransportsException, IOException {
if( index >= srWAP2.length ) {
throw new NoMoreTransportsException();
}
if( CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_DIRECT) ) {
ServiceRecord sr = srWAP2[index];
return ";deviceside=true;ConnectionUID="+sr.getUid();
}
return null;
}
COM: <s> generates a connection parameter using the wap2 transport if available </s>
|
funcom_train/18750715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Morphism afterInverse(Morphism morph) {
reporter.start(AFTER_INVERSE);
try {
Morphism result = createMorphism(morph.cod(), cod);
constructInvertConcat(morph, this, result);
return result;
} catch (FormatException exc) {
return null;
} finally {
reporter.stop();
}
}
COM: <s> returns the concatenation of this node map after the inverse of another </s>
|
funcom_train/20044900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _getFileProviderLocality() {
String baseURL = util.utils.getOfficeTemp((XMultiServiceFactory)tParam.getMSF());
log.println("Using: "+baseURL);
int loc = oObj.getFileProviderLocality(baseURL);
log.println("Getting: "+loc);
tRes.tested("getFileProviderLocality()",loc > 0);
}
COM: <s> gets the locality for soffice temporary directory </s>
|
funcom_train/48894993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validateCep(String cep2) throws ExceptionLogic {
if (cep2.length() != 8)
throw new ExceptionLogic("Insira um cep valido.", new Throwable(
"Cep length is direfent of 8."));
try {
Integer.parseInt(cep2);
if (cep2.contains("-"))
throw new ExceptionLogic("Insira um cep valido.",
new Throwable("Any caracters' cep are not number."));
} catch (NumberFormatException e) {
throw new ExceptionLogic("Insira um cep valido.", new Throwable(
"Any caracters' cep are not number."));
}
return true;
}
COM: <s> check if the cep is in the correct pattern </s>
|
funcom_train/16937273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeResourceParams(String name) {
ResourceParams resourceParameters = null;
synchronized (resourceParams) {
resourceParameters = (ResourceParams) resourceParams.remove(name);
}
if (resourceParameters != null) {
support.firePropertyChange("resourceParams", resourceParameters,
null);
resourceParameters.setNamingResources(null);
}
}
COM: <s> remove any resource parameters with the specified name </s>
|
funcom_train/21655993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtRegistroLitologa() {
if (btRegistroLitologa == null) {
btRegistroLitologa = new JButton();
btRegistroLitologa.setBounds(new Rectangle(20, 130, 150, 30));
btRegistroLitologa.setMnemonic('l');
btRegistroLitologa.setText("Registro Litologia");
btRegistroLitologa.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ControladorPrincipal.mostrarRegistroLitologico();
}
});
}
return btRegistroLitologa;
}
COM: <s> this method initializes bt registro litologa </s>
|
funcom_train/9203997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void update() {
// get the current time
long time = System.nanoTime();
// get the elapsed time from the last iteration
long diff = time - this.last;
// set the last time
this.last = time;
// convert from nanoseconds to seconds
double elapsedTime = (double)diff / NANO_TO_BASE;
// update the world with the elapsed time
this.world.update(elapsedTime);
}
COM: <s> updates the example and world </s>
|
funcom_train/33808441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void defineCentralTable(TableController centralTable) {
if(centralTable!=null){
logger.debug("Setting central table", centralTable.toString());
this.centralTable = centralTable.getModel();
tableMatrix.set(MATRIX_CENTER, MATRIX_CENTER,centralTable);
addNeighbors(MATRIX_CENTER, MATRIX_CENTER);
}
else{
logger.debug("Setting central table null");
this.centralTable = null;
}
}
COM: <s> defines the table that will be in the center </s>
|
funcom_train/13847316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateDisplayListFigures() {
figuredisplaylist = new FigureDisplayList();
// For each texture (excluded the background)
for (int color = 1; color < textures_names.length; color++) {
// Get the matching FigureData
FigureData figuredata = FigureDataFactory.getFigureData(color - 1);
// For all orientations
for (Orientation orientation : Orientation.values()) {
// Generate a display list
FigureDataBuffer buffer = figuredata.getBuffer(orientation);
figuredisplaylist.add(buffer, textures[color]);
}
}
}
COM: <s> init the display lists for figures </s>
|
funcom_train/34141254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getEventTextRegExpMatch(AccessibilityEvent event, String regExp) {
StringBuilder text = Utils.getEventText(mContext, event);
Pattern pattern = Pattern.compile(regExp);
Matcher matcher = pattern.matcher(text);
if (matcher.find()) {
return text.substring(matcher.start(), matcher.end());
} else {
return EMPTY_STRING;
}
}
COM: <s> returns a substring from a code event code text that matches a </s>
|
funcom_train/24002436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void println(int x,final AsyncCallback<Boolean> callback) {
synchronized (lock) {
print(x,new AsyncCallback<Boolean>()
{
public void onSuccess(Boolean b)
{
println(callback);
}
public void onFailure(Throwable t)
{
callback.onFailure(t);
}
});
}
}
COM: <s> prints an integer and then terminates the line </s>
|
funcom_train/4662827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isValidIP(String ip) {
if(ip != null && !ip.equals("")) {
String[] ipSplit = ip.split("\\.");
if(ipSplit.length == 4) {
for(int i = 0; i < ipSplit.length; i++) {
try {
int num = Integer.parseInt( ipSplit[i] );
if(num < 0 || num > 255) {
return false;
}
} catch(Exception e) {
return false;
}
}
return true;
}
}
return false;
}
COM: <s> checks if the string ip really is a valid ip number </s>
|
funcom_train/18060719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void suspend(boolean waitForAllThreads) {
synchronized(this) {
if(aliveFlag == true) {
aliveFlag = false;
Element tElem = getThreadElement(0);
daemonStatusSync.getWriteLock();
tElem.setAttribute("running", "false");
daemonStatusSync.releaseLock();
((Thread)idToThread.get(new Long(0))).interrupt();
if(waitForAllThreads)
threadCounter.waitForZero();
}
}
}
COM: <s> suspend this daemon for sometime </s>
|
funcom_train/40445014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean gotoLoginPage( HttpServletRequest request, HttpServletResponse response ) {
String nextPage = JSPagesReference.getString( "GWD.MonitoringList" );
try {
response.sendRedirect( nextPage );
} catch ( Exception e ) {
gotoErrorPage( request, response, Messages.getMessage( "ERROR_PAGE_NOT_FOUND", nextPage ), null, null );
return false;
}
return true;
}
COM: <s> goto the first page </s>
|
funcom_train/7496663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void format(double number, StringBuffer toInsertInto, int pos) {
NFRule applicableRule = findRule(number);
if (++recursionCount >= RECURSION_LIMIT) {
recursionCount = 0;
throw new IllegalStateException("Recursion limit exceeded when applying ruleSet " + name);
}
applicableRule.doFormat(number, toInsertInto, pos);
--recursionCount;
}
COM: <s> formats a double </s>
|
funcom_train/20845989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerActionInvokeListener(String endpointPath, AbstractService service) {
if (actionInvokeListeners == null) {
actionInvokeListeners = PlatformToolkit.getToolkit().createLockedHashtable();
}
try {
actionInvokeListeners.lockWrite();
AbstractService ser = (AbstractService) actionInvokeListeners.get(endpointPath);
if (ser == null) {
actionInvokeListeners.put(endpointPath, service);
}
} finally {
actionInvokeListeners.unlock();
}
}
COM: <s> register a code abstract service code for service actions </s>
|
funcom_train/2557525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeComment(String comment) throws Exception {
String text = indenter.top();
if(last == Tag.START) {
append('>');
}
if(text != null) {
append(text);
append(OPEN);
append(comment);
append(CLOSE);
}
last = Tag.COMMENT;
}
COM: <s> this is used to write any comments that have been set </s>
|
funcom_train/46758962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InterfaceMessageModel getInterfaceMessage(final long interfaceMessageId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return InterfacesData.getInterfaceMessage(interfaceMessageId, chain, call);
}}; return (InterfaceMessageModel) call(method, call);
}
COM: <s> same transaction return the single interface message model for the primary key </s>
|
funcom_train/51572881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetNameNotSpecified() throws Exception {
FileSet spec = new LocalFileSet(baseFile);
spec.include(new FileGlob("**/*"));
FingerprintData fp = new FingerprintData(spec);
assertEquals(spec.getBaseFile().getPath(), fp.getName());
}
COM: <s> tests get name without a specified name </s>
|
funcom_train/39294068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAddressCityPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DocumentRoot_addressCity_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_addressCity_feature", "_UI_DocumentRoot_type"),
CntPackage.Literals.DOCUMENT_ROOT__ADDRESS_CITY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the address city feature </s>
|
funcom_train/13720127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputSwitchFunction getInputSwitchFunction() throws InterruptedException, IOException {
isActive(true);
try{
byte[] response = getSetting(InputSwitchFunction.COMMANDCODE);
// If we got this far, we should have a response
return new InputSwitchFunction(MathUtilities.hex2int(response));
}catch(InterruptedException e){
logger.log(Level.SEVERE, "Unable to getInputSwitchFunction", e);
throw e;
}catch(IOException e){
logger.log(Level.SEVERE, "Unable to getInputSwitchFunction", e);
throw e;
}
}
COM: <s> this command requests the current input switch function from the hardware </s>
|
funcom_train/9993316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRowCollapsed(String id) {
Element row = DOM.getElementById(addIdPrefix(id));
if (row == null)
return false;
String state = DOM.getElementProperty(row, "state");
return state != null && state.equalsIgnoreCase(BaseTreeTableRow.STATE_CLOSE);
}
COM: <s> determines whether a row is currently collapsed </s>
|
funcom_train/31078745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equalsInstruction(Instruction other) {
if (this == other)
return true;
if (!getClass().equals(other.getClass()))
return false;
LocalVariableInstruction ins = (LocalVariableInstruction) other;
int index = getLocal();
int insIndex = ins.getLocal();
return index == -1 || insIndex == -1 || index == insIndex;
}
COM: <s> two local variable instructions are equal if the local index they </s>
|
funcom_train/30349355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: ButtonListenerAdapter showHtmlListener = new ButtonListenerAdapter() {
public void onClick(Button button, EventObject e) {
if(requestType == null || !validate()){
return;
}
ShowHtmlDialog.getInstance().init(name.getText(), useAnonymousUser.getValue() ? anonymousUsers.getValue() : null);
ShowHtmlDialog.getInstance().show();
}
};
COM: <s> show html dialog listener </s>
|
funcom_train/17763317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nextIterate() {
dd1[0] = POW2_53 * d1;
dd1[1] = 0.0;
dddivd(dd1, POW3_33, dd2);
ddmuldd(POW3_33, Math.floor(dd2[0]), dd2);
ddsub(dd1, dd2, dd3);
d1 = dd3[0];
if (d1 < 0.0) {
d1 += POW3_33;
}
}
COM: <s> compute the next iterate </s>
|
funcom_train/18032184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getButtonHistogram() {
if (m_buttonHistogram == null) {
m_buttonHistogram = new JButton();
m_buttonHistogram.setIcon(FBImage.getIcon(FBImage.HISTOGRAM));
m_buttonHistogram.setToolTipText(Messages.getString("FBToolbar.7")); //$NON-NLS-1$
m_buttonHistogram.setMargin(new Insets(0, 0, 0, 0));
}
return m_buttonHistogram;
}
COM: <s> returns the histogram button </s>
|
funcom_train/24060468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceUid ( String value ) {
mustBeOpen();
this.userid = new Utf8String ( value );
Secrets newSecret =
new Secrets ( this.userid, this.unencryptedSecret.getPassword(),
this.unencryptedSecret.getNotes() );
this.unencryptedSecret = newSecret;
this.isUpdatedAndInconsistent = true;
}
COM: <s> a managed secret contains three related utf8 strings which can be </s>
|
funcom_train/10912116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int writeString(String str) {
int length = 0;
try {
byte[] buf = str.getBytes("ISO-8859-1");
System.arraycopy(buf, 0, output, currentPos, buf.length);
length = buf.length;
currentPos += length;
} catch (java.io.UnsupportedEncodingException e) {
// This should never happen!
}
return length;
}
COM: <s> writes a iso 8859 1 string at the current position </s>
|
funcom_train/11321492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileItem getFileItem(String name) {
Object value = findClickRequestWrapper(request).getFileItemMap().get(name);
if (value != null) {
if (value instanceof FileItem[]) {
FileItem[] array = (FileItem[]) value;
if (array.length >= 1) {
return array[0];
}
} else if (value instanceof FileItem) {
return (FileItem) value;
}
}
return null;
}
COM: <s> returns the value of a request parameter as a file item for </s>
|
funcom_train/38473381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setCollection(final Object container) throws SecurityException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, UnableToSaveException {
this.oldContainer = this.container;
this.container = container;
this.iterator = IteratorAdapterFactory.iterator(container);
getSize = container.getClass().getMethod("size", new Class[] {});
}
COM: <s> method set collection </s>
|
funcom_train/22279707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector elementsVector() {
int i, vectCount;
Object element;
Vector vect;
if (count == 0)
return new Vector();
vect = new Vector(count);
vectCount = 0;
for (i = 0; i < elements.length && vectCount < count; i++) {
element = elements[i];
if (element != null) {
vect.addElement(element);
vectCount++;
}
}
return vect;
}
COM: <s> returns a vector containing the hashtables elements </s>
|
funcom_train/7242128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension maximumLayoutSize(Container target){
if( isEmpty() ) {
return target.size();
}
Iterator iter = getLayouts();
int width=0;
int height=0;
while( iter.hasNext() ) {
LayoutManager2 mgr =(LayoutManager2)iter.next();
Dimension d = mgr.maximumLayoutSize(target);
width = Math.max(width,d.width);
height = Math.max(height,d.height);
}
return new Dimension(width,height);
}
COM: <s> returns the maximum size of this component </s>
|
funcom_train/10979037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUp() {
config = new MockServletConfig();
request = new MockHttpServletRequest();
response = new MockHttpServletResponse();
pageContext = new MockPageContext(config, request, response);
htmlTag = new HtmlTag();
htmlTag.setPageContext(pageContext);
}
COM: <s> set up mock objects </s>
|
funcom_train/51782767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initSelectorMap() {
try {
// Self-calls
selectorMap.put("SHOW_GRID", new MethodCall(
getClass().getMethod("showGrid")));
selectorMap.put("SNAP_TO_GRID", new MethodCall(
getClass().getMethod("snapToGrid")));
} catch (NoSuchMethodException ex) {
ex.printStackTrace();
}
}
COM: <s> initializes the selector map </s>
|
funcom_train/5865278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFrameBgColor2(String color) {
if (Objects.equals(color, _bgColor2)) {
return;
}
_bgColor2 = color;
if (_bgColor2 == null) {
_bgRGB2 = null;
} else {
_bgRGB2 = new int[3];
Chart.decode(_bgColor2, _bgRGB2);
}
fireEvent(ChartDataEvent.CHANGED, null, null);
}
COM: <s> set the 2nd background color of the dial frame for gradient ending color </s>
|
funcom_train/51222538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int moveTableColumn(ITableColumn tableColumn, int toIndex) {
int fromIndex = this.tableColumns.indexOf(tableColumn);
if ((toIndex != fromIndex) && (toIndex >= 0)
&& (toIndex < this.tableColumns.size())) {
this.tableColumns.remove(fromIndex);
this.tableColumns.add(toIndex, tableColumn);
fireTableDataChanged();
return toIndex;
}
return fromIndex;
}
COM: <s> moves a column to position i </s>
|
funcom_train/20110248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTerms_PassesCommandToExecutionAlgorithm() {
service.getTerms(userContext1);
GetTermsInvoker cmd =
(GetTermsInvoker) service.getExecuteSiteServiceCall_CommandArg();
// check the args passed to the command
assertSame(userContext1, cmd.getUserContext());
assertSame(getSiteDelegateFixture(userContext1), cmd.getSakaiSiteService());
}
COM: <s> verifies that get terms passes the actual </s>
|
funcom_train/14240888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInDiagram(MPackage p) {
if(ProjectBrowser.TheInstance.getTarget() instanceof Diagram) {
return ((Diagram)(ProjectBrowser.TheInstance.getTarget())).getNodes().contains(p);
} else {
if(ProjectBrowser.TheInstance.getTarget() instanceof ProjectMemberDiagram) {
return ((ProjectMemberDiagram)ProjectBrowser.TheInstance.getTarget()).getDiagram().getNodes().contains(p);
} else {
return false;
}
}
}
COM: <s> check if a given package has a representation in the current </s>
|
funcom_train/20028094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadDomains() {
synchronized(domainsByName) {
try {
if(logger.isDebugEnabled()){
logger.debug("Loading all domains...");
}
Iterator<List<Domain>> domainIterator = getDataSource().getDomains();
while (domainIterator.hasNext()) {
List<Domain> domainsList = domainIterator.next();
addDomains(domainsList);
}
}
catch (SimpleDBException e) {
throw new PersistenceException(e);
}
}
}
COM: <s> load or reload domains from amazon simple db account </s>
|
funcom_train/10280191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getColumnClass(int column) {
switch (column) {
case 0: {
return Boolean.class;
}
case 1: {
return String[].class;
}
case 2: {
// return Integer.class;
return JSpinner.class;
}
case 3: {
return ImageIcon.class;
}
default:
return Object.class;
}
// return getValueAt(0, col).getClass();
}
COM: <s> get the object type for a certain col row </s>
|
funcom_train/10913081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean associateLayoutManagerID(String id) {
if (log.isDebugEnabled()) {
log.debug("associateLayoutManagerID(" + id + ")");
}
if (!idTracker.alreadyResolvedID(id)) {
idTracker.signalPendingID(id);
return false;
} else {
return true;
}
}
COM: <s> add an id reference of the layout manager in the area tree handler </s>
|
funcom_train/28662193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createControl(final Composite parent) {
Composite container = new Composite(parent, SWT.NULL);
container.setLayout(new FormLayout());
createPageContent(container);
addListeners();
setControl(container);
setPageComplete(false);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IContextHelpIds.WIZARD_ENCRYPTION_CREATE_KEYSTORE);
}
COM: <s> creates the wizard page with the layout settings </s>
|
funcom_train/31689825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearRow(String columnToLeave) {
for (int i = 0; i < m_currentrow.size(); i++) {
String sCol = (String) m_colNames.get(i);
if (sCol.equals(columnToLeave) == false) {
m_currentrow.set(i,null);
}
}
}
COM: <s> clears the current row except for the specified column </s>
|
funcom_train/19381255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void retrieveAdditionalInfo() throws DataStoreException, SQLException {
_dsAdditionalInfo.retrieveByResumeId(getResumeId());
if (_dsAdditionalInfo.getRowCount() == 0) {
_dsAdditionalInfo.insertRow();
_dsAdditionalInfo.setAdditionalResumeid(getResumeId());
}
_dsAdditionalInfo.gotoFirst();
}
COM: <s> retrieves the additional information </s>
|
funcom_train/4521170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Perfiles entity) {
LogUtil.log("deleting Perfiles instance", Level.INFO, null);
try {
entity = entityManager.getReference(Perfiles.class, entity
.getPerfilesId());
entityManager.remove(entity);
LogUtil.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent perfiles entity </s>
|
funcom_train/18571429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String parseForCRC(String line) {
int indexStart = line.indexOf(" crc32=") + 1;
if (indexStart == -1) {
return null;
}
int indexEnd = line.indexOf(" ", indexStart);
if (indexEnd == -1) {
indexEnd = line.length();
}
return line.substring(indexStart + 6, indexEnd);
}
COM: <s> parsing function used to obtain crc value </s>
|
funcom_train/45622629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIncludePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SimpleItemType_include_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SimpleItemType_include_feature", "_UI_SimpleItemType_type"),
MSBPackage.eINSTANCE.getSimpleItemType_Include(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the include feature </s>
|
funcom_train/35562225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRecordedCpuTime() {
checkState(recorded, "Recording hasn't been done.");
if (!cpuTimeSupported) {
return "";
}
long duration = stopCpuTime - startCpuTime;
long milliSeconds =
(long) (quotaService.convertMegacyclesToCpuSeconds(duration) * 1000);
return Long.toString(milliSeconds);
}
COM: <s> gets the recorded cpu time </s>
|
funcom_train/32211624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayResults() {
append("Test Results:");
append("Passed: " + (this.numberOfTests - this.failures.size() - this.errors.size()));
append("Failures: " + this.failures.size());
append("Errors: " + this.errors.size());
displayExceptions(" error", this.errors);
displayExceptions(" failure", this.failures);
append("");
append("Display based on J2MEUnit.");
}
COM: <s> displays the tests results on screen </s>
|
funcom_train/3652526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void goTo(URL url) {
Document doc = html.getDocument();
try {
html.setPage(url);
((HTMLEditorKit) html.getEditorKit()).setStyleSheet(styleSheet);
doc = html.getDocument();
setTitle();
} catch (IOException ioe) {
ioe.printStackTrace();
html.setDocument(doc);
}
}
COM: <s> follows the reference in an link </s>
|
funcom_train/24539479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int changeNumberOfColumns(int newNumCols) {
int delta = newNumCols - numColumns;
if (delta > 0) {
// Add columns.
while(--delta>=0) {
createNewCol(numColumns);
}
} else if (delta < 0) {
// Remove columns;
while(++delta<=0) {
if (!removeColIfEmpty(numColumns-1))
break; // Couldn't go any further.
}
}
return numColumns;
}
COM: <s> change the number of columns to the new size if possible </s>
|
funcom_train/10636823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(LongBuffer otherBuffer) {
int compareRemaining = (remaining() < otherBuffer.remaining()) ? remaining()
: otherBuffer.remaining();
int thisPos = position;
int otherPos = otherBuffer.position;
long thisByte, otherByte;
while (compareRemaining > 0) {
thisByte = get(thisPos);
otherByte = otherBuffer.get(otherPos);
if (thisByte != otherByte) {
return thisByte < otherByte ? -1 : 1;
}
thisPos++;
otherPos++;
compareRemaining--;
}
return remaining() - otherBuffer.remaining();
}
COM: <s> compare the remaining code long code s of this buffer to another </s>
|
funcom_train/12156750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSeparatorAtStart() {
byte[] array = { 1, 2, 0, 0, 0 };
byte[] separator = { 1, 2 };
byte[][] expectedResults = {
{ },
{ 0, 0, 0 },
};
doTokenizationTest(array, separator, expectedResults);
}
COM: <s> test for the case where the separator appears at the start of the </s>
|
funcom_train/42869278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int define(Movie movie, SWFTagTypes timelineWriter, SWFTagTypes definitionWriter) throws IOException {
Integer integerId = movie.definedSymbols.get(this);
if (integerId == null) {
integerId = new Integer(defineSymbol(movie, timelineWriter, definitionWriter));
movie.definedSymbols.put(this, integerId);
}
id = integerId.intValue();
return id;
}
COM: <s> make sure that the symbol is fully defined in the given movie and </s>
|
funcom_train/10958486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String determineActionName(Class<?> actionClass) {
String actionName = actionNameBuilder.build(actionClass.getSimpleName());
if (LOG.isTraceEnabled()) {
LOG.trace("Got actionName for class [#0] of [#1]", actionClass.toString(), actionName);
}
return actionName;
}
COM: <s> converts the class name into an action name using the action name builder </s>
|
funcom_train/36246256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int showSaveDisplayQuestion(File file) {
String message = file.getAbsolutePath()
+ " already exists. \nDo you want to replace it?";
return JOptionPane.showOptionDialog(this, message, "Save File",
JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, null,
null, null);
}
COM: <s> displays a question message box if user wants to overwrite the existing </s>
|
funcom_train/20885313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExplicitSimpleListItem() {
ExplicitSimpleListItemTestDTO dto = new ExplicitSimpleListItemTestDTO();
dto.stringList = new ArrayList<String>();
dto.stringList.add("valid");
check(dto, VALID);
dto.stringList.add("not valid");
check(dto, INVALID);
check(dto, VALIDATION_OFF);
}
COM: <s> tests validation for an explicit simple list item value </s>
|
funcom_train/41698116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enlargeOneCell() {
m_dYMin = m_dYMin - m_dCellSize;
m_dXMin = m_dXMin - m_dCellSize;
m_dXMax = m_dXMax + m_dCellSize;
m_dYMax = m_dYMax + m_dCellSize;
this.recalculateNXAndNY();
}
COM: <s> enlarges this grid extent one cell in each direction </s>
|
funcom_train/36763126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseFirstLine(String first) {
fristRequestLine = first;
StringTokenizer sTokenizer;
sTokenizer = new StringTokenizer(fristRequestLine);
method = sTokenizer.nextToken();
URI = sTokenizer.nextToken();
OriURI = URI;
version = sTokenizer.nextToken();
validMethod = checkRequest();
}
COM: <s> private function used by request object to parse the information passed </s>
|
funcom_train/51783128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void installStatusbar() {
JPanel statusbar = new JPanel(new BorderLayout());
statusbar.add(coordLabel, BorderLayout.WEST);
statusbar.add(memLabel, BorderLayout.EAST);
shell.getContentPane().add(statusbar, BorderLayout.SOUTH);
}
COM: <s> adds a status bar </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.