__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/49958077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StringBuffer reduceStream(StringBuffer fullStream) {
StringBuffer res = new StringBuffer();
char oldChar = ' ';
for (int i = 0; i < fullStream.length(); i++) {
char c = fullStream.charAt(i);
if (c == oldChar) {
continue;
}
else {
res.append(c);
oldChar = c;
}
}
return res;
}
COM: <s> implements reducing procedure for the symbolic stream </s>
|
funcom_train/1241358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasAttribute(String attrName) {
if(attrName == null) // Do I have to send an exception?
attrName = "";
for(int i = 0; i < attributes.getLength(); i++){
if(attrName.equals(attributes.getQName(i)))
return true;
}
return false;
}
COM: <s> test for an attribute existing </s>
|
funcom_train/803725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reduceSpareValency(String locant) throws StructureBuildingException {
for(Atom atom: atomList) {
if(atom.hasLocant(locant)) {
if(atom.getSpareValency() < 1) throw new StructureBuildingException("Atom at locant " +
locant + " has no spare valency to reduce.");
atom.subtractSpareValency(1);
return;
}
}
throw new StructureBuildingException("Could not find the atom with locant " + locant + ".");
}
COM: <s> reduces the spare valency of the atom at the given locant </s>
|
funcom_train/22734937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addModifyListener(final ModifyListener listener) {
checkWidget();
if (listener == null)
SWT.error(SWT.ERROR_NULL_ARGUMENT);
Listener typedListener = new Listener() {
@Override public void handleEvent(Event event) {
if (event.type == SWT.Modify) {
listener.modifyText(new ModifyEvent(event));
}
}
};
addListener(SWT.Modify, typedListener);
}
COM: <s> adds the listener to the collection of listeners who will be notified </s>
|
funcom_train/11308245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ResponseContext buildGetMediaResponse(String id, T entryObj) throws ResponseContextException {
Date updated = getUpdated(entryObj);
MediaResponseContext ctx = new MediaResponseContext(getMediaStream(entryObj), updated, 200);
ctx.setContentType(getContentType(entryObj));
ctx.setEntityTag(EntityTag.generate(id, AtomDate.format(updated)));
return ctx;
}
COM: <s> creates a response context for a get media request </s>
|
funcom_train/13123393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(final Graphics g) {
final Dimension d = getSize();
if ( (this.offScreenImage == null) ) {
this.offScreenImage = createImage( d.width,
d.height );
}
paint( this.offScreenImage.getGraphics() );
g.drawImage( this.offScreenImage,
0,
0,
null );
}
COM: <s> use double buffering </s>
|
funcom_train/12150037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean mustCheckinAutoVersionedVCR(String resourceUri) throws SlideException {
NodeRevisionDescriptors vcrRevisionDescriptors = content.retrieve(sToken,resourceUri);
NodeRevisionDescriptor vcrRevisionDescriptor = content.retrieve( sToken, vcrRevisionDescriptors);
return mustCheckinAutoVersionedVCR(vcrRevisionDescriptors, vcrRevisionDescriptor);
}
COM: <s> indicates if the vcr reource be checked in after modifying it </s>
|
funcom_train/3419128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
java.text.MessageFormat form = new java.text.MessageFormat
(sun.security.util.ResourcesMgr.getString
("NTSidUserPrincipal: name",
"sun.security.util.AuthResources"));
Object[] source = {getName()};
return form.format(source);
}
COM: <s> return a string representation of this code ntsid user principal code </s>
|
funcom_train/36636002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawLights(SceneNode root, Camera camera, GL gl, GLU glu) {
for (int i=0; i<root.getChildCount(); i++) {
SceneNode node = (SceneNode)root.getChildAt(i);
if (node instanceof Light) {
Light light = (Light)node;
light.draw(gl, glu, camera);
}
}
}
COM: <s> draws the lights </s>
|
funcom_train/50334793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFirstItemBlank(boolean blank){
if(_firstBlank == blank)
return; // no Change to make
if(_firstBlank)
super.removeItemAt(0);
else {
super.insertItemAt("", 0);
if (_lastSelected==null || _lastSelected.equals("")){
setSelectedIndex(0);
}
}
_firstBlank = blank;
}
COM: <s> insert a blank entry at the top of the list </s>
|
funcom_train/4853198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemCommand1() {
if (itemCommand1 == null) {//GEN-END:|122-getter|0|122-preInit
// write pre-init user code here
itemCommand1 = new Command("Item", Command.ITEM, 0);//GEN-LINE:|122-getter|1|122-postInit
// write post-init user code here
}//GEN-BEGIN:|122-getter|2|
return itemCommand1;
}
COM: <s> returns an initiliazed instance of item command1 component </s>
|
funcom_train/15919227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public X10Call createInstanceCall(Position pos, Expr receiver, Name name, Context context, Expr... args) {
MethodInstance mi = createMethodInstance(receiver, name, context, args);
if (null == mi) return null;
return createInstanceCall(pos, receiver, mi, args);
}
COM: <s> create a call to an instance method </s>
|
funcom_train/22305441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultNotifications(String [] inDefNotes) throws Exception {
/*int stop = inDefNotes.length;
int i = 0;
// TODO: check whether the allowed notifications are in the default notifications
for(i = 0; i < stop; i++) {
if (! allNotes.containsObject(inDefNotes[i])) {
throw new Exception("Array Element not in Allowed Notifications");
}
} */
defNotes = inDefNotes;
}
COM: <s> set the list of default notfications </s>
|
funcom_train/49824016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getProjectSummaryData(String projectId, AsyncCallback<ProjectSummaryData> callback) {
service.getProjectSummaryData(session.getSensorbaseHost(), session.getDPDHost(), session
.getUser(), session.getPassword(), projectId, callback);
}
COM: <s> gets the project extendeded summary </s>
|
funcom_train/33177282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMonitoringPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RPCMonModel_monitoring_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RPCMonModel_monitoring_feature", "_UI_RPCMonModel_type"),
ModelPackage.Literals.RPC_MON_MODEL__MONITORING,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the monitoring feature </s>
|
funcom_train/3412806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCompatibleSampleModel(SampleModel sm) {
// fix 4238629
if (! (sm instanceof ComponentSampleModel) &&
! (sm instanceof MultiPixelPackedSampleModel) ) {
return false;
}
// Transfer type must be the same
if (sm.getTransferType() != transferType) {
return false;
}
if (sm.getNumBands() != 1) {
return false;
}
return true;
}
COM: <s> checks if the specified code sample model code is compatible </s>
|
funcom_train/45770516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BookSettings getSettings() {
Vector settingsVector = new Vector();
int index = 0;
for(Enumeration e = worksheets.elements();e.hasMoreElements();) {
Worksheet ws = (Worksheet) e.nextElement();
SheetSettings s = ws.getSettings();
s.setSheetName(getSheetName(index++));
settingsVector.add(s);
}
BookSettings bs = new BookSettings(settingsVector);
String activeSheetName = getSheetName(win1.getActiveSheet());
bs.setActiveSheet(activeSheetName);
return bs;
}
COM: <s> returns an enumeration of code settings code for this workbook </s>
|
funcom_train/12655948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void finalizeRound() {
for (SimulatableVariable variable : simulation.getUsedVariables()) {
int newValue = variable.getCurrentValue() + variable.getAccuValue();
if (newValue > SimulatableEffect.MAXIMAL_VALUE) {
newValue = SimulatableEffect.MAXIMAL_VALUE;
}
if (newValue < 0) {
newValue = 0;
}
variable.setCurrentValue(newValue);
variable.resetAccuValue();
}
simulation.incRoundIterator();
fireIRoundListenerComplete();
}
COM: <s> combines current values with accumulated values and increments </s>
|
funcom_train/43213055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openRAF() throws IOException {
this.activitiesLogRAF = new RandomAccessFile(getActivitiesLogFile(), "rw");
this.signaturesIndexRAF = new RandomAccessFile(getSignaturesIndexFile(), "rw");
this.signaturesRAF = new RandomAccessFile(getSignaturesFile(), "rw");
}
COM: <s> p open up all associated random access files </s>
|
funcom_train/10513395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkMethodLists() throws BuildException {
if (tests.isEmpty()) {
return;
}
Enumeration testsEnum = tests.elements();
while (testsEnum.hasMoreElements()) {
JUnitTest test = (JUnitTest) testsEnum.nextElement();
if (test.hasMethodsSpecified() && test.shouldRun(getProject())) {
test.resolveMethods();
}
}
}
COM: <s> verifies all code test code elements having the code methods code </s>
|
funcom_train/963239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireTestStarted(final Algorithm<I, O> algorithm, final I input) {
new SafeNotifier() {
@Override
protected void notifyListener(RunListener<I, O> each) throws Exception {
each.testStarted(algorithm, input);
};
}.run();
}
COM: <s> invoke to tell listeners that an </s>
|
funcom_train/48965971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nextPage() {
g2.dispose();
try {
document.newPage(); // is this bad if no addl pages are made?
} catch (Exception e) {
e.printStackTrace();
}
g2 = content.createGraphicsShapes(width, height);
// should there be a beginDraw/endDraw in here?
}
COM: <s> call to explicitly go to the next page from within a single draw </s>
|
funcom_train/9238026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() {
final Package thisPackage = this.getClass().getPackage();
int packageLength = 0;
if (thisPackage != null) {
packageLength = thisPackage.getName().length() + 1;
}
return this.getClass().getName().substring(packageLength + 8); // 8 is the length of "Callback"
}
COM: <s> get the name for this callback </s>
|
funcom_train/8322193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initCharEncodingHandler(ServletConfig servletConfig) {
String paramValue = servletConfig.getInitParameter(PARAM_CHAR_ENCODING);
if (paramValue != null) {
this.charEncoding = paramValue;
} else {
this.charEncoding = null;
LOGGER.warn("Use default character encoding from HTTP client");
}
}
COM: <s> initialize character encoding </s>
|
funcom_train/45803288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeDifferences() {
if (currentRow == null || nextRow == null) {
differences = null;
} else {
differences = new boolean[currentRow.length];
for (int i = 0 ; i < currentRow.length; i++)
differences[i] = !sameElements(currentRow[i], nextRow[i]);
}
}
COM: <s> finds out on which columns two arrays of objects differ </s>
|
funcom_train/3528043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer b = new StringBuffer();
if( tokens.length == 0 )
b.append( uriDelimiter );
for( int i = 0; i < tokens.length; i++ )
b.append( uriDelimiter ).append( tokens[i] );
return b.toString();
}
COM: <s> return string representation </s>
|
funcom_train/25282322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int setCurrentRatAndGroup(final int rat_num, final String grp_name) {
final Group tmp_grp = exp.getGroupByName(grp_name);
if (tmp_grp != null) { // Group exists
setCurrRatNumber(rat_num);
setCurrGrpName(grp_name);
experiment_configs.setCurrGrpName(currGrpName);
experiment_configs.setCurrRatNumber(currRatNumber);
return 0;
} else
return -1;
}
COM: <s> sets the active group and rat number </s>
|
funcom_train/31739447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidArguments() {
try {
Vector vector = board.getCards(-1);
fail("Should throw an IllegalArgumentException");
} catch (IllegalArgumentException iae) {
}
try {
Vector vector = board.getCards(4);
fail("Should throw an IllegalArgumentException");
} catch (IllegalArgumentException iae) {
}
}
COM: <s> check for invalid arguments </s>
|
funcom_train/15548305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getPersistentConnectionsCheckBox() {
if (persistentConnectionsCheckBox == null) {
persistentConnectionsCheckBox = new JCheckBox();
persistentConnectionsCheckBox.setText("Persistent Connections");
persistentConnectionsCheckBox.setToolTipText("Allow HTTP/1.1 persistent connections");
persistentConnectionsCheckBox.setFont(new Font("Arial", Font.BOLD, 10));
}
return persistentConnectionsCheckBox;
}
COM: <s> this method initializes persistent connections check box </s>
|
funcom_train/25511388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
getFrame().setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
privateKeys = ((DefaultListModel) listPrivateKeys.getModel());
publicKeys = ((DefaultListModel) listPublicKeys.getModel());
updatePubKeysList();
updatePrivKeysList();
}
COM: <s> these functions should not be in the constructor of portable pgpview </s>
|
funcom_train/25764164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel16() {
if (jPanel16 == null) {
jPanel16 = new JPanel();
jPanel16.setLayout(new BorderLayout());
jPanel16.add(getPnlImport(), BorderLayout.NORTH);
jPanel16.add(getPnlPlacemarks(), BorderLayout.SOUTH);
jPanel16.add(getPnlTracks(), BorderLayout.CENTER);
}
return jPanel16;
}
COM: <s> this method initializes j panel16 </s>
|
funcom_train/43093699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getZipName() {
if (uniqueName == null) {
return null;
}
String s = project.getBaseName();
if (uniqueName.length() > 0) {
s += "_" + uniqueName;
}
if (!s.endsWith(getZipFileExtension())) {
s += getZipFileExtension();
}
return s;
}
COM: <s> returns a unique members name for storage in a zipfile </s>
|
funcom_train/12930385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteLine (int C_OrderLine_ID) {
if ( C_OrderLine_ID != -1 )
{
for ( MOrderLine line : getLines(true, "M_Product_ID") )
{
if ( line.getC_OrderLine_ID() == C_OrderLine_ID )
{
line.delete(true);
}
}
}
} // deleteLine
COM: <s> to erase the lines from order </s>
|
funcom_train/2386516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendDisconnectionNotification() {
synchronized (disconnectListeners) {
for (int i = 0; i < disconnectListeners.size(); i++) {
WeakReference<DisconnectListener> ref = disconnectListeners.get(i);
DisconnectListener listener = ref.get();
if (listener != null) {
listener.onIChatDisconnected();
}
}
}
}
COM: <s> sends a notification about bots disconnection to subscribers </s>
|
funcom_train/12622062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Event getEvent(String key, EventList list, boolean modify) throws Exception {
if (!modify) {
return list.createEvent();
} else {
Enumeration enumeration = list.items(key);
while (enumeration.hasMoreElements()) {
Event event = (Event)enumeration.nextElement();
if (event.getString(Event.UID, 0).equals(key))
return event;
}
return null;
}
}
COM: <s> obtains or creates an event object depending on the passed modify option </s>
|
funcom_train/32219205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RTMsg getNextMsg( )
{ RTMsg gottenMsg = null;
boolean keepTrying = true;
while (keepTrying == true)
{ try
{ gottenMsg = (RTMsg) toSchedulerQ.take();
keepTrying = false;
}
catch (InterruptedException e)
{ // means got interrupted while waiting to take from queue..
// leave keepTrying true.. and try again!
keepTrying = true;
}
}
return gottenMsg;
}
COM: <s> get a message containing work to do from the server </s>
|
funcom_train/35299158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processPassComplete(BufferedImage theImage) {
if (updateListeners == null) {
return;
}
int numListeners = updateListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadUpdateListener listener =
(IIOReadUpdateListener)updateListeners.get(i);
listener.passComplete(this, theImage);
}
}
COM: <s> broadcasts the end of a progressive pass to all </s>
|
funcom_train/21848338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String toJavaLiteral(String compNameValue) {
String compName = compNameValue.toUpperCase();
StringBuffer sbuff = new StringBuffer();
for (int index = 0; index < compName.length(); index++) {
char c = compName.charAt(index);
if (index == 0) {
if (Character.isJavaIdentifierStart(c)) {
sbuff.append(c);
} else {
sbuff.append('_');
sbuff.append(c);
}
} else {
if (Character.isJavaIdentifierPart(c)) {
sbuff.append(c);
} else {
sbuff.append('_');
}
}
}
return sbuff.toString();
}
COM: <s> converts the given name to a valid java literal </s>
|
funcom_train/49320981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireItemEvent(ItemEvent itemEvent) {
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ItemListener.class) {
((ItemListener) listeners[i + 1]).itemStateChanged(itemEvent);
}
}
}
COM: <s> notify any item listeners that the selection changed </s>
|
funcom_train/31683142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matches(ConditionTerm conditionTerm) {
int numberOfItemsToMatch = 0;
boolean match = true;
Enumeration factors = getConditionFactors();
while (match && factors.hasMoreElements()) {
ConditionFactor factor = (ConditionFactor) factors.nextElement();
if (factor.not()) {
match = !conditionTerm.contains(factor);
} else {
match = conditionTerm.contains(factor);
numberOfItemsToMatch++;
}
}
match = match && numberOfItemsToMatch == conditionTerm.numberOfFactors();
return match;
}
COM: <s> see if this condition term matches the given condition term </s>
|
funcom_train/2582579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zeroAll() {
int rows = getRowCount();
int columns = getColumnsCount();
for (int row = 0; row < rows; row++) {
for (int column = 0; column < columns; column++) {
this.data[row][column] = 0.0;
}
}
fireSeriesChanged();
}
COM: <s> sets all matrix values to zero and sends a </s>
|
funcom_train/626353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigInteger comparisonValue() {
loadUpperPart();
String str = "";
for (Integer i : data) {
str += String.valueOf(i);
}
BigInteger genomeVal = new BigInteger(str);
BigInteger subtract = upperPart
.subtract(BigIntMath.abs(genomeVal.subtract(goal)));
if (subtract.compareTo(BigInteger.ZERO) <= 0)
throw new IllegalStateException("Invalid fitness: " + genomeVal
+ ", genome: " + str);
return subtract;
}
COM: <s> this is analagous to int genomes fitness method </s>
|
funcom_train/22047699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setValueAt(int iPos, boolean fValue) {
if ((iStore_type == IS_BOOLEAN) && (iPos < iValues_in)) {
return set_at(iPos, new Boolean(fValue));
} else {
BRError.display("ERROR_INVALID_VAL_VECTOR_BOOLEAN");
return false;
}
}
COM: <s> generic function to set a value at a specific position </s>
|
funcom_train/23938371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() throws ContainerException {
sendEvent(new ContainerEvent(EventCatagory.INFO, SystemEventType.SHUTDOWN, "Shutdown", getName()));
destroy();
setInitialized(false);
finishShutdown();
sendEvent(new ContainerEvent(EventCatagory.INFO, SystemEventType.SHUTDOWN, "After finishShutdown", getName()));
eventHandler.close();
stopThreadPool();
}
COM: <s> the container b shutdown b operation will destroy a running connection manager </s>
|
funcom_train/12165518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
Thread timer = new Thread() {
public void run() {
try {
while(!interrupted()) {
if(logger.isDebugEnabled()) {
logger.debug("Send KA packets");
}
sendKeepAlivePackets();
sleep(keepAlive);
}
} catch(InterruptedException ie) {
Thread.currentThread().interrupt();
}
}
};
timer.start();
}
COM: <s> starts a mechanism sending ka packets </s>
|
funcom_train/29549640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResourceDescriptor getActiveNotebookConceptChildAt(int i, String conceptUri) {
if (activeNotebookResource != null && conceptUri != null) {
Seq seq = activeNotebookResource.rdfModel.getModel().getSeq(conceptUri);
return getFullResourceDescriptor(i, seq);
}
return null;
}
COM: <s> returns the resource descriptor for notebook concept child at index position </s>
|
funcom_train/21955248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkVersion() throws java.io.IOException {
sendMessage(PookaMessagingConstants.S_CHECK_VERSION);
String response = retrieveResponse();
getLogger().log(Level.FINE, "got response " + response);
return (response != null && response.equals(Pooka.getPookaManager().getLocalrc()));
}
COM: <s> checks the version running on the server with this client to make </s>
|
funcom_train/16628812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LanguageData getLanguageData(Object data) throws CoreException {
if (data == null || !(data instanceof String)
|| (!languageData.containsKey((String) data))) {
throw new CoreException(new Status(IStatus.ERROR,
IgromCorePluginActivator.PLUGIN_ID,
"Invalid language name: " + String.valueOf(data)));
}
return languageData.get((String) data);
}
COM: <s> get the language convenience method used by plugin data initializers </s>
|
funcom_train/34564626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void print(final int ch) throws IOException {
if(ch < 0x80) {
out.write(ch);
} else if(ch < 0xFFFF) {
print(String.valueOf((char) ch));
} else {
print(new TokenBuilder().addUTF(ch).toString());
}
}
COM: <s> writes a character in the current encoding </s>
|
funcom_train/41768278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setConnection() throws IOException {
try {
socket = new Socket(host, port);
} catch (ConnectException e) {
throw new ConnectException("Host unreachable");
}
reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
writer = new PrintWriter(socket.getOutputStream(), true);
getReply();
listenerClass.changedDirectory();
return isLastReplyPositive();
}
COM: <s> creates a connection to the host </s>
|
funcom_train/7533246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Result sqlExecute(Result cmd) {
int csid = cmd.getStatementID();
CompiledStatement cs = compiledStatementManager.getStatement(this,
csid);
if (cs == null) {
// invalid sql has been removed already
return new Result(
Trace.runtimeError(Trace.INVALID_PREPARED_STATEMENT, null),
null);
}
Object[] pvals = cmd.getParameterData();
return sqlExecute(cs, pvals);
}
COM: <s> retrieves the result of executing the prepared statement whose csid </s>
|
funcom_train/3935435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void indentSelectedBlock(StyleProperty inStyle, int inLineStart, int inLineCount) {
Bullet lBullet = widget.getLineBullet(inLineStart);
int lStyle = inStyle == null ? lBullet.type : inStyle.getStyleBit();
widget.setLineBullet(inLineStart, inLineCount, null);
widget.setLineBullet(inLineStart, inLineCount, Style.getBullet(lStyle, lBullet.style.metrics.width + Style.INDENT));
widget.redraw();
}
COM: <s> indents the selected block </s>
|
funcom_train/36230912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IPoint3D vectorFromP(IPoint3D p) {
double a = p.getX() - getX();
double b = p.getY() - getY();
double c = p.getZ() - getZ();
return newPoint3D(a, b, c);
}
COM: <s> get the vector formed by this point and the input point </s>
|
funcom_train/45354641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton8() {
if (jButton8 == null) {
jButton8 = new JButton();
jButton8.setBounds(new java.awt.Rectangle(12, 203, 148, 20));
jButton8.setEnabled(true);
jButton8.setText("Issue Gift Voucher");
jButton8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
if (bFinished == false)
showIssueGiftVoucher();
}
});
}
return jButton8;
}
COM: <s> this method initializes j button8 </s>
|
funcom_train/35482509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMimeTypeForJpeg() throws IOException {
byte[] content = loadToByteArray("it/jugpadova/util/mime/noJugLogo.jpg");
String expResult = "image/jpeg";
String result = MimeUtil.getMimeType(content);
assertEquals(expResult, result);
}
COM: <s> test of get mime type method of class mime util </s>
|
funcom_train/44011357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEmpFullName() {
System.out.println("getEmpFullName");
EmployeeBO instance = new EmployeeBO();
String expResult = "";
String result = instance.getEmpFullName();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get emp full name method of class edu </s>
|
funcom_train/16593375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBotSelectAll() {
if (botSelectAll == null) {
botSelectAll = new JButton();
botSelectAll.setText(PluginServices.getText(this, "select_all"));
botSelectAll.setName("botSelectAll");
botSelectAll.setToolTipText(PluginServices.getText(this, "select_all_resources"));
botSelectAll.setActionCommand("SelectAll");
botSelectAll.addActionListener(this);
}
return botSelectAll;
}
COM: <s> this method initializes bot select all </s>
|
funcom_train/21436962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMainMenuItems() {
ArrayList<IMenuItem> menuList = new ArrayList<IMenuItem>();
for(IMenuItem item : EMenu.values()) {
if(item.getParent() == null) {
menuList.add(item);
}
}
this.mainMenuItems = menuList;
}
COM: <s> fill the field holding the main menu items </s>
|
funcom_train/35157532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int readShort(Chunk c) throws IOException {
// c.bytesRead += 2;
int b1 = readByte(c);
int b2 = readByte(c) << 8;
return b1 | b2;
// return (short)(dataInputStream.read()+(dataInputStream.read() << 8));
}
COM: <s> reads a short 16 bit value from the input file </s>
|
funcom_train/20045146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _dispatchWithNotification() {
boolean result = true ;
oObj.dispatchWithNotification(url, arguments, notificationListener);
try {
Thread.sleep(200);
}
catch(java.lang.InterruptedException e) {}
log.println("Listener called: "+ notificationListener.finishedDispatch);
result = notificationListener.finishedDispatch;
tRes.tested("dispatchWithNotification()", result) ;
}
COM: <s> calls the method using url and arguments from relation </s>
|
funcom_train/43244917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testObjectArrayToTable() {
System.out.println("ObjectArrayToTable");
Object array = null;
Table expResult = null;
Table result = BeanTools.ObjectArrayToTable(array);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of object array to table method of class org </s>
|
funcom_train/51537991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uCallInvalidate() {
boolean wasModal = isLayoutValid && (maxScroll > 0);
super.uCallInvalidate();
synchronized (Display.LCDUILock) {
if (wasModal != lIsModal()) {
lSetTimeout(alert.getTimeout());
}
lRequestPaint();
}
setVerticalScroll();
}
COM: <s> this method is responsible for </s>
|
funcom_train/47219753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void toggleTransactionID() {
if (isCheckingValidity()) {
if (c_TransactionID == (Short.MAX_VALUE * 2)) {
c_TransactionID = 0;
} else {
c_TransactionID++;
}
}
m_Request.setTransactionID(getTransactionID());
}//toggleTransactionID
COM: <s> toggles the transaction identifier to ensure </s>
|
funcom_train/18142235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(String set) {
// grab old
String old = getValue();
// box value
try {
value = (Comparable)box.getConstructor(new Class[]{String.class}).newInstance(new Object[]{set});
} catch (Throwable t) {
value = set;
}
// propagate change
propagatePropertyChanged(this, old);
}
COM: <s> sets the value of this property </s>
|
funcom_train/18272163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void scheduleNextOrder() throws SimRuntimeException {
if (this.orderBehavior.getOrderRate() != null) {
double next = this.orderBehavior.getOrderRate().draw();
// Schedules an event, note: time is relative to the current time.
World.simulator.scheduleEvent(next, this, this, "generateOrder",
null);
// /System.out.println("Customer: " + this.name + " scheduled an
// order on: " + next);
}
}
COM: <s> schedules the next order </s>
|
funcom_train/9537264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testObjectsToVariants() {
Object testArray[] = new Object[] { Integer.valueOf(1),
Integer.valueOf(2) };
Variant resultArray[] = VariantUtilities.objectsToVariants(testArray);
assertEquals(2, resultArray.length);
Variant resultArray2[] = VariantUtilities
.objectsToVariants(resultArray);
assertEquals(2, resultArray2.length);
assertSame(resultArray[0], resultArray2[0]);
assertSame(resultArray[1], resultArray2[1]);
}
COM: <s> verifies our unpacking stuff </s>
|
funcom_train/38467836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() throws Exception {
Log.info(this, "run", "List all records in LABY_CHARACTER...");
ResultSet result = JdbcUtil.executeQuery("SELECT * FROM UNIT_TLIB.LABY_CHARACTER");
int number = 0;
while(result.next()) {
number++;
}
Log.info(this, "run", "Number of records: "+number);
}
COM: <s> carries out the database operations </s>
|
funcom_train/1884188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadHeaderSourceData(StringTree st, HeaderSourceData sourceData) {
sourceData.name = st.value;
for (StringTree ch : st.children) {
if ("DATE".equals(ch.tag)) {
sourceData.publishDate = ch.value;
} else if ("COPR".equals(ch.tag)) {
sourceData.copyright = ch.value;
} else {
unknownTag(ch);
}
}
}
COM: <s> load the header source data structure from a string tree node </s>
|
funcom_train/38725414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteDescriptor(DescriptorAlgorithm alg, Shape s) throws SQLException {
String sql = "DELETE FROM Descriptor WHERE A_ID = ? AND S_ID = ?";
PreparedStatement ps = conn.prepareStatement(sql);
ps.setInt(1, alg.getPrimaryKey());
ps.setInt(2, s.getPrimaryKey());
ps.execute();
ps.close();
}
COM: <s> deletes the descriptor stored in the database for a given </s>
|
funcom_train/10471960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepareSources() throws FatalToolException {
for (int i = 0; i < sources.length; i++) {
File sourceFile = new File(sources[i]);
IFolder srcFolder = project.getFolder(generateName(SRC_FOLDER_NAME, i));
String basePackage = srcFolder.getFullPath().toPortableString();
prepareRecursively(basePackage, sourceFile);
}
}
COM: <s> preapres java sources for parsing </s>
|
funcom_train/19378150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection findComponentsOfType(final Class type) {
class ClassMatcher implements Predicate {
public boolean evaluate(Object object) {
boolean match = false;
if (object != null) {
match = type.isAssignableFrom(object.getClass());
}
return match;
}
}
Collection components = new ArrayList(this.container.getComponentInstances());
CollectionUtils.filter(
components,
new ClassMatcher());
return components;
}
COM: <s> finds all components having the given code type code </s>
|
funcom_train/35842489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(LayoutedObject obj) {
// TODO: check for duplicates (is this possible???)
layoutedObjects.add(obj);
if (obj instanceof ClassdiagramNode) {
layoutedClassNodes.add((ClassdiagramNode) obj);
} else if (obj instanceof ClassdiagramEdge) {
layoutedEdges.add((ClassdiagramEdge) obj);
}
}
COM: <s> add an object to layout </s>
|
funcom_train/17206284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
cursor = Address.zero();
limit = Address.zero();
largeCursor = Address.zero();
largeLimit = Address.zero();
markTable = Address.zero();
recyclableBlock = Address.zero();
requestForLarge = false;
recyclableExhausted = false;
line = LINES_IN_BLOCK;
lineUseCount = 0;
}
COM: <s> reset the allocator </s>
|
funcom_train/13769762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWorkbookEvaluator(String workbookName,WorkbookEvaluator evaluator){
validateWorkbookEvaluator(workbookName,evaluator);
_evaluatorsByName.put(workbookName,evaluator);
WorkbookEvaluator[] _newEvaluators = new WorkbookEvaluator[_evaluators.length+1];
System.arraycopy(_evaluators, 0, _newEvaluators, 0,_evaluators.length);
_newEvaluators[_evaluators.length]=evaluator;
_evaluators = _newEvaluators;
hookNewEnvironment(_evaluators, this);
}
COM: <s> add new evaluator for workbook to collaborating environment </s>
|
funcom_train/43345296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(AgentModule module, ServiceCard card) {
synchronized (services) {
if (this.services.containsKey(card.getName())) {
ServiceMap map = this.services.get(card.getName());
map.remove(module, card);
this.size--;
if (map.size() == 0) {
this.services.remove(card.getName());
}
}
}
}
COM: <s> removes an special service card from the service directory can only </s>
|
funcom_train/18727494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLocation(final int x1, final int y1, final int x2, final int y2, final int p3, final int q3) {
setLocation(x1, y1, x2, y2);
point3.setLocation(p3, q3);
setPoint(Handle.P3, point3);
}
COM: <s> sets the points of this 3 point object </s>
|
funcom_train/34446017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void inertialMovement(long elapsedTime){
this.addHorizontalSpeed(elapsedTime, (this.getHorizontalSpeed() > 0) ? -ACCEL_HORIZONTAL/2 : ACCEL_HORIZONTAL/2, 0);
this.setStatus(STANDING);
//done only when he stops ducking
/*
if(ducking){
if(isFiery){
this.setFieryImages();
}
else{
this.setSuperImages();
}
this.setAnimationFrame(1, 1);
if(isTall)this.setLocation(getX(), getY()-20);
ducking=false;
} */
}
COM: <s> this method is the standard status of mario </s>
|
funcom_train/37537486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getQuoteCount() {
PreparedStatement ps;
int count = 0;
try {
ps = getStatement("getQuoteCount","SELECT COUNT(*) FROM quotes");
ResultSet rs = ps.executeQuery();
while( rs.next() )
{
count = rs.getInt(1);
}
} catch (SQLException e) {
throw new RuntimeException(e);
}
return count;
}
COM: <s> get the number of quotations in the database </s>
|
funcom_train/15819870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object invoke(ObjectName onServiceJ2EEServer, String action, String[] param, String[] signature) {
try {
checkAndConnect();
return getMBeanServerConnection().invoke(onServiceJ2EEServer, action, param, signature);
} catch (Exception ex) {
Exceptions.printStackTrace(ex);
return null;
}
}
COM: <s> invoke the sp cified method on the mbean </s>
|
funcom_train/5340161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasFilter(String pathname) {
pathname = pathname.toLowerCase(Locale.US);
int length = _filters.length;
for (int i = 0; i < length; i++) {
String curFilter = _filters[i].toLowerCase(Locale.US);
if (pathname.indexOf(curFilter) != -1)
return true;
}
return false;
}
COM: <s> determines whether or not the file denoted by this </s>
|
funcom_train/51811875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJmsProducerAndListener() throws Exception {
TestListenerImpl listener = (TestListenerImpl) ctx.getBean("listener");
synchronized ( listener ) {
producer.fireTestListenerMessage(getName());
listener.wait(10000);
}
assertEquals("Message not received", 1, listener.messages.size());
}
COM: <s> test that wires up a jms based listener producer to bridge message sending </s>
|
funcom_train/9371663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getAveragePower(String type) {
if (sPowerMap.containsKey(type)) {
Object data = sPowerMap.get(type);
if (data instanceof Double[]) {
return ((Double[])data)[0];
} else {
return (Double) sPowerMap.get(type);
}
} else {
return 0;
}
}
COM: <s> returns the average current in m a consumed by the subsystem </s>
|
funcom_train/12555530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetNodes(){
int length = my_nodeset.length;
for(int i = 0; i < length; i++){
my_nodeset[i].setHexColor("#FFFFFF");
my_nodeset[i].setClosed(false);
my_nodeset[i].setCost(10000);
my_nodeset[i].setPred('~');
}
}
COM: <s> reinitializes the nodes after running a test algorithm for layout </s>
|
funcom_train/45317287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
synchronized (this) {
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).info("Stopping campaign " + name);
resume();
running = false;
// Wake the thread if necessary...
if (dialThread.getState() == State.WAITING) {
dialThread.notify();
}
}
}
COM: <s> stop a running campaign </s>
|
funcom_train/16483440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
try {
config = new XmlRpcClientConfigImpl();
config.setServerURL(new URL("http://www.moviemeter.nl/ws"));
client = new XmlRpcClient();
client.setConfig(config);
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
COM: <s> creates the xml rpc client </s>
|
funcom_train/47548231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAnswer(int i, String value) {
Date now = new Date();
long timespan = (now.getTime() - sessionOpened.getTime());
if (sessionClosed != null || timespan > assessment.maxTime * 60 * 1000) {
if (sessionClosed == null) {
close();
}
throw new RuntimeException("Session should be closed");
}
answers.get(i).setValue(value);
}
COM: <s> record another answer or throw an exception if the time </s>
|
funcom_train/32054929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getAllFlaggedNodes() {
Set flaggedNodes = new HashSet(); //all nodes flagged in any network
//iterate over all networks, saving the flagged objects in each network
for (Iterator iter = Cytoscape.getNetworkSet().iterator(); iter.hasNext(); ) {
CyNetwork network = (CyNetwork) iter.next();
Set nodes = network.getSelectedNodes();
flaggedNodes.addAll(nodes);
}
return flaggedNodes;
}
COM: <s> returns a set containing all the nodes that are flagged in any network </s>
|
funcom_train/11737215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NodeState getRoot() {
if (root == null) {
root = new NodeState(rootNodeId, NameConstants.JCR_ROOT,
null, NodeState.STATUS_EXISTING, false);
if (listener != null) {
root.setContainer(listener);
}
}
return root;
}
COM: <s> return the root node </s>
|
funcom_train/25147873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOffsetCalibration(SensorsToCalibrate sensor, int value) {
//The sensor variable contains an inner value that indicates the sensor line code then,
//complete opcode to send is the opcode for calibrate the offset in first byte and the sensor line code
// in second byte
this.addNewCommand(Tag4MProtocol.OP_CALIBRATE_SENSOR_OFFSET | sensor.getLineCode() << 8, value);
}
COM: <s> sets the offset calibration for the indicated sensor </s>
|
funcom_train/39853364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (!(o instanceof Map.Entry)) {
return false;
}
Map.Entry that = (Map.Entry)o;
return ObjectUtils.equals(this.getKey(), that.getKey())
&& ObjectUtils.equals(this.getValue(), that.getValue());
}
COM: <s> returns code true code if this map </s>
|
funcom_train/22784046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateSelection() {
// update negation
updateNegateItems();
// update typeSwitch
String selection = ANY;
if (currentNode.isNegate()) {
if (currentNode.getType() == Type.ALL) {
selection = ANY;
} else {
selection = ALL;
}
} else {
if (currentNode.getType() == Type.ALL) {
selection = ALL;
} else {
selection = ANY;
}
}
typeSwitch.setSelectedItem(selection);
}
COM: <s> update current selection to match current setup </s>
|
funcom_train/5437217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addIP(String prefix, PacketInputStream input, PacketAnalysisDescriptor root) {
int start = input.getOffset();
try {
String ip = Utils.getIPV4Address(input);
addNode(prefix + ip, start, start+3, root);
} catch (IOException e) {
}
}
COM: <s> adds a field containing an ip address to the packet analysis information </s>
|
funcom_train/21881155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateContext(String project) {
boolean doclear = false;
try {
doclear = updateProject(project);
} catch (ContextException exc) {
logger.debug(exc);
cleanseHistory(project, null, null, null);
doclear = true;
} finally {
if (doclear) {
clearCtx(TYPE_KEY);
clearCtx(OBJECT_KEY);
clearCtx(XFORM_KEY);
}
}
updateHistory();
}
COM: <s> update the context with a project </s>
|
funcom_train/45483530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document toXml() throws Exception {
Document doc = XmlSerializeTool.createDocument();
ListElement list = new ListElement(LIST_ELEMENT_NAME, null);
StringElement stringElement = new StringElement(FIRST_ELEMENT_NAME);
stringElement.setContent(FIRST_CONTENT);
list.add(stringElement);
StringElement otherElement = new StringElement(SECOND_ELEMENT_NAME);
otherElement.setContent(SECOND_CONTENT);
list.add(otherElement);
Element root = list.toXml(doc);
doc.appendChild(root);
return doc;
}
COM: <s> creates a list and serialize it into an xml document </s>
|
funcom_train/39912023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getnextTime(){
nexthour = rnd.nextInt(12) + 1;
if (score > 5){
nextminute = rnd.nextInt(60);
}else if (score > 3){
nextminute = rnd.nextInt(12) * 5;
}else{
nextminute = rnd.nextInt(6) * 10;
}
}
COM: <s> randomly generates time for next question </s>
|
funcom_train/7505391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDaoMapFromProvider() {
TestDaos baseDaoProvider = (TestDaos) getApplicationContext().getBean("daos");
assertNotNull(baseDaoProvider);
Map daoMap = baseDaoProvider.getDaoMap();
assertNotNull(daoMap);
assertTrue("Test DAO map shouldn't be empty", !daoMap.isEmpty());
}
COM: <s> test the retrieval of the dao map from the generic dao provider </s>
|
funcom_train/4447900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserWrapper getUser(String username) {
UserWrapper wrappedUser = null;
try {
Weblogger roller = WebloggerFactory.getWeblogger();
UserManager umgr = roller.getUserManager();
User user = umgr.getUserByUserName(username, Boolean.TRUE);
wrappedUser = UserWrapper.wrap(user);
} catch (Exception e) {
log.error("ERROR: fetching users by letter", e);
}
return wrappedUser;
}
COM: <s> get user object by username </s>
|
funcom_train/16855051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String hash(String str) throws NoSuchAlgorithmException, UnsupportedEncodingException {
MessageDigest digest = MessageDigest.getInstance("SHA-1");
byte[] input = digest.digest(str.getBytes("UTF-8"));
digest.reset();
byte[] enc = digest.digest(input);
return com.google.appengine.repackaged.com.google.common.util.Base64.encode(enc);
}
COM: <s> hashes and base 64 encodes a given string </s>
|
funcom_train/25914202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onTapCalledFromCluster(GeoCluster caller, boolean isTapped) {
// if tapped, set selcluster_ to caller
if(isTapped){
if(selcluster_ == caller)
return;
clearSelect();
selcluster_ = caller;
}
else{
tapCheckCount_++;
if( tapCheckCount_ == clusters_.size() ){
tapCheckCount_ = 0;
/* TODO : do something if no marker was tapped
*/
}
}
}
COM: <s> on tap call from cluster layer </s>
|
funcom_train/51345092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public boolean equals(final IResourceMetadata o) {
if (this == o)
return true;
// Note: compares UUIDs first.
if (uuid.equals(o.getUUID()) && filename.equals(o.getFile())
// && nbytes == o.size()
&& createTime == o.getCreateTime()) {
return true;
}
return false;
}
COM: <s> compares two resource metadata objects for consistent state </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.