__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/29895556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ArchitectureElement getParentComponentOrConnector(Node node, Configuration conf) {
String compName = ((Element) node.getParentNode()).getAttribute("componentName");
if (compName == null) {
compName = ((Element) node.getParentNode()).getAttribute("connectorName");
}
return conf.getComponentOrConnectorByName(compName);
}
COM: <s> returns the component or connector that belongs to the parent element </s>
|
funcom_train/27759769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRegFail(String regAddress) {
Dimension d = registrarLabel.getPreferredSize();
registrarLabel.setText("Failed!");
registrarLabel.setPreferredSize(d);
registrarLabel.setForeground(Color.RED);
//registrarLabel.setToolTipText("Failed to register " + regAddress);
registrarLabel.setIcon(userInactiveIcon);
/*
registrarLabel.setHorizontalAlignment(SwingConstants.LEFT);
registrarLabel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
*/
}
COM: <s> set registration failed status in the status label </s>
|
funcom_train/8352897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Listener createListener() {
try{
InetAddress.getByName(serverAddress);
}catch(UnknownHostException e){
throw new FtpServerConfigurationException("Unknown host",e);
}
return new NioListener(serverAddress, port, implicitSsl, ssl,
dataConnectionConfig, idleTimeout, blockedAddresses,
blockedSubnets);
}
COM: <s> create a listener based on the settings of this factory </s>
|
funcom_train/28116370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test() throws Exception {
TestContext context = getContext();
Session session = context.getSession();
Class type = context.getMessageType();
Message message = new BasicMessageFactory().create(type);
MessagePopulatorVerifier verifier = PopulatorVerifierFactory.create(
message);
verifier.populate(message);
Message received = sendReceive(message, DESTINATION);
verifier.verify(received);
acknowledge(received);
}
COM: <s> verifies that foreign messages are supported by the jms provider </s>
|
funcom_train/31477059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void scanDirectory(File dir, String suffix) {
File[] files = dir.listFiles();
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory()) {
scanDirectory(files[i], suffix);
} else {
if (files[i].getName().endsWith(suffix))
inFiles.add(files[i]);
}
}
}
COM: <s> scans a directory recursively for all files with the given suffix </s>
|
funcom_train/40815684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean authenticate() {
boolean flag = false;
try {
ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, USER);
ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, PSW);
ctx.reconnect(connCtls);
logger.info(USER + " is authenticated");
flag = true;
} catch (AuthenticationException e) {
logger.error(USER + " is not authenticated");
} catch (NamingException e) {
logger.error(USER + " is not authenticated");
}
return flag;
}
COM: <s> authenticate a user with default user and password </s>
|
funcom_train/17952697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void add(char[] w, int wLen)
{ if (i+wLen >= b.length)
{ char[] new_b = new char[i+wLen+INC];
for (int c = 0; c < i; c++) new_b[c] = b[c];
b = new_b;
}
for (int c = 0; c < wLen; c++) b[i++] = w[c];
}
COM: <s> adds w len characters to the word being stemmed contained in a portion </s>
|
funcom_train/48747496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(TestResult result) {
if (testSchemas == null) {
testSchemas = new Vector();
}
try {
addSchema(testSchemas);
} catch (Exception e) {
e.printStackTrace();
if (Loggy.isTrace(this)) System.out.println("Error adding Schemas: " + e.getMessage());
}
super.run(result);
cleanUp();
}
COM: <s> runs the tests and collects their result in a test result </s>
|
funcom_train/13479106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void evaluateTurnCommands() {
masterController.startTurnCommands();
Enumeration enumeration = clientInfos.elements();
while (enumeration.hasMoreElements()) {
ClientInfo info = (ClientInfo)enumeration.nextElement();
Orion.DEBUG("TurnCoordinator: Evaluating turn commands for '" +
info.getPlayer().getAlienType().getName() + "':");
masterController.processTurnCommandsFor(info.getTurnCommands(),
info.getPlayer());
}
masterController.endTurnCommands();
}
COM: <s> receives the tunr commands from the clients and executes them </s>
|
funcom_train/45622695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPathsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CombinePathType_paths_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CombinePathType_paths_feature", "_UI_CombinePathType_type"),
MSBPackage.eINSTANCE.getCombinePathType_Paths(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the paths feature </s>
|
funcom_train/4641951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyChannelListeners(Enumeration listeners, final IConnection connection, final boolean created) {
while(listeners.hasMoreElements()) {
final IChannelListener listener = (IChannelListener) listeners.nextElement();
new Thread(new Runnable() {
public void run() {
if(created) listener.spotConnectionEstablished(connection);
else listener.spotConnectionRemoved(connection);
}
}).start();
}
}
COM: <s> notify the registered channel listeners with the updated private connection </s>
|
funcom_train/3652560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restore() {
if(isMaximizable() && isMaximum()) {
try {
setMaximum(false);
} catch (PropertyVetoException e) { }
} else if ( isIconifiable() && isIcon() ) {
try {
setIcon(false);
} catch (PropertyVetoException e4) { }
}
}
COM: <s> helper method to de iconify the window </s>
|
funcom_train/37519073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasUniverseRuntimeSupport() {
Attribute attr = attributes.get(Constants.ATT_UNIVERSE_VERSION);
if (attr == null) { // attribute not found, look for annotation
attr = attributes.get(Constants.ATT_RUNTIME_VISIBLE_ANNOTATIONS);
if (attr == null)
return false;
Annotation annot = ((RuntimeVisibleAnnotationsAttribute)attr).get("org.multijava.universes.UniverseClass");
if (annot == null)
return false;
return ((AnnotBooleanElementValue) annot.getValue("hasRuntimeSupport")).value();
} else {
return ((UniverseClassAttribute)attr).hasRuntimeSupport();
}
}
COM: <s> return true if this class was compiled with universe run time </s>
|
funcom_train/25476135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void extractSamples() {
// Create the array of samples first
samples = new String[seqData.length()];
// Go through the sequence one position at a time
// and work out the sample at that position
int savePosition = position;
for (int i = 0; i < seqData.length(); i++) {
setPosition(i);
String posSample = extractPositionSample();
// Use the equivalent cached sample for economy
samples[i] = cache.getCachedValue(posSample);
}
position = savePosition;
}
COM: <s> break down the sequence data in a series of samples of the correct </s>
|
funcom_train/9394960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String name, Object value) throws IllegalArgumentException {
Class<?> valueClass = null;
if (value != null) {
valueClass = value.getClass();
}
ObjectSlot slot = findSlot(name, valueClass);
if (slot == null) {
throw new IllegalArgumentException();
}
slot.fieldValue = value;
slot.defaulted = false; // No longer default value
}
COM: <s> find and set the object value of a given field named </s>
|
funcom_train/50542820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit() {
Xid curr_tx=getCurrentTransaction();
if(curr_tx == null)
Trace.error("TransactionalHashtable.commit()", "no transaction associated with current thread");
else {
repl_mgr.commit(curr_tx);
((Map)thread_local.get()).remove(Xid.XID);
}
}
COM: <s> commits all modifications done in the current transaction kept in temporary storage </s>
|
funcom_train/777573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String comparePerformative( ACLMessage msg1, ACLMessage msg2 ) {
int performative1 = msg1.getPerformative();
int performative2 = msg2.getPerformative();
if ( performative1 != performative2 ) {
return
"first message performative " +
ACLMessage.getPerformative( performative1 ) +
" not equal to " +
"second message performative " +
ACLMessage.getPerformative( performative2 );
}
else {
return null;
}
}
COM: <s> compare just the performative slot of two messages </s>
|
funcom_train/20882935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTargetPoint(Relation target, float pos, float f0) {
Item item = target.appendItem();
item.getFeatures().setFloat("pos", pos);
if (f0 > 500.0) {
item.getFeatures().setFloat("f0", 500.0f);
} else if (f0 < 50.0) {
item.getFeatures().setFloat("f0", 50.0f);
} else {
item.getFeatures().setFloat("f0", f0);
}
}
COM: <s> adds the target point at the given time to the given frequency </s>
|
funcom_train/25213151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCode(Token token, Code code, boolean global) {
if (codeMap == null) {
codeMap = new HashMap<Token, Code>();
}
codeMap.put(token, code);
if (global && next != null) {
next.setCode(token, code, global);
}
}
COM: <s> setter for active characters or macros in the requested group </s>
|
funcom_train/23845125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getPosition(Vector3d pos) {
if(viewPath != null)
viewTg.getLocalToVworld(viewPath, worldEyeTransform);
else
viewTg.getLocalToVworld(worldEyeTransform);
worldEyeTransform.mul(viewTx);
worldEyeTransform.get(locationVector);
pos.x = locationVector.x;
pos.y = locationVector.y;
pos.z = locationVector.z;
}
COM: <s> get the current user position in world coordinates </s>
|
funcom_train/20507545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void listaDeParametros2() throws SintaticoException, SemanticoException {
while(Code.FECHA_PARENTESES != tabelaLexica.getFirst().getCode()) {
tipo = -1;
consume(Code.PONTO_E_VIRGULA);
listaDeIdentificadores();
consume(Code.DOIS_PONTOS);
tipo();
}
}
COM: <s> representa o nao terminal lista de parametros2 </s>
|
funcom_train/44708860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator getCategories(final String purposeKey) {
CategorizedObject c = new CategorizedObject(this);
Iterator i;
try {
Collection cat = c.getParentCategories(purposeKey);
i = cat.iterator();
} catch (DataObjectNotFoundException e) {
s_log.warn ("DataObjectNotFoundException thrown in getCategories()", e);
i = Collections.EMPTY_LIST.iterator();
}
return i;
}
COM: <s> returns an iterator over the categories associated with this </s>
|
funcom_train/39972865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJUpdateIntervalTextField() {
if (jUpdateIntervalTextField == null) {
jUpdateIntervalTextField = new JTextField();
jUpdateIntervalTextField.setLocation(new Point(105, 75));
jUpdateIntervalTextField.setSize(new Dimension(46, 20));
jUpdateIntervalTextField.setToolTipText("a value between 1 and 300");
}
return jUpdateIntervalTextField;
}
COM: <s> this method initializes j update interval text field </s>
|
funcom_train/32329069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName(final String newName) {
if (!name.equals(newName)) {
final String oldName = name;
name = newName;
modified = true;
for (final DataProjectListener listener : copyOfListeners()) {
listener.nameChanged(this, oldName, newName);
}
}
}
COM: <s> sets the name of this project </s>
|
funcom_train/3417759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == null) return false;
if (!super.equals(obj)) return false; // super does class check
RuleBasedCollator other = (RuleBasedCollator) obj;
// all other non-transient information is also contained in rules.
return (getRules().equals(other.getRules()));
}
COM: <s> compares the equality of two collation objects </s>
|
funcom_train/19052448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void preferenceChanged(View child, boolean width, boolean height) {
super.preferenceChanged(child, width, height);
if (WWETableView.this.multiRowCells && height) {
for (int i = rowIndex - 1; i >= 0; i--) {
RowView rv = WWETableView.this.getRow(i);
if (rv.multiRowCells) {
rv.preferenceChanged(null, false, true);
break;
}
}
}
}
COM: <s> this is called by a child to indicate its </s>
|
funcom_train/35847051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTarget(Object t) {
enableTabs(t);
for (int i = 0; i < tabs.getTabCount(); i++) {
Component tab = tabs.getComponentAt(i);
if (tab.isEnabled()) {
tabs.setSelectedComponent(tab);
break;
}
}
}
COM: <s> sets the target of the multieditorpane </s>
|
funcom_train/28723599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void backupGlossLetterFile(GlossLetter gl) {
String lfile = getLetterFile(gl.getLetter(), false);
File file1 = new File(lfile);
File file2 = new File(lfile+".bak");
if (!file1.exists()) {
return;
}
if (file2.exists()) {
file2.delete();
}
file1.renameTo(file2);
}
COM: <s> creates a backup file </s>
|
funcom_train/28911017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isIncludeElement(QName element) {
if (element.localpart.equals(XINCLUDE_INCLUDE)) {
if (hasXIncludeNamespace(element)) {
return true;
}
else if (!fOldNamespaceWarningIssued && hasXInclude2001Namespace(element)) {
reportError("OldXIncludeNamespace", null, XMLErrorReporter.SEVERITY_WARNING);
fOldNamespaceWarningIssued = true;
}
}
return false;
}
COM: <s> checks if the element is an lt include gt element </s>
|
funcom_train/3021395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Edge removeEdge(Edge e) {
if (!checkSanity || containsEdge(e)) {
e.getTail().removeOutEdge(e);
e.getHead().removeInEdge(e);
e.getOwner().edges.remove(e);
e.owner = null;
}
return e;
}
COM: <s> removes the given edge from this graph if contained therein or </s>
|
funcom_train/50776369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BackendTreeNode getPreviousNode() {
BackendTreeNode previousSibling;
BackendTreeNode myParent = (BackendTreeNode) getParent();
if (myParent == null) {
return null;
}
previousSibling = getPreviousSibling();
if (previousSibling != null) {
if (previousSibling.getChildCount() == 0)
return previousSibling;
else
return previousSibling.getLastLeaf();
} else {
return myParent;
}
}
COM: <s> returns the node that precedes this node in a preorder traversal of </s>
|
funcom_train/3154553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStop() {
/*
StopWatch watch = new StopWatch();
long endTime;
watch.stop();
endTime = watch.getEndTime();
watch.start();
try {
Thread.sleep(10);
}
catch(InterruptedException e) {
}
watch.stop();
assertTrue(endTime != watch.getEndTime());
*/
}
COM: <s> tests the functionality of stop </s>
|
funcom_train/45447915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void logMessage(String theMessage) {
final NativeLog log = coreLog;
this.coreLog = null;
this.message = theMessage;
ThreadContextStorage.addAllInformation(informationStorage);
stackSize = ThreadContextStorage.getThreadContext().stackSize(
InformationKeyImpl.METHODNAME);
log.forcedLog(fqcn, this);
}
COM: <s> set the message and the additional information and </s>
|
funcom_train/3517782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveUp(DUID child) {
int pos = children.indexOf(child);
if (pos == -1 || pos == 0)
return; // child not found or on top
children.setElementAt(children.elementAt(pos - 1), pos);
children.setElementAt(child, pos - 1);
}
COM: <s> moves the ddso child one position up in the tree hierarchy </s>
|
funcom_train/44701847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countAnnotatedContigs(AssemblyId assemblyId) throws SQLException {
Statement statement = connection.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
ResultSet result;
int count = 0;
String query = "SELECT COUNT(*) FROM " + ContigContainer.CONTIGS
+ "_" + assemblyId + " WHERE " + ANNOTATED + "=true";
try {
result = statement.executeQuery(query);
if (result.first()) {
count = result.getInt("count");
}
} catch (SQLException e) {
throw e;
} finally {
statement.close();
}
return count;
} //countAnnotatedContigs()
COM: <s> counts the number of contigs annotated </s>
|
funcom_train/8528181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateStatusToProcessed() throws ServiceException {
try {
logger.fine("updating file status to processed");
DbHelper dh = new DbHelper().open();
dh.setFileStatus(this.mId, STATUS_PROCESSED);
} catch (SQLException se) {
logger.severe("SQL Exception:" + se.getMessage());
throw new ServiceException("SQL Exception:" + se.getMessage());
}
}
COM: <s> update status to processed </s>
|
funcom_train/11590834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAllowEditSource(){
if (_allowEditSource != null)
return _allowEditSource.booleanValue();
ValueBinding vb = getValueBinding("allowEditSource");
return vb != null ? ((Boolean)vb.getValue(getFacesContext())).booleanValue() : true;
}
COM: <s> allows the user to edit the html source code </s>
|
funcom_train/21160672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getMTotalBoardWeightEdit() {
if (mTotalBoardWeightEdit == null) {
mTotalBoardWeightEdit = new JTextField();
mTotalBoardWeightEdit.setBounds(new Rectangle(345, 330, 76, 20));
mTotalBoardWeightEdit.setToolTipText(LanguageResource.getString("WeightCalculatorDialog.17")); //$NON-NLS-1$
mTotalBoardWeightEdit.setEditable(false);
}
return mTotalBoardWeightEdit;
}
COM: <s> this method initializes m total board weight edit </s>
|
funcom_train/44822241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent e) {
// Currently, don't need to do anything, but at some point may need
// to do a viewToModel and an updateAdornments.
// try {
// viewToModel();
// updateAdornments();
// } catch (Exception x) {
// logger.error("Failed to update adornments of tab view.", x);
// }
}
COM: <s> invoked when the target of the listener has changed its state </s>
|
funcom_train/3362954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(KeyStroke keyStroke) {
if (arrayTable == null) {
InputMap parent = getParent();
if (parent != null) {
return parent.get(keyStroke);
}
return null;
}
Object value = arrayTable.get(keyStroke);
if (value == null) {
InputMap parent = getParent();
if (parent != null) {
return parent.get(keyStroke);
}
}
return value;
}
COM: <s> returns the binding for code key stroke code messaging the </s>
|
funcom_train/31894789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFactoryBlocked(int x, int y) {
return (factory != null)
&& (x >= factory.getTileLocation().x && y >= factory
.getTileLocation().y)
&& (x - factory.getTileLocation().x < 2 && y
- factory.getTileLocation().y < 2);
}
COM: <s> returns true if a tile is occupied by a factory </s>
|
funcom_train/1165294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IDs getBlockingUsersIDs() throws WeiboException {
// return new IDs(get(getBaseURL() + "blocks/blocking/ids.xml", true));
return new IDs(get(getBaseURL() + "blocks/blocking/ids.json", true),this);
}
COM: <s> returns an array of numeric user ids the authenticating user is blocking </s>
|
funcom_train/31342133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char next(char c) throws JSONException {
char n = next();
if (n != c) {
throw syntaxError(NLS.bind("Expected ''{0}'' and instead saw ''{1}''", c, n)); //$NON-NLS-1$
}
return n;
}
COM: <s> consume the next character and check that it matches a specified </s>
|
funcom_train/42567167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createPanels() {
// Create the card layout
cardLayout = new CardLayout();
cardPanel = new JPanel(cardLayout);
// Create the panels for the card panel
createUnloadedPanel();
createLoadedPanel();
// Add the panels to our card panel
cardPanel.add(unloadedPanel, "unloaded");
cardPanel.add(loadedPanel, "loaded");
cardLayout.show(cardPanel, "unloaded");
add(cardPanel, BorderLayout.CENTER);
}
COM: <s> create the panels </s>
|
funcom_train/1049410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JButton getSetPilot() {
if (setPilot == null) {
setPilot = new JButton();
setPilot.setText("set");
setPilot.setToolTipText("Confirm selected pilot");
setPilot.setLocation(new java.awt.Point(300,25));
setPilot.setSize(new java.awt.Dimension(63,23));
setPilot.setMaximumSize(new java.awt.Dimension(63,23));
setPilot.setMinimumSize(new java.awt.Dimension(63,23));
setPilot.setPreferredSize(new java.awt.Dimension(63,23));
}
return setPilot;
}
COM: <s> this method initializes set pilot </s>
|
funcom_train/2552992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(Project project) {
// if (project.getReadyToProcess() != null &&
// project.getReadyToProcess().equals("Y")) {
// project.setStatus("ready_to_process"); }
// else { project.setStatus("not_ready_to_process"); }
projectDAO.update(project);
}
COM: <s> updates an instance of project in the database </s>
|
funcom_train/18643749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isValidLayout() {
boolean ret=true;
for (int i=1; ret == true && i < m_nodeList.size(); i++) {
ret = !isNodesOverlapping((Node)m_nodeList.get(i-1),
(Node)m_nodeList.get(i));
}
if (ret == true) {
// Check the first and last nodes
ret = !isNodesOverlapping((Node)m_nodeList.get(0),
(Node)m_nodeList.get(m_nodeList.size()-1));
}
return(ret);
}
COM: <s> this method checks whether any of the nodes are overlapping </s>
|
funcom_train/45895550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void select(boolean state) {
name.color(state ? TextRenderer.RED : TextRenderer.GREEN);
priority.color(state ? TextRenderer.RED : TextRenderer.GREEN);
capacity.color(state ? TextRenderer.RED : TextRenderer.GREEN);
capacityPercent.color(state ? TextRenderer.RED : TextRenderer.GREEN);
count.color(state ? TextRenderer.RED : TextRenderer.GREEN);
completion.color(state ? TextRenderer.RED : TextRenderer.GREEN);
}
COM: <s> change the coloring to select this line </s>
|
funcom_train/51343314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final private T get() {
final Thread t = Thread.currentThread();
T tmp = map.get(t);
if (tmp == null) {
if (map.put(t, tmp = initialValue()) != null) {
/*
* Note: Since the key is the thread it is not possible for
* there to be a concurrent put of an entry under the same
* key so we do not have to use putIfAbsent().
*/
throw new AssertionError();
}
// Add to list.
synchronized(list) {
list.add(tmp);
}
}
if (halt)
throw new RuntimeException(firstCause.get());
return tmp;
}
COM: <s> return a thread local buffer </s>
|
funcom_train/374767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dump(long seconds, int useconds, int wirelen, ByteBuffer packet) {
if (packet.hasArray()) {
final byte[] data = packet.array();
final int offset = packet.arrayOffset();
dump(seconds, useconds, wirelen, data, offset + packet.position(),
offset + packet.limit());
} else {
dump1(seconds, useconds, wirelen, packet, packet.position(),
packet.limit());
}
}
COM: <s> writes packet data between position and limit properties to savefile </s>
|
funcom_train/1952399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
connectionEClass = createEClass(CONNECTION);
createEAttribute(connectionEClass, CONNECTION__ID);
createEAttribute(connectionEClass, CONNECTION__COMMUNICATOR);
networkConfigEClass = createEClass(NETWORK_CONFIG);
createEAttribute(networkConfigEClass, NETWORK_CONFIG__ID);
createEReference(networkConfigEClass, NETWORK_CONFIG__CONNECTIONS);
// Create data types
iSerialCommunicatorEDataType = createEDataType(ISERIAL_COMMUNICATOR);
}
COM: <s> creates the meta model objects for the package </s>
|
funcom_train/51109634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PaintingStats getPaintingStats() {
SelectQuery query =
new SelectQuery(
PaintingStats.class,
ExpressionFactory.matchExp(_PaintingStats.ARTIST_PROPERTY, this));
List stats = getDataContext().performQuery(query);
return (stats.size() > 0) ? (PaintingStats) stats.get(0) : null;
}
COM: <s> returns stats for all paintings of this artist </s>
|
funcom_train/19977598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasEmptyRows(int[] columnsToCheck) {
boolean empty = true;
for (int i = 0; i < columnsToCheck.length; i++) {
if (getValueAt(getRowCount() - 1, columnsToCheck[i]) != null) {
empty = false;
}
}
return empty;
}
COM: <s> checks if the model has empty rows </s>
|
funcom_train/19305452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int crIPDBlockArea() {
int actual = 0;
final int computed = this.traitIPDimensionOpt();
if (computed < 0) {
actual = ancestorArea().crIpd()
- traitBorderStartWidth()
- traitBorderEndWidth()
- traitPaddingStart()
- traitPaddingEnd();
} else {
actual = computed;
}
return actual;
}
COM: <s> returns the ipd for a block area </s>
|
funcom_train/3839925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendHallRoomOpening(RoomInformation ri) {
// HALLROOMOPENING|ams's game#120#97#English, OSPD 2004#No word stealing
// please#8#WAITING#0#francais#ams&jim&judge hedd&
String gameinfo = "HALLROOMOPENING|";
/* Getting game infos. */
gameinfo += formatRoomInformation(ri);
sendData(gameinfo);
getLogger().debug("Sending the new game on server: "
+ gameinfo);
}
COM: <s> sending a notification to hall users about a room newly created on </s>
|
funcom_train/4253574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttributeField getAttribute(String attribute_name)
{ for (int i=0; i<media.size(); i++)
{ AttributeField af=(AttributeField)av.elementAt(i);
if (af.getAttributeName().equals(attribute_name)) return af;
}
return null;
}
COM: <s> gets the first attribute field of a particular attribute name </s>
|
funcom_train/36432261 | /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("DasType. id: '");
buf .append (id)
.append ("' category: '")
.append ((category == null) ? "null" : category)
.append ("' method: '")
.append ((method == null) ? "null" : method)
.append ("'");
return buf.toString();
}
COM: <s> to string simple representation of this object </s>
|
funcom_train/22735589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCmpFiller2() {
GridData gridData18 = new GridData();
gridData18.grabExcessVerticalSpace = true;
gridData18.verticalAlignment = GridData.FILL;
gridData18.horizontalAlignment = GridData.BEGINNING;
this.cmpFiller2 = new Composite(this.cmpButtons, SWT.NONE);
this.cmpFiller2.setLayout(new GridLayout());
this.cmpFiller2.setLayoutData(gridData18);
}
COM: <s> this method initializes cmp filler2 </s>
|
funcom_train/29369076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkToken(Token tok) {
NGramProbability prob = new NGramProbability(2, hm);
if(prob.getWordProbability(tok.getContent())<=1.0E-7) {
tok.setErrorProbability(1.0);
ProjectProperties.getInstance().getLogger().log(Level.INFO, "The word \"" + tok.getContent() + "\" is marked as incorrect!");
}
}
COM: <s> checks whether a word token is misspelled or not </s>
|
funcom_train/3702385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OutOperator getOutOperator(String strName) {
Iterator it = outOperators();
OutOperator op;
while (it.hasNext()) {
op = (OutOperator) it.next();
if (strName.equals(op.getName()) == true) {
return (op);
}
}
return (null);
} // of method
COM: <s> get an out operator by name </s>
|
funcom_train/42037446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String canonical (String path) {
if (path == null) throw new IllegalArgumentException("path cannot be null.");
File file = new File(path);
try {
return file.getCanonicalPath();
} catch (IOException ex) {
file = file.getAbsoluteFile();
if (file.getName().equals(".")) file = file.getParentFile();
return file.getPath();
}
}
COM: <s> returns the canonical path for the specified path </s>
|
funcom_train/585952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createComboDbIni() {
GridData gridData = new GridData();
gridData.grabExcessHorizontalSpace = true;
gridData.verticalAlignment = GridData.CENTER;
gridData.horizontalAlignment = GridData.FILL;
comboDbIni = new Combo( this, SWT.READ_ONLY ) ;
comboDbIni.setLayoutData( gridData );
comboDbIni.addSelectionListener( new SelectionListener(){
public void widgetDefaultSelected( SelectionEvent e ) {
setUser();
}
public void widgetSelected( SelectionEvent e ) {
widgetDefaultSelected( e );
}
});
}
COM: <s> this method initializes combo db ini </s>
|
funcom_train/32648329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long timestamp(Object resource) {
long timestamp;
if (resource instanceof File) {
timestamp = ((File) resource).lastModified();
} else if (resource instanceof URL) {
try {
timestamp = ((URL) resource).openConnection().getLastModified();
} catch (IOException e) {
timestamp = 0;
}
} else {
throw new IllegalArgumentException("Resource not monitorizable.");
}
return timestamp;
}
COM: <s> create a timestamp indicating the last modified time </s>
|
funcom_train/42756165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EntityManager getEntityManager() {
EntityManager em = entityManager.get();
// Create a new EntityManager
if (em == null) {
LOG.debug("creating new entityManager");
em = getEntityManagerFactory().createEntityManager();
Assert.debugNotNull("entityManager", em);
entityManager.set(em);
}
return em;
}
COM: <s> on a request cycle basis getting current entity manager </s>
|
funcom_train/35298852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processThumbnailComplete() {
if (progressListeners == null) {
return;
}
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener =
(IIOWriteProgressListener)progressListeners.get(i);
listener.thumbnailComplete(this);
}
}
COM: <s> broadcasts the completion of a thumbnail write to all registered </s>
|
funcom_train/33847199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scan(Document document, final String appName) throws MissingNodeException, IOException {
List<Element> bugInstanceList = getBugInstanceList(document);
for (final Element element : bugInstanceList) {
scanAttributeList(new AttributeCallback() {
public void apply(Attribute attribute) throws MissingNodeException {
attribute.scan(element, appName);
}
});
}
}
COM: <s> scan a document to find out the ranges of attributes </s>
|
funcom_train/50483929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkSettings() throws BuildException {
if (!(getMatchOn() instanceof XMLDocument))
throw
new BuildException(getLocation()
+ " Cannot check response code on something "
+ "else than an XMLDocument!");
if (select == null)
throw new BuildException(getLocation()
+ " No XPath select expression specified!");
}
COM: <s> checks that the task was correctly set up </s>
|
funcom_train/25197592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmpty(String val, int res) throws Exception {
p.push(new TString(val, null));
new Empty("empty$").execute(p, entry, null);
assertEquals(res, p.popInteger(null).getInt());
assertNull(p.popUnchecked());
}
COM: <s> run one test for the function empty </s>
|
funcom_train/37637957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireCellSpanAdded(CellSpan newSpan) {
SpanModelEvent e =
new SpanModelEvent(
this,
SpanModelEvent.SPAN_ADDED,
newSpan.getRow(),
newSpan.getColumn(),
1,
1,
newSpan.getRowCount(),
newSpan.getColumnCount());
fireSpanChanged(e);
}
COM: <s> notifies all code span model listeners code that </s>
|
funcom_train/50335602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getLengthF(boolean meters, int scale) {
if (initializationNeeded) initializeBlocks();
float length = 0.0f;
for (int i = 0; i<mBlockEntries.size(); i++) {
length = length + mBlockEntries.get(i).getLengthMm();
}
length = length/(float)(Scale.getScaleFactor(scale));
if (meters) return (length*0.001f);
return (length*0.00328084f);
}
COM: <s> gets length of section in scale feet or scale meters </s>
|
funcom_train/18950472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applyModificationsInOrder( Section pSection, PropertySet pPropertySet ) throws ModifierException {
int numModifiers = super.iObjects.size();
for( int modifierI = 0; modifierI < numModifiers; modifierI++ ) {
((Modifier) super.iObjects.elementAt( modifierI )).modify( pSection, pPropertySet );
}
}
COM: <s> apply stored modifications in order to specified section </s>
|
funcom_train/3023997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void finalPass(PrintData printData) {
JavaDocComponent current;
for (int ndx = 0; ndx < docs.size(); ndx++) {
// Get the next element
current = ((JavaDocComponent)docs.elementAt(ndx));
// If it is time, print it
if (!current.isPrinted()) {
printCurrentTag(current, printData, false, false);
}
}
}
COM: <s> prints all unknown tags </s>
|
funcom_train/36558485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToChain(ProcessorComponent proc) {
synchronized (this) {
ProcessorComponent currentPC = this;
ProcessorComponent nextPC = nextInChain;
ProcessorComponent tmpPC = null;
while (nextPC != null) {
tmpPC = currentPC;
currentPC = nextPC;
nextPC = tmpPC.nextInChain;
}
currentPC.nextInChain = proc;
}
}
COM: <s> add a processor to the chain of execution </s>
|
funcom_train/22528066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void displayItemModelType(IItemModelType itemModel) {
List<IItemType> items = itemModel.getItemTypes();
if(items.isEmpty()) {
fBrowser.setText(Messages.AbstractActivityPreview_2);
}
else {
PreviewFactory.displayBrowserItem(items.get(0), fBrowser);
}
}
COM: <s> display the item model type in a browser </s>
|
funcom_train/17027301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeAllData() throws UserReportableException {
ISimalRepository repo;
logger.warn("Removing all data from the repository.");
try {
repo = UserApplication.getRepository();
} catch (SimalRepositoryException e) {
throw new UserReportableException("Unable to get the count of projects",
ToolsPage.class, e);
}
repo.removeAllData();
}
COM: <s> remove all data from the repository </s>
|
funcom_train/46696197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCheck_Parameter() {
System.out.println("check");
ParameterInternal param1 = ParameterFactory.newInstance().create("Type", String.class);
PropertiesImplementation instance = new PropertiesImplementation();
instance.add(param1);
boolean expResult = true;
boolean result = instance.check(param1);
assertEquals(expResult, result);
}
COM: <s> test of check method of class properties implementation </s>
|
funcom_train/44551121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read_2int(int pos, int off) {
int retval = -1;
try {
raf.seek((pos * 4) + off);
iaTemp[1] = raf.readUnsignedByte();
iaTemp[0] = raf.readUnsignedByte();
retval = (iaTemp[0] * 256) + iaTemp[1];
} catch (IOException err_msg) {
}
return (retval);
}
COM: <s> reads 2 bytes and return it as int </s>
|
funcom_train/48475253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addCellContextClickHandler(com.smartgwt.client.widgets.grid.events.CellContextClickHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.grid.events.CellContextClickEvent.getType()) == 0) setupCellContextClickEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.CellContextClickEvent.getType());
}
COM: <s> add a cell context click handler </s>
|
funcom_train/3866692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printHeader(TestResult result) {
if (result.wasSuccessful()) {
writer().println();
writer().print("OK");
writer().println (" (" + result.runCount() + " tests)");
} else {
writer().println();
writer().println("FAILURES!!!");
writer().println("Tests run: "+result.runCount()+
", Failures: "+result.failureCount()+
", Errors: "+result.errorCount());
}
}
COM: <s> prints the header of the report </s>
|
funcom_train/2803540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL appendTo(URL url) throws MalformedURLException {
String urlStr = url.toString();
if(urlStr.lastIndexOf("?") >= 0)
return new URL(urlStr + "&" + toString());
else
return new URL(urlStr + "?" + toString());
}
COM: <s> append the query string to an existing url and return the newly created </s>
|
funcom_train/46884434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String readBlock() throws IOException {
String line;
StringBuffer result = new StringBuffer();
while ((line = in.readLine()) != null) {
if (line.length() == 0) {
break;
}
if (result.length() != 0) {
result.append("\n");
}
result.append(line);
}
return result.toString();
}
COM: <s> read a block terminated by a blank line </s>
|
funcom_train/15410778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws SQLException, OptimisticLockException {
int rc = dataBind.executeUpdate();
if (useGeneratedKeys) {
// get the auto-increment value back and set into the bean
getGeneratedKeys();
} else if (selectLastInsertedId != null) {
// fetch back the Id using a query
fetchGeneratedKeyUsingSelect();
}
checkRowCount(rc);
setAdditionalProperties();
executeDerivedRelationships();
}
COM: <s> execute the insert in a normal non batch fashion </s>
|
funcom_train/15491698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getStringWidth(String s) {
setupFrame();
int w;
if (antialiasedText) {
Graphics g = frame.getGraphics();
if (g==null) {
frame = null;
setupFrame();
g = frame.getGraphics();
}
Java2.setAntialiasedText(g, true);
w = Java2.getStringWidth(s, fontMetrics, g);
g.dispose();
} else
w = fontMetrics.stringWidth(s);
return w;
}
COM: <s> returns the width in pixels of the specified string </s>
|
funcom_train/7959279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeXML(OutputStream stream) throws IOException {
PrintWriter out = new PrintWriter(stream);
out.println("<?xml version=\"1.0\"?>");
out.println("<VLToolBars version=\"1.0\">");
xmlWriteContainer(out);
out.println("</VLToolBars>");
out.flush();
}
COM: <s> saves the current toolbar configuration into an xml stream </s>
|
funcom_train/50085928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private EntryReact initiateDictionary(String nameDict, IReactionProcess reaction) {
DictionaryDatabase db = new DictionaryDatabase();
dictionary = db.getDictionary(nameDict);
String entryString = reaction.getSpecification().getSpecificationReference();
entryString = entryString.substring(entryString.indexOf("#")+1, entryString.length());
return (EntryReact) dictionary.getEntry(entryString.toLowerCase());
}
COM: <s> open the dictionary owlreact </s>
|
funcom_train/24645895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void missing(ActionEvent event) {
AMController controller = (AMController) AMController.getController("AMController");
String header = "Missing gene";
String txt = "Please select at least one Gene from the list above.";
if (selectedGenePojos == null) {
controller.setNextStepValid(false);
WebUtil.setUpMessage(header, txt);
}
else if (selectedGenePojos.length == 0) {
controller.setNextStepValid(false);
WebUtil.setUpMessage(header, txt);
}
}
COM: <s> event that will be thrown if the genes should have been selected </s>
|
funcom_train/42478279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recievedMessage(Message m) {
// fetch the messages type from HeaderHandler
Object id = this.headerHandler.getMessageID(m);
MessageHandler h = this.getHandler(id);
if (h == null) {
// no such handler found!
throw new NoSuchElementException("No MessageHandler for message type "+ id.toString() +" found!");
} else {
h.handle(m.getPayload());
}
}
COM: <s> get message directly and pass it to an handler </s>
|
funcom_train/8156507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isIdentity() {
return m01 == 0.0 && m02 == 0.0 &&
m10 == 0.0 && m12 == 0.0 &&
m20 == 0.0 && m21 == 0.0 &&
m22 != 0.0 && m00/m22 == 1.0 && m11/m22 == 1.0;
}
COM: <s> returns the boolean true value if this perspective transform is an </s>
|
funcom_train/18325748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addActionObjectNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Action_actionObjectName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Action_actionObjectName_feature", "_UI_Action_type"),
CoremodelPackage.Literals.ACTION__ACTION_OBJECT_NAME,
false,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the action object name feature </s>
|
funcom_train/28442837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getClassPath() {
logger.debug("BSFManager:getClassPath");
if (classPath == null) {
try {
classPath = x.java.lang.System.getProperty("java.class.path");
} catch (Throwable t) {
logger.debug("Exception :", t);
// prolly a security exception .. so no can do
}
}
return classPath;
}
COM: <s> get class path </s>
|
funcom_train/3366036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void installListListeners() {
if ((listMouseListener = createListMouseListener()) != null) {
list.addMouseListener( listMouseListener );
}
if ((listMouseMotionListener = createListMouseMotionListener()) != null) {
list.addMouseMotionListener( listMouseMotionListener );
}
if ((listSelectionListener = createListSelectionListener()) != null) {
list.addListSelectionListener( listSelectionListener );
}
}
COM: <s> adds the listeners to the list control </s>
|
funcom_train/32866354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getStartButton() {
if (startButton == null) {
startButton = new JButton();
startButton.setText("Start");
startButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e)
{
tt = new Thread(new TimerThread(hoursField, minutesField, secondField));
tt.run();
}
});
}
return startButton;
}
COM: <s> this method initializes start button </s>
|
funcom_train/43124959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText(Object element) {
assert (element instanceof SilverTreeObject);
// extracts the type of this TreeObject
String type = ((SilverTreeObject) element).getSilverComponentType();
String name = null;
name = SilverAdapterFactory.getInstance().getModelObjectName(
((SilverTreeObject) element).getSilverObjectId(), false);
System.out.println("This is the test name for current object: " + name);
return name;
}
COM: <s> provides a text label for this tree object </s>
|
funcom_train/21056794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load()
{
if(id==null || id.length()==0 || dir==null || dir.length()==0 || filesystem==null) return;
if(schema_file==null || !schema_file.exists()) return;
loaded = true;
File f = new File(dir + File.separator + id + ".xml");
if (!f.exists()) return;
XMLLoader loader = new XMLLoader(f, schema_file);
if(!loader.isValid()) return;
Element root = loader.parseXMLFile();
if(root==null) return;
loadData(root);
}
COM: <s> loads the repository data from the xml file </s>
|
funcom_train/22020557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String isoEnc(String s, String parm) {
try {
String r = MimeUtility.encodeText(s,rgs("XML.CharSet"), parm);
return r;
} catch (java.io.UnsupportedEncodingException uee) {
logger.logp(Level.WARNING, this.toString(), "isoEnc (String, parm)", uee.toString(), uee);
return "";
}
}
COM: <s> method that takes a string and encodes it to iso 8859 1 </s>
|
funcom_train/14461985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScript(int ss){
if (data == null)this.setData(this.getData());
byte[] newss = ByteTools.shortToLEBytes((short)ss);
System.arraycopy(newss, 0, data, 8 ,2);
sss = ss;
}
COM: <s> set the super sub script for the font </s>
|
funcom_train/44175655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private NotificationDelegator buildRemoteNotificationDelegator() {
NotificationDelegator d = new NotificationDelegator(
DelegatorPolicy.ACCEPT_FIRST) {
protected boolean delegate(Notification n, Object handback) {
return super.delegate(n, handback);
}
};
d.addDelegatable(new CrawlJobLifecycleNotificationHandler());
d.addDelegatable(new CrawlerLifecycleNotificationHandler());
d.addDelegatable(new ContainerLifecycleNotificationHandler());
return d;
}
COM: <s> initializes the notification forwarder </s>
|
funcom_train/17769051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Asteroid (int x, int y, double x_velocity, double y_velocity, int direction, int vertex, int radius) {
super(x,y,x_velocity, y_velocity,direction);
this.radius = radius;
this.wasHit = false;
this.vertex = vertex;
this.vertexRadiuses = new double[vertex];
setVertexRadiuses();
this.lastCollidedIndex = new LinkedList();
}
COM: <s> the constructor of an asteroid </s>
|
funcom_train/19036358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getLinks(LIDCollection lids) {
if(isConnected()) {
try {
synchronized(this) {
this.getOutputStream().writeInt(ClientMessageCode.GETLINKS.getIndex());
lids.sendData(this.getOutputStream());
this.getOutputStream().flush();
}
} catch (IOException e) {
this.messageFailed(e);
}
}
}
COM: <s> ask for information about a series of links from the server </s>
|
funcom_train/31084675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(int numerator, int denominator) {
if (denominator == 0)
throw new ArithmeticException ("IntRatio denominator cannot be zero");
n = numerator;
d = denominator;
// Must recalculate the double value.
_gotDoubleValue = false;
// No need to simplify until necessary.
_simplified = false;
}
COM: <s> set this ratio with the given numerator and denominator </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.