__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/32649418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createBackgroundGroup() {
GridData gridData14 = new GridData();
gridData14.grabExcessHorizontalSpace = true;
gridData14.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData14.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData14.grabExcessVerticalSpace = true;
backgroundGroup = new Group(rightComposite, SWT.NONE);
backgroundGroup.setText("Background");
backgroundGroup.setLayout(new FillLayout());
createBackGroundSubConfigurator();
backgroundGroup.setLayoutData(gridData14);
}
COM: <s> this method initializes background group </s>
|
funcom_train/35838982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void advance() throws IOException {
int curChar;
// update the two lookahead characters, the second lookahead will
// contain the new character.
curChar = nextChar;
nextChar = nextChar2;
if (nextChar == EOF_CHAR) {
nextChar2 = EOF_CHAR;
close();
} else {
nextChar2 = input.read();
} // end if
// set the file position
pos++;
if (curChar == '\n') {
line++;
pos = 1;
// log.addMessage(new Message("Parser line: "+line));
} // end if
} // advance
COM: <s> void advance throws ioexception </s>
|
funcom_train/43902592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInverseTransform() throws TransformException {
double[] dst = new double[6];
new NewZealandMapGrid().inverse().transform(PROJECTED, 0, dst, 0, 3);
for (int i = 0; i < GEOGRAPHIC.length; i++) {
assertEquals(GEOGRAPHIC[i], dst[i], 0.0001); // About 10 m precision
}
}
COM: <s> computes the inverse transform and compares against the expected result </s>
|
funcom_train/11323249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContext(Context context) {
if (context == null) {
throw new NullPointerException("no context param");
}
this.context = context;
if (hasControls()) {
for (Iterator it = getControls().iterator(); it.hasNext();) {
Control ctrl = (Control) it.next();
ctrl.setContext(context);
}
}
}
COM: <s> set the page request context of the control </s>
|
funcom_train/37515224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prettyPrint(PrintWriter wrtr) {
if (packageClause != null) {
packageClause.prettyPrint(wrtr);
}
for (int i = 0; i < imports.length; i++) {
imports[i].prettyPrint(wrtr);
}
for (int i = 0; i < types.length; i++) {
types[i].prettyPrint(wrtr);
}
wrtr.print(postText);
}
COM: <s> appends to code wrtr code the source code represented by the </s>
|
funcom_train/124431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SymbolTable local() {
if (localSymbolTable == null) {
String name = getName();
if (name == null || name.length() < 1)
name = getClass().getName();
if (parentScope == this)
localSymbolTable = new SymbolTable(name, null);
else
localSymbolTable = new SymbolTable(name, upper());
}
return localSymbolTable;
}
COM: <s> gets the local symbol table that is only visible to this panel </s>
|
funcom_train/24051905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long queryForCountStar(DatabaseConnection databaseConnection) throws SQLException {
if (countStarQuery == null) {
StringBuilder sb = new StringBuilder(64);
sb.append("SELECT COUNT(*) FROM ");
databaseType.appendEscapedEntityName(sb, tableInfo.getTableName());
countStarQuery = sb.toString();
}
long count = databaseConnection.queryForLong(countStarQuery);
logger.debug("query of '{}' returned {}", countStarQuery, count);
return count;
}
COM: <s> return a long value which is the number of rows in the table </s>
|
funcom_train/39242663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveRow(CachedObject row) throws IOException {
setFileModified();
rowOut.reset();
row.write(rowOut);
dataFile.seek((long) row.getPos() * cacheFileScale);
dataFile.write(rowOut.getOutputStream().getBuffer(), 0,
rowOut.getOutputStream().size());
}
COM: <s> writes out the specified row </s>
|
funcom_train/27842001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String valueAsString(Object inValue) throws IllegalArgumentException {
if (inValue == null) {
return getNullAsString();
}
if (!(inValue instanceof Date)) {
throw new IllegalArgumentException("Passed object is not subclass "
+ "of java.util.Date. Its class is " + inValue.getClass());
}
return formatter.format(inValue);
}
COM: <s> formats object into code string code </s>
|
funcom_train/29287139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addOverviewPage() {
try {
overviewPage = new OverviewPropertiesPage(this, getModel());
addPage(overviewPage);
} catch (PartInitException e) {
ErrorDialog.openError(
getSite().getShell(),
"Error creating nested overview page",
null,
e.getStatus());
FlabotPlugin.getDefault().getLogger()
.error("Error creating nested overview page: {}", e);
}
}
COM: <s> add the overview page </s>
|
funcom_train/3374288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changedUpdate(DocumentEvent e) {
if (getUpdatePolicy() == NEVER_UPDATE ||
(getUpdatePolicy() == UPDATE_WHEN_ON_EDT &&
!SwingUtilities.isEventDispatchThread())) {
return;
}
if(e instanceof AbstractDocument.UndoRedoDocumentEvent) {
setDot(e.getOffset() + e.getLength());
}
}
COM: <s> gives notification that an attribute or set of attributes changed </s>
|
funcom_train/1345402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillBitplane(ArrayList<Float> coords) {
for (int i = 0; i < coords.size(); i += 2) {
int x = (int) (coords.get(i) - minX); // offset by minX or minY
int y = (int) (coords.get(i+1) - minY);
bitplane[x][y] = true;
}
}
COM: <s> in this case the turtle can one produce lines of length 1 so </s>
|
funcom_train/50217451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validateClassField() {
String className = classField.getText();
boolean classFieldOK = ControlValidationUtility.validateClassField(
className, this, getProject(), true);
if (classFieldOK) {
methodField.setEditable(!StringUtils.isEmpty(className));
} else {
methodField.setText("");
methodField.setEditable(false);
}
return classFieldOK;
}
COM: <s> validate class field </s>
|
funcom_train/4379885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canUserInitiateMoveFromEmptySquare(int squareId) {
if (isBughouse() && ChessBoardUtils.isPieceJailSquare(squareId)) {
return isUserWhite && ChessBoardUtils.isJailSquareWhitePiece(squareId)
|| !isUserWhite && ChessBoardUtils.isJailSquareBlackPiece(squareId);
} else {
return false;
}
}
COM: <s> handles premove dropping in bughouse </s>
|
funcom_train/11379411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printJobs(ArrayList<JobInProgress> jobsToInitialize) {
for (JobInProgress job : jobsToInitialize) {
LOG.info("Passing to Initializer Job Id :" + job.getJobID()
+ " User: " + job.getProfile().getUser() + " AbstractQueue : "
+ job.getProfile().getQueueName());
}
}
COM: <s> method used to print log statements about which jobs are being </s>
|
funcom_train/1591099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LocalDateTime withFieldAdded(DurationFieldType fieldType, int amount) {
if (fieldType == null) {
throw new IllegalArgumentException("Field must not be null");
}
if (amount == 0) {
return this;
}
long instant = fieldType.getField(getChronology()).add(getLocalMillis(), amount);
return withLocalMillis(instant);
}
COM: <s> returns a copy of this datetime with the value of the specified </s>
|
funcom_train/13272604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showError(View parentView, String message) {
String title = this.preferences.getLocalizedString(
AppletContentManager.class, "showError.title");
JOptionPane.showMessageDialog(SwingUtilities.getRootPane((JComponent)parentView),
message, title, JOptionPane.ERROR_MESSAGE);
}
COM: <s> shows the given code message code in an error message dialog </s>
|
funcom_train/35562860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void beforeName() throws IOException {
JsonScope context = peek();
if (context == JsonScope.NONEMPTY_OBJECT) { // first in object
out.write(',');
} else if (context != JsonScope.EMPTY_OBJECT) { // not in an object!
throw new IllegalStateException("Nesting problem: " + stack);
}
newline();
replaceTop(JsonScope.DANGLING_NAME);
}
COM: <s> inserts any necessary separators and whitespace before a name </s>
|
funcom_train/26221454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startExit(String hostName) throws IOException {
if (null == host || !host.isAlive()) {
throw new IllegalStateException("Host not alive, cannot start serviteurs.");
}
// Determine other side host id.
HostId hostId = new HostId(hostName);
// Add exit.
host.getMarketPlace().createExit(hostId);
}
COM: <s> starts given exit on the host </s>
|
funcom_train/47678529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String replace(String srcStr, String searchStr, String replaceStr) {
String result = "";
int start = 0;
int end = 0;
while (start < srcStr.length()) {
end = srcStr.indexOf(searchStr, start);
if (end >= 0) {
result += srcStr.substring(start, end) + replaceStr;
start = end + searchStr.length();
} else {
result += srcStr.substring(start);
start = srcStr.length();
}
}
return result;
}
COM: <s> replaces search str with replace str in src str </s>
|
funcom_train/37189795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void find() {
try {
panelIndex = new Integer(JOptionPane.showInputDialog(this, resources.PAGE_NUMBER_STRING)).intValue() - 1;
final int reportPanelSize = reportPanels.size();
if(panelIndex >= reportPanelSize) panelIndex = reportPanelSize - 1;
if(panelIndex < 0) panelIndex = 0;
choosePanel(panelIndex);
this.panelIndex = panelIndex;
}
catch(NumberFormatException e){}
}
COM: <s> brings up a dialog window to choose a panel number to find </s>
|
funcom_train/23678409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addReferencedColumnsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ForeignKey_referencedColumns_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ForeignKey_referencedColumns_feature", "_UI_ForeignKey_type"),
MetadataPackage.Literals.FOREIGN_KEY__REFERENCED_COLUMNS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the referenced columns feature </s>
|
funcom_train/3091718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initializeDefault() {
this.numAuthorsAtStart = 5;
this.numPublicationsAtStart = 20;
this.numCreationAuthors = 0;
this.numCreationYears = 10;
yearInformation = new DefaultYearInformation();
yearInformation.initializeDefault();
publicationParameters = new DefaultPublicationParameters();
publicationParameters.initializeDefault();
publicationParameters.setYearInformation(yearInformation);
authorParameters = new DefaultAuthorParameters();
authorParameters.initializeDefault();
topicParameters = new DefaultTopicParameters();
topicParameters.initializeDefault();
}
COM: <s> initializes the code executer parameters code with default values </s>
|
funcom_train/8096616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteDirs() throws Exception {
File root;
int i;
root = getRoot();
if (root.exists()) {
i = 1;
do {
if (!deleteDir(root))
System.out.println(
"Couldn't delete output directory '" + root + "'!");
i++;
root = getRoot(i);
}
while (root.exists());
}
}
COM: <s> removes all the temporary directories created during a test run </s>
|
funcom_train/1169836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel getJLabel6xx() {
if (jLabelTwoMana == null) {
jLabelTwoMana = new JLabel();
jLabelTwoMana.setText("Two mana:");
jLabelTwoMana.setLayout(null);
jLabelTwoMana.setBounds(10, 79, 127, 13);
}
return jLabelTwoMana;
}
COM: <s> p get jlabel6xx </s>
|
funcom_train/13851197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean getWildcardPreference(String name) {
Boolean wildcardPref = null;
int lastSlash = name.lastIndexOf("/");
if (lastSlash >= 0) {
String mostSpecific = name.substring(0, lastSlash);
if (!mostSpecific.equals("")) {
if (!packagePrefs.isEmpty()) {
wildcardPref = (Boolean)
packagePrefs.get(mostSpecific);
}
if (wildcardPref == null) {
wildcardPref = getNamespacePreference(mostSpecific);
}
}
}
return wildcardPref;
}
COM: <s> return the boolean value of the most specific wild card </s>
|
funcom_train/44823387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void push (String property, Object value) throws ContextException {
Stack propStack = (Stack) propMap.get(property);
if (propStack == null) {
propStack = new Stack();
propMap.put (property, propStack);
}
propStack.push (value);
fireContextChangedEvent (property, value); // Notify listeners of new value
}
COM: <s> push a value for a given property into the context </s>
|
funcom_train/43876193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue( final String label, final String value ) {
if ( !elements.containsKey( label ) ) {
ZkDriver.getLogger().error( "Label '" + label + "' was not found in the form. Your value won't be used." );
}
values.put( label, value );
}
COM: <s> to the component with this label is set this value </s>
|
funcom_train/25137648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addParameter(String paramID, Object value, boolean changed) {
if (message != null) {
Parameter param = new Parameter(paramID, value, changed);
params.add(param);
if (changed) {
isChanged = true;
}
return ((params.size() == message.getParameters().length) && isChanged);
} else {
return false;
}
}
COM: <s> add a new paraemter to the message </s>
|
funcom_train/34134341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
if (DEBUG) System.out.println( "PropertyList.update() ["+name+"]");
// remove the previous values!
List list = parent.elements( name);
Iterator elements = list.iterator();
while ( elements.hasNext()) {
parent.remove( (XElement)elements.next());
}
// add the new values!
for ( int i = 0; i < entries.size(); i++) {
parent.addElement( name).setText( (String)entries.elementAt( i));
}
}
COM: <s> updates the list values in the parent element </s>
|
funcom_train/46937617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMediaTimePoint(MediaTimePoint mtp) {
addNode = true;
if (mtp != null) {
Element elt = getMediaTimeElement().element(
MediaTimePointElementName);
if (elt != null)
getMediaTimeElement().element(MediaTimePointElementName)
.setText(mtp.toString());
else
getMediaTimeElement().addElement(MediaTimePointElementName)
.setText(mtp.toString());
}
}
COM: <s> virtuamea function that sets the time point of </s>
|
funcom_train/7421503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCreateInstance(boolean createInstance) {
if ((this.gatewayType != null) && this.gatewayType.equals(TYPE_XOR) &&
(this.splitType) != null && this.splitType.equals(SPLIT_XOREVENT)) {
this.createInstance = createInstance;
} else {
this.createInstance = false;
}
}
COM: <s> sets gateway property that defines if the gateway instantiates the </s>
|
funcom_train/41163670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoMaterialType entity) {
EntityManagerHelper.log("saving CoMaterialType instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co material type entity </s>
|
funcom_train/9163677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readUntil(String terminator) {
StringBuilder sb = new StringBuilder();
do {
char ch = read();
if (ch == 0) {
throw new ParseException(getPlace(), "Unexpected end of input.");
}
sb.append(ch);
} while (!endsWith(sb, terminator));
// Delete the terminator
int start = sb.length() - terminator.length();
int end = sb.length();
sb.delete(start, end);
return sb.toString();
}
COM: <s> reads until the given terminator is detected </s>
|
funcom_train/30139203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String update() {
try {
// To Update
infoUtils.updateObject(super.getContext().getRegService(), this);
logger.info("Application object: " + getApplicationName() + " updated successfully");
return ServiceConstants.SUCCESS_STATUS;
} catch (Exception e) {
e.printStackTrace();
String errormessage = new GfacGUIException(e).getMessage();
FacesMessage message = new FacesMessage(
FacesMessage.SEVERITY_ERROR,
e.getClass().getName(),errormessage);
FacesContext.getCurrentInstance().addMessage(
null, message);
logger.severe(errormessage);
return ServiceConstants.ERROR_STATUS;
}
}
COM: <s> to update application to xregistry </s>
|
funcom_train/668010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadProperties(Properties theProperties) throws IOException, FileNotFoundException {
// Find the file in the classpath
URL preferencesFile = this.getClass().getClassLoader().getResource(PREFERENCES_FILE_NAME);
if (preferencesFile != null) {
// File found
InputStream preferences = preferencesFile.openStream();
theProperties.load(preferences);
preferences.close();
} else {
throw new FileNotFoundException();
}
}
COM: <s> find and load a set of properties from the applications preferences </s>
|
funcom_train/43846742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BoxLayout(getJContentPane(),
BoxLayout.Y_AXIS));
jContentPane.add(getJPanel(), null);
jContentPane.add(getJPanel1(), null);
jContentPane.add(getJPanel2(), null);
jContentPane.add(getJButton1(), null);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/48406933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsAbstractPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Class_isAbstract_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Class_isAbstract_feature", "_UI_Class_type"),
SpemxtcompletePackage.eINSTANCE.getClass_IsAbstract(),
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is abstract feature </s>
|
funcom_train/8469837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processIntDocument(IntegerVector docVector, int[] document) {
// Make one pass through the document to build the document vector.
for (int termIndex : document) {
IntegerVector reflectiveVector =
termToReflectiveSemantics.get(indexToTerm[termIndex]);
// Lock on the term's vector to prevent another thread from updating
// it concurrently
synchronized(reflectiveVector) {
VectorMath.add(reflectiveVector, docVector);
}
}
}
COM: <s> processes the compressed version of a document where each integer </s>
|
funcom_train/27862179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restackWindow(int window, int nextWindow, int transientFor,int unmanagedFor, int grabWindow, int duplicateFor, int facadeReal,int flags){
if(dead)return;
rfbAgent.orderRestackWindow(window,nextWindow,transientFor,unmanagedFor,grabWindow,duplicateFor,facadeReal,flags);
}
COM: <s> sends a restack window message to the zvtm server </s>
|
funcom_train/35353375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Connection getConnection(StoredProcedureDefinition proc) {
Connection conn = null;
try {
if (this.datasource != null) conn = this.datasource.getConnection();
else {
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup(proc.dataSource());
conn = ds.getConnection();
}
} catch (Exception e) {
throw new StoredProcedureDefinitionException("Cannot obtain connection from datasource defined in dataSource property", e);
}
return conn;
}
COM: <s> does a connection lookup in the jndi </s>
|
funcom_train/34563926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(final Table t) {
data = t;
model.fireTableChanged(null);
for(int i = 1; i < data.cols(); i++) {
final TableColumn tc = getColumnModel().getColumn(i);
tc.setResizable(false);
tc.setPreferredWidth(30);
}
}
COM: <s> updates the table </s>
|
funcom_train/19210423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getEntryIndex( ResourceEntry _entry ) {
synchronized( ResourceEntry.class ) {
if( !this.isStructureElement() &&
this.entry.getElvisType() == StructureEntry.SE_ELVIS_TYPE_COMPLEX &&
this.value != null ) {
return ( (java.util.List)this.value ).indexOf( _entry );
}
}
return -1;
}
COM: <s> gets the entry index attribute of the resource entry object </s>
|
funcom_train/49404263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAll(List<T> objects, List<Interval> intervals) {
if (objects.size() != intervals.size()) {
throw new IllegalArgumentException("Objects and intervals must be the same size.");
}
for (int i=0; i<objects.size(); ++i) {
addLhs(objects.get(i), intervals.get(i));
}
}
COM: <s> adds all items to the overlap detector </s>
|
funcom_train/40655691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean inWidget(int absX, int absY, Widget widget) {
return inRectangle(
absX, absY,
widget.getAbsoluteLeft(), widget.getAbsoluteTop(),
widget.getOffsetWidth(), widget.getOffsetHeight());
}
COM: <s> returns true if abs x abs y in absolute coordinates lies within </s>
|
funcom_train/5806852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadIncludeUrls() {
m_urlMap = new HashMap<String, List<String>>();
for (IpManagement mgt : getIpManagements()) {
for (String url : getIncludeUrls(mgt)) {
if (!m_urlMap.containsKey(url)) {
m_urlMap.put(url, getAddressesFromURL(url));
}
}
}
}
COM: <s> load addresses from any urls which have been specified </s>
|
funcom_train/36258938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
if (expandedList != null) {
expandedList.close();
expandedList = null;
}
for (int n = 0; n < listStack.size(); n++) {
final ListContainer container = listStack.get(n);
if (container != null) {
container.close();
}
listStack.set(n, null);
}
}
COM: <s> close the instance free its elements and unregister notifications </s>
|
funcom_train/2882330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void storeResult(ServiceURL sURL,Prim destination){
super.storeResult(sURL,destination); // store all results conventionnaly
// store the last one under "serviceComponent";
try{
if (display) System.out.println("Updating serviceComponent attribute");
serviceComponent = (Prim) convert(sURL);
destination.sfReplaceAttribute("serviceComponent",serviceComponent);
notifyComponent();
}catch(Exception ex){}
}
COM: <s> store a new result </s>
|
funcom_train/20730904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
// Add myself to the router table for peer messages from peers
Global.routeTable.addRoute(LEASE_PEER_PROCESSOR_ID, LEASE_PEER_CHANNEL, LEASE_PEER_NAMESPACE,
ConnectionReader.TYPE_PEER, this);
keepWatching = true;
Global.threads.execute( new Runnable() {
public void run() {
Thread.currentThread().setName("LeasePeerProcessor");
watchPeers();
}
} );
return;
}
COM: <s> start our internal threads going </s>
|
funcom_train/20896111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private UserListRemote lookupUserListBean() {
try {
Context c = new InitialContext();
return (UserListRemote) c.lookup("java:comp/env/ejb/UserListBean");
}
catch(NamingException ne) {
Logger.getLogger(getClass().getName()).log(Level.SEVERE,"exception caught" ,ne);
throw new RuntimeException(ne);
}
}
COM: <s> lookup method for remote ejb object </s>
|
funcom_train/24370129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public GeoConicPart ConicArc(String label, GeoConic conic, NumberValue a, NumberValue b) {
AlgoConicPartConicParameters algo = new AlgoConicPartConicParameters(cons, label, conic, a, b,
GeoConicPart.CONIC_PART_ARC);
processCreateCommand(algo.getConicPart()); //VMT modification
return algo.getConicPart();
}
COM: <s> conic arc from conic and parameters </s>
|
funcom_train/26595246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean next() throws DException {
switch (state) {
case INVALIDSTATE:
throw new DException("DSE4116", null);
case BEFOREFIRST:
return first();
case AFTERLAST:
return false;
}
boolean flag = moveForward();
previousRecord = flag ? getReferenceValues() : previousRecord;
if(!flag)
state=AFTERLAST;
return flag;
}
COM: <s> this method is responsible for retrival of the next record </s>
|
funcom_train/7442635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String format() {
if (getName().equals("*")) {
return "*";
}
final StringBuilder sb = new StringBuilder();
if (isWeak()) {
sb.append("W/");
}
return sb.append('"').append(getName()).append('"').toString();
}
COM: <s> returns tag formatted as an http tag string </s>
|
funcom_train/31687953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setup() {
AbstractVirtualFileSystem vfs = ServerList.getInstance().getHarmoniseServer().getVFS();
VirtualFile vfFile = vfs.getVirtualFile(m_sValuePath).getResource();
this.setTitle( vfs.getVirtualFileSystemView().getDisplayName(vfFile) );
}
COM: <s> configures the role </s>
|
funcom_train/7867022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean pass(PeptideIdentification aPeptideIdentification) {
boolean lResult = false;
PeptizerPeptideHit[] lConfidentPeptideHits = aPeptideIdentification.getConfidentPeptideHits();
// Iterate over all confidence peptidehits.
for (PeptizerPeptideHit lPeptideHit : lConfidentPeptideHits) {
if (lPeptideHit.getSequence().contains(iSequence)) {
lResult = true;
break;
}
}
return lResult;
}
COM: <s> returns a boolean whether a peptideidentification may pass a filter </s>
|
funcom_train/12164786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testElementEnd() throws Exception {
ArgumentElement element = new ArgumentElement();
// this method doesn't do anything so we can pass in two null params.
int result = element.elementEnd(null, null);
assertEquals("Unexpected result from elementEnd.",
IAPIConstants.CONTINUE_PROCESSING, result);
}
COM: <s> test the method element end </s>
|
funcom_train/26433615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isBinaryEquivilant(File file1, File file2)throws IOException{
final int BLOCK_SIZE = 65536;
// before we do anything else, chek the file sizes.
if(file1.length() != file2.length()){
return false;
}
// Read and compare bytes
InputStream input1 = new FileInputStream(file1);
InputStream input2 = new FileInputStream(file2);
byte[] stream1Block = new byte[BLOCK_SIZE];
byte[] stream2Block = new byte[BLOCK_SIZE];
boolean match;
int bytes1;
int bytes2;
do {
bytes1 = input1.read(stream1Block);
bytes2 = input2.read(stream2Block);
match = (bytes1 == bytes2);
}while(match && (bytes1 > -1));
input1.close();
input2.close();
return match;
}
COM: <s> compare two binary files for equality </s>
|
funcom_train/12699123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateNeighbors(DBPoint pt) throws SQLException
{
Statement statement = dbConnection.createStatement();
String update = "UPDATE " + POINT_TABLE
+ " SET " + NEIGHBORS_COLUMN + " = '" + convertNeighborArrayListToString(pt.getNeighbors())
+ "' WHERE " + ID_COLUMN + " = " + pt.getPointID();
statement.execute(update);
COM: <s> private function for the wilderness database class </s>
|
funcom_train/13774410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readLP(String fname) {
if (id == -1) {
id = native_create_lpx();
}
native_read_lp(id, fname);
nbRows = native_get_num_rows(id);
nbCols = native_get_num_cols(id);
nbMarkedColumns = 0;
nbMarkedRows = 0;
}
COM: <s> rewrites current lp problem object by that reading from cplex lp file </s>
|
funcom_train/15624096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addCheckBoxLine(@NotNull final Container panel, @NotNull final AbstractButton checkBox, final boolean state, @NotNull final String labelKey) {
checkBox.setText(ActionBuilderUtils.getString(ACTION_BUILDER, labelKey));
checkBox.setSelected(state);
panel.add(checkBox, gbcCheckBox);
}
COM: <s> adds a line with a check box </s>
|
funcom_train/27842620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findIndexFor(Object inValue) {
if (inValue == null) {
return -1;
}
STableModel tableModel = (STableModel) getModel();
for (int i = tableModel.getSize() - 1; i >= 0; --i) {
if (inValue.equals(tableModel.getElementAt(i))) {
return i;
}
}
return -1;
}
COM: <s> find the index for the elememt in the bound list </s>
|
funcom_train/38552818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void connectSSCClient(SSCClient client) throws RemoteException {
Hashtable tempHash;
tempHash = client.getRegisteredCores();
client.addRemoteCores(this.getRegisteredCores());
this.registerRemoteCores(tempHash);
tempHash = client.getRegisteredFragments();
client.addRemoteFragments(this.getRegisteredFragments());
this.registerRemoteFragments(tempHash);
client.connectSSC(this);
}
COM: <s> called to connect a sscclient to the sub system controller </s>
|
funcom_train/34849329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void combineDefaults(Defaults dest, Defaults src) {
if (src != null) {
for (Iterator i = src.idIterator(); i.hasNext();) {
String paramID = (String) i.next();
dest.setDefaultIfNeeded(paramID, src.getDefault(paramID));
}
}
}
COM: <s> merges the specified defaults objects only copying default values from </s>
|
funcom_train/19646043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getWaitCommand() {
if (waitCommand == null) {//GEN-END:|58-getter|0|58-preInit
// write pre-init user code here
waitCommand = new Command("Wait", Command.BACK, 0);//GEN-LINE:|58-getter|1|58-postInit
// write post-init user code here
}//GEN-BEGIN:|58-getter|2|
return waitCommand;
}
COM: <s> returns an initiliazed instance of wait command component </s>
|
funcom_train/2389141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMenuItemAddRole() {
if (menuItemAddRole == null) {
menuItemAddRole = new JMenuItem();
menuItemAddRole.setText("Benutzer hinzufügen");
menuItemAddRole
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
GUICreateUser gui = new GUICreateUser();
gui.show();
}
});
}
return menuItemAddRole;
}
COM: <s> this method initializes menu item add role </s>
|
funcom_train/51009678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BeanDescriptor getBeanDescriptor() {
BeanDescriptor bd = createBeanDescriptor(beanClass, new Object[] {
"preferred", Boolean.TRUE, "isContainer", Boolean.FALSE, "shortDescription", "A component that evaluates if logics."
});
bd.setValue("hidden-state", Boolean.TRUE); // needed for Studio.
bd.setValue("helpSetName", "net/jbeans/data/control/resources/If/jhelpset.hs");
return bd;
}
COM: <s> returns a bean descriptor for if bean </s>
|
funcom_train/7788432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hitObject(GameObject obj) {
if (obj != null) {
System.out.println(obj.getLocation());
Point screenPoint = calculations.tileToScreen(obj.getLocation());
System.out.println(screenPoint.x+","+screenPoint.y);
input.moveMouse(screenPoint.x, screenPoint.y);
input.clickMouse(true);
}
}
COM: <s> left clicks the object </s>
|
funcom_train/20394701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void commonInit() {
add(getContentComponent("content"));
add(getLeftContentComponent("leftContent"));
// css
add(HeaderContributor.forCss(CSS_TEMPLATE));
add(new PageLink("adminLink", InsertPlayerPage.class));
add(new PageLink("playersLink", InsertPlayerPage.class));
add(new PageLink("statisticsLink", InsertPlayerPage.class));
}
COM: <s> common code executed by constructors </s>
|
funcom_train/31077489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData(DataArray data) {
if ((data != this.data) && (data != null)) {
if (data.getDimension() != this.data.getDimension()) {
if (DEBUG) {
System.out.println("Number of components is different...can't set data");
}
return;
}
this.data = data;
}
}
COM: <s> set the data for this object </s>
|
funcom_train/19663163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QueryExt createTempNamedNativeQuery(String name, String sqlString, Class resultClass, String resultsetMapping, String cacheName) {
checkClosed();
NamedSQLTemplate namedSQLTemplate = new NamedSQLTemplate(name, sqlString, resultClass, resultsetMapping, null, cacheName);
return new SQLQuery(this, namedSQLTemplate);
}
COM: <s> sql query partition name cache </s>
|
funcom_train/13390540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeAll() {
WatchDataSource[] wds = fetch();
for(int i = 0; i < wds.length; i++) {
try {
if(wds[i]!=null)
wds[i].close();
} catch(Throwable t) {
logger.log(Level.WARNING, "Closing WatchDataSource", t);
}
}
}
COM: <s> closes all watch data source instances </s>
|
funcom_train/4920396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetOfficeFloorObjectTwice() {
// Record issue in adding the managed object twice
this.record_issue("Object MO already added");
// Add the managed object twice
this.replayMockObjects();
OfficeObject moFirst = this.node.addOfficeObject("MO",
Connection.class.getName());
OfficeObject moSecond = this.node.addOfficeObject("MO",
String.class.getName());
this.verifyMockObjects();
// Should be the managed object
assertEquals("Should be same managed object on adding twice", moFirst,
moSecond);
}
COM: <s> ensure issue if add the </s>
|
funcom_train/19014808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void preventRefresh() {
if (profileTokenCredential_!=null){
try {
if (Trace.traceOn_) Trace.log(Trace.INFORMATION, "ProfileTokenVault preventRefresh called");
profileTokenCredential_.preventRefresh();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
COM: <s> block the thread to refresh profile token credential from the vault </s>
|
funcom_train/18804854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setupSmallLogFlag() {
// set flag true if negative values not allowed and the
// lower bound is between 0 and 10:
final double lowerVal = getRange().getLowerBound();
this.smallLogFlag = (!this.allowNegativesFlag && lowerVal < 10.0 && lowerVal > 0.0);
}
COM: <s> sets up flag for log axis processing </s>
|
funcom_train/10632713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructor_Simple() {
Person person = Person.getInstance();
BasicAttributes attributes = new BasicAttributes("Anyuser", person);
String strObj = "Harmony";
DirStateFactory.Result result =
new DirStateFactory.Result(strObj, attributes);
assertEquals(strObj, result.getObject());
assertEquals(attributes, result.getAttributes());
}
COM: <s> test result object o attributes a with normal values </s>
|
funcom_train/35841990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CompartmentFigText unhighlight() {
// Loop through the list of extension points, until we find a
// highlighted one.
for (CompartmentFigText ft : getEPFigs()) {
if (ft.isHighlighted()) {
ft.setHighlighted(false);
highlightedFigText = null;
return ft;
}
}
// None were highlighted
return null;
}
COM: <s> private utility to unhighlight any currently selected extension </s>
|
funcom_train/50976425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void saveNObs() {
System.out.println("entering saveNObs");
System.out.println("node count after adding content: " +
mNObs.getChildCount());
// Save the whole list at a time!
mClient.Save(mNObs);
System.out.println("exiting saveNObs");
}
COM: <s> save the internal cache of nobs to the eln client </s>
|
funcom_train/45077748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFeature(String[] name, boolean[] value) {
System.out.println("Xml2DomDoc.setFeature(..) no longer supported!");
/*
for (int i = 0; i < name.length; i++) {
try {
aParser.setFeature(name[i], value[i]);
} catch (org.xml.sax.SAXException e) {
System.out.println("Error in setting up parser property " + name[i]);
}
}
*/
}
COM: <s> sets features of the parser e </s>
|
funcom_train/583350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean connectDb( String name, String pwd, String url, String driverClass, String syntax, String dbName ){
DbIni db = new DbIni( this );
db.setDbName( dbName );
db.setDriver( driverClass );
db.setSource( url );
db.setSourceName( "none" );
db.setSyntax( syntax );
return connectDb( name, pwd, db );
}
COM: <s> set a connection from scratch </s>
|
funcom_train/22782324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(Set<T> elements) {
// get new elements
Set<T> newbies = new HashSet<T>(elements);
newbies.removeAll(content);
// check if empty
if (newbies.isEmpty()) {
// done -> no changes
return false;
}
// add listener
for (T element : newbies) {
element.addListener(this);
}
// add elements
content.addAll(newbies);
// inform listeners
getManager().notifyAdded(newbies);
// save changes
if (!initStep) {
repository.save(elements);
}
// something has changed
return true;
}
COM: <s> add a set of new elements to this library </s>
|
funcom_train/29886699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionZoomToWidth(int pWidthToFit) {
PriDebug.infoln("OpenPCLViewer> actionZoomToWidth(int). The passed int is " + pWidthToFit);
renderImageForceZoomWidth(pWidthToFit);
showZoomFactorOnToolbarButton(getCurrentZoomFactor());
}
COM: <s> zoom to passed in width </s>
|
funcom_train/2447993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show() {
if (window != null) {
return;
}
window = createWindow();
escapeCloser = WindowEscapeCloser.bind(window);
escapeCloser.setConsumeEscapeWhileVisible(consumeEscapeWhileVisible);
new WindowMouseCloser(window, 10, 10);
showImpl(window);
}
COM: <s> displays this popup window </s>
|
funcom_train/40851881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(InkTraceView o) {
Timespan t1 = getTimeSpan(),t2=o.getTimeSpan();
if(t1 == null){
return -1;
}else if(t2 == null){
return 1;
}
int res = (int)((t1.start - t2.start) * 100);
if(res== 0 && o != this){
return hashCode() - o.hashCode();
}
return res;
}
COM: <s> compairs position within the chronological order of the traces </s>
|
funcom_train/39350064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepare(boolean majorGC) {
int ordinal = VM.activePlan.collector().parallelWorkerOrdinal();
if (majorGC) {
if (immixSpace.inImmixDefragCollection()) {
short threshold = Defrag.defragSpillThreshold;
resetLineMarksAndDefragStateTable(ordinal, threshold);
}
}
}
COM: <s> prepare for a collection </s>
|
funcom_train/3113313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInsideTitleBar(Point2D point) {
if (showTitleBar) {
double scale = GraphicalObjectLib.getScaleFactor(COORD_ABS,
this.getSheet());
int y = (int) point.getY();
// We only care about one dimension as the titlebar is as wide
// as the patch
if (y < TITLEBAR_HEIGHT/scale) {
return true;
} else {
return false;
}
}
else {
return false;
}
}
COM: <s> returns whether the given point in the framed patchs local coordinates </s>
|
funcom_train/3583057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void moveVertexPrettily(Vertex vert) {
// vertex neighbors
Set s = vert.getNeighbors();
if (s.size() == 0)
return;
double x = 0;
double y = 0;
// average location
for (Iterator iter = s.iterator(); iter.hasNext();) {
Vertex neighbor = (Vertex) iter.next();
x += layout.getX(neighbor);
y += layout.getY(neighbor);
}
x /= s.size();
y /= s.size();
moveOutward(vert, x, y, 0.9);
}
COM: <s> this code is called when a vertex is being brought </s>
|
funcom_train/9851429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCategoryActivationEmails(String category, String param) {
Vector<EmailVertex> emails = new Vector<EmailVertex>();
if(param == null){
warning("Parameters not set");
return;
}
String[] AEmails = param.trim().split(";");
for (String email : AEmails) {
EmailVertex e = g.findOneVertex(email);
if( e != null) emails.add(e);
}
categoryActivation.put(category, emails);
}
COM: <s> set activation emails for one category </s>
|
funcom_train/16935303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void saveToRegistry() {
int len = m_rows.size();
for (int i = 0; i < len; i++) {
Row row = (Row) m_rows.get(i);
m_reg.setProperty(row.m_group, row.m_key, row.m_field.getText().trim());
}
}
COM: <s> this method is called when the panels ok button is clicked to save </s>
|
funcom_train/20576480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDescribeRDF() {
log.debug("describeRDF");
String subjectUri = "";
GraphStore instance = GraphStore.getInstance();
String expResult = "";
String result = instance.describeRDF(subjectUri);
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 describe rdf method of class graph store </s>
|
funcom_train/3556749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyListeners(TokenizerPropertyEvent event) {
Iterator iter = _listeners.iterator();
while (iter.hasNext()) {
WeakReference ref = (WeakReference)iter.next();
TokenizerPropertyListener listener = (TokenizerPropertyListener)ref.get();
if (listener == null) {
// implicit cleanup of unused listeners
iter.remove();
} else {
// call listener
listener.propertyChanged(event);
}
}
}
COM: <s> notifying the registered listeners about a change in the properties </s>
|
funcom_train/8357468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getRadiobtnFisher() {
if (radiobtnFisher == null) {
radiobtnFisher = new JRadioButton();
radiobtnFisher.setSelected(true);
radiobtnFisher.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
radiobtnFisher.setSelected(true);
radiobtnEntropy.setSelected(false);
radiobtnLaplacian.setSelected(false);
radiobtnSoap.setSelected(false);
jButton.setEnabled(false);
jButton1.setEnabled(false);
}
});
}
return radiobtnFisher;
}
COM: <s> this method initializes radiobtn fisher </s>
|
funcom_train/3272861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean requestActions() throws Exception {
// Move to the next player whose Actions will
// occur in the World, either the player playing
// the game, or the number of the players whose
// Actions will be played back.
players.setCurrentPlayerNumber(players.nextPlayerNumber());
// Open turn actions element to prepare the
// parser to begin reading Action blocks.
if(listeningForActions){
// Return true if there is another TurnActions block
return xmlParser.requestActions();
}
return false;
}
COM: <s> request the action data for the last player to </s>
|
funcom_train/17394134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void broadcast(long command, String extraInfo){
byte[] buff = buildMessage(command, extraInfo, System.currentTimeMillis());
packet = new DatagramPacket(buff, buff.length, this.getBroadcastAddress(), PORT);
try{
socket.send(packet);
}catch(IOException ioe){
logger.error("Broadcast Error!", ioe);
}
}
COM: <s> broadcast the command </s>
|
funcom_train/44771324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disposeDocument(Document old) {
for (Enumeration e = old.fields(); e.hasMoreElements(); ) {
Field f = (Field) e.nextElement();
if (f.readerValue() != null) {
try {
f.readerValue().close();
} catch (IOException ex) {
log.warn("Exception while disposing index document: " + ex);
}
}
}
}
COM: <s> disposes the document code old code </s>
|
funcom_train/42006153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ospf_set_area_id( int id_) {
if ( area_list == null)
area_list = new Vector();
int no = area_list.size();
int i;
for ( i = 0; i < no; i++) {
OSPF_Area area = (OSPF_Area) area_list.elementAt(i);
if ( area.area_id == id_)
return; // this id_ has already been in area_list
}
OSPF_Area new_area = new OSPF_Area( id_ );
area_list.addElement(new_area);
}
COM: <s> xxx specify the area id for this router needed to be modified </s>
|
funcom_train/22093078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void abort() {
_log.entering( "Request", "abort" );
_filter = null;
stop();
Request reqNext = getNext();
if (reqNext != null)
reqNext.abort();
_log.exiting( "Request", "abort" );
}
COM: <s> called on abort reception on the control pipe </s>
|
funcom_train/31804585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSharedSecret(SharedSecret secret) {
if (secret == null) {
return;
}
String domainName = secret.getDomainName();
SharedSecret sec = getSharedSecret(domainName);
if (sec != null) {
throw new RuntimeException("The shared secret for '" + domainName
+ "' is already added.");
}
if (_secrets == null) {
_secrets = new Vector();
}
_secrets.addElement(secret);
}
COM: <s> adds a shared secret </s>
|
funcom_train/42382245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testZeroContent() throws Exception {
DefaultProcessorURI uri = defaultURI();
Recorder recorder = createRecorder("");
uri.setContentType("text/plain");
uri.setRecorder(recorder);
extractor.process(uri);
assertEquals(0, uri.getOutLinks().size());
assertNoSideEffects(uri);
}
COM: <s> tests that a uri with a zero content length has no links extracted </s>
|
funcom_train/45018451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNXcollimatorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NXinstrument_nXcollimator_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NXinstrument_nXcollimator_feature", "_UI_NXinstrument_type"),
NexusPackageImpl.Literals.NXINSTRUMENT__NXCOLLIMATOR,
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the nxcollimator feature </s>
|
funcom_train/43852421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Expression parseEquality() throws ParseException {
Expression e = parseRelational();
consumeWS();
while(true) {
final Comp expr = cmp(new Comp[] {
Comp.WORD, Comp.EQ, Comp.NE, Comp.APPRWORD, Comp.APPR });
if(expr == null) return e;
e = new Equality(e, parseRelational(), expr);
}
}
COM: <s> parses an equality expr </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.