__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/26116150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTheseLevels(String sections) {
for (int i = 0; i < sections.length(); i++) {
String s = Character.toString(sections.charAt(i));
int level = Integer.parseInt(s);
if (level < 1 || (level > 6)) {
throw new IllegalArgumentException(String.format(
"The format string needs in the range 1 through 6: found:%d in %s",
i, sections));
}
addLevel(level);
}
}
COM: <s> adds the levels specified in the section string </s>
|
funcom_train/35847113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setMetalThemeState() {
String lafName = (String) lookAndFeel.getSelectedItem();
boolean enabled =
LookAndFeelMgr.getInstance().isThemeCompatibleLookAndFeel(
LookAndFeelMgr.getInstance().getLookAndFeelFromName(lafName));
metalLabel.setEnabled(enabled);
metalTheme.setEnabled(enabled);
}
COM: <s> enables or disables the metal theme controls depending on whether </s>
|
funcom_train/29410561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshTextAlignment(){
TextStyle style = (TextStyle) getPrimaryView().getStyle(
NotationPackage.Literals.TEXT_STYLE);
if (style != null) {
TextAlignment alignment = style.getTextAlignment();
currentAlignment = alignment;
WrappingLabel[] labels = getLabels();
for(int i = 0; i <= labels.length - 1; i++){
setTextAlignment(labels[i], alignment);
}
}
}
COM: <s> refreshs the text alignment </s>
|
funcom_train/8485218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMandatoryAndTooManyOptional() throws InterpreterException {
// fun3(0,1,2,3)
try {
fun3.base_applyInScope(NATTable.atValue(new ATObject[] { NATNumber.ZERO, NATNumber.ONE, NATNumber.atValue(2), NATNumber.atValue(3) }), bindCtx_);
fail("Expected XArityMismatch exception");
} catch(XArityMismatch e) { }
}
COM: <s> tests whether parameter binding fails if given too many optional arguments </s>
|
funcom_train/21634113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadBuffer(final ReadCSV csv) {
for (int i = 0; i < this.buffer.length; i++) {
this.buffer[i] = null;
}
int index = 0;
while (csv.next() && (index < this.bufferSize) && !shouldStop()) {
final LoadedRow row = new LoadedRow(csv);
this.buffer[index++] = row;
}
this.remaining = index;
}
COM: <s> load the buffer from the underlying file </s>
|
funcom_train/16177411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopRun() {
model.generateNewSeed();
model.setup();
runThread = null;
params.setNextModelParameters(model);
finished = !params.hasNext();
runFinished = false;
fireBatchEvent(new BatchEvent(this, BatchEvent.RUN_ENDED));
}
COM: <s> stops an individual run of the simulation increments the parameters </s>
|
funcom_train/47358805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isConsistent() {
if(consistent != null)
return consistent;
if(frozen) {
consistent = isConsistentInternal();
if(log.isLoggable(Level.FINEST)) {
log.finest(new SmtLibPrinter().toString(this, consistent));
}
return consistent;
}
else {
boolean result = isConsistentInternal();
if(log.isLoggable(Level.FINEST)) {
log.finest(new SmtLibPrinter().toString(this, result));
}
return result;
}
}
COM: <s> tests the constraints for consistency satisfiability </s>
|
funcom_train/38157320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeSharedDir() {
Object[] selected = shareDirList.getSelectedValues();
DefaultListModel model = (DefaultListModel) shareDirList.getModel();
for(int i = 0; i < selected.length; i++) {
model.removeElement(selected[i]);
}
}
COM: <s> remove the selected directories from the shared directory list </s>
|
funcom_train/50464346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object newInstance(Class cls, Object[] args) throws ReflectException, InvocationTargetException {
try {
if(args == null) return cls.newInstance();
}
catch(InstantiationException instanceExp) {
throw new ReflectException(instanceExp);
}
catch(IllegalAccessException accessExp) {
throw new ReflectException(accessExp);
}
return newInstance(cls, args, getTypes(args));
}
COM: <s> create a new object instance for the given class and specified arguments </s>
|
funcom_train/25106405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset(){
this.numBlocks = this.numBlocksBck;
this.qStarts = this.qStartsBck.clone();
this.qBlockSizes = this.blockSizesBck.clone();
this.tStarts = this.tStartsBck.clone();
this.tBlockSizes = this.blockSizesBck.clone();
}
COM: <s> reset the alignment blocks which might have been modified by nearby join </s>
|
funcom_train/46191386 | /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 Text))
return false;
Text that = (Text)o;
if (this == that)
return true;
else if (this.length != that.length)
return false;
else
return WritableComparator.compareBytes(bytes, 0, length,
that.bytes, 0, that.length) == 0;
}
COM: <s> returns true iff code o code is a text with the same contents </s>
|
funcom_train/18869643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireLabelProviderChanged(final LabelProviderChangedEvent event) {
Object[] listeners = fListeners.getListeners();
for (int i = 0; i < listeners.length; ++i) {
final ILabelProviderListener l = (ILabelProviderListener) listeners[i];
SafeRunner.run(new SafeRunnable() {
public void run() {
l.labelProviderChanged(event);
}
});
}
}
COM: <s> fires a label provider changed event to all registered listeners </s>
|
funcom_train/33775940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTfDuration () {
if (tfDuration == null) {//GEN-END:|20-getter|0|20-preInit
// write pre-init user code here
tfDuration = new TextField ("Duration", "1000", 32, TextField.NUMERIC);//GEN-LINE:|20-getter|1|20-postInit
// write post-init user code here
}//GEN-BEGIN:|20-getter|2|
return tfDuration;
}
COM: <s> returns an initiliazed instance of tf duration component </s>
|
funcom_train/12563708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkPermission() {
try {
Scheduler scheduler = Scheduler.getScheduler();
MIDletSuite midletSuite = scheduler.getMIDletSuite();
midletSuite.checkForPermission(Permissions.MM_IMAGE_CAPTURING, null);
} catch (InterruptedException e) {
throw new SecurityException(
"Interrupted while trying to ask the user permission");
}
}
COM: <s> check snapshot permission </s>
|
funcom_train/13546695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getName(Class cls) {
if (cls == null) {
return "null";
} // end of if ()
else if (cls.isArray()) {
return getName(cls.getComponentType()) + "[]";
} // end of else if ()
else {
return cls.getName();
} // end of else
}
COM: <s> returns the name of code cls code which is simple except for arrays </s>
|
funcom_train/25973869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(String name, String value){
switch(this.type){
case FieldTypes.TYPE_CLASS:
ClassField cf = (ClassField)this.field;
ClassTextBox ctb = (ClassTextBox)cf.getTextBox();
ctb.setValues(name, value);
break;
case FieldTypes.TYPE_KEYWORD:
KeywordField kf = (KeywordField)this.field;
KeywordTextBox ktb = (KeywordTextBox)kf.getTextBox();
ktb.setValues(name, value);
}
}
COM: <s> special adaption of set text for classification fields </s>
|
funcom_train/34608355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveIndToClass(String ind, int fromCl, int fromI, int to) {
indsInClasses.get(fromCl).remove(fromI);
indsInClasses.get(to).add(ind);
int index = samples.getIndex(ind);
calledGenotypes.set(index, (byte) to);
genotypeChanges.put(ind, (byte) to);
}
COM: <s> moves an ind to another internal genotype class </s>
|
funcom_train/1539605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int record(CriticalPair<C> pair, GenPolynomial<C> p) {
if ( p == null ) {
p = ring.getZERO();
}
pair.setReductum(p);
// trigger thread
if ( ! p.isZERO() && ! p.isONE() ) {
recordCount++;
return recordCount;
}
return -1;
}
COM: <s> record reduced polynomial </s>
|
funcom_train/13955800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void pullAssociations(NSDictionary<String, ? extends WOAssociation> nsdictionary) {
_condition =nsdictionary.objectForKey("condition");
if (_condition == null && getClass() == ERXWOConditional.class) {
throw new WODynamicElementCreationException("<" + getClass().getName() + "> Missing 'condition' attribute in initialization.");
}
}
COM: <s> override to pull the associations for your condition </s>
|
funcom_train/11343016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeDependency(Dependency d) {
Map services = new HashMap();
synchronized (this) {
services.putAll(m_services);
}
Iterator i = services.values().iterator();
while (i.hasNext()) {
((Component) i.next()).remove(d);
}
}
COM: <s> remove a dependency from all instantiated services </s>
|
funcom_train/33872077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRegraProdutoraPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Informacao_regraProdutora_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Informacao_regraProdutora_feature", "_UI_Informacao_type"),
FirPackage.Literals.INFORMACAO__REGRA_PRODUTORA,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the regra produtora feature </s>
|
funcom_train/18191181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getColorRGB(double x, double y) {
int imgx = (int) Math.floor(xRatio * x);
int imgy = (int) Math.floor(yRatio * y);
if(imgx < 0) {
imgx = 0;
}
if(imgx >= imgWidth) {
imgx = imgWidth - 1;
}
if(imgy < 0) {
imgy = 0;
}
if(imgy>= imgHeight) {
imgy = imgHeight - 1;
}
return grid[imgx][imgy];
}
COM: <s> returns the color of a given position on the deployment area </s>
|
funcom_train/13275557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAngleInDegrees(Integer angleInDegrees) {
if (angleInDegrees != this.angleInDegrees) {
Integer oldAngleInDegrees = this.angleInDegrees;
this.angleInDegrees = angleInDegrees;
this.propertyChangeSupport.firePropertyChange(Property.ANGLE_IN_DEGREES.name(), oldAngleInDegrees, angleInDegrees);
}
}
COM: <s> sets the edited angle in degrees </s>
|
funcom_train/44161934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getTables() {
ArrayList arl = new ArrayList();
Collection col;
try {
col = prepareCollection(getReportName());
XMLResource document =
(XMLResource)col.getResource(getReportName() + "_view");
Document doc = makeDocument(document);
arl = this.queryMethods.getTables(doc);
if (col != null) {
col.close();
}
} catch (Exception e) {
e.printStackTrace();
}
return arl;
}
COM: <s> get tables gets view tables </s>
|
funcom_train/42852521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPrevPhase(Phase prev_phase) {
_prev_phase = prev_phase;
if (_prev_phase == null) {
_prev_endpoint = null;
} else if (_prev_phase.getDest() != null) {
_prev_endpoint = _prev_phase.getDest();
} else {
_prev_endpoint = _prev_phase.getSource();
}
}
COM: <s> set the previous phase a little tricky </s>
|
funcom_train/42518873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int removeFullLines() {
boolean repaint = false;
// Remove full lines
for (int y = height - 1; y >= 0; y--) {
if (isLineFull(y)) {
removeLine(y);
removedLines++;
repaint = true;
y++;
}
}
// Repaint if necessary
if (repaint && component != null) {
component.redrawAll();
}
return removedLines;
}
COM: <s> removes all full lines </s>
|
funcom_train/4801209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initializeGame(int width, int height) throws IllegalStateException {
//throw an exception if the game has already been initialized
if (init)
throw new IllegalStateException("The game has already been initialized");
this.width=width;
this.height=height;
initEngine(0, 0);
init=true;
}
COM: <s> initialize the game with specific width and height </s>
|
funcom_train/10865130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(int value) {
// Does key exists?
int index = find(value);
// Yes!
if (index != 0) {
return true;
}
// Is there enough room for a new pair?
if (size == capacity) {
// No? Than grow up!
grow();
}
// Now that everything is set, the pair can be just put inside with no
// worries.
prvt_add(value);
return true;
}
COM: <s> add a mapping int key int value </s>
|
funcom_train/37070811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createTemporaryTable(String temp_table_name) {
try {
java.sql.Statement stmt = this.createStatement();
try {
stmt.execute("create temporary table " +
temp_table_name +
" (id int primary key)");
} finally {
stmt.close();
}
} catch (java.sql.SQLException e) {
Log.warn(this, "exception while generating temporary table:" + e);
throw new RuntimeException(e);
}
}
COM: <s> constructs a temporary table </s>
|
funcom_train/46104982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addRow() {
if (this.canAddRow()) {
for (Iterator<ArrayList<?>> iter = columns.values().iterator();
iter.hasNext();) {
ArrayList<?> spottedArray = (ArrayList<?>) iter.next();
spottedArray.add(null);
}
}
return this.getRowCount();
}
COM: <s> adds a row </s>
|
funcom_train/14273711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int insertTypes(AddressRecord rec) {
record = rec;
int col = 0;
col = super.insertTypes(this.record);
for (int i = 0; i < typelist.length; i++) {
setElementAt(new JSCSVCell(typelist[i]), DATATYPE_ROW, col++);
}
return col;
} // end-method
COM: <s> insert column types from input address record for csv conversion and output </s>
|
funcom_train/35683336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getTargetXsdLocation() {
IPath projectPath = getProject(mTargetContainer).getLocation();
IPath xsdPath = projectPath.append((new Path(mTargetContainer))
.removeFirstSegments(1));
mkDir(xsdPath);
return xsdPath.toOSString();
}
COM: <s> create a valid location for the generated xsd file </s>
|
funcom_train/40866122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInputChainComplexRemove() {
DNAList order = new DNAList();
order.setString("orderNum", "2000");
initialContent.setListRef("ORDER", order);
assertTrue(chain.getRequest().getList("ORDER").contains("orderNum"));
response.removeData("ORDER<>orderNum");
chain.update(response);
assertFalse(chain.getRequest().getList("ORDER").contains("orderNum"));
}
COM: <s> tests removing nested content from a chain </s>
|
funcom_train/44690610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenuItem addMainMenuItem(String[] menuPath, AbstractUiPlugIn plugin) {
JMenuItem menuItem = new JMenuItem(plugin.getName());
return addMainMenuItem(menuPath, plugin, menuItem, null, -1);
}
COM: <s> add a plugin as a jmenu item with enable check conditions </s>
|
funcom_train/21888648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPanelData() {
if (panelData == null) {
FlowLayout flowLayout3 = new FlowLayout();
panelData = new JPanel();
panelData.setLayout(flowLayout3);
flowLayout3.setAlignment(java.awt.FlowLayout.LEFT);
// Class
panelData.add(new CluedHelpLabel("Class: ", "Class is the .."));
panelData.add(getClassText());
panelData.add(new AnnotationButton("class"));
panelData.add(getPanelButtons(), null);
}
return panelData;
}
COM: <s> this method initializes panel data </s>
|
funcom_train/21473296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean variableInputFileExists(String name, String label) {
Iterator it = variableInputSets.iterator();
while (it.hasNext()) {
List variableInputList = (List) it.next();
Iterator ite = variableInputList.iterator();
while (ite.hasNext()) {
GenericFile f = (GenericFile) ite.next();
if (f.getName().equals(name) && f.getLabel().equals(label)) {
return true;
}// if
}// while
}// while
return false;
}
COM: <s> check if an variable input file with this name and label exists </s>
|
funcom_train/5806776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadWorkingReport(KSC_PerformanceReportFactory factory, int index) throws MarshalException, ValidationException {
Report report = factory.getReportByIndex(index);
if (report == null) {
throw new IllegalArgumentException("Could not find report with ID " + index);
}
setWorkingReport(duplicateCastorObject(report, Report.class));
}
COM: <s> loads the indexed report into the working report object </s>
|
funcom_train/19272709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Boolean toBoolean(Object value) throws WrongValueTypeException {
try {
return (Boolean) value;
} catch (ClassCastException e) {
Boolean result = StringUtilImpl.getInstance().parseBoolean(value.toString());
if (result == null) {
throw new WrongValueTypeException(this, Boolean.class);
} else {
return result;
}
}
}
COM: <s> this method gets the given value object as boolean </s>
|
funcom_train/36959370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected URL getStyleSheetURL() {
if (fStyleSheetURL == null) {
Bundle bundle= Platform.getBundle(RubyPlugin.getPluginId());
fStyleSheetURL= bundle.getEntry("/RubydocHoverStyleSheet.css"); //$NON-NLS-1$
if (fStyleSheetURL != null) {
try {
fStyleSheetURL= FileLocator.toFileURL(fStyleSheetURL);
} catch (IOException ex) {
RubyPlugin.log(ex);
}
}
}
return fStyleSheetURL;
}
COM: <s> returns the style sheet url </s>
|
funcom_train/44556618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h) {
imageUpdateY = y;
imageUpdateW = w;
if ((flags & ImageObserver.ERROR) != 0) {
errorLoadingImage = true;
return false;
}
imageLoaded = (flags & (ImageObserver.ALLBITS|ImageObserver.FRAMEBITS|ImageObserver.ABORT)) != 0;
return !imageLoaded;
}
COM: <s> used by image plus to monitor loading of images </s>
|
funcom_train/18110321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getSearchAttValueRadioButton() {
if (searchAttValueRadioButton == null) {
searchAttValueRadioButton = new JRadioButton();
searchAttValueRadioButton.setText("An attribute value");
searchAttValueRadioButton.addActionListener(this);
//searchAttValueRadioButton.setIcon(new ImageIcon(getClass().getResource("/icons/attribute_value.gif")));
}
return searchAttValueRadioButton;
}
COM: <s> this method initializes search att value radio button </s>
|
funcom_train/194341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToolBar getJJToolBarBar() {
if (toolBar == null) {
toolBar = new JToolBar();
toolBar.setFloatable(false);
toolBar.add(getStartButton());
toolBar.add(getRestartButton());
toolBar.add(getPauseButton());
toolBar.add(getResumeButton());
toolBar.add(getStopButton());
toolBar.add(getOptionsButton());
toolBar.add(getAboutButton());
toolBar.add(getExitButton());
}
return toolBar;
}
COM: <s> this method initializes j jtool bar bar </s>
|
funcom_train/6451539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean dropGoal(Trigger te, Unifier un) {
IntendedMeans im = getIM(te, un);
if (im != null) {
// remove the IMs until im-1
while (peek() != im) {
pop();
}
pop(); // remove im
return true;
}
return false;
}
COM: <s> remove all ims until the im with trigger te </s>
|
funcom_train/573527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRecords( ResultSet cursor, JTable table ) {
setRecords( cursor );
try {
ResultSetMetaData m = cursor.getMetaData();
headers = new Object[m.getColumnCount()];
for (int i = 1; i <= headers.length; i++) {
headers[i-1] = m.getColumnLabel(i);
}
} catch (Exception e) {
e.printStackTrace();
}
setColumn( headers, table );
}
COM: <s> scan column size and headers from resultset </s>
|
funcom_train/11344687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getObjectValue(BundleContext context) {
if (m_value == null) {
return null;
}
Class type = null;
try {
type = Property.computeType(m_type, context);
return Property.create(type, m_value);
} catch (ConfigurationException e) {
return m_value; // Cannot create the object.
}
}
COM: <s> gets the object value of the current immutable property </s>
|
funcom_train/38495667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkEnumAttr(Attribute attr, String name, String optionality) {
Assert.assertEquals(name, attr.getAttributeName());
Assert.assertEquals(Attribute.TYPE_ENUMERATION, attr.getAttType());
//CR: TODO: This doesn't sound intuitive!
Assert.assertNull(attr.getDataType());
checkNonFixedOptionality(attr, optionality);
}
COM: <s> cr java doc add javadoc for enum attribute test check enum attr </s>
|
funcom_train/5082071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ImageCache getImageCache() {
ImageCache cache = globalImageCache;
if (cache == null) {
globalImageCache = cache = new ImageCache();
Display display = Display.getDefault();
if (display != null) {
display.disposeExec(new Runnable() {
public void run() {
if (globalImageCache != null) {
globalImageCache.dispose();
globalImageCache = null;
}
}
});
}
}
return cache;
}
COM: <s> returns the image cache </s>
|
funcom_train/21112508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(String ident){
return "SEQUENCE { -- AttributeCertificate --\n "+ident+
"acinfo = "+acinfo.toString(ident+" ")+",\n "+ident+
"signatureAlgorithm = "+signatureAlgorithm.toString()+",\n "+ident+
"signatureValue = "+signatureValue.getBinaryString()+"\n"+ident+"}";
}
COM: <s> this method will use the specified indent to output the ac text </s>
|
funcom_train/41344839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean preTranslate(float dx, float dy) {
// create a matrix that will be multiply by this
Matrix m = new Matrix(new float[] { 1, 0, dx, 0, 1, dy, 0, 0, 1 });
m.addTransform(this.mValues);
System.arraycopy(m.mValues, 0, mValues, 0, 9);
return true;
}
COM: <s> preconcats the matrix with the specified translation </s>
|
funcom_train/31192827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object caseDfa( Dfa d ) {
System.err.println("<-- Dfa ["+ d.toString() +"]\t" +
"pointer p: " + d.p + " containing ");
printDfa( d.p );
System.err.println("-->");
return null;
}
COM: <s> the visited object is an dfa </s>
|
funcom_train/26218912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void randomize(Random rand) {
// random bias
b = SNVector.gaussianNoise(size(), rand);
// random incoming sigma weights
for (Enumeration i = in.elements() ; i.hasMoreElements() ;) {
BPConnection c = (BPConnection)i.nextElement();
c.randomize(rand);
}
// existing squared errors are invalid
sqrerrs = null;
}
COM: <s> randomizes biases and weights on this layer to values normally </s>
|
funcom_train/34608868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDelete(int num, boolean isDelete) throws IndexOutOfBoundsException {
ArrayList<Mail> list = this.mailList;
if (num < 1 || num > list.size()) {
throw new IndexOutOfBoundsException();
}
Mail m = list.get(num - 1);
m.setState(isDelete);
list.set(num - 1, m);
this.setMailList(list);
}
COM: <s> mark the mail state </s>
|
funcom_train/8959564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException{
//Constant
if (isConstant()){
Data = initializeConstant(Type, ConstantData);
return;
}
//Array
if (isArray()){
initializeArray();
return;
}
//Not an Array, or Constant
Data = initializeType(Type);
}
COM: <s> initializes the member and instantiates an object regardless of type </s>
|
funcom_train/11647576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerMultiMapping(InputSource mapping) throws IntrospectionException, IOException, SAXException {
Class[] mappedClasses = introspector.register(mapping);
for (int i=0, size=mappedClasses.length; i<size; i++)
{
Class beanClass = mappedClasses[i];
if ( ! registeredClasses.contains( beanClass ) ) {
register(beanClass, null);
}
}
}
COM: <s> p registers a class with a multi mapping </s>
|
funcom_train/32723295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGetterSetter(GetterSetter getterSetterImpl) {
if (getterSetterImpl != null && getterSetterImpl instanceof java.io.Serializable) {
this.readMethodName = null; // Dereference this; not needed.
this.writeMethodName = null; // Ditto.
this.getterSetterImpl = getterSetterImpl;
}
}
COM: <s> sets the implementation of code getter setter code </s>
|
funcom_train/23846173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildAlphaTexture() {
BufferedImage bi = new BufferedImage(128, 128, BufferedImage.TYPE_BYTE_GRAY);
drawOnImage(bi);
ImageComponent2D img_comp =
new ImageComponent2D(ImageComponent2D.FORMAT_CHANNEL8,
bi,
true,
false);
Texture2D texture = new Texture2D(Texture2D.BASE_LEVEL,
Texture.ALPHA,
128,
128);
texture.setImage(0, img_comp);
appearance.setTexture(texture);
}
COM: <s> build up the texture with pure alpha </s>
|
funcom_train/1304504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getUrl() {
if (_url == null && urlString != null) {
final String url = (urlString.indexOf("://") < 0) ? "http://" + urlString : urlString;
try {
this._url = new URL(url);
}
catch (MalformedURLException e) {
this._error = e;
}
}
return _url;
}
COM: <s> get the url </s>
|
funcom_train/3576607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenuItem getGuardarTacticaComo() {
if (guardarTacticaComo == null) {
try {
guardarTacticaComo = new JMenuItem();
guardarTacticaComo.setName("guardarTacticaComo");
guardarTacticaComo.setText(GestorIdiomasFtol.getInstance().getString(FtolLangConstants.MEN_GUARDAR_TACTICA_COMO));
guardarTacticaComo.setActionCommand("guardartacticacomo");
} catch (Throwable ivjExc) {
handleException(ivjExc);
}
}
return guardarTacticaComo;
}
COM: <s> returns the guardar tactica como </s>
|
funcom_train/26020443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void markChatMessageAsRead(String msgId, boolean isRead){
ContentValues values = new ContentValues();
if (isRead){
values.put(RichMessagingData.KEY_STATUS, EventsLogApi.STATUS_DISPLAYED);
}else{
values.put(RichMessagingData.KEY_STATUS, EventsLogApi.STATUS_RECEIVED);
}
cr.update(databaseUri,
values,
RichMessagingData.KEY_MESSAGE_ID +" = \""+msgId+"\"",
null);
}
COM: <s> a received message has been read </s>
|
funcom_train/1883172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextPane getCommentsTextArea() {
if (this.commentsTextArea == null) {
this.commentsTextArea = new JTextPane();
this.commentsTextArea.setPreferredSize(new Dimension(200, 45));
this.commentsTextArea.setSize(new Dimension(200, 45));
// commentsTextArea.setLineWrap(true);
// commentsTextArea.setWrapStyleWord(true);
this.commentsTextArea.setEditable(false);
}
return this.commentsTextArea;
}
COM: <s> this method initializes comments text area </s>
|
funcom_train/41332661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Shape createArrowUp(final double x, final double y, final double w, final double h) {
path.reset();
path.moveTo(x, y + h);
path.lineTo(x + w / 2, y);
path.lineTo(x + w, y + h);
path.closePath();
return path;
}
COM: <s> return a path for an arrow pointing up </s>
|
funcom_train/42200296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public A_TextDescriptor getDescriptor(Object object) {
A_TextDescriptor descriptor = null;
if(object != null) {
Class<?> c = object.getClass();
descriptor = descriptors.get(c);
if(descriptor == null) {
while((c = c.getSuperclass()) != null) {
if((descriptor = descriptors.get(c)) != null)
break;
}
}
}
if(descriptor == null)
descriptor = descriptors.get(null);
return descriptor;
}
COM: <s> returns the descriptor that is associated with the object </s>
|
funcom_train/44572471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JLocalVariable lookupLocalVariable(String ident) {
JLocalVariable var
= ((CFlowControlContext)delegee).lookupLocalVariable(ident);
if( var != null ) {
long modifiers = var.modifiers();
if( hasFlag(modifiers, ACC_GHOST) && !JmlContext.inSpecScope()) {
// ghost variables are not in scope unless in an
// annotation such as a set, assert, or assume statement.
return null;
}
}
return var;
}
COM: <s> returns the variable referred to by the given name in this </s>
|
funcom_train/46691007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addClassNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Instance_className_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Instance_className_feature", "_UI_Instance_type"),
MMUnitPackage.Literals.INSTANCE__CLASS_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the class name feature </s>
|
funcom_train/37190180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean tableExists(String databaseName, String schemaName, String tableName) throws SQLException {
final Vector tableList = getTableList(databaseName, schemaName);
boolean tableExists = false;
for(int i = 0; i < tableList.size(); i++) {
if(((String)(tableList.get(i))).equalsIgnoreCase(tableName)) {
tableExists = true;
break;
}
}
return tableExists;
}
COM: <s> checks to see if a table exists </s>
|
funcom_train/8147096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert( HeapNode node ) {
int preinsertsize = binarytree.size();
this.binarytree.add( node );
// Fix up the heap due to the addition of a new node in the heap.
// Note that we do not add 1, because a List is 0-based and the
// method expects a 0-based index.
this.upHeap( preinsertsize );
}
COM: <s> add a new item into the heap </s>
|
funcom_train/278442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPdbFile(File pdbFile) {
if (pdbFile.exists() && !pdbFile.canWrite()) {
addError("{0} exists but is not writable", new Object[] { pdbFile.getAbsolutePath() });
}
this.pdbFile = pdbFile;
}
COM: <s> sets the pdb file </s>
|
funcom_train/10585585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enterScope(ContentHandler handler) throws SAXException {
this.usesScopes = true;
Entry current = this.lastEntry;
while (current != null && current.closedScopes == 0) {
handler.startPrefixMapping(current.prefix, current.uri);
current = current.previous;
}
this.lastEntry.closedScopes++;
this.lastDeclaredEntry = null;
}
COM: <s> start all declared mappings of the current scope and enter a new scope </s>
|
funcom_train/3991737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long create_audio_sample_entry_atom(DataStream bitstream) throws IOException {
bitstream.skipBytes(6);
int dataReferenceIndex = (int) bitstream.readBytes(2);
bitstream.skipBytes(8);
int channelCount = (int) bitstream.readBytes(2);
int sampleSize = (int) bitstream.readBytes(2);
bitstream.skipBytes(4);
int timeScale = (int) bitstream.readBytes(2);
bitstream.skipBytes(2);
readed += 28;
MP4Atom child = MP4Atom.createAtom(bitstream);
this.children.addElement(child);
readed += child.getSize();
return readed;
}
COM: <s> loads audio sample entry atom from the input bitstream </s>
|
funcom_train/38808705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void classDef() {
startComment();
addComment("Please put a description of your test here.");
addComment("");
addComment("@author unascribed");
addComment("@version 0.1");
endComment();
println("import junit.framework.*;");
if (sourcePackage != null)
println("import " + sourcePackage + ".*;");
println();
println(new StringBuffer("public final class ").append(className)
.toString());
println("extends junit.framework.TestCase");
println("{");
}
public void close() {
reset();
println("}");
super.close();
}
COM: <s> write out the class definition </s>
|
funcom_train/31929527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendConditionalBranch(OPT_Instruction conditional, int targetPC, Laziness targetLaziness) {
if (DBT.VerifyAssertions) DBT._assert(IfCmp.conforms(conditional) || IfCmp2.conforms(conditional));
appendStaticBranch(conditional, targetPC, targetLaziness, BranchType.DIRECT_BRANCH, -1);
}
COM: <s> appends the conditional branch instruction code conditional code that jumps to the address </s>
|
funcom_train/11023502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddPropertyRestricted2() {
dynaClass.setRestricted(true);
assertTrue("MutableDynaClass is restricted", dynaClass.isRestricted());
try {
dynaClass.add(testProperty, String.class);
fail("add(name, type) did not throw IllegalStateException");
} catch (IllegalStateException expected) {
// expected result
}
}
COM: <s> test add name type method when restricted is set to true </s>
|
funcom_train/35717062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMouseLost() {
if (fMouseLostWhileComputing || fShellDeactivatedWhileComputing)
return true;
if (fSubjectControl != null && !fSubjectControl.isDisposed()) {
Display display= fSubjectControl.getDisplay();
Point p= display.getCursorLocation();
p= fSubjectControl.toControl(p);
if (!fSubjectArea.contains(p) && !fHoverArea.contains(p))
return true;
}
return false;
}
COM: <s> determines whether the computed information is still useful for presentation </s>
|
funcom_train/39533900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemsAction(Point2D point){
//getting the selection item corresponding to this point
SelectionItem item=getSelectionItem(point);
if(item!=null){
//notifying the shape that handles the element
//corresponding to the item that an items action has occured//
//getting the element of the selection item
Element element=item.getElements().iterator().next();
//getting the shape module corresponding to the element
AbstractShape shape=ShapeToolkit.getShapeModule(element);
if(shape!=null){
//notifying the shape module that an item action occured
shape.notifyItemsAction(svgHandle, item);
}
//refreshing the selection
refreshSelection(true);
}
}
COM: <s> notifies that a selection items action has occured </s>
|
funcom_train/3100368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllListeners() {
Object[] listenerArray = listeners.getListenerList();
for (int i = 0, size = listenerArray.length; i < size; i += 2) {
listeners.remove((Class)listenerArray[i],
(EventListener)listenerArray[i+1]);
}
}
COM: <s> removes all listeners from this sub lworker </s>
|
funcom_train/35156761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(int index, Vec2f value) throws IndexOutOfBoundsException {
if (index >= size()) {
throw new IndexOutOfBoundsException("" + index + " >= " + size());
}
int base = index * ELEMENT_SIZE;
FloatBuffer buf = data;
buf.put(base, value.x());
buf.put(base + 1, value.y());
}
COM: <s> stores the given vec2f at the given index </s>
|
funcom_train/38995095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPJustifiable(DungTheory theory){
for(Argument argument: theory){
for(Argument attacker: theory.getAttackers(argument))
if(this.probability(argument).doubleValue() > 1 - this.probability(attacker).doubleValue())
return false;
if(theory.getAttackers(argument).isEmpty())
if(this.probability(argument).doubleValue() != 1)
return false;
}
return true;
}
COM: <s> checks whether this probabilistic extension is p justifiable i </s>
|
funcom_train/32018732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateComponents(GraphView newView){
graphView = newView;
getMetaDataPanel().updateView(newView);
getSearchPanel().updateView(newView);
getLegendPanel().updateView(newView);
addKeyListeners(graphView);
addMouseListeners(graphView);
}
COM: <s> assigns a new graph view to the panels that interact with the graph </s>
|
funcom_train/42421660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WebHookConfig (String url, Boolean enabled, Integer stateMask, String payloadFormat){
int Min = 1000000, Max = 1000000000;
Integer Rand = Min + (int)(Math.random() * ((Max - Min) + 1));
this.uniqueKey = Rand.toString();
this.extraParameters = new TreeMap<String,String>();
this.setUrl(url);
this.setEnabled(enabled);
this.setStatemask(stateMask);
this.setPayloadFormat(payloadFormat);
}
COM: <s> web hooks config constructor </s>
|
funcom_train/28984094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackSymmetricEncryptionForm () {
if (backSymmetricEncryptionForm == null) {//GEN-END:|153-getter|0|153-preInit
// write pre-init user code here
backSymmetricEncryptionForm = new Command ("Back", Command.BACK, 0);//GEN-LINE:|153-getter|1|153-postInit
// write post-init user code here
}//GEN-BEGIN:|153-getter|2|
return backSymmetricEncryptionForm;
}
COM: <s> returns an initiliazed instance of back symmetric encryption form component </s>
|
funcom_train/18784104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean validateOptionsGroup() {
// if (chooseImportsButton.getSelection()) {
// TableItem[] items = transfersTable.getItems();
// for (int i = 0; i < items.length; i++) {
// TableItem item = items[i];
// if (item.getChecked()) {
// return true;
// }
// }
// currentMessage = getNoOptionsMessage();
// return false;
// }
return true;
}
COM: <s> returns whether this pages options groups controls currently all </s>
|
funcom_train/25291519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getDecayTime() {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_DECAY_TIME_READ))
throw new CapabilityNotSetException(Ding3dI18N.getString("AuralAttributes29"));
return ((AuralAttributesRetained)this.retained).getDecayTime();
}
COM: <s> retrieve decay time </s>
|
funcom_train/37867858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseParameters() {
Map map = servletRequest.getParameterMap();
for (Object one : map.keySet()) {
// Get key and corresponding values
String key = (String) one;
// Get values belonging to the key
String[] values = (String[]) map.get(one);
// Write keys and values
for (String value : values) {
addParameter(params, key, decode(value));
}
}
}
COM: <s> parses the url encoded parameters </s>
|
funcom_train/44223063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createConfigFiles() throws Exception {
if (!this.isCancel) {
String path = this.getTargetAtlasSetXMLPath();
this.writeXmlFile(this.AtlasSetDOM, path);
this.completeTaskLength++;
path = this.getTargetAtlasXMLPath(true);
this.writeXmlFile(this.AtlasDOM, path);
this.completeTaskLength++;
}
}
COM: <s> create the xml configuration files for the atlas set using the </s>
|
funcom_train/40653601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CartesianVector getCartesianLocation() {
if (inRoads.isEmpty() && outRoads.isEmpty()) {
return null;
}
RoadSegment oneRoadsegment = inRoads.isEmpty() ? outRoads.get(0) : inRoads.get(0);
return oneRoadsegment.getEndLocation(oneRoadsegment.getJunctionIndex(this));
}
COM: <s> get the location of junction in x y coordinates </s>
|
funcom_train/50447044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAttributeList(String xpath) throws InvalidXPathException {
NodeList nl = selectNodeList(xpath);
for (int i = 0; i < nl.getLength(); i++) {
if (nl.item(i).getNodeType() == Node.ATTRIBUTE_NODE) {
removeAttribute((Attr) nl.item(i));
}
}
}
COM: <s> removes attributes specifies by xpath </s>
|
funcom_train/43098175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object buildCollaboration(Object handle) {
if (!(handle instanceof MNamespace)) {
throw new IllegalArgumentException("Argument is not a namespace");
}
MNamespace namespace = (MNamespace) handle;
MCollaboration modelelement =
(MCollaboration) createCollaboration();
modelelement.setNamespace(namespace);
modelelement.setName("newCollaboration");
modelelement.setAbstract(false);
return modelelement;
}
COM: <s> builds a default collaboration not attached to a classifier </s>
|
funcom_train/3946429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toTable() {
String table = "";
ArrayList al = tree.getElements();
Iterator it = al.iterator();
StatisticDataContainer sdc;
while (it.hasNext()) {
sdc = (StatisticDataContainer)it.next();
table += "<tr><td>" + sdc.getText() + "</td><td>" + sdc.getNumber() + "</td><td>" + sdc.getFalures() +"</td></tr>";
}
return table;
}
COM: <s> generates a html conform table with the statistic data </s>
|
funcom_train/48406799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLevelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MaturityElement_level_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MaturityElement_level_feature", "_UI_MaturityElement_type"),
SpemxtcompletePackage.eINSTANCE.getMaturityElement_Level(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the level feature </s>
|
funcom_train/40536256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStartsWith() {
String haystack = "abcdefghi";
assertTrue(haystack.startsWith("abc"));
assertTrue(haystack.startsWith("bc", 1));
assertTrue(haystack.startsWith(haystack));
assertFalse(haystack.startsWith(haystack + "j"));
}
COM: <s> this method tests code starts with code </s>
|
funcom_train/29617547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setBounds(1, 1, 389, 240);
jScrollPane.setViewportView(getJTextArea());
jScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
}
return jScrollPane;
}
COM: <s> this method initializes j scroll pane </s>
|
funcom_train/22065313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(ServletContext ctx) {
// try {
// InputStream in = ctx
// .getResourceAsStream(ResourceConfigReader.CONFIG_FILE);
// config = ResourceConfigReader.getFactory().parse(in);
// } catch (Exception e) {
// LOG.error("Unable to parse resource config " + e.getMessage(), e);
// throw new DriverConfigurationException(e);
// }
}
COM: <s> initialization lifecycle method </s>
|
funcom_train/27784169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void copyIUserToUserForm(IUser user, UserForm userForm) {
userForm.setId(user.getId());
userForm.setEmail(user.getEmail());
userForm.setPassword(user.getPassword());
userForm.setVerifyPassword(user.getPassword());
userForm.setUserName(user.getUserName());
}
COM: <s> copies all the attributes from the iuser to the user form </s>
|
funcom_train/10274782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Path createClasspath() {
// JavaHelp release notes say jhtools.jar is enough, but class NoClassDefFoundError
// on javax.help.search.IndexBuilder when I tried it...
if (classpath == null) {
classpath = new Path(getProject());
}
return classpath.createPath();
}
COM: <s> set the location of samp jhall </s>
|
funcom_train/18496967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectionChanged(IAction action, ISelection selection) {
projects.clear();
if (selection instanceof IStructuredSelection) {
for (Iterator i = ((IStructuredSelection)selection).iterator(); i.hasNext(); ) {
Object object = i.next();
if (object instanceof IProject)
projects.add(object);
}
}
}
COM: <s> cache the projects during selection </s>
|
funcom_train/39106591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showCard(String name) {
int nChildren = getComponentCount();
for (int i = 0; i < nChildren; i++) {
Component child = getComponent(i);
if (child.getName().equals(name) && !child.isVisible()) {
showCard(child);
break;
}
}
}
COM: <s> shows the card with the specified name </s>
|
funcom_train/23731148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchAllPositions() {
return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_SHEEPID, KEY_LAT,
KEY_LON, KEY_TIMESTAMP, KEY_ROUTE_ID, KEY_ROUTE_DESC}, null, null, null, null, null);
}
COM: <s> return a cursor over the list of all positions in the database </s>
|
funcom_train/1304614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStripHtmlFormatting() {
assertEquals("foo bar", XmlFactory.stripHtmlFormatting("<a href=\"foo.com\">foo</a> <a href=\"bar.com\">bar</a>"));
assertEquals("foo bar", XmlFactory.stripHtmlFormatting("foo bar"));
}
COM: <s> test stripping html formatting from concatenated html strings </s>
|
funcom_train/45231948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextPane getTxpNoteInterno() {
if (txpNoteInterno == null) {
txpNoteInterno = new JTextPane();
txpNoteInterno.setText(scheda.getNoteUsoInterno());
if(modality == mode.view){
txpNoteInterno.setEditable(false);
}
txpNoteInterno.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent e) {
scheda.setNoteUsoInterno(txpNoteInterno.getText());
}
});
}
return txpNoteInterno;
}
COM: <s> this method initializes txp note interno </s>
|
funcom_train/11662995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDepth() {
String value = httpRequest.getHeader("Depth");
int depth = -1;
if ("0".equals(value)) {
depth = 0;
} else if ("1".equals(value)) {
depth = 1;
} else if (value == null || "infinity".equals(value)) {
depth = -1;
}
return depth;
}
COM: <s> retrieves depth header value from http request </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.