__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/24117009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSysLatConstr(Task startTask, Task endTask, double latency){
SysLatencyConstraint sysLatConstr = new SysLatencyConstraint(this, startTask, endTask, latency);
constraints.put(Hashing.getLatConstrHash(appId, startTask.getElemId(), endTask.getElemId()), sysLatConstr);
}
COM: <s> adds to the system a latency constraint </s>
|
funcom_train/5828070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getRRAList(String cName) {
org.opennms.netmgt.config.collectd.JmxCollection collection = (org.opennms.netmgt.config.collectd.JmxCollection) m_collectionMap.get(cName);
if (collection != null)
return (List) collection.getRrd().getRraCollection();
else
return null;
}
COM: <s> retrieves configured list of round robin archive statements </s>
|
funcom_train/28687237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private EventDao getEventDao() {
try {
if (this.eventDao == null) {
this.eventDao = (EventDao) ApplicationContextFactory.getBean(EVENT_DAO);
}
}catch (NullPointerException e) {
// TODO: handle exception
logger.info("eventDao bean not initialised yet");
}
return this.eventDao;
}
COM: <s> retrieves initializes the database tag dao for the read events tags </s>
|
funcom_train/25217037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCount111() throws Exception {
Accumulator a = apply("(1+2*3)");
assertNotNull(a);
assertNotNull(a.getValue());
assertTrue(a.getValue() instanceof TCount);
assertEquals(7, ((TCount) a.getValue()).getValue());
}
COM: <s> testcase test case checking that </s>
|
funcom_train/43392462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isGroupforSshKey(List<Middleware> resourcelist, String pType){
Vector<String> gridNames = ConfigHandler.getAllGroupsforProxy(resourcelist, new Certificate[]{Certificate.SSH_KEY});
for (String t : gridNames){
if (t.equals(pType)) {
return true;
}
}
return false;
}
COM: <s> returns true if p type is set for ssh key type middleware </s>
|
funcom_train/12640066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(int c) {
synchronized (lock) {
int newcount = count + 1;
if (newcount > buf.length) {
char newbuf[] = new char[Math.max(buf.length << 1, newcount)];
System.arraycopy(buf, 0, newbuf, 0, count);
buf = newbuf;
}
buf[count] = (char)c;
count = newcount;
}
}
COM: <s> writes a character to the buffer </s>
|
funcom_train/15772037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFullScreen(DisplayMode displayMode, JFrame window) {
window.setUndecorated(true);
window.setResizable(false);
device.setFullScreenWindow(window);
if (displayMode != null && device.isDisplayChangeSupported()) {
try {
device.setDisplayMode(displayMode);
} catch (IllegalArgumentException ex) {
// ignore - illegal mode for this device
}
}
}
COM: <s> enters full screen mode and changes the display mode </s>
|
funcom_train/32325817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getInput(final String s) throws InterruptedException {
final Autocomplete autocomplete = new Autocomplete(null, this);
final LineInput lineInput = new LineInput(autocomplete, s);
final History hist = new History(lineInput, history, MAX_HIST_SIZE);
final InputTrap inputOpener = new InputOpener(hist);
synchronized (this) {
model.waitForInput(inputOpener);
}
return lineInput.getInput();
}
COM: <s> waits until the user has entered a line of input </s>
|
funcom_train/22233573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColorIndices(int index, int colorIndices[]) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_COLOR_INDEX_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray3"));
((IndexedGeometryArrayRetained)this.retained).setColorIndices(index, colorIndices);
}
COM: <s> sets the color indices associated with the vertices starting at </s>
|
funcom_train/51438684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addDescriptorsList(DescriptorsList descriptors) throws DbAmbitException {
int c = 0;
for (int i = 0; i < descriptors.size(); i ++) {
Descriptor d = descriptors.getDescriptor(i);
if (getDescriptorByName(d) == -1) {
if (addDescriptor(d) > -1) c++;
} else c++;
}
return c;
}
COM: <s> inserts descriptors from a list into ddictionary table </s>
|
funcom_train/3945910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateLocationType_MaxLength(String locationType, DiagnosticChain diagnostics, Map context) {
int length = locationType.length();
boolean result = length <= 2000;
if (!result && diagnostics != null)
reportMaxLengthViolation(AdlcpRootv1p2Package.eINSTANCE.getLocationType(), locationType, length, 2000, diagnostics, context);
return result;
}
COM: <s> validates the max length constraint of em location type em </s>
|
funcom_train/198298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
long bits = java.lang.Double.doubleToLongBits(x);
bits = bits * 31 + java.lang.Double.doubleToLongBits(y);
bits = bits * 31 + java.lang.Double.doubleToLongBits(width);
bits = bits * 31 + java.lang.Double.doubleToLongBits(height);
return (((int) bits) ^ ((int) (bits >> 32)));
}
COM: <s> returns the hashcode for this grid ellipse </s>
|
funcom_train/21611935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParseControlFor() throws MUParserException {
ParseTree pt = parser.parse("control", "for( l, v, Predicate(v) )");
System.out.println("parse tree: " + pt);
checkParsing(pt, "for", "(", "variable", "variable", "predicate_name", "(", "variable", ")", ")");
}
COM: <s> parses i for i control </s>
|
funcom_train/3907711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLD_ComponentRef(LD_Component ldComponent) {
_ldComponent = ldComponent;
Element element = getElement();
if(element != null) {
element.setAttribute(LD_Core.REF, ldComponent.getIdentifier());
}
getDataModel().fireDataComponentChanged(this);
}
COM: <s> set the referenced ld component </s>
|
funcom_train/39108918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public boolean isSameQuarterAs(Date date) {
if (date == null) {
return false;
}
else {
LusidCalendar cal = new LusidCalendar();
cal.setTime(date);
return cal.get(ERA) == get(ERA) &&
cal.get(YEAR) == get(YEAR) &&
cal.getQuarter() == getQuarter();
}
}
COM: <s> returns true if the date is part of the same quarter as the </s>
|
funcom_train/16491362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValid() {
if (!this.colorSchemeBundleMap.containsKey(DecorationAreaType.NONE))
return false;
if (this.getButtonShaper() == null) {
return false;
}
if (this.getGradientPainter() == null) {
return false;
}
if (this.getBorderPainter() == null) {
return false;
}
if (this.getHighlightPainter() == null) {
return false;
}
if (this.getDecorationPainter() == null) {
return false;
}
return true;
}
COM: <s> checks whether this skin is valid </s>
|
funcom_train/9679406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPopupMenu getPopup() {
JPopupMenu popup = super.getPopup();
MenuBuilder builder = MenuBuilder.createEmptyRefactorITMenu('R');
RunContext ctx = extractRunContext();
builder.buildContextMenu(ctx);
// wrapping to JMenu
ActionGroup actionGroup = (ActionGroup) builder.getMenu();
ActionMenu menu = new ActionMenu(new Object(), actionGroup);
popup.add(menu);
return popup;
}
COM: <s> extended to return customized menu </s>
|
funcom_train/8354718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initCodec(IoSession session) throws Exception {
// Creates the decoder and stores it into the newly created session
ProtocolDecoder decoder = factory.getDecoder(session);
session.setAttribute(DECODER, decoder);
// Creates the encoder and stores it into the newly created session
ProtocolEncoder encoder = factory.getEncoder(session);
session.setAttribute(ENCODER, encoder);
}
COM: <s> initialize the encoder and the decoder storing them in the </s>
|
funcom_train/45692132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEgTimePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PartWithCommon_egTime_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PartWithCommon_egTime_feature", "_UI_PartWithCommon_type"),
EsxPackage.Literals.PART_WITH_COMMON__EG_TIME,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the eg time feature </s>
|
funcom_train/24435564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRow(String labelText, String fieldText, FormTextBoxKind kind, Validators validatorKind){
labels.add(new Label(labelText));
switch (validatorKind){
case LOGIN_VALIDATOR:
inputs.add(new FormTextBox(fieldText, kind, new LoginValidator()));
break;
case EMAIL_VALIDATOR:
inputs.add(new FormTextBox(fieldText, kind, new EmailValidator()));
break;
case INTEGER_VALIDATOR:
inputs.add(new FormTextBox(fieldText, kind, new IntegerValidator()));
break;
default: break;
}
}
COM: <s> add a text box to the form with an optional validator </s>
|
funcom_train/48151379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemStateChanged(ItemEvent event) {
if (event.getSource() == modelJComboBox) {
model = modelJComboBox.getSelectedIndex();
if (model == UNIFORM_DISTANCE) dist.setProbability(0.5);
else dist.setProbability(1.0 / 3);
reset();
} else super.itemStateChanged(event);
}
COM: <s> determine which model is used random distance or random angle </s>
|
funcom_train/24932280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map navigableEnds() {
Map res = new TreeMap();
res.putAll(fNavigableElements);
// recursively add association ends in superclasses
Iterator it = parents().iterator();
while (it.hasNext() ) {
MClass superclass = (MClass) it.next();
res.putAll(superclass.navigableEnds());
}
return res;
}
COM: <s> returns a map of all association ends that can be reached from </s>
|
funcom_train/41164203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoResponseMchoiceE3 entity) {
EntityManagerHelper.log("deleting CoResponseMchoiceE3 instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoResponseMchoiceE3.class, entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co response mchoice e3 entity </s>
|
funcom_train/3380341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object other) {
if (this == other)
return true;
if (!(other instanceof PKCS10))
return false;
if (encoded == null) // not signed yet
return false;
byte[] otherEncoded = ((PKCS10)other).getEncoded();
if (otherEncoded == null)
return false;
return java.util.Arrays.equals(encoded, otherEncoded);
}
COM: <s> compares this object for equality with the specified </s>
|
funcom_train/36885551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean existCreditLine() throws CreditLineException {
CreditLineDAO creditLineDAO = null;
boolean exist = false;
creditLineDAO = new CreditLineDAO();
try {
if(creditLineDAO.existCreditLine()){
exist = true;
}else {
exist = false;
}
} catch (CreditLineException pe) {
throw pe;
} catch (Exception e) {
CreditLineException pe = new CreditLineException(e,
PlantException.LAYER_SERVICE,
PlantException.ACTION_SELECT);
e.printStackTrace(System.out);
throw pe;
}
return exist;
}
COM: <s> exist credit line </s>
|
funcom_train/11729075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRestoreNonVersionableNodeJcr2_2() throws RepositoryException {
try {
versionManager.restore(nonVersionableNode.getPath(), "foo", true);
fail("trying to restore on a non versionable node must throw UnsupportedRepositoryOperationException");
} catch (UnsupportedRepositoryOperationException e) {
//success
}
}
COM: <s> test restoring on a non versionable node </s>
|
funcom_train/18466803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File f) {
if(f != null) {
if(f.isDirectory() && includeDirectories) {
return true;
}
String extension = getExtension(f);
if(extension != null && filters.get(getExtension(f)) != null) {
return !exclude;
};
}
return exclude;
}
COM: <s> return true if this file should be shown in the directory pane </s>
|
funcom_train/42734038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(IStructuredSelection selection) {
IJavaElement jelem = getInitialJavaElement(selection);
initContainerPage(jelem);
initTypePage(jelem);
doStatusUpdate();
boolean createJUnit = true;
IDialogSettings dialogSettings = getDialogSettings();
if (dialogSettings != null) {
IDialogSettings section = dialogSettings.getSection(PAGE_NAME);
if (section != null) {
createJUnit = section.getBoolean(SETTINGS_JUNIT);
}
}
setMethodStubSelection(createJUnit, true);
}
COM: <s> the wizard owning this page is responsible for calling this method with </s>
|
funcom_train/42045650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String buildGroupByClause(TableMetaData tableMetaData, GroupByList groupByList) {
StringBuilder sb = new StringBuilder();
if (groupByList != null) {
// SPR sb.append(" GROUP BY ");
sb.append(" ");
sb.append(buildSQL(tableMetaData, groupByList));
}
return sb.toString();
}
COM: <s> return the group by clause </s>
|
funcom_train/22430426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object obj) {
int result = -1;
if (obj instanceof AbstractPlugin) {
AbstractPlugin test = (AbstractPlugin) obj;
if (getId() < test.getId()) {
result = -1;
} else if (getId() > test.getId()) {
result = 1;
} else {
result = 0;
}
}
return result;
}
COM: <s> compare if 2 plugin is the same </s>
|
funcom_train/18088995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String encodeRequestData(BT747Hashtable data) throws BT747Exception {
String encodedData = "";
BT747Hashtable it = data.iterator();
while (it.hasNext()) {
if (encodedData.length() > 0) {
// append a parameter
encodedData += "&";
}
String key = (String) it.nextKey();
encodedData += key;
encodedData += "=";
String value = (String) data.get(key);
encodedData += value;
}
return encodedData;
}
COM: <s> encodes the request parameters into a string representation </s>
|
funcom_train/39947324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int deleteDuplicateEpisodes(boolean KeepNewest){
int deleted = 0;
while (deleteDuplicateEpisode(KeepNewest) != 0) {
setDuplicatesDeleted(duplicatesDeleted++);
deleted++;
}
//setDuplicatesDeletedInDatabase(duplicatesDeleted);
Log.getInstance().write(Log.LOGLEVEL_TRACE, "Podcast.deleteDuplicateEpisodes: Deleted " + duplicatesDeleted);
return deleted;
}
COM: <s> this method deletes all duplicate recordings of the podcast </s>
|
funcom_train/17092171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem2() {
if (stringItem2 == null) {//GEN-END:|31-getter|0|31-preInit
// write pre-init user code here
stringItem2 = new StringItem("stringItem2", null);//GEN-LINE:|31-getter|1|31-postInit
// write post-init user code here
}//GEN-BEGIN:|31-getter|2|
return stringItem2;
}
COM: <s> returns an initiliazed instance of string item2 component </s>
|
funcom_train/36864736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onTreeItemSelected(TreeItem treeItem) {
if (treeItem.getUserObject() != null)
{
int index = (Integer) treeItem.getUserObject();
Conversation conversation = ConversationAsyncCalBack.this.conversation;
conversation.getConversationScroll().ensureVisible(conversation.getConversationGrid().getWidget(index, 0));
}
}
COM: <s> on tree item selected </s>
|
funcom_train/51068535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleDeltaRequest() {
final String tag = class_tag+".handleDeltaRequest";
if( DEBUG ) Debug.printtagln( tag, "called" );
PatchworkModel.Delta d = (PatchworkModel.Delta) model.recalculate();
if( DEBUG ) {
Debug.printtagln( tag, "Recalculating model" );
Debug.printtagln( tag, "Current model:\n" + model );
Debug.printtagln( tag, "Current delta:\n" + d );
}
dispatch( new PatchworkDeltaResponseMsg( d ) );
}
COM: <s> send back a delta to the requestor </s>
|
funcom_train/48725237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ISVNEditor getCommitEditor() throws SVNException {
SVNRepository commitRepository = SvnUtils.createRepository(ivyRepositoryRootURL, svnUserName, svnPassword, null,
null, -1, null, null, false);
return getCommitEditor(commitRepository);
}
COM: <s> utility function to get an editor that can be used for commit operations </s>
|
funcom_train/5712879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetterMethodsType1(){
FacilityConfirmationParameter frp = new FacilityConfirmationParameter();
frp.setFacilitySelector(IFacilityConstants.FACILITYSELECTOR_DTMF);
frp.setInfo(0x1000);
assertEquals("check facility selector", IFacilityConstants.FACILITYSELECTOR_DTMF, frp.getFacilitySelector());
assertEquals("check info", 0x1000, frp.getInfo());
}
COM: <s> tests the settermethods after setting the facility selector to 1 dtmf </s>
|
funcom_train/19406778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void destroyLocalVars(Rule in_rule) {
SystemState ls = in_rule.getLeft();
SystemState rs = in_rule.getRight();
OpCallProcessNode locpn = ls.createOpCallProcessNode();
OpCallProcessNode rocpn = rs.createOpCallProcessNode();
locpn.mark();
rocpn.mark();
in_rule.addMapping(locpn, rocpn);
LocalVarNode llvn = ls.createLocalVarNode();
llvn.setProcess(locpn);
}
COM: <s> marks the finished usecase </s>
|
funcom_train/44723080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCharacterClass(String cclass) {
if (cclass.equals("Warrior")) {
hpSpin.setMaxValue(8);
hpLb.setText("Hit Points (max 8)");
}
else if (cclass.equals("Mage") || cclass.equals("Thief")) {
hpSpin.setMaxValue(4);
hpLb.setText("Hit Points (max 4)");
}
else {
hpSpin.setMaxValue(6);
hpLb.setText("Hit Points (max 6)");
}
}
COM: <s> set the maximum hit points based on character class </s>
|
funcom_train/25731845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh() {
ImgTableModel model = (ImgTableModel) this.model;
this.getColumnModel().getColumn(0).setHeaderValue(
model.getColumnHeader(0));
this.getColumnModel().getColumn(1).setHeaderValue(
model.getColumnHeader(1));
this.getColumnModel().getColumn(2).setHeaderValue(
model.getColumnHeader(2));
}
COM: <s> refresh the header view </s>
|
funcom_train/44842095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getUsersForRepository(RepositoryConfig repConfig) {
List result = new ArrayList();
String repositoryId = repConfig.getRepositoryId();
for (int i = 0; i < _userList.size(); i++) {
UserInfo userInfo = (UserInfo)_userList.get(i);
if (userInfo.hasReadOrWriteAccess(repositoryId)) {
result.add(userInfo);
}
}
return result;
}
COM: <s> gets all users that have read and or write access to the </s>
|
funcom_train/26535022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNetworkDrive(String driveLetter) {
if (driveLetter == null) return false;
String drivePath = getDrivePath(driveLetter);
boolean result = networkDrives.containsKey(drivePath);
logger.finer("isNetworkDrive(" + driveLetter + ") = '" + result + "'");
return result;
}
COM: <s> returns true if the given drive letter names a network drive </s>
|
funcom_train/32986025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAtoms() throws Exception {
if(atoms==null){
Criteria crit = new Criteria();
crit.addJoin(DBSignalDBAtomPeer.ATOM_ID, DBAtomPeer.ATOM_ID);
crit.add(DBSignalDBAtomPeer.SIGNAL_ID, this.getSignalId());
atoms = DBAtomPeer.doSelect(crit);
}
return (atoms);
}
COM: <s> gets the atoms of the dbsignal object </s>
|
funcom_train/45396214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanup () {
if (this.connections.size() > 0)
this.logWriter.println("Cleaning up connections that were not closed: " + this.connections.size());
for (Connection connection : this.connections) {
try { connection.close(); } catch (SQLException e) {
this.logWriter.println("Could not close connection");
e.printStackTrace(this.logWriter);
}
}
}
COM: <s> this will cleanup any connections that were not closed </s>
|
funcom_train/5459881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DataObject extractDataObject(Model model, URI u) {
HashSet<URI> stop = new HashSet<URI>();
RDFContainer metadata = getRDFContainerFactory(u.toString()).getRDFContainer(u);
DataObject result = new DataObjectBase(u, getDataSource(), metadata);
extractDataObjectRec(model, u, metadata, stop);
return result;
}
COM: <s> extract the passed uri as dataobject from the passed model </s>
|
funcom_train/26492456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFirstLink(String name1,String url1,String description1,int language1,String url1web) {
this.firstLink = new ObjectSubmittedSite (this.id, name1, this.cid, url1, description1, this.userid, this.date, language1, url1web);
}
COM: <s> set the first link submitted by the potential editor </s>
|
funcom_train/29869766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getJSplitPane1() {
if (jSplitPane1 == null) {
jSplitPane1 = new JSplitPane();
jSplitPane1.setLeftComponent(getJCenterPanel());
jSplitPane1.setRightComponent(getJRightPanel());
jSplitPane1.setDividerLocation(frame.getSettings().miscRightDivider);
jSplitPane1.setResizeWeight(0.0);
}
return jSplitPane1;
}
COM: <s> this method initializes j split pane1 </s>
|
funcom_train/37255662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isBrowserAvailable() {
boolean isAvailable = false;
try {
Process process = Runtime.getRuntime().exec(new String[] {"which",
browserArgName});
int exitCode = process.waitFor();
isAvailable = exitCode == 0;
} catch (IOException ex) {
// log this somewhere?
} catch (InterruptedException ex) {
// log this somewhere?
}
return isAvailable;
}
COM: <s> returns true id browser is available ie which command finds it </s>
|
funcom_train/51642927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSourceRewrite(CompilationUnitRewrite rewrite) {
fOriginalRewrite= rewrite;
fPreferences= JavaPreferencesSettings.getCodeGenerationSettings(rewrite.getCu().getJavaProject());
fDelegateRewrite= new CompilationUnitRewrite(rewrite.getCu(), rewrite.getRoot());
fDelegateRewrite.getASTRewrite().setTargetSourceRangeComputer(rewrite.getASTRewrite().getExtendedSourceRangeComputer());
}
COM: <s> sets the compilation unit rewrite of the declaration to create a delegate </s>
|
funcom_train/10662559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExportObjectRemoteActivationIDInt072() {
try {
Activatable.exportObject(new EchoWithStubActivatable_Imp(), null,
1100);
fail("Non export object who has just exported");
} catch (RemoteException e) {
} catch (Throwable e) {
fail("Failed with:" + e);
}
}
COM: <s> export a echo with stub activatable object form the port 1100 </s>
|
funcom_train/3389218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Expression makeReference(Environment env, LocalMember target) {
UplevelReference r = noteReference(env, target);
// Now create a referencing expression.
if (r != null) {
return r.makeLocalReference(env, this);
} else if (idThis.equals(target.getName())) {
return new ThisExpression(0, target);
} else {
return new IdentifierExpression(0, target);
}
}
COM: <s> implement a reference usually an uplevel one </s>
|
funcom_train/47683051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAsObject() {
if (!this.attributes.isLeaf()) {
throw new IllegalArgumentException("The field \"" + getPath() + "\" is no leaf. Therefore it does not contain any value.");
}
// get the value in the original format
return getValue();
}
COM: <s> retrieves the value of the field instance as the native object </s>
|
funcom_train/17135180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPartOfSpeechProperties(String partOfSpeech) {
if (partOfSpeech != null) {
try {
client.connect();
String result[] = client.getResults(partOfSpeech, "word,tag -", 0, 1);
return "".equals(result[0]) || result == null ? null : result[0];
} catch (Exception e) {
logger.warning(e.getMessage());
e.printStackTrace();
} finally {
client.disconnect();
}
}
return null;
}
COM: <s> physical connection to manatee server occurs here </s>
|
funcom_train/12838388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDevelopmentModeReturnURL(SessionID sessionID) throws SessionFacilitiesException {
String url = null;
try {
url = (String) sessionStoreBean.getValue(sessionID, new SessionKey(Constants.sfSessionKey_DevelopmentModeReturnURL));
} catch (Exception e) {
throw new SessionFacilitiesException("Exception", e);
}
return url;
}
COM: <s> returns the url of the last place the developer was in prior to </s>
|
funcom_train/777641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testP1Y2M() {
Duration d = new Duration("P1Y2M");
assertEquals( 1, d.getYears() );
assertEquals( 2, d.getMonths() );
assertEquals( 0, d.getDays() );
assertEquals( "P1Y2M", d.toString() );
}
COM: <s> test p1 y2 m </s>
|
funcom_train/48646075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getAngleTextField() {
if (angleTextField == null) {
angleTextField = new JTextField();
angleTextField.setPreferredSize(new Dimension(120, 21));
angleTextField.setText("15.0");
}
return angleTextField;
}
COM: <s> this method initializes angle text field </s>
|
funcom_train/27747213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getChecked () {
checkWidget();
if ((parent.style & SWT.CHECK) == 0) return false;
int ctree = parent.handle;
int [] pixmap = new int [1];
OS.gtk_ctree_get_node_info (ctree, handle, null, null, pixmap, null, null, null, null, null);
return pixmap [0] == parent.check;
}
COM: <s> returns code true code if the receiver is checked </s>
|
funcom_train/39950896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getIntInString(String string, int index) {
StringBuffer buffer = new StringBuffer();
int numcom = 0;
for (int i = 0; i < string.length(); i++) {
if (string.charAt(i) == ';') {
if (numcom == index) break;
numcom++;
buffer.delete(0, buffer.length());
}
else
buffer.append(string.charAt(i));
}
return Integer.parseInt(buffer.toString());
}
COM: <s> retrieves an interger from the special format string </s>
|
funcom_train/46738725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFormFolderRef(DisplayModel formFolderRef) {
if (Converter.isDifferent(this.formFolderRef, formFolderRef)) {
DisplayModel oldformFolderRef= new DisplayModel(this);
oldformFolderRef.copyAllFrom(this.formFolderRef);
this.formFolderRef.copyAllFrom(formFolderRef);
setModified("formFolderRef");
firePropertyChange(String.valueOf(AUTHORIZATIONS_FORMFOLDERREFID), oldformFolderRef, formFolderRef);
}
}
COM: <s> folder for authorization </s>
|
funcom_train/32139247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Number aggregate(Number[] column) {
if(column == null || column.length == 0)
return null;
double num = Double.NEGATIVE_INFINITY;
for(int i=0; i<column.length; i++) {
if(num < column[i].doubleValue())
num = column[i].doubleValue();
}
return NumberType.getNumber(column[0], num);
}
COM: <s> ensure column isnt empty then get the maximum of all the columns values </s>
|
funcom_train/9860190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectImplInterface getObject(final String pName) {
final ObjectType type = aAdaptationModel.getObjectType(pName);
if (type == null) {
return null;
}
ObjectImplInterface impl = aObjects.get(pName);
if (impl == null) {
impl = new TmpContainer(type);
}
return impl;
}
COM: <s> get the attribute container with the specified name </s>
|
funcom_train/3859290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Method lookupDeclaredMethod(String aName) {
String id = idForMemberWithName(aName);
for (Iterator iterator = getMethods().iterator(); iterator.hasNext();) {
Method method = (Method) iterator.next();
if (method.id().equals(id)) {
return method;
}
}
return null;
}
COM: <s> is a method with the given name already declared by this type </s>
|
funcom_train/47969874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private URI getPredicateURI(String predicate, ValueFactory f) {
// Checks if it is an URI
if (predicate.contains("http")) {
// Then creates a new URI with the specified String
return f.createURI(predicate);
} else {
// If none above, throws an unexpected exception
System.err.println("Unexpected Backup Token, was expecting"
+ " an URI but was " + predicate);
return null;
}
}
COM: <s> creates the uri which represents a predicate </s>
|
funcom_train/27719825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testColumnIndex() {
System.out.println("testColumnIndex");
assertEquals(2, tl.columnIndex(10));
assertEquals(2, tl.columnIndex(12));
assertEquals(3, tl.columnIndex(13));
assertEquals(3, tl.columnIndex(15));
}
COM: <s> test of column index method of class puce </s>
|
funcom_train/29418789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle2D getBoundingBox(int xfluff, int yfluff) {
if (updown<0) calcBounds();
return new Rectangle2D.Double(x()-side-xfluff, y()-updown-yfluff, side+side+xfluff+xfluff, updown+updown+yfluff+yfluff);
}
COM: <s> returns the bounding rectangle </s>
|
funcom_train/37252807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection getDBConnection() {
Connection conn = null;
try {
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/hnuDB");
conn = ds.getConnection();
} catch (Exception sqle) {
log.error("Couln't get connection from DataSource", sqle);
//sqle.printStackTrace();
}
return conn;
}
COM: <s> fetches new data base connection from pool </s>
|
funcom_train/50029204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PixToolsVector3d Ang2Vec(double theta, double phi) {
double PI = Math.PI;
String SID = "Ang2Vec:";
PixToolsVector3d v;
if ((theta < 0.0) || (theta > PI)) {
throw new IllegalArgumentException(SID + " theta out of range [0.,PI]");
}
double stheta = Math.sin(theta);
double x = stheta * Math.cos(phi);
double y = stheta * Math.sin(phi);
double z = Math.cos(theta);
v = new PixToolsVector3d(x, y, z);
return v;
}
COM: <s> calculates vector corresponding to angles theta co latitude </s>
|
funcom_train/20613634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireElementStateValidationChanged(Object element, boolean isStateValidated) {
Iterator e= new ArrayList(fElementStateListeners).iterator();
while (e.hasNext()) {
Object o= e.next();
if (o instanceof IElementStateListener) {
IElementStateListener l= (IElementStateListener) o;
l.elementStateValidationChanged(element, isStateValidated);
}
}
}
COM: <s> informs all registered element state listeners about a change in the </s>
|
funcom_train/26524169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IInfoHabitantData publicClone() {
SymRegIHData vData = new SymRegIHData(mHitsArray.length);
vData.mHits = mHits;
vData.mHitsArray = (boolean[])mHitsArray.clone();
vData.mScore = mScore;
vData.mScoreArray = (double[])mScoreArray.clone();
return vData;
}
COM: <s> make a deep clone of the current sym reg ihdata object </s>
|
funcom_train/23898214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAttributes(NamedNodeMap attributes) {
if (attributes != null) {
for (int i = 0; i < attributes.getLength(); i++) {
String name = attributes.item(i).getNodeName();
String value = attributes.item(i).getNodeValue();
addAttribute(name, value);
}
}
}
COM: <s> add attributes from named node map to the list </s>
|
funcom_train/6269433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void listen() throws IOException {
// listen for incoming request
while (!stop) {
Socket socket = server.accept();
RequestHandler handler = new RequestHandler(aih, socket);
handler.start();
}
server.close();
LOGGER.finest("Connection on port " + server.getLocalPort()
+ " is closed");
}
COM: <s> listen for incoming requests </s>
|
funcom_train/6462203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean filter(String[] header, Object[] fields) {
if (header.length != fields.length) {
return false;
}
for (int i=0; i<header.length; ++i) {
if (header[i].equals(_name)) {
if (fields[i].equals(_value)) {
return true;
}
break;
}
}
return false;
}
COM: <s> check if objects are the same </s>
|
funcom_train/2546442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void index(boolean recursive) {
try {
IndexWriter writer = new IndexWriter(indexDir, new StandardAnalyzer(), true);
for (int i = 0; i < dataDir.length; i++) {
indexDirectory(writer, dataDir[i], recursive);
}
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> run the indexer </s>
|
funcom_train/50909332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object object) {
if (object != null) {
if (object instanceof Coordinates) {
if ((((Coordinates)object).getX() == this.getX()) &&
(((Coordinates)object).getY() == this.getY())) {
return true;
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
}
COM: <s> determines if two coordinates are equal </s>
|
funcom_train/4821744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean Utf8codeCheck(String text) {
String sign = "" ;
if (text.startsWith("%e"))
for (int i = 0, p = 0; p != -1; i++) {
p = text.indexOf("%", p) ;
if (p != -1)
p++ ;
sign += p ;
}
return sign.equals("147-1") ;
}
COM: <s> code is or not valid </s>
|
funcom_train/44777437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSet executeQuery(String strSql) throws Exception {
strSql = sqlParser.parse(strSql);
if (bPrintSql)
displayBegin(strSql);
ResultSet theResultSet;
refreshConnection();
Stmt = aConnection.createStatement();
theResultSet = Stmt.executeQuery(strSql);
if (bPrintSql)
displayEnd();
return theResultSet;
}
COM: <s> return the select result </s>
|
funcom_train/13777782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void putSubTableForBussinesView(TableSyntaxNode tableSyntaxNode, IOpenClass tableType) {
ILogicalTable tableBody = DataTableBindHelper.getTableBody(tableSyntaxNode);
ILogicalTable dataWithTitle = DataTableBindHelper.getSubTableForBusinessView(tableBody, tableType);
tableSyntaxNode.getSubTables().put(IXlsTableNames.VIEW_BUSINESS, dataWithTitle);
}
COM: <s> adds sub table for displaying on bussiness view </s>
|
funcom_train/46589714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHeaders(final HttpServletResponse response){
response.setContentType(this.sContentType);
response.setHeader("Content-Language", "en"); //$NON-NLS-1$ //$NON-NLS-2$
response.setContentLength(length());
RequestWrapper.setCacheTimeout(response, (int) ((this.lGenerated+this.lifetime-System.currentTimeMillis())/1000));
}
COM: <s> set the proper http headers for this cached content </s>
|
funcom_train/50688120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean bPerformTask(ServletTask t) throws WebException {
if (t.isAction("Contact")) {
new ContactDlg(getWebSession());
return true;
}
if (t.isAction("About")) {
new AboutWnd(getWebSession());
return true;
}
return false;
}
COM: <s> paints this window </s>
|
funcom_train/22179464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void performEditEvent() {
if (tableDeclare.getSelectionCount() > 0) {
DeclareInputDialog dialog = new DeclareInputDialog(btnEdit.getShell());
SceneParsingDeclaration decl = (SceneParsingDeclaration)lstDeclare.get(tableDeclare.getSelectionIndex());
dialog.setDeclaration(decl);
int ret = dialog.open();
if (ret == Dialog.OK) {
decl.setName(dialog.getDeclaration().getName());
decl.setValue(dialog.getDeclaration().getValue());
forceTableUpdate();
setButtonEnablement();
}
}
}
COM: <s> calls the dialog for editing the selected declaration </s>
|
funcom_train/1745676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vertex clone(){
try {
Vertex clone = (Vertex)super.clone();
/*
* Clear status for copying vertex from one CSG operand
* to another
*/
clone.status = State.Unknown;
/*
* Vertex cloning needs to be part of a process of
* rebuilding vertex face membership lists
*/
clone.membership = null;
return clone;
}
catch (CloneNotSupportedException exc){
throw new InternalError();
}
}
COM: <s> called in creating csg product a </s>
|
funcom_train/5244124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPlan(Plan p) throws AILexception {
p.setSource(refertoself());
if (p.getTriggerEvent().getGoal().getGoalType() == Goal.achieveGoal) {
CondActions.add(p);
CondActions.init(this);
} else {
fPL.add(p);
fPL.init(this);
}
}
COM: <s> adds a plan from itself to the lbirary </s>
|
funcom_train/20885338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPrimitiveBooleanCSV() {
PrimitiveBooleanDTO dto = new PrimitiveBooleanDTO();
dto.primitiveBooleanField = false;
assertTrue(JSefaTestUtil.serialize(CSV, dto).indexOf("false") >= 0);
JSefaTestUtil.assertRepeatedRoundTripSucceeds(CSV, dto);
}
COM: <s> tests primitive boolean csv </s>
|
funcom_train/7981038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void readPrefixes(Object o) {
buildSurtPrefixSet();
// See whether Host or Domain was chosen
String scope = this.getScope(o);
if (scope.equals(HOST)){
surtPrefixes.convertAllPrefixesToHosts();
} else if (scope.equals(DOMAIN)) {
surtPrefixes.convertAllPrefixesToDomains();
}
dumpSurtPrefixSet();
}
COM: <s> patch the surt prefix set so that it only includes the appropriate </s>
|
funcom_train/38492040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hostRow() {
GridBagConstraints gbc = new GridBagConstraints() ;
gbc.gridx = 0 ;
gbc.gridy = 0 ;
gbc.fill = GridBagConstraints.NONE ;
add(versionChoice, gbc) ;
gbc.gridx = 1 ;
gbc.gridwidth = 2 ;
gbc.fill = GridBagConstraints.HORIZONTAL ;
gbc.weightx = 10.0 ;
add(hostBox, gbc) ;
}
COM: <s> add the host and snmp version items to the top row </s>
|
funcom_train/8087095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matrix getS() {
Matrix X = new Matrix(n,n);
double[][] S = X.getArray();
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
S[i][j] = 0.0;
}
S[i][i] = this.s[i];
}
return X;
}
COM: <s> return the diagonal matrix of singular values </s>
|
funcom_train/8083977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInstances(Instances inst) throws Exception {
if (m_design) {
throw new Exception("This method is not to be used during design "
+"time. It is meant to be used if this "
+"bean is being used programatically as as "
+"stand alone component.");
}
m_visualizeDataSet = inst;
setUpFinal();
}
COM: <s> set instances for this bean </s>
|
funcom_train/48579887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdDeleteTrip() {
if (cmdDeleteTrip == null) {//GEN-END:|267-getter|0|267-preInit
// write pre-init user code here
cmdDeleteTrip = new Command("Delete Trip", Command.ITEM, 0);//GEN-LINE:|267-getter|1|267-postInit
// write post-init user code here
}//GEN-BEGIN:|267-getter|2|
return cmdDeleteTrip;
}
COM: <s> returns an initiliazed instance of cmd delete trip component </s>
|
funcom_train/28128319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(LinkListNode node) {
if (m_count == 0 || node == null) {
return false;
}
LinkListNode prev = node.getPrev();
LinkListNode next = node.getNext();
if (prev == null) {
m_first = next;
}
else {
prev.setNext(next);
}
if (next == null) {
m_last = prev;
}
else {
next.setPrev(prev);
}
m_count--;
return true;
}
COM: <s> removes the node from the list </s>
|
funcom_train/1062268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConstraint(Constraint constraint){
this.constraint = constraint;
if(constraint!=null) {
// re init the current Modeling level and the current language (default one or first one in the list)
currentModelingLevel = getModelingLevel(constraint);
// get possible languages (those registered in preferences and those in the languages specification)
currentLanguage = getDefaultEditingLanguage();
} else {
// gives default values to these element to avoid null pointers exception
currentModelingLevel = defaultModelingLevel;
currentLanguage = "OCL";
}
}
COM: <s> updates the currently edited constraint </s>
|
funcom_train/17934773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addText3D(String text, int x, int y, int z, Color color, int size) {
if (this.text3D == null) this.text3D = new ArrayList();
Text3D t3D = new Text3D(text, x-xCenter, y-yCenter, z-zCenter, color, size);
this.text3D.add(t3D);
}
COM: <s> adds a text to the 3 d scene </s>
|
funcom_train/46184304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadPatterns() {
try {
this.patterns = GoogleSearchPatternsLoader.getPatterns();
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ParserConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> load the patterns needed to this class </s>
|
funcom_train/36851859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeUnsignedPacked(BigDecimal value, int integerDigits, int fractionalDigits) throws IOException {
if (value.scale() != 0) {
value = value.scaleByPowerOfTen(fractionalDigits);
}
writeUnsignedPacked(Util.format(value, 0, '.', true), integerDigits + fractionalDigits);
}
COM: <s> writes a tt big decimal tt in unsigned packed format </s>
|
funcom_train/29919073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File getCardVolume() {
if (Settings.platform.equals("WindowsCE")
|| Settings.platform.equals("PocketPC")) {
File f;
String[] winceVols =
{
"\\Storage Card\\",
"\\SD Card\\",
"\\Storage Card1\\",
"\\Storage Card2\\" };
for (int i = winceVols.length - 1; i >= 0; i--)
if ((f = new File(winceVols[i])).isDir()) {
return f;
}
}
return null;
}
COM: <s> used to find an sd card </s>
|
funcom_train/40437197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* protected */ public int insertRow(int beforeRow) {
// Specifically allow the row count as an insert position.
if (beforeRow != getRowCount()) {
checkRowBounds(beforeRow);
}
Element tr = DOM.createTR();
DOM.insertChild(bodyElem, tr, beforeRow);
return beforeRow;
}
COM: <s> inserts a new row into the table </s>
|
funcom_train/2764106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ContextModification unmarshalContextModification(String strContextModification) throws JAXBException {
if(strContextModification == null) {
return null;
}
Unmarshaller unmarshaller = getJaxbContext().createUnmarshaller();
ContextModificationElement elem = (ContextModificationElement) unmarshaller.unmarshal(new InputSource(new StringReader(strContextModification)));
ContextModification contextModification = getObjectFactory().createContextModification();
contextModification.getAddOrUpdateOrDelete().addAll(elem.getAddOrUpdateOrDelete());
return contextModification;
}
COM: <s> helper method that unmarshals the context modification </s>
|
funcom_train/24161482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setState(TransportOrderState newState) throws StateChangeException {
validateStateChange(newState);
switch (newState) {
case STARTED:
startDate = new Date();
break;
case FINISHED:
case ONFAILURE:
case CANCELED:
endDate = new Date();
break;
default:
break;
}
state = newState;
}
COM: <s> change the state of the code transport order code regarding some rules </s>
|
funcom_train/48147265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameters(double x0, double x1, double s, double y0, double y1, double t){
setScale(x0, x1, y0, y1);
xStep = s; yStep = t;
xMin = x0; xMax = x1; yMin = y0; yMax = y1;
}
COM: <s> this method sets the parameters the partitions of the intervals </s>
|
funcom_train/937708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialise() {
Component c = getDisplay();
/*
if (!(c instanceof Container)) {
throw new IllegalArgumentException("Invalid display component - must be a container!");
}
*/
if (c instanceof RootPaneContainer) {
((RootPaneContainer) c).getContentPane().add(canvas);
}
else if (c instanceof Container) {
((Container) c).add(canvas);
}
else {
// Window w = ScreensaverUtils.createScreensaverWindow(this);
// w.add(panel);
// panel.setVisible(true);
}
c.validate();
}
COM: <s> initialises the canvas for display </s>
|
funcom_train/15512841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileNamePattern parse(String pattern) {
if(( pattern == null ) || ( pattern.length() < 3 )
|| ( pattern.indexOf(":") != 1) || ( pattern.length() > (256+2) )) return null;
boolean isRegex = ( pattern.charAt( 0 ) == 'R' );
return new FileNamePattern( pattern.substring(2), isRegex );
}
COM: <s> parses a string into a file name pattern if possible </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.