__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/28669770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MutableString insert(int offset, String str) {
if ((offset < 0) || (offset > length()))
throw new StringIndexOutOfBoundsException(offset);
if (str == null)
str = "null";
int len = str.length();
int newCount = count + len;
if (newCount > value.length)
expandCapacity(newCount);
System.arraycopy(value, offset, value, offset + len, count - offset);
MutableString.getChars(str, offset, value); //str.getChars(value, offset);
count = newCount;
return this;
}
COM: <s> inserts the string into this character sequence </s>
|
funcom_train/16629415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNeighboursOfConcept(Long ID, String separator) {
String neighbours = "";
ArrayList<Long> neighbourList = getNeighbourIDsOfConcept(ID);
for (int i = 0; i < neighbourList.size(); i++){
neighbours += neighbourList.get(i) + separator;
}
return neighbours;
}
COM: <s> get neighbours of concept </s>
|
funcom_train/7355044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processEvents() {
Object runner;
loop:
while (true) {
synchronized (queue) {
if (queue.isEmpty()) {
threadCount--;
break loop;
}
runner = queue.removeFirst();
}
try {
((Runnable) runner).run();
} catch (Throwable e) {
e.printStackTrace();
}
}
}
COM: <s> this method dequeues all runnable objects from the </s>
|
funcom_train/10348835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuBar getLogViewerMenu() {
if (LogViewerMenu == null) {
LogViewerMenu = new JMenuBar();
LogViewerMenu.add(fileMenu);
LogViewerMenu.add(editMenu);
LogViewerMenu.add(Box.createHorizontalGlue());
LogViewerMenu.add(helpMenu);
}
return LogViewerMenu;
}
COM: <s> this method initializes log viewer menu </s>
|
funcom_train/2586056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test1096282() {
SerialDate d = SerialDate.createInstance(29, 2, 2004);
d = SerialDate.addYears(1, d);
SerialDate expected = SerialDate.createInstance(28, 2, 2005);
assertTrue(d.isOn(expected));
}
COM: <s> a test for bug report 1096282 now fixed </s>
|
funcom_train/3946011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIdentifierPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ManifestType_identifier_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ManifestType_identifier_feature", "_UI_ManifestType_type"),
ImscpRootv1p1p2Package.eINSTANCE.getManifestType_Identifier(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the identifier feature </s>
|
funcom_train/8554217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setSize(new Dimension(1000, 600));
this.setSize(1050, 600);
this.setContentPane(getJContentPane());
this.setResizable(false);
this.setTitle("Car Tunning Experience 2008");
//this.addKeyListener(controlador.getKeyListener());
//this.requestFocus();
this.setVisible(true);
this.addWindowListener(new CloseListener(contVent,modelo));
}
COM: <s> this method initializes this </s>
|
funcom_train/198118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getXMLElementForObject(Document d) {
Element e = d.createElement(getClass().getName());
e.appendChild(figure.getXMLElementForObject(d));
e.setAttribute("layer", Integer.toString(getMapLayer()));
Element element = e;
element.setAttribute("type", Integer.toString(doorType));
element.setAttribute("characteristics", Integer
.toString(doorCharacteristics));
return element;
}
COM: <s> returns a w3 c dom element with the attributes of this door </s>
|
funcom_train/38936989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveWorkbook(Workbook workbook, String filename) throws IOException {
try {
OutputStream out = new BufferedOutputStream(new FileOutputStream(filename));
HSSFWorkbook hssfWorkbook = createHSSFWorkbook(workbook);
hssfWorkbook.write(out);
out.close();
}
catch (IOException e) {
System.out.println(e.getMessage());
}
}
COM: <s> saves the workbook in an xl compatible file format </s>
|
funcom_train/9774037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateTreeIcons() {
if (prevZoom != overallZoom) {
UIManager.put("Tree.collapsedIcon", getScaledIcon(UIManager.getIcon("Tree.collapsedIcon")));
UIManager.put("Tree.expandedIcon", getScaledIcon(UIManager.getIcon("Tree.expandedIcon")));
}
}
COM: <s> updates the uimanagers tree icons based on the current zoom levels </s>
|
funcom_train/9897040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isContainsDeleteItem(JPopupMenu popup) {
Component[] components = popup.getComponents();
for (int i=components.length; --i >= 0;) {
if (components[i] instanceof JMenuItem) {
if (((JMenuItem)components[i]).getActionCommand().equals(ActionManager.DELETE_NODE_CMD)) {
return true;
}
}
}
return false;
}
COM: <s> checks if node already contains the delete item </s>
|
funcom_train/18059105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add_hyphen_char(int hyphen_codept) {
if (hyphen_codept_Integer == null) {
hyphen_codept_Integer = Integer.valueOf( hyphen_codept );
this.hyphen_codept = hyphen_codept;
} else {
log.warning("Only one instance of hyphen-char allowed. "
+ "Ignoring attempt to add another.");
}
}
COM: <s> adds the canonical hyphen character for this alphabet </s>
|
funcom_train/32094997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteNakedSingle(int index) {
for (int i = getIndex; i < putIndex; i++) {
if (indices[i] == index) {
for (int j = i + 1; j < putIndex; j++) {
indices[j - 1] = indices[j];
values[j - 1] = values[j];
}
putIndex--;
break;
}
}
}
COM: <s> checks if the queue contains an entry for the cell with index </s>
|
funcom_train/41833563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isBad () {
if (failedQueries >= DHTConstants.KBE_BAD_IMMEDIATLY_ON_FAILED_QUERIES) {
return true;
}
if(System.currentTimeMillis() - lastSeen > DHTConstants.KBE_QUESTIONABLE_TIME &&
failedQueries > DHTConstants.KBE_BAD_IF_FAILED_QUERIES_LARGER_THAN) {
return true;
}
return false;
}
COM: <s> checks if a node is bad </s>
|
funcom_train/46330056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init(long totalSize, int increaseThreshold, InputStreamDataReadListener listener) {
this.totalSize = totalSize;
this.actualPosition = 0L;
this.lastPosition = 0L;
this.increaseThreshold = increaseThreshold;
listeners = new LinkedList<InputStreamDataReadListener>();
addListener(listener);
}
COM: <s> internal init method called by constructors </s>
|
funcom_train/1548971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean anyHasNext(ArrayList<Iterator<? extends E>> iters) {
for (int i = 0; i < iters.size(); i++) {
Iterator<? extends E> it = iters.get(i);
if (it.hasNext()) {
return true;
}
}
return false;
}
COM: <s> returns code true code iff any </s>
|
funcom_train/14610706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File ensureDirGenerated(String path) {
TokenList list = new TokenList(path, '/');
File parent = getBasedir();
for (int i = 0; i < list.size(); i++) {
parent = new File(parent, list.get(i));
if (!parent.exists()) {
parent.mkdir();
}
}
return parent;
}
COM: <s> this method will ensure that the code that will be generated to the </s>
|
funcom_train/38308375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addContent(String content) {
if (this.content == null) {
this.content = new StringBuffer();
}
if (content.length() == 1) {
char first = content.charAt(0);
if ((first == '<') ||
(first == '>')) {
evaluateXml = false;
}
}
this.content.append(content);
}
COM: <s> adds the given string to the content buffer </s>
|
funcom_train/37080338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ChadoDatabase getChadoDatabaseByName(String name) {
if (this.chado_dbs != null) {
int nc = this.chado_dbs.length;
for (int i = 0;i < nc;++i) {
if (this.chado_dbs[i].getName().equals(name)) return this.chado_dbs[i];
}
}
return null;
}
COM: <s> retrieve one of the objects in code this </s>
|
funcom_train/40416535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String ret="";
for (Iterator<TranscriptElement> iter = elements.iterator(); iter.hasNext();) {
TranscriptElement element = (TranscriptElement) iter.next();
if(iter.hasNext()&&element!=null) {
ret = ret + element.getText() + " ";
} else if(element!=null) {
ret = ret + element.getText();
}
}
return ret;
}
COM: <s> returns a simple string representation </s>
|
funcom_train/45718919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Response authenticate() throws HttpResponseException, IOException {
HttpTransport transport = new HttpTransport();
AuthKeyValueParser.setAsParserOf(transport);
HttpRequest request =
transport
.buildPostRequest("https://www.google.com/accounts/ClientLogin");
request.setContentNoLogging(new UrlEncodedFormHttpSerializer(this));
return request.execute().parseAs(Response.class);
}
COM: <s> authenticates based on the provided field values </s>
|
funcom_train/39877318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaximumFailedPasswordsForWipe(ComponentName admin, int num) {
if (mService != null) {
try {
mService.setMaximumFailedPasswordsForWipe(admin, num);
} catch (RemoteException e) {
Log.w(TAG, "Failed talking with device policy service", e);
}
}
}
COM: <s> setting this to a value greater than zero enables a built in policy </s>
|
funcom_train/35402785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem() {
if (stringItem == null) {//GEN-END:|16-getter|0|16-preInit
// write pre-init user code here
stringItem = new StringItem("Hola", "Hello, World!");//GEN-LINE:|16-getter|1|16-postInit
// write post-init user code here
}//GEN-BEGIN:|16-getter|2|
return stringItem;
}
COM: <s> returns an initiliazed instance of string item component </s>
|
funcom_train/24379098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document getTypeAsDOM(ItemBodyType type) {
Document dom = null;
if (type!=null){
QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "itemBody");
JAXBElement<ItemBodyType> jaxbe =
new JAXBElement<ItemBodyType>(qname, ItemBodyType.class, type);
dom = getDOM(jaxbe);
}
return dom;
}
COM: <s> gets the item body type as a dom document </s>
|
funcom_train/15918326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Expr flattenParExpr(ParExpr expr) {
List<Stmt> stmts = new ArrayList<Stmt>();
Expr primary = expr;
while (primary instanceof ParExpr) {
primary = getPrimaryAndStatements(((ParExpr) primary).expr(), stmts);
}
return toFlatExpr(expr.position(), stmts, primary);
}
COM: <s> flatten a parenthesized expression </s>
|
funcom_train/25735309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calcMzSamplingDist(final PeakList inputSpectrum) {
final double[] masses = inputSpectrum.getMzs(null);
double minDiff = 1000000.0;
double diff;
// Calc minimal difference between 2 consecutive mz values
for (int i = 1; i < masses.length; i++) {
diff = masses[i] - masses[i - 1];
if (diff < minDiff) {
minDiff = diff;
}
}
setMzSamplingDist(minDiff);
}
COM: <s> calculates sampling difference </s>
|
funcom_train/8533763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XMLName getName(Node node) {
String name = node.getNodeName();
String prefix = node.getPrefix();
String namespace = node.getNamespaceURI();
if (prefix != null) {
name = name.substring(prefix.length() + 1);
}
XMLName result = new XMLName(namespace, prefix, name);
return result;
}
COM: <s> returns the name object corresponding to the given xml node </s>
|
funcom_train/1548801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateCurrentIterator() {
if (hasNext) {
return;
}
if (currentIterator == null) {
if (root == null) {
// do nothing, hasNext will be false
} else {
if (transformer == null) {
findNext(root);
} else {
findNext(transformer.transform(root));
}
root = null;
}
} else {
findNextByIterator(currentIterator);
}
}
COM: <s> loops around the iterators to find the next value to return </s>
|
funcom_train/5072328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean typesEquals(MultiTextNode other) {
if (getTypes() == null) {
return other.getTypes() == null;
}
for (String s : getTypes()) {
if (!other.getTypes().contains(s)) {
return false;
}
}
for (String s : other.getTypes()) {
if (!getTypes().contains(s)) {
return false;
}
}
return true;
}
COM: <s> returns true if the two multi text nodes have the same sources </s>
|
funcom_train/26491824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getPath(Location loc) {
if (loc == null) { return null; }
Location l = loc;
Vector res = new Vector();
if (!l.getName().equals("ROOT")) {
res.addElement(l);
while ((l = getParent(l)) != null) {
if (!l.getName().equals("ROOT"))
res.addElement(l);
}
}
return res;
}
COM: <s> gets a vector with the path a set of location objects to the </s>
|
funcom_train/13524459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PXElasticConstraints getConstraintsImpl(Component comp) {
PXElasticConstraints constraints = (PXElasticConstraints) constraintsMap
.get(comp);
if (constraints == null) {
setConstraintsImpl(comp, new PXElasticConstraints());
constraints = (PXElasticConstraints) constraintsMap.get(comp);
}
return constraints;
}
COM: <s> retrieves the constraints for the specified component </s>
|
funcom_train/3412503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WritableRaster createCompatibleDestRaster (Raster src) {
Rectangle2D r = getBounds2D(src);
return src.createCompatibleWritableRaster((int)r.getX(),
(int)r.getY(),
(int)r.getWidth(),
(int)r.getHeight());
}
COM: <s> creates a zeroed destination code raster code with the correct size </s>
|
funcom_train/3925238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void Build( TokenEnumerator v, Spec spec ) {
GrammarRule.Enter( "SpecRule.Build" );
while ( true ) {
int tokenOffset = v.getNextToken();
if ( tokenOffset == -1 ) {
break;
}
specNodeRule.Build( tokenOffset, v, spec );
}
GrammarRule.Exit( "SpecRule.Build" );
}
COM: <s> apply the spec rule to update the spec object </s>
|
funcom_train/13365913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeObserver(IObserver aObserver, Object aObject) {
assert aObject != null;
Set<IObserver> observers = model2Observers.get(aObject);
if (observers == null)
return;
observers.remove(aObserver);
if (observers.size() == 0)
model2Observers.remove(aObject);
}
COM: <s> removes an observer for the passed object </s>
|
funcom_train/34565093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void add(final byte[] tag, final byte[] cont) throws IOException {
if(cont == null) return;
builder.startElem(tag, atts.reset());
builder.text(new TokenBuilder(utf8(cont, ENCODING)));
builder.endElem(tag);
}
COM: <s> adds a tag and a content node </s>
|
funcom_train/42068219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStringMessagePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ParseChunkException_stringMessage_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ParseChunkException_stringMessage_feature", "_UI_ParseChunkException_type"),
WavPackage.Literals.PARSE_CHUNK_EXCEPTION__STRING_MESSAGE,
false,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the string message feature </s>
|
funcom_train/3990068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTermin_przyjeciaPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SkierowanieSzpital_termin_przyjecia_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SkierowanieSzpital_termin_przyjecia_feature", "_UI_SkierowanieSzpital_type"),
PrzychodniaPackage.Literals.SKIEROWANIE_SZPITAL__TERMIN_PRZYJECIA,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the termin przyjecia feature </s>
|
funcom_train/49639741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEscapeTwoSysPropsPreserveSpaces() {
String home = System.getProperty("user.home");
String ioTmpdir = System.getProperty("java.io.tmpdir");
String source = " ${user.home} ${java.io.tmpdir} ";
assertEquals(" " + home + " " + ioTmpdir + " ",
Environment.escapeSystemProperties(source));
}
COM: <s> test escape two system properties with spaces </s>
|
funcom_train/3710460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double max() {
if (!isBinNumber()) {
double hold = Constant.DMIN;
for (int i = 0; i < data.length; i++) {
if (!Double.isNaN(data[i]) && data[i] > hold) {
hold = data[i];
}
}
return hold;
} else {
return ((double)(getNBins()-1));
}
}
COM: <s> returns maximum value in array </s>
|
funcom_train/26466311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCash(Double cash) throws PropertyVetoException {
Double oldCash = this.cash;
vetoableChangeSupport.fireVetoableChange("cash", oldCash, cash);
this.cash = cash;
propertyChangeSupport.firePropertyChange("cash", oldCash, cash);
}
COM: <s> setter for property cash </s>
|
funcom_train/14363785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void update(Slide newSlide) {
if (currentSlide != null) {
impress.getAccordionButton(currentSlide.getId()).setStyleName("Default");
}
currentSlide = newSlide;
Topic topic = currentSlide.getTopic();
impress.setActiveTabIndex(topic.getPresentation().indexOf(topic));
impress.getAccordionButton(currentSlide.getId()).setStyleName("Selected");
impress.setContent(currentSlide.getContent());
}
COM: <s> updates the view with the new slide </s>
|
funcom_train/33728174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ITag injectMetaData(IMetaData meta, ITag tag) {
Output out = new Output(ByteBuffer.allocate(1000));
Serializer ser = new Serializer();
ser.serialize(out, "onMetaData");
ser.serialize(out, meta);
ByteBuffer tmpBody = out.buf().flip();
int tmpBodySize = out.buf().limit();
int tmpPreviousTagSize = tag.getPreviousTagSize();
byte tmpDataType = IoConstants.TYPE_METADATA;
int tmpTimestamp = 0;
return new Tag(tmpDataType, tmpTimestamp, tmpBodySize, tmpBody,
tmpPreviousTagSize);
}
COM: <s> injects metadata other than cue points into a tag </s>
|
funcom_train/19272020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Transformer createTransformer(boolean indent) {
try {
Transformer result = this.transformerFactory.newTransformer();
if (indent) {
result.setOutputProperty(OutputKeys.INDENT, "yes");
}
return result;
} catch (TransformerConfigurationException e) {
throw new IllegalStateException("XML Transformer misconfigured!"
+ " Probably your JVM does not support the required JAXP version!", e);
}
}
COM: <s> this method creates a new transformer </s>
|
funcom_train/36856113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateNote(long rowId, String title, String lat, String lon) {
ContentValues args = new ContentValues();
args.put(KEY_TITLE, title);
args.put(KEY_LAT, lat);
args.put(KEY_LON, lon);
return mDb.update(DATABASE_TABLE, args, KEY_ROWID + "=" + rowId, null) > 0;
}
COM: <s> update the note using the details provided </s>
|
funcom_train/40363676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cascadingCut(Node min) {
Node z = parent;
// if there's a parent...
if (z != null) {
if (mark) {
// it's marked, cut it from parent
z.cut(this, min);
// cut its parent as well
z.cascadingCut(min);
} else {
// if y is unmarked, set it marked
mark = true;
}
}
}
COM: <s> performs a cascading cut operation </s>
|
funcom_train/43325029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean greaterThan(dfp x) {
/* if a nan is involved, signal invalid and return false */
if (nans == SNAN || nans == QNAN || x.nans == SNAN || x.nans == QNAN) {
ieeeFlags |= FLAG_INVALID;
dotrap(FLAG_INVALID, "lessThan", x, newInstance(zero));
return false;
}
return (compare(this, x) > 0);
}
COM: <s> returns true if this is greater than x </s>
|
funcom_train/32370965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public T getValidAtTime(Long time) {
Long t = null;
Set<Long> keys = versions.keySet();
for (Long validFrom : keys) {
if (validFrom > time) {
if(t==null) return null;
} else {
t = validFrom;
}
}
return t!=null ? versions.get(t) : null;
}
COM: <s> returns the last valid object for time </s>
|
funcom_train/35083922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumn(int row, int col) throws IndexOutOfBoundsException {
String colData;
colData = (String) ((ArrayList) fileData.get(row)).get(col);
log.debug(fileName + "(" + row + "," + col + "): " + colData);
return colData;
}
COM: <s> get the string for the column from the current row </s>
|
funcom_train/1060073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTranslucentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DiagramElement_translucent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DiagramElement_translucent_feature", "_UI_DiagramElement_type"),
Di2Package.Literals.DIAGRAM_ELEMENT__TRANSLUCENT,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the translucent feature </s>
|
funcom_train/51297807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showMessage(String msg) {
String title = LanguageClass.getValue("general.system_mess");
Map<String, String> btnName = new HashMap<String, String>();
btnName.put(Asker.YES_NAME, LanguageClass.getValue("general.close"));
Asker.ask(ProjectUtilities.intermediateWindowForComponent(this), title,
msg, QuestionDialog.YES, btnName, QuestionDialog.YES);
}
COM: <s> creates and displays message window </s>
|
funcom_train/26433088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCenterText(String text) {
Util.debug("MainView, setCenterText: " + text);
// setComponentLabel(centerText, text);
if( text == null ) {
centerText.setText( "" );
centerText.setVisible( false );
} else {
centerText.setText( text );
centerText.setVisible( true );
}
}
COM: <s> sets the label for the center text </s>
|
funcom_train/22277140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decode(Decoder decoder) throws CodingException {
script = decoder.decodeString(SCRIPT_KEY);
target = (Target)decoder.decodeObject(TARGET_KEY);
command = decoder.decodeString(COMMAND_KEY);
if (decoder.versionForClassName("netscape.constructor.Script") > 1)
usingLiveConnect = decoder.decodeBoolean(LIVECONNECT_KEY);
else
usingLiveConnect = true;
}
COM: <s> decodes the script </s>
|
funcom_train/1175741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParticleEffectComponent getComponent(String name) throws LoadingException {
InputStream is = getCachedResource("data/effects/component/" + name + ".xml");
ParticleEffectComponent result = null;
try {
result = srl.read(ParticleEffectComponent.class, is);
} catch (Exception ex) {
throw new LoadingException(ex);
}
return(result);
}
COM: <s> create an effect component that can be added to an existing entity </s>
|
funcom_train/11737997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void buildFilter(DefaultFormBuilder builder) {
listenerClassCombo = Application.getWidgetFactory().createComboBox();
listenerClassCombo.setEditable(true);
builder.append(new JLabel("Listener class:"), listenerClassCombo);
builder.nextLine();
super.buildFilter(builder);
}
COM: <s> adds listener class dropdown to filter bar </s>
|
funcom_train/10748311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPackageAssertionStatus(String name, boolean flag) {
if (name == null) {
name = "";
}
Class.disableAssertions = false;
synchronized (definedPackages) {
if (packageAssertionStatus == null) {
packageAssertionStatus = new Hashtable<String, Boolean>();
}
}
packageAssertionStatus.put(name, Boolean.valueOf(flag));
}
COM: <s> empty string is used to denote default package </s>
|
funcom_train/46884607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addHistory(final int move, final int depth) {
if ((move & (Move.CAPTURE | Move.ENPASSANT)) == 0) {
int index = (move & MASK);
int value = table[index];
int newValue = value + (depth * depth);
if (newValue < value) {
log.error("Wrap around in addHistory()");
}
table[index] = newValue;
}
}
COM: <s> add a move to the history table </s>
|
funcom_train/19976437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disableButton(int button) {
Component[] c = commonActionsToolbar.getComponents();
for (int i = 0; i < c.length; i++) {
Component component = c[i];
if (component.getName().equals("but" + button)) {
(component).setEnabled(false);
}
}
}
COM: <s> disable the button with the given number from left to right </s>
|
funcom_train/37823256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void previousAlgoStep() {
AlgoTab tab;
if(algo instanceof BFS) tab = bfsTab;
else tab = dfsTab;
tab.getNodeStackView().stopAnimation();
algo.undo();
tab.getNodeStackView().startAnimation();
stepForwardAction.setEnabled(true);
playAction.setEnabled(true);
if(algo instanceof BFS) {
bfsStepForward = true;
bfsPlay = true;
}
else {
dfsStepForward = true;
dfsPlay = true;
}
}
COM: <s> undoes the last step in the algorithm </s>
|
funcom_train/19073891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOutputDimension(int newOutputDimension) {
this.outputDimension = newOutputDimension;
for (int i=0; i < inputs.size(); ++i) {
StreamInputSynapse inp = (StreamInputSynapse)inputs.elementAt(i);
inp.setOutputDimension(newOutputDimension);
}
}
COM: <s> sets the dimension of the input synapse </s>
|
funcom_train/47624573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeEntryFields(Button checkbox, Text field, String value) {
// Create the listener for the checkbox
final Text entryField = field;
SelectionListener selection_listener = new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
Button checkbox = (Button) event.widget;
entryField.setEnabled(checkbox.getSelection());
}
};
checkbox.addSelectionListener(selection_listener);
// Set the initial state
if (value.equals("")) {
checkbox.setSelection(false);
field.setEnabled(false);
} else {
checkbox.setSelection(true);
field.setEnabled(true);
}
}
COM: <s> do the initialization for the checkbox and the text field </s>
|
funcom_train/6290069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getStringWithRawContentFromByte(byte[] rawByteArray) {
StringBuffer rawSB = new StringBuffer(rawByteArray.length);
rawSB.setLength(rawByteArray.length);
for (int i = 0; i < rawByteArray.length; i++) {
rawSB.setCharAt(i, (char)rawByteArray[i]);
}
return rawSB.toString();
}
COM: <s> gets string from byte array with raw not encoded content of </s>
|
funcom_train/26557757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void releaseConnection(Connection conn) {
synchronized (pool) {
pool.release(conn);
try {
if (conn.isClosed())
pool.renew(conn);
} catch (SQLException e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
DriverManager.println(sw.toString());
System.err.println(
"Warning: org.sadun.util.ConnectionPool.releaseConnection() could not check wether a"
+ File.separator
+ "pooled connection had been closed or not (set the JDBC DriverManager"
+ File.separator
+ "logstream to see the causing SQLException)");
}
}
}
COM: <s> return the given connection to the pool </s>
|
funcom_train/29418928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void bringup(JFrame frame) {
frame.setVisible(true);
if ((frame.getExtendedState() & JFrame.MAXIMIZED_BOTH)!=JFrame.MAXIMIZED_BOTH)
frame.setExtendedState(JFrame.NORMAL);
else
frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
frame.requestFocus();
frame.toFront();
}
COM: <s> make the frame visible non iconized and focused </s>
|
funcom_train/33817308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getMensagem () {
if (mensagem == null) {//GEN-END:|25-getter|0|25-preInit
// write pre-init user code here
mensagem = new TextField ("Mensagem", null, 100, TextField.ANY);//GEN-LINE:|25-getter|1|25-postInit
// write post-init user code here
}//GEN-BEGIN:|25-getter|2|
return mensagem;
}
COM: <s> returns an initiliazed instance of mensagem component </s>
|
funcom_train/10365956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSystemIdFileName(final String systemId) {
if (systemId == null) {
return null;
}
int indexBackSlash = systemId.lastIndexOf("\\");
int indexSlash = systemId.lastIndexOf("/");
int index = Math.max(indexBackSlash, indexSlash);
String fileName = systemId.substring(index + 1);
return fileName;
}
COM: <s> returns the system ids filename </s>
|
funcom_train/28368592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isIntersects(final OMGraphic omg1, final OMGraphic omg2) {
final LatLonPoint center1 = getCenter(omg1);
final LatLonPoint center2 = getCenter(omg2);
final Double distance = distanceInMeter(center1, center2);
final double maxSize = Math.max(getSizeInMeter(omg1), getSizeInMeter(omg2));
return (distance <= maxSize);
}
COM: <s> checks if is intersects </s>
|
funcom_train/22397083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean executeReset() throws IOException, MailException {
if(EventLogger.getMinimumLevel() >= EventLogger.DEBUG_INFO) {
EventLogger.logEvent(
AppInfo.GUID,
("SmtpProtocol.executeReset()").getBytes(),
EventLogger.DEBUG_INFO);
}
String result = execute(RSET);
return result.startsWith(CODE_250);
}
COM: <s> execute the rset command </s>
|
funcom_train/9137417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JList getJListPresupuestos() {
if (jListPresupuestos == null) {
jListPresupuestos = new JList(getModeloJListPresupuestos());
jListPresupuestos
.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
public void valueChanged(javax.swing.event.ListSelectionEvent e) {
mostrarItems();
}
});
mostrarListado();
}
return jListPresupuestos;
}
COM: <s> this method initializes j list presupuestos </s>
|
funcom_train/4883077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setTransientObject(String key, Object value, HttpSession session, Player player){
if(businessRules.isHttpSessionForUserTransientDataInUse()){
session.setAttribute(key, value);
} else {
userTransientDataAccessor.getUserData(player.getPlayerId().toString()).putObject(key, value);
}
}
COM: <s> maps the specified value to the specified key within transient data source </s>
|
funcom_train/136531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void widthSpinnerStateChanged() {
if (!isHeightSpinner) {
double newWidth = ((Double) widthSpinner.getValue()).doubleValue();
double newHeight = newWidth * imageInfo.getHeightWidthRate();
isWidthSpinner = true;
heightSpinner.setValue(newHeight);
isWidthSpinner = false;
resetWidthHeight(newWidth, newHeight);
}
}
COM: <s> reset height spinners value when width spinner changed </s>
|
funcom_train/38725509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isConnected() {
try {
if (conn == null) {
return false;
}
return !conn.isClosed();
} catch (SQLException ex) {
Logger.getLogger(DataManager.class.getName()).log(Level.SEVERE, null, ex);
return false;
}
}
COM: <s> checks if the application is currently connected to a database or not </s>
|
funcom_train/3101437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getParameter(String name) {
try {
Vector values = (Vector) parameters.get(name);
if (values == null || values.size() == 0) {
return null;
}
String value = (String) values.elementAt(values.size() - 1);
return value;
} catch (Exception e) {
return null;
}
}
COM: <s> returns the value of the named parameter as a string or null if </s>
|
funcom_train/15493014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void process() {
try {
server.start();
while(!state.isTerminated()) {
state.monitor();
}
log.info("process method exiting");
} catch (Exception ex) {
log.error("Failed to start the server : " + ex.getMessage(), ex);
}
}
COM: <s> this method will be called to perform the processing </s>
|
funcom_train/7309342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g, JComponent c) {
JLabel label = (JLabel) c;
if (!ClearLookUtils.hasCheckedBorder(label)) {
Border oldBorder = ClearLookManager.replaceBorder(label);
ClearLookUtils.storeBorder(label, oldBorder);
}
super.paint(g, c);
}
COM: <s> replaces the code border code if appropriate then paints </s>
|
funcom_train/3368498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDataFlavorSupported(DataFlavor flavor) {
Class<?> propertyType = property.getPropertyType();
if ("application".equals(flavor.getPrimaryType()) &&
"x-java-jvm-local-objectref".equals(flavor.getSubType()) &&
flavor.getRepresentationClass().isAssignableFrom(propertyType)) {
return true;
}
return false;
}
COM: <s> returns whether the specified data flavor is supported for </s>
|
funcom_train/45238480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeUnreadable(List<T> entities) {
Iterator<T> it = entities.iterator();
while (it.hasNext()) {
T entity = it.next();
if (!canRead(getConnection().getUser(), entity))
it.remove();
}
}
COM: <s> remove entities without read permission from a list </s>
|
funcom_train/12128140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void addEdge(Edge edge, boolean inEdge) {
if(edge == null) return;
if(inEdge) {
if(inEdges == null) {
inEdges = new Vector();
}
if(!inEdges.contains(edge)) {
inEdges.addElement(edge);
}
} else {
if(outEdges == null) {
outEdges = new Vector();
}
outEdges.addElement(edge);
if(!outEdges.contains(edge)) {
outEdges.addElement(edge);
}
}
}
COM: <s> add the given edge to this nodes in edges or out edges dictionaries </s>
|
funcom_train/12622029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commitDSOperations() throws DataAccessException {
changes.removeAllElements();
store.commit();
if (pimList != null) {
try {
pimList.close();
} catch (Exception e) {
//
// There is nothing we can do...
//
StaticDataHelper.log(e.getMessage());
}
items = null;
}
}
COM: <s> execute commit recordstore operations </s>
|
funcom_train/49009245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton4() {
if (jButton4 == null) {
jButton4 = new JButton();
jButton4.setText("灰化");
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
GrayFilter filter = new GrayFilter();
doFilter(filter, true);
}
});
}
return jButton4;
}
COM: <s> this method initializes j button4 </s>
|
funcom_train/34853016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUniverseName(EClassifier c, State state) {
if (classifier2name.containsKey(c)) {
return classifier2name.get(c);
}
String name = makeUniqueName(c.getName(), state);
if (!name.equals(c.getName())) {
System.err.println("Warning: the identifier " + c.getName()
+ " is already used; using " + name + " instead ");
}
classifier2name.put(c, name);
return name;
}
COM: <s> creates a universe name for the given classifier </s>
|
funcom_train/16269713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hangup() {
Log.debug("Pressed hangup");
if (_call != null) {
Runnable ans = new Runnable() {
public void run() {
_call.hangup();
}
};
javax.swing.SwingUtilities.invokeLater(ans);
show("Hangup...");
}
}
COM: <s> hangs up the current call </s>
|
funcom_train/44364626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertiesChanged(PropertiesChangeEvent e) {
System.out.println("PANEL CHANGED");
Object changedObject = e.getSource();
if ( changedObject instanceof BasePanel ) {
java.awt.Dimension panelDimensions = ((BasePanel)changedObject).getPanelDimensions();
xMax = (int)panelDimensions.getWidth();
yMax = (int)panelDimensions.getHeight();
}
}
COM: <s> listens specifically for the change in the size of the panel </s>
|
funcom_train/37838353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WordEntry addNewWord(final String str) {
final String key = trimWord(str);
WordEntry entry = words.get(key);
if (entry == null) {
entry = new WordEntry();
entry.setType(new ExpressionType(""));
// add the new entry
entry.setNormalized(key);
words.put(key, entry);
} else {
logger.warn("word already known: " + str + " -> "
+ entry.getNormalized());
}
return entry;
}
COM: <s> add a new word to the list in order to remember it later </s>
|
funcom_train/4644776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTaskIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Task_taskId_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Task_taskId_feature", "_UI_Task_type"),
TassooPackage.Literals.TASK__TASK_ID,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the task id feature </s>
|
funcom_train/5437222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addUrgentPtr(PacketInputStream input, PacketAnalysisDescriptor root) {
try {
int offset = input.getOffset();
int pointer = input.readShort();
addNode("Urgent Pointer: 0x" + Integer.toHexString(pointer), offset, offset + 1, root);
} catch (IOException e) {
// Drop it.
}
}
COM: <s> adds the urgent pointer entry in the tcp header to the analysis information </s>
|
funcom_train/15490385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSlice(String sliceLabel, ImageProcessor ip, int n) {
if (n<0 || n>nSlices)
throw new IllegalArgumentException(outOfRange+n);
addSlice(sliceLabel, ip);
Object tempSlice = stack[nSlices-1];
String tempLabel = label[nSlices-1];
int first = n>0?n:1;
for (int i=nSlices-1; i>=first; i--) {
stack[i] = stack[i-1];
label[i] = label[i-1];
}
stack[n] = tempSlice;
label[n] = tempLabel;
}
COM: <s> adds the image in ip to the stack following slice n </s>
|
funcom_train/10705480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasService(Class serviceClass) {
if (serviceClass == null) {
throw new NullPointerException();
}
boolean has;
synchronized (services) {
has = services.containsKey(serviceClass);
}
if (!has && getBeanContext() instanceof BeanContextServices) {
has = ((BeanContextServices) getBeanContext())
.hasService(serviceClass);
}
return has;
}
COM: <s> checks whether a service is registed in this context or the parent </s>
|
funcom_train/441910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Nucleotide getComplementNucleotide(Nucleotide n,byte type) {
byte type1 = n.getType();
Nucleotide nt = complementTables[type1][type].get(n);
if (nt == null) throw new UnsupportedOperationException("No complement found for " + n.getChar()); //$NON-NLS-1$
return nt;
}
COM: <s> return the nucleotide complementary to n of the specified type </s>
|
funcom_train/14181085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
super.setUp();
firstUser = new User("nick1", null, null);
secondUser = new User("nick2", null, null);
otherUser = new User("Other User", null, null);
mainMembers = new HashSet<User>();
mainMembers.add(firstUser);
mainMembers.add(secondUser);
otherMembers = new HashSet<User>(mainMembers);
otherMembers.remove(1);
otherMembers.add(otherUser);
mainChannel = ChatChannel.createChannel(MAIN_CHANNEL_NAME, mainMembers);
}
COM: <s> prepares the common environment before each test </s>
|
funcom_train/37587096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void textGotoLine1() throws BadLocationException {
final String s = "a\n";
_doc.insertString(0, s, null);
_doc.gotoLine(2);
assertEquals("#0.0", 2, _doc.getCurrentLocation());
}
COM: <s> test going to the second line in a two line document </s>
|
funcom_train/2766617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addKeySignatureEvent(KeyEvent ke) throws InvalidMidiDataException{
Key k=ke.getKey();
//key is a meta message in midi
Track t=sequence.getTracks()[k.getTrack()];//but global message always on track 0
t.add(new MidiEvent(k.createMidiMessage()[0],ticks[k.getTrack()][1]));
}
COM: <s> midi meta message </s>
|
funcom_train/1327234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getLocation() {
// package extra parameters needed
Geocoder geocoder = new Geocoder(this);
Hashtable<String,Object> extraParams = new Hashtable<String, Object>();
extraParams.put("locationManager", locationManager);
extraParams.put("geocoder", geocoder);
// kickoff thread
BackendThread thread = new BackendThread(handler, BackendThreadModes.RetrieveCurrentAddress, extraParams);
thread.start();
}
COM: <s> start buzzwords search in a separate thread </s>
|
funcom_train/49406157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAll(){
List<SNActivitySchema> activitySchemas = findAllActivitySchemas();
for (SNActivitySchema as : activitySchemas) {
Set<SemanticNode> removed = new HashSet<SemanticNode>();
removeCascading(as.asResource().asActivitySchema(), removed);
}
List<SNRelationSchema> relSchemas = findAllRelationSchemas();
for (SNRelationSchema rs : relSchemas) {
Set<SemanticNode> removed = new HashSet<SemanticNode>();
removeCascading(rs, removed);
}
}
COM: <s> remove all activity schemas </s>
|
funcom_train/28750506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlates(String newVal) {
if ((newVal != null && this.plates != null && (newVal.compareTo(this.plates) == 0)) ||
(newVal == null && this.plates == null && plates_is_initialized)) {
return;
}
this.plates = newVal;
plates_is_modified = true;
plates_is_initialized = true;
}
COM: <s> setter method for plates </s>
|
funcom_train/10912249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createNormalFlows() {
flowAreas = new java.util.ArrayList<NormalFlow>(colCount);
colWidth = (ipd - ((colCount - 1) * colGap)) / colCount;
for (int i = 0; i < colCount; i++) {
NormalFlow newFlow = new NormalFlow(colWidth);
flowAreas.add(newFlow);
}
}
COM: <s> create the normal flows for this span </s>
|
funcom_train/43100019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resize() {
int size = history.size();
if (size > MAX_SIZE) {
int oversize = size - MAX_SIZE;
int halfsize = size / 2;
if (currentTarget > halfsize && oversize < halfsize) {
for (int i = 0; i < oversize; i++) {
history.remove(0);
}
currentTarget -= oversize;
}
}
}
COM: <s> resizes the history if its grown too big </s>
|
funcom_train/37208387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getParentOfWorkflow(String childWFName) throws SQLException {
String q = "SELECT parentWFname FROM Workflow WHERE wfname = \""+childWFName+"\"";
String result = null;
Statement stmt;
stmt = dbConn.createStatement();
boolean success = stmt.execute(q);
if (success) {
ResultSet rs = stmt.getResultSet();
while (rs.next()) {
result = rs.getString("parentWFname");
break;
}
}
return result;
}
COM: <s> fetch children of parent wfname from the workflow table </s>
|
funcom_train/3990041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWywiadPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_HistoriaChoroby_wywiad_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_HistoriaChoroby_wywiad_feature", "_UI_HistoriaChoroby_type"),
PrzychodniaPackage.Literals.HISTORIA_CHOROBY__WYWIAD,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the wywiad feature </s>
|
funcom_train/12333583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CrawlJobHandler initHandler() throws Exception {
CrawlJobHandler handler;
if (Heritrix.isSingleInstance()) {
Heritrix heritrix = Heritrix.getSingleInstance();
handler = heritrix.getJobHandler();
} else {
throw new Exception("No heritrix instance");
}
return handler;
} //- initHandler
COM: <s> returns a crawl job handler from the heritrix instance if a heritrix </s>
|
funcom_train/38529286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read() {
if (DataParameter.getParameterList().size() != 0) {
DataParameter.getParameterList().size();// number of parameters
int count = 0;
for (DataParameter currentParameter : DataParameter
.getParameterList()) {
textParam[count].setText(String.valueOf(currentParameter
.getValue()));
count++;
}
}
}
COM: <s> read the values from the parameter objects and display them </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.