__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/593346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getActionBeanUrl(Object nameOrClass) {
Class<? extends ActionBean> beanType = getActionBeanType(nameOrClass);
if (beanType != null) {
return StripesFilter.getConfiguration().getActionResolver().getUrlBinding(beanType);
}
else {
return null;
}
}
COM: <s> similar to the </s>
|
funcom_train/35743625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setServiceParams(Hashtable<ID, ? extends Element> params) {
serviceParams.clear();
if (params == null) {
return;
}
for (Map.Entry<ID, ? extends Element> anEntry : params.entrySet()) {
Element e = anEntry.getValue();
StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(e);
serviceParams.put(anEntry.getKey(), newDoc);
}
incModCount();
}
COM: <s> sets the sets of parameters for all services </s>
|
funcom_train/50714771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ModifiableNode getNode(IStructuredSelection selection) {
// determine if the selection is a public field
if (selection.isEmpty())
return null;
Object obj = selection.getFirstElement();
if (!(obj instanceof ModifiableNode))
return null;
final ModifiableNode tmpNode = (ModifiableNode) obj;
if (!tmpNode.isModifiable())
return null;
return tmpNode;
}
COM: <s> gets the node currently selected in the viewer </s>
|
funcom_train/45918702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readUserManagerConfiguration(XMLConfiguration conf, Configuration res) {
if( conf.configurationsAt(userManager).size() != 1) {
return;
}
BeanDeclaration userManagerConfigDecl = new XMLBeanDeclaration(conf, userManager);
UserManagerBeanConfig userManagerBeanConfig = (UserManagerBeanConfig) BeanHelper.createBean(userManagerConfigDecl);
res.setUserManagerBeanConfig( userManagerBeanConfig );
}
COM: <s> reads the i user manager i configuration </s>
|
funcom_train/12311332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getRemoteTasks() {
List result = new ArrayList(10);
if (defaultTasks != null && !defaultTasks.isEmpty()) {
Iterator iter= defaultTasks.iterator();
while (iter.hasNext()) {
Task task = (Task) iter.next();
if (!task.isEclipseRuntimeRequired()) {
result.add(task);
}
}
}
if (customTasks != null && customTasks.length != 0) {
result.addAll(Arrays.asList(customTasks));
}
return result;
}
COM: <s> returns the default and custom tasks that are relevant when there is no </s>
|
funcom_train/37557661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillRectangle (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
int rop2 = 0;
if (OS.IsWinCE) {
rop2 = OS.SetROP2(handle, OS.R2_COPYPEN);
OS.SetROP2(handle, rop2);
} else {
rop2 = OS.GetROP2(handle);
}
int dwRop = rop2 == OS.R2_XORPEN ? OS.PATINVERT : OS.PATCOPY;
OS.PatBlt(handle, x, y, width, height, dwRop);
}
COM: <s> fills the interior of the rectangle specified by the arguments </s>
|
funcom_train/49124843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getAvailable(){
for(int i=1;i<MAX_CLIENT;i++){
if(ClientColor[i]==null){
// Black Color is unavailable for any client so can be used for reservation
ClientColor[i]=Color.black;
return (i);
}
}
return (-1);
}
COM: <s> calculate returns the lowest available client no </s>
|
funcom_train/45760985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void windowActivated(java.awt.event.WindowEvent e) {
AccessibleFrame.this.firePropertyChange(
javax.accessibility.AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
null, javax.accessibility.AccessibleState.ACTIVE);
if (Build.DEBUG) {
System.err.println("[frame] " + getTitle() + " is now active");
}
}
COM: <s> invoked when the window is set to be the active window </s>
|
funcom_train/47305410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean satisfiesComparison(Comparable c1, Comparable c2, String operator) {
if (c1.compareTo(c2) == 0 && operator.equals("=") ||
c1.compareTo(c2) > 0 && operator.equals(">") ||
c1.compareTo(c2) < 0 && operator.equals("<")) {
return true;
}
return false;
}
COM: <s> convenience method for checking if a rule criteria is satisifed </s>
|
funcom_train/3702940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPerson() {
//// Not the best object-oriented design, since
//// superclasses shouldn't know about subclasses...
if (Person.ACCESS_TYPE.equals(getType()) == true) {
return (true);
}
return (false);
} // of method
COM: <s> see if this access describes a person </s>
|
funcom_train/47869375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getTempPath() {
Object retVal = this.props.getProperty(PROP_TMP_PATH, System.getProperty("java.io.tmpdir"));
if (retVal instanceof File) {
return ((File) retVal);
} else {
return (new File(this.props.get(PROP_TMP_PATH).toString()));
}
}
COM: <s> returns the temprorary path of grobid </s>
|
funcom_train/22027990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearcache(boolean principalsOnly) {
m_userCache.clear();
m_groupCache.clear();
m_userGroupsCache.clear();
m_accessControlListCache.clear();
m_securityManager.clearPermissionCache();
if (!principalsOnly) {
m_projectCache.clear();
m_resourceCache.clear();
m_resourceListCache.clear();
m_propertyCache.clear();
}
}
COM: <s> clears all internal caches </s>
|
funcom_train/37125462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(javax.swing.event.ChangeEvent e) {
Object oldChangePerformed = changePerformed ;
changePerformed = e ;
//if(oldChangePerformed != e) {
// trigers the new change boolean
newChange() ;
propertyChange.firePropertyChange("changePerformed",
oldChangePerformed, changePerformed) ;
//}
}
COM: <s> method of the interface used here to wrap the event into </s>
|
funcom_train/30277115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void modifyNoAudioStatus() {
for (AgentDetail.AgentDetailItem item : agentRows.values()) {
modifyNoAudioStatus(item);
}
if (agentRow != null) {
modifyNoAudioStatus(agentRow);
}
saveStatusEvent(orgName, agentName, isAudio?"Audio":"NoAudio", true, new Date());
}
COM: <s> modifies no audio status </s>
|
funcom_train/42949928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reinit(int startHeight, int stopHeight) {
synchronized (ANIMATION_MUTEX) {
JXCollapsiblePane.this.firePropertyChange(ANIMATION_STATE_KEY, null,
"reinit");
this.startHeight = startHeight;
this.finalHeight = stopHeight;
animateAlpha = animationParams.alphaStart;
currentHeight = -1;
wrapper.showImage();
}
}
COM: <s> reinitializes the timer for scrolling up down the component </s>
|
funcom_train/20883214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireQueueUpdated(SynthesizerEvent event) {
if (engineListeners == null) {
return;
}
Enumeration E = engineListeners.elements();
while (E.hasMoreElements()) {
EngineListener el = (EngineListener) E.nextElement();
if (el instanceof SynthesizerListener) {
SynthesizerListener sl = (SynthesizerListener)el;
sl.queueUpdated(event);
}
}
}
COM: <s> utility function that sends a code queue updated code </s>
|
funcom_train/11741284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Set parseQualifier(String qualifierString) {
Set result = new ListOrderedSet();
Pattern pattern = Pattern.compile("\\$[\\w]+");
Matcher matcher = pattern.matcher(qualifierString);
while(matcher.find()) {
String name = matcher.group();
result.add(NameConverter.underscoredToJava(name.substring(1), false));
}
return result;
}
COM: <s> get list of parameter names in the same order as in qualifier </s>
|
funcom_train/20044855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _available() {
boolean result = true ;
try {
bytesReady = oObj.available() ;
log.println("Bytes available :" + bytesReady) ;
} catch (com.sun.star.io.IOException e){
e.printStackTrace(log) ;
result = false ;
}
tRes.tested("available()", result) ;
}
COM: <s> test calls the method and stores number of available bytes </s>
|
funcom_train/46691323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupPrompters() {
itemPrompter = new ItemPrompter(shell, "", 500, 300, Constants.BUTTON_CANCEL | Constants.BUTTON_OK);
itemPrompter.initialize();
filterPrompter = new FilterPrompter(shell, "", 495, 285, Constants.BUTTON_CANCEL | Constants.BUTTON_OK | Constants.BUTTON_CUSTOM);
filterPrompter.initialize();
}
COM: <s> sets up the item prompter and the filter prompter </s>
|
funcom_train/3174019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getReportVersion(Report report) {
String version = report.getVersion();
String update = report.getLastUpdate();
if (update != null)
version += " - " + Resources.get(this).getString("report.updated") + ": " + update;
return version;
}
COM: <s> returns the report version with last update date </s>
|
funcom_train/48491374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileHeader create(String content) {
FileHeader result = new FileHeader(content,
this.config.getSpecialCharacter());
FileHeader cached = this.headers.get(result.getHash());
if (cached != null) {
return cached;
}
this.headers.put(result.getHash(), result);
return result;
}
COM: <s> creates header only from content where alternating parts </s>
|
funcom_train/9900130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setBounds(new Rectangle(55, 78, 109, 23));
jButton1.setText("fakultet");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
FacultyForm ff = new FacultyForm();
String[] niz = {"",""};
ff.main(niz);
}
});
}
return jButton1;
}
COM: <s> this method initializes j button1 </s>
|
funcom_train/8420204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show(String html, int jumpToVerse, float jumpToYOffsetRatio) {
Log.d(TAG, "Show(html,"+jumpToVerse+","+jumpToYOffsetRatio+")");
mJumpToVerse = jumpToVerse;
mJumpToYOffsetRatio = jumpToYOffsetRatio;
loadDataWithBaseURL("http://baseUrl", html, "text/html", "UTF-8", "http://historyUrl");
}
COM: <s> show a page from bible commentary </s>
|
funcom_train/23721346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean tableExists(String name, Connection conn) throws SQLException {
ResultSet rs = null;
try {
DatabaseMetaData metadata = conn.getMetaData();
rs = metadata.getTables(null, null, name, null);
return rs.next();
} finally {
if (rs != null) {
rs.close();
}
}
}
COM: <s> test if a named table exists in the database </s>
|
funcom_train/29018927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMinutes () {
checkWidget ();
if ((style & SWT.CALENDAR) != 0) return time.wMinute;
SYSTEMTIME systime = new SYSTEMTIME ();
int msg = (style & SWT.CALENDAR) != 0 ? OS.MCM_GETCURSEL : OS.DTM_GETSYSTEMTIME;
OS.SendMessage (handle, msg, 0, systime);
return systime.wMinute;
}
COM: <s> returns the receivers minutes </s>
|
funcom_train/37181976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calculate(RSTPacketData prev){
deltaTime = timestamp - prev.timestamp;
deltaConnReset = nConnReset - prev.nConnReset;
deltaActiveOpens = nActiveOpens - prev.nActiveOpens;
deltaPassiveOpens = nPassiveOpens - prev.nPassiveOpens;
deltaFailedConnAttempt = nFailedConnAttempt - prev.nFailedConnAttempt;
calculatePercentValues();
}
COM: <s> calculate percentages and deltas based on the raw data </s>
|
funcom_train/17463279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMainfest(Dictionary dictionary) {
File file = new File((String) dictionary.get(LIB_DIRECTORY));
File parent = new File(file.getAbsolutePath()).getParentFile();
if (parent.exists()) {
try {
if (parent.setLastModified(System.currentTimeMillis())) {
System.out.println("Update success!");
} else {
System.out.println("Update faild!");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
COM: <s> update the lib bundle dictionary </s>
|
funcom_train/18886651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectElementNS(String ns_URL, String ln) {
if (ln == null)
throw new IllegalArgumentException("local name can't be null");
iter_type = SIMPLE_NS;
depth = vn.getCurrentDepth();
//startIndex = vn.getCurrentIndex();
localName = ln;
URL = ns_URL;
ft = true;
}
COM: <s> select the element name name space version before iterating </s>
|
funcom_train/28740081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer createSampleInfo(TestSampleInfo info) throws SimsException {
String errMsg = clsName + ".createNewSample(): ";
Integer id = null;
try {
//Create TestSample and return local object.
local = this.createNewSampleLocal(info);
id = local.getId();
}
catch (RuntimeException e) {
ctx.setRollbackOnly();
//Propagate.
throw e;
}
return id;
}
COM: <s> this method create a new test sample object </s>
|
funcom_train/50464150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeDoc(String docName, Document doc) throws IOException {
String name = null;
if(getCurrentPath() == null)
name = PATH_SEP + docName;
else
name = getCurrentPath() + PATH_SEP + docName;
docService.storeDocument(name, doc);
}
COM: <s> store a document with the given name in the current path </s>
|
funcom_train/2911347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNewArtsCount() {
if (user.isAnonymous())
throw new IllegalStateException("getNewArtsCount may be called only if user is logged in");
Integer lastArtCount = board.getUserLastArtCount(user.getUserId());
int ilac = (lastArtCount == null) ? 0 : lastArtCount.intValue();
int newArtsCount = getArtCount() - ilac;
return (newArtsCount < 0) ? 0 : newArtsCount;
}
COM: <s> number of new articles since last visit of this board </s>
|
funcom_train/38865058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(int num) {
System.out.println("*** Group 4, Scaled Ionospheric Characteristics");
for(int p=0; p<Nparms || p<num; p++) {
System.out.print(" "+data[p]);
}
System.out.println();
System.out.println();
}
COM: <s> display group 4 </s>
|
funcom_train/6266899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setState(TransactionState newState) {
currentState = newState;
if (sipStack.isLoggingEnabled()) {
sipStack.logWriter.logDebug("Transaction:setState " + newState
+ " " + this + " branchID = " + this.getBranch()
+ " isClient = " + (this instanceof SIPClientTransaction));
sipStack.logWriter.logStackTrace();
}
}
COM: <s> changes the state of this transaction </s>
|
funcom_train/4122110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handle(Connection connection, XMLStreamReader in, XMLStreamWriter out) {
if (in.getLocalName().equals("login")) {
login(connection, in, out);
} else {
logger.warning("Unkown (streamed) request: " + in.getLocalName());
}
}
COM: <s> handles the main element of an xml message </s>
|
funcom_train/27929533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCDataFromNode(Node n) {
String name = "";
for (Node child = n.getFirstChild(); child != null; child = child.getNextSibling()) {
if (child.getNodeName().compareToIgnoreCase("#cdata-section") == 0) {
name += child.getNodeValue().trim() + " ";
}
}
return name.trim();
}
COM: <s> gets the cdata element from a node </s>
|
funcom_train/7703526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void constrainPointOnLine(Model model, Pt pt, Line line) {
// Make a Line from line.start to pt. Now you have two lines. If pt is on the given line the
// two lines are parallel (co-linear, even).
Line fakeLine = new Line(line.getStart(), pt);
constrainParallel(model, line, fakeLine);
}
COM: <s> constrain the point to be appear on the line </s>
|
funcom_train/49701086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Formula AbIgnore_inv() {
final Variable a = Variable.unary("a");
final Variable aprime = Variable.unary("a'");
final Variable a_out = Variable.unary("a_out");
final Formula f0 = (Abstract(a).and(AbIgnore(a, aprime, a_out))).implies(Abstract(aprime));
final Formula f1 = f0.forAll(a.oneOf(AbWorld).and(aprime.oneOf(AbWorld)).and(a_out.oneOf(AOUT)));
return f1;
}
COM: <s> returns the ab ignore inv assertion </s>
|
funcom_train/51539178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open(SecurityToken token) throws IOException {
try {
// The connection needs to be open to call getAddress.
connectionOpen = true;
checkForPermission(getAddress(), token);
} catch (Exception e) {
connectionOpen = false;
try {
socketPeer.close();
} catch (IOException ioe) {
// ignore
}
if (e instanceof IOException) {
throw (IOException)e;
}
throw (RuntimeException)e;
}
}
COM: <s> create a java connection object from an open tcp socket </s>
|
funcom_train/50301775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accessCreate(String resource) throws CmsException {
try {
return m_rb.accessCreate(m_context.currentUser(), m_context.currentProject(), getSiteRoot(resource));
} catch (Exception exc) {
throw new CmsException(CmsException.C_UNKNOWN_EXCEPTION, exc);
}
}
COM: <s> checks if the user may create this resource </s>
|
funcom_train/31683012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getParentName() throws WebDAVException {
String fileName = ResourceFactory.getRealPath(resource.getURL()) ;
int delimiterPosition = 0;
if (fileName.endsWith(File.separator)) {
delimiterPosition = fileName.substring(0, fileName.length() - 1).lastIndexOf(File.separator);
} else {
delimiterPosition = fileName.lastIndexOf(File.separator);
}
return fileName.substring(0, delimiterPosition + 1);
}
COM: <s> get the name of the collection directory containing this resource file </s>
|
funcom_train/38723837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMeasureMultipliers(String ff) {
for (FitnessMeasure measure : measures.values()) {
String regex = REGEX + measure.getName();
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(ff);
if (matcher.find()) {
layoutProperties.get(measure.getName()).setValue(Double.valueOf(matcher.group(1)));
}
}
}
COM: <s> updates the measure multiplier code tunable code s from the new fitness function </s>
|
funcom_train/26014420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buf = new StringBuffer(
NODE + " " + getFeature() + " " + OPERAND_MATCHES);
buf.append(getValueString() + " ");
buf.append(Integer.toString(qtrue) + " ");
buf.append(Integer.toString(qfalse));
return buf.toString();
}
COM: <s> get a string representation of this node </s>
|
funcom_train/42645390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createNewLinkAnnotation() {
if (documentViewModel.getViewToolMode() ==
DocumentViewModel.DISPLAY_TOOL_LINK_ANNOTATION) {
if (documentViewController.getAnnotationCallback() != null) {
// convert the drawn rectangle to page space.
documentViewController.getAnnotationCallback()
.newAnnotation(pageViewComponent, rectToDraw);
}
}
}
COM: <s> creates a new link annotation when the link annotation creation tool is </s>
|
funcom_train/24937716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeReport(PrintStream ps) {
for (Task task : taskToThroughputLimit.keySet()) {
final Set<ThroughputLimit> limits = taskToThroughputLimit.get(task);
// String name = task.showIDLogical();
String name = task.getCall().showIDLogical();
ps.println("Throughput analysis results for task: " + name);
// int pathCount = 0;
for (ThroughputLimit limiter : limits) {
limiter.writeReport(ps, 0);
}
ps.println();
}
}
COM: <s> writes out a report of all identified paths for each resource encounted </s>
|
funcom_train/4929782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void appendAttribute( StringBuffer out, String name, String value ) {
out.append( " " ).append( name ).append( "=\"" );
if ( value != null )
out.append( GeneralUtil.htmlEncode( value ) );
out.append( "\"" );
}
COM: <s> appends an attribute ensuring that html rules are followed </s>
|
funcom_train/35648766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String constructOrderByClause() {
StringBuilder builder = new StringBuilder();
if (this.orderBys.length > 0) {
builder.append(" ORDER BY ");
for (OrderBy orderBy : orderBys) {
builder.append(" " + orderBy.getName() + " " + orderBy.getDirection() + ",");
}
return builder.toString().substring(0,builder.length()-1);
} else {
return "";
}
}
COM: <s> construct the order by clause </s>
|
funcom_train/48711924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPosition(int lineNum){
String s="";
StringBuilder sb=new StringBuilder();
for (int i=0;i<lineNum;i++) sb.append(p.getLineN(getWorking(), i));
return sb.length()+lineNum;
}
COM: <s> helper method for the current line highlighter </s>
|
funcom_train/2967337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawLeaderLines(Graphics2D g) {
g.drawLine(LINE_START_X, LINE_START_Y, (int)m_endOfLeadingLine.getX(),(int)m_endOfLeadingLine.getY());
g.drawLine((int)m_startOfTrailingLineLocation.getX(),(int)m_startOfTrailingLineLocation.getY(),LINE_END_X, LINE_END_Y);
}
COM: <s> draws two circles at both the end points of the factory control </s>
|
funcom_train/48064179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initGame() {
echo("Client: Init Game");
game = new GameComponent();
game.setApplication(this);
//VerticalPanel panel = new VerticalPanel();
HtmlAssetManager assets = HtmlPlatform.register().assetManager();
//assets.setPathPrefix("saim/");
PlayN.run(game);
echo("Client: Init Game Done");
}
COM: <s> initialize 2 d platform game </s>
|
funcom_train/3860360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isExtended(String driverName, int type) {
Map typeMap;
boolean retValue = false;
Integer tempInt;
typeMap = (Map) jdbcDriver2typeMap.get(driverName);
if (typeMap != null) {
tempInt = (Integer) typeMap.get(new Integer(type));
if (tempInt != null)
retValue = true;
}
return retValue;
}
COM: <s> checks if given type is an extended type </s>
|
funcom_train/2386399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updatePhotos(){
this.setCursor(new Cursor(Cursor.WAIT_CURSOR));
try{
updatePhotos(photoManager.findPhotos(albumViewed));
}catch(PhotoAlbumException pae){
JOptionPane.showMessageDialog(this, pae.getMessage(), "Warning", JOptionPane.WARNING_MESSAGE);
}finally{
this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
}
COM: <s> update the view of album photos </s>
|
funcom_train/4519485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenu add(JMenu menu) {
this.menu = menu;
// set UI.
Color color = UIManager.getColor("Menu.selectionBackground");
UIManager.put("Menu.selectionBackground", UIManager
.getColor("Menu.background"));
menu.updateUI();
UIManager.put("Menu.selectionBackground", color);
// add listener.
MenuItemListener listener = new MenuItemListener();
setListener(menu, listener);
super.add(menu);
return menu;
}
COM: <s> appends the specified menu to the end of the menu bar </s>
|
funcom_train/2405082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLastChild() {
if (getParent() == null)
return true;
TreeItem parentItem = getParent();
if (isFolder()) {
List chlds = parentItem.getChildrenEntites();
return chlds.indexOf(treeItem) == chlds.size() - 1;
} else {
return parentItem.getElementAt(parentItem.getSize() - 1).equals(treeItem);
}
}
COM: <s> return is this tree item is last child at parent childs list </s>
|
funcom_train/24194349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attachQueueProcessor(String name, QueueProcessor processor) throws NoSuchQueueException {
if (queues.containsKey(name)) {
NamedMessageBlockingQueue queue = queues.get(name);
processor.attachToQueue(queue);
fireProcessorAttached(queue, processor);
} else
throw new NoSuchQueueException("The queue [" + name + "] is not present on this MQ");
}
COM: <s> attach a processor to the message queue </s>
|
funcom_train/14124955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanUp(XWikiContext context) {
try {
Session session = getSession(context);
if (session!=null) {
if ( log.isWarnEnabled() ) log.warn("Cleanup of session was needed: " + session);
endTransaction(context, false);
}
} catch (HibernateException e) {
}
}
COM: <s> cleanup all sessions </s>
|
funcom_train/14460302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean registerClient(MessageListener ob){
String loookup = ob.toString();
if(clients.values().contains(ob))
return true; // dupe
else if(clients.get(loookup)!=null) // dupe name, different object
loookup+=dupe_counter++;
ob.addMessageSession(key, this);
clients.put(loookup,ob);
return true;
}
COM: <s> register a new client </s>
|
funcom_train/37521071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection getConnection() throws SQLException{
if(!isUsed()){
isUsed = true;
return connection;
}
else{
logger.throwing(CLASS_NAME,"getConnection()",
new SQLException(org.jdbf.castor.Messages.message("conn.inUse")));
throw new SQLException(org.jdbf.castor.Messages.message("conn.inUse"));
}
}
COM: <s> returns the connection object </s>
|
funcom_train/8148806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (o instanceof Message) {
Message msg = (Message) o;
return (
(id == msg.id) &&
(source.equals(msg.getSource()) && destination.equals(msg.getDestination())) ||
(source.equals(msg.getDestination()) && destination.equals(msg.getSource()))
);
} else {
return false;
}
}
COM: <s> returns whether or not message id and source destination pair are all equal </s>
|
funcom_train/43474741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBuild100() throws Exception {
System.out.println("//// TEST 100 JOINS ////");
HashMap hashMap = new HashMap();
for (int i = 0; i < 100; i++) {
Node node = GenericFactory.buildNode();
System.out.println("i [" + i + "]: Id [" + node.getId() + "]");
hashMap.put(node.getId(), node);
}
assertEquals(100, hashMap.size());
}
COM: <s> test to build dynamically 100 nodes with the predefined node class </s>
|
funcom_train/44283403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getBytesValue() {
int msB = (int)PatchBytes.getSysexByte(patch.sysex, 9, ofs);
int lsB = (int)PatchBytes.getSysexByte(patch.sysex, 9, ofs+1);
int bytesValue = msB << 8;
bytesValue = bytesValue | lsB;
return bytesValue;
}
COM: <s> returns the value of the two bytes representing the delay speed as an </s>
|
funcom_train/43372880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reverse(int positionToReverse,double price,int date,int qty){
if (positionToReverse == ISignal.SHORT){
Cover(price,date,qty);
Buy(price,date,qty);
}
if (positionToReverse == ISignal.LONG){
Sell(price,date,qty);
Short(price,date,qty);
}
}
COM: <s> reverse position overrides reverse for daily signals </s>
|
funcom_train/36181904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processFeedback(JOptionPane pane) {
if (pane != null) {
Object value = pane.getValue();
if (value.equals("Agree")) {
System.out.println("Accept policy");
feedback = true;
} else {
System.out.println("Don't accept policy");
feedback = false;
}
} else {
System.out.println("null");
}
}
COM: <s> after the timeout expires process the pane to see if user has provided </s>
|
funcom_train/3492831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(String[] argv) {
Options jabaOptions = Factory.getOptions();
jabaOptions.setCreateLVT(true);
if (argv.length < 1) {
System.err.println("Incorrect Usage: Please specify resource file");
System.exit(1);
}
//get program & directory information
ResourceFile rf = new ResourceFile(argv[0]);
instrDir =
new File(
ConfigFile.getProperty("INSTRUMENTED")
+ File.separator
+ rf.getProgramName());
program = Factory.getProgram(rf, jabaOptions);
}
COM: <s> initializes jaba and loads the specified program </s>
|
funcom_train/10004213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object createInstance(String className) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {
Class<?> clazz = Class.forName(className);
Constructor<?> constructor = clazz.getConstructor();
return constructor.newInstance();
}
COM: <s> creates instance by full class name </s>
|
funcom_train/34999537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getViewType(VRaptorServletRequest req){
Enumeration<?> accepts = req.getHeaders(ACCEPTREQUESTEADER);//IE6 will send two Accept header
StringBuilder acceptBuilder = new StringBuilder();
for(;accepts.hasMoreElements();){
acceptBuilder.append(accepts.nextElement());
acceptBuilder.append(", ");
}
String accept = acceptBuilder.toString();
if(StringUtils.isEmpty(accept))
return null;
if(accept.indexOf("application/json")>-1){
return SUPPORTEDJSON;
}else if(accept.indexOf("application/xml")>-1){
return SUPPORTEDXML;
}
return null;
}
COM: <s> get remote view according to request </s>
|
funcom_train/2039856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TextView createCacheText() {
TextView cacheText = new TextView(this);
cacheText.setPadding(10, 5, 0, 5);
cacheText.setText("Image Cache:");
cacheText.setBackgroundColor(Color.DKGRAY);
return cacheText;
}
COM: <s> creates the image cache text view </s>
|
funcom_train/29021924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validFile(String fileName) {
File file = new File(fileName);
if (file.isDirectory()) {
return true;
}
if (!file.isFile())
return false;
String extension = getExtension(file);
if (extension == null)
return false;
if (extension.equals("nc"))
return true;
return false;
}
COM: <s> see if the file is valid </s>
|
funcom_train/32762883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MachineSnapshot fetchMachineSnapshot( final Connection connection, final long snapshotID ) throws SQLException {
final MachineSnapshot machineSnapshot = MACHINE_SNAPSHOT_TABLE.fetchMachineSnapshot( connection, snapshotID );
final ChannelSnapshotTable channelSnapshotTable = getChannelSnapshotTable( connection, machineSnapshot );
MACHINE_SNAPSHOT_TABLE.loadChannelSnapshotsInto( connection, channelSnapshotTable, machineSnapshot );
return machineSnapshot;
}
COM: <s> fetch the machine snapshot corresponding to the specified snasphot id </s>
|
funcom_train/39878522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
if (syncAlreadyInProgress) {
throw new UnsupportedOperationException(
"you are not allowed to clear the ALREADY_IN_PROGRESS SyncStats");
}
tooManyDeletions = false;
tooManyRetries = false;
databaseError = false;
fullSyncRequested = false;
partialSyncUnavailable = false;
moreRecordsToGet = false;
delayUntil = 0;
stats.clear();
}
COM: <s> clears the sync result to a clean state </s>
|
funcom_train/3275802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString () {
StringBuffer sb = null;
for (int i = 0; i < flag.length; i++) {
if (flag[i]) {
if (sb == null)
sb = new StringBuffer();
sb.append("(").append(typeToString(i)).append(")");
}
}
if (sb == null) return "";
else return sb.toString();
}
COM: <s> converts the account flags into their string representation </s>
|
funcom_train/44694630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getFieldType(final int iIndex) {
if (m_BaseLayer != null) {
final FeatureCollectionWrapper fc = m_BaseLayer.getFeatureCollectionWrapper();
/**
* We assume that the first attribute of the feature is its geometry, and that there is always a geometry
*/
return fc.getFeatureSchema().getAttributeType(iIndex + 1).toJavaClass();
}
else {
return Object.class;
}
}
COM: <s> return a class representing the data type of a given field </s>
|
funcom_train/22111203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialize(String bundleName, String propPrefix) {
_bundle = ResourceBundle.getBundle(bundleName);
_propPrefix = propPrefix + ".";
_name = getResourceProperty("critter.name");
_desc = getResourceProperty("critter.desc");
_propDescs = new HashMap();
}
COM: <s> initialize the name and description of the critter as well as </s>
|
funcom_train/29274081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocumentPostings getByDocument(Document document) {
// Try to find the document in the document list
for (DocumentPostings currentDocumentPostings : this.documentPostingsList) {
// If we find the document, get it and exit the loop
if (currentDocumentPostings.getID() ==
document.getID()) {
return currentDocumentPostings;
}
}
return null;
}
COM: <s> gets the document postings associated with the specified document </s>
|
funcom_train/23949547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createFocusUnfocusListeners() {
this.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent arg0) {
setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
setBackground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));
search = "";
}
public void focusGained(FocusEvent arg0) {
setForeground(getDisplay().getSystemColor(SWT.COLOR_BLACK));
setBackground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
}
});
}
COM: <s> defines the functionality of focus and unfocus events </s>
|
funcom_train/4922921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCaseInsensitiveMultipleMappedObjectProperty() {
this.isCaseSensitive = false;
MockObjectOne one = this.record_instantiate(MockObjectOne.class);
this.object.setMapOne("case", one);
one.setPropertyA("Lower");
MockObjectOne two = this.record_instantiate(MockObjectOne.class);
this.object.setMapOne("CASE", two);
two.setPropertyA("Upper");
this.doTest("mapone{case}.propertya", "Lower",
"MAPONE{CASE}.PROPERTYA", "Upper");
}
COM: <s> ensure can load case insensitive multiple mapped object property </s>
|
funcom_train/28362151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void publishBuffer() {
synchronized( SERVICE_HANDLERS ) {
final ServiceHandler serviceHandler = _selectedServiceHandler;
if ( serviceHandler != null ) {
try {
serviceHandler.publishBuffer();
refreshForMonitorSelection();
}
catch( Exception exception ) {
getMainWindow().displayError( "Publish Error", "Exception attempting to publish records to the database!", exception );
}
}
}
}
COM: <s> publish the buffer to the database </s>
|
funcom_train/49148214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
for (int i = 0; i < playerWindows.size(); i++) {
try {
(playerWindows.elementAt(i)).close();
} catch (Exception e) {
}
}
playerWindows.removeAllElements();
// close the RTP session.
for (int i = 0; i < mgrs.length; i++) {
if (mgrs[i] != null) {
mgrs[i].removeTargets("Closing session from AVReceive3");
mgrs[i].dispose();
mgrs[i] = null;
}
}
}
COM: <s> close the players and the session managers </s>
|
funcom_train/14027560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IValueType getLocal(int index) {
if ((index<0) || (index>=_maxLocals)) {
throw new InvalidMethodStateException("Variable index out of range (was "+index+", should be 0.."+(_maxLocals-1)+")");
}
return _locals[index];
}
COM: <s> return the content of a local variable </s>
|
funcom_train/46435846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Boolean getShowHoursPreference(OpBroker broker, OpUser user) {
String showHoursPref = user.getPreferenceValue(OpPreference.SHOW_ASSIGNMENT_IN_HOURS);
if (showHoursPref == null) {
showHoursPref = OpSettingsService.getService().getStringValue(broker, OpSettings.SHOW_RESOURCES_IN_HOURS);
}
return Boolean.valueOf(showHoursPref);
}
COM: <s> gets the user preferences to show the assignment values in or in hours </s>
|
funcom_train/8347524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand2() {
if (exitCommand2 == null) {//GEN-END:|98-getter|0|98-preInit
// write pre-init user code here
exitCommand2 = new Command("Volver al Menu", Command.EXIT, 0);//GEN-LINE:|98-getter|1|98-postInit
// write post-init user code here
}//GEN-BEGIN:|98-getter|2|
return exitCommand2;
}
COM: <s> returns an initiliazed instance of exit command2 component </s>
|
funcom_train/5413267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isGrantee(String zimbraId) {
if (zimbraId == null || zimbraId.equals(GUID_PUBLIC))
return (mType == GRANTEE_PUBLIC);
else if (zimbraId.equals(GUID_AUTHUSER))
return (mType == GRANTEE_AUTHUSER);
return zimbraId.equals(mGrantee);
}
COM: <s> returns whether the principal id exactly matches the grantee </s>
|
funcom_train/42302783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Player nextTurn(int n) {
// if (n < 0 || n > numberOfPlayers) {
// throw new RuntimeException(
// "PlayersTable: invalid request for nextTurn(). Asked " + n
// + " on a table of " + numberOfPlayers + " players.");
// }
return getPlayer(((n + 1) % numberOfPlayers));
}
COM: <s> returns the number corresponding to the next player which is supposed to </s>
|
funcom_train/21356727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
final StringBuffer buf = new StringBuffer();
buf.append(" AbstractParamType:")
.append(" {Name=").append(iName)
.append(", OrderIndex=").append(iOrderIndex)
.append(", Value=").append(iValue)
.append(", IsInternal=").append(isInternal)
.append('}');
return buf.toString();
}
COM: <s> returns a useful string representation of this implementation instance that </s>
|
funcom_train/48960538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMetric(SonarMetric metric) {
if (metric != null) {
if (metrics == null) {
metrics = new TreeSet<SonarMetric>(new Comparator<SonarMetric>() {
@Override public int compare(SonarMetric metric, SonarMetric other) {
return metric.getMetric().compareTo(other.getMetric());
}
});
}
metrics.add(metric);
}
}
COM: <s> stores a new metric </s>
|
funcom_train/10591450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Integer createInteger(String s) {
Integer i = null;
try {
i = new Integer(s);
} catch (NumberFormatException nfe) {
// ignore it, write only warning
if (getLogger().isWarnEnabled()) {
getLogger().warn("Cannot convert " + s + " to Integer", nfe);
}
}
return i;
}
COM: <s> create an integer </s>
|
funcom_train/38415003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlayerInfo( Player player ) {
if( player.getBasicChar().getEnvironment() == EnvironmentManager.ENVIRONMENT_WOT )
setWotPlayerInfo( player );
else if ( player.getBasicChar().getEnvironment() == EnvironmentManager.ENVIRONMENT_ROGUE_LIKE )
setRLikePlayerInfo( player );
}
COM: <s> to set the player info given a player </s>
|
funcom_train/23991742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OWLObjectProperty addObjectProperty(String sID, OWLOntology ont) {
//Create "Question" Individual and set the class
IRI iri = IRI.create(ont.getOntologyID().getOntologyIRI() + "#" + sID);
OWLObjectProperty choice = df.getOWLObjectProperty(iri);
manager.addAxiom(ont, df.getOWLDeclarationAxiom(choice));
return choice;
}
COM: <s> create a property </s>
|
funcom_train/2295168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParamTabWpReportType(String value) {
if (I_CmsReport.REPORT_TYPE_SIMPLE.equals(value) || I_CmsReport.REPORT_TYPE_EXTENDED.equals(value)) {
// set only if valid parameter value is found
m_userSettings.setWorkplaceReportType(value);
}
}
COM: <s> sets the workplace report type setting </s>
|
funcom_train/4780266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenuItem getMultiLineGroupDefinitionsMenuItem() {
if (multiLineGroupDefinitionsMenuItem == null) {
multiLineGroupDefinitionsMenuItem = new JCheckBoxMenuItem();
multiLineGroupDefinitionsMenuItem.setText(ResourceUtil.getString("menu.settings.multilinegroups"));
multiLineGroupDefinitionsMenuItem.addActionListener(actionListener);
multiLineGroupDefinitionsMenuItem.setActionCommand(ActionConstants.MULTIPLE_LINE_GROUP_DEFINITION_ACTION);
multiLineGroupDefinitionsMenuItem.setSelected(UserPreferences.getMultipleLineGroupDefinitions());
}
return multiLineGroupDefinitionsMenuItem;
}
COM: <s> this method initializes multi line group definition menu item </s>
|
funcom_train/19441870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFindIterTwice() {
Find<String> finder = new Find<String>(eqBar);
Iterator<? extends String> iter = finder.fn(list.iterator());
assertEquals(BAR, iter.next());
iter = finder.fn(iter);
assertEquals(BAR, iter.next());
iter = finder.fn(iter);
assertTrue(!iter.hasNext());
}
COM: <s> ensures that the mulitple instances are found and that no subsequent </s>
|
funcom_train/32082444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void intersect(int x, int y, int width, int height) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
GdkRectangle gdkRect = new GdkRectangle();
gdkRect.x = x;
gdkRect.y = y;
gdkRect.width = width;
gdkRect.height = height;
int /*long*/ rectRgn = OS.gdk_region_rectangle(gdkRect);
OS.gdk_region_intersect(handle, rectRgn);
OS.gdk_region_destroy(rectRgn);
}
COM: <s> intersects the given rectangle to the collection of polygons </s>
|
funcom_train/43366097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanelContent() {
if (jPanelContent == null) {
jPanelContent = new JPanel();
jPanelContent.setLayout(new BorderLayout());
jPanelContent.add(getJToolBar(), java.awt.BorderLayout.NORTH);
jPanelContent.add(getJTabbedPane(), java.awt.BorderLayout.CENTER);
}
return jPanelContent;
}
COM: <s> this method initializes j panel content </s>
|
funcom_train/13390925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent evt) {
RemotePropertyChangeEvent remoteEvent = new RemotePropertyChangeEvent(
evt);
try {
eventHandler.fire(remoteEvent);
} catch(RemoteException e) {
logger.log(Level.SEVERE, "DispatchEventHandler fire invocation", e);
} catch(NoEventConsumerException e) {
logger.warning("No EventConsumers registered");
}
}
COM: <s> this method gets called when a bound property is changed </s>
|
funcom_train/17788700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSegmark(int component) {
if ((cocParametersList != null) && cocParametersList.containsKey(component)) {
return cocParametersList.get(component).segmark;
} else if (codParameters != null) {
return codParameters.segmark;
} else {
return parent.isSegmark(component);
}
}
COM: <s> check if the segmark flag is active </s>
|
funcom_train/31058072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean pingAddress( CellAddress ca ) {
// first get the remote server handle
RemoteCell rs = null;
try {
rs = ca.getRemoteCell();
} catch( CellConnectException error ) {
// we could not convert the cell address to the remote
// server! something went wrong.
return false;
}
// now try pinging the remote server
try {
return rs.ping();
} catch( RemoteException error ) {
// for some reason could not execute the ping on the
// remote server
return false;
}
}
COM: <s> a helper function for ourselves to ping a cell </s>
|
funcom_train/20901904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map scanFiles() {
if (_scanDirs == null)
return Collections.EMPTY_MAP;
HashMap scanInfo = new HashMap();
Iterator itor = _scanDirs.iterator();
while (itor.hasNext()) {
File dir = (File) itor.next();
if ((dir != null) && (dir.exists()))
scanFile(dir, scanInfo);
}
return scanInfo;
}
COM: <s> recursively scan all files in the designated directories </s>
|
funcom_train/3046997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void performExecutions(EventSource session) throws HibernateException {
log.trace("executing flush");
try {
// we need to lock the collection caches before
// executing entity inserts/updates in order to
// account for bidi associations
session.getActionQueue().prepareActions();
session.getActionQueue().executeActions();
}
catch (HibernateException he) {
log.error("Could not synchronize database state with session", he);
throw he;
}
}
COM: <s> execute all sql and second level cache updates in a </s>
|
funcom_train/4375545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (o == null) return false;
if (this == o) return true;
if (super.equals(o) ) {
if (o instanceof NTCredentials) {
NTCredentials that = (NTCredentials) o;
return LangUtils.equals(this.domain, that.domain)
&& LangUtils.equals(this.host, that.host);
}
}
return false;
}
COM: <s> performs a case sensitive check to see if the components of the credentials </s>
|
funcom_train/3006472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String retrieveFormatString( String formatKey ) throws JspException {
String result = RequestUtils.message( pageContext, this.bundle,
this.localeKey, formatKey );
if( ( result!=null ) &&
!( result.startsWith( "???" ) &&
result.endsWith( "???" ) ) )
return result;
else
return null;
}
COM: <s> retrieve format string from message bundle and return null if </s>
|
funcom_train/38857128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BaseContext getContextFromCache(final Method method, final List<Class<?>> paramSignature){
try{
cacheGate.readLock().lock();
final Map<List<Class<?>>,BaseContext> map = contextCache.get(method);
assert map != null;
final BaseContext cachedContext = map.get(paramSignature);
assert cachedContext != null;
return cachedContext;
}finally{
cacheGate.readLock().unlock();
}
}
COM: <s> get from the cache the base context the method comes from </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.