__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/19909489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generate(StringBuilder builder, List<ParameterMapper> parameters) {
if (stack.size() != 1) {
throw new IllegalStateException("Stack must contain exactly one element!");
}
for (BoundFragment obj : last()) {
obj.generate(builder, parameters);
}
}
COM: <s> generate the final sql fragemnt with parameter and types </s>
|
funcom_train/21952436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (o != null) {
Object testValue = null;
if (o instanceof SizedCacheEntry) {
testValue = ((SizedCacheEntry)o).getCachedValue();
} else {
testValue = o;
}
return o.equals(cachedValue);
}
return (cachedValue == null);
}
COM: <s> compares the underlying value for equality </s>
|
funcom_train/12705547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServletOutputStream getOutputStream() throws IOException {
if (usingWriter) {
throw new IllegalStateException("getWriter() has already been called for this response");
}
usingOutputStream = true;
if (servletOutputStream == null) {
servletOutputStream = new BufferedServletOutputStream(output);
}
return servletOutputStream;
}
COM: <s> get output stream </s>
|
funcom_train/30204891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSpinner getJSpinnerPointBy() {
if (jSpinnerPointBy == null && annotation instanceof ExtentAble) {
spinnerModelPointBy = new SpinnerNumberModel();
spinnerModelPointBy.setValue(((ExtentAble) annotation).getPointB().y);
spinnerModelPointBy.setStepSize(1);
jSpinnerPointBy = new JSpinner(spinnerModelPointBy);
}
return jSpinnerPointBy;
}
COM: <s> this method initializes j spinner point by </s>
|
funcom_train/44105968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasSubscribed(Integer album) {
Connection c = null;
try {
c = DBUtil.getConnection();
Statement st = c.createStatement();
ResultSet rs = st.executeQuery("select * from subscription where album = " + album +
" and people = " + getId());
boolean res = rs.next();
st.close();
return res;
} catch (SQLException e) {
throw new RuntimeException("error checking subscription: " + e);
} finally {
DBUtil.closeConnection(c);
}
}
COM: <s> pr ft ob die person das album abonniert hat </s>
|
funcom_train/48982968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStudentsInfo() {
XStream xStream = new XStream(new JettisonMappedXmlDriver());
Integer result = courseRemote.getStudentsCount(course.getId());
String json = xStream.toXML(result);
json = json.replaceAll("int", "count");
setInputStream(new ByteArrayInputStream(json.getBytes()));
return "json";
}
COM: <s> retrieves a info about students </s>
|
funcom_train/19647526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String place( String eventName, String param, boolean onlyToken ) {
if ( !enabled && !onlyToken ) {
return null;
}
String token = tokenize( eventName, param);
if ( converters.get( eventName ).isCrawlable() ) {
token = CRAWLABLE + token;
}
if ( !onlyToken ) {
history.newItem( token, false );
}
return token;
}
COM: <s> convert an event and its associated parameters to a token </s>
|
funcom_train/31652051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unmarshall(Document doc, OutputStream out) throws DataSourceException {
try{
Element docElement = doc.getDocumentElement( );
NodeList root = docElement.getChildNodes( ); //each segment
String output = DSML2LDIF(out, root, 1);
out.write(output.getBytes());
out.flush();
}catch(Exception ex){
throw new DataSourceException(ex);
}
}
COM: <s> method for transforming dsml data into ldif </s>
|
funcom_train/8074010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getEvaluatorSpec() {
ASEvaluation e = getEvaluator();
if (e instanceof OptionHandler) {
return e.getClass().getName() + " "
+ Utils.joinOptions(((OptionHandler)e).getOptions());
}
return e.getClass().getName();
}
COM: <s> gets the evaluator specification string which contains the class </s>
|
funcom_train/26205902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Param createParam() throws ParamException {
ListParam pl = new ListParam();
pl.setLabel(label);
Iterator iter = descs.iterator();
while (iter.hasNext()) {
ParamDesc pd = (ParamDesc) iter.next();
pl.addParam(pd.createParam());
}
return pl;
}
COM: <s> creates the parameter list described by this descriptor </s>
|
funcom_train/16643502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTranslatedResource() {
final CompositeResourceBundle bundle = new CompositeResourceBundle();
assertNotNull("Bundle null", bundle);
bundle.setLocale(TRANSLATED_LOCALE);
bundle.addBundle(BUNDLE_DIRECTORY + FILE_SEPARATOR + TRANSLATED_NAME);
final String result = bundle.getString(BUNDLE_KEY);
assertEquals("Wrong translation", TRANSLATED_RESULT, result);
}
COM: <s> test translated resource </s>
|
funcom_train/15490576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showHistogram(ImagePlus imp, int bins, double histMin, double histMax) {
boolean limitToThreshold = (Analyzer.getMeasurements()&LIMIT)!=0;
stats = imp.getStatistics(AREA+MEAN+MODE+MIN_MAX+(limitToThreshold?LIMIT:0), bins, histMin, histMax);
showHistogram(imp, stats);
}
COM: <s> draws the histogram using the specified title number of bins and histogram range </s>
|
funcom_train/20840754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getRandomPlugin(String category, String name) throws Exception {
if(category.equals("movement"))
return _movementPlugins.getPlugin(category + "Plugins", name);
if(category.equals("startPoint"))
return _startPointPlugins.getPlugin(category + "Plugins", name);
if(category.equals("traffic"))
return _trafficPlugins.getPlugin(category + "Plugins", name);
return null;
}
COM: <s> gets the random plugin </s>
|
funcom_train/39137858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void terminate(JobContext pJobContext) throws ControlException {
try {
pJobContext.getLog().info("schedule gridsam.TerminalStage");
pJobContext.schedule("gridsam.TerminalStage");
} catch (JobManagerException xEx) {
throw new ControlException(
"unable to schedule 'gridsam.TerminalStage' "
+ xEx.getMessage(), xEx);
}
}
COM: <s> called by the job manager to terminate the job previously handled by this </s>
|
funcom_train/38535391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Object obj) {
// check for stored references
if (ref==null) return;
// retrieve reference list
ArrayList<Object> list = ref.get();
if (list==null) return;
// check if value exists in list
if (list.size()==0) return;
// check if object is in list
list.remove(obj);
}
COM: <s> removes an object from the queue </s>
|
funcom_train/856142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calcPreferredSize() {
int compWidth, compHeight;
// Determine size.
compWidth = (this.map.getWidth() + this.map.getHeight())
* (this.fieldImageWidth / 2);
compHeight = (this.map.getWidth() + this.map.getHeight() - 1)
* this.fieldHeight + (this.fieldImageHeight - this.fieldHeight);
this.setPreferredSize(new Dimension(compWidth, compHeight));
}
COM: <s> calculates the preferred size of the component </s>
|
funcom_train/4227534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOldSecret(String secret) {
if (isVoid(secret)) {
return;
}
if (secret.length() < 16) {
fatal("Error: setOldSecret: Secret key is expected to be non-null and longer than 16 characters.");
}
oldSignKey = derive(secret, "SIGNATURE");
oldCryptKey = derive(secret, "ENCRYPTION");
}
COM: <s> sets your old secret key </s>
|
funcom_train/37763797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadSourceFile(File source) throws FrameworkException {
try {
URL url = source.toURI().toURL();
AspectXmlLoader.deployXML(url);
} catch (Exception e) {
log.error("Error in loading the source file " + source, e);
throw new JaffaRulesFrameworkException(JaffaRulesFrameworkException.PARSE_ERROR, new Object[] {source}, e);
}
}
COM: <s> load the source file creating the repository in the process </s>
|
funcom_train/25874271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map getOnlineList(HttpSession session) {
ServletContext application = session.getServletContext();
Map onlineList = (Map) application.getAttribute("ONLINE_LIST");
if (onlineList == null) {
onlineList = new HashMap();
application.setAttribute("ONLINE_LIST", onlineList);
}
return onlineList;
}
COM: <s> servlet context map </s>
|
funcom_train/12761630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void attemptExpansion(int x, int y) {
CloudElement selectedElement = getSelected(x, y);
if (selectedElement == null) return;
String[] childNames = TagSEAUtils.getChildTagNames(selectedElement.getTagName());
if(selectedElement != null && childNames.length > 0) {
prevTag = selectedElement.getTagName();
loadCloudElements(childNames);
backAction.setEnabled(true);
forwardAction.setEnabled(false);
}
}
COM: <s> expands the selected element if one exists </s>
|
funcom_train/20529163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkValidCheckConstraint() {
OrderedHashSet set = null;
set = collectAllExpressions(set, subqueryAggregateExpressionSet,
emptyExpressionSet);
if (set != null && !set.isEmpty()) {
throw Error.error(ErrorCode.X_0A000,
"subquery in check constraint");
}
}
COM: <s> check valid check constraint </s>
|
funcom_train/31659036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getId() {
//if(templateId == null){ //No current way to reset this when adding FormTemplates...
if(parent == null){
return "1";
}
id = parent.getId();
Object[] formItems = parent.getChildren().toArray();
for (int i = 0; i < formItems.length; i++) {
if(formItems[i] == this){
id = id +"_"+(i+1);
}
}
//}
return this.id;
}
COM: <s> id to use for session based editing in for instance an web setting </s>
|
funcom_train/18734062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPackageName() {
if (packageName != null)
return packageName;
String str = getInternalClassName();
int index = str.indexOf("<");
if (index != -1)
str = str.substring(0, index); // strip off the generics guff
index = str.lastIndexOf("/");
if (index == -1)
return "";
return str.substring(0, index).replace('/', '.');
}
COM: <s> returns the packagename if its the default package we return an empty string </s>
|
funcom_train/12174404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void iterateBefore(Node node) {
if (node instanceof Element) {
Element element = (Element) node;
// Do the pre-processing.
convertDivideHintToKeepTogether(element);
// Iterate recursively through the children of this element.
Node child = element.getHead();
while (child != null) {
iterateBefore(child);
child = child.getNext();
}
}
}
COM: <s> iterates through the children of the node passed in </s>
|
funcom_train/13363931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveDataObjects(Collection collection) throws OACException {
PersistenceManager pm = getPersistenceManager();
Transaction tx = openTransaction(pm);
try {
pm.makePersistentAll(collection);
commitTransaction(tx);
} catch (JDOUserException exp) {
exp.printStackTrace(); // so we can debug the problem
throw new OACException(exp.getMessage());
} finally {
closeTransaction(tx);
pm.close();
}
}
COM: <s> saves the collection of data objects to the </s>
|
funcom_train/51810747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PreActionResult execute(EvaluationCtx context) {
PreActionResult result = null;
System.out.println(" PreAction.execute");
// first, try matching the Subjects section
result = aquireLocksSection.aquireLocks(context);
if (result.getResult() != PreActionResult.AQUIRED_ALL) {
logger.finer("failed to aquire all locks section of PreAction");
}
return result;
}
COM: <s> determines whether this code target code matches </s>
|
funcom_train/28368141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parsePriority(final Element cur, final Species species) {
Element d = cur.getChild("priority");
if (d == null) {
d = cur.getChild("weight");
}
priority = Stimulus.buildFromXML(d, species);
priority.setName("priority[" + name + "]");
}
COM: <s> parses the priority </s>
|
funcom_train/34527316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void evaluateArguments(TableFormatterHandler handler) throws EvaluationException {
EvaluationHelper evaluator = InforamaContext.getInstance().getEvaluationHelper();
ArrayList<String> args = handler.getArguments();
for (int i = 0; i < args.size(); i++) {
String arg = evaluator.evaluate(args.get(i), evaluationContext);
args.set(i, arg);
}
}
COM: <s> evaluates handlers arguments before they are interpreted by groovy </s>
|
funcom_train/7827978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDesignButtonDeselected() {
this.addPlaceButton.setSelected(false);
this.addTransitionButton.setSelected(false);
this.addEdgeButton.setSelected(false);
this.addInhibitorButton.setSelected(false);
this.addTokenButton.setSelected(false);
this.removeTokenButton.setSelected(false);
this.arrowButton.setSelected(false);
}
COM: <s> select all design buttons deselected </s>
|
funcom_train/7284779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processDisconnectAll() {
Iterator it = selector.keys().iterator();
while(it.hasNext()) {
SelectionKey sk = (SelectionKey)it.next();
SelectableChannel channel = sk.channel();
if (channel instanceof SocketChannel) {
cancel(sk);
}
}
libraryQueue.clear();
}
COM: <s> disconnects all clients from this server </s>
|
funcom_train/45134151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getAttributeLong(String attributeName) throws XMLInvalidTypeException, NullPointerException {
long value;
try {
value = Long.parseLong(getAttributeString(attributeName));
}
catch (NullPointerException npe){
throw npe;
}
catch (Exception e){
throw new XMLInvalidTypeException("Attribute not a long");
}
return value;
}
COM: <s> returns the long value of the given attribute of the root tag </s>
|
funcom_train/8084546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBeanConnectionRelation(MetaBean meta, String connection) {
Vector relations;
Object key;
relations = getBeanConnectionRelation(meta);
// add relation
relations.add(connection);
// update
if (meta == null)
key = REGULAR_CONNECTION;
else
key = meta;
m_BeanConnectionRelation.put(key, relations);
}
COM: <s> adds the given connection relation for the specified meta bean or null in </s>
|
funcom_train/47306248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent evt) {
if (evt.getPropertyName().equals("connectionPoints")) {
conPointsMoved++;
} else if (evt.getPropertyName().equals("lengths")) {
resized++;
} else if (evt.getPropertyName().equals("topLeftCorner")) {
moved++;
}
}
COM: <s> according to the type of event receives increase corresponding </s>
|
funcom_train/47989650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void end() {
localVars.clear();
if(usesSafeVariables) {
targetsUsingSafeVars.add(currentTarget);
}
if(currentTarget != null && !currentGlobalVars.isEmpty()) {
if(globalVars.containsKey(currentTarget)) {
globalVars.get(currentTarget).add(currentGlobalVars);
}
else {
globalVars.put(currentTarget, currentGlobalVars);
}
}
isInitialized = false;
}
COM: <s> indicates end of processing of the source code </s>
|
funcom_train/15867509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addResponsibleGroup(String grId) throws MoiseConsistencyException {
GroupInstance g = oe.findGroup(grId);
if (g == null)
throw new MoiseConsistencyException("group "+grId+" does not exist in the OE and thus can not be responsible for scheme "+getId());
addResponsibleGroup( g );
}
COM: <s> adds an instance group in the set of groups responsible for this sch </s>
|
funcom_train/46057011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteAllBookmarksFor(OLATResourceable res) {
String query = "from org.olat.bookmark.BookmarkImpl as b where b.olatrestype = ? and b.olatreskey = ?";
DBFactory.getInstance().delete(query, new Object[] { res.getResourceableTypeName(), res.getResourceableId() },
new Type[] { Hibernate.STRING, Hibernate.LONG });
}
COM: <s> delete all bookmarks pointing to the given resourceable </s>
|
funcom_train/12778216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceWith(int i, Patch p) throws NullPointerException {
if (p == null) {
throw new IllegalArgumentException("p is null");
}
verifyState(DURING_PASS);
if (replacementPatches[i] != null) {
throw new IllegalArgumentException("Instruction " + i + " cannot be replaced more than once");
}
replacementPatches[i] = p.insert(null);
patchCount++;
}
COM: <s> insert code to replace the instruction </s>
|
funcom_train/4230875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPreviousLayerConnectedCells(int layer) {
if (previousLayerConnectedCells == null) {
previousLayerConnectedCells = new ArrayList[temp.length];
for (int i = 0; i < previousLayerConnectedCells.length; i++){
previousLayerConnectedCells[i] = new ArrayList(2);
if (i == 0) {
previousLayerConnectedCells[i].add(target);
} else {
previousLayerConnectedCells[i].add(this);
}
}
}
return previousLayerConnectedCells[layer - minRank - 1];
}
COM: <s> returns the cells this cell connects to on the next layer down </s>
|
funcom_train/50393194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerDependencies(Class<? extends Object> c){
Dependency d=(Dependency)(c.getAnnotation(Dependency.class));
if(d!=null){
Class<?>[] cs=d.classes();
for(Class<?>clazz2: cs){
try {
logger.debug("Registering "+clazz2.getName() );
doRegister(clazz2);
} catch (PicoException e1) {
//duplicate registration is not a problem
logger.debug("Duplicate component registration: "+clazz2+", ignored.");
}
catch(Exception e){
logger.fatal("Error in component registration for: "+clazz2);
}
}
}
}
COM: <s> process dependencies declared on the class </s>
|
funcom_train/529545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void okButton_actionPerformed(ActionEvent e) {
// Get the FindResult that corresponds to the selected address string, and
// save its Location -- to be returned by getSelectedLocation(). Note that
// this dialog object continues to exist in memory even after dispose() is
// called.
location = candidates[addressList.getSelectedIndex()].getFoundLocation();
dispose();
}
COM: <s> handle a click event in the ok button </s>
|
funcom_train/12655061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGraph(JGraph graph) {
if (graph != null) {
this.graph = graph;
graph.getModel().addGraphModelListener(this);
CellViewFactory customFactory = getCellViewFactory();
if (customFactory != null) {
graph.getGraphLayoutCache().setFactory(customFactory);
}
} else {
this.graph.getModel().removeGraphModelListener(this);
this.graph = null;
}
}
COM: <s> set the jgraph instance or set null to remove manager from graph </s>
|
funcom_train/4713973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onDoubleClick() {
IStructuredSelection sel = (IStructuredSelection)treeViewer.getSelection();
if(sel.size() != 1)
return;
Task task = (Task)sel.getFirstElement();
Task newState = task.getState();
TaskDialog dlg = new TaskDialog("Edit Task", newState);
if(dlg.changesConfirmed()) {
EditCommand cmd = new EditCommand(task, newState);
undoController.doCommand(cmd);
}
}
COM: <s> allows editing of the currently selected task </s>
|
funcom_train/7266331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DHTValue readDHTValue(DHTValueFactoryManager factoryManager) throws IOException {
DHTValueType valueType = readValueType();
Version version = readVersion();
byte[] data = null;
int length = readUnsignedShort();
if (length > 0) {
data = new byte[length];
readFully(data);
}
return factoryManager.createDHTValue(valueType, version, data);
}
COM: <s> reads a dhtvalue from the input stream </s>
|
funcom_train/3898411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void savePreferences() {
IPreferenceStore store = ReloadPlugin.getDefault().getPreferenceStore();
store.setValue(IReloadPreferenceConstants.PREFS_RESOURCEVIEW_AUTOBROWSE, _autoBrowse);
store.setValue(IReloadPreferenceConstants.PREFS_RESOURCEVIEW_LINKEDITOR, _linkEditor);
}
COM: <s> save local view preferences </s>
|
funcom_train/10521507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate(ActionMapping mapping, HttpServletRequest req, ActionMessages errors) {
if (_file != null) {
String fileName = _file.getFileName();
if (! fileName.endsWith(".html") && ! fileName.endsWith(".txt")) {
errors.add("file", new ActionMessage("errors.fileextension"));
}
}
}
COM: <s> in addition to any declarative validation that is defined per property this method </s>
|
funcom_train/14316933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMines(int num) {
rg = new Random();
GRect gr;
for(int x = 0; x < num; x++) {
rg = new Random();
gr = new GRect(rg.nextInt(466)+2, rg.nextInt(422)+2, rg.nextInt(10)+11, rg.nextInt(10)+11);
gr.setColor(new Color(0,111,0));
gr.setFillColor(new Color(0,255,0));
gr.setFilled(true);
gc.add(gr);
}
}
COM: <s> adds mines in random spots </s>
|
funcom_train/12808259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPrefix(String key, String prefix) {
PdfName fieldname = new PdfName(key);
PdfObject o = get(fieldname);
if (o == null)
throw new IllegalArgumentException(MessageLocalization.getComposedMessage("you.must.set.a.value.before.adding.a.prefix"));
PdfDictionary dict = new PdfDictionary(PdfName.COLLECTIONSUBITEM);
dict.put(PdfName.D, o);
dict.put(PdfName.P, new PdfString(prefix, PdfObject.TEXT_UNICODE));
put(fieldname, dict);
}
COM: <s> adds a prefix for the collection item </s>
|
funcom_train/43213271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean setIsWritable(boolean writable) {
if (((CAN_WRITE_BIT & getFlags()) != 0) != writable) {
if (writable) {
setFlags(getFlags() | CAN_WRITE_BIT);
} else {
setFlags(getFlags() & (SSL_BIT | ONLINE_BIT | CAN_READ_BIT | DATA_STORE_BIT));
}
return true;
}
return false;
}
COM: <s> p sets whether the server can be written to </s>
|
funcom_train/5576606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Collection<Music> c) throws MPDServerException {
for (Music music : c) {
String[] args = new String[1];
args[0] = music.getFullpath();
this.mpd.getMpdConnection().queueCommand(MPD_CMD_PLAYLIST_ADD, args);
}
this.mpd.getMpdConnection().sendCommandQueue();
this.refresh();
}
COM: <s> adds a code collection code of code music code to playlist </s>
|
funcom_train/43850195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void putAtIndex(char[] jumbled, char letter, int index) {
Log.i("Letter ", "" + letter);
for (int i = index; i < index + jumbled.length; i++) {
int actualIndex = i % jumbled.length;
if (jumbled[actualIndex] == 0) {
jumbled[actualIndex] = letter;
break;
}
}
}
COM: <s> places the provided letter at the specified position </s>
|
funcom_train/6268163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getMessageBody() {
if (this.contentLength == 0) {
return null;
} else {
int endIndex = bufferPointer + this.contentLength;
String body;
// guard against bad specifications.
if (endIndex > currentMessage.length()) {
endIndex = currentMessage.length();
body = currentMessage.substring(bufferPointer, endIndex);
bufferPointer = endIndex;
} else {
body = currentMessage.substring(bufferPointer, endIndex);
bufferPointer = endIndex + 1;
}
this.contentLength = 0;
return body;
}
}
COM: <s> get the message body </s>
|
funcom_train/21941002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field12 getField12() {
if (getSwiftMessage() == null) {
throw new IllegalStateException("SwiftMessage was not initialized");
}
if (getSwiftMessage().getBlock4() == null) {
log.info("block4 is null");
return null;
} else {
final Tag t = getSwiftMessage().getBlock4().getTagByName("12");
if (t == null) {
log.fine("field 12 not found");
return null;
} else {
return new Field12(t.getValue());
}
}
}
COM: <s> iterates through block4 fields and return the first one whose name matches 12 </s>
|
funcom_train/1911939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateEstimates(Hmm<ObservationVector> learnt) throws IOException {
MarkovGenerator<ObservationVector> mg = new MarkovGenerator<ObservationVector>(learnt);
List<List<ObservationVector>> estimateSeq = new ArrayList<List<ObservationVector>>();
List<ObservationVector> sample = mg.observationSequence(600);
Collections.reverse(sample);
estimateSeq.add(sample);
ObservationSequencesWriter.write(new BufferedWriter(new FileWriter("estimates3.csv")),
new CsvObservationVectorWriter(), estimateSeq);
}
COM: <s> generate some sequences using the learnt hmm </s>
|
funcom_train/22784054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initComponents() {
wrapper = new JPanel();
wrapper.setOpaque(false);
wrapper.setLayout(new BorderLayout());
icon = new JLabel();
icon.setOpaque(false);
icon.setText("");
wrapper.add(icon, BorderLayout.WEST);
editor = new JPanel();
editor.setOpaque(false);
editor.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
editor.setBorder(new EmptyBorder(0, 5, 0, 0));
wrapper.add(editor, BorderLayout.CENTER);
}
COM: <s> create editor wrapper </s>
|
funcom_train/41623371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onSelectedRightToLeftActionPerformed() {
int selectedIndex = this.rightJList.getSelectedIndex();
if (selectedIndex == -1) {
return;
}
List<LIST_ITEM> selectedRightItems = removeSelectedRightItems();
this.leftListModel.addAll(selectedRightItems);
setSelectedIndexOrLast(this.rightJList, selectedIndex);
}
COM: <s> moves all selected items from the right list to the left list </s>
|
funcom_train/33281413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HTMLCollection jsxGet_all() {
if (all_ == null) {
all_ = new HTMLCollection(getDomNodeOrDie(), false, "HTMLElement.all") {
@Override
protected boolean isMatching(final DomNode node) {
return true;
}
};
}
return all_;
}
COM: <s> returns the value of the all property </s>
|
funcom_train/9758529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getAnnotationDecorationType(Object annotationType) {
if (areAnnotationsShown(annotationType) && fPreferenceStore != null) {
AnnotationPreference info= (AnnotationPreference) fAnnotationTypeKeyMap.get(annotationType);
if (info != null) {
String key= info.getTextStylePreferenceKey();
if (key != null)
return fPreferenceStore.getString(key);
// legacy
return AnnotationPreference.STYLE_SQUIGGLES;
}
}
return AnnotationPreference.STYLE_NONE;
}
COM: <s> returns the annotation decoration style used for the show in text preference for </s>
|
funcom_train/25787138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TransformerHandler getTransformerHandler() throws IOException {
TransformerHandler result = null;
Templates templates = getTemplates();
if (templates != null) {
try {
result = getSaxTransformerFactory().newTransformerHandler(
templates);
} catch (TransformerConfigurationException tce) {
throw new IOException("Transformer configuration exception. "
+ tce.getMessage());
}
}
return result;
}
COM: <s> returns the sax transformer handler associated to the transform sheet </s>
|
funcom_train/21913427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHorizontalPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UIMBorderLayout_horizontal_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UIMBorderLayout_horizontal_feature", "_UI_UIMBorderLayout_type"),
UIMPackage.Literals.UIM_BORDER_LAYOUT__HORIZONTAL,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the horizontal feature </s>
|
funcom_train/34239442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLoaded() {
return canConnect && !(usernameTextField.getText().trim().equals("") ||
passwordTextField.getText().trim().equals("") ||
databaseTextField.getText().trim().equals("") ||
hostTextField.getText().trim().equals(""));
}
COM: <s> check the text fields on form </s>
|
funcom_train/50458272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsKey(Object key) throws WalletException {
if (key == null) {
throw new NullPointerException("Key cannot be null.");
}
// encrypt the key and use it to see if it is in there
// TODO: look into just hashing the key rather than encrypting it, as it would be faster
// and just as secure
BigInteger hashedKey = crypto.generateHash(key);
return dataMap.containsKey(hashedKey);
}
COM: <s> returns whether a particular key is present in the map </s>
|
funcom_train/28957670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean reloadOnConfigChange(IResourceDelta delta) {
boolean result = false;
IFile configFile = Configuration.getConfigFile(getProject());
IResourceDelta configDelta = delta.findMember(configFile
.getProjectRelativePath());
if (configDelta != null) {
// invalidate configuration
ConfigurationCache.INSTANCE.invalidate(getProject());
result = true;
}
return result;
}
COM: <s> checks if the configuration file was changed </s>
|
funcom_train/16454145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIntValue(String key) {
String value = getPreference(key, "0");
int intValue = 0;
try {
intValue = Integer.parseInt(value);
}
catch (NumberFormatException nfex) {
intValue = 0; // set value to 0 if bad format
}
return intValue;
}
COM: <s> convenience method for transforming a value to an int </s>
|
funcom_train/2939535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createWidgetID(int i) {
StringBuffer id = new StringBuffer();
id.append(renderer.getEditorModel().getClass().getName());
id.append(renderer.getClient().getClass().getName());
id.append(i);
return id.toString();
}
COM: <s> create id for widget </s>
|
funcom_train/2629139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Cell getCellAtPoint(int x, int y) {
// take into account padding
int lx = x - getPaddingLeft();
int ly = y - getPaddingTop();
int row = (int) (ly / mCellHeight);
int col = (int) (lx / mCellWidth);
if(col >= 0 && col < CellCollection.SUDOKU_SIZE
&& row >= 0 && row < CellCollection.SUDOKU_SIZE) {
return mCells.getCell(row, col);
} else {
return null;
}
}
COM: <s> returns cell at given screen coordinates </s>
|
funcom_train/36788535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getContextPath(HttpServletRequest request) {
String contextPath = request.getContextPath();
if ("/".equals(contextPath)) {
// Invalid case, but happens for includes on Jetty: silently adapt it.
contextPath = "";
}
return decodeRequestString(request, contextPath);
}
COM: <s> return the context path for the given request detecting an include request </s>
|
funcom_train/44187155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBackslashes() throws URIException {
UURI uuri = UURIFactory.getInstance("http:\\/www.example.com\\a/b\\c/d?q\\r\\|s/t\\v");
String expected = "http://www.example.com/a/b/c/d?q%5Cr%5C|s/t%5Cv";
assertEquals(expected, uuri.toString());
}
COM: <s> to match ie behavior backslashes in path info really anywhere before </s>
|
funcom_train/32634072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(Object li) {
li = ((LocalInfo) li).getLocalInfo();
for (int i=0; i<count;i++) {
if (locals[i].getLocalInfo() == li) {
locals[i] = locals[--count];
locals[count] = null;
return true;
}
}
return false;
}
COM: <s> removes a local info from this variable set </s>
|
funcom_train/1581839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void shiftSelection(final int shift) {
final int newIndex = this.getSelectedIndex() + shift;
if (newIndex < 0 || newIndex >= this.items.size() || newIndex >= this.startInvisible) {
return;
} else {
final Item item = this.getItem(newIndex);
this.setSelection(item);
}
}
COM: <s> adjusts the selection by the specified number of places </s>
|
funcom_train/34708015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void configureProxy() {
InetAddress localaddr = null;
try {
localaddr = InetAddress.getLocalHost();
} catch (UnknownHostException e) {
e.printStackTrace();
}
if(localaddr.getCanonicalHostName().indexOf("ti.com") != -1){
String proxy = "wwwgate.ti.com";
String port = "80";
Properties systemProperties = System.getProperties();
systemProperties.setProperty("http.proxyHost",proxy);
systemProperties.setProperty("http.proxyPort",port);
}
}
COM: <s> this method configures the proxy to use </s>
|
funcom_train/43502719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Elog elog) {
for(Elog alog : additions) {
if(alog.getId().equals(elog.getId()) &&
alog.getReposTitle().equals(elog.getReposTitle()))
return;
}
additions.add(elog);
linkStates.put(elog, Boolean.TRUE);
}
COM: <s> add a new link to the log </s>
|
funcom_train/20890945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean visitPartition(Node n, boolean[] visited) {
if (visited[n.getId().asInt() - 1]) {
return false;
}
visited[n.getId().asInt() - 1] = true;
for (Node n2 : n.getNeighbors()) {
visitPartition(n2, visited);
}
return true;
}
COM: <s> marks all nodes which belong to partition including node n as visited </s>
|
funcom_train/41401163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean authorise(String userId, String uri, String method) {
boolean isAllowed;
UserRO user = userAdmin_.userById(userId);
if (isRequestForTeamsContent(uri))
isAllowed = authorizeTeamsContent(uri, user);
else if (isRequestForUserManagement(uri))
isAllowed = authorizeUserManagement(uri, user);
else
isAllowed = false;
return isAllowed;
}
COM: <s> simple authorisation implementation </s>
|
funcom_train/2624887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PDimension deltaRequiredToCenter(final Rectangle2D targetBounds) {
final PDimension result = new PDimension();
final double xDelta = getCenterX() - targetBounds.getCenterX();
final double yDelta = getCenterY() - targetBounds.getCenterY();
result.setSize(xDelta, yDelta);
return result;
}
COM: <s> returns the required translation in order for this bounds origin to sit </s>
|
funcom_train/21471719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void forceDispose() {
final AbstractVimEditor vime = this;
Display display= getSite().getShell().getDisplay();
display.asyncExec(new Runnable() {
public void run() {
if (vime != null && !vime.alreadyClosed) {
vime.setDirty(false);
vime.showBusy(true);
vime.close(false);
getSite().getPage().closeEditor(vime, false);
//vime.alreadyClosed = true;
}
}
});
}
COM: <s> this function will be called by vimserver when it gets an event </s>
|
funcom_train/24194415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadErrorHandler() {
errHandler = new ErrorHandler() {
@Override
public void exceptionThrown(Object source, Exception ex, ErrorLevel level) {
switch (level) {
case IGNORE:
break;
case WARNING:
logger.log(Level.WARNING, ex.getMessage(), ex);
break;
case EXCEPTION:
logger.log(Level.SEVERE, ex.getMessage(), ex);
break;
case ERROR:
logger.log(Level.SEVERE, ex.getMessage(), ex);
break;
}
}
};
}
COM: <s> load the error handler </s>
|
funcom_train/50336396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setStartLoopPoint(long startLoopPoint, boolean generateLoopBuffers) {
this._startLoopPoint = startLoopPoint;
if (generateLoopBuffers) generateLoopBuffers(LOOP_POINT_START);
if (log.isDebugEnabled())
log.debug("Set start loop point of Buffer " + this.getSystemName() + " to " + startLoopPoint);
}
COM: <s> internal method used to set the start loop point of this buffer </s>
|
funcom_train/21868810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkTransactionManager() {
System.out.println("checkTransactionManager");
JtaTransactionManager jtaTransactionManager = findJtaTransactionManager();
if( this.transactionManager!=null && this.userTransaction!=null
&& jtaTransactionManager==null ) {
doAddJtaTransactionInterceptor();
} else if( this.transactionManager==null && jtaTransactionManager!=null ) {
doConfigureTransactionEntities(jtaTransactionManager);
}
}
COM: <s> this method configures the jta transaction manager in the class </s>
|
funcom_train/32056913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUpdate() {
System.out.println("testUpdate");
GPGraphpad graphpad = new GPGraphpad();
WindowLogConsole bottom = new WindowLogConsole(graphpad);
ActionEvent action = null;
bottom.update(); // empty implementation
assertTrue( true );
//graphpad.getFrame().dispose();
}
COM: <s> test of update method of class window log console </s>
|
funcom_train/22034863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exportDataSet(Form form) {
String item = (String) FormulaBox.getSelectedItem();
String varName = item.substring(0, item.indexOf(":"));
DisplayCells[CurX][CurY].saveDataDialog(varName, form);
}
COM: <s> exports a data set using the given form </s>
|
funcom_train/29617688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MgisRadioButton getJRadioReplantedYes() {
if (jRadioReplantedYes == null) {
jRadioReplantedYes = new MgisRadioButton();
jRadioReplantedYes.setValue(new Boolean(true));
replantedButtons.add(jRadioReplantedYes);
jRadioReplantedYes.setBounds(119, 320, 95, 19);
jRadioReplantedYes.setText(AppTextsDAO.get("LABEL_YES"));
}
return jRadioReplantedYes;
}
COM: <s> this method initializes j radio replanted yes </s>
|
funcom_train/41956813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String signMethod() {
String str = API.SHARED_SECRET;
Vector<String> v = new Vector<String>(parameters.keySet());
Collections.sort(v);
for (String key : v) {
str += key + parameters.get(key);
}
MessageDigest m = null;
try {
m = MessageDigest.getInstance("MD5");
m.update(str.getBytes(), 0, str.length());
return new BigInteger(1, m.digest()).toString(16);
} catch (NoSuchAlgorithmException e) {
return null;
}
}
COM: <s> signs the method using md5 for the api sig parameter </s>
|
funcom_train/40505068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSelectedDirectory() {
final TreePath selectionPath = resourceTree.getSelectionPath();
if (selectionPath == null) return null;
String path = (String) selectionPath.getLastPathComponent();
if (!path.endsWith("/")) {
path = path.substring(0, path.lastIndexOf('/'));
}
return path;
}
COM: <s> returns the currently selected resource directory </s>
|
funcom_train/3861038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireConsoleEvent(String commandLine) {
// First parse the command
ArrayList cmnds = new ArrayList();
for (ImprovedStringTokenizer st = new ImprovedStringTokenizer(commandLine); st.hasMoreTokens(); )
cmnds.add(st.nextToken());
String[] parsed = new String[cmnds.size()];
cmnds.toArray(parsed);
for (Iterator i = listeners.iterator(); i.hasNext(); )
((ConsoleListener) i.next()).commandEntered(parsed);
}
COM: <s> inform all listeners of a command being entered </s>
|
funcom_train/48494284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ClassLoader setupClassPath(File rootPath) {
ClassLoader classLoader = null;
if (rootPath == null)
return null;
// File path = getPath(rootPath, node);
File path = rootPath;
try {
if (path != null) {
URI uri = path.toURI();
classLoader = new URLClassLoader(new URL[] { uri.toURL() });
}
} catch (Exception e) {
e.printStackTrace();
classLoader = null;
}
return classLoader;
}
COM: <s> returns a class loader for the model </s>
|
funcom_train/50159071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTermFrequency(String term) {
//prtln("getTermFrequency()");
int freq = -1;
List fields = getFields();
if (fields != null) {
if (myReader != null) {
try {
freq = 0;
for (int i = 0; i < fields.size(); i++) {
freq += myReader.docFreq(new Term((String) fields.get(i), term));
}
} catch (Exception e) {}
}
}
return freq;
}
COM: <s> gets the term frequency across all fields in the index </s>
|
funcom_train/624633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAppend() {
LinkedList list = new LinkedList();
LinkedList list2 = new LinkedList();
list.add(new StringInstance("a"));
list2.add(new StringInstance("a"));
list2.add(new StringInstance("b"));
OclSequence seq = new SequenceInstance(Type.AString, list);
OclSequence seq2 = new SequenceInstance(Type.AString, list2);
OclSequence result = seq.append(new StringInstance("b"));
assertTrue(result.equals(seq2));
}
COM: <s> tests the ocl append operation on sequences </s>
|
funcom_train/14519446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPreferedLanguage(String[] languages, String languagecode) {
if(languages != null){
for(int i=0; i < languages.length; i++){
if(languages[i].toUpperCase().equals(languagecode.toUpperCase())) {
data.put(PREFEREDLANGUAGE, new Integer(i));
}
}
}
}
COM: <s> method taking a string needs as input the available languages </s>
|
funcom_train/21320094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void move(long delta) {
// if we're moving left and have reached the left hand side
// of the screen, don't move
if ((dx < 0) && (x < 10)) {
return;
}
// if we're moving right and have reached the right hand side
// of the screen, don't move
if ((dx > 0) && (x > 750)) {
return;
}
super.move(delta);
}
COM: <s> request that the ship move itself based on an elapsed ammount of </s>
|
funcom_train/3356511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void write(CharsetSyntax attribute) throws IOException
{
String name = ((Attribute) attribute).getName();
out.writeByte(IppValueTag.CHARSET);
out.writeShort(name.length());
out.write(name.getBytes());
out.writeShort(attribute.getValue().length());
out.write(attribute.getValue().getBytes());
}
COM: <s> writes an attribute in charset syntax into the stream </s>
|
funcom_train/7351171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Collection createAttrs(int maxAttrs) {
Collection attrs = new LinkedList();
int nAttrs = _rand.nextInt(maxAttrs) + 1;
for (int i = 0; i < nAttrs; ++i) {
AttrVO attr = new AttrVO();
attr.setName(randomString());
attr.setValue(randomString());
attrs.add(attr);
}
return attrs;
}
COM: <s> create a collection of attributes </s>
|
funcom_train/19244058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void test(final Element test) {
try {
if (!CalculateTruth.isTautology(getCurrentContext(), model, test)) {
addWarning(new HeuristicException(HeuristicErrorCodes.EVALUATED_NOT_TRUE_CODE,
HeuristicErrorCodes.EVALUATED_NOT_TRUE_TEXT, getCurrentContext()));
}
} catch (HeuristicException e) {
addWarning(e);
}
}
COM: <s> check truth value in our model </s>
|
funcom_train/181417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void log(String userMessage, Throwable ex) {
// server.log(..);
// eh.error(ex);
Tracer.getInstance().runtimeWarning("Parser-Fehler in Zeile: " + currentLocation.getLineNumber() + "->" +userMessage + (ex == null ? "" : " [" + ex.getMessage() + "]"));
}
COM: <s> use this method to provide an error warning log to the user </s>
|
funcom_train/13960410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object idForPageConfiguration(D2WContext c) {
String _idForPageConfiguration = (c.dynamicPage() != null) ? c.dynamicPage() : c.task() + "_" + c.entity().name();
return ERXStringUtilities.safeIdentifierName(_idForPageConfiguration);
}
COM: <s> a dom id based on the page config </s>
|
funcom_train/23333510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addPlayer(String name) throws DuplicateException{
addIdentifierRecord(name, Player.DEFAULT_URI);
for(int i=0; i<_playerIdentifiers.size();i++){
if((name.compareTo(_playerIdentifiers.get(i).getName()))<=0){
_playerIdentifiers.add(i, new PlayerIdentifier(name, this._lastId, Player.DEFAULT_URI));
return this._lastId;
}
}
_playerIdentifiers.add(new PlayerIdentifier(name, this._lastId, Player.DEFAULT_URI));
return this._lastId;
}
COM: <s> add new player </s>
|
funcom_train/48526906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Constructor getSerializableConstructor(Class c) throws IOException, NoSuchMethodException {
Class initCl = c;
while (Serializable.class.isAssignableFrom(initCl))
initCl = initCl.getSuperclass();
Constructor cons = initCl.getDeclaredConstructor(new Class[0]);
cons = reflFactory.newConstructorForSerialization(c, cons);
cons.setAccessible(true);
return cons;
}
COM: <s> method which returns the serializable constructor for the provided class </s>
|
funcom_train/5377457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Class defineClass(String name, byte[] classbytes, int off, int len, ClasspathEntry classpathEntry) throws ClassFormatError {
if (name != null && name.startsWith("java.")) { //$NON-NLS-1$
// To work around the security issue that prevents any
// other classloader except for the bootstrap classloader
// from loading packages that start with java.
name = null;
}
return defineClass(name, classbytes, off, len, classpathEntry.getProtectionDomain());
}
COM: <s> defines a class for this classloader </s>
|
funcom_train/450381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals (Object object) {
//An object always equals itself.
if (object == this) {return true;}
//If an object isn't part of this class or a subclass, it differs.
if (!(object instanceof Tag)) {return false;}
Tag otherTag = (Tag) object;
//If the tag values differ, the tags differ.
if (! otherTag.value.equals(this.value)) {return false;}
//If no differences were found, the objects are equal.
return true;
}
COM: <s> check for equality to another tag </s>
|
funcom_train/34758640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bypassMoniter(){
moniterBypassed = true;
new Thread(){
public void run(){
try {
Thread.sleep(600000/server.level);
moniterBypassed = false;
} catch (InterruptedException ex) {
Logger.getLogger(SecurityPackage.class.getName()).log(Level.SEVERE, null, ex);
}
}
}.start();
}
COM: <s> if the client has met the requirements bypass the monitor on this </s>
|
funcom_train/37854655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SVNCommitPacket doCollectCommitItems(File[] paths, boolean keepLocks, boolean force, boolean recursive) throws SVNException {
SVNDepth depth = recursive ? SVNDepth.INFINITY : SVNDepth.EMPTY;
return doCollectCommitItems(paths, keepLocks, force, depth, null);
}
COM: <s> collects commit items containing detailed information on each working copy item </s>
|