__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/46465860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void redraw(MetroDrawer drawer, Calculator calculator) {
calculator.revert(min, minCoordF);
calculator.revert(max, maxCoordF);
newMinF.set(min);
newMaxF.set(max);
bitmap.eraseColor(Color.argb(0, 0, 0, 0));
if (drawer != null && drawer.isReady()) {
doDraw(drawer, calculator, canvas);
} else {
canvas.drawText("drawer is not yet ready...", 0, size.y - 1,
paint);
}
}
COM: <s> redraw the cached image </s>
|
funcom_train/38736553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImageBounds(int imageX, int imageY, int imageHeight, int imageWidth) {
if ((this.imageX == imageX) && (this.imageY == imageY) && (this.imageWidth == imageWidth)
&& (this.imageHeight == imageHeight)) {
return;
}
this.imageX = imageX;
this.imageY = imageY;
this.imageWidth = imageWidth;
this.imageHeight = imageHeight;
changingFlag = true;
}
COM: <s> sets image bounds </s>
|
funcom_train/22077063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Filter filter) throws Exception {
GlobalFilter globalFilter = (GlobalFilter) ExecutionContext.get().getSession().getAttribute(ConsoleCst.GLOBALFILTER);
IntFilter intFilter = (IntFilter) ExecutionContext.get().getSession().getAttribute(ConsoleCst.INTFILTER);
filterService.save(filter,intFilter);
globalFilter.save(intFilter);
}
COM: <s> save the filter in the current int filter </s>
|
funcom_train/7443589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readParameterValue() throws IOException {
String result = null;
// Discard any leading space
skipSpaces();
// Detect if quoted string or token available
int nextChar = peek();
if (isDoubleQuote(nextChar)) {
result = readQuotedString();
} else if (isTokenChar(nextChar)) {
result = readToken();
}
return result;
}
COM: <s> reads a parameter value which is either a token or a quoted string </s>
|
funcom_train/10810175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_toStringBuffer() throws Exception {
StringBuffer buffer = new StringBuffer();
TextHelper.toStringBuffer(fis, buffer);
assertTrue(buffer.length() > SIZE);
String text = buffer.toString();
assertTrue(text.length() == EXPECTED_BASE64_SIZE);
assertTrue(text.startsWith(EXPECTED_STARTS_WITH));
}
COM: <s> test the input stream base64 string buffer code </s>
|
funcom_train/13488620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isTime() {
switch (this) {
case TIME_YEARS:
case TIME_HALF_YEAR:
case TIME_QUARTERS:
case TIME_MONTHS:
case TIME_WEEKS:
case TIME_DAYS:
case TIME_HOURS:
case TIME_MINUTES:
case TIME_SECONDS:
case TIME_UNDEFINED:
return true;
default:
return false;
}
}
COM: <s> returns whether this is a time related level </s>
|
funcom_train/12119573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC801(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.attiInAggiungiJButton_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c801 atti aggiungi jbutton </s>
|
funcom_train/46765079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getOnoffButton() {
if (onoffButton == null) {
onoffButton = new JButton();
onoffButton.setText(Resources.getString("go_online"));
onoffButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
if (chatAdministration.isOnline())
chatAdministration.goOffline();
else
chatAdministration.goOnline();
}
});
}
return onoffButton;
}
COM: <s> this method initializes onoff button </s>
|
funcom_train/13815206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getCurvePoint( ColorCurve c, double val ) {
double y = c.getValue( val );
Point p = new Point( (int)(val * cp.getWidth()), (int)((1.0-y) * cp.getHeight()) );
return p;
}
COM: <s> get coordinates in this panels coordinate system that matches a point in curve </s>
|
funcom_train/1014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void setInvalidLevelModeDependentObjectsEnabled(boolean enabledStatus) {
for (Component component : invalidLevelModeDependentObjects) {
component.setEnabled(enabledStatus);
}
// An invalid level can't have a movement history.
// Hence, disable the undo/redo buttons.
setUndoButtonsEnabled(enabledStatus);
setRedoButtonsEnabled(enabledStatus);
// Enable the editor menu item so the user can open the editor.
setEditorMenuItemEnabled(true);
}
COM: <s> this methods sets the enabled status of specific gui elements </s>
|
funcom_train/33057409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List methodsToInvokeOnMarshal() {
if (marshalMethodCache == null) {
Method[] methods = marshalClazz.getMethods();
marshalMethodCache = new ArrayList();
for (int i=0; i<methods.length; i++) {
Method method = methods[i];
if (isInvokable(method)) {
marshalMethodCache.add(method);
}
}
}
return marshalMethodCache;
}
COM: <s> compiles a list of methods of the given class to be called and </s>
|
funcom_train/19062545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerSortingObserver() {
XmlElement sortElement = MailConfig.getInstance().get("options")
.getElement("/options/gui/tree/sorting");
if (sortElement == null) {
XmlElement treeElement = MailConfig.getInstance().get("options")
.getElement("/options/gui/tree");
if (treeElement == null) {
treeElement = MailConfig.getInstance().get("options")
.getElement("/options/gui").addSubElement("tree");
}
sortElement = treeElement.addSubElement("sorting");
}
sortElement.addObserver(this);
}
COM: <s> register for notifications when the tree node changes </s>
|
funcom_train/6206089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String format(String unformatted) {
CodeFormatter formatter = ToolFactory.createCodeFormatter(null);
IDocument document = new Document(unformatted);
TextEdit textEdit = formatter.format(CodeFormatter.K_COMPILATION_UNIT, unformatted, 0,
unformatted.length(), 0, null);
if (textEdit == null) {
return unformatted;
}
try {
textEdit.apply(document);
return document.get();
} catch (MalformedTreeException e) {
return unformatted;
} catch (BadLocationException e) {
return unformatted;
}
}
COM: <s> format the source code using the default formatting options </s>
|
funcom_train/14402172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addIndicationListener(IConfigurationElement pConfigElement) {
try {
iIndicationListener.add((IIndicationConsumer) pConfigElement
.createExecutableExtension(EXTENSION_TAG_CLASS_ATTRIB));
} catch (CoreException e) {
// This exception occurs when the class attribute
// value could not be instantiated (maybe a typing error in
// class name).
ModelPlugin.getDefault().log(Status.ERROR, "* ...failed! Reason: ",
e);
}
}
COM: <s> this method creates and adds the new instance from of the executable </s>
|
funcom_train/31986463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JComboBox createColorChoice(String attribute) {
CommandChoice choice = new CommandChoice();
for (int i=0; i<ColorMap.size(); i++)
choice.addItem(
new ChangeAttributeCommand(
ColorMap.name(i),
attribute,
ColorMap.color(i),
fView
)
);
return choice;
}
COM: <s> creates the color choice for the given attribute </s>
|
funcom_train/10268258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AdministrationTask getAdminTaskbyTitle(String taskTitle) {
AdministrationTask task ;
ArrayList list = new ArrayList(_tasks.values());
Iterator itr = list.iterator();
if (itr != null) {
while (itr.hasNext()) {
task = (AdministrationTask) itr.next() ;
if (task.getTitle().equalsIgnoreCase(taskTitle))
return task ;
}
}
return null ;
}
COM: <s> retrieves a task by its title </s>
|
funcom_train/11727814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getNonExistingWorkspaceName(Session session) throws RepositoryException {
List names = Arrays.asList(session.getWorkspace().getAccessibleWorkspaceNames());
String nonExisting = null;
while (nonExisting == null) {
String name = createRandomString(10);
if (!names.contains(name)) {
nonExisting = name;
}
}
return nonExisting;
}
COM: <s> returns the name of a workspace that is not accessible from </s>
|
funcom_train/1958155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateTR(){
tr[WORKED_OFF_HOSTS]++;
trState = ""
+ (int)tr[TOTAL_HOSTS] + " Hosts / "
+ (int)tr[WORKED_OFF_HOSTS] + " traced [ "
+ (int)((((float)tr[WORKED_OFF_HOSTS]) / tr[TOTAL_HOSTS])*100)
+ "% ]";
updateGlobalState();
}
COM: <s> update the actual state of the traceroutes </s>
|
funcom_train/28282263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String parseAttributeName() throws IOException, ParseException {
StringBuffer sb = new StringBuffer();
parseTableCell(sb);
HtmlStreamTokenizer.unescape(sb);
// remove the colon if there is one
if (sb.length() == 0)
return null;
if (sb.charAt(sb.length() - 1) == ':') {
sb.deleteCharAt(sb.length() - 1);
}
return sb.toString();
}
COM: <s> parse the case where we have found an attribute name </s>
|
funcom_train/8065021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteFromModel() {
removeStarted = true;
Object own = getOwner();
if (own instanceof GraphNodeHooks) {
((GraphNodeHooks) own).deleteFromModel();
} else if (own instanceof GraphEdgeHooks) {
((GraphEdgeHooks) own).deleteFromModel();
} else if (own instanceof GraphPortHooks) {
((GraphPortHooks) own).deleteFromModel();
} else {
removeFromDiagram();
}
}
COM: <s> delete whatever application object this fig is representing the fig </s>
|
funcom_train/35327168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MethodHandle findSetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
MemberName field = resolveOrFail(refc, name, type, false);
checkSecurityManager(refc, field); // stack walk magic: do not refactor
return makeAccessor(refc, field, false, true, 0);
}
COM: <s> produces a method handle giving write access to a non static field </s>
|
funcom_train/20896127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetFirstName() {
System.out.println("getFirstName");
User instance = new User();
String expResult = "";
String result = instance.getFirstName();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get first name method of class it </s>
|
funcom_train/51821651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFile(int load) {
try {
JFileChooser jfc = new JFileChooser(getDefaultDir());
int jfcVal;
if (load == 1) {
jfcVal = jfc.showOpenDialog(this);
} else {
jfcVal = jfc.showSaveDialog(this);
}
if (jfcVal == JFileChooser.CANCEL_OPTION) {
return null;
} else {
return jfc.getSelectedFile().getCanonicalPath();
}
} catch (Exception e) {
System.err.println(e);
}
return null;
}
COM: <s> loads a file dialog </s>
|
funcom_train/34479997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final protected CEntity get_instance(Object value) throws SdaiException {
// synchronized (syncObject) {
if (owning_model == null) {
throw new SdaiException(SdaiException.EI_NEXS);
}
if (value == null) {
throw new SdaiException(SdaiException.VA_NSET);
}
if (value instanceof SdaiModel.Connector) {
value = ((SdaiModel.Connector)value).resolveConnector(true, true, false);
}
return (CEntity)value;
// } // syncObject
}
COM: <s> checks if the submitted value of type entity instance is nonnull and </s>
|
funcom_train/17673870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sampleMetrics(int[][] buf, int pos) {
buf[metricLocalPMIdle.getIndex()][pos] = idleCount;
buf[metricLocalPMAllocated.getIndex()][pos] = allocatedCount;
buf[metricLocalPMReturned.getIndex()][pos] = returnedCount;
}
COM: <s> get values for our metrics </s>
|
funcom_train/37819385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeLayout() {
if (isBeamerLayout) {
mainCtrl.getGraphController().changeTextComponentFont();
} else {
mainCtrl.getGraphController().changeTextComponentFont();
}
if (currentDisplay == InterfaceMode.ALGORITHM_DISPLAY) {
setAlgorithmLayout();
} else if (currentDisplay == InterfaceMode.GRAPH_EDITING) {
setEditLayout();
} else if (currentDisplay == InterfaceMode.SEMIRING_EDITING) {
setSemiringLayout();
}
}
COM: <s> changes the layout after the beamer layout has been switched on or off </s>
|
funcom_train/38536053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void verifyIndices(CspGenericIndex[] indexRange, CspGenericIndex[] zIndices) {
List<CspGenericIndex> zIndexList = Arrays.asList(zIndices);
for(int i=0; i<indexRange.length; i++) {
if(zIndexList.contains(indexRange[i])) {
throw new IllegalStateException("summation cannot share indices with associated expression");
}
}
}
COM: <s> verifies that there are no common indices </s>
|
funcom_train/15399800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseWheelMoved(MouseWheelEvent e) {
if (_viewImage!=null) {
setActive(true);
_parent.mouseWheelMoved(e);
// Set ACTIVATE_PANEL property to remove highlighted border from the
// previously active panel.
String[] propName2 = { ACTIVATE_PANEL };
Object[] args2 = { null };
setImagePanelProperty(propName2, args2, true);
}
}
COM: <s> registers when mouse wheel is moved </s>
|
funcom_train/14210955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void noteUpdate(Object key, Object newValue, Object oldValue) {
synchronized (listeners) {
Iterator it = listeners.iterator();
while (it.hasNext()) {
CacheListener listener = (CacheListener) it.next();
listener.noteKeyUpdate(this, key, newValue, oldValue);
}
}
}
COM: <s> send a key update event to all registered listeners </s>
|
funcom_train/3370277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectionModel(ListSelectionModel newModel) {
if (newModel == null) {
throw new IllegalArgumentException("Cannot set a null SelectionModel");
}
ListSelectionModel oldModel = selectionModel;
if (newModel != oldModel) {
if (oldModel != null) {
oldModel.removeListSelectionListener(this);
}
selectionModel= newModel;
newModel.addListSelectionListener(this);
}
}
COM: <s> sets the selection model for this code table column model code </s>
|
funcom_train/22719080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int select() {
int u;
int n, v;
if (iteration == 0) {
map = new int[nodeCount];
for (int i = 0; i < nodeCount; i++)
map[i] = i;
}
n = (int) (nodeCount - iteration % nodeCount);
v = rand() % n;
if (v == nodeCount)
v--;
if (n == nodeCount)
n--;
u = map[v];
map[v] = map[n];
map[n] = u;
return u;
}
COM: <s> randomize selection of nodes </s>
|
funcom_train/15677307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double curvature(double t) {
double[][] c = getParametric();
double xp = c[0][1] + 2 * c[0][2] * t;
double yp = c[1][1] + 2 * c[1][2] * t;
double xs = 2 * c[0][2];
double ys = 2 * c[1][2];
return (xp * ys - yp * xs) / Math.pow(Math.hypot(xp, yp), 3);
}
COM: <s> returns the curvature of the curve </s>
|
funcom_train/22183647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer readType(byte[] data, Integer offset){
try{
NdmnField f = new NdmnField(data, this.getByteOrder());
Long l = u.read2Bytes(f, offset);
return l.intValue();
}catch(NdmnException e){
System.err.println(e);
return 0;
}
}
COM: <s> read a type out of data </s>
|
funcom_train/22572569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setInput(ICompetence competence) {
assert competence != null : "Passed competence should not be null"; //$NON-NLS-1$
fCompetence = competence;
fTitle.setText(StringUtils.safeString(competence.getTitle()));
fDescription.setText(StringUtils.safeString(competence.getDescription()));
fTypeViewer.setSelection(new StructuredSelection(competence.getType() != null ? competence.getType()
: CompetenceType.FUNCTIONAL));
}
COM: <s> sets the input for editting </s>
|
funcom_train/47733574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getNumberOfInvolvedContigs() {
HashMap<String, DNASequence> existingContigs = new HashMap<String, DNASequence>();
for (MatchList matches : contigsToReferencesMatches) {
for (DNASequence contig : matches.getQueries()) {
if (!existingContigs.containsKey(contig.getId())) {
existingContigs.put(contig.getId(), contig);
}
}
}
return existingContigs.size();
}
COM: <s> it can happen that not all contigs are matched to all reference genomes </s>
|
funcom_train/40866312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDynamicDomainListeners(Set dynamicDomainListeners) {
Iterator it = dynamicDomainListeners.iterator();
Object listener;
this.dynamicDomainListeners = dynamicDomainListeners;
while(it.hasNext()) {
listener = it.next();
if(!DynamicDomainListener.class.isAssignableFrom(listener.getClass())) {
throw new BeanNotOfRequiredTypeException(
"dynamicDomainListeners", DynamicDomainListener.class, listener.getClass());
}
}
}
COM: <s> sets the dynamic domain listeners this service will register with </s>
|
funcom_train/14328875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanUp() {
if (endOfResponse) {
// Clean up parameters
returnParam = null;
parameters = null;
// Clean up result data and meta data
columns = null;
rowData = null;
tables = null;
// Clean up warnings; any exceptions will be cleared when thrown
messages.clearWarnings();
}
}
COM: <s> releases parameter and result set data and metadata to free up memory </s>
|
funcom_train/41387964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveOne(){
ExpObject o2save=readOne();
FileDialog fd= new FileDialog(this,"Guardar fichero",FileDialog.SAVE);
fd.setVisible(true);
if(fd.getFile()!=null)
new MLSaver(o2save,fd.getDirectory()+java.io.File.separator+fd.getFile());
}
COM: <s> describe code save one code method here </s>
|
funcom_train/8534176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValues(Resource resource) {
clear();
ID[] properties = resource.getPropertyIDs();
for (int i = 0; i < properties.length; i++) {
PropertyValue propertyValue = resource.getValue(properties[i]);
fMap.put(properties[i], propertyValue);
}
}
COM: <s> copies all property values from the specified resource to this resource </s>
|
funcom_train/44852423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isParticipantOfGroup(Long inGroupID, Long inActorID) throws BOMChangeValueException {
try {
KeyObject lKey = new KeyObjectImpl();
lKey.setValue(KEY_GROUP_ID, inGroupID);
lKey.setValue(KEY_MEMBER_ID, inActorID);
return getCount(lKey) > 0;
}
catch (VException exc) {
throw new BOMChangeValueException(exc.getMessage());
}
catch (SQLException exc) {
throw new BOMChangeValueException(exc.getMessage());
}
}
COM: <s> checks whether the specified actor is participant of the specified group </s>
|
funcom_train/2877557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkPermission(Permission perm) {
try {
super.checkPermission(perm);
if (debug != null) {
debug.println("In checkPermission " + perm +
" checked");
}
} catch (SecurityException e) {
// We allow it anyway ...
if (debug != null) {
debug.println("In checkPermission " + perm +
" checked Not allowed");
debug.println(e);
}
}
}
COM: <s> throws a code security exception code if the requested access </s>
|
funcom_train/41623299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateDisplayCurrency(CurrencyType displayCurrencyType) {
NullArgumentException.throwIfNull(displayCurrencyType, "displayCurrencyType");
String balanceAxisLabel = "Balance (" + displayCurrencyType.getIDString() + ")";
this.balanceAxis.setLabel(balanceAxisLabel);
String currencyPrefix = displayCurrencyType.getPrefix();
this.lineRenderer.setBaseToolTipGenerator(createToolTipGenerator(currencyPrefix));
}
COM: <s> updates the currency used to plot account balances </s>
|
funcom_train/49455242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int aggregateCreationCreate(StringBuffer in, int nIn) throws SQLException {
final Iterator<AggregatedPositionValue> i = vector.iterator();
int n = nIn;
while (i.hasNext()) {
final AggregatedPositionValue apv = i.next();
n = apv.pvt.aggregateCreationCreate(in, apv.nIter, n);
}
return n;
}
COM: <s> generate sql dll for table creation </s>
|
funcom_train/18938402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateState( Task task ) {
boolean taskRunning = hasTaskInExecution();
if ( GridProcessState.FINISHED.equals( task.getState() ) ) {
if ( taskRunning ) {
state = GridProcessState.RUNNING;
} else {
state = hasAnyTaskFailed() ? GridProcessState.FAILED : GridProcessState.FINISHED;
}
} else if ( GridProcessState.FAILED.equals( task.getState() ) ) {
state = taskRunning ? GridProcessState.RUNNING : GridProcessState.FAILED;
}
}
COM: <s> updates the state of this code job code according to the last </s>
|
funcom_train/4506351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean handleRequest(Workgroup workgroup, UserRequest request) {
for (RequestQueue requestQueue : workgroup.getRequestQueues()) {
// Skip queues that doesn't have agents at the moment
if (requestQueue != null && requestQueue.isOpened()) {
requestQueue.addRequest(request);
return true;
}
}
return false;
}
COM: <s> routes the request to the best queue possible based solely on </s>
|
funcom_train/11344499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTest(Test test) {
synchronized (this) {
TestRecord tr = new TestRecord();
tr.m_test = test;
tr.m_name = test.toString();
m_list.add(tr);
}
fireContentsChanged(this, m_list.size() - 1, m_list.size() - 1);
}
COM: <s> adds a test </s>
|
funcom_train/16642962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTlcList() {
List<String> commentNumbers = new ArrayList<String>();
int i = 0;
do {
commentNumbers.add(i++, Integer.toString(i));
} while (i <= tlComments.size());
tlcList.setModel(new DefaultComboBoxModel(commentNumbers.toArray()));
while (tlcSelected >= tlcList.getItemCount())
tlcSelected--;
tlcList.setSelectedIndex(tlcSelected);
}
COM: <s> counts the number of top level comments for use when choosing between </s>
|
funcom_train/27975549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConcourseClass(final Class value) {
if ( concourseClass != null ) {
if ( concourseClass.equals( value ) ) {
return;
}
throw new IllegalStateException( "The concourseClass property cannot be changed once it has been set" );
}
if ( value == null ) {
throw new IllegalArgumentException( "The concourseClass property cannot be set to null" );
}
concourseClass = value;
}
COM: <s> sets the code class code of the code concourse code </s>
|
funcom_train/11085084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMessageBodyTag(String messageBodyTag) {
this.messageBodyTag = messageBodyTag.replace("<", "").replace(">", "");
this.messageBodyOpenTag = "<" + this.messageBodyTag + ">";
this.messageBodyCloseTag = "</" + this.messageBodyTag + ">";
}
COM: <s> sets the xml open tag used to wrap inbound jabber text messages </s>
|
funcom_train/31891358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFilters(String[] filters) {
if (filters != null) {
this.filters = filters;
} else {
this.filters = NO_FILTERS;
}
model.fireTreeStructureChanged(
model.getRoot(),
new Object[] { model.getRoot()},
null,
null);
}
COM: <s> sets the filters </s>
|
funcom_train/20774339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean learnGesture(String name, String[] obsSeq, double[] rawAngles, boolean updateStartProb, boolean updateTranstionProb, boolean updateEmissionProb){
boolean learningSuccess = learnGesture(name, obsSeq, updateStartProb, updateTranstionProb, updateEmissionProb);
if(learningSuccess){
GaussianThreshold gth = gthModels.get(name);
gth.addSample(rawAngles);
}
return learningSuccess;
}
COM: <s> learns gesture with an observation sequence and law feature vectors </s>
|
funcom_train/12315386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public List passwordProvidersFind() {
List availableModules = PasswordProviderSelector.getInstance().findAvailableModules(null);
List result = new ArrayList(availableModules.size());
for (Iterator i = availableModules.iterator(); i.hasNext();) {
ExtStorageModule module = (ExtStorageModule) i.next();
result.add(new PasswordProviderDescription(module.name, module.moduleID, module.priority, module.description, module.hints));
}
return result;
}
COM: <s> gathers list of available password providers </s>
|
funcom_train/42188860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testQuote() {
String in_string = "'string'";
String out_string = DbUtil.quote("string");
assertEquals(in_string,out_string);
in_string = "'string\\%'";
out_string = DbUtil.quote("string%");
assertEquals(in_string,out_string);
in_string = "'string\\''";
out_string = DbUtil.quote("string'");
assertEquals(in_string,out_string);
in_string = "'string\\\"'";
out_string = DbUtil.quote("string\"");
assertEquals(in_string,out_string);
in_string = "'string\\\\'";
out_string = DbUtil.quote("string\\\\");
assertEquals(in_string,out_string);
in_string = "'\\\\" + "\\\"" + "\\'" + "\\%'";
out_string = DbUtil.quote("\\\\\"'%");
assertEquals(in_string,out_string);
}
COM: <s> tests that an sql string is properly quoted </s>
|
funcom_train/31342250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONArray getJSONArray(String key) throws JSONException {
Object object = get(key);
if (object instanceof JSONArray) {
return (JSONArray) object;
}
throw new JSONException(NLS.bind("JSONObject[{0}] is not a JSONArray.", quote(key))); //$NON-NLS-1$
}
COM: <s> get the jsonarray value associated with a key </s>
|
funcom_train/38307310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onCloseDocument(PdfWriter writer, Document document) {
int numItems = headerFooterParts.size();
for (int i = 0; i < numItems; i++) {
HeaderFooterPartTag tag = (HeaderFooterPartTag) headerFooterParts.get(i);
tag.onCloseDocument(writer, document);
}
drawRule(writer, document);
}
COM: <s> we override the on close document method </s>
|
funcom_train/12759135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void build() throws EnyWareException {
setLayout(new BorderLayout());
headerFont = Font.decode(PropertyCatalog
.getMandatoryProperty("HeaderFont"));
labelFont = Font.decode(PropertyCatalog
.getMandatoryProperty("LabelFont"));
valueFont = Font.decode(PropertyCatalog
.getMandatoryProperty("ValueFont"));
JSplitPane mainPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
buildServicePanel(), buildTabbedPanel());
mainPanel.setDividerLocation(400);
add(mainPanel, BorderLayout.CENTER);
start();
refreshServices();
}
COM: <s> build the ui to display the service manager events </s>
|
funcom_train/48385944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private GameState playStepAllBots() {
updateCandies();
//GameBoard board = new GameBoard(gsd.getBoard());
for (Snake snakedata: gsd.getSnakes()) {
GameBot bot = controllers.get(snakedata.getName());
Vector2D direction = getMoveDirectionFromBot(bot);
gsd.move(snakedata.getName(), direction);
//gsd = gsd.simulateMove(snakedata.getName(), direction);
}
interpretBoard_HandleCollisions(gsd, collisionhandler);
gsd.nextTurn();
sendBotUpdates();
return getGameStateCopy();
}
COM: <s> move all snakes one turn handle motion collision etc </s>
|
funcom_train/5265242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public TunTap createTunTap() throws Exception {
String osName = System.getProperty("os.name");
if (osName.startsWith("Windows")) {
return new TunTapWindows();
} else if (osName.equals("Linux")) {
return new TunTapLinux();
} else {
throw new Exception("The operating system "+osName+" is not supported!");
}
}
COM: <s> return a tun tap object for the currently used operating system </s>
|
funcom_train/19255499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeUpdate(DocumentEvent e) {
// If it's only 1 char, we don't need to update the peer - just
// reapply the formatting since it's from a user keystroke and will
// already be visible
if (e.getLength() > 1)
updatePeer();
else
applyAllFormattings();
}
COM: <s> when document is removed </s>
|
funcom_train/1849769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handlePutUser(Request request, Response response) {
try {
userCache.addUser(new DomRepresentation(request.getEntity()).getDocument().getDocumentElement().getTextContent(), vfs);
response.setStatus(Status.SUCCESS_OK);
} catch (DOMException e) {
response.setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
} catch (IOException e) {
response.setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
}
}
COM: <s> adds users to the user list </s>
|
funcom_train/28982608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackSendEmail () {
if (backSendEmail == null) {//GEN-END:|43-getter|0|43-preInit
// write pre-init user code here
backSendEmail = new Command ("Back", Command.BACK, 0);//GEN-LINE:|43-getter|1|43-postInit
// write post-init user code here
}//GEN-BEGIN:|43-getter|2|
return backSendEmail;
}
COM: <s> returns an initiliazed instance of back send email component </s>
|
funcom_train/1536005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateTexture() {
if (textureIndex!=0 && !waitForReset){
view.getRenderer().getTextures().removeTexture(textureIndex);
textureIndex = 0;
}
textureIndex = view.getRenderer().getTextures().createAlphaTexture(
width2, height2,
buffer);
}
COM: <s> update the texture </s>
|
funcom_train/20317060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getTagline() {
Pattern patternTagline = Pattern.compile("<h5>Tagline:</h5>\\s*([^<]+)\\s*<a");
Matcher matcherTagline = patternTagline.matcher(html);
if (matcherTagline.find()) {
return matcherTagline.group(1);
}
return "";
}
COM: <s> returns the movies tagline if the open document is a movie page </s>
|
funcom_train/3370606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeChoosableFileFilter(FileFilter f) {
if(filters.contains(f)) {
if(getFileFilter() == f) {
setFileFilter(null);
}
FileFilter[] oldValue = getChoosableFileFilters();
filters.removeElement(f);
firePropertyChange(CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY, oldValue, getChoosableFileFilters());
return true;
} else {
return false;
}
}
COM: <s> removes a filter from the list of user choosable file filters </s>
|
funcom_train/27822377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Element getApplicationNode() {
NodeList nodeList=m_guiConfiguration.getElementsByTagName("application");
if (nodeList.getLength()!=1)
throw new IllegalArgumentException("GUI configuration must have exactly one 'application' node.");
return (Element)nodeList.item(0);
}
COM: <s> returns the application node </s>
|
funcom_train/2951401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getImportanceIndex(){
try {
long fir = ((Long)mmValueBuf.elementAt(0)).longValue();
long sec = ((Long)mmValueBuf.elementAt(1)).longValue();
long thi = ((Long)mmValueBuf.elementAt(2)).longValue();
return Math.abs(sec - fir) + Math.abs(sec-thi);
} catch (Exception e) {
e.printStackTrace();
return 0;
}
}
COM: <s> returns the examined values importance index </s>
|
funcom_train/43372694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double calcCommission(double amount){
double comm = (amount/(double)100)*commission.getPercentage();
if (comm<commission.getBase())
comm = commission.getBase();
if (comm>commission.getUpTo())
comm = commission.getUpTo();
return comm + commission.getSlipPage();
}
COM: <s> returns commission value for a given amount </s>
|
funcom_train/8672535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void unread() throws IOException {
int i = bIndex;
if (buffer[i] == 13) { // If /r, must be /r/nboundary
i = i + this.rnBoundaryLen;
} else {
i = i + boundary.length;
}
if (numBytes - i > 0) {
is.unread(buffer, i, numBytes - i);
}
}
COM: <s> unread the bytes past the buffer </s>
|
funcom_train/29771255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetArrayID() {
System.out.println("getArrayID");
BlueFuseSQLTable instance = null;
String expResult = "";
String result = instance.getArrayID();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get array id method of class sql </s>
|
funcom_train/48536066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String parseFileName() throws ParserException {
String result = "";
while (!peek(TokenType.AS)) {
if (peek(TokenType.IDENT))
result += accept(TokenType.IDENT).getText();
else
result += accept(TokenType.SEMI, TokenType.IDENT,
TokenType.DIVORSLASH, TokenType.BACKSLASH,
TokenType.COLON, TokenType.POINT).getType().getText();
}
return result;
}
COM: <s> parses a filename and returns it in string representation </s>
|
funcom_train/8066168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MouseEvent translateMouseEvent(MouseEvent me) {
double xp = me.getX();
double yp = me.getY();
me.translatePoint((int) Math.round((xp / _scale) - me.getX()),
(int) Math.round((yp / _scale) - me.getY()));
return me;
}
COM: <s> scales the mouse coordinates which match the drawing scale back to the </s>
|
funcom_train/18479715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matrix4 setRotationScale(Matrix3 m) {
return new Matrix4(
m.m00,m.m01,m.m02,m03,
m.m10,m.m11,m.m12,m13,
m.m20,m.m21,m.m22,m23,
m30,m31,m32,m33) ;
}
COM: <s> returns a matrix that is this matrix with the rotation scale set </s>
|
funcom_train/18042204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeListenerFrom(Namespace ns) {
ns.removeListener(this);
for (Iterator iterator = ns.getNamespaces().iterator(); iterator
.hasNext();) {
Namespace aNs = (Namespace) iterator.next();
removeListenerFrom(aNs);
}
for (Iterator iterator = ns.getModules().iterator(); iterator.hasNext();) {
Module mod = (Module) iterator.next();
removeListenerFrom(mod);
}
}
COM: <s> because the domain model does not have a richer listener model </s>
|
funcom_train/29616879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
iElementEClass = createEClass(IELEMENT);
createEReference(iElementEClass, IELEMENT__CHILDREN);
createEReference(iElementEClass, IELEMENT__PARENT);
iPersistableEClass = createEClass(IPERSISTABLE);
createEAttribute(iPersistableEClass, IPERSISTABLE__ID);
createEAttribute(iPersistableEClass, IPERSISTABLE__NAME);
}
COM: <s> creates the meta model objects for the package </s>
|
funcom_train/15768408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileObject createFileObject() throws EJBException{
try {
Long value = getCounterValue( CORE_COUNTER_ID );
FileObject fo = createFileObject( value );
return fo;
}
catch ( Exception e ) {
context.setRollbackOnly();
throw new EJBException( " Unable to create FileObject: \n" + e );
}
}
COM: <s> creates file object </s>
|
funcom_train/25260553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getService(HttpServletRequest request) {
String url = request.getRequestURI();
String service = url.substring(url.lastIndexOf("/") + 1);
if (LOG.isDebugEnabled()) {
LOG.debug("Service for URL " + url + " is " + service);
}
return service;
}
COM: <s> parse the service name from the request url </s>
|
funcom_train/46759043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MedEffectModel getMedEffect(final long medEffectId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return MedData.getMedEffect(medEffectId, chain, call);
}}; return (MedEffectModel) call(method, call);
}
COM: <s> same transaction return the single med effect model for the primary key </s>
|
funcom_train/24640480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileTab addFile(DataFile kfile) {
String title;
String path;
if (kfile != null) {
title = generateUniqueTabName(kfile.getName());
path = kfile.getPath();
} else {
// This should never happen
title = generateUniqueTabName("unknown");
path = "not saved";
}
FileTab tab = new FileTab(kfile, title);
addTab(title, tab);
this.setToolTipTextAt(this.getTabCount()-1, path);
return tab;
}
COM: <s> adds a data file as a file tab to the mainspace </s>
|
funcom_train/17783719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Conversation getConversation(ConversationTypeName name, ConversationIdentity[] ids) {
Conversation ret=null;
java.util.List<Conversation> convs=getConversations(ids);
for (int i=0; ret == null && i < convs.size(); i++) {
if (convs.get(i).getName().equals(name)) {
ret = convs.get(i);
}
}
return(ret);
}
COM: <s> this method returns the conversation instance associated with </s>
|
funcom_train/7616982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor getCursor() {
toolkit.lockAWT();
try {
if (cursor != null) {
return cursor;
// ???AWT
/*
* } else if (parent != null) { return parent.getCursor();
*/
}
return Cursor.getDefaultCursor();
} finally {
toolkit.unlockAWT();
}
}
COM: <s> gets the cursor of the component </s>
|
funcom_train/1067672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setupDragAndDrop() {
// setting drag source and drop target for TreeOutlinePage
dragSourceListener = new TreeOutlinePageDragSourceListener(getViewer());
dropTargetListener = new TreeOutlinePageDropTargetListener(getViewer());
// adding drag and drop target listeners to the viewer
getViewer().addDropTargetListener(dropTargetListener);
getViewer().addDragSourceListener(dragSourceListener);
}
COM: <s> setting up drag and drop listeners of the tree outline page </s>
|
funcom_train/10939440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearCounters() {
this.hitCount.set(0);
this.missCountNotFound.set(0);
this.missCountExpired.set(0);
this.missCountSoftRef.set(0);
this.removeHitCount.set(0);
this.removeMissCount.set(0);
}
COM: <s> clears the hit and miss counters </s>
|
funcom_train/40611257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String readStream(final InputStream inputStream) throws IOException {
BufferedReader in = null;
final StringBuilder bodyResponse = new StringBuilder();
try {
in = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"));
String inputLine;
while ((inputLine = in.readLine()) != null) {
bodyResponse.append(inputLine);
}
} finally {
if(in != null) {
try { in.close(); } catch(Throwable t) {}
}
}
return bodyResponse.toString();
}
COM: <s> generic stream reader </s>
|
funcom_train/46657063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonOk() {
if (this.jButtonOk == null) {
this.jButtonOk = new JButton();
this.jButtonOk.setText("Okay");
this.jButtonOk.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
SwtUserErrorDialog.this.ready();
}
});
}
return this.jButtonOk;
}
COM: <s> this method initializes j button ok </s>
|
funcom_train/47392421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assertClassMapping(Class type, String tableName) {
this.type = type;
classMapping = getConfiguration().getClassMapping(type.getName());
assertNotNull("No class mapping found for " + type.getName(), classMapping);
if (!tableName.equalsIgnoreCase(classMapping.getTable().getName()))
throw new ClassMappingException(type, tableName, classMapping
.getTable().getName());
}
COM: <s> verify that the class is mapped to the specified table </s>
|
funcom_train/16380570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPosYPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new UnsettablePropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GapType_posY_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GapType_posY_feature", "_UI_GapType_type"),
CTEPackage.Literals.GAP_TYPE__POS_Y,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the pos y feature </s>
|
funcom_train/12165009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetXFImplicitAttributesValueClientVariableName() {
privateSetUp();
XFImplicitAttributes attributes = new XFImplicitAttributes();
// Test just clientVariableName set
attributes.setClientVariableName("clientVariableName");
assertEquals("wrong clientVariableName returned",
WMLVariable.WMLV_NOBRACKETS + "clientVariableName" +
WMLVariable.WMLV_NOBRACKETS,
protocol.getXFImplicitAttributesValue(attributes));
}
COM: <s> test get xfimplicit attributes value with just client variable name </s>
|
funcom_train/13865142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void formatEra(StringBuffer buf, int count, Date date) {
int value = date.getYear() >= -JS_START_YEAR ? 1 : 0;
if (count >= 4) {
buf.append(dateTimeConstants.eraNames()[value]);
} else {
buf.append(dateTimeConstants.eras()[value]);
}
}
COM: <s> formats era field according to pattern specified </s>
|
funcom_train/26266933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean tf() {
while (inputIndex >= endOfInput) {
if (!getMoreInput()) {
return false;
}
}
if (!Character.isDigit(input[inputIndex])) {
return false;
}
output[outputIndex] = input[inputIndex];
outputIndex++;
inputIndex++;
return true;
}
COM: <s> this macro compares against a number figure </s>
|
funcom_train/39913065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetRh14() {
System.out.println("setRh14");
TextField tf = null;
Page1 instance = new Page1();
instance.setRh14(tf);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set rh14 method of class timesheetmanagement </s>
|
funcom_train/5343463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tryToDownloadUpdates() {
QUEUE.add(new Runnable() {
public void run() {
UpdateInformation updateInfo = _updateInfo;
if (updateInfo != null && isMyUpdateDownloaded(updateInfo))
RouterService.getCallback().updateAvailable(updateInfo);
downloadUpdates(_updatesToDownload, null);
}
});
}
COM: <s> sparks off an attempt to download any pending updates </s>
|
funcom_train/9700156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Date parseDate(String value, String mask) throws ParseException {
Locale locale = Locale.getDefault();
Calendar calendar = new GregorianCalendar(new Locale(locale.getLanguage(), locale.getCountry()));
calendar.setTime(new SimpleDateFormat(mask).parse(value));
return calendar.getTime();
}
COM: <s> parses date based on special mask i </s>
|
funcom_train/593706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getActionBeanUrlBinding() {
ActionResolver resolver = StripesFilter.getConfiguration().getActionResolver();
if (actionBeanClass == null) {
String path = StringUtil.trimFragment(this.actionWithoutContext);
String binding = resolver.getUrlBindingFromPath(path);
if (binding == null)
binding = path;
return binding;
}
else {
return resolver.getUrlBinding(actionBeanClass);
}
}
COM: <s> get the url binding for the forms </s>
|
funcom_train/19245574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SourceFileExceptionList getAllWarnings() {
final DefaultSourceFileExceptionList warnings = new DefaultSourceFileExceptionList();
Iterator iterator = plugins.keySet().iterator();
while (iterator.hasNext()) {
warnings.add(((PluginResults) plugins.get(iterator.next())).getWarnings());
}
return warnings;
}
COM: <s> get all warnings that occurred </s>
|
funcom_train/10662266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnexportObjectRemoteBoolean001() {
Echo e = new Echo_Imp();
try {
UnicastRemoteObject.unexportObject(e, false);
fail("The object is not exported ");
} catch (NoSuchObjectException ex) {
} catch (Throwable ex) {
fail("Failed with:" + ex);
}
}
COM: <s> unexport a echo without force </s>
|
funcom_train/16891335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMainEditor(IEditorPart editor) throws CoreException {
if (!embeddedEditors.contains(editor)) {
IStatus status = new Status(IStatus.ERROR, CommonUIPlugin.PLUGIN_ID, ICompositeEditorConstants.EDITOR_NOT_CONNECTED, Messages.CompositeEditor_3 + editor.getTitle(), null);
throw new CoreException(status);
}
mainEditor = editor;
activateEditor(editor);
}
COM: <s> designate the given editor to be the main editor </s>
|
funcom_train/29672578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public KStyle getContentStyle(final int state) {
//
// First try to get the style from this item
KStyle s = null;
if( kStyles != null ) {
s = kStyles[state];
}
//
// If this item has no style then use the style from the KForm parent.
return s == null ? ownerForm.getStyle(styleId + state + CONTENT) : s;
}
COM: <s> get the content style of this item </s>
|
funcom_train/14520181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IUserAdminSessionLocal getUserAdminSession() {
if (useradminsession == null) {
try {
IUserAdminSessionLocalHome useradminsessionhome = (IUserAdminSessionLocalHome) getLocator().getLocalHome(IUserAdminSessionLocalHome.COMP_NAME);
useradminsession = useradminsessionhome.create();
} catch (CreateException e) {
throw new EJBException(e);
}
}
return useradminsession;
} //getUserAdminSession
COM: <s> gets connection to user admin session bean </s>
|
funcom_train/25481909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String retValue;
retValue = "Input File : " + inputBinaryFileName + "\n" +
"Output File (1) : " + outputBinaryFileName1 + "\n" +
"Output File (2) : " + outputBinaryFileName2 + "\n" +
"Database User : " + dbUser;
return retValue;
}
COM: <s> override the object to string method </s>
|
funcom_train/45064811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getPrintButton() {
if (printButton == null) {
printButton = new JButton();
printButton.setIcon(new ImageIcon(Tools.loadBufferedImage(iconsPath + "print.png")));
printButton.setToolTipText("Print");
printButton.addMouseListener(new MouseAdapter() {
public void mouseExited(MouseEvent e) {
statusBar.setText("");
}
public void mouseEntered(MouseEvent e) {
statusBar.setText("Print current model");
}
});
}
return printButton;
}
COM: <s> this method initializes print button </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.