__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/2708493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long createSession(EngineCallback callback, Project project) throws EngineException {
long sessionId = newSessionId();
System.out.println("ENGINE: Created new session " + Long.toString(sessionId));
EngineSession session = new EngineSession(this, sessionId, callback, project);
synchronized (this.sessions) {
this.sessions.put(sessionId, session);
}
return sessionId;
}
COM: <s> create an engine session for the given latex project </s>
|
funcom_train/1821293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isPremisse(Item _item) throws IOException, JDOMException {
for (Rule rule : objectPersistence.getRules()) {
for (Item premisse : rule.getPremisses()) {
if (_item.getDescription().equals(premisse.getDescription()) &&
_item.getValue().equals(premisse.getValue())) {
return true;
}
}
}
return false;
}
COM: <s> method that verify if an item is a rules premisse </s>
|
funcom_train/9132679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RulePriority from(String level) {
if ("1".equals(level)) {
return RulePriority.BLOCKER;
}
if ("2".equals(level)) {
return RulePriority.CRITICAL;
}
if ("4".equals(level)) {
return RulePriority.MINOR;
}
if ("5".equals(level)) {
return RulePriority.INFO;
}
return RulePriority.MAJOR;
}
COM: <s> returns a rule priority instance from a given string </s>
|
funcom_train/2920378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recover(IntStream input, RecognitionException re) {
if ( lastErrorIndex==input.index() ) {
// uh oh, another error at same token index; must be a case
// where LT(1) is in the recovery token set so nothing is
// consumed; consume a single token so at least to prevent
// an infinite loop; this is a failsafe.
input.consume();
}
lastErrorIndex = input.index();
BitSet followSet = computeErrorRecoverySet();
beginResync();
consumeUntil(input, followSet);
endResync();
}
COM: <s> recover from an error found on the input stream </s>
|
funcom_train/42651278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean allSelectionDependenciesOk(EvaluationContext ctx, Widget widget) {
for(CollectionWidgetSelectionValue selectionValue: findDependencies(widget)) {
if(! ctx.containsParameter(selectionValue.getTarget().buildSelectionId())) {
logger.info("Missing valid selection for: " + selectionValue);
return false ;
}
}
return true ;
}
COM: <s> returns true if all the </s>
|
funcom_train/27754684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPropertyParameter(FileType type, String param) {
String paramValue = getPreferenceStore().getString( getParameterPropertyName(type, param.toString()));
if ("true".equals(paramValue)) return 1;
if ("false".equals(paramValue)) return 0;
return -1;
}
COM: <s> returns parameter value for this type </s>
|
funcom_train/8094076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void main(String [] argv) {
try {
BayesNet b = new BayesNet();
b.setSearchAlgorithm( new ICSSearchAlgorithm());
Instances instances = new Instances(new FileReader("C:\\eclipse\\workspace\\weka\\data\\contact-lenses.arff"));
instances.setClassIndex(instances.numAttributes() - 1);
b.buildClassifier(instances);
System.out.println(b.toString());
} catch (Exception e) {
e.printStackTrace();
}
} // main
COM: <s> for testing the class </s>
|
funcom_train/42949856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTable(JTable table) {
super.setTable(table);
// setColumnModel(table.getColumnModel());
// the additional listening option makes sense only if the table
// actually is a JXTable
if (getXTable() != null) {
installHeaderListener();
} else {
uninstallHeaderListener();
}
}
COM: <s> sets the associated jtable </s>
|
funcom_train/25915832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawFrame(GL10 gl) {
if (mSprites != null) {
gl.glMatrixMode(GL10.GL_MODELVIEW);
if (mUseVerts) {
Grid.beginDrawing(gl, true, false);
}
for (int x = 0; x < mSprites.length; x++) {
mSprites[x].draw(gl);
}
if (mUseVerts) {
Grid.endDrawing(gl);
}
}
}
COM: <s> draws the sprites </s>
|
funcom_train/3466428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRecentWorkspace(File file) {
try {
String fileName = file.getCanonicalFile().getAbsolutePath();
recentWorkspaces.remove(fileName);
recentWorkspaces.addFirst(fileName);
if (recentWorkspaces.size() > RECENT_PROJECTS_MAX_SIZE) {
recentWorkspaces.removeLast();
}
} catch (IOException e) {
}
}
COM: <s> add a file to the list of recently useed workspaces </s>
|
funcom_train/29721052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveWilosUser(WilosUser _user) {
if (_user.getNewPassword() != null
&& !_user.getNewPassword().trim().equalsIgnoreCase("")) {
_user.setPassword(Security.encode(_user.getNewPassword()));
}
this.wilosUserDao.saveOrUpdateWilosUser(_user);
}
COM: <s> save a user </s>
|
funcom_train/5402727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void commentKey(String key) {
BundleEntry entry = (BundleEntry) entries.get(key);
if (entry != null) {
BundleEntry newEntry = new BundleEntry(
key, entry.getValue(), entry.getComment(), true);
addEntry(newEntry);
}
}
COM: <s> comments a bundle entry </s>
|
funcom_train/4953619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(TestRun tr) {
if (tr != null && tr.runDate != null) {
int v1 = tr.runDate.compareTo(runDate);
int v2 = 0;
if (!runPath.equalsIgnoreCase("")
&& !tr.runPath.equalsIgnoreCase("")) {
v2 = tr.runPath.compareTo(runPath);
}
if (0 == v1) {
return v2;
} else {
return v1;
}
}
return -1;
}
COM: <s> does a comparison based on the run stamp which should be unique </s>
|
funcom_train/40090740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void PageBusUnsubscribe(String subject) throws PageBusAdapterException {
if (subject==null)
return;
if (subject.trim().length()==0)
return;
JavaScriptObject subscription = (JavaScriptObject)subscriptions.get(subject);
if (subscription==null)
return;
try {
jsPageBusUnsubscribe(subject,subscription);
} catch(Exception ex) {
throw new PageBusAdapterException("Could not unsubscribe from "+"'"+subject+"'",ex);
}
subscriptions.remove(subject);
logEvent(LOGGER_EVENTTYPE_UNSUBSCRIBE, subject, null, null, null, null);
}
COM: <s> removes subscription of a desired message type from page bus hub </s>
|
funcom_train/43213277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean setHashSpans(Collection<HashSpan> hashSpans) {
if (!HashSpanCollection.areEqual(getHashSpans(), hashSpans)) {
synchronized (this.hashSpans) {
this.hashSpans.clear();
this.hashSpans.addAll(hashSpans);
}
return true;
}
return false;
}
COM: <s> p sets the hash spans </s>
|
funcom_train/17830626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void entriesAdded(final Collection addresses) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
Roster roster = SparkManager.getConnection().getRoster();
Iterator jids = addresses.iterator();
while (jids.hasNext()) {
String jid = (String)jids.next();
RosterEntry entry = roster.getEntry(jid);
addEntry(entry);
}
}
});
}
COM: <s> called when new entries are added </s>
|
funcom_train/26490218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String replace(String chaine,String Variable,String Value ){
int index=0;
while(chaine.indexOf(Variable,index)!=-1){
int index2 = index;
index=chaine.indexOf(Variable,index)+Value.lastIndexOf(Variable)+1;
chaine = chaine.substring(0,chaine.indexOf(Variable,index2))+Value+chaine.substring(chaine.indexOf(Variable,index2)+Variable.length(),chaine.length());
}
return chaine;
}
COM: <s> static method to manipulate strings </s>
|
funcom_train/18734657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkBindingFailure(String pattern, String prefix) {
PatternParser parser = new PatternParser(pattern);
Pointcut p = parser.parsePointcut();
Bindings actualBindings = new Bindings(2);
try {
p.resolveBindings(makeSimpleScope(), actualBindings);
} catch (AbortException re) {
assertEquals(prefix, re.getIMessage().getMessage().substring(0, prefix.length()));
//System.out.println("expected exception: " + re);
return;
}
assertTrue("should have failed", false);
}
COM: <s> method check binding failure </s>
|
funcom_train/25332188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAndSetSpeciesID() {
DACoordinateSystem instance = new DACoordinateSystem();
Integer expResult = 5;
Integer result = instance.getSpeciesID();
assertNull(result);
instance.setSpeciesID(5);
result = instance.getSpeciesID();
assertEquals(expResult, result);
}
COM: <s> test of get species id method of class dacoordinate system </s>
|
funcom_train/28756458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShow(Long newVal) {
if ((newVal != null && this.show != null && (newVal.compareTo(this.show) == 0)) ||
(newVal == null && this.show == null && show_is_initialized)) {
return;
}
this.show = newVal;
show_is_modified = true;
show_is_initialized = true;
}
COM: <s> setter method for show </s>
|
funcom_train/42226003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getAddUpdate() {
if (addUpdate == null) {//GEN-END:|75-getter|0|75-preInit
// write pre-init user code here
addUpdate = new Command("Cont.", Command.OK, 0);//GEN-LINE:|75-getter|1|75-postInit
// write post-init user code here
}//GEN-BEGIN:|75-getter|2|
return addUpdate;
}
COM: <s> returns an initiliazed instance of add update component </s>
|
funcom_train/572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OptimizerBoardPosition removeFirst() {
if (count == 0)
return null;
// The head of the queue must be returned.
OptimizerBoardPosition result = queue[0];
// The head of the queue has (logically) been removed => adjust the size.
--count;
// Remove the last board position.
OptimizerBoardPosition x = queue[count];
queue[count] = null;
// If there is at least one board position left in the queue then
// shift the board positions so the queue has a new head.
if (count != 0)
siftDown(0, x);
return result;
}
COM: <s> removes and returns the board position having the lowest metrics moves pushes </s>
|
funcom_train/2380978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAllTreeViews(IPageLayout layout) {
if(folderLayoutLeft == null) {
addFolderLayouts(layout);
}
folderLayoutLeft.addView(ActivitiesView.ID);
folderLayoutLeft.addView(ResourcesView.ID);
folderLayoutLeft.addView(PeopleView.ID);
folderLayoutLeft.addView(ExplorerView.ID);
}
COM: <s> add all the main tree views </s>
|
funcom_train/3121505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateUI() {
super.updateUI();
if(tree != null) {
tree.updateUI();
}
// Use the tree's default foreground and background colors in the
// table.
LookAndFeel.installColorsAndFont(this, "Tree.background",
"Tree.foreground", "Tree.font");
} // of method
COM: <s> overridden to message super and forward the method to the tree </s>
|
funcom_train/50572180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void post_processMail(String args) {
String output = (String) super.getReturnValue();
//ensure that the output is never null
assert output != null;
//test to see if the first 3 characters of the output string are numbers
assert Integer.parseInt(output.substring(0, 3)) >= 0;
} // end post_processMail()
COM: <s> these conditions must be true at the conclusion of running the </s>
|
funcom_train/21881354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object go() throws Exception {
// object to return
Bean entity = new Bean();
// Package it for the web tier
ProcessResult result = new ProcessResultBase(entity);
result.setName("mapForm");
result.setScope("request");
result.setSingleForm(true);
result.setData(entity);
return (Object) result;
}
COM: <s> retrieve instance form export input from user </s>
|
funcom_train/50140845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IFieldMolder getReferenceFieldMolder(String fieldName) {
for (int i = 0; i < refMolders.length; i++) {
if (refMolders[i].getFieldDescriptor().getName().equals(fieldName)) {
return refMolders[i];
}
}
return null;
}
COM: <s> gets the reference field molder attribute of the persistence object </s>
|
funcom_train/47514951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addModel(String newResultFile, PlsResultModel model) {
mResultModels.put(newResultFile, model);
mPlsModels.put(newResultFile, model);
model.setBrainFilter(mBrainFilter);
model.setPublisher(mPublisher);
mSelectedModel = newResultFile;
mControlPanelModel.checkLagNumbers();
calculateColourScale();
mCurrentColourScale = mCalculatedColourScale;
}
COM: <s> adds a new model to the repository </s>
|
funcom_train/50925614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void adjustCoordinates(Angle angle, CMLAtomSet atomSet, CMLAtomSet moveableSet) {
// make sure there are exactly 3 atoms in order
CMLAtomSet atom3Set = atomSet.getAtomSetById(this.angle.getAtomRefs3());
CMLTransform3 transform = this.getTransformationToNewAngle(
angle, atom3Set.getAtoms());
AtomSetTool.getOrCreateTool(moveableSet).transformCartesians(transform);
}
COM: <s> applies transformation to reset angle </s>
|
funcom_train/6349455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSafeTrim() {
assertEquals("null input", "", StringUtils.safeTrim(null));
assertEquals("empty input", "", StringUtils.safeTrim(""));
assertEquals("no trim req'd", "abc", StringUtils.safeTrim("abc"));
assertEquals("trim req'd", "abc", StringUtils.safeTrim(" abc "));
}
COM: <s> ensures that string utils </s>
|
funcom_train/1668517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if(obj==this) {
return true;
}
if(obj==null||this.getClass()!=obj.getClass()) {
return false;
}
Db4oDatabase other = (Db4oDatabase)obj;
if (null == other.i_signature || null == this.i_signature) {
return false;
}
return Arrays4.areEqual(other.i_signature, this.i_signature);
}
COM: <s> comparison by signature </s>
|
funcom_train/7427968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText() {
StringBuffer result = new StringBuffer();
final Iterator lineIterator = lines.iterator();
while (lineIterator.hasNext()) {
result.append(lineIterator.next());
result.append('\n');
}
if (result.length() > 0) {
result.deleteCharAt(result.length() - 1);
}
return result.toString();
}
COM: <s> return the text within this text component </s>
|
funcom_train/43606252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class Version extends polyglot.main.Version {
public String name() { return "coffer"; }
// TODO: define a version number, the default (below) is 0.1.0
public int major() { return 0; }
public int minor() { return 1; }
public int patch_level() { return 0; }
}
COM: <s> version information for coffer extension </s>
|
funcom_train/44865340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDate(Date d) {
Calendar cal = Calendar.getInstance();
cal.setTime(d);
m_month = String.valueOf(cal.get(Calendar.MONTH));
m_day = String.valueOf(cal.get(Calendar.DAY_OF_MONTH));
m_year = String.valueOf(cal.get(Calendar.YEAR));
}
COM: <s> sets the string fields from an input date </s>
|
funcom_train/18461472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPopulation(final Population a_population) {
if (a_population == null) {
throw new IllegalArgumentException("Population must not be null");
}
m_populations.add(0, a_population);
int popSize = m_populations.size();
if (m_maxSize != 0 && popSize > m_maxSize) {
m_populations.remove(popSize - 1);
}
}
COM: <s> adds a population to the history </s>
|
funcom_train/36248471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeColors() {
toolkit.getColors().createColor("amazon-orange", 222, 123, 32);
toolkit.getColors().createColor("module-header", 94, 124, 169);
toolkit.getColors().createColor("module-subheader", 102, 102, 102);
}
COM: <s> initializes color resources </s>
|
funcom_train/8096748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Filter getFilter(String rangelist) {
try {
Discretize f = new Discretize();
f.setAttributeIndices(rangelist);
return f;
} catch (Exception ex) {
ex.printStackTrace();
fail("Exception setting attribute range: " + rangelist
+ "\n" + ex.getMessage());
}
return null;
}
COM: <s> creates a specialized discretize </s>
|
funcom_train/22279534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: //- private void moveToAndSizeTo(int x, int y, int width, int height) {
//- moveByAndSizeBy(x - bounds.x, y - bounds.y,
//- width - bounds.width,
//- height - bounds.height);
//- }
COM: <s> convenience method for smoothly simultaneously moving and resizing a </s>
|
funcom_train/18789750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPostalCode(String postalCode) {
if (((this.postalCode != null) && !this.postalCode.equals(postalCode)) ||
((this.postalCode == null) && (postalCode != null))) {
this.postalCode = postalCode;
setModified(true);
}
}
COM: <s> sets the new value of the simple property postal code </s>
|
funcom_train/48189791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(PosPurview entity) {
LogUtil.log("saving PosPurview instance", Level.INFO, null);
try {
entityManager.persist(entity);
LogUtil.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved pos purview entity </s>
|
funcom_train/14180009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void accomplishValuation(int number) {
Valuation valuation = new Valuation(number);
accomplishedValuations.add(valuation);
List<Alhambra> alhambraList = new Vector<Alhambra>(players.size() + 1);
Iterator<Player> playerIterator = players.iterator();
while (playerIterator.hasNext()) {
alhambraList.add(playerIterator.next().getAlhambra());
}
valuation.accomplish(alhambraList);
ObserverMessage message =
new ObserverMessage(ObserverMessage.ACCOMPLISHED_VALUATION);
message.addData(number);
setChanged();
notifyObservers(message);
}
COM: <s> accomplish value number code number code </s>
|
funcom_train/8992517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendNotifyDelegatedPersonBySystem(WorkflowStep wstep, WorkflowProgress wprogress, List recipientList) throws ApplicationException {
if (!wprogress.getStatus().equals(WorkflowProgress.STATUS_PENDING)) {
return;
}
sendSystemAlert(wstep, wprogress, UpdateAlert.NOTIFY_DELEGATION_USER, recipientList);
}
COM: <s> send notification delegated person by system </s>
|
funcom_train/3698565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop(){
setServerStarted(false);
HandleUser.disconnectAll();
serverThread = null;
try {
serverSocket.close();
} catch (IOException e) {
e.printStackTrace();
}
Log.log(Level.CONFIG,"Serveur","stop","Java IRC Server stopped.");
}
COM: <s> to stop the server </s>
|
funcom_train/16935055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
String command = e.getActionCommand();
if (command.equals("can-button")) {
m_outcome = false;
dispose();
}
else if (command.equals("ok-button")) {
m_outcome = true;
dispose();
}
}
COM: <s> handle the actions associated with the ok and the cancel buttons </s>
|
funcom_train/11312330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateBeanGraph() {
// PHASE 1: Basic beans with basic type fields
generateBasicBeans();
// PHASE 2: Enrich beans with references to other beans
enrichBasicBeans();
// PHASE 3: Inheritance
createInheritanceGraph();
// PHASE 4: Annotate the beans
annotateBeanGraph();
// PHASE 5: Generate population code
generatePopulationCode();
// PHASE 6: Output the bean graph .java files
outputJavaFiles();
}
COM: <s> generates a bean graph according to the configuration in </s>
|
funcom_train/34589631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unhighlight(String server) {
int i = globalServers.indexOf(server);
int j = localServers.indexOf(server);
if (i >= 0) table.getRowFormatter().removeStyleName(globalRow(i), "highlight");
if (j >= 0) table.getRowFormatter().removeStyleName(localRow(j), "highlight");
}
COM: <s> unhighlight the row corresponding to a particular server </s>
|
funcom_train/12528009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getLoopbackMode() throws SocketException {
checkClosedAndBind(false);
if (impl == null) {
try {
return !netSock.get_MulticastLoopback();
} catch (Throwable t) {
throw new SocketException(t.getMessage());
}
} else
return !((Boolean) impl.getOption(SocketOptions.IP_MULTICAST_LOOP))
.booleanValue();
}
COM: <s> gets the state of the </s>
|
funcom_train/25565795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initView(int index, Field field) {
if(field==null) getFormComponent().addComponent(initEmptyComponent(index));
else getRealForm().addField(field.getName(), initEditor(index, field));
// ComponentContainer panel = initPanel(index, field.getName());
// Component editor = initEditor(index, field);
// panel.addComponent(initNameComponent(index, field, editor));
// panel.addComponent(editor);
// return panel;
}
COM: <s> creation of single component for the given field with a given index </s>
|
funcom_train/48959523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String redirectProject(String project) {
String path = project.substring(9);
if (path.indexOf('/') < 0) {
String id = getIdFromAlias(DefaultProject.FIND_BY_ALIAS, path);
if (hasText(id)) {
return PROJECT_PATH + cipherer.encrypt(id) + ALIAS_PARAM + path;
}
}
return null;
}
COM: <s> generates a valid url with the encrypted project </s>
|
funcom_train/26379630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getReverseVdir() {
switch (this.getVdir()) {
case 0 :
return 2;
case 1 :
return 3;
case 2 :
return 0;
case 3 :
return 1;
case 4 :
return 5;
case 5 :
return 4;
case 6 :
return 9;
case 7 :
return 8;
case 8 :
return 7;
case 9 :
return 6;
case 10 :
return 10;
default :
return 10;
}
}
COM: <s> returns the reverse vdir of this exit </s>
|
funcom_train/51658291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point computeTrueShellSize(Shell shell) {
Point size= shell.getSize();
if ("gtk".equals(SWT.getPlatform())) { //$NON-NLS-1$
/* XXX bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=136332: on GTK, getSize does not include the trim */
Rectangle trim= shell.computeTrim(0, 0, 0, 0);
size.x += trim.width;
size.y += trim.height;
}
return size;
}
COM: <s> returns the outer size of the given shell including trim </s>
|
funcom_train/11024211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecuteWithSimplePrimitivePropertyAndNullValue() {
try {
new BeanPropertyValueChangeClosure("intProperty", null).execute(new TestBean());
fail("Should have thrown an IllegalArgumentException");
} catch (IllegalArgumentException e) {
/* this is what we expect */
}
}
COM: <s> test execute with simple primitive property and null value </s>
|
funcom_train/16748126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFunctionDefinedInAST(String functionName) {
boolean inList = false;
if (functionList != null) {
for (FunctionDeclaration fd : functionList) {
// check if function has a name; anonymous function have non
if (fd.getName() != null) {
if (fd.getName().getIdentifier().equals(functionName))
inList = true;
}
}
}
return inList;
}
COM: <s> this method checks if a given function name </s>
|
funcom_train/786404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDeviation() {
accessCheck();
if ( m_stdev == null && m_dynamic ) {
m_stdev = new Double(
DataLib.deviation(m_table.tuples(), m_field, getMean()));
}
return m_stdev.doubleValue();
}
COM: <s> get the standard deviation of numeric values in the column </s>
|
funcom_train/10914148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printStackTrace(java.io.PrintWriter writer) {
synchronized (writer) {
super.printStackTrace(writer);
if (getException() != null) {
writer.println(EXCEPTION_SEPARATOR);
getException().printStackTrace(writer);
}
if (getRootException() != null) {
writer.println(EXCEPTION_SEPARATOR);
getRootException().printStackTrace(writer);
}
}
}
COM: <s> prints this fop exception and its backtrace to the specified print writer </s>
|
funcom_train/8009357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUseJavaScriptForRegularExpRules(boolean b) {
_useJavaScriptForRegExpRules = b;
try {
HtmlComponentValidator v = getValidator();
//fc 06/11/04: Updated logic to make validate range dependent on
// the value of _useJavaScriptForValidationOnly.
v.setValidateRegExp(!(b && _useJavaScriptForValidationOnly));
} catch (Exception ex) {
}
}
COM: <s> sets whether or not to use javascript for regular expression rules </s>
|
funcom_train/3131027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accepts(boolean v) {
// Check against base
if (!impl.base().accepts(v)) {
return false;
}
// Check all restrictions
Iterator i = impl.iterator();
while (i.hasNext()) {
Restriction r = (Restriction) i.next();
if (!r.accepts(v)) {
return false;
}
}
// All tests have passed
return true;
}
COM: <s> acceptance by a restriction type implies that all of the </s>
|
funcom_train/7345063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String assemblePath(List list) {
if (list == null) {
return null;
}
StringBuffer buf = new StringBuffer();
if (this.is_absolute_path && (path != null && path.length() > 0)) {
buf.append(PATH_DELIM);
}
for (int i = 0; i < list.size(); i++) {
String segment = (String) list.get(i);
if (segment != null) {
buf.append(segment);
buf.append(PATH_DELIM);
}
}
if (this.file != null) {
buf.append(this.file);
}
return buf.toString();
}
COM: <s> assembles a path string from a list of segments </s>
|
funcom_train/14226872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void providerSelectionChanged() {
String name = (String) providers.getSelectedItem();
if (name == null) {
return;
}
addresses.removeAllItems();
String[] provaddresses = getAddresses(name);
if (provaddresses != null) {
for (String address : provaddresses) {
addresses.addItem(address);
}
}
checkOkButton();
}
COM: <s> the user selected another provider </s>
|
funcom_train/29711211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getNextNeighbor(Node node) {
if (!EditValidateUtil.validNode(node)) {
return null;
}
while (node != null && node.getNodeType() != Node.DOCUMENT_NODE
&& node.getNextSibling() == null) {
node = node.getParentNode();
}
return (node != null && node.getNodeType() != Node.DOCUMENT_NODE) ? node
.getNextSibling()
: null;
}
COM: <s> get next sibling or if sibling is null get next neighbor </s>
|
funcom_train/23068737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected InputStream getInputStream(OutputStream outputStream) throws IOException{
outputStream.close();
byte[] bytes = ((ByteArrayOutputStream) outputStream).toByteArray();
//byte[] copy = new byte[bytes.length];
//System.arraycopy(bytes, 0, copy, 0, bytes.length);
InputStream is = new ByteArrayInputStream(bytes);
return is;
}
COM: <s> this method must be paired with the code get raw output stream code </s>
|
funcom_train/9851857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(Note[] notes) {
System.out.println("load: "+ notes.length);
this.notes = notes;
String[] regexSets = new String[notes.length];
for(int _idx = 0; _idx < regexSets.length; _idx++) {
regexSets[_idx] = notes[_idx].regexp;
}
regexListBox.update(-1, regexSets);
update();
}
COM: <s> method updates data about notes </s>
|
funcom_train/49317544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireChange(JComponent c) {
Object[] listeners = _changeListenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ChangeListener.class) {
((ChangeListener) listeners[i + 1]).stateChanged(new ChangeEvent(c));
}
}
}
COM: <s> notify any listeners that a query parameter from a jcombo box has changed </s>
|
funcom_train/34138029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateAccessibilityState() {
mAccessibilityEnabled = (Settings.Secure.getInt(getContentResolver(),
Settings.Secure.ACCESSIBILITY_ENABLED, 0) == 1);
// Reset text navigation when accessibility is disabled.
if (!mAccessibilityEnabled) {
mAction = TextNavigation.ACTION_MOVE;
mGranularity = TextNavigation.GRANULARITY_CHAR;
}
}
COM: <s> updates the current accessibility enabled state </s>
|
funcom_train/10748590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test2() {
try {
Constructor c = Inner.class.getDeclaredConstructor(new Class[0]);
assertNotNull("unexpected null", c);
assertEquals("array length:", 0, c.getParameterTypes().length);
} catch (Exception e) {
fail(e.toString());
}
}
COM: <s> only default constructor which takes no parameters must be returned </s>
|
funcom_train/4194713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onDlgSubscriptionFailure(SubscriberDialog dialog, int code, String reason, Message msg)
{ printLog("onDlgSubscriptionFailure()",LogLevel.MEDIUM);
listener.onPaSubscriptionTerminated(this,dialog.getRemoteName(),reason);
}
COM: <s> when a 300 699 response is received for an subscribe transaction </s>
|
funcom_train/33281481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int jsxGet_rows() {
int rows;
try {
final String s = getDomNodeOrDie().getAttribute("rows");
rows = Integer.parseInt(s);
}
catch (final NumberFormatException e) {
if (getBrowserVersion().hasFeature(BrowserVersionFeatures.GENERATED_174)) {
rows = -1;
}
else {
rows = 2;
}
}
return rows;
}
COM: <s> returns the number of rows in this text area </s>
|
funcom_train/31690071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String asString() throws WebDAVException {
String sXML = null;
try {
Element pageEl = asXML();
XMLPrettyPrint xmlPrint = new XMLPrettyPrint();
sXML = xmlPrint.printNode(pageEl);
} catch (NamespaceClashException e) {
throw new WebDAVException(WebDAVStatus.SC_INTERNAL_SERVER_ERROR,e.getLocalizedMessage());
}
return sXML;
}
COM: <s> returns an xml representation of the code web page code object as </s>
|
funcom_train/21609271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object remove_tail() {
ssLinkedListElement retme = null;
Object retobj = null;
if (last == null)
return null;
retme = last;
if (first == last) {
first = last = null;
} else {
last = last.prev;
last.next = null;
}
num_in_list--;
retobj = retme.obj;
free_lle(retme);
return retobj;
}
COM: <s> removes the tail object from the linked list and returns it </s>
|
funcom_train/26575390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateHomePage(int clientVersion, int protocolVersion, int flagVersion) {
String homePage = "http://ads.edonkey2000.com/ver/" + clientVersion + "." + protocolVersion + "." + flagVersion + ".html";
MessageUtils.trace("Retrieving " + homePage + "\n");
_browser.openURL(homePage);
// buttonStatusChanged();
}
COM: <s> show e donkey version home page based on version of core </s>
|
funcom_train/39786627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doRemove() {
if (components.size() == 0) {
// No components to remove.
return;
}
Component child = (Component) components.get((int) (Math.random() * components.size()));
child.getParent().remove(child);
recursiveRemoveComponentFromList(child);
}
COM: <s> removes a random code component code from the hierarchy </s>
|
funcom_train/20270092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isValidDefineType(JSTypeExpression expression) {
JSType type = expression.evaluate(null, compiler.getTypeRegistry());
return !type.isUnknownType() && type.isSubtype(
compiler.getTypeRegistry().getNativeType(
JSTypeNative.NUMBER_STRING_BOOLEAN));
}
COM: <s> only defines of literal number string or boolean are supported </s>
|
funcom_train/11320623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMockContext() {
Context context = MockContext.initContext();
ServletConfig servletConfig = context.getServletConfig();
ServletContext servletContext = context.getServletContext();
Assert.assertNotNull(context);
Assert.assertNotNull(servletConfig);
Assert.assertNotNull(servletContext);
}
COM: <s> sanity checks for mock context </s>
|
funcom_train/25282736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validate() {
if ((width <= 0) || (height <= 0) || (frame_rate <= 0)
|| (cam_index < 0) || (vid_library == null)
/* || format == null */) // Ignoring format check as it is optional
{
PManager.log.print("Common Configs are not completely configured!",
this, StatusSeverity.ERROR);
return false;
}
return true;
}
COM: <s> checks that all common configurations are set </s>
|
funcom_train/33499160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getStyleValuesForFamily(String familyName) {
if (CoAssertion.ASSERT) CoAssertion.notNull(familyName, "familyName");
Set specs = getSpecsForFamily(familyName);
Set values = new HashSet();
Iterator i = specs.iterator();
while (i.hasNext()) {
CoFontFaceSpec spec = (CoFontFaceSpec) i.next();
values.add(spec.getStyleAttribute()); // Sets only add if object does not already exist in the Set
}
return values;
}
COM: <s> returns the style values available for a specified font family </s>
|
funcom_train/10615623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRefresh_Failure() {
CodeSource cs = new CodeSource(null, (Certificate[])null);
DefaultPolicy policy = new DefaultPolicy(new TestParser(null));
policy.refresh();
assertFalse(policy.getPermissions(cs).elements().hasMoreElements());
}
COM: <s> tests that refresh does not fail on failing parser </s>
|
funcom_train/3368969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateUseToString() {
int i = getModelWrapper().getColumnCount();
if (useToString == null || useToString.length != i) {
useToString = new boolean[i];
}
for (--i; i >= 0; i--) {
useToString[i] = useToString(i);
}
}
COM: <s> updates the use to string mapping before a sort </s>
|
funcom_train/7518220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Procedimento update(Procedimento entity) {
EntityManagerHelper.log("updating Procedimento instance", Level.INFO,
null);
try {
Procedimento result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved procedimento entity and return it or a copy of </s>
|
funcom_train/7579902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPatternDesc(){
NodeList patternNode = xmlDoc.getElementsByTagName(PATTERN_TAG);
Element patternTag = (Element)patternNode.item(0);
Element desc = (Element) patternTag.getElementsByTagName(PAT_DESC_TAG).item(0);
return ((Text)desc.getFirstChild()).getData().trim();
}
COM: <s> returns the description of the pattern from the associated pattern file </s>
|
funcom_train/21888227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getJSplitPane() {
if (jSplitPane == null) {
jSplitPane = new JSplitPane();
jSplitPane.setBounds(new Rectangle(0, 0, 735, 706));
jSplitPane.setDividerLocation(200);
jSplitPane.setRightComponent(getPnl_right());
jSplitPane.setLeftComponent(getPnl_left());
}
return jSplitPane;
}
COM: <s> this method initializes j split pane </s>
|
funcom_train/20349939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unpackTo() {
try {
InputStream in = ClassLoader.getSystemResourceAsStream(getProperty("pkgJar"));
dumpJar(installationDir, new ProgressTrackerStream(in));
}
catch (Exception e) {
notifyError("Installer failed to open: " + e,
"Could not open install file.");
}
}
COM: <s> grab the jar data from the class file and unjar it into the </s>
|
funcom_train/43326006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final static public boolean rmRF(File target) throws IOException {
if ((target==null) || (!target.exists()))
return true;
// delete first, ask questions later (to avoid following symlinks)
if (target.delete())
return true;
if (target.isDirectory()) {
File[] contents = target.listFiles();
if (contents != null) {
for (int i=0; i<contents.length; i++)
rmRF(contents[i]);
}
}
return target.delete();
}
COM: <s> remove a file directory in a manner similar to rm rf </s>
|
funcom_train/32757678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static protected FileFilter getFileFilter(final String[] fileTypes) {
return new FileFilter() {
public boolean accept(java.io.File file) {
String name= file.getName().toLowerCase();
if (file.isDirectory())
return true;
for (int index= 0; index < fileTypes.length; index++) {
if (name.endsWith("." + fileTypes[index]))
return true;
}
return false;
}
public String getDescription() {
return "Supported document";
}
};
}
COM: <s> create a file filter that accepts files of the specified types </s>
|
funcom_train/18504221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void installDocFilter() {
if (docFilter == null)
docFilter = new TextDocumentFilter((SingleColumnWidget)this);
// Installing the document filter
AbstractDocument doc;
if (this.getDocument() instanceof AbstractDocument) {
doc = (AbstractDocument)this.getDocument();
doc.setDocumentFilter(docFilter);
}
}
COM: <s> installs the document filter </s>
|
funcom_train/7510871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onWindowClose() throws Exception {
if (this.searchButton != null) {
logger.trace("Do not call 'onWindowClose', cause 'SearchButton' registered. "
+ "We call this method only after pressing 'SearchButton' or 'ResetSearch'.");
return;
}
// We use lastRowCount for reopen interface on previously selected row
lastRowCount = this.getRowCount();
this.onCloseImpl();
}
COM: <s> method called by </s>
|
funcom_train/45077723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testISO2DateDateTimeAndSecs() {
Date dd = ISODate.ISO2Date("20021225T123015");
Calendar cc = Calendar.getInstance();
cc.setTime(dd);
cc.setTimeZone(c.getTimeZone());
int i = cc.compareTo(c);
assertEquals(0,i);
}
COM: <s> method test iso2 date date time and secs </s>
|
funcom_train/39380115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName(String name) {
if (ACTION_BUTTON.equals(name)) {
String msg = "Invalid name '" + ACTION_BUTTON + "'. This name is "
+ "reserved for use as a control request parameter name";
throw new IllegalArgumentException(msg);
}
super.setName(name);
}
COM: <s> set the name of the control </s>
|
funcom_train/18600154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User verifyToken(String authToken) {
AuthToken token = authTokens.get(authToken);
if (token != null) {
if (token.getToken().equals(authToken)) {
synchronized (this) {
// Update old of authToken
Date now = new Date();
token.setOld(now);
}
return token.getUser();
}
}
return null;
}
COM: <s> verifies an authentication token </s>
|
funcom_train/5437347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addAddress(String ip, String netmask, String broadcast, String destIp) {
NetworkInterface nic = (NetworkInterface)interfaces.lastElement();
NetworkAddress address = new NetworkAddress(ip, netmask, broadcast, destIp);
nic.addAddress(address);
}
COM: <s> adds an address entry to the network interface last added through </s>
|
funcom_train/1068613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Point computeAnchorLocation(Point reference, EditPart editPart) {
// First, translate the reference to the coordinate of the diagram (like shape constraints).
IFigure parentFigure = ((GraphicalEditPart)editPart).getFigure();
Point res = reference.getCopy();
parentFigure.translateToRelative(res);
if(editPart instanceof AnchorableEditPart )
return ((AnchorableEditPart)editPart).getAnchorMngr().getRelativeAnchorPosition(res);
// default, return the reference itself.
return res;
}
COM: <s> compute the anchor location for the provided position and edit part </s>
|
funcom_train/27757431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doCommand(Client cl, Element cmd) {
JFrame window = cl.getWindow();
if(window != null){
window.dispose();
cl.writeResponse(Constants.OK,"<ok/>");
}
else
cl.writeResponse(Constants.ERROR,"<error>No window</error>");
}
COM: <s> command to close the current window </s>
|
funcom_train/1539971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDetermined(ColorPolynomial<C> s) {
ColorPolynomial<C> p = determine(s.getPolynomial());
boolean t = p.equals(s);
if ( !t ) {
System.out.println("not determined s = " + s);
System.out.println("not determined p = " + p);
System.out.println("not determined cond = " + this);
}
return t;
}
COM: <s> is determined colored polynomial </s>
|
funcom_train/18023243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateClients() {
if (active) {
myTableModel.fireTableDataChanged();
if (selectRow != -1 && table.getRowCount()>selectRow ) {
table.setRowSelectionInterval(selectRow, selectRow);
table.scrollRectToVisible(table.getCellRect(selectRow, 0, true));
selectRow =
-1;
}
}
}
COM: <s> update fires off the table data changed and sets the current selected </s>
|
funcom_train/31206318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int readBlock(BufferedInputStream stream, byte[] data, int offset, int blocksize) {
int status;
int nread = 0;
while (nread < blocksize) {
try {
status = stream.read(data, offset + nread, blocksize - nread);
} catch (Exception e) {
return (-1);
}
if (status < 0) {
return (nread);
}
nread += status;
}
return (nread);
}
COM: <s> reads a block of data from url stream </s>
|
funcom_train/8407797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return new StringBuffer(128)
.append('{')
.append((getKey() == this ? "(this Map)" : getKey()))
.append('=')
.append((getValue() == this ? "(this Map)" : getValue()))
.append('}')
.toString();
}
COM: <s> gets the map as a string </s>
|
funcom_train/43592571 | /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 ChainingPoint)) {
return false;
}
ChainingPoint other=(ChainingPoint) o;
return (px == other.px && py == other.py && mapname.equals(other.mapname) && orderX == other.orderX && orderY == other.orderY);
}
COM: <s> useful for test cases </s>
|
funcom_train/50721068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRedMax( float redMax ){
//if( redMax > this.maxValue ) redMax = this.maxValue;
float oldVal = this.redMax;
this.redMax = redMax;
updateMarkings();
firePropertyChange( RED_MAX_PROP, oldVal, redMax );
}
COM: <s> sets the value corresponding to the end of the red band </s>
|
funcom_train/19305924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeChildren(final Bookmark bookmark) {
for (int i = 0; i < bookmark.getChildCount(); i++) {
final Fo child = bookmark.getChildAt(i);
if (child instanceof Bookmark) {
this.makeBookmarkArea((Bookmark) child);
} else if (child instanceof BookmarkTitle) {
this.layoutBookmarkTitle((BookmarkTitle) child);
}
}
}
COM: <s> creates the child areas for this bookmark area </s>
|
funcom_train/8889085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createMainMenu() {
// Setup the main menu
DecorTreeImages treeImages = GWT.create(DecorTreeImages.class);
mainMenu = new Tree(treeImages);
mainMenu.setAnimationEnabled(true);
mainMenu.addStyleName(Showcase.showcaseDecor.css().ApplicationMenu());
}
COM: <s> create the main menu </s>
|
funcom_train/45075003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getLeaves(Vector v) {
if (getNumber() == 0 && !type.equals(b)) {
v.addElement(this);
} else {
Iterator en = elements();
while (en.hasNext()) {
((Trait_) en.next()).getLeaves(v);
}
}
}
COM: <s> put all trait leaves into a vector </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.