__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/32088720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TYPEATTR getTypeInfoAttributes() {
if (objITypeInfo == null) return null;
int /*long*/ [] ppTypeAttr = new int /*long*/ [1];
int rc = objITypeInfo.GetTypeAttr(ppTypeAttr);
if (rc != OLE.S_OK) return null;
TYPEATTR typeattr = new TYPEATTR();
COM.MoveMemory(typeattr, ppTypeAttr[0], TYPEATTR.sizeof);
objITypeInfo.ReleaseTypeAttr(ppTypeAttr[0]);
return typeattr;
}
COM: <s> returns the type info of the current object referenced by the automation </s>
|
funcom_train/36679418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCityCount(String baseCityName, Player player) {
int cityCount = 0;
for (Tile t : getAllTiles()) {
City city = getCityOn(t);
if (city != null && city.getType().equalsIgnoreCase(baseCityName))
if (player == null || city.isOwnedBy(player)) {
cityCount++;
}
}
return cityCount;
}
COM: <s> counts cities of a given type owned by a given player </s>
|
funcom_train/42840524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadSubjectAndContent(EmailMessage emailMessage, Map<String, Object> ctx, String name) throws IOException {
String template = FileUtil.readString(new File(templatePath, name + MESSAGE_SUFFIX));
emailMessage.setContent(BeanTemplate.parse(template, ctx));
template = FileUtil.readString(new File(templatePath, name + SUBJECT_SUFFIX));
emailMessage.setSubject(BeanTemplate.parse(template, ctx));
}
COM: <s> loads email content and subject from file </s>
|
funcom_train/3741511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void moveOutward(Vertex vert, double x, double y, double speed) {
x -= currentSize.width / 2;
y -= currentSize.height / 2;
x *= speed;
y *= speed;
x += currentSize.width / 2;
y += currentSize.height / 2;
forceMove(vert, (int) x, (int) y);
}
COM: <s> moves a vertex outward toward the outer edge of the screen </s>
|
funcom_train/51591017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int computePageCount(TableModel model)
{ int count = -1;
int rowCount = super.getRowCount();
if ( rowCount > 0 && this.arePageableFunctionnalitiesActivated() )
{ count = (int)Math.ceil( ((double)rowCount) / this.getMaximumDisplayedRows() ); }
if ( count <= 0 )
{ count = 1; }
return count;
}
COM: <s> compute the page count according to the given table model </s>
|
funcom_train/28553698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveLeftLeg(long ID, String name, double angVelX, double angVelY) {
tempCommand = new Command();
tempCommand.setID(ID);
tempCommand.setName(name);
tempCommand.setCommand("(lle2_3 " + String.valueOf(angVelX) + " "
+ String.valueOf(angVelY) + ")");
commandsList.add(tempCommand);
}
COM: <s> this is a method in fourth from of prototype for moving left leg </s>
|
funcom_train/51556402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int check() {
int ind = 0;
try {
Connection conn = new Connect().connect();
Statement st = conn.createStatement();
String query = "SELECT * FROM groups WHERE name='" + getName()
+ "'";
ResultSet rs = st.executeQuery(query);
while (rs.next()) {
ind++;
}
} catch (Exception e) {
log.setDescription("Problem while checking group " + getName()
+ ". " + e.toString());
log.setLevel("error");
log.add();
}
if (ind > 0) {
return 1;
} else {
return 0;
}
}
COM: <s> checks if group exists </s>
|
funcom_train/1610711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String tagCreate() {
if (!("").equals(newTags)) {
List<String> newTagList = Util.breakString(newTags);
for (String tag : newTagList) {
Tag newTag = new Tag();
newTag.setAgent(agent);
newTag.setName(tag);
entityManager.insert(newTag);
}
}
return super.execute();
}
COM: <s> create the agents tags </s>
|
funcom_train/51120024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireValueChange() {
if (valueChangeListeners != null) {
Object[] l = valueChangeListeners.toArray();
Property.ValueChangeEvent event =
new ObjectProperty.ValueChangeEvent(this);
for (int i=0; i<l.length; i++)
((Property.ValueChangeListener)l[i]).valueChange(event);
}
}
COM: <s> send a value change event to all registered listeners </s>
|
funcom_train/45018398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addShortNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NXinstrumentName_shortName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NXinstrumentName_shortName_feature", "_UI_NXinstrumentName_type"),
NexusPackageImpl.Literals.NXINSTRUMENT_NAME__SHORT_NAME,
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the short name feature </s>
|
funcom_train/31418077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
GribFile gribFile = null;
String theString = null;
for (int i = 0; i<this.dates.length; i++){
Date date = this.dates[i];
gribFile = (GribFile)this.files.get(date);
theString = theString + gribFile.toString();
}
return theString;
}
COM: <s> get a string representation of the grib file </s>
|
funcom_train/29617662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MgisTextField getJReleaseYearField() {
if (jReleaseYearField == null) {
jReleaseYearField = new MgisTextField();
jReleaseYearField.setFieldType(MgisTextField.FIELDTYPE_NUMERIC);
jReleaseYearField.setSize(new java.awt.Dimension(39,19));
jReleaseYearField.setLocation(new java.awt.Point(120,160));
jReleaseYearField.setDocument(jReleaseYearField.new JTextFieldLimit(4, false));
}
return jReleaseYearField;
}
COM: <s> this method initializes j release year field </s>
|
funcom_train/3033041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GdbiIndi createGdbiIndi(GdbiXref xref) {
final String irec = "0 INDI\n";
NodeIndi new_indi = NODE.string_to_node_indi(irec);
new_indi.n_xref = xreffile.getixref();
CACHE.indi_to_cache(new_indi); // to get the same node each time
return LdbIndi.newGdbiIndi(new_indi);
}
COM: <s> create a new empty record </s>
|
funcom_train/21963892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSandwiched() {
String html = "<Strong>someText</Strong>";
SgmlLexer lex = new SgmlLexer(new StringCharacterStream(html));
String test = "";
int count = 0;
while (lex.hasNext()) {
test += lex.next();
count++;
}
assertEquals(html,test);
assertEquals(3,count);
}
COM: <s> tests sandwiched text </s>
|
funcom_train/13596440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void markWordPartial(String word) {
WordData wordData = getWord(word);
int oldStatus = wordData.getStatus();
wordData.setStatus(WordData.STATUS_PARTIAL);
Integer oldStatusInt = new Integer(oldStatus);
removeWordFromStatusMap(wordData, oldStatusInt);
Integer statusInt = new Integer(wordData.getStatus());
addToWordStatusMap(wordData, statusInt);
extractor.markWordPartial(word);
notifyWordStatusChanged(wordData, oldStatus, WordData.STATUS_PARTIAL);
}
COM: <s> mark the word as partial </s>
|
funcom_train/51639720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sessionEnded() {
if (!isEnabled())
return;
IStatus status;
try {
IJavaCompletionProposalComputer computer= getComputer();
if (computer == null) // not active yet
return;
PerformanceStats stats= startMeter(SESSION_ENDED, computer);
computer.sessionEnded();
stopMeter(stats, SESSION_ENDED);
return;
} catch (InvalidRegistryObjectException x) {
status= createExceptionStatus(x);
} catch (CoreException x) {
status= createExceptionStatus(x);
} catch (RuntimeException x) {
status= createExceptionStatus(x);
}
fRegistry.informUser(this, status);
}
COM: <s> notifies the described extension of a proposal computation session end </s>
|
funcom_train/42402566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(final Widget widget, int indexBefore) {
if (widget.getParent() != null) {
throw new IllegalArgumentException(
"The parameter:widget already has a parent, remove from that first and then add/insert again to this "
+ this.getClass().getName());
}
this.insert0(widget, indexBefore);
this.adopt(widget);
this.getWidgetCollection().insert(widget, indexBefore);
}
COM: <s> sub classes need to insert the given widget into the dom </s>
|
funcom_train/3791637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int nextInt(int n) {
if (n <= 0)
throw new IllegalArgumentException("n must be positive");
if ((n & -n) == n) // i.e., n is a power of 2
return (int) ((n * (long) next(31)) >> 31);
int bits, val;
do {
bits = next(31);
val = bits % n;
} while (bits - val + (n - 1) < 0);
return val;
}
COM: <s> this method is missing from jdk 1 </s>
|
funcom_train/43889526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createTable() throws Exception {
// first make sure no old test function present
dropTable();
// create the table
execute("CREATE TABLE " + TEST_TABLE_NAME + " (" + ID_COLUMN_NAME
+ " INTEGER PRIMARY KEY, " + DESCRIPTION_COLUMN_NAME + " VARCHAR(80))");
// insert the rows
populateTable();
}
COM: <s> create the test table in the database </s>
|
funcom_train/46840482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void overrideParameters(ParameterContainer pc) throws ParameterException {
for (K3Param param : pc.m_orderedParams) {
if (param.getType() == ParameterType.STRING) {
setParamExpression(param.getName(), '"' + param.getStringValue() + '"');
} else {
setParamExpression(param.getName(), param.getStringValue());
}
}
}
COM: <s> this method overrides expressions of parameters of this container with </s>
|
funcom_train/35715908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void print(MovementEvent e) {
System.out.println("line offset: " + e.lineOffset); //$NON-NLS-1$
System.out.println("line: " + e.lineText); //$NON-NLS-1$
System.out.println("type: " + e.movement); //$NON-NLS-1$
System.out.println("offset: " + e.offset); //$NON-NLS-1$
System.out.println("newOffset: " + e.newOffset); //$NON-NLS-1$
}
COM: <s> print trace info about code movement event code </s>
|
funcom_train/10796398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void detachArray(Object array, FieldMetaData fmd) {
if (!fmd.getElement().isDeclaredTypePC())
return;
int len = Array.getLength(array);
for (int i = 0; i < len; i++)
Array.set(array, i, detachInternal(Array.get(array, i)));
}
COM: <s> make sure all the values in the given array are detached </s>
|
funcom_train/28750745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProceduretypeid(Long newVal) {
if ((newVal != null && this.proceduretypeid != null && (newVal.compareTo(this.proceduretypeid) == 0)) ||
(newVal == null && this.proceduretypeid == null && proceduretypeid_is_initialized)) {
return;
}
this.proceduretypeid = newVal;
proceduretypeid_is_modified = true;
proceduretypeid_is_initialized = true;
}
COM: <s> setter method for proceduretypeid </s>
|
funcom_train/11123479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Channel getChannel(Buffer buffer) throws IOException {
int recipient = buffer.getInt();
Channel channel = channels.get(recipient);
if (channel == null) {
buffer.rpos(buffer.rpos() - 5);
SshConstants.Message cmd = buffer.getCommand();
throw new SshException("Received " + cmd + " on unknown channel " + recipient);
}
return channel;
}
COM: <s> retrieve the channel designated by the given packet </s>
|
funcom_train/3374447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(int offs, int len) throws BadLocationException {
DocumentFilter filter = getDocumentFilter();
writeLock();
try {
if (filter != null) {
filter.remove(getFilterBypass(), offs, len);
}
else {
handleRemove(offs, len);
}
} finally {
writeUnlock();
}
}
COM: <s> removes some content from the document </s>
|
funcom_train/31013211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendDayOptions(StringBuffer buffer, int day) {
for (int i=1; i<32; i++) {
if (day == i) {
buffer.append("<OPTION value=\"" + i + "\" selected>" + i + "</OPTION>");
} else {
buffer.append("<OPTION value=\"" + i + "\">" + i + "</OPTION>");
}
}
}
COM: <s> append the day options </s>
|
funcom_train/20487242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reloadTT() {
Logger log = null;
if (logging) {
log = Logger.getLogger(DialogueManager.class);
}
Authenticator.setDefault(new MyAuthenticator());
TopicTree.reloadInstance();
System.out
.println(sessionID.substring(0, 8)
+ "[DialogueManager] Topic tree and macro files reloaded and DialogueManager reset.");
tt.reset();
continuousNoPatternFoundErrors = 0;
C = tt.getRootNode();
sdMode = false;
if (logging) {
log.log(CustomLog.MY_TRACE, sessionID.substring(0, 8)
+ " DEBUG: *******************************");
}
}
COM: <s> reloads tt and abbrev files </s>
|
funcom_train/11739333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeProcedure(DataMap map, Procedure procedure) {
ProjectController mediator = getProjectController();
ProcedureEvent e = new ProcedureEvent(
Application.getFrame(),
procedure,
MapEvent.REMOVE);
e.setDomain((DataChannelDescriptor) mediator.getProject().getRootNode());
map.removeProcedure(procedure.getName());
mediator.fireProcedureEvent(e);
}
COM: <s> removes current procedure from its data map and fires remove procedure event </s>
|
funcom_train/3395482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WildcardType makeExtendsWildcard(Type bound, TypeVar formal) {
if (bound == syms.objectType) {
return new WildcardType(syms.objectType,
BoundKind.UNBOUND,
syms.boundClass,
formal);
} else {
return new WildcardType(bound,
BoundKind.EXTENDS,
syms.boundClass,
formal);
}
}
COM: <s> create a wildcard with the given upper extends bound create </s>
|
funcom_train/20081422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getStyleFor(LoggingEvent event) {
Level l = event.getLevel();
if (l.equals(Level.TRACE)) {
return "trace";
}
else if (l.equals(Level.DEBUG)) {
return "debug";
}
else if (l.equals(Level.INFO)) {
return "info";
}
else if (l.equals(Level.WARN)) {
return "warn";
}
else if (l.equals(Level.ERROR)) {
return "error";
}
else if (l.equals(Level.FATAL)) {
return "fatal";
}
else {
return "info";
}
}
COM: <s> returns the proper style for given log event </s>
|
funcom_train/34529328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertTextBox( String text) throws EditorException {
try {
XModel xModel = aBean.getController().getModel();
XTextDocument doc = (XTextDocument) UnoRuntime.queryInterface( XTextDocument.class, xModel );
ShapeHelper helper = new ShapeHelper();
helper.insertTextShape( doc, text );
} catch (Exception e) {
String msg = "Unable to insert the text box.";
throw new EditorException(msg, e);
}
}
COM: <s> insert a textbox shape into the current document </s>
|
funcom_train/49331308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Coordinate linearTransform(Coordinate orig) {
final double x,y,z;
x = rotation[X][X]*orig.x + rotation[X][Y]*orig.y + rotation[X][Z]*orig.z;
y = rotation[Y][X]*orig.x + rotation[Y][Y]*orig.y + rotation[Y][Z]*orig.z;
z = rotation[Z][X]*orig.x + rotation[Z][Y]*orig.y + rotation[Z][Z]*orig.z;
return new Coordinate(x,y,z,orig.weight);
}
COM: <s> applies only the linear transformation a x </s>
|
funcom_train/28123552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt(final int rowIndex, int columnIndex) {
switch (columnIndex) {
case 0:
return getPropertyDisplayName(rowIndex) + " (" + getPropertyDisplayClassName(rowIndex) + ")";
case 1:
return getPropertyItem(rowIndex);
default:
return "???";
}
}
COM: <s> get the value for the cell at code column index code and </s>
|
funcom_train/36461890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCheckedRadioButton() {
String obsTyp = new String("");
if (fest.getValue() == true) {
return fest.getText();
}
if (mobil.getValue() == true) {
return mobil.getText();
}
if (ampel.getValue() == true) {
return ampel.getText();
}
if (rad.getValue() == true) {
return rad.getText();
}
return obsTyp;
}
COM: <s> this method returns the selected type based on the radio buttons </s>
|
funcom_train/41730388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean divides(Monomial other) {
short [] ovalues = other.getValues();
if (ovalues.length>values.length) {
return false;
}
for (int i=0; i<values.length; i++) {
if (values[i]>ovalues[i]) {
return false;
}
}
return true;
}
COM: <s> returns true if this monomial divides the argument </s>
|
funcom_train/10597119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Stack getAncestors(TraversableSource source) throws IOException {
TraversableSource parent = source;
Stack ancestors = new Stack();
while ((parent != null) && !isRoot(parent)) {
parent = (TraversableSource) parent.getParent();
if (parent != null) {
ancestors.push(parent);
} else {
// no ancestor matched the root pattern
ancestors.clear();
}
}
return ancestors;
}
COM: <s> creates a stack containing the ancestors of a traversable source up to </s>
|
funcom_train/17203865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invoke(DepGraph dg) {
if (DEBUG) dg.printDepGraph();
BURS_STATE burs = new BURS_STATE(this);
buildTrees(dg);
if (haveProblemEdges()) {
problemEdgePrep();
handleProblemEdges();
}
orderTrees(dg);
labelTrees(burs);
generateTrees(burs);
}
COM: <s> build burs trees for dependence graph dg label the trees and </s>
|
funcom_train/32304121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Edge addAt(Edge e, int which_pred, Quad q, int which_succ) {
Quad frm = e.from(); int frm_succ = e.which_succ();
Quad to = e.to(); int to_pred = e.which_pred();
Quad.addEdge(frm, frm_succ, q, which_pred);
Quad.addEdge(q, which_succ, to, to_pred);
return to.prevEdge(to_pred);
}
COM: <s> helper routine to add a quad on an edge </s>
|
funcom_train/16770750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassLoader getClassLoader() {
log.debug("Class classloader: {} Thread classloader: {}", this.getClass().getClassLoader(), Thread.currentThread().getContextClassLoader());
return Thread.currentThread().getContextClassLoader();
}
COM: <s> enable sharing of the class loader with 3rd party e </s>
|
funcom_train/41163310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(ToQuestionGroup entity) {
EntityManagerHelper.log("deleting ToQuestionGroup instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(ToQuestionGroup.class, entity.getExerciseGroupId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent to question group entity </s>
|
funcom_train/21482662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean extractReplicatePuts(Properties properties) {
boolean replicatePuts;
String replicatePutsString = PropertyUtil.extractAndLogProperty(REPLICATE_PUTS, properties);
if (replicatePutsString != null) {
replicatePuts = PropertyUtil.parseBoolean(replicatePutsString);
} else {
replicatePuts = true;
}
return replicatePuts;
}
COM: <s> extracts the value of replicate puts from the properties </s>
|
funcom_train/9110560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void evaluateVisibilities() {
if (SessionInfoUtil.isUserLoggedIn()) {
this.loginLogoutPanel = new LoggedInPanel("LoginLogout");
this.topMenuePanel = new TopMenuePanel("HeaderMenuePanel");
} else {
this.loginLogoutPanel = new LoggedOutPanel("LoginLogout");
this.topMenuePanel = new TopMenuePanelPub("HeaderMenuePanel");
this.hideCalendar();
}
}
COM: <s> decides which elements to show when visitor is logged in logged out </s>
|
funcom_train/26245664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getConsumptionRate() {
switch (consumptionRate) {
case 0: return 100 * MILLION;
case 1: return 10 * MILLION;
case 2: return 1 * MILLION;
case 3: return 200 * THOUSAND;
case 4: return 50 * THOUSAND;
case 5: return 15 * THOUSAND;
case 6: return 5 * THOUSAND;
case 7: return 2 * THOUSAND;
case 8: return 1 * THOUSAND;
case 9: return 500;
case 10: return 250;
case 11: return 150;
case 12: return 100;
case 13: return 75;
case 14: return 50;
case 15: return 25;
}
return 1;
}
COM: <s> get the level of demand for this good based on its defined codes </s>
|
funcom_train/14371519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InteractionBox makeBox(CellGeom cg) {
if (null == cg)
return null;
SiteNode sn = (SiteNode) cg;
SplitLine[] minSplits = {sn.getMinLine(X), sn.getMinLine(Y)};
SplitLine[] maxSplits = {sn.getMaxLine(X), sn.getMaxLine(Y)};
return new InteractionBox(minSplits, maxSplits, sn, this);
}
COM: <s> create box enclosing the subtree beneath input node edge </s>
|
funcom_train/36717799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public boolean PendingTransientEvaluation() {
Node n = null;
Iterator<Node> it = htNodes.Values().iterator();
while (it.hasNext()) {
n = it.next();
if ((n.parents.length == 0) && // a root
!(n instanceof LevelTriggerNode) && // not LT
!(n instanceof EdgeTriggerNode) && // not ET
!n.rt_evaluated) // not yet evaluated
return true;
}
return false;
}
COM: <s> this function is used by sxe </s>
|
funcom_train/26401675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isUniqueUserid(String userid, boolean ignoreSelection) {
User actualUser = (User) getSelected();
if (userid == null) return false;
Iterator it = getListModel().getList().iterator();
while(it.hasNext()) {
User user = (User) it.next();
if (user.getUserid().equals(userid) &&
(ignoreSelection || actualUser != user)) return false;
}
return true;
}
COM: <s> check whether code userid code is a unique id </s>
|
funcom_train/3534557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillWithCrap(final File file) throws IOException {
assertNotNull(file);
assertTrue(file.canWrite());
final PrintWriter writer =
new PrintWriter(new BufferedWriter(new FileWriter(file)));
try {
writer.println("Junk line 1");
writer.println("Junk line 2");
writer.println("Junk line 3");
} finally {
writer.close();
}
}
COM: <s> puts meaningless content into the supplied </s>
|
funcom_train/269319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException {
int p0 = getStartOffset();
int p1 = getEndOffset();
if ((pos >= p0) && (pos <= p1)) {
Rectangle r = a.getBounds();
if (pos == p1) {
r.x += r.width;
}
r.width = 0;
return r;
}
return null;
}
COM: <s> provides a mapping from the document model coordinate space </s>
|
funcom_train/35291252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Worksheet getWorksheet() {
if (worksheet != null || !editable) {
return worksheet;
}
this.worksheetState = getWorksheetState();
this.worksheet = worksheetState.retrieveWorksheet();
if (worksheet == null || isClearingWorksheet(id, getWebContext())) {
this.worksheet = new Worksheet(id);
persistWorksheet(worksheet);
}
worksheet.setWebContext(getWebContext());
worksheet.setMessages(getMessages());
return worksheet;
}
COM: <s> get the worksheet </s>
|
funcom_train/14356388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDefaultPropertyIndex() {
String defName = "";
if (defName.equals("")) { return -1; }
PropertyDescriptor[] pd = getPropertyDescriptors();
for (int i = 0; i < pd.length; i++) {
if (pd[i].getName().equals(defName)) { return i; }
}
return -1;
}
COM: <s> gets the default property index </s>
|
funcom_train/3721708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
// Mark all running receiver threads to be stopped
for (Receiver receiver : receivers) {
if (receiver.isRunning())
receiver.stop();
}
// Forces open sockets to be closed. This causes the Receiver threads to
// eventually terminate
for (Socket socket : sockets) {
try {
if (!socket.isClosed())
socket.close();
} catch (Exception e) {
log.error("Error while stopping threads and closing sockets", e);
}
}
open = false;
}
COM: <s> stops running receiver threads and closes open sockets </s>
|
funcom_train/27841833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAsCurrent(final Component root) {
SwingUtilities.invokeLater(
new Runnable() {
public void run() {
try {
UIManager.setLookAndFeel(implementation);
SwingUtilities.updateComponentTreeUI(root);
} catch (Exception ex) {
LOG.error("Cannot set look and feel " + name, ex);
}
}
});
}
COM: <s> sets the as current </s>
|
funcom_train/35294454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doHistoryChanged() {
if (resultHistory.getSelectedIndex() >= 0) {
HistoryListEntry e = (HistoryListEntry)resultHistory.getSelectedItem();
resultListModel.setSize(e.values.size());
for (int i = 0; i < e.values.size(); i++) {
resultListModel.set(i, e.values.get(i));
}
setNumberOfResults(e.values.size());
}
}
COM: <s> history combobox changed </s>
|
funcom_train/45741073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCancelCommandWriter () {
if (cancelCommandWriter == null) {//GEN-END:|58-getter|0|58-preInit
// write pre-init user code here
cancelCommandWriter = new Command ("Cancel", Command.CANCEL, 0);//GEN-LINE:|58-getter|1|58-postInit
// write post-init user code here
}//GEN-BEGIN:|58-getter|2|
return cancelCommandWriter;
}
COM: <s> returns an initiliazed instance of cancel command writer component </s>
|
funcom_train/1477428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getClass(String className) {
if (m_listClasses == null) {
return null;
}
for (int i = 0; i < m_listClasses.size(); i++) {
Class c = (Class)m_listClasses.get(i);
if (c != null && c.getName().equals(className)) {
return c;
}
}
return null;
}
COM: <s> find a class using class name </s>
|
funcom_train/4563190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getLoginPageUrlWithRedirect(HttpRequest request) {
String uri = request.getRequestLine().getUri();//RequestUtils.getRequestPath(request);
if (! uri.endsWith(logoutActionUrl) && ! uri.endsWith(loginActionUrl)) {
try {
return loginPageUrl + "?"
+ redirectKey + "=" + URLEncoder.encode(uri, charset);
} catch (UnsupportedEncodingException e) {
}
}
return loginPageUrl;
}
COM: <s> after log in is attested url redirected to requested url is acquired </s>
|
funcom_train/37584952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean retainAll(Collection<?> c) {
boolean result = false;
for (Iterator<T> i = iterator(); i.hasNext(); ) {
T t = i.next();
if (! c.contains(t)) { i.remove(); result = true; }
}
return result;
}
COM: <s> removes every element of this set that is not in </s>
|
funcom_train/49040782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void scrollToCaret(boolean animate) {
ScrollingModel sm = editor.getScrollingModel();
boolean cut = shouldCut(animate);
try {
if (cut) sm.disableAnimation();
sm.scrollToCaret(ScrollType.MAKE_VISIBLE);
} finally {
if (cut) sm.enableAnimation();
}
}
COM: <s> scrolls to make the editor caret visible </s>
|
funcom_train/1444513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rotate(double alpha) {
this.length = this.getLength();
this.angle = Math.toRadians(this.getAngle() + alpha);
this.y = this.length * Math.cos(this.angle);
this.x = this.length * Math.sin(this.angle);
// Vektor temp = new Vektor(this.getLength(), this.getAngle() + alpha);
// this.x = temp.x;
// this.y = temp.y;
} // end of method rotate(int alpha)
COM: <s> rotates the vector at the angle of alpha </s>
|
funcom_train/8461804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedItem(PositionableInCharStream elmnt) {
CharStreamPosition pos = null;
if (elmnt != null)
pos = elmnt.getCharStreamPosition();
if (pos != null) {
int begin = pos.getStartIndex();
int end = pos.getEndIndex();
try {
setCaretPosition(end);
moveCaretPosition(begin);
getCaret().setSelectionVisible(true);
repaint();
}
catch (IllegalArgumentException excpt)
{}
}
}
COM: <s> highlights the specified element in the abc tune notation </s>
|
funcom_train/17892620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyReleased(final KeyEvent evt) {
if (evt.getKeyCode() == KeyEvent.VK_DELETE) {
final String message = "Bean Removed: " + item.getClass().getName();
removeBean(item);
firePropertyChange(ActionConstants.ACT_PROPERTY_MESSAGE, "", message);
}
}
COM: <s> deletes the selected bean </s>
|
funcom_train/12160511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveText() throws Exception {
ODOMXPath path = new ODOMXPath("cd/title/text()");
ODOMObservable removed = path.remove((ODOMObservable) root);
assertNotNull("Removed element should exist", removed);
assertTrue("Should be a Text node", removed instanceof Text);
Text element = (Text) removed;
assertEquals("Value should match", "Empire Burlesque",
element.getText());
}
COM: <s> test the removal of a text node </s>
|
funcom_train/26391824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fijiInputComboBoxActionPerformed(java.awt.event.ActionEvent evt) {
Object item = getSelectedItem();
int index = getSelectedIndex();
if (!has_no_input(item, index)) {
if (-1 == index) {
push_input();
}
}
}
COM: <s> respond to either a selection or an enter in the edit box </s>
|
funcom_train/32319080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(String to, String message) {
try {
if (sessions.get(to) != null) {
new PrintStream(sessions.get(to).getOutputStream()).print(message);
}
} catch (IOException e) {
LoggingService.getInstance().serverLog("Error sending message in Telnet Service. Message: " + message);
}
}
COM: <s> send a message back to the </s>
|
funcom_train/33718100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keypress(int key, char ch, boolean shift, boolean ctrl) {
AxedEvent e = eventPool.newEvent(AxedEvent.ATOMIC_NONE, AxedEvent.KEY_PRESS);
e.getKeyPress().issue(AxedEvent.KEY_PRESS, key, ch, shift, ctrl);
listeners.fireEvent(e);
eventPool.releaseEvent(e);
}
COM: <s> create a keypress </s>
|
funcom_train/18040381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean evaluate(String msg) {
try {
resultObj = ctw.evaluate(msg);
} catch (JavaScriptException e) {
e.printStackTrace();
resultObj = e.getMessage();
return false;
} catch (WrappedException we) {
we.printStackTrace();
resultObj = we.getMessage();
return false;
} catch (EvaluatorException ee) {
ee.printStackTrace();
resultObj = ee.getMessage();
return false;
}
if (resultObj == Context.getUndefinedValue()) {
resultObj = "null";
return false;
}
// updateScope();
return true;
}
COM: <s> evaluates the specified string by calling context thread wrapper </s>
|
funcom_train/1357907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getClassName() {
className.add("column1");
className.add("column2");
className.add("column3");
className.add("column4");
className.add("column5");
className.add("NoClass");
return this.className;
}
COM: <s> getter for property class name </s>
|
funcom_train/21936783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String joinComponents(final int start, final boolean skipLast) {
StringBuffer result = new StringBuffer();
if (start >= 0) {
String toAdd = "";
int i=start;
while (i<components.size() && StringUtils.isNotEmpty(components.get(i))) {
//add previous component to result
result.append(toAdd);
//setup variables
toAdd = components.get(i);
i++;
}
if (!skipLast) {
result.append(toAdd);
}
}
return result.toString();
}
COM: <s> returns a string with joined components values </s>
|
funcom_train/45348773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection getConnection() {
// added to get an impression what's happening with warnings
try {
for (SQLWarning w = con.getWarnings(); w != null; w = w
.getNextWarning())
log.warn("getConnection: " + w);
con.clearWarnings();
} catch (SQLException e) {
log.error("clearWarnings: " + e);
} catch (Exception e) {
log.error("clearWarnings: " + e);
}
return con;
}
COM: <s> gets the database connection </s>
|
funcom_train/49637469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String parseList(List list) {
StringBuilder b = new StringBuilder();
b.append("[");
for (Object o : list) {
if (b.length() > 1) {
b.append (", ");
}
b.append(parseObject(o));
}
b.append("]");
return b.toString();
}
COM: <s> creates a string representation of the a list this string is in json </s>
|
funcom_train/25127260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createMapManager(Manifest manifest) {
mapManager = null;
try {
Object o = ExtensionManager.getInstance().loadAndCreateInstance(manifest, KEY_MAP_MANAGER_PROVIDER);
if (o != null) {
mapManager = (MapManager) o;
}
} catch (ClassCastException ex) {
Logger.out("Class Cast Exception for " + ex.getMessage());
if (Logger.DEBUG) {
Logger.printStackTrace(ex);
}
}
}
COM: <s> create the optional binary definition file decoder </s>
|
funcom_train/12774277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PhiValue getPhiValue(int valueNumber) {
try {
return (PhiValue) values[valueNumber];
} catch (ArrayIndexOutOfBoundsException e) {
throw new IllegalArgumentException("invalid valueNumber: " + valueNumber);
} catch (ClassCastException e) {
throw new IllegalArgumentException("invalid valueNumber: " + valueNumber);
}
}
COM: <s> return the phi value that is associated with a given value number </s>
|
funcom_train/7966649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(EvPopulation<EvBinaryVectorIndividual> population) {
this.population = population;
nodes = new EvBinaryBayesianNode[population.get(0).getDimension()];
for (int i = 0; i < nodes.length; i++) {
nodes[i] = new EvBinaryBayesianNode(i);
}
generated_probabilities = false;
}
COM: <s> set new population generates new nodes in network </s>
|
funcom_train/26024810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getParentModelRootNodeName(PortView port) {
DefaultGraphCell childSource = (DefaultGraphCell) port.getCell();
DefaultGraphCell source = (DefaultGraphCell) childSource.getParent();
Element model = (Element) source.getUserObject();
ElementTreeNode root = (ElementTreeNode) model.getRoot();
return root.getDeclaration().getName();
}
COM: <s> returns the name of the name of the arch pad element </s>
|
funcom_train/10183846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setFrameUi() {
//get the ui information from currentState and have the frame display them
frame.setContentPane(currentState.getContentPane());
//enters current data (all kinds of values) into the UI's labels, text fields, ...
currentState.updateContentPane();
//sets the focus for the state's ui (if one is specified in the state)
JComponent focusComponent = currentState.getComponentForFocus();
if (focusComponent != null) {
focusComponent.requestFocus();
}
}
COM: <s> sets the content of the ui the application window according to </s>
|
funcom_train/10344444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Track copy() {
Track track = new Track();
track.setStartPosition(getStartPosition());
for(int a=0; a<events.size(); a++)
track.add(((TrackEvent)events.elementAt(a)).copy());
return track;
}
COM: <s> some kind of copy constructor </s>
|
funcom_train/31669017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double calcZMin() {
double zmin = Double.POSITIVE_INFINITY;
if (data[0].z<zmin)
zmin=data[0].z;
for (int i =1; i < data.length; i++)
{
if(data[i].z<zmin)
zmin=data[i].z;
// check for an asymptote
if (Math.abs(data[i-1].z - data[i].z) > ASYMPTOTE_TOL) {
zmin = -ASYMPTOTE_DEFAULT;
break;
}
}
return zmin;
}
COM: <s> calc zmin finds the minimum z value contained in the </s>
|
funcom_train/9827789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int numUnsetValues() {
int numUnset = 0;
int column = _model.getColumnCount() - 1;
for ( int row = 0; row < _model.getRowCount(); ++row ) {
if ( null == _model.getValueAt( row, column ) )
++numUnset;
}
return numUnset;
} // end method numUnsetValues
COM: <s> returns the number of null values in the right most column of </s>
|
funcom_train/49705030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parseTagText(StringBuffer sbuf, String text, boolean multi) {
String listTypeKey = tagPrefs.getPref(LISTTYPE);
ListType listType = ListType.lookup(listTypeKey);
boolean doTable = false;
if (multi
&& (listType == ListTag.TABLE_LIST))
doTable = true;
if (doTable)
sbuf.append("<td>");
formatText(sbuf, text, "text");
if (doTable)
sbuf.append("</td>\n");
}
COM: <s> generate formatted html for the given tag text </s>
|
funcom_train/48151352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getQuartile(int i) {
if (i < 1) i = 1;
else if (i > 3) i = 3;
if (i == 1) return getMedian(domain.getLowerValue(), getMedian());
else if (i == 2) return getMedian();
else return getMedian(getMedian(), domain.getUpperValue());
}
COM: <s> this method returns the quartiles of the data set </s>
|
funcom_train/15453093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int compare(ITreeNode node0, ITreeNode node1) {
int returnValue = 0;
Date date0 = node0.getMessage().getDate();
Date date1 = node1.getMessage().getDate();
if (date0.before(date1)) {
returnValue = -1;
} else if (date0.equals(date1)) {
returnValue = 0;
} else if (date0.after(date1)) {
returnValue = 1;
}
return returnValue;
}
COM: <s> compares two nodes by date </s>
|
funcom_train/44869405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WCMDrawGeometricBean getFXPoint() {
if (fXPoint == null) {
fXPoint = new WCMDrawGeometricBean();
fXPoint.setShape(10);
fXPoint.setFillColor(Color.blue);
fXPoint.setColor(Color.blue);
fXPoint.setX1(getXInput());
fXPoint.setY1(getFOfX());
fXPoint.setV(3);
fXPoint.setH(3);
if (presentation) {
fXPoint.setV(5);
fXPoint.setH(5);
fXPoint.setLineWidth(3);
}
}
return fXPoint;
}
COM: <s> this method initializes f xpoint </s>
|
funcom_train/41457767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(Channel other) {
txPipe.connect(mixer.getOutput());
txPipe.connect(other.splitter.getInput());
other.txPipe.connect(other.mixer.getOutput());
other.txPipe.connect(splitter.getInput());
txPipe.start();
other.txPipe.start();
}
COM: <s> joins with other channel </s>
|
funcom_train/4919941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTaskNotOnDesk() {
TaskModel task = new TaskModel("TASK", false, "WORK", "WORK_TASK", null);
Change<TaskModel> change = this.operations.setTaskAsPublic(true, task);
this.assertChange(change, task, "Set task TASK public", false,
"Task TASK not on desk");
}
COM: <s> ensure no change if the </s>
|
funcom_train/41165600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoSequenceType entity) {
EntityManagerHelper.log("saving CoSequenceType instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co sequence type entity </s>
|
funcom_train/31477947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendContainerContents() throws IOException {
int id = in.readInt();
int timestamp = in.readInt();
Item item = World.getInstance().getItemTable().getItem(id);
if ((item == null) || (!(item instanceof ContentSender)) ||
(!player.canReach(item))) {
out.writeByte(ILLEGAL_ACCESS);
} else {
((ContentSender)item).sendContentsData(out, timestamp);
}
sendOk();
}
COM: <s> sends the contents data of the given container </s>
|
funcom_train/7505386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDaoFromMap() {
Map daoMap = (Map) getApplicationContext().getBean("daoMap");
assertNotNull(daoMap);
Object dao = daoMap.get("entityTCDao");
assertNotNull(dao);
assertTrue(DaoUtils.isDao(dao));
}
COM: <s> test the retrieval of a dao from the dao map </s>
|
funcom_train/27811833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NetworkStatus getNetworkStatus() {
NetworkService.Status portForwardingStatus = networkService.getPortForwardingStatus();
NetworkService.Status urlRedirectionStatus = networkService.getURLRedirecionStatus();
return new NetworkStatus(portForwardingStatus.getText(),
portForwardingStatus.getDate(),
urlRedirectionStatus.getText(),
urlRedirectionStatus.getDate());
}
COM: <s> returns status for port forwarding and url redirection </s>
|
funcom_train/11016241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getExternSheetNumber(){
if (field_13_name_definition.getEncodedSize() < 1) {
return 0;
}
Ptg ptg = field_13_name_definition.getTokens()[0];
if (ptg.getClass() == Area3DPtg.class){
return ((Area3DPtg) ptg).getExternSheetIndex();
}
if (ptg.getClass() == Ref3DPtg.class){
return ((Ref3DPtg) ptg).getExternSheetIndex();
}
return 0;
}
COM: <s> gets the extern sheet number </s>
|
funcom_train/24089281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addIdentificationWorkflowResultItem(DigitalObject inputDigo, List<String> identifier, long startTime, long endTime, String logInfo){
WorkflowResultItem item = new WorkflowResultItem(WorkflowResultItem.SERVICE_ACTION_IDENTIFICATION,startTime,endTime,logger);
item.setInputDigitalObject(inputDigo);
if((identifier!=null)&&(identifier.size()>0)){
item.setExtractedInformation(identifier);
}
item.addLogInfo(logInfo);
}
COM: <s> document a identification specific workflow result item </s>
|
funcom_train/23309530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSubIntervalCount(Comparable rowKey, Comparable columnKey) {
int result = 0;
int row = getRowIndex(rowKey);
SchedSeries series = (SchedSeries) this.data.get(row);
Sched task = series.get(columnKey.toString());
if (task != null) {
result = task.getSubtaskCount();
}
return result;
}
COM: <s> returns the number of sub intervals for a given item </s>
|
funcom_train/39482662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*
* public void testAwaitNanos_Timeout() { final ReentrantLock lock = new
* ReentrantLock(); final Condition c = lock.newCondition(); try {
* lock.lock(); long t = Utils.awaitNanos(c, 100); assertTrue(t <= 0);
* lock.unlock(); } catch (Exception ex) { unexpectedException(); } }
COM: <s> await nanos without a signal times out </s>
|
funcom_train/46098277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getPacienteModificacionItem() {
if (pacienteModificacionItem == null) {
pacienteModificacionItem = new JMenuItem();
pacienteModificacionItem.setText("Modificacion");
pacienteModificacionItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("modi"); // TODO Auto-generated Event stub actionPerformed()
pacienteModi_actionPerformed(e);
}
});
}
return pacienteModificacionItem;
}
COM: <s> this method initializes paciente modificacion item </s>
|
funcom_train/27763724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ParamSetter pickParamSetter(String paramType) {
ParamSetter setter = null;
Class setterClass = null;
setterClass = (Class) setterClasses.get(paramType.toLowerCase());
if (setterClass != null)
{
try
{
setter = (ParamSetter) setterClass.newInstance();
}
catch (Exception ignore) {}
}
if (setter == null)
{
setter = new ObjectParamSetter();
}
return setter;
}
COM: <s> pick the correct setter for the given type </s>
|
funcom_train/30252284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void firePropertyChangeEvent(final String propertyName, final Object oldValue, final Object newValue) {
if (listenerList == null) {
return;
}
//@todo: sanity check for oldValue == newValue, with nulls
final PropertyChangeEvent evt = new PropertyChangeEvent(this, propertyName, oldValue, newValue);
for (PropertyChangeListener listener : listenerList) {
listener.propertyChange(evt);
}
}
COM: <s> notifies all registered listeners about the event </s>
|
funcom_train/10267551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getFormName(TaskInformation taskInfo){
String result = new String();
try{
result = URLEncoder.encode(taskInfo.getTaskID()+".xhtml", "UTF-8");
}
catch(UnsupportedEncodingException e){
e.printStackTrace();
}
return result;
}
COM: <s> returns the name of the form to edit a work item </s>
|
funcom_train/13869745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addValuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StringValue_value_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StringValue_value_feature", "_UI_StringValue_type"),
SmartGenPackage.Literals.STRING_VALUE__VALUE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the value feature </s>
|
funcom_train/45599160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Connection getConnection(DataSource dataSource) {
Connection connection = cachedConnections.get(dataSource);
if (connection == null) {
try {
connection = dataSource.getConnection();
} catch (SQLException e) {
throw new DatabaseException("Error while creating connection", e);
}
cachedConnections.put(dataSource, connection);
}
return connection;
}
COM: <s> returns a connection to the given data source </s>
|
funcom_train/46735675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueUnitRef(DisplayModel valueUnitRef) {
if (Converter.isDifferent(this.valueUnitRef, valueUnitRef)) {
DisplayModel oldvalueUnitRef= new DisplayModel(this);
oldvalueUnitRef.copyAllFrom(this.valueUnitRef);
this.valueUnitRef.copyAllFrom(valueUnitRef);
setModified("valueUnitRef");
firePropertyChange(String.valueOf(FORMRECORDDETAILLOGS_VALUEUNITREFID), oldvalueUnitRef, valueUnitRef);
}
}
COM: <s> quantitative values stored in the form record detail are measure in these units </s>
|
funcom_train/39179098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String tableName(String prefix, String suffix) {
StringBuilder str = new StringBuilder("\"");
if(prefix != null) str.append(prefix);
str.append(tableBaseName);
if(suffix != null) str.append(suffix);
str.append("\"");
return str.toString();
}
COM: <s> creates a table index etc </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.