__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/23937275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getLibJSCode() throws IOException {
if (cachedLibJSCode == null) {
InputStream is = getClass().getResourceAsStream(JS_LIB_FILE);
StringWriter output = new StringWriter();
IOUtils.copy(is, output);
cachedLibJSCode = output.toString();
}
return cachedLibJSCode;
}
COM: <s> returns java script library code </s>
|
funcom_train/27844705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetGetModelValuePointer() throws Exception {
org.scopemvc.model.Pointer[] tests = {
new MockPointer("test"),
null
};
for (int i = 0; i < tests.length; i++) {
_modelbinding.setModelValuePointer(tests[i]);
assertEquals(tests[i], _modelbinding.getModelValuePointer());
}
}
COM: <s> method test set get model value pointer is testing set model value pointer </s>
|
funcom_train/13969580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireAttachmentAddedRCEvent (final Incident incident, final Attachment attachment) {
AttachmentEvent event = new AttachmentEvent(incident, attachment);
for (Iterator listeners = Arrays.asList(getIncidentChangeListeners()).iterator();
listeners.hasNext();) {
((IncidentChangeListener)listeners.next()).performAttachementAddedEvent(event);
}
}
COM: <s> fires an event that informs all listeners about an added attachment </s>
|
funcom_train/2487970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countPrimaryKeyFields() {
Enumeration children = children();
JagBean bean = null;
Field field = null;
int countPrimaryKeys = 0;
while (children.hasMoreElements()) {
bean = (JagBean) children.nextElement();
if (bean instanceof Field) {
field = (Field) bean;
if (field.isPrimaryKey()) countPrimaryKeys++;
}
}
return countPrimaryKeys;
}
COM: <s> count the number of primary key fields </s>
|
funcom_train/12807974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getFooterHeight() {
float total = 0;
int start = Math.max(0, headerRows - footerRows);
int size = Math.min(rows.size(), headerRows);
for (int k = start; k < size; ++k) {
PdfPRow row = rows.get(k);
if (row != null)
total += row.getMaxHeights();
}
return total;
}
COM: <s> gets the height of the rows that constitute the footer as defined by </s>
|
funcom_train/11745274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCallParameter(ProcedureParameter param) {
if (param.getName() == null) {
throw new IllegalArgumentException("Attempt to add unnamed parameter.");
}
if (callParameters.contains(param)) {
throw new IllegalArgumentException(
"Attempt to add the same parameter more than once:" + param);
}
param.setProcedure(this);
callParameters.add(param);
}
COM: <s> adds new call parameter to the stored procedure </s>
|
funcom_train/49328891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean inferAsShockCord(int theTypeCode, WarningSet warnings) {
return (theTypeCode == 1 || (mass.getLength() >= 2 * parent.getLength() && RocksimDensityType.ROCKSIM_LINE
.equals(getDensityType()))) && isCompatible(parent, ShockCord.class, warnings, true);
}
COM: <s> rocksim does not have a separate entity for shock cords </s>
|
funcom_train/25648971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateApplicationModel() {
System.out.println("createApplicationModel");
ApplicationModelState result = systemModel.createApplicationModel(-1, -1);
assertNotNull(result);
assertNotNull(result.getApplicationModel());
assertNotNull(result.getApplicationModel().getContainingModel());
assertTrue(result.getApplicationModel().getContainingModel() instanceof KendoApplicationModel);
}
COM: <s> tests creation of an empty application model </s>
|
funcom_train/10914234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String makeResultExtension() {
if (MimeConstants.MIME_PDF.equals(outputFormat)) {
return ".pdf";
} else if (MimeConstants.MIME_RTF.equals(outputFormat)) {
return ".rtf";
} else if (MimeConstants.MIME_POSTSCRIPT.equals(outputFormat)) {
return ".ps";
} else {
return ".at.xml";
}
}
COM: <s> return a suitable file extension for the output format </s>
|
funcom_train/50154755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionClass getActionClass(ActionMapping mapping) {
ActionClass _action = null;
synchronized (mappings) {
ActionClass[] _actions = getActions();
if (_actions != null) {
for (int i = 0; i < _actions.length; i++) {
if (_actions[i].hasMapping(mapping)) {
_action = _actions[i];
break;
}
}
}
}
return _action;
}
COM: <s> method get action class </s>
|
funcom_train/4229287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean lazyLoad(Object... object) {
this.manager.setDropDown(false);
boolean value = false;
if (object.length == 2) {
String sql = String.valueOf(object[1]);
value = this.obtain(object[0], sql);
} else {
value = this.manager.completeLazyLoad(this, object[0]);
}
this.manager.setDropDown(true);
return value;
}
COM: <s> load the attributes in the object gradually </s>
|
funcom_train/10207676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(final LoggingEvent event) {
// Reminder: the nesting of calls is:
//
// doAppend()
// - check threshold
// - filter
// - append();
// - checkEntryConditions();
// - subAppend();
if (!checkEntryConditions()) { return; }
subAppend(event);
}
COM: <s> this method called by </s>
|
funcom_train/48948215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void msgEvent(String str){
// @todo limit str to size of textarea
txtOut.setText(txtOut.getText() + str );
//truncate
if(txtOut.getText().length()>=4096)
txtOut.setText(txtOut.getText().substring(2048, txtOut.getText().length() -1));
txtOut.moveCaretPosition(txtOut.getText().length());
if(str.equals("[interest] OK\r\n"))
txtStatus.setText("waiting for nodes...");
}
COM: <s> called if raw data was received </s>
|
funcom_train/1665754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawCentered(Graphics g, int index, int sizeX, int sizeY) {
int offset = index * getHsize();
int w = getHsize();
int h = getVsize();
int sx = (sizeX - w) / 2;
int sy = (sizeY - h) / 2;
g.drawImage(getImage(), sx, sy, sx + w, sy + h, offset, 0, offset + w,
h, null);
}
COM: <s> use the image with index index to paint the component with its </s>
|
funcom_train/33511644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print() {
int i = 0; //counter
int entryLength = Lexicon.lexiconEntryLength;
try {
while (readNextEntry() != -1) {
System.out.println(
""
+ (i * entryLength)
+ ", "
+ term.trim()
+ ", "
+ termId
+ ", "
+ documentFrequency
+ ", "
+ term
+ ", "
+ endBitOffset);
i++;
}
} catch (IOException ioe) {
System.err.println(
"Input/Output exception while reading the document index " +
"input stream. Stack trace follows.");
ioe.printStackTrace();
System.exit(1);
}
}
COM: <s> prints out the contents of the lexicon file to check </s>
|
funcom_train/29926654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showDialog(Frame f, String title) {
d = new JDialog(f, title);
window = d;
d.setLayout(new BorderLayout());
d.add(this, BorderLayout.CENTER);
d.add(new ButtonPanel(), BorderLayout.SOUTH);
d.addWindowListener(
new WindowAdapter() {
public void windowClosing(WindowEvent we) {
we.getWindow().dispose();
}
});
d.pack();
d.setVisible(true);
}
COM: <s> create a blocking dialog containing this component </s>
|
funcom_train/20244692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCornerStyleName(String style) {
if (null != divt[0]) {
for (int i = 0; i < cornerHeight; ++i) {
divt[i].setClassName(style);
}
}
if (null != divb[0]) {
for (int i = 0; i < cornerHeight; ++i) {
divb[i].setClassName(style);
}
}
}
COM: <s> set the css style name of the rounded corners divs </s>
|
funcom_train/47135604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStrategyIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Strategy_strategyId_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Strategy_strategyId_feature", "_UI_Strategy_type"),
TradingPackage.Literals.STRATEGY__STRATEGY_ID,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the strategy id feature </s>
|
funcom_train/7496909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toPattern() {
if (style == NumberFormat.PLURALCURRENCYSTYLE) {
// the prefix or suffix pattern might not be defined yet, so they can not be
// synthesized, instead, get them directly. but it might not be the actual
// pattern used in formatting. the actual pattern used in formatting depends
// on the formatted number's plural count.
return formatPattern;
}
return toPattern(false);
}
COM: <s> synthesizes a pattern string that represents the current state of this format </s>
|
funcom_train/32112010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void toBigEndian(final short[] b) {
if(bo == ByteOrder.LITTLE_ENDIAN) {
int it = b.length / 2;
for(int i = 0; i < it; i++) {
short aux = b[i];
b[i] = b[b.length - i - 1];
b[b.length - i - 1] = aux;
}
}
}
COM: <s> this method switch the given byte buffer if necessary </s>
|
funcom_train/6514829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show(String target, String language) {
this.target = target;
if ("cs".equals(language)) {
messages = ResourceBundle.getBundle("messages", CZECH);
currentLocale = CZECH;
} else if ("en".equals(language)) {
messages = ResourceBundle.getBundle("messages", Locale.ENGLISH);
currentLocale = Locale.ENGLISH;
}
}
COM: <s> sets target template and changes language </s>
|
funcom_train/3014152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Status deleteCustomer(Customer customer) {
Status status = new StatusImpl();
try {
delete(customer);
status.addMessage(Status.GLOBAL_MESSAGE,
new Message("message.customer.delete.success", new Object[] {
customer.getName()
}));
}
catch (DatabaseException de) {
addStatusMessage(status, de);
}
return status;
}
COM: <s> delete an existing customer from the database </s>
|
funcom_train/48406393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addVisibilityPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NamedElement_visibility_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_visibility_feature", "_UI_NamedElement_type"),
SpemxtcompletePackage.eINSTANCE.getNamedElement_Visibility(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the visibility feature </s>
|
funcom_train/7980170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProcessorMap(String name, MapType processorMap) {
ProcessorChain processorChain = new ProcessorChain(processorMap);
ProcessorChain previousChain = getLastChain();
if (previousChain != null) {
previousChain.setNextChain(processorChain);
}
chainList.add(processorChain);
chainMap.put(name, processorChain);
}
COM: <s> add a new chain of processors to the chain list </s>
|
funcom_train/50387390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendPacket(int srcPort, int destPort, InetAddress destHost, byte[] data, int len, UDPEndpoint e) throws IOException {
registerEndpoint(e, srcPort);
DatagramSocket socket = sockets.get(srcPort);
DatagramPacket packet = new DatagramPacket(data, len, destHost, destPort);
socket.send(packet);
}
COM: <s> sends packet from the desired port to the desired destination </s>
|
funcom_train/3830355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char getDecimalSeperator() {
Debug.debugMethodBegin( this, "getDecimalSeperator()" );
char decimal = DEFAULT_DECIMAL;
if ( XMLTools.getAttrValue( element, "decimal" ) != null ) {
String s = XMLTools.getAttrValue( element, "decimal" );
decimal = s.charAt( 0 );
}
Debug.debugMethodEnd();
return decimal;
}
COM: <s> return the character used as decimal seperator </s>
|
funcom_train/32134067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveToDisk() {
try {
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(cacheFile, false));
oos.writeObject(this);
oos.close();
} catch (IOException e) {
log.error("Cannot save cache file " + cacheFile + ". " + e.getMessage());
}
}
COM: <s> saves analysis to filesystem for faster future analysis </s>
|
funcom_train/42068111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCompressionCodeValuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ChunkFormat_compressionCodeValue_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ChunkFormat_compressionCodeValue_feature", "_UI_ChunkFormat_type"),
WavPackage.Literals.CHUNK_FORMAT__COMPRESSION_CODE_VALUE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the compression code value feature </s>
|
funcom_train/37520871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void eof(){
if (token != null && token_length != 0) {
while (token_length < 4)
token[token_length++] = EOF;
decode_final_token();
}
token_length = 0;
token = new byte[4];
bytes = new byte[3];
}
COM: <s> check the end of file charecter </s>
|
funcom_train/38516108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Edge processEdge(Edge candidate) {
collapsedCount++;
if (candidate.getSlack() < tightestEdge.getSlack()) {
overage += collapsedWeight * (tightestEdge.getSlack() - candidate.getSlack());
Edge temp = tightestEdge;
tightestEdge = candidate;
collapsedWeight += candidate.weight;
return temp;
}
int over = candidate.getSlack() - tightestEdge.getSlack();
unOverage += over;
overage += candidate.weight * over;
collapsedWeight += candidate.weight;
return candidate;
}
COM: <s> compares the given edge to the current tightest edge </s>
|
funcom_train/34538017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSessionValue(String attribute) {
try {
if (log4j.isDebugEnabled()) log4j.debug("Remove session attribute: " + attribute + ":..." + getSessionValue(attribute));
session.removeAttribute(attribute.toUpperCase());
}
catch (Exception e) {
log4j.error("removeSessionValue error: " + attribute);
}
}
COM: <s> remove a variable and its value from the session </s>
|
funcom_train/12560022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setRequestField(String key, String value) {
/* https handles the proxy fields in a different way */
if (key.toLowerCase().startsWith("proxy-")) {
proxyHeaders.setPropertyIgnoreCase(key, value);
return;
}
super.setRequestField(key, value);
}
COM: <s> add the named field to the list of request fields </s>
|
funcom_train/35927033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateControls(boolean stopped) {
bttStartStop.setLabel(stopped ? "Start" : "Stop");
wordsPerMinute.setEnabled(stopped);
minWordLength.setEnabled(stopped);
textInput.setEditable(stopped);
fileLocationField.setEditable(stopped);
fileLocationLoadButton.setEnabled(stopped);
// statusLabel.setText(stopped ? "Ready" : "Displaying at "
// + wordsPerMinute.getText() + " words per minute...");
// if (stopped)
// thread = null;
}
COM: <s> update the controls </s>
|
funcom_train/36684709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(InetAddress host, int port) throws IOException {
mySocket = new Socket(host, port);
// mySocket = new Socket(InetAddress.getLocalHost(), port);
myOut = new ObjectOutputStream(mySocket.getOutputStream());
myIn = new ObjectInputStream(mySocket.getInputStream());
myOut.writeObject(myName);
initializeConnection();
setConnected(true);
new Thread(this).start();
// starts new thread for accepting
// messages from server
}
COM: <s> connects to the given port of the named host </s>
|
funcom_train/28923383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getPolicyNodes(int depth, Set set) {
// if we've reached the desired depth, then return ourself
if (mDepth == depth) {
set.add(this);
} else {
Iterator it = mChildren.iterator();
while (it.hasNext()) {
PolicyNodeImpl node = (PolicyNodeImpl) it.next();
node.getPolicyNodes(depth, set);
}
}
}
COM: <s> add all nodes at depth depth to set and return the set </s>
|
funcom_train/16605538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void computeFieldSourcesFromIndex(EmptyAction emptyAction, K[] fields) {
Map<K, FieldSource> fieldSources = new HashMap<K, FieldSource>();
for (int i = 0; i < fields.length; i++) {
fieldSources.put(fields[i], FieldSource.withChecks(FieldSource.fromColumn("" + (i + 1)), emptyAction, ".*"));
}
setFieldSources(fieldSources);
}
COM: <s> compute the field sources automatically from the index of the key inside </s>
|
funcom_train/50956631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetTransform() {
// affTransform.setToIdentity();
pan.x = pan.y = 0;
scale.x = scale.y = 1;
rotateAngle = 0;
if(displayBounds == null)
transformedBounds = null;
else
transformedBounds.setRect(displayBounds);
arrangeHandles();
}
COM: <s> reset the motion transform </s>
|
funcom_train/29020855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRegion (Region region) {
checkWidget ();
if (region != null && region.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
int /*long*/ hRegion = 0;
if (region != null) {
hRegion = OS.CreateRectRgn (0, 0, 0, 0);
OS.CombineRgn (hRegion, region.handle, hRegion, OS.RGN_OR);
}
OS.SetWindowRgn (handle, hRegion, true);
this.region = region;
}
COM: <s> sets the shape of the control to the region specified </s>
|
funcom_train/40349217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void rawSetAttribute(Map attributes, String name, Object value) {
// if ( formalArguments!=FormalArgument.UNKNOWN &&
// getFormalArgument(name)==null )
// {
// // a normal call to setAttribute with unknown attribute
// throw new NoSuchElementException("no such attribute: "+name+
// " in template context "+
// getEnclosingInstanceStackString());
// }
if (value == null) {
return;
}
attributes.put(name, value);
}
COM: <s> map a value to a named attribute </s>
|
funcom_train/51344040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Reader reader(String id, int version, String encoding) throws UnsupportedEncodingException {
if(INFO)
log.info("id="+id+", version="+version+", encoding="+encoding);
if (encoding == null) {
throw new IllegalStateException();
}
return new InputStreamReader(inputStream(id, version), encoding);
}
COM: <s> read character data from a file version </s>
|
funcom_train/9303890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkLibrary() {
if (uhmCheck) {
getDueDates().setLibraryFilterOutHsl();
}
else if (hslCheck) {
getDueDates().setLibraryFilterOutUhm();
}
else if (uhmCheck && hslCheck) {
getDueDates().setLibraryFilterNone();
}
}
COM: <s> this will check if the library checks are true or false </s>
|
funcom_train/12181268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isNewModel(IResource resource) {
String extension = resource.getFileExtension();
boolean isNewModel = false;
for (int i = 0; !isNewModel && i < NEW_MODEL_EXTENSIONS.length; i++) {
if (NEW_MODEL_EXTENSIONS[i].getExtension().equals(extension)) {
isNewModel = true;
}
}
return isNewModel;
}
COM: <s> checks whether the resource is one that is handled using the new </s>
|
funcom_train/41800267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected HttpMethod makeMethod(final String queue, final Map<String, String> parameters) throws IOException{
final GetMethod method=new GetMethod();
method.setURI(new URI(String.format("http://%s/%s", SQS_HOST, StringUtils.defaultString(queue, "")), true));
method.setQueryString(makePairs(parameters));
return method;
}
COM: <s> creates a new http method for the provided queue and parameters </s>
|
funcom_train/43896287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Object listener) {
assert listener != null;
for (int i = 0; i < size; ++i) {
if (listeners[i] == listener) {
if (size == 1) {
listeners = null;
size = 0;
} else {
System.arraycopy(listeners, i + 1, listeners, i, --size - i);
listeners[size] = null;
}
return;
}
}
}
COM: <s> removes the given listener from this list </s>
|
funcom_train/48492745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // ------------------------------------------------------------
public Query clone() { return new Query( this ) ; }
COM: <s> the crawler uses this method when encontering a redirect </s>
|
funcom_train/7309368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void installSpecialBorder() {
String suffix;
BorderStyle borderStyle = BorderStyle.from(menuBar,
ExtWindowsLookAndFeel.BORDER_STYLE_KEY);
if (borderStyle == BorderStyle.EMPTY)
suffix = "emptyBorder";
else if (borderStyle == BorderStyle.ETCHED)
suffix = "etchedBorder";
else if (borderStyle == BorderStyle.SEPARATOR)
suffix = "separatorBorder";
else if (HeaderStyle.from(menuBar) == HeaderStyle.BOTH)
suffix = "headerBorder";
else
return;
LookAndFeel.installBorder(menuBar, "MenuBar." + suffix);
}
COM: <s> installs a special border if either a look dependent </s>
|
funcom_train/11105397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHeader(String name) {
String match = name + ":";
Iterator headers = this.headers.iterator();
while (headers.hasNext()) {
String header = (String) headers.next();
if (header.startsWith(match)) {
return header.substring(match.length() + 1).trim();
}
}
return null;
}
COM: <s> p retrieve the first value that was set for the specified header </s>
|
funcom_train/44853228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Locale getLocale(boolean inApp, Locale inDft) {
try {
String lLanguage = get(inApp ? KEY_LANGUAGE_DFT : KEY_LANGUAGE_CONTENT);
return lLanguage == null ? inDft : new Locale(lLanguage);
}
catch (IOException exc) {
LOG.error("Couldn't read configured language, fallback to default language!", exc);
}
return inDft;
}
COM: <s> retrieves the configured locale </s>
|
funcom_train/2628166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private GUIType extractDeepGUI(GWindow gWindow) {
GUIType retGUI = gWindow.extractWindow();
GComponent gWinContainer = gWindow.getContainer();
ComponentType container = null;
container = extractDeepGUI(gWinContainer);
if (container != null)
retGUI.getContainer().getContents().getWidgetOrContainer().add(
container);
return retGUI;
}
COM: <s> get all widgets info in a window </s>
|
funcom_train/26631147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Property createClonedProperty(Bean bean) {
return JodaFactory.getInstance().createProperty(
bean, getPropertyName(), LinkMapProperty.class,
new Class[] {getPropertyType(), getContentType(), getMapKeyType()});
}
COM: <s> create a clone of this property ignoring the data contents </s>
|
funcom_train/28300379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int writeFile(String file) {
TransSibGameState game=mainPane.getGame();
if (game==null) return -10712;
mainPane.setCursorWait();
err=game.toFile(file);
mainPane.setCursorDefault();
if (err!=0) TransBaseText.printError(err,mainPane);
return err;
}
COM: <s> write the game to disk </s>
|
funcom_train/47680209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInstanceNumber() {
// the root field has only one instance
if (isRoot()) {
return 1;
}
if (!this.attributes.isArray()) {
// get the arraylist containing all instances of this field and return the position of this instance
return getParent().getChildInstances(getName()).indexOf(this) + 1;
} else {
return this.activeInstance;
}
}
COM: <s> provides the position of the current field in the instance list </s>
|
funcom_train/45623472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAlwaysCreatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TouchType_alwaysCreate_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TouchType_alwaysCreate_feature", "_UI_TouchType_type"),
MSBPackage.eINSTANCE.getTouchType_AlwaysCreate(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the always create feature </s>
|
funcom_train/44627565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJMLBinary4() {
helpExpr("a <== b",
JmlBinary.class, 0,2,8,
JCIdent.class ,0,0,1,
JCIdent.class ,7,7,8);
}
COM: <s> test scanning jml reverse implies expression </s>
|
funcom_train/2319462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readRegistry(IExtensionRegistry registry, String pluginId, String extensionPoint) {
IExtensionPoint point = registry.getExtensionPoint(pluginId, extensionPoint);
if (point == null) {
return;
}
IExtension[] extensions = point.getExtensions();
extensions = orderExtensions(extensions);
for (int i = 0; i < extensions.length; i++) {
readExtension(extensions[i]);
}
}
COM: <s> start the registry reading process using the supplied plugin id and extension point </s>
|
funcom_train/44771307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLongValue(Document doc, String fieldName, Object internalValue) {
long longVal = ((Long) internalValue).longValue();
doc.add(new Field(FieldNames.PROPERTIES,
FieldNames.createNamedValue(fieldName, LongField.longToString(longVal)),
false,
true,
false));
}
COM: <s> adds the long value to the document as the named field </s>
|
funcom_train/12804466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperty(String forDomain, String propertyName, String propertyValue) {
throw new RuntimeException("setProperty() is not implemented yet.");
//this.writer.add(forDomain, new Property(propertyName, propertyValue, STRING_NAME));
}
COM: <s> this method sets the given property for a given domain </s>
|
funcom_train/19748060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getTopMenus() {
List topMenus = new ArrayList();
if ( menus == null ) {
log.warn("No menus found in repository!");
return topMenus;
}
for ( Iterator it = menus.keySet().iterator(); it.hasNext(); ) {
String name = (String) it.next();
MenuComponent menu = getMenu(name);
if ( menu.getParent() == null ) {
topMenus.add(menu);
}
}
return topMenus;
}
COM: <s> convenience method for dynamic menus returns the top level menus only </s>
|
funcom_train/2739585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NamedElement_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", "_UI_NamedElement_type"),
PetrinetPackage.Literals.NAMED_ELEMENT__NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the name feature </s>
|
funcom_train/22429295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnDrop() {
if (btnDrop == null) {
btnDrop = new JButton();
btnDrop.setText("Drop");
btnDrop.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
TrapPanel.this.setMessage("","", false);
setContinue(true);
}
});
}
return btnDrop;
}
COM: <s> this method initializes btn drop </s>
|
funcom_train/33149700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add( Deserializable deserializable ) {
if ( deserializable instanceof Fragment )
add( ( Fragment ) deserializable ) ;
else if ( deserializable instanceof ServerActiveHtml )
add( ( ServerActiveHtml ) deserializable ) ;
else if( deserializable instanceof Element )
add( ( Element ) deserializable ) ;
else if( deserializable instanceof Placeholder )
add( ( Fragment ) deserializable ) ;
else
throw new IllegalArgumentException( "Unhandled type: " + deserializable.getClass().getName() ) ;
}
COM: <s> the complier selects the overloaded method to invoke at compile time so </s>
|
funcom_train/16629077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyIndent(int indentInPoints,int offset,int length) throws BadLocationException {
Element oe = super.getParagraphElement(offset);
Element ee = super.getParagraphElement(offset + length);
offset = oe.getStartOffset();
length = ee.getEndOffset() - offset-1;
SimpleAttributeSet set=new SimpleAttributeSet();
StyleConstants.setLeftIndent(set, (float) indentInPoints);
setParagraphAttributes(offset, length, set, false);
}
COM: <s> applies the given indentation in points i </s>
|
funcom_train/46435679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected XMessage internalEditActivities(OpProjectSession session, XMessage request) {
OpBroker broker = null;
try {
broker = session.newBroker();
OpTransaction tx = broker.newTransaction();
XMessage reply = internalEditActivities(session, broker, request);
tx.commit();
return reply;
}
finally {
finalizeSession(null, broker);
}
}
COM: <s> edit method used internally by the service </s>
|
funcom_train/8093815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer result = new StringBuffer();
result.append("(" + Utils.doubleToString(m_coefficient, 12, 4));
for (int i = 0; i < m_fieldNames.length; i++) {
result.append(" * " + m_fieldNames[i]);
}
result.append(")");
return result.toString();
}
COM: <s> return a textual description of this predictor term </s>
|
funcom_train/12188871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSpacesOnRightSide() throws ExpressionException {
final Function function = new NormalizeSpaceFunction();
Value result = function.invoke(expressionContextMock,
new Value[]{factory.createStringValue("abc ")});
assertTrue(result instanceof StringValue);
assertEquals("abc", ((StringValue) result).asJavaString());
}
COM: <s> tests if function works correctly for strings with spaces on right side </s>
|
funcom_train/10774665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int prepare() {
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
Record record = new Record();
record.setContent("default");
em.persist(record);
em.getTransaction().commit();
em.close();
return record.getId();
}
COM: <s> creates a new record sets the content to default and returns the id </s>
|
funcom_train/1837563 | /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
treeNodeEClass = createEClass(TREE_NODE);
createEReference(treeNodeEClass, TREE_NODE__PARENT);
createEReference(treeNodeEClass, TREE_NODE__CHILDREN);
createEReference(treeNodeEClass, TREE_NODE__DATA);
createEAttribute(treeNodeEClass, TREE_NODE__NAME);
treeEClass = createEClass(TREE);
createEReference(treeEClass, TREE__ROOT);
createEAttribute(treeEClass, TREE__NAME);
}
COM: <s> creates the meta model objects for the package </s>
|
funcom_train/8715940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator getDictKeys() throws IOException {
if (type == INDIRECT) {
return dereference().getDictKeys();
} else if (type == DICTIONARY || type == STREAM) {
return ((HashMap) value).keySet().iterator();
}
// wrong type
return new ArrayList().iterator();
}
COM: <s> get an iterator over all the keys in the dictionary </s>
|
funcom_train/13914141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRemoteUser() {
System.out.println("getRemoteUser");
ProxymaFacade proxyma = new ProxymaFacade();
ProxymaContext context = proxyma.getContextByName("default");
ProxymaServletRequest instance = new ProxymaServletRequest(request, context);
String expResult = request.getRemoteUser();
String result = instance.getRemoteUser();
assertEquals(expResult, result);
}
COM: <s> test of get remote user method of class proxyma servlet request </s>
|
funcom_train/11086532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Class loadClass(String name) throws ClassNotFoundException {
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
if (contextClassLoader != null) {
try {
return contextClassLoader.loadClass(name);
} catch (ClassNotFoundException e) {
//thread context class loader didn't work out
}
}
return getClass().getClassLoader().loadClass(name);
}
COM: <s> attempts to load the class on the current thread context class loader or </s>
|
funcom_train/45867541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawLine(Posn p1, Posn p2, Color color){
//this.drawShape(new Line2D.Double(p1.x, p1.y, p2.x, p2.y),
// color, true);
this.drawShape(new Line2D.Double(p1.x, p1.y, p2.x, p2.y),
color, false);
}
COM: <s> p draws a line in this panel p </s>
|
funcom_train/4392914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Activity getActivityFromDB(long id) {
final Session session = sessionFactory.openSession();
Activity activity = null;
// start Transaction
session.beginTransaction();
// load all BPEL-processes from repository
Query query = session
.createQuery("FROM ExtensibleElements WHERE e_id = " + id);
List<Activity> activities = (List<Activity>) query.list();
activity = activities.get(0);
// commit Transaction
session.getTransaction().commit();
session.close();
return activity;
}
COM: <s> returns the activi from the database which has the given id </s>
|
funcom_train/25587598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireProgressEvent(long writtenBytes, long len, String fileName, ProgressType progressType) {
for (int i = 0; i < progressListeners.size(); i++) {
progressListeners.elementAt(i).progressAchieved(writtenBytes, len, fileName, progressType);
}
boolean deactivate = writtenBytes < len;
for (int i = 0; i < deactivateListeners.size(); i++) {
deactivateListeners.elementAt(i).setEnabled(!deactivate);
}
}
COM: <s> takes every progress listener and calls the method </s>
|
funcom_train/13964156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String ajaxUploadScript() {
String result = "AFU.create('" + id() + "', '" + uploadButtonId() + "', {" + ajaxUploadOptions() + "});";
if (log.isDebugEnabled()) log.debug("AFU Create Script: " + result);
return result;
}
COM: <s> generates the script to initialize a new ajax upload js object </s>
|
funcom_train/18738255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDump() {
String[] args = new String[] { "src/HelloWorld.java", "src/Pointcuts.aj", "src/Aspect.aj" };
CompilationResult result = ajc(baseDir, args);
assertNoMessages(result);
String fileName = Dump.dump("DumpTestCase.testDump()");
dumpFile = new File(fileName);
org.aspectj.weaver.DumpTestCase.assertContents(dumpFile, "Command Line", "HelloWorld.java");
}
COM: <s> aim dump after successful compile to ensure it contains the command line information </s>
|
funcom_train/10189426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Message updateProxingResponse(Message resp) {
printLog("inside updateProxingResponse(resp)", LogLevel.MEDIUM);
ViaHeader vh = new ViaHeader((Header) resp.getVias().getHeaders().elementAt(0));
if (vh.getHost().equals(m_sipProvider.getViaAddress())) {
resp.removeViaHeader();
}
return resp;
}
COM: <s> processes the proxy headers of the response </s>
|
funcom_train/4521096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(PadronElectoralOnpe entity) {
LogUtil.log("saving PadronElectoralOnpe instance", Level.INFO, null);
try {
entityManager.persist(entity);
LogUtil.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved padron electoral onpe </s>
|
funcom_train/3300314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setIsLoggedInUserCondition() {
try {
isLoggedInUser = service.isUserLoggedIn(controller.getUser()) && ((Publication) original).getOwner().getLoginName().equals(
controller.getUser().getLoginName()
);
} catch (Exception e) {
isLoggedInUser = false;
}
}
COM: <s> sets set is logged in user condition to true or false </s>
|
funcom_train/21849945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintComponent(Graphics g) {
try {
if (m_background_painter != null) {
if (m_painter_rect == null)
m_painter_rect = new Rectangle();
m_painter_rect.setBounds(0, 0, getWidth(), getHeight());
m_background_painter.paint(this, g, m_painter_rect);
}
} catch (Exception e) {
FormsLogger.severe(e);
}
}
COM: <s> override paint component so we can paint the fill effect </s>
|
funcom_train/11811776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void exitForm (final java.awt.event.WindowEvent evt)
{//GEN-FIRST:event_exitForm
//Printer_Frame.logger.entering (Printer_Frame.TAG, "Program_Frame.exitForm ()");
this.Command_Notifier
.notifyObservers (net.sourceforge.uiq3.fx602p.Notifier.Menu_Window_Printer);
//Printer_Frame.logger.exiting (Printer_Frame.TAG, "Program_Frame.exitForm ()");
return;
}//GEN-LAST:event_exitForm
COM: <s> exit the application </s>
|
funcom_train/25476370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PredictionData (String[] alleles, int capacity) {
alleleNames = alleles;
alleleIndexTable = new HashMap<String, Integer>(alleles.length * 2);
for (int i = 0; i < alleles.length; i++) {
alleleIndexTable.put(alleles[i], new Integer(i));
}
// Create the main tables
peptideIndexTable = new HashMap<String, Integer>(capacity * 2);
createPredictionTable (capacity);
listeners = new ArrayList<PredictionDataListener>();
}
COM: <s> create an empty prediction data object of abitrary capacity </s>
|
funcom_train/9924811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exportGlobal()
{ Symbol sym = globalSymbols.get(name);
globalSymbols.put(name, this);
if (!Assemble.firstPass)
if (sym != null && sym != this) //defer error to get msg from each instance
Assemble.throwErr("Global symbol " + name + " exported by another file");
else if (number == null)
Assemble.throwErr("Exported symbol " + name + " not defined");
}
COM: <s> define a global symbol so it can be referenced in other namespaces </s>
|
funcom_train/19454613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPanel(StrataPanel panel) {
/* Get the old property value for fire property change event. */
StrataPanel oldValue = fieldPanel;
/* Set the panel property (attribute) to the new value. */
fieldPanel = panel;
/* Fire (signal/notify) the panel property change event. */
firePropertyChange("panel", oldValue, panel);
return;
}
COM: <s> sets the panel property value </s>
|
funcom_train/40312357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsCaseSensitive_InvalidColumn3() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.isCaseSensitive(10);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by isCaseSensitive method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests is case sensitive with column index larger than the number of column </s>
|
funcom_train/31079141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
Entry entry;
for (Iterator itr = _entries.iterator(); itr.hasNext();) {
entry = (Entry) itr.next();
if (entry != null) {
entry.setPool(null);
entry.setIndex(0);
}
}
_entries.clear();
_lookup.clear();
}
COM: <s> clear all entries from the pool </s>
|
funcom_train/15376243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int GetCLStrength(int ItemID) {
if (ItemID == -1) {
return 1;
}
String ItemName = GetItemName(ItemID);
if (ItemName.startsWith("Granite")) {
return 50;
} else if (ItemName.startsWith("Torags hammers") || ItemName.endsWith("Dharoks greataxe")) {
return 70;
}
return 1;
}
COM: <s> returns the level required to use this item p </s>
|
funcom_train/32057107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetString() {
System.out.println("testGetString");
Translator t = new Translator();
Object[] o = new Object[5];
assertTrue(t.getString("arrow") != "0");
assertTrue(t.getString("arrow",o) != "0");
}
COM: <s> test of get string method of class translator </s>
|
funcom_train/12023905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String jdbcLayerCall() {
final Exception e = new Exception(); //NOPMD
final StackTraceElement[] stackTrace = e.getStackTrace();
final StackTraceElement[] cleanStackTrace =
new StackTraceElement[stackTrace.length - 1];
System.arraycopy(stackTrace, 1, cleanStackTrace, 0,
cleanStackTrace.length);
return JDBCLogger.getCallingMethod(cleanStackTrace);
}
COM: <s> simulates the jdbc layer within logging framework </s>
|
funcom_train/3285118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Properties filterProperties(Properties props) {
Class<? extends AbstractAuthenticator> clazz = getClass();
String packageName = clazz.getPackage().getName();
String simpleClassname = clazz.getName().substring(packageName.length() + 1);
String filter = simpleClassname + ".";
if (additionalPrefix != null)
filter += additionalPrefix + ".";
return filterProperties(props, filter);
}
COM: <s> parses properties so that only keys that start with the </s>
|
funcom_train/50757451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void performTimestep() {
Iterator carListIterator = carList.iterator();
while (carListIterator.hasNext())
((Car)carListIterator.next()).askForDriverCommand();
carListIterator = carList.iterator();
while (carListIterator.hasNext())
((Car)carListIterator.next()).calculateTimestep();
}
COM: <s> moves the cars for one timestep </s>
|
funcom_train/15719509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInTimeRange(long startTime, long endTime) {
long startTimeTest = mStartTime - 60000;
long endTimeTest = mEndTime + 60000;
return ((startTimeTest + 30000) >= System.currentTimeMillis() && ((startTime >= startTimeTest && startTime <= endTimeTest) || (startTime <= startTimeTest && endTime >= startTimeTest)));
}
COM: <s> gets if this scheduled program is in the given time range </s>
|
funcom_train/32211242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addError(Class testClass, String testName, Throwable t) {
this.error = true;
if (this.errorproperty != null) {
Project proj = getProject();
proj.setProperty(this.errorproperty, "true");
}
// Errors are also regarded as failures.
addFailure(testClass, testName, new AssertionFailedError());
}
COM: <s> an error occurred </s>
|
funcom_train/12562901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void launchCaManager() {
try {
MIDletSuiteUtils.execute(MIDletSuite.INTERNAL_SUITE_ID,
CA_MANAGER,
Resource.getString(ResourceConstants.CA_MANAGER_APP));
} catch (Exception ex) {
displayError.showErrorAlert(Resource.getString(
ResourceConstants.CA_MANAGER_APP), ex, null, null);
}
}
COM: <s> launch the ca manager </s>
|
funcom_train/32068894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addDocumentAttachment(DocumentAttachment documentAttachment) {
boolean addOk = getDocumentAttachments().add(documentAttachment);
if (addOk) {
documentAttachment.setGroup((DocumentAttachmentGroup)this);
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed document attachment to the group collection </s>
|
funcom_train/7690802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double insureConsistency(MutableRootedTree tree, Node node) {
double height = Utils.safeNodeHeight(tree, node);
if (tree.isExternal(node)) {
return height;
} else {
for (Node n : tree.getChildren(node)) {
final double childHeight = insureConsistency(tree, n);
height = Math.max(height, childHeight);
}
}
tree.setHeight(node, height);
return height;
}
COM: <s> make sure subtree below node has consistent heights i </s>
|
funcom_train/12708776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveToStream(OutputStream output) throws Exception {
if (this.m_changeLog.size() > 0) {
DBVersion version = new DBVersion(this.m_versionLog.size() + 1,
this.m_changeLog);
this.m_versionLog.add(version);
this.m_changeLog = new ChangeLogVector();
;
}
Io io = new Io(this);
io.saveToStream(output);
};
COM: <s> save the model to an output stream </s>
|
funcom_train/44497321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IHTMLSelectElement setSelectFieldOptionValue(String selectFieldName, String value) {
IHTMLSelectElement select = getSelectField(selectFieldName);
if (select != null) {
select.setValue(value);
}else{
throw new RuntimeException(selectFieldName +" does not exist as a select field in the current form!");
}
return select;
}
COM: <s> sets the value of a select or drop down </s>
|
funcom_train/22689635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getGlauberButton() {
if (glauberButton == null) {
glauberButton = new JButton();
glauberButton.setText("GlauberDynamics");
glauberButton.setPreferredSize(new Dimension(135, 30));
glauberButton
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
AlgorithmPanel gdp = new AlgorithmPanel(ownerFrame,
glauberMode, logPath);
ownerFrame.setAndShowPanel(gdp);
}
});
}
return glauberButton;
}
COM: <s> this method initializes glauber button </s>
|
funcom_train/7620031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRequestHeader(String header) {
if (requestHeaders != null) {
String[] value = requestHeaders.get(header.toLowerCase());
if (value != null) {
return value[HEADERS_MAP_INDEX_VALUE];
} else {
return null;
}
} else {
return null;
}
}
COM: <s> get the value associated with a request header key if any </s>
|
funcom_train/34068910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendUdpMessage(DatagramSocket udpSocket, DatagramPacket sendedPacket, DatagramPacket receivedPacket){
try {
udpSocket.send(sendedPacket);
udpSocket.receive(receivedPacket);
} catch(SocketTimeoutException e){
logger.warn("The login reached the timeout. Trying again");
sendUdpMessage(udpSocket, sendedPacket, receivedPacket);
} catch (IOException e) {
logger.error("Any error occurred in the udp packet sending process");
}
}
COM: <s> send a udp packet to the given udp socket </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.