__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/24536168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command createAddCommand(EditPart childEditPart, EditPart before) {
// We need to create a constraint and send this and the child over to the container policy.
Object child = childEditPart.getModel();
return helper.getAddChildrenCommand(Collections.singletonList(child), Collections.singletonList(null), before != null ? before.getModel() : null).getCommand();
}
COM: <s> the child editpart is about to be added to the parent </s>
|
funcom_train/37592877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh(Highlighter.HighlightPainter p ) {
this.remove();
HighlightInfo newHighlight = addHighlight(getStartOffset(), getEndOffset(), p);
_painter = p;
// turn this HighlightInfo object into the newHighlight
_highlightTag = newHighlight.getHighlightTag();
}
COM: <s> refreshes this highlight info object obtaining a new highlighter </s>
|
funcom_train/43612687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasSkipLoop(String label) {
SMEdge edge;
Iterator it = outgoing.iterator();
while(it.hasNext()) {
edge = (SMEdge)it.next();
if(edge.isSkipEdge() && (label==ANY_LABEL || label.equals(edge.getLabel()))) {
return true;
}
}
return false;
}
COM: <s> determines whether there exists a skip loop with the given label </s>
|
funcom_train/12520906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) {
if (this.options.verbose) {
this.out.println(
Messages.bind(Messages.compilation_loadBinary, new String(binaryType.getName())));
// new Exception("TRACE BINARY").printStackTrace(System.out);
// System.out.println();
}
lookupEnvironment.createBinaryTypeFrom(binaryType, packageBinding, accessRestriction);
}
COM: <s> add an additional binary type </s>
|
funcom_train/37446411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList RetrieveAccDes () throws IntactException {
this.ExecFinalCommand(true);
// if (srsError == false) {
// parsing
ArrayList acDes = resultWgetzQuery.ResultParsingTableFile (SeqIdConstants.PARSING_TABLE_WGETZ_AC);
resultWgetzQuery.DeleteFile();
return acDes;
// }
// else
// return null;
}
COM: <s> wgetz execution parsing of the wgetz output file </s>
|
funcom_train/45867523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawCircle(Posn center, int radius, Color color) {
if (radius <= 0)
return;
if (color == null)
color = new Color(0, 0, 0);
this.drawShape(new Ellipse2D.Double(center.x - radius,
center.y - radius,
2 * radius,
2 * radius),
color, false);
}
COM: <s> p draws a circle in this panel p </s>
|
funcom_train/16677389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireSelectionEvent() {
ValueChangedEvent valueChangedEvent = new ValueChangedEvent(this, value);
for (ValueChangedListener listener : listeners) {
listener.valueChanged(valueChangedEvent);
}
Event event = new Event( );
event.display = this.getDisplay( );
event.text = Double.toString(this.getSelectionDouble( ));
event.widget = this;
event.type = SWT.Selection;
for (Listener listener : selectionListeners) {
listener.handleEvent(event);
}
}
COM: <s> fires an value changed event for all registered listeners </s>
|
funcom_train/17984268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNavigating(Component comp, Collection active) {
for (Iterator i=active.iterator();i.hasNext();) {
Component c = (Component)i.next();
if (SwingUtilities.isDescendingFrom(c, comp)) {
return true;
}
}
return false;
}
COM: <s> a tabbed pane should stay active if were over one of its panes </s>
|
funcom_train/2586872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsSerializable() {
assertTrue(SerialUtilities.isSerializable(Color.class));
assertTrue(SerialUtilities.isSerializable(ColorUIResource.class));
assertFalse(SerialUtilities.isSerializable(GradientPaint.class));
assertFalse(SerialUtilities.isSerializable(TexturePaint.class));
}
COM: <s> tests the is serializable class method for some common cases </s>
|
funcom_train/28722184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addKeyboard(String name, String entries, String font) {
if (name == null || name.trim().length() == 0) {
return;
}
if (fKeyboardNames.indexOf(name.trim()) >=0)
return;
fKeyboardNames.add(name.trim());
fKeyboardEntries.add(entries.trim());
fKeyboardFontNames.add(font);
fKeyboardScSyMaps.add(new HashMap<String, String>());
if (keyboardCombo != null && !keyboardCombo.isDisposed()) {
keyboardCombo.add(name.trim());
}
isDirty = true;
}
COM: <s> adds a new keyboard to this code keyboard tool code </s>
|
funcom_train/37144835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColumnControlVisible(boolean visible) {
if (isColumnControlVisible() == visible)
return;
boolean old = isColumnControlVisible();
if (old) {
unconfigureColumnControl();
}
this.columnControlVisible = visible;
if (isColumnControlVisible()) {
configureColumnControl();
}
firePropertyChange("columnControlVisible", old, !old);
}
COM: <s> sets the column control visible property </s>
|
funcom_train/40876339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BufferedImage grafitiTextOnImage(BufferedImage uploadImage) {
Graphics2D g2d = uploadImage.createGraphics();
for (int row = 0; row < 10; row++) {
String output = null;
g2d.setFont(new Font("SansSerif", Font.BOLD, 16));
g2d.drawString(output, 5, (row + 1) * 20);
}
return uploadImage;
}
COM: <s> and scrawl the text on the image in 10 rows of 20 chars </s>
|
funcom_train/27818201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int calculatePreferedRowHeight(int row) {
int pref = 0;
int column;
for (column = 0; column < dim[COLUMN]; column++)
if (grid[column][row] != null) {
int height = grid[column][row].getPreferedHeight();
if (pref < height) pref = height;
}
return pref;
}
COM: <s> calculates the prefered height for a row </s>
|
funcom_train/19326409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float traitElevation(final FObj fobj, final FoContext context) {
final PdElevation property = (PdElevation) getProperty(
FoProperty.ELEVATION);
if (property != null) {
return property.getValue(context, fobj);
}
return PdElevation.getValueNoInstance(context, fobj);
}
COM: <s> returns the elevation property </s>
|
funcom_train/40463518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appy_transform(Transform trans) {
Vector3f tmp = new Vector3f();
Vector3f center = new Vector3f();
center.add(max, min);
center.scale(0.5f);
Vector3f extends_ = new Vector3f();
extends_.sub(max, center);
// Compute new center
trans.transform(center);
Vector3f textends = new Vector3f();
trans.basis.getRow(0, tmp);
tmp.absolute();
textends.x = extends_.dot(tmp);
trans.basis.getRow(1, tmp);
tmp.absolute();
textends.y = extends_.dot(tmp);
trans.basis.getRow(2, tmp);
tmp.absolute();
textends.z = extends_.dot(tmp);
min.sub(center, textends);
max.add(center, textends);
}
COM: <s> apply a transform to an aabb </s>
|
funcom_train/10231292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAll() {
synchronized (m_serviceDatabase) {
/* we need exclusive access to the database */
m_serviceDatabase.clear();
m_timeoutList.removeAllElements();
}
/* database was cleared -> notify the observers */
setChanged();
notifyObservers(new DatabaseMessage(DatabaseMessage.ALL_ENTRIES_REMOVED));
}
COM: <s> removes all entries from the database </s>
|
funcom_train/1242095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeBlocks(List featureList) throws IOException {
writeSectionStart("BLOCKS");
// static blocks (model space and paper space)
writeModelSpaceBlock();
writePaperSpaceBlock();
// blocks computed from the feature list
// (complex geometries)
writeEntityBlocks(featureList);
writeSectionEnd();
}
COM: <s> writes the blocks section </s>
|
funcom_train/625759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean initializeLog4J() {
// get log configuration file location
String l = config.getProperty(PipeService.LOGCONFIG,
de.tuberlin.cs.cis.eve.model.adapter.MDR.Constants.LOG_CONFIG_FILE);
if (!PipeService.checkFileExists(l)) {
// log file not found
log.warning("Specified log config file does not exist: " + l); //$NON-NLS-1$
return false;
}
return true;
}
COM: <s> utility function that initialized the logging subsystem </s>
|
funcom_train/25143279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testbug30851() throws Exception {
Connection padConn = getConnectionWithProps("padCharsWithSpace=true");
try {
createTable("bug30851", "(CharCol CHAR(10) DEFAULT NULL)");
this.stmt.execute("INSERT INTO bug30851 VALUES (NULL)");
this.rs = padConn.createStatement().executeQuery(
"SELECT * FROM bug30851");
this.rs.first();
String strvar = this.rs.getString(1);
assertNull("Should be null", strvar);
} finally {
if (padConn != null) {
padConn.close();
}
}
}
COM: <s> tests fix for bug 30851 npe with null column values when </s>
|
funcom_train/51618374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getSelectedPossValue( Object value ) {
//get the permitted values
AbstractList permittedValues = (AbstractList)d.getBinding().getValue();
//there are restrictions: ensure the value is valid
int indexOn = 0;
for( Object permittedValue : permittedValues ) {
if( value.equals( permittedValue ) )
return indexOn;
indexOn += 1;
}
//not found
return -1;
}
COM: <s> gets the index of the possible value which is selected </s>
|
funcom_train/9082441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String firstDescription() {
for (OperationIllFormed v : operationIllFormed) {
return "ill-formed: " + v.description();
}
for (OperationInvalid v : operationInvalid) {
return "invalid operation: " + v.description();
}
for (SchemaViolation v : schemaViolations) {
return "schema violation: " + v.description();
}
return null;
}
COM: <s> returns a description of a single violation or null if there are none </s>
|
funcom_train/46745297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImageIconRef(DisplayModel imageIconRef) {
if (Converter.isDifferent(this.imageIconRef, imageIconRef)) {
DisplayModel oldimageIconRef= new DisplayModel(this);
oldimageIconRef.copyAllFrom(this.imageIconRef);
this.imageIconRef.copyAllFrom(imageIconRef);
setModified("imageIconRef");
firePropertyChange(String.valueOf(APPLICATIONCONTROLS_IMAGEICONREFID), oldimageIconRef, imageIconRef);
}
}
COM: <s> icon used in lieu of the path </s>
|
funcom_train/34119290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean next() throws JRException {
boolean hasNext = false;
if (iterator != null) {
hasNext = iterator.hasNext();
if (hasNext) {
currentInfo = prepareInfo(iterator.next());
++processCounter;
if (processCounter % 100 == 0) {
log.info("Prepared info #{}", processCounter);
}
}
// if (processCounter >= 500) {
// return false;
// }
}
return hasNext;
}
COM: <s> tries to position the cursor on the next element in the data source </s>
|
funcom_train/36239334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDir(File dir) {
Logger.debug("SET DIR = " + dir.getAbsolutePath());
// check dir
if (!dir.isDirectory()) {
throw new BuildException(dir.getAbsolutePath() + " IS NOT A DIRECTORY");
}
this.p_file = dir;
super.setDir(getBaseDir());
}
COM: <s> set the base directory parameter </s>
|
funcom_train/13888127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FeatureMap getMostRecentTurn(Tester tester, boolean cont) {
Iterator it;
if (cont) {
if (prevAgendaIt == null) {
return null;
}
it = prevAgendaIt;
} else {
it = agenda.peekAll().iterator();
}
while (it.hasNext()) {
FeatureMap t = (FeatureMap) it.next();
if (tester.test(t)) {
prevAgendaIt = it;
return t;
}
}
prevAgendaIt = null;
return null;
}
COM: <s> returns the previous turn that satisfies given tester </s>
|
funcom_train/25828689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepareSimulation() {
this.prepareSimulation(this.logFileNamePrefix
+ new SimpleDateFormat("yyyy_MM_dd__HH_mm_ss").format(new Date())
+ ".xml", this.directory + File.separator + this.projectName
+ File.separator + LOG_FOLDER_NAME, true);
}
COM: <s> prepare the simulation with the current project settings </s>
|
funcom_train/15727422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float packToFloat(ColorRGBA color) {
Vector3f byteToFloat = new Vector3f(1.0F, 1.0F / 256.0F, 1.0F / (256.0F * 256.0F));
Vector3f colorFloat = new Vector3f(color.r, color.g, color.b);
return colorFloat.dot(byteToFloat);
}
COM: <s> convert 3 bytes from a color to a float </s>
|
funcom_train/3416012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getActualMinimum(int field) {
if (field == DAY_OF_MONTH) {
GregorianCalendar gc = getNormalizedCalendar();
int year = gc.cdate.getNormalizedYear();
if (year == gregorianCutoverYear || year == gregorianCutoverYearJulian) {
long month1 = getFixedDateMonth1(gc.cdate, gc.calsys.getFixedDate(gc.cdate));
BaseCalendar.Date d = getCalendarDate(month1);
return d.getDayOfMonth();
}
}
return getMinimum(field);
}
COM: <s> returns the minimum value that this calendar field could have </s>
|
funcom_train/7421588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Component computeFlow(Gateway source, Gateway sink) {
List<Activity> result = getElementsBetween(source, sink);
if (result != null) {
List<Activity> activities = new ArrayList<Activity>();
activities.addAll(result);
// this condition must be fulfilled too
if(isOnlyPredecessor(sink, result) &&
(isOnlySuccessors(source, result))) {
return new Component(
Component.TYPE_FLOW,
activities,
computeTransitions(activities, source, sink),
source, sink);
}
}
return null;
}
COM: <s> computes a component that matches a flow pattern for </s>
|
funcom_train/15609674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReplacementRelationshipType(byte newReplacementType) {
if (CuratedFeature.this.getGenomeVersion() == null) {
return;
}
Workspace myWorkspace = CuratedFeature.this.getGenomeVersion()
.getWorkspace();
if (myWorkspace != null) {
myWorkspace.setReplacementRelationshipType(
CuratedFeature.this.getOid(), newReplacementType);
}
}
COM: <s> explicit call to set the replacement relationship type </s>
|
funcom_train/5016671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeComment(Comment _node, Writer _writer) throws IOException {
if ((_writer != null) && (_node != null) && (_node.getData() != null)) {
_writer.write("<!--" + _node.getData() + "-->");
}
}
COM: <s> write comment node to writer </s>
|
funcom_train/1952355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SmartObject_id_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SmartObject_id_feature", "_UI_SmartObject_type"),
SmartPackage.Literals.SMART_OBJECT__ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the id feature </s>
|
funcom_train/6337931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object makePersistent() {
GraphProcessor gp = new GraphProcessor(new GraphFilter() {
public int doFilter(Object object, GraphContext context) {
if (context.isProcessed(object)) {
return NOTHING | CONTINUE;
} else {
return PROCESS | START;
}
}}, new MakePersistentAction());
gp.process(pc);
return JDOManagerFactory.getPersistenceManager().getObjectById(id, false);
}
COM: <s> converts transient object or graph of transient objects back </s>
|
funcom_train/48189973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PosProductDistribute update(PosProductDistribute entity) {
LogUtil.log("updating PosProductDistribute instance", Level.INFO, null);
try {
PosProductDistribute result = entityManager.merge(entity);
LogUtil.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
LogUtil.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved pos product distribute entity and return it or a </s>
|
funcom_train/25118146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matcher read(Pattern regex) throws UnexpectedCharacterException {
Matcher m = regex.matcher(this.cs);
if (!m.find(this.off)) {
throw new UnexpectedCharacterException("Unexpected character '" + this.cs.charAt(this.off) + "'");
}
this.off = m.end();
return m;
}
COM: <s> consumes and returns the next occurrence of </s>
|
funcom_train/29529110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double delta(double y, double bMutationParameter) {
double rand = PseudoRandom.randDouble();
int it,maxIt;
it = currentIteration_.intValue();
maxIt = maxIterations_.intValue();
return (y * (1.0 -
Math.pow(rand,
Math.pow((1.0 - it /(double) maxIt),bMutationParameter)
)));
} // delta
COM: <s> calculates the delta value used in non uniform mutation operator </s>
|
funcom_train/18802259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int firstWriter() {
final Enumeration e;
int index;
for (index = 0, e = this.waiters.elements(); e.hasMoreElements(); index++) {
final ReaderWriterNode node = (ReaderWriterNode) e.nextElement();
if (node.state == ReaderWriterNode.WRITER) {
return index;
}
}
return Integer.MAX_VALUE;
}
COM: <s> returns the index of the first waiting writer </s>
|
funcom_train/7531613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValid() {
if (mHeader == null) {
return false;
} else {
if (!mHeader.isValid()) {
return false;
}
}
if (mGUID == null)
return false;
if (mCode == -1)
return false;
if ((mCode == CODE_OK) && (mPath == null))
return false;
if ((mCode != CODE_OK) && (mCode != CODE_PATH_CHANGED))
return false;
return true;
}
COM: <s> tests if this query hit message is valid </s>
|
funcom_train/51358857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean makeValid() {
for (int i = 0; i < v.length; ++i) {
if (v[i] < 0 && Environment.this.getAxisWrap(i))
v[i] += Environment.this.getSize(i);
else if (v[i] >= Environment.this.getSize(i)
&& Environment.this.getAxisWrap(i))
v[i] -= Environment.this.getSize(i);
}
return isValid();
}
COM: <s> make this location valid by wrapping if allowed </s>
|
funcom_train/38529279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addPoint() {
try {
final int xbin = Integer.parseInt(textLower.getText().trim());
final int ybin = Integer.parseInt(textUpper.getText().trim());
final Bin bin = Bin.create(xbin, ybin);
addPoint(bin);
broadcaster.broadcast(BroadcastEvent.Command.GATE_SET_ADD, bin);
} catch (NumberFormatException ne) {
LOGGER.log(Level.SEVERE, "Invalid input: not a number.", ne);
}
}
COM: <s> add a point from the text fields </s>
|
funcom_train/3371204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean canEditImmediately(EventObject event) {
if((event instanceof MouseEvent) &&
SwingUtilities.isLeftMouseButton((MouseEvent)event)) {
MouseEvent me = (MouseEvent)event;
return ((me.getClickCount() > 2) &&
inHitRegion(me.getX(), me.getY()));
}
return (event == null);
}
COM: <s> returns true if code event code is code null code </s>
|
funcom_train/50077519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSuccess() {
if (log.isTraceEnabled()) {
log.trace(
"Task executed successfully, thread pool [" +
this.threadPoolName +
"], task [" +
this.taskName +
"]");
}
synchronized (this) {
this.status = TaskStatusEnum.SUCCESS;
this.notifyAll();
}
callCallback(true);
}
COM: <s> this method is called when a task succeeds </s>
|
funcom_train/1238419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generate() throws IOException {
String fqcn = getPackage() + "." + getClassName();
if (emitter.isDeploy() && emitter.doesExist(fqcn)) {
if (emitter.isHelperWanted()) {
helper.generate();
}
} else {
super.generate();
}
}
COM: <s> generate a java source file and or helper source file </s>
|
funcom_train/44823067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tag getTagOfTypeByName (String tagType, String name) {
for (int i=0; i<tags.size(); i++) {
Tag tag = (Tag) tags.get(i);
if (tagType.equals(tag.getTagType()) && name.equals(tag.getName())) {
return tag;
}
}
return null;
}
COM: <s> get a the first tag of a given type with the given name </s>
|
funcom_train/29514488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Integer pattenEngine(String s) {
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("javascript");
int returnValue = 0;
try {
engine.put("exp", s);
engine.eval("var output=eval(exp);");
returnValue = Integer.parseInt(engine.get("output").toString().substring(0, 1));
} catch (ScriptException e) {
System.out.println("The script we use to cal pattern makes errors");
e.printStackTrace();
}
return returnValue;
}
COM: <s> learn the pattern by js driven </s>
|
funcom_train/2440066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static final AppliedPipelinePluginStore EMPTY = new AppliedPipelinePluginStore() {
@Override
public AppliedPipelinePlugin[] getAllAssociations(IntegrationEntity entity) {
return new AppliedPipelinePlugin[0];
}
@Override
public void addListener(AppliedPipelinePluginStoreListener lst) {
// Does nothing
}
@Override
public void removeListener(AppliedPipelinePluginStoreListener lst) {
// Does nothing
}
};
COM: <s> defines an empty code applied pipeline plugin store code </s>
|
funcom_train/25421957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeIO(Reader source, String charset, OutputStream destination)
throws IOException {
OutputStreamWriter osr = null;
try {
osr = new OutputStreamWriter(destination,charset);
this.executeIO(source,osr);
} finally {
// TODO: watch for any negative effects
try {if (osr != null) osr.close();} catch (Exception ef) {}
}
}
COM: <s> executes character to stream i o </s>
|
funcom_train/28750485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDateordered(java.util.Date newVal) {
if ((newVal != null && this.dateordered != null && (newVal.compareTo(this.dateordered) == 0)) ||
(newVal == null && this.dateordered == null && dateordered_is_initialized)) {
return;
}
this.dateordered = newVal;
dateordered_is_modified = true;
dateordered_is_initialized = true;
}
COM: <s> setter method for dateordered </s>
|
funcom_train/16744013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(Chrom chrom, int rangeStart, int rangeEnd, boolean makeFinalized) {
CompareUtils.ensureTrue(rangeEnd >= rangeStart, "ERROR: RegionRange.set(): Range end must follow range start!");
mChrom = chrom;
mRangeStart = rangeStart;
mRangeEnd = rangeEnd; // need to do this before extending the rnage
mRangeFinalized = makeFinalized;
}
COM: <s> sets the range </s>
|
funcom_train/25968027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataCollection collectFeatures() {
List<MonitoredData> data;
ParcelableDate endTime;
//for safety if extractors init didn't work well
if (_extractors == null) {
System.err.println("No executors are available.");
return null;
}
data = new ArrayList<MonitoredData>();
endTime = new ParcelableDate(System.currentTimeMillis());
//retrieving monitored data from all executors and adding them to result list
for (FeatureExtractor extractor : _extractors) {
extractor.collectData(data, endTime);
}
return new DataCollection(data);
}
COM: <s> performs the first part of the service thread iteration the feature </s>
|
funcom_train/36192814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSubsequenceRoys() {
try {
assertEquals(abcde.subsequence(abcde.int_size(), abcde.int_size()),
new JMLObjectSequence<Character>());
} catch (JMLSequenceException e) {
fail("subsequence here should not raise a JMLSequenceException");
}
}
COM: <s> test of subsequence thanks to roy tan that was related to a </s>
|
funcom_train/11767350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
LevelElement element;
for (int x = 0; x < this.width; x++) {
for (int y = 0; y < this.height; y++) {
element = this.getLevelElement(x, y);
if (element != null) {
element.update();
}
}
}
}
COM: <s> updates the level </s>
|
funcom_train/9078087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleFailure(ACLMessage failure) {
if (failure.getSender().equals(myAgent.getAMS())) {
// FAILURE notification from the JADE runtime: the receiver
// does not exist
print("Responder does not exist");
}
else {
budget += reserved;
print("Agent "+failure.getSender().getName()+" failed. Rolled back budget.");
}
// Immediate failure --> we will not receive a response from this agent
nResponders --;
}
COM: <s> handle failures e </s>
|
funcom_train/32777721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Schedulable clone() throws CloneNotSupportedException {
Schedulable c = (Schedulable) super.clone();
NameCatalog nc = this.getModel().getExperiment().getNameCatalog();
c.rename(nc.getNameWithoutSuffix(this.getName()));
c._schedule = new LinkedList<EventNote>();
return c;
}
COM: <s> creates and returns a copy of this schedulable </s>
|
funcom_train/2902010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPlugins() {
try {
Session hSession = HibernateSession.openSession();
List plugins = hSession.find("from Plugin as p");
HibernateSession.closeSession(hSession);
return plugins;
} catch (HibernateException e) {
log.error("Unable to get plugins!", e);
}
return Collections.EMPTY_LIST;
}
COM: <s> returns a list of plugin instances saved in database </s>
|
funcom_train/42460897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int graphBaseSize() {
try {
int total = 0;
RDFStatsModel stats = mediator.getDataSourceRegistry().getRDFStatsModel();
List<RDFStatsDataset> dsList = stats.getDatasets();
for (RDFStatsDataset ds : dsList)
total += ds.getTriplesTotal();
return total;
} catch (Exception e) {
log.error("Failed to obtain global graph size!", e);
return 0;
}
}
COM: <s> size based on rdfstats no queries required </s>
|
funcom_train/50835073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void windowClosing(WindowEvent e) {
Random r = new Random();
r.setSeed(System.currentTimeMillis());
username.setText(System.getProperty("user.name"));
//password.setText(System.getProperty("user.name" + "_" + String.valueOf(r.nextInt())));
}
COM: <s> invoked when a config dialog is in the process of being </s>
|
funcom_train/12537174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setProperties(ObjectMessage message, Map properties) throws JMSException {
for (Iterator i = properties.keySet().iterator(); i.hasNext();) {
String name = (String) i.next();
message.setObjectProperty(name, properties.get(name));
}
}
COM: <s> sets the properties of the specified code message code to the specified </s>
|
funcom_train/23451794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initializePackageContents() {
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
// Initialize classes and features; add operations and parameters
initEClass(intervalThingEClass, IntervalThing.class, "IntervalThing", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
// Create resource
createResource(eNS_URI);
}
COM: <s> complete the initialization of the package and its meta model </s>
|
funcom_train/45320630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJt23() {
if (jt23 == null) {
jt23 = new JTextField();
jt23.setBounds(62, 30, 28, 25);
jt23.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent e) {
jugadorColoca(jt23, (byte) 1, (byte) 2);
}
});
}
return jt23;
}
COM: <s> this method initializes j text field5 </s>
|
funcom_train/29547092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintCustomArrow(Graphics g, int fromX, int fromY, int toX, int toY, Color color) {
if (oriented){
paintArrow(g,fromX,fromY,toX,toY,color);
}
else{
g.setColor(color);
g.drawLine(fromX,fromY,toX,toY);
}
}
COM: <s> paint an arrow between nodes of this edge </s>
|
funcom_train/18214077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPasswordPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DatabaseAccessConfiguration_password_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DatabaseAccessConfiguration_password_feature", "_UI_DatabaseAccessConfiguration_type"),
EvaluationmodelPackage.Literals.DATABASE_ACCESS_CONFIGURATION__PASSWORD,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the password feature </s>
|
funcom_train/44591413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Expression getRightHandSide() {
if (this.rightHandSide == null) {
// lazy init must be thread-safe for readers
synchronized (this) {
if (this.rightHandSide == null) {
preLazyInit();
this.rightHandSide= new SimpleName(this.ast);
postLazyInit(this.rightHandSide, RIGHT_HAND_SIDE_PROPERTY);
}
}
}
return this.rightHandSide;
}
COM: <s> returns the right hand side of this assignment expression </s>
|
funcom_train/10188331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getPatternText() {
if (PatternText == null) {
PatternText = new JTextField();
PatternText.setPreferredSize(new Dimension(2000, 20));
PatternText.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ActionPermormedText(e);
}
});
}
return PatternText;
}
COM: <s> this method initializes pattern text </s>
|
funcom_train/29793412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tagvalue(Options opt, Doc c) {
Tag tags[] = c.tags("tagvalue");
if (tags.length == 0)
return;
for (Tag tag : tags) {
String t[] = StringUtil.tokenize(tag.text());
if (t.length != 2) {
System.err.println("@tagvalue expects two fields: " + tag.text());
continue;
}
tableLine(Align.RIGHT, "{" + t[0] + " = " + t[1] + "}", opt, Font.TAG);
}
}
COM: <s> return as a string the tagged values associated with c </s>
|
funcom_train/29314013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getStringLength(Node artNode, String xp) {
Node xpNode = null;
try {
// Use XPath processor on DOM tree
xpProcessor.setContextNode((NodeInfo) artNode);
xpNode = (Node) xpProcessor.evaluateSingle(xp);
} catch (XPathException e) {
logger.error("Error: XPath processing error " + e);
}
return getStringLength(xpNode);
}
COM: <s> evaluate string length normalize space art node xp </s>
|
funcom_train/37153115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(String key) throws StorageException, KeyNotPresentException {
File source = prepareFile(key);
if (!source.exists()) {
throw new KeyNotPresentException("The key `" + key
+ "' is not present in the repository.");
}
return deSerializeObject(source);
}
COM: <s> returns the object stored in the file named as the code key code </s>
|
funcom_train/44940501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element drawExtraLinks(Cell cell, WebObject webObject, Document doc) {
Element extra = xmlHelper.drawTransferLinks(doc, webObject, "extra",
false);
// Preview link
if (cellFinder.hasAddress(cell)) {
extra.setAttribute("link", "ifs://" + cell.getId());
}
return extra;
}
COM: <s> some additional links of object view and state changing </s>
|
funcom_train/45786375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getJTabbedPane() {
if (jTabbedPane == null) {
jTabbedPane = new JTabbedPane();
jTabbedPane.addTab("Imprimir todos", null, getJPanelTodos(), null);
jTabbedPane.addTab("Imprimir por Cliente", null, getJPanelClientes(), null);
}
return jTabbedPane;
}
COM: <s> this method initializes j tabbed pane </s>
|
funcom_train/49320064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PlanarImage rotate(PlanarImage im) {
if (_angle != 0.0F) {
double x = _sourceImage.getWidth() / 2.0;
double y = _sourceImage.getHeight() / 2.0;
im = ImageOps.rotate(im, (float) x, (float) y, (float) _angle, _interpolation, null);
}
return im;
}
COM: <s> rotate the image about the center by the specified angle in radians </s>
|
funcom_train/11728759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
isReadOnly = true;
super.setUp();
session = getHelper().getReadOnlySession();
testRootNode = session.getRootNode().getNode(testPath);
NodeIterator nodes = testRootNode.getNodes();
try {
childNode = nodes.nextNode();
} catch (NoSuchElementException e) {
}
}
COM: <s> sets up the fixture for this test </s>
|
funcom_train/8487107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCase() throws Exception {
System.out.println("getCase");
int ligne = 0;
int colonne = 0;
Goban instance = new Goban();
StoneVal expResult = StoneVal.EMPTY;
StoneVal result = instance.getCase(ligne, colonne);
assertEquals(expResult, result);
}
COM: <s> test of get case method of class goban </s>
|
funcom_train/18810953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ValueAxis getDomainAxisForDataset(int index) {
if (index >= this.getDatasetCount()) {
throw new IllegalArgumentException();
}
ValueAxis valueAxis = null;
Integer axisIndex = (Integer) this.domainAxisMap.get(index);
valueAxis = getDomainAxis(axisIndex.intValue());
return valueAxis;
}
COM: <s> returns the domain axis for a dataset </s>
|
funcom_train/44832544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JGMethodDescriptor getMethod(String methodName) {
Iterator iter = methods.iterator();
while (iter.hasNext()) {
JGMethodDescriptor methodDesc = (JGMethodDescriptor) iter.next();
if (methodDesc.getName().equals(methodName)) {
return methodDesc;
}// if
}// while
return null;
}
COM: <s> getter for property methods </s>
|
funcom_train/7673548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OneLocalsArray merge(OneLocalsArray other) {
try {
return Merger.mergeLocals(this, other);
} catch (SimException ex) {
ex.addContext("underlay locals:");
annotate(ex);
ex.addContext("overlay locals:");
other.annotate(ex);
throw ex;
}
}
COM: <s> merges this one locals array instance with another one locals array </s>
|
funcom_train/47899087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Document getDocument(java.io.InputStream xmlstream, String name) {
Document doc = null;
SAXBuilder build = new SAXBuilder();
if (xmlstream == null)
System.err
.println("ERROR: WebWorkBook.getDocument failed. Could not get XML from WorkBook: "
+ name);
try {
BufferedReader r = new BufferedReader(new InputStreamReader(
xmlstream));
doc = build.build(r);
} catch (Exception e) {
System.err
.println("ERROR: WebWorkBook.getDocument failed. Exception creating JDOM document: "
+ e);
}
return doc;
}
COM: <s> return a document object from an xmlstream </s>
|
funcom_train/12195778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIdentificationOfUnkownDeviceWhenSimiliarDevicesExistsInCache() {
dpc.mapPatternAndDevice("DoCoMo/2\\.0 P901iC.*", "DoCoMo-P901iC");
dpc.mapPatternAndDevice("DoCoMo/2\\.0 P900iC.*", "DoCoMo-P900iC");
doTestIdentificationOfUnknownDoCoMoDevice();
}
COM: <s> ensure that a device is identified as the next best general class </s>
|
funcom_train/14354370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getExpInpMenuItem() {
if (expInpMenuItem == null) {
expInpMenuItem = new JMenuItem();
expInpMenuItem.setText("Export/Import");
expInpMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ExportInportDialog dial = new ExportInportDialog(getJFrame());
dial.show();
if (dial.isExitOK()) {
}
}
});
}
return expInpMenuItem;
}
COM: <s> this method initializes exp inp menu item </s>
|
funcom_train/7287057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkEOF(int eof) throws IOException {
if ((wrappedStream != null) && (eof < 0)) {
try {
boolean scws = true; // should close wrapped stream?
if (eofWatcher != null)
scws = eofWatcher.eofDetected(wrappedStream);
if (scws)
wrappedStream.close();
} finally {
wrappedStream = null;
}
}
}
COM: <s> detects eof and notifies the watcher </s>
|
funcom_train/21643587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getCompilerOptionsResetCompilerMenuItem() {
if (compilerOptionsResetCompilerMenuItem == null) {
compilerOptionsResetCompilerMenuItem = new JMenuItem();
compilerOptionsResetCompilerMenuItem.setText("Reset Compiler");
compilerOptionsResetCompilerMenuItem.setMnemonic('R');
compilerOptionsResetCompilerMenuItem.setDisplayedMnemonicIndex(0);
compilerOptionsResetCompilerMenuItem.addActionListener(eventHandler);
}
return compilerOptionsResetCompilerMenuItem;
}
COM: <s> return the compiler options reset compiler menu item </s>
|
funcom_train/11102840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void indirectWriter() {
try {
FacesContext context = FacesContext.getCurrentInstance();
ResponseWriter writer =
(new ResponseFactory()).getResponseWriter(context, "text/x-plain");
for (int i = 0; i < 10; i++) {
writer.write('a' + i);
}
} catch (IOException e) {
throw new FacesException(e);
}
}
COM: <s> p create character output indirectly a factory </s>
|
funcom_train/31908039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parse(String s){
try {
LengthParser lengthParser = new LengthParser();
UnitProcessor.UnitResolver ur =
new UnitProcessor.UnitResolver();
lengthParser.setLengthHandler(ur);
lengthParser.parse(s);
unitType = ur.unit;
value = ur.value;
} catch (ParseException e) {
unitType = SVG_LENGTHTYPE_UNKNOWN;
value = 0;
}
}
COM: <s> parse a string value as a svglength </s>
|
funcom_train/36660664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void tearDown() throws Exception {
try {
if (txn != null) {
txn.abort(new RuntimeException("abort"));
}
if (!passed && store != null) {
new ShutdownAction().waitForDone();
}
} catch (RuntimeException e) {
if (passed) {
throw e;
} else {
e.printStackTrace();
}
} finally {
txn = null;
if (!passed) {
store = null;
}
}
}
COM: <s> abort the current transaction if non null and shutdown the store </s>
|
funcom_train/10482063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Writer out) throws IOException {
// do we have a single data point range?
if (start == end) {
out.write(Integer.toString(start));
} else {
out.write(Integer.toString(start));
out.write("-");
out.write(Integer.toString(end));
}
}
COM: <s> save an individual range element to a newsrc file </s>
|
funcom_train/11674352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String formatRectangleToArray(Rectangle2D rect) {
return "[" + formatDouble(rect.getX()) + " "
+ formatDouble(rect.getY()) + " "
+ formatDouble(rect.getWidth()) + " "
+ formatDouble(rect.getHeight()) + "]";
}
COM: <s> formats a rectangle2 d to an array </s>
|
funcom_train/34134847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNode( ElementNode node) {
XElement e = null;
SchemaElement type = node.getType();
String uri = type.getNamespace();
Namespace ns = element.getNamespaceForURI( uri);
String prefix = null;
if ( ns != null) {
prefix = ns.getPrefix();
}
if ( prefix != null) {
e = new XElement( type.getName(), uri, prefix, false);
} else {
e = new XElement( type.getName(), uri, false);
}
addNode( node, e);
}
COM: <s> adds an element to the virtual node supplied </s>
|
funcom_train/22284075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWidget(int row, int column, Widget widget) {
// Attach it to the cell's TD.
Element td = cleanCell(row, column);
DOM.appendChild(td, widget.getElement());
// Add the widget to the map.
widgetMap.put(computeKey(row, column), widget);
// Set the widget's parent.
adopt(widget);
}
COM: <s> sets the widget within the specified cell </s>
|
funcom_train/22525809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSelectedEntries() {
StructuredSelection selection = (StructuredSelection)getSelection();
Object[] objects = selection.toArray();
// Make sure we didn't get the empty selection
if(objects.length == 0) {
return;
}
// Remove
for(int i = 0; i < objects.length; i++) {
fEntries.remove(objects[i]);
}
refresh();
}
COM: <s> remove selected entries </s>
|
funcom_train/23246455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Bounds getWayBounds(final Way way) {
// get the bounds of the street
BoundingXYVisitor streetBounds = new BoundingXYVisitor(getMap());
List<Node> nodes = this.getNodes(way);
for (Node node : nodes) {
streetBounds.visit(node);
}
return streetBounds.getBounds();
}
COM: <s> get the bounding box of all nodes of the given way </s>
|
funcom_train/5374521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean intersects (int x, int y, int width, int height) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
/*
RECT r = new RECT ();
OS.SetRect (r, x, y, x + width, y + height);
return OS.RectInRegion (handle, r);
*/
return false;
}
COM: <s> returns code true code if the rectangle described by the </s>
|
funcom_train/8629298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findIndexSorted(int value) {
int l = 0, r = size;
while (l < r) {
int i = (l + r) >>> 1;
int d = data[i];
if (d == value) {
return i;
} else if (d > value) {
r = i;
} else {
l = i + 1;
}
}
return -1;
}
COM: <s> return the index with a this value </s>
|
funcom_train/7666929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getRecordSize(int data_size) {
if (activeWriteState == null) {
return 5+data_size; // type + version + length + data_size
} else {
int res = 5 + activeWriteState.getFragmentSize(data_size);
return (res > MAX_CIPHERED_DATA_LENGTH)
? MAX_CIPHERED_DATA_LENGTH // so the source data should be
// splitted into several packets
: res;
}
}
COM: <s> returns the record length for the specified incoming data length </s>
|
funcom_train/1038908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateStartTime(int ride, String startTime) throws RideException{
Statement statement = null;
int countr = 0;
try {
statement = db.getStatement();
countr = statement.executeUpdate("UPDATE Ride SET Ride.rideTime='"+startTime+"' "+"WHERE idRide='"+ride+"';");
statement.close();
} catch (SQLException e) {
e.printStackTrace();
}
return countr > 0;
}
COM: <s> update the start time of a ride </s>
|
funcom_train/15713714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startNewColumn() {
final TableFieldImpl tableField = new TableFieldImpl();
consumeNode(tableField, true);
final int col = tableField.getParent().getNumChildren() - 1;
tableField.setAlignment(columnAlignments.get(col));
if (staticColumnContents.get(col) != null) {
tableField.getChildren().addAll(staticColumnContents.get(col));
}
}
COM: <s> start a new column in the table </s>
|
funcom_train/15400889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void firePropertyChange(DICOMImagePropertyChangeEvent evt) {
if (listeners==null) {
return;
}
synchronized (listeners) {
for (int loop=0; loop<listeners.size(); loop++) {
DICOMImagePropertyChangeListener pcl=(DICOMImagePropertyChangeListener) listeners.get(loop);
pcl.imagePropertyChange(evt);
}
}
}
COM: <s> when change has occurred notifies listener of property change </s>
|
funcom_train/19704809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List findAllTags(final TagType tagType) {
Tag tag=checkEnclosure(Tag.findPreviousOrNextTag(source,begin,tagType,false));
if (tag==null) return Collections.EMPTY_LIST;
final ArrayList list=new ArrayList();
do {
list.add(tag);
tag=checkEnclosure(Tag.findPreviousOrNextTag(source,tag.begin+1,tagType,false));
} while (tag!=null);
return list;
}
COM: <s> returns a list of all </s>
|
funcom_train/41717653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addPaletteExpressionListener() {
model.addPaletteExpressionListener(new ListListener<Expression>() {
public void elementAdded(ListEvent<Expression> e) {
processPaletteExpressionAdded(e);
}
public void elementRemoved(ListEvent<Expression> e) {
processPaletteExpressionRemoved(e);
}
public void elementMoved(ListEvent<Expression> e) {
// do nothing for now
}
});
}
COM: <s> listens to the model for events on the palette expression list </s>
|
funcom_train/37230258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NK1Segment getNK1() {
NK1Segment nk1 = (NK1Segment)findSegment( "NK1" );
if( nk1 == null ) {
nk1 = new NK1Segment( this );
nk1.initialize();
nk1.setSetID(Integer.toString(NK1Segment.nextSetID()));
if( vSegments == null ) vSegments = new Vector();
vSegments.add(0,nk1);
}
return nk1;
}
COM: <s> get the first nk1 segment that should be contained within this loop </s>
|
funcom_train/51591715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void messageReceived(MessageDTO message) {
String source = Converter.bytes2String(message.getMessageSource());
if (client.getSource().equals(source)) {
ArrayList datas = message.getData();
for (Iterator i = datas.iterator(); i.hasNext(); ) {
DataDTO data = (DataDTO) i.next();
ctm.updateValue(data);
}
}
}
COM: <s> event notifying of incoming data </s>
|
funcom_train/33854474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void work(IWorkbenchPart part, final IResource resource, final List<WorkItem> resources) {
FindBugsJob runFindBugs = new StartedFromViewJob("Finding bugs in " + resource.getName() + "...", resource, resources, part);
runFindBugs.scheduleInteractive();
}
COM: <s> run a find bugs analysis on the given resource displaying a progress </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.