__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/45802856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() {
Collection children = getChildren();
Iterator childrenIt = children.iterator();
while (childrenIt.hasNext()) {
ChildIF currentChild = (ChildIF)childrenIt.next();
currentChild.delete();
}
// Delete the topic, all associations it's part of and all its occurrences
topic.remove();
}
COM: <s> delete this menu with all headings and items </s>
|
funcom_train/14638046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onCallTransferAccepted(ExtendedCall call, Message resp)
{ printLog("onCallTransferAccepted()",LogLevel.LOW);
if (call!=this.m_extendedCall) { printLog("NOT the current call",LogLevel.LOW); return; }
printLog("Transfer accepted",LogLevel.HIGH);
}
COM: <s> callback function called when a m extended call transfer is accepted </s>
|
funcom_train/17094055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Node findOrMakePrefNode(PrefData pd, Graph g) {
Node ret = null;
List<Node> list = g.getNodes(pd);
if (list.size() == 0) {
ret = new Node(pd);
NodeCallback nodeCB = new NodeCB();
ret.setAction(Graph.GRAY, nodeCB);
} else if (list.size() == 1) {
ret = (Node) list.get(0);
}
return ret;
}
COM: <s> used during preferred size computation </s>
|
funcom_train/16544134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentAlgorithm(final AlgoType algorithm) {
if (algorithm == AlgoType.NestedFLT)
this.view.setVisType(GraphAnimationView.VisType.Nested);
else
this.view.setVisType(GraphAnimationView.VisType.Standard);
if (this.algorithms.get(algorithm) != null)
this.currentAlgorithm = algorithm;
//for (Node n : this.getAllNodes())
// n.reset();
this.performGraphLayout();
}
COM: <s> sets the current algorithm </s>
|
funcom_train/31931790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void debug(Object innerClass, String message) {
String filler = ": ";
if (innerClass != null) {
filler = "$" + innerClass.getClass().getSimpleName() + filler;
}
LoggerOps.debug(null, getClass().getName() + filler + message, null);
}
COM: <s> output a debug message by prepending code inner class code information to </s>
|
funcom_train/20979334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getArrowPreferredSize(int direction) {
Dimension dimension = null;
if (skina.getSplitPane() != null) {
dimension = skina.getSplitPane().getArrowPreferredSize(direction);
}
if ((dimension == null) && (skinb.getSplitPane() != null)) {
dimension = skinb.getSplitPane().getArrowPreferredSize(direction);
}
return dimension;
}
COM: <s> gets the arrow preferred size attribute of the compound split pane object </s>
|
funcom_train/29774209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeDocumentText(int offset, int length) {
System.out.println(offset + " REMOVE " + length);
try {
String first = document.get(0, offset);
String last = document.get(offset + length, document.getLength()
- offset - length);
first = first + last;
System.out.println(first);
document.set(first);
setDirty(true);
} catch (BadLocationException e) {
message("Could not remove text from document: ",e);
}
}
COM: <s> removes text in the document </s>
|
funcom_train/19643475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getWeigthedAverage() {
double sampleSpace = 1/((double)N*19 + 80);
for (int i = 1; i < cost.length - 1; i++) {
if (i % 5 != 0)
sumNot5 += cost[i];
else
sum5 += cost[i];
}
double wAvg = (((double) sum5 * sampleSpace ) * N + ((double) sumNot5 *sampleSpace));
return wAvg;
}
COM: <s> calculates the weighted average </s>
|
funcom_train/24185522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(final AddableBigDecimal o, double error) {
if (o == PlusInfinity.PLUS_INF) {
return -1;
} else if (o == MinInfinity.MIN_INF) {
return +1;
} else {
double diff = this.val.subtract(o.val).doubleValue();
if (diff <= error && diff >= -error) {
return 0;
} else if (diff < 0) {
return -1;
} else
return 1;
}
}
COM: <s> compares this real number with another one with some error margin </s>
|
funcom_train/19309819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void closefile() throws PsOperatorException {
final PsObject object = popOperand(PsOperator.CLOSEFILE);
if (! (object instanceof PsFile)) {
throw new PsOperatorException(PsError.TYPECHECK, PsOperator.CLOSEFILE);
}
final PsFile file = (PsFile) object;
file.close();
}
COM: <s> executes the closefile operator </s>
|
funcom_train/43895560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireChanged(String typeName, Transaction transaction, boolean commit) {
Map.Entry entry;
FeatureSource featureSource;
FeatureListener[] listeners;
FeatureEvent event;
if (commit) {
fireCommit(typeName, transaction, FeatureEvent.FEATURES_CHANGED, null);
} else {
fireEvent(typeName, transaction, FeatureEvent.FEATURES_CHANGED, null);
}
}
COM: <s> notify all listeners that have registered interest for notification on </s>
|
funcom_train/29290270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getAllCompetitionLiveForFatculty() throws Exception{
SurveySession surveySession = SessionBeanFactory.getSurveySessionRemoteObject();
Integer survey_type_id = 2;
Integer survey_status_id = 2;
Integer group_id = 4;
return surveySession.getAllSurveyLiveWhereGroupId(survey_type_id, survey_status_id, group_id);
}
COM: <s> return all survey live for fatculty </s>
|
funcom_train/18897207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean last() throws SQLException {
boolean returnState = false;
if ( (this.rows != null) && (this.rows.size() > 0)) {
this.currentRowIndex = this.rows.size();
this.currentRow = (ResultSetRow)this.rows.get(this.currentRowIndex - 1);
returnState = true;
}
return returnState;
}
COM: <s> moves the cursor to the last row in the result set </s>
|
funcom_train/11345088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DependencyDescription getDependency(String specification) {
DependencyDescription[] deps = getDependencies();
if (deps == null) {
return null;
} else {
for (int i = 0; i < deps.length; i++) {
if (specification.equals(deps[i].getId())
|| specification.equals(deps[i].getSpecification())) {
return deps[i];
}
}
}
return null;
}
COM: <s> gets the instance service dependency matching with the given service specification or id </s>
|
funcom_train/8081847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getEvaluatorSpec() {
AttributeEvaluator a = m_evaluator;
if (a instanceof OptionHandler) {
return a.getClass().getName() + " "
+ Utils.joinOptions(((OptionHandler)a).getOptions());
}
return a.getClass().getName();
}
COM: <s> get the evaluator options as a string </s>
|
funcom_train/4230804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getUnconnectedVertices(boolean ordered) {
Collection vertices = getAll();
Set result = null;
if (ordered && order != null) {
result = new TreeSet(order);
} else {
result = new LinkedHashSet();
}
Iterator it = vertices.iterator();
while (it.hasNext()) {
Object cell = it.next();
// Check if cell is unconnected vertex
if (DefaultGraphModel.isVertex(model, cell)) {
Object[] edges = getEdges(cell);
if (edges == null || edges.length == 0) {
result.add(cell);
}
}
}
return result;
}
COM: <s> returns all unconnected vertices in the graph </s>
|
funcom_train/6274665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getFMeasure() {
if (getPrecisionScore() + getRecallScore() > 0) {
return 2 * (getPrecisionScore() * getRecallScore()) /
(getPrecisionScore() + getRecallScore());
}
else {
// cannot divide by zero, return error code
return -1;
}
}
COM: <s> retrieves the f measure score </s>
|
funcom_train/12832701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumn(String columnName) throws SQLException{
for (int loop = 0; loop < columnNames.length; loop++){
if (columnName.equalsIgnoreCase(columnNames[loop]) ||
columnName.equalsIgnoreCase(getTableName() + "." + columnNames[loop])){
return getColumn(loop);
}
}
throw new SQLException("Column '" + columnName + "' not found.");
}
COM: <s> get value from column at specified name </s>
|
funcom_train/23411482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIndividualPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_IndividualID_individual_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_IndividualID_individual_feature",
"_UI_IndividualID_type"),
SwrlPackage.Literals.INDIVIDUAL_ID__INDIVIDUAL, true, false,
true, null, null, null));
}
COM: <s> this adds a property descriptor for the individual feature </s>
|
funcom_train/31294295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void waitChanged() throws InterruptedException {
synchronized (expectedChanges) {
if (expectedChanges.isEmpty()) {
return;
}
}
synchronized (this) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("waiting for voice change...");
}
while (!expectedChanges.isEmpty()) {
this.wait(300);
}
}
}
COM: <s> waits until an event hat been issued </s>
|
funcom_train/34341543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTelefono2() {
if (Telefono2 == null) {//GEN-END:|28-getter|0|28-preInit
// write pre-init user code here
Telefono2 = new TextField("Telefono2", null, 9, TextField.NUMERIC);//GEN-LINE:|28-getter|1|28-postInit
// write post-init user code here
}//GEN-BEGIN:|28-getter|2|
return Telefono2;
}
COM: <s> returns an initiliazed instance of telefono2 component </s>
|
funcom_train/555428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveHistory() throws Exception {
try {
final History historyToSave = History.getCurrentHistory();
final IHistoryManager historyManager = HistoryManagerFactory.getCurrentImpl();
historyManager.saveHistory(historyToSave, historyPath);
final String msg = Messages.getLogMessage("APPLICATION_WILL_STOP_SAVE_HISTORY_OK");
logger.debug(msg);
} catch (final Exception e) {
final String msg = Messages.getLogMessage("APPLICATION_WILL_STOP_SAVE_HISTORY_KO");
logger.error(msg, e);
return;
}
}
COM: <s> saves the applications history </s>
|
funcom_train/10228675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void actionError(STBinding actionBinding, Throwable th) throws STException {
th = STUtil.unwind(th);
th.printStackTrace();
throw (th instanceof STException) ? (STException) th : new STException(
"Error performing action '" + actionBinding.getSpecification() + "'",
th);
}
COM: <s> action error handler </s>
|
funcom_train/24645229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toInsertValuesString() {
StringBuilder sb = new StringBuilder();
for (SQLColumn c : COLUMNS) {
if (!c.isInsertable()) {
continue;
}
if (sb.length() > 0) {
sb.append(",");
}
sb.append(c.getFormatedColumnName());
}
return sb.toString();
}
COM: <s> not incluidng primary keys </s>
|
funcom_train/42570466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendNow(List<MidiMessage> midiMessages) {
// nothing to send if there are no transmitters
if (_transmitters.isEmpty()) {
return;
}
// send messages to each registered transmitter
synchronized(_transmitters) {
for (Transmitter transmitter : _transmitters) {
for (MidiMessage midiMessage : midiMessages) {
sendNow(midiMessage, transmitter);
}
}
}
}
COM: <s> sends a list of midi messages immediately to all transmitters registered </s>
|
funcom_train/7384873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Dimension getScaledPreferredSizeForGraph() {
mxRectangle bounds = graph.getGraphBounds();
int border = graph.getBorder();
return new Dimension((int) Math.round(bounds.getWidth()) + border + 1,
(int) Math.round(bounds.getHeight()) + border + 1);
}
COM: <s> returns the scaled preferred size for the current graph </s>
|
funcom_train/40344911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void work(WebView wv, String message, String targetStr) {
if (targetStr.equals("ej") || targetStr.equals("je")) {
wv.loadUrl("http://pipes.yahoo.com/poolmmjp/" + targetStr + "_translation_api?_render=rss&text=" + message);
}
}
COM: <s> web view wv new web view this </s>
|
funcom_train/2399619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tree headTerminal(HeadFinder hf, Tree parent) {
if (isLeaf()) {
return this;
}
Tree head = hf.determineHead(this, parent);
if (head != null) {
return head.headTerminal(hf, parent);
}
System.err.println("Head is null: " + this);
return null;
}
COM: <s> returns the tree leaf that is the head of the tree </s>
|
funcom_train/20888652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Watt getAveragePowerConsumption() {
Watt avgConsumption = new Watt();
if (consumerController != null) {
avgConsumption.addWatt(consumerController.getAveragePowerConsumption());
}
if (consumerTransceiver != null) {
avgConsumption.addWatt(consumerTransceiver.getAveragePowerConsumption());
}
for (PowerConsumer consumer : consumerOtherDevices) {
avgConsumption.addWatt(consumer.getAveragePowerConsumption());
}
return avgConsumption;
}
COM: <s> determines the average amount of power consumed by all components </s>
|
funcom_train/15660481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String trimLeading(String s) {
if ( s == null ) {
return null;
}
int len = s.length();
int st = 0;
while ( (st < len) && (s.charAt(st) <= ' ') ) {
st++;
}
return (st > 0) ? s.substring(st, len) : s;
} // end trimLeading
COM: <s> removes white space from beginning this string </s>
|
funcom_train/16462303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void exportMessages(List<Message> messages, String filename) throws IOException {
CsvRowFormat rowFormat = getRowFormatForMessage();
if (!rowFormat.hasMarkers()) {
uiController.alert(InternationalisationUtils.getI18NString(MESSAGE_NO_FIELD_SELECTED));
log.trace("EXIT");
return;
}
if(log.isDebugEnabled()) log.debug("Row Format: " + rowFormat);
CsvExporter.exportMessages(new File(filename), messages, rowFormat, contactDao);
uiController.setStatus(InternationalisationUtils.getI18NString(MESSAGE_EXPORT_TASK_SUCCESSFUL));
}
COM: <s> export the supplied </s>
|
funcom_train/43021961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getJComboBox1() {
if (jComboBox1 == null) {
jComboBox1 = new JComboBox();
jComboBox1.setBounds(new Rectangle(238, 10, 63, 24));
jComboBox1.addItem("1");
jComboBox1.addItem("2");
jComboBox1.addItem("3");
jComboBox1.addItem("4");
jComboBox1.addItem("5");
jComboBox1.addItem("6");
jComboBox1.addItem("7");
}
return jComboBox1;
}
COM: <s> this method initializes j combo box1 </s>
|
funcom_train/37079262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean handleAnnotationChangeEvent(AnnotationChangeEvent evt) {
if (evt.getSource() == this)
return false;
else if (evt.isCompound() || evt.isEndOfEditSession()) {
setFeature(evt.getAnnotTop(), true);
return true;
}
return false;
}
COM: <s> calls set feature with new annotation </s>
|
funcom_train/40448565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runSimulations(int number) {
int totalSteps=0,totalSuccesses=0;
for(int i=0;i<number;i++) {
init();
if(runSimulation()) {
if(DEBUG)System.err.println(steps);
totalSteps+=steps;
totalSuccesses++;
}
}
System.err.printf("Running %d simulations at %d steps./n",number,NUM_STEPS);
System.err.printf("Average Success Rate: %f. Averages Steps per Success %f\n",totalSuccesses/(double)number,totalSteps/(double)totalSuccesses);
}
COM: <s> runs multiple simulations </s>
|
funcom_train/8484967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ATObject base_try_using_(ATClosure tryBlock, ATHandler handler) throws InterpreterException {
try {
return tryBlock.base_apply(NATTable.EMPTY);
} catch(InterpreterException e) {
ATObject exc = e.getAmbientTalkRepresentation();
if (handler.base_canHandle(exc).asNativeBoolean().javaValue) {
return handler.base_handle(exc);
} else {
throw e;
}
}
}
COM: <s> the tt try try block using handler tt construct </s>
|
funcom_train/26067756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GeoPoint fromPixels(float x, float y) {
/* Subtract the offset caused by touch. */
x -= OSMMapView.this.mTouchMapOffsetX;
y -= OSMMapView.this.mTouchMapOffsetY;
return this.bb.getGeoPointOfRelativePositionWithLinearInterpolation(x / this.viewWidth, y / this.viewHeight);
}
COM: <s> converts x y screen coordinates to the underlying geo point </s>
|
funcom_train/28116715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DeliveryTypes getDeliveryTypes() {
DeliveryTypes result = null;
String test = getName();
String[] types = types = AttributeHelper.getAttributes(
getClass(), test, "jmscts.delivery", false);
if (types.length == 0) {
result = DeliveryTypes.ALL;
} else {
result = DeliveryTypes.fromString(types);
}
return result;
}
COM: <s> return the delivery types to run this test case against </s>
|
funcom_train/3885129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFormatPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DocumentRoot_format_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_format_feature", "_UI_DocumentRoot_type"),
ImsmdRootv1p2p1Package.Literals.DOCUMENT_ROOT__FORMAT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the format feature </s>
|
funcom_train/1678630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void putUnsignedInt(byte[] buf, long value) {
int i = 0;
buf[i++] = (byte) (value >>> 0);
buf[i++] = (byte) (value >>> 8);
buf[i++] = (byte) (value >>> 16);
buf[i] = (byte) (value >>> 24);
}
COM: <s> marshall an unsigned int long into a four byte buffer </s>
|
funcom_train/38463643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rollback() throws StorageException {
if(!isActive()) {
throw new IllegalStateException("Transaction is not active");
}
try {
manager.transactionRollback(new TransactionEvent(this));
tx.rollback();
}
catch(SQLException sqle) {
throw new StorageException("Error on transaction rollback",sqle);
}
finally {
finish(STATUS_ROLLEDBACK);
}
}
COM: <s> rolls back the transaction </s>
|
funcom_train/291404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean validateValue(String valueExpression, Object value) {
ValueExpression ve = application.getExpressionFactory()
.createValueExpression(facesContext.getELContext(),
valueExpression, Object.class);
InvalidValue[] ivs = Validators.instance().validate(ve,
facesContext.getELContext(), value);
if (ivs.length > 0) {
validationFailed = true;
facesContext.addMessage(null, FacesMessages.createFacesMessage(
FacesMessage.SEVERITY_ERROR, ivs[0].getMessage()));
return false;
} else {
return true;
}
}
COM: <s> validate the value against model based constraints return true if the </s>
|
funcom_train/18057706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getDeleteGMapButton() {
if (deleteGMapButton == null) {
deleteGMapButton = new JButton();
deleteGMapButton
.setBounds(new Rectangle(131, 34, 78, 26));
deleteGMapButton.setText("Delete");
deleteGMapButton
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
deleteTopCMap();
}
});
}
return deleteGMapButton;
}
COM: <s> this method initializes delete gmap button </s>
|
funcom_train/36423902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MoneyAmountStyle withNegativeSignCharacter(Character negativeCharacter) {
int negativeVal = (negativeCharacter == null ? -1 : negativeCharacter);
if (negativeVal == iNegativeCharacter) {
return this;
}
return new MoneyAmountStyle(
iZeroCharacter,
iPositiveCharacter, negativeVal,
iDecimalPointCharacter, iGroupingCharacter,
iGroupingSize, iGrouping, iForceDecimalPoint);
}
COM: <s> returns a copy of this style with the specified negative sign character </s>
|
funcom_train/2380599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeScrollBars(ScrolledComposite scrolledComposite) {
ScrollBar hbar = scrolledComposite.getHorizontalBar();
if(hbar != null) {
hbar.setPageIncrement(H_SCROLL_INCREMENT);
}
ScrollBar vbar = scrolledComposite.getVerticalBar();
if(vbar != null) {
vbar.setIncrement(V_SCROLL_INCREMENT);
}
}
COM: <s> set the scroll rates </s>
|
funcom_train/4531716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TaskStatus findFinishedMap(int mapId) {
TaskInProgress tip = maps[mapId];
if (tip.isComplete()) {
TaskStatus[] statuses = tip.getTaskStatuses();
for(int i=0; i < statuses.length; i++) {
if (statuses[i].getRunState() == TaskStatus.State.SUCCEEDED) {
return statuses[i];
}
}
}
return null;
}
COM: <s> find the details of someplace where a map has finished </s>
|
funcom_train/20434248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Solution execute() {
init();
double standardDeviation;
for (int i = 0; i < this.maxIterations; i++) {
iteration = i;
iterate();
standardDeviation = Statistics.getStandardDeviation(allFitness);
if (standardDeviation < this.standardDeviation) {
break;
}
//if (iteration == 30) break;
}
// Calculating the gbest particle
for (int i = 0; i < swarmSize; i++) {
Particle particle = swarm[i];
particle.updatePBest();
calculateGBest(particle);
}
return gBestParticle;
}
COM: <s> responsible for executing the algorithm </s>
|
funcom_train/38499813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer format(Date date, StringBuffer toAppendTo,
FieldPosition pos) {
long millis = date.getTime();
if (millis < 0) {
toAppendTo.append("- ");
date = new Date(Math.abs(millis));
}
return super.format(date, toAppendTo, pos);
}
COM: <s> formats the given code date code into a date time string and appends </s>
|
funcom_train/29788559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStart() throws InterruptedException {
StopWatch watch = new StopWatch();
StopWatch watch2 = new StopWatch();
watch.stop();
watch2.stop();
watch2.start();
Thread.sleep(50);
long difference = watch.getTiming() - watch2.getTiming();
if (Math.abs(difference) < 40) {
fail("Stopwatch wasnt restarted correctly.");
}
}
COM: <s> tests to restarts the stop watch and then stop it </s>
|
funcom_train/2912054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGraphProperty(URI predicate,Node object) {
//graph.remove(this.resource, predicate, null);
try {
//this.resource.addProperty(predicate, object);
model.removeStatements(null,this.resource, predicate, Variable.ANY);
model.addStatement(null,this.resource, predicate, object);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// graph.add(this.resource, predicate, object);
}
COM: <s> convinience method for setting a property of this rdf resource in the </s>
|
funcom_train/41435159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void eventRouted(EventTypeID eventTypeID, long routingTime) {
EventTypeRoutingStatisticsImpl eventTypeRoutingStatistics = eventTypeRoutingStatisticsMap.get(eventTypeID);
if (eventTypeRoutingStatistics == null) {
synchronized (eventTypeRoutingStatisticsMap) {
eventTypeRoutingStatistics = new EventTypeRoutingStatisticsImpl(eventTypeID);
eventTypeRoutingStatisticsMap.put(eventTypeID, eventTypeRoutingStatistics);
}
}
eventTypeRoutingStatistics.eventRouted(routingTime);
taskExecuted(routingTime);
}
COM: <s> adds the time for an event routing with a specific </s>
|
funcom_train/27821478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean shouldUpdateModel(List viewables) {
if (m_viewables==null || m_viewables.length!=viewables.size())
return true;
for (int i=0;i<m_viewables.length;i++)
if (!viewables.contains(m_viewables[i]))
return true;
return false;
}
COM: <s> checks whether should update the model </s>
|
funcom_train/40359631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAuthenticateRepositoryLoginException() throws Exception {
instantiator.addConnector(connectorName, new MockConnector(null,
new ExceptionalAuthenticationManager(new RepositoryLoginException()),
null, null));
AuthenticationResponse response =
manager.authenticate(connectorName, identity);
assertNotNull(response);
assertFalse(response.isValid());
assertNull(response.getData());
assertNull(response.getGroups());
}
COM: <s> test authenticate throws repository login exception </s>
|
funcom_train/5725398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object object) {
if (this == object) {
return true;
}
if (!(object instanceof InstituteGroup)) {
return false;
}
final InstituteGroup that = (InstituteGroup) object;
if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) {
return false;
}
return true;
}
COM: <s> returns code true code if the argument is an institute group instance </s>
|
funcom_train/38306512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSegmentMarkStyle() {
if (attributes.isDefined(ATTR_SEGMENT_MARK_STYLE)) {
String style = attributes.getString(ATTR_SEGMENT_MARK_STYLE);
if ("border".equals(style)) {
return SEGMENT_MARK_STYLE_BORDER;
}
return SEGMENT_MARK_STYLE_CENTER;
}
return DEFAULT_SEGMENT_MARK_STYLE;
}
COM: <s> gets the segment mark style </s>
|
funcom_train/46058313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doRightGroupList(UserRequest ureq, WindowControl wControl) {
// 1) initialize list controller and datamodel
initGroupListCtrAndModel(false, ureq);
// 2) load data into model
updateGroupListModelRightgroups();
// 3) set correct page
main.setPage(Util.getPackageVelocityRoot(this.getClass()) + "/right.html");
// 4) update toolboxe
columnLayoutCtr.hideCol2(true);
}
COM: <s> prepare everything and show all right groups </s>
|
funcom_train/41878137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateRandomString (int len){
String s="";
Random rnd = new Random();
for (int i=0; i<len;i++){
int value = rnd.nextInt(this.getSizeOfAlphabet());
s+=this.returnSymbolAtPosition(value);
}
return s;
}
COM: <s> generate random string in this alphabet </s>
|
funcom_train/1063447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeListenerFromParameter(Parameter parameter) {
parameter.eAdapters().remove(_adapter);
// start listening for changes in the model
if (parameter.getType()!=null) {
parameter.getType().eAdapters().remove(_adapter);
}
if (parameter.getUpperValue()!=null) {
parameter.getUpperValue().eAdapters().remove(_adapter);
}
if (parameter.getLowerValue()!=null) {
parameter.getLowerValue().eAdapters().remove(_adapter);
}
}
COM: <s> removes the operation edit part listener from the specified parameter </s>
|
funcom_train/51634062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IType getTypeForCU(ICompilationUnit cu) {
if (cu == null || !cu.exists())
return null;
// Use primary type if possible
IType primaryType= cu.findPrimaryType();
if (primaryType != null)
return primaryType;
// Use first top-level type
try {
IType[] types= cu.getTypes();
if (types.length > 0)
return types[0];
else
return null;
} catch (JavaModelException ex) {
return null;
}
}
COM: <s> finds and returns the type for the given cu </s>
|
funcom_train/20846012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleSubscriptionEnd(XMLElement soapBody, ResponseOutput respOut) {
XMLElement wseIdentifier = XMLElementUtil.getElementViaPath(soapBody, "SubscriptionEnd/SubscriptionManager/ReferenceParameters/Identifier", WSEConstants.WSE_NAMESPACE_NAME);
// ack to sender
try {
respOut.sendResponse(null);
} catch (IOException e) {
Log.error("IOException occured while handling subscription end.");
}
if (wseIdentifier == null) return;
String id = XMLElementUtil.getAllInnerText(wseIdentifier, true);
removeSubscription(id);
}
COM: <s> handle the code wse subscription end code message send by a event </s>
|
funcom_train/18229127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(final InputSource input) throws SAXException, IOException {
XMLReader parser = XMLUtil.createXMLReader(false, false); // fastest mode
parser.setContentHandler(this);
parser.setErrorHandler(this);
parser.setEntityResolver(this);
parser.parse(input);
}
COM: <s> the recognizer entry method taking an input source </s>
|
funcom_train/597311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addSuccessor(final int info, final Label successor) {
// creates and initializes an Edge object...
Edge b = new Edge();
b.info = info;
b.successor = successor;
// ...and adds it to the successor list of the currentBlock block
b.next = currentBlock.successors;
currentBlock.successors = b;
}
COM: <s> adds a successor to the </s>
|
funcom_train/32364360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeChild(Integer childWindowId) {
JMenuItem item = (JMenuItem) runtimeMenuItems.get(childWindowId);
if (item == null)
return;
menu.remove(item);
runtimeMenuItems.remove(childWindowId);
if (runtimeMenuItems.size() == 0)
menu.remove(windowEnumSeparator);
updateMenuState();
}
COM: <s> called when a child window closes </s>
|
funcom_train/21877065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element writeConstraints(Element parent, String dir, int prox) {
Element constraintsElement = parent.addElement("constraints");
Element proxEl = constraintsElement.addElement("proximity-constraint");
if (prox > 0) {
proxEl.addText(new Integer(prox).toString());
}
constraintsElement.addElement("direction-constraint").addText(dir);
return constraintsElement;
}
COM: <s> append nodes for the context view constraints to an element </s>
|
funcom_train/31125683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initGUI() {
setPreferredSize(new Dimension(621, 177));
setMinimumSize(new Dimension(621, 177));
setLayout(null);
btnRefreshData = new JButton("Poll NXT");
btnRefreshData.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
pollForRemoteHandlerValues();
}
});
btnRefreshData.setBounds(522, 143, 89, 23);
add(btnRefreshData);
lblPluginName.setBounds(9, 3, 598, 14);
add(lblPluginName);
}
COM: <s> init the jpanel and children containers components etc </s>
|
funcom_train/48877529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Interest create() throws DataException {
String id = null;
try {
id = GUID.generate();
} catch(GUIDException guide) {
throw new DataException("Could not generate a GUID", guide);
}
Interest interest = new Interest();
interest.setID(id);
Cache cache = Cache.getInstance();
cache.put(id, interest);
return interest;
} //create
COM: <s> creates a new interest business object </s>
|
funcom_train/42711573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getJButtonUpdatePhone() {
if (jButtonUpdatePhone1 == null) {
jButtonUpdatePhone1 = new JButton();
jButtonUpdatePhone1.setBounds(new Rectangle(140, 190, 121, 21));
jButtonUpdatePhone1.setText("Update");
jButtonUpdatePhone1.setActionCommand("UpdateAdress");
}
return jButtonUpdatePhone1;
}
COM: <s> this method initializes j button update phone1 </s>
|
funcom_train/45248412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void collectChildren(Object element, ArrayList result) {
Object[] filteredChildren = getFilteredChildren(element);
for (int i = 0; i < filteredChildren.length; i++) {
Object curr = filteredChildren[i];
result.add(curr);
collectChildren(curr, result);
}
}
COM: <s> recursively add the filtered children of element to the result </s>
|
funcom_train/7751765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteColumns(String rowKey, String colFamily, byte[]... colNames) {
List<byte[]> colNameList = new ArrayList<byte[]>(Arrays.asList(colNames));
deleteColumns(rowKey, colFamily, colNameList);
}
COM: <s> delete a list of columns or super columns </s>
|
funcom_train/31739188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List createPairs(int number) {
Vector pairs = new Vector();
for (int i = 1; i <= number; i++)
pairs.add(new Pair(new UserImpl(i + "a", "1", "", false),
new UserImpl(i + "b", "1", "", false)));
return pairs;
}
COM: <s> create a list of pairs </s>
|
funcom_train/1301888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected WorkResponse doGet(WorkRequest workRequest) {
WorkResponse result = null;
final KeyedWork keyedWork = getWork(workRequest);
if (keyedWork != null) {
result = WorkResponse.getInstance(_clusterContext, keyedWork);
}
else if (noMoreWork.get()) {
result = WorkResponse.getDoneResponse(_clusterContext);
close();
}
return result;
}
COM: <s> process get request type </s>
|
funcom_train/2583405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(XYPlot subplot, int weight) {
super.add(subplot, weight);
ValueAxis l_range = super.getRangeAxis();
subplot.setRangeAxis(0, l_range, false);
super.setRangeAxis(l_range);
if (null == l_range) {
return;
}
l_range.configure();
}
COM: <s> adds a new subplot with the specified weight </s>
|
funcom_train/28120857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: {
// TO DO. The returned task should be checked in the db generated in getTask
// to verify it's authenticity.
// To DO. All returned data should be stored in a database.
// Consider this a backup.
//Also TO DO. there should be an option to send out multiple copies of the same
// task for the purpose of insuring reliability. Agreement should be checked
// for here.
processReturnData(data);
}
COM: <s> called by the index server to confirm the location of this server </s>
|
funcom_train/39876570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restoreEntity(BackupDataInputStream data) {
if (DEBUG) Log.d(TAG, "got entity '" + data.getKey() + "' size=" + data.size());
String key = data.getKey();
if (isKeyInList(key, mFiles)) {
File f = new File(key);
writeFile(f, data);
}
}
COM: <s> restore one absolute file entity from the restore stream </s>
|
funcom_train/1549953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsKey(final Object key) {
int hash = getHash(key);
synchronized (locks[hash]) {
Node n = buckets[hash];
while (n != null) {
if (n.key == null || (n.key != null && n.key.equals(key))) {
return true;
}
n = n.next;
}
}
return false;
}
COM: <s> checks if the map contains the specified key </s>
|
funcom_train/15906163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void begin(AttributeList attributes) throws Exception {
// Push an array to capture the parameter values if necessary
if (paramCount > 0) {
String parameters[] = new String[paramCount];
for (int i = 0; i < parameters.length; i++)
parameters[i] = null;
digester.push(parameters);
}
}
COM: <s> process the start of this element </s>
|
funcom_train/21965663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadSettings() throws IOException {
String configFileName = getConfigFileName();
FileInputStream configFileStream = new FileInputStream(configFileName);
try {
Properties configProps = new Properties();
configProps.load(configFileStream);
// Apply setings from the config file
String lastLibraryFileName = configProps
.getProperty(PKCS11_LIBRARY_FILE_NAME_KEY);
if (lastLibraryFileName != null)
mLibraryFileNameTextField.setText(lastLibraryFileName);
else
mLibraryFileNameTextField.setText("");
} finally {
configFileStream.close();
}
}
COM: <s> loads the dialog settings from the dialog configuration file </s>
|
funcom_train/43485637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dump(XSAttributeDecl decl, String additionalAtts) {
// Get type of this attribute
XSSimpleType type = decl.getType();
SchemaFullTreeNode attributeNode = new AttributeNode(decl,additionalAtts);
addAndMove(attributeNode);
if (type.isLocal()) {
simpleType(type);
}
restore(attributeNode);
}
COM: <s> creates node for attribute declaration with additional attributes </s>
|
funcom_train/5379718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInput(Object input) {
Assert
.isTrue(getContentProvider() != null,
"ContentViewer must have a content provider when input is set."); //$NON-NLS-1$
Object oldInput = getInput();
contentProvider.inputChanged(this, oldInput, input);
this.input = input;
// call input hook
inputChanged(this.input, oldInput);
}
COM: <s> the code content viewer code implementation of this code viewer code </s>
|
funcom_train/14014933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map parseListenersWithCriteria(List listeners) {
Map listenersWithCriteria = new ManagedMap(listeners.size());
for (Iterator i = listeners.iterator(); i.hasNext();) {
Element listenerElement = (Element) i.next();
RuntimeBeanReference ref = new RuntimeBeanReference(listenerElement.getAttribute("ref"));
String criteria = listenerElement.getAttribute("criteria");
listenersWithCriteria.put(ref, criteria);
}
return listenersWithCriteria;
}
COM: <s> creates a map of listeners with their associated criteria </s>
|
funcom_train/9979165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(IEditorInput input, Shell shell) {
project = (Project) input.getAdapter(Project.class);
if (project == null) {
IFile file = (IFile) input.getAdapter(IFile.class);
pContext = new ProjectContext(file);
pContext.setShell(shell);
project = Project.loadProject(pContext, file);
}
project.addProjectChangeListener(this);
pContext = project.getProjectContext();
}
COM: <s> initialize this model </s>
|
funcom_train/41465192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SipServletResponse defaultHandlerNotFound(Object obj, EventType type) throws ServletException {
// γγ°γγ¨γγ γγ«γγ¦γγ
logger.error("Handler Not Found.:[obj=" + obj + "],[type=" + type + "]");
return null;
//throw new ServletException("Handler Not Found.:[obj=" + obj + "],[type=" + type + "]");
}
COM: <s> sip servlet request </s>
|
funcom_train/34111343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getMailChilds(String fldId) {
// ServiceDefTarget endPoint = (ServiceDefTarget) mailService;
// endPoint.setServiceEntryPoint(Config.OKMMailService);
Main.get().mainPanel.browser.fileBrowser.status.setFlagMailChilds();
// mailService.getChilds(fldId, callbackGetMailChilds);
}
COM: <s> gets the mail childs list from the server </s>
|
funcom_train/32203107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCacheScope(int cacheScope) {
if ((cacheScope != 4/*PageContext.APPLICATION_SCOPE*/) && (cacheScope != 3/*PageContext.SESSION_SCOPE*/))
throw new IllegalArgumentException("Acceptable values for cache scope are PageContext.APPLICATION_SCOPE or PageContext.SESSION_SCOPE");
this.cacheScope = cacheScope;
}
COM: <s> b scope b the default scope to cache content </s>
|
funcom_train/35954005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void collate() throws IOException {
// TODO pass config down
this.taskStatus.setNote("Collating comparison set");
this.collator.collate(this.set, new BackgroundTaskStatus("collate-"+set.getId()));
this.taskSegment.incrementValue();
}
COM: <s> collate the comparison set </s>
|
funcom_train/44835054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultValue(java.lang.String defaultValue) {
String result = (String) JGComponentUtils.invokeMethod(getUnit().getHandler(),
getMethod("onSetDefaultValue"), new Object[] {defaultValue});
this.defaultValue = (result != null) ? result : defaultValue;
}
COM: <s> setter for property default value </s>
|
funcom_train/37080944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ChadoTransaction createUserPubTransaction() {
String user = UserName.getUserName();
if (havePubLookup(user))
return null;
if (user == null || user.trim().length() == 0)
return null;
ChadoTransaction ts = createPubLookup(user);
// Keep the pub_id
pub_id = user;
return ts;
}
COM: <s> this has side effect of setting pub id string to user name </s>
|
funcom_train/28471740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetOwner() {
Favorite testFavo = new Favorite();
User testUser1 = new User();
User testUser2 = new User();
testFavo.setOwner(testUser1);
assertTrue(testFavo.getOwner() == testUser1);
testFavo.setOwner(testUser2);
assertTrue(testFavo.getOwner() == testUser2);
}
COM: <s> tries to get and to set an user into favorite </s>
|
funcom_train/34860155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String isSubdomainOf(URI uri) {
if ( !protocolName.equals(uri.protocolName) )
return null;
if ( pathElements.length <= uri.pathElements.length )
return null;
for (int n=0; n<uri.pathElements.length; n++ )
if ( !pathElements[n].equals(uri.pathElements[n]) )
return null;
return pathElements[uri.pathElements.length];
}
COM: <s> determines if the current uri is a subdomain of the parameter uri </s>
|
funcom_train/12160333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleMoveRightButtonSelection() {
String fontName = fontSelector.getSelectedFont();
//Add font name if not already there
if (caseInsensitiveIndexOf(fontName, selectionList.getItems()) == -1) {
selectionList.add(fontName);
fontSelector.removeSelectedFont();
currentSelection = selectionList.getItems();
validateDialog();
updateButtons();
}
}
COM: <s> handles pressing the move right button </s>
|
funcom_train/34675289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAsset(Asset asset) {
String id = asset.getId();
this.asset.remove(asset);
// remove asset from sections
if(id==null){
return;
}
List<Section> sections = getSection();
if(sections==null || sections.isEmpty()){
return;
}
for(Iterator<Section> iterator = sections.iterator() ; iterator.hasNext() ; ) {
Section section = iterator.next();
section.removeAssetId(id);
}
}
COM: <s> remove a specific instance of asset from the collection associated with this object </s>
|
funcom_train/44556484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRGB(byte[] R, byte[] G, byte[] B) {
for (int i=0; i < width*height; i++)
pixels[i] = 0xff000000 | ((R[i]&0xff)<<16) | ((G[i]&0xff)<<8) | B[i]&0xff;
}
COM: <s> sets the current pixels from 3 byte arrays reg green blue </s>
|
funcom_train/9082638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendServerPing() {
disco.discoverRemoteJid(serverPing, new RpcCallback<String>() {
@Override
public void run(String targetJID) {
if (targetJID != null) {
transmitDummyMessage(targetJID);
} else {
System.out
.println(serverPing + " does not appear to have wave");
}
}
});
}
COM: <s> discovers remote host sends a ping </s>
|
funcom_train/34069121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawTempConn() {
Graphics g = getGraphics();
g.setXORMode(getBackground());
g.setColor(Color.black);
if (hasSelectedObjects) {
Rectangle bo = selectededitor.getGraphicsObject().getBounds();
g.drawLine(bo.x + bo.width / 2, bo.y + bo.height / 2, curx, cury);
}
g.dispose();
}
COM: <s> draw or erase temporary connector </s>
|
funcom_train/33598658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem4() {
if (stringItem4 == null) {//GEN-END:|53-getter|0|53-preInit
// write pre-init user code here
stringItem4 = new StringItem("press play to play captured audio", null);//GEN-LINE:|53-getter|1|53-postInit
// write post-init user code here
}//GEN-BEGIN:|53-getter|2|
return stringItem4;
}
COM: <s> returns an initiliazed instance of string item4 component </s>
|
funcom_train/2807880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Unification unify(Variable v) {
if (this == v) {
return new Unification();
}
if (instantiation != null) {
return instantiation.unify(v);
}
if (v.instantiation != null) {
return v.instantiation.unify(this);
}
instantiation = v;
return new Unification(this);
}
COM: <s> instantiates this variable with the supplied variable or </s>
|
funcom_train/44109111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(Object obj) {
if (!(obj instanceof ViewContext)) {
throw new IllegalArgumentException(
"Tool can only be initialized with a ViewContext");
}
ViewContext context = (ViewContext) obj;
this.request = context.getRequest();
this.session = request.getSession(false);
this.application = context.getServletContext();
}
COM: <s> initializes this tool </s>
|
funcom_train/50720886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAltitude( float alt ){
float oldVal = this.altitude;
this.altitude = alt;
hands[0] = (alt%1000)*.001f*360; // Hundreds
hands[1] = (alt%10000)*.0001f*360; // Thousands
setValues(hands);
firePropertyChange( ALTITUDE_PROP, oldVal, alt );
}
COM: <s> sets the altitude </s>
|
funcom_train/11651829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getEncodedValue() {
// Encode according to the HTTP spec, i.e. UTF-8
try {
return getEncodedValue(EncoderCache.URL_ARGUMENT_ENCODING);
} catch (UnsupportedEncodingException e) {
// This can't happen (how should utf8 not be supported!?!),
// so just throw an Error:
throw new Error("Should not happen: " + e.toString());
}
}
COM: <s> get the argument value encoded using utf 8 </s>
|
funcom_train/4692123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getT_licencia() {
if (t_licencia == null) {
t_licencia = new JTextArea();
t_licencia.setBackground(new Color(238, 238, 238));
t_licencia.setText("Licencia GNU v3");
t_licencia.setFont(new Font("Tahoma", Font.PLAIN, 12));
t_licencia.setEditable(false);
}
return t_licencia;
}
COM: <s> this method initializes t licencia </s>
|
funcom_train/9542952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean insertRow(Attribute attribute, int index, String value) {
if (!attribute.isNominal())
return false;
if (coloring.hasColorForAttributeValue(attribute, value))
return false;
AttValueColor attvalue = new AttValueColor(attribute, value, ExampleColoring.DEFAULT_COLOR);
attvalue.save();
objects.add(index, attvalue);
JViTo.getApplication().setDirty();
return true;
}
COM: <s> inserts one row for a nominal attribute </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.