method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
private void drawMarkingGuide(Graphics2D g2, int x, int y, int length, int width) { Path2D outline = new Path2D.Float(GeneralPath.WIND_EVEN_ODD, 4); outline.moveTo(x, y); outline.lineTo(width + x, y); outline.lineTo(width + x, length + y); outline.lineTo(x, length + y); outline.closePath(); g2.draw(out...
void function(Graphics2D g2, int x, int y, int length, int width) { Path2D outline = new Path2D.Float(GeneralPath.WIND_EVEN_ODD, 4); outline.moveTo(x, y); outline.lineTo(width + x, y); outline.lineTo(width + x, length + y); outline.lineTo(x, length + y); outline.closePath(); g2.draw(outline); int fromEdge = (width) / 4...
/** * Draw the marking guide outline. * * @param g2 the graphics context * @param x the starting x coordinate * @param y the starting y coordinate * @param length the length, or height, in print units of the marking guide; should be equivalent to the outer tube * circumference ...
Draw the marking guide outline
drawMarkingGuide
{ "repo_name": "joebowen/landing_zone_project", "path": "openrocket-release-15.03/swing/src/net/sf/openrocket/gui/print/FinMarkingGuide.java", "license": "gpl-2.0", "size": 17032 }
[ "java.awt.Graphics2D", "java.awt.geom.GeneralPath", "java.awt.geom.Path2D" ]
import java.awt.Graphics2D; import java.awt.geom.GeneralPath; import java.awt.geom.Path2D;
import java.awt.*; import java.awt.geom.*;
[ "java.awt" ]
java.awt;
1,093,421
public void start() throws IOException { // do nothing }
void function() throws IOException { }
/** * Lifecycle method to allow the LoadManager to start any work in separate * threads. */
Lifecycle method to allow the LoadManager to start any work in separate threads
start
{ "repo_name": "leonhong/hadoop-20-warehouse", "path": "src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/LoadManager.java", "license": "apache-2.0", "size": 3250 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
257,557
// FIXME: Should log errors. public void deletePage(String page) throws ProviderException { super.deletePage(page); int pageId = -1; try { PageDetail currentPage = pageDAO.getPage(page, WikiMultiInstanceManager .getComponentId()); if (currentPage != null) { pageId =...
void function(String page) throws ProviderException { super.deletePage(page); int pageId = -1; try { PageDetail currentPage = pageDAO.getPage(page, WikiMultiInstanceManager .getComponentId()); if (currentPage != null) { pageId = currentPage.getId(); pageDAO.deletePage(page, WikiMultiInstanceManager.getComponentId()); }...
/** * Removes the relevant page directory under "OLD" -directory as well, but does not remove any * extra subdirectories from it. It will only touch those files that it thinks to be WikiPages. */
Removes the relevant page directory under "OLD" -directory as well, but does not remove any extra subdirectories from it. It will only touch those files that it thinks to be WikiPages
deletePage
{ "repo_name": "stephaneperry/Silverpeas-Components", "path": "wiki/wiki-jar/src/main/java/com/ecyrd/jspwiki/providers/WikiVersioningFileProvider.java", "license": "agpl-3.0", "size": 26025 }
[ "com.silverpeas.util.ForeignPK", "com.silverpeas.wiki.control.WikiException", "com.silverpeas.wiki.control.WikiMultiInstanceManager", "com.silverpeas.wiki.control.model.PageDetail", "com.stratelia.silverpeas.silvertrace.SilverTrace", "java.io.File" ]
import com.silverpeas.util.ForeignPK; import com.silverpeas.wiki.control.WikiException; import com.silverpeas.wiki.control.WikiMultiInstanceManager; import com.silverpeas.wiki.control.model.PageDetail; import com.stratelia.silverpeas.silvertrace.SilverTrace; import java.io.File;
import com.silverpeas.util.*; import com.silverpeas.wiki.control.*; import com.silverpeas.wiki.control.model.*; import com.stratelia.silverpeas.silvertrace.*; import java.io.*;
[ "com.silverpeas.util", "com.silverpeas.wiki", "com.stratelia.silverpeas", "java.io" ]
com.silverpeas.util; com.silverpeas.wiki; com.stratelia.silverpeas; java.io;
2,845,961
return result -> assertThat("Response status", result.getResponse().getStatus(), matcher); }
return result -> assertThat(STR, result.getResponse().getStatus(), matcher); }
/** * Assert the response status code with the given Hamcrest {@link Matcher}. * Use the {@code StatusResultMatchers.isEqualTo} extension in Kotlin. */
Assert the response status code with the given Hamcrest <code>Matcher</code>. Use the StatusResultMatchers.isEqualTo extension in Kotlin
is
{ "repo_name": "spring-projects/spring-framework", "path": "spring-test/src/main/java/org/springframework/test/web/servlet/result/StatusResultMatchers.java", "license": "apache-2.0", "size": 17758 }
[ "org.hamcrest.MatcherAssert" ]
import org.hamcrest.MatcherAssert;
import org.hamcrest.*;
[ "org.hamcrest" ]
org.hamcrest;
1,832,968
public static HashMap<String, String> queryProviderSettings(ContentResolver cr, long providerId) { HashMap<String, String> settings = new HashMap<String, String>(); String[] projection = { NAME, VALUE }; Cursor c = cr.query(ContentUris.withAppendedId(CONTENT_...
static HashMap<String, String> function(ContentResolver cr, long providerId) { HashMap<String, String> settings = new HashMap<String, String>(); String[] projection = { NAME, VALUE }; Cursor c = cr.query(ContentUris.withAppendedId(CONTENT_URI, providerId), projection, null, null, null); if (c == null) { return null; } ...
/** * Query the settings of the provider specified by id * * @param cr the relative content resolver * @param providerId the specified id of provider * @return a HashMap which contains all the settings for the specified * provider */
Query the settings of the provider specified by id
queryProviderSettings
{ "repo_name": "kden/ChatSecureAndroid", "path": "src/info/guardianproject/otr/app/im/provider/Imps.java", "license": "apache-2.0", "size": 100497 }
[ "android.content.ContentResolver", "android.content.ContentUris", "android.database.Cursor", "java.util.HashMap" ]
import android.content.ContentResolver; import android.content.ContentUris; import android.database.Cursor; import java.util.HashMap;
import android.content.*; import android.database.*; import java.util.*;
[ "android.content", "android.database", "java.util" ]
android.content; android.database; java.util;
1,230,386
public BeanDescriptor getBeanDescriptor() { return new BeanDescriptor(weka.gui.beans.StripChart.class, StripChartCustomizer.class); }
BeanDescriptor function() { return new BeanDescriptor(weka.gui.beans.StripChart.class, StripChartCustomizer.class); }
/** * Get the bean descriptor for this bean * * @return a <code>BeanDescriptor</code> value */
Get the bean descriptor for this bean
getBeanDescriptor
{ "repo_name": "dsibournemouth/autoweka", "path": "weka-3.7.7/src/main/java/weka/gui/beans/StripChartBeanInfo.java", "license": "gpl-3.0", "size": 2228 }
[ "java.beans.BeanDescriptor" ]
import java.beans.BeanDescriptor;
import java.beans.*;
[ "java.beans" ]
java.beans;
1,508,648
public static void addCauseMethodName( String methodName ) { if ( methodName != null && methodName.length() > 0 ) { List list = new ArrayList( Arrays.asList( CAUSE_METHOD_NAMES ) ); list.add( methodName ); CAUSE_METHOD_NAMES = (String[]) list.toArray( new Stri...
static void function( String methodName ) { if ( methodName != null && methodName.length() > 0 ) { List list = new ArrayList( Arrays.asList( CAUSE_METHOD_NAMES ) ); list.add( methodName ); CAUSE_METHOD_NAMES = (String[]) list.toArray( new String[list.size()] ); } }
/** * <p>Adds to the list of method names used in the search for <code>Throwable</code> * objects.</p> * * @param methodName the methodName to add to the list, null and empty strings are ignored */
Adds to the list of method names used in the search for <code>Throwable</code> objects
addCauseMethodName
{ "repo_name": "CCM-Modding/Nucleum-Omnium", "path": "src/main/java/ccm/libs/org/codehaus/plexus/util/ExceptionUtils.java", "license": "mit", "size": 21906 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
594,108
public static PdfObjectTreeNode getInstance(PdfDictionary dict, PdfName key) { PdfObjectTreeNode node = getInstance(dict.get(key)); node.setUserObject(getDictionaryEntryCaption(dict, key)); node.key = key; return node; }
static PdfObjectTreeNode function(PdfDictionary dict, PdfName key) { PdfObjectTreeNode node = getInstance(dict.get(key)); node.setUserObject(getDictionaryEntryCaption(dict, key)); node.key = key; return node; }
/** * Creates an instance of a tree node for the object corresponding with a key in a dictionary. * @param dict the dictionary that is the parent of this tree node. * @param key the dictionary key corresponding with the PDF object in this tree node. * @return a PdfObjectTreeNode */
Creates an instance of a tree node for the object corresponding with a key in a dictionary
getInstance
{ "repo_name": "yogthos/itext", "path": "src/com/lowagie/rups/view/itext/treenodes/PdfObjectTreeNode.java", "license": "lgpl-3.0", "size": 8852 }
[ "com.lowagie.text.pdf.PdfDictionary", "com.lowagie.text.pdf.PdfName" ]
import com.lowagie.text.pdf.PdfDictionary; import com.lowagie.text.pdf.PdfName;
import com.lowagie.text.pdf.*;
[ "com.lowagie.text" ]
com.lowagie.text;
516,546
public void sanitizeCentralDirectory(final GameMap gameMap) { // Reset unused npc offset if ((this.npcOffset != 0) && (gameMap.getNpcs().size() == 0)) { this.npcOffset = 0; } // Reset unused monster names offset if ((this.monsterNamesOffset != 0) ...
void function(final GameMap gameMap) { if ((this.npcOffset != 0) && (gameMap.getNpcs().size() == 0)) { this.npcOffset = 0; } if ((this.monsterNamesOffset != 0) && (gameMap.getMonsters().size() == 0)) { this.monsterNamesOffset = 0; } if ((this.monsterDataOffset != 0) && (gameMap.getMonsters().size() == 0)) { this.monste...
/** * Sanitizes the central directory. This means zeroing all offsets which are * not used or set incorrectly. * * @param gameMap * The game map where the central directory is located in */
Sanitizes the central directory. This means zeroing all offsets which are not used or set incorrectly
sanitizeCentralDirectory
{ "repo_name": "kayahr/wlandsuite", "path": "src/main/java/de/ailis/wlandsuite/game/parts/CentralDirectory.java", "license": "mit", "size": 13352 }
[ "de.ailis.wlandsuite.common.exceptions.GameException", "de.ailis.wlandsuite.game.blocks.GameMap", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import de.ailis.wlandsuite.common.exceptions.GameException; import de.ailis.wlandsuite.game.blocks.GameMap; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;
import de.ailis.wlandsuite.common.exceptions.*; import de.ailis.wlandsuite.game.blocks.*; import java.util.*;
[ "de.ailis.wlandsuite", "java.util" ]
de.ailis.wlandsuite; java.util;
136,691
public static boolean CAN_READ_FROM_AUTH(OAuth2Authentication auth) { boolean canRead = false; Set<String> scope = auth.getOAuth2Request().getScope(); if(scope.contains("read")) { canRead = true; } return canRead; }
static boolean function(OAuth2Authentication auth) { boolean canRead = false; Set<String> scope = auth.getOAuth2Request().getScope(); if(scope.contains("read")) { canRead = true; } return canRead; }
/** * Checks the scope of the authentication session to see if it has READ access. * * @param auth - The authentication object to check. * @return If the authentication object has read access. */
Checks the scope of the authentication session to see if it has READ access
CAN_READ_FROM_AUTH
{ "repo_name": "itzamnamx/naranjadulce", "path": "src/main/java/components/AuthHelper.java", "license": "gpl-2.0", "size": 2204 }
[ "java.util.Set", "org.springframework.security.oauth2.provider.OAuth2Authentication" ]
import java.util.Set; import org.springframework.security.oauth2.provider.OAuth2Authentication;
import java.util.*; import org.springframework.security.oauth2.provider.*;
[ "java.util", "org.springframework.security" ]
java.util; org.springframework.security;
108,677
public FindOperation<T> allowDiskUse(@Nullable final Boolean allowDiskUse) { this.allowDiskUse = allowDiskUse; return this; }
FindOperation<T> function(@Nullable final Boolean allowDiskUse) { this.allowDiskUse = allowDiskUse; return this; }
/** * Enables writing to temporary files on the server. When set to true, the server * can write temporary data to disk while executing the find operation. * * <p>This option is sent only if the caller explicitly sets it to true.</p> * * @param allowDiskUse the allowDiskUse * @return ...
Enables writing to temporary files on the server. When set to true, the server can write temporary data to disk while executing the find operation. This option is sent only if the caller explicitly sets it to true
allowDiskUse
{ "repo_name": "jyemin/mongo-java-driver", "path": "driver-core/src/main/com/mongodb/internal/operation/FindOperation.java", "license": "apache-2.0", "size": 35951 }
[ "com.mongodb.lang.Nullable" ]
import com.mongodb.lang.Nullable;
import com.mongodb.lang.*;
[ "com.mongodb.lang" ]
com.mongodb.lang;
1,984,486
@POST @Path("job/{noteId}") @ZeppelinApi public Response runNoteJobs(@PathParam("noteId") String noteId) throws IOException, IllegalArgumentException { LOG.info("run note jobs {} ", noteId); Note note = notebook.getNote(noteId); AuthenticationInfo subject = new AuthenticationInfo(SecurityUtils...
@Path(STR) Response function(@PathParam(STR) String noteId) throws IOException, IllegalArgumentException { LOG.info(STR, noteId); Note note = notebook.getNote(noteId); AuthenticationInfo subject = new AuthenticationInfo(SecurityUtils.getPrincipal()); checkIfNoteIsNotNull(note); checkIfUserCanWrite(noteId, STR); try { n...
/** * Run note jobs REST API * * @param noteId ID of Note * @return JSON with status.OK * @throws IOException, IllegalArgumentException */
Run note jobs REST API
runNoteJobs
{ "repo_name": "AlienYvonne/SSM", "path": "smart-zeppelin/zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRestApi.java", "license": "apache-2.0", "size": 33929 }
[ "java.io.IOException", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.core.Response", "org.apache.zeppelin.notebook.Note", "org.apache.zeppelin.server.JsonResponse", "org.apache.zeppelin.user.AuthenticationInfo", "org.apache.zeppelin.utils.SecurityUtils" ]
import java.io.IOException; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.Response; import org.apache.zeppelin.notebook.Note; import org.apache.zeppelin.server.JsonResponse; import org.apache.zeppelin.user.AuthenticationInfo; import org.apache.zeppelin.utils.SecurityUtils;
import java.io.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.zeppelin.notebook.*; import org.apache.zeppelin.server.*; import org.apache.zeppelin.user.*; import org.apache.zeppelin.utils.*;
[ "java.io", "javax.ws", "org.apache.zeppelin" ]
java.io; javax.ws; org.apache.zeppelin;
2,056,007
public void parseMessages() { for (Element messageElement : rootElement.elements("message")) { String id = messageElement.attribute("id"); String name = messageElement.attribute("name"); MessageDefinition messageDefinition = new MessageDefinition(this.targetNamespace + ":" + id, name); th...
void function() { for (Element messageElement : rootElement.elements(STR)) { String id = messageElement.attribute("id"); String name = messageElement.attribute("name"); MessageDefinition messageDefinition = new MessageDefinition(this.targetNamespace + ":" + id, name); this.messages.put(messageDefinition.getId(), messag...
/** * Parses the messages of the given definitions file. Messages are not * contained within a process element, but they can be referenced from inner * process elements. */
Parses the messages of the given definitions file. Messages are not contained within a process element, but they can be referenced from inner process elements
parseMessages
{ "repo_name": "rainerh/camunda-bpm-platform", "path": "engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java", "license": "apache-2.0", "size": 165596 }
[ "org.camunda.bpm.engine.impl.util.xml.Element" ]
import org.camunda.bpm.engine.impl.util.xml.Element;
import org.camunda.bpm.engine.impl.util.xml.*;
[ "org.camunda.bpm" ]
org.camunda.bpm;
1,948,422
public void tableFNT(ArrayAccess arrayAccess, int[] wTable, int[] permutationTable) throws ApfloatRuntimeException { int nn, offset, istep, mmax, r; int[] data; data = arrayAccess.getIntData(); offset = arrayAccess.getOffset(); nn = arrayAccess.getLength();...
void function(ArrayAccess arrayAccess, int[] wTable, int[] permutationTable) throws ApfloatRuntimeException { int nn, offset, istep, mmax, r; int[] data; data = arrayAccess.getIntData(); offset = arrayAccess.getOffset(); nn = arrayAccess.getLength(); assert (nn == (nn & -nn)); if (nn < 2) { return; } r = 1; mmax = nn >...
/** * Forward (Sande-Tukey) fast Number Theoretic Transform. * Data length must be a power of two. * * @param arrayAccess The data array to transform. * @param wTable Table of powers of n:th root of unity <code>w</code> modulo the current modulus. * @param permutationTable Table of permuta...
Forward (Sande-Tukey) fast Number Theoretic Transform. Data length must be a power of two
tableFNT
{ "repo_name": "natis1/void-Plague", "path": "src/org/apfloat/internal/IntTableFNT.java", "license": "gpl-3.0", "size": 4275 }
[ "org.apfloat.ApfloatRuntimeException", "org.apfloat.spi.ArrayAccess" ]
import org.apfloat.ApfloatRuntimeException; import org.apfloat.spi.ArrayAccess;
import org.apfloat.*; import org.apfloat.spi.*;
[ "org.apfloat", "org.apfloat.spi" ]
org.apfloat; org.apfloat.spi;
2,494,016
private boolean multipleElementsInSpan(JCas jcas, int begin, int end) { // JFSIndexRepository indexes = jcas.getJFSIndexRepository(); Iterator neItr = null; // Iterator neItr= indexes.getAnnotationIndex(elementType).iterator(); int numElements = 0; neItr = FSUtil.getAnnotationsIteratorInSpan(jcas, Stre...
boolean function(JCas jcas, int begin, int end) { Iterator neItr = null; int numElements = 0; neItr = FSUtil.getAnnotationsIteratorInSpan(jcas, StrengthAnnotation.type, begin, end); while (neItr.hasNext()) { StrengthAnnotation nea = (StrengthAnnotation) neItr.next(); numElements++; } neItr = FSUtil.getAnnotationsIterat...
/** * Return true if exists more than one drug and reason within the span, * otherwise return false * * @param jcas * @param begin * @param end * @return */
Return true if exists more than one drug and reason within the span, otherwise return false
multipleElementsInSpan
{ "repo_name": "TCU-MI/ctakes", "path": "ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java", "license": "apache-2.0", "size": 144951 }
[ "java.util.Iterator", "org.apache.ctakes.core.util.FSUtil", "org.apache.ctakes.drugner.type.DosagesAnnotation", "org.apache.ctakes.drugner.type.DrugChangeStatusAnnotation", "org.apache.ctakes.drugner.type.DurationAnnotation", "org.apache.ctakes.drugner.type.FormAnnotation", "org.apache.ctakes.drugner.ty...
import java.util.Iterator; import org.apache.ctakes.core.util.FSUtil; import org.apache.ctakes.drugner.type.DosagesAnnotation; import org.apache.ctakes.drugner.type.DrugChangeStatusAnnotation; import org.apache.ctakes.drugner.type.DurationAnnotation; import org.apache.ctakes.drugner.type.FormAnnotation; import org.apac...
import java.util.*; import org.apache.ctakes.core.util.*; import org.apache.ctakes.drugner.type.*; import org.apache.uima.jcas.*;
[ "java.util", "org.apache.ctakes", "org.apache.uima" ]
java.util; org.apache.ctakes; org.apache.uima;
1,825,397
public JField []getDeclaredFields() { ArrayList<JavaField> fieldList = getFieldList(); JField[] fields = new JField[fieldList.size()]; fieldList.toArray(fields); return fields; }
public JField []getDeclaredFields() { ArrayList<JavaField> fieldList = getFieldList(); JField[] fields = new JField[fieldList.size()]; fieldList.toArray(fields); return fields; }
/** * Returns the array of declared fields. */
Returns the array of declared fields
getDeclaredFields
{ "repo_name": "CleverCloud/Quercus", "path": "resin/src/main/java/com/caucho/bytecode/JavaClass.java", "license": "gpl-2.0", "size": 16398 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
755,303
public JComponent getComponent(); /** * {@code JLightweightFrame} calls this method to notify the client * application that it acquires the paint lock. The client application * should implement the locking mechanism in order to synchronize access * to the content image data, shared between ...
JComponent function(); /** * {@code JLightweightFrame} calls this method to notify the client * application that it acquires the paint lock. The client application * should implement the locking mechanism in order to synchronize access * to the content image data, shared between {@code JLightweightFrame}
/** * The client application overrides this method to return the {@code * JComponent} instance which the {@code JLightweightFrame} container * will paint as its lightweight content. A hierarchy of components * contained in this component should not contain any heavyweight objects. * * @ret...
The client application overrides this method to return the JComponent instance which the JLightweightFrame container will paint as its lightweight content. A hierarchy of components contained in this component should not contain any heavyweight objects
getComponent
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jdk/src/share/classes/sun/swing/LightweightContent.java", "license": "mit", "size": 7874 }
[ "javax.swing.JComponent" ]
import javax.swing.JComponent;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,312,705
public static String getProperty(String key) { // XXX To prevent infinite recursion when the SecurityManager calls us, // don't do a security check if the caller is trusted (by virtue of having // been loaded by the bootstrap class loader). SecurityManager sm = System.getSecurityManager(); if (s...
static String function(String key) { SecurityManager sm = System.getSecurityManager(); if (sm != null && VMStackWalker.getCallingClassLoader() != null) sm.checkSecurityAccess(STR + key); return secprops.getProperty(key); }
/** * Returns the value associated with a Security propery. * * @param key * the key of the property to fetch. * @return the value of the Security property associated with * <code>key</code>. Returns <code>null</code> if no such property * was found. * @throws SecurityE...
Returns the value associated with a Security propery
getProperty
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/java/security/Security.java", "license": "bsd-3-clause", "size": 25192 }
[ "gnu.classpath.VMStackWalker" ]
import gnu.classpath.VMStackWalker;
import gnu.classpath.*;
[ "gnu.classpath" ]
gnu.classpath;
1,136,304
if (msg == null) { throw new IllegalArgumentException("Input string can not be null"); } MessageDigest m = MessageDigest.getInstance("MD5"); m.reset(); m.update(msg.getBytes()); byte[] digest = m.digest(); BigInteger bigInt = new BigInteger(1, dig...
if (msg == null) { throw new IllegalArgumentException(STR); } MessageDigest m = MessageDigest.getInstance("MD5"); m.reset(); m.update(msg.getBytes()); byte[] digest = m.digest(); BigInteger bigInt = new BigInteger(1, digest); String hashText = bigInt.toString(16); while (hashText.length() < 32) { hashText = "0" + hashT...
/** * Generate md5 hash from a given string * * @param msg input string * @return String md5 hash * @throws java.security.NoSuchAlgorithmException * java.security.NoSuchAlgorithmException */
Generate md5 hash from a given string
generateHash
{ "repo_name": "PRIDE-Utilities/ms-data-core-api", "path": "src/main/java/uk/ac/ebi/pride/utilities/data/utils/MD5Utils.java", "license": "apache-2.0", "size": 1386 }
[ "java.math.BigInteger", "java.security.MessageDigest" ]
import java.math.BigInteger; import java.security.MessageDigest;
import java.math.*; import java.security.*;
[ "java.math", "java.security" ]
java.math; java.security;
2,064,208
protected void setPoints(PointValuePair[] points) { if (points.length != simplex.length) { throw new DimensionMismatchException(points.length, simplex.length); } simplex = points; }
void function(PointValuePair[] points) { if (points.length != simplex.length) { throw new DimensionMismatchException(points.length, simplex.length); } simplex = points; }
/** * Replace all points. * Note that no deep-copy of {@code points} is performed. * * @param points New Points. */
Replace all points. Note that no deep-copy of points is performed
setPoints
{ "repo_name": "happyjack27/autoredistrict", "path": "src/org/apache/commons/math3/optimization/direct/AbstractSimplex.java", "license": "gpl-3.0", "size": 13020 }
[ "org.apache.commons.math3.exception.DimensionMismatchException", "org.apache.commons.math3.optimization.PointValuePair" ]
import org.apache.commons.math3.exception.DimensionMismatchException; import org.apache.commons.math3.optimization.PointValuePair;
import org.apache.commons.math3.exception.*; import org.apache.commons.math3.optimization.*;
[ "org.apache.commons" ]
org.apache.commons;
1,239,859
public final SearchService getSearchService() { return m_searchService; }
final SearchService function() { return m_searchService; }
/** * Return the search service * * @return SearchService */
Return the search service
getSearchService
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/filesys/AlfrescoConfigSection.java", "license": "lgpl-3.0", "size": 5255 }
[ "org.alfresco.service.cmr.search.SearchService" ]
import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.cmr.search.*;
[ "org.alfresco.service" ]
org.alfresco.service;
593,792
public Vector3f getWalkDirection() { return walkDirection; }
Vector3f function() { return walkDirection; }
/** * Read the walk velocity. The length of the vector defines the speed. * * @return the pre-existing vector (not null) */
Read the walk velocity. The length of the vector defines the speed
getWalkDirection
{ "repo_name": "zzuegg/jmonkeyengine", "path": "jme3-bullet/src/common/java/com/jme3/bullet/control/BetterCharacterControl.java", "license": "bsd-3-clause", "size": 26477 }
[ "com.jme3.math.Vector3f" ]
import com.jme3.math.Vector3f;
import com.jme3.math.*;
[ "com.jme3.math" ]
com.jme3.math;
1,505,694
EClass getDomainQuery();
EClass getDomainQuery();
/** * Returns the meta object for class '{@link com.b2international.snowowl.snomed.ql.ql.DomainQuery <em>Domain Query</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Domain Query</em>'. * @see com.b2international.snowowl.snomed.ql.ql.DomainQuery * @ge...
Returns the meta object for class '<code>com.b2international.snowowl.snomed.ql.ql.DomainQuery Domain Query</code>'.
getDomainQuery
{ "repo_name": "IHTSDO/snow-owl", "path": "snomed/com.b2international.snowowl.snomed.ql/src-gen/com/b2international/snowowl/snomed/ql/ql/QlPackage.java", "license": "apache-2.0", "size": 67451 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,304,028
private int getIndex(Element rowEl, int index) { return rowEl.hasAttribute(INDEX_TAG) ? Integer.valueOf(rowEl.getAttribute(INDEX_TAG)) : index + 1; }
int function(Element rowEl, int index) { return rowEl.hasAttribute(INDEX_TAG) ? Integer.valueOf(rowEl.getAttribute(INDEX_TAG)) : index + 1; }
/** * If the Element has not index specified, it means it's juste one after the * previous. If it has an index, it's the absolute index relative to the * first index of the first row. * * @param rowEl * @param index * @return */
If the Element has not index specified, it means it's juste one after the previous. If it has an index, it's the absolute index relative to the first index of the first row
getIndex
{ "repo_name": "Maxoudela/XMLSpreadsheetParser", "path": "XMLSpreadsheetParser/src/main/java/com/github/maxoudela/xmlspreadsheetparser/ClipBoardXML.java", "license": "mit", "size": 11218 }
[ "org.w3c.dom.Element" ]
import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
45,906
private void freeSpace(final String why) { // Ensure only one freeSpace progress at a time if (!freeSpaceLock.tryLock()) { return; } try { freeInProgress = true; long bytesToFreeWithoutExtra = 0; // Calculate free byte for each bucketSizeinfo StringBuffer msgBuffer = LOG....
void function(final String why) { if (!freeSpaceLock.tryLock()) { return; } try { freeInProgress = true; long bytesToFreeWithoutExtra = 0; StringBuffer msgBuffer = LOG.isDebugEnabled()? new StringBuffer(): null; BucketAllocator.IndexStatistics[] stats = bucketAllocator.getIndexStatistics(); long[] bytesToFreeForBucket ...
/** * Free the space if the used size reaches acceptableSize() or one size block * couldn't be allocated. When freeing the space, we use the LRU algorithm and * ensure there must be some blocks evicted * @param why Why we are being called */
Free the space if the used size reaches acceptableSize() or one size block couldn't be allocated. When freeing the space, we use the LRU algorithm and ensure there must be some blocks evicted
freeSpace
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java", "license": "apache-2.0", "size": 55331 }
[ "java.util.Map", "java.util.PriorityQueue", "java.util.concurrent.BlockingQueue", "org.apache.hadoop.hbase.io.hfile.BlockCacheKey", "org.apache.hadoop.hbase.util.HasThread", "org.apache.hadoop.util.StringUtils" ]
import java.util.Map; import java.util.PriorityQueue; import java.util.concurrent.BlockingQueue; import org.apache.hadoop.hbase.io.hfile.BlockCacheKey; import org.apache.hadoop.hbase.util.HasThread; import org.apache.hadoop.util.StringUtils;
import java.util.*; import java.util.concurrent.*; import org.apache.hadoop.hbase.io.hfile.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.util.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
8,582
public void insertText(String txtLines) { try { drone.executeJavaScript(String.format("tinyMCE.activeEditor.setContent('%s');", txtLines)); drone.switchToFrame(TOPIC_FORMAT_IFRAME); WebElement element = drone.findAndWait(By.cssSelector("#tiny...
void function(String txtLines) { try { drone.executeJavaScript(String.format(STR, txtLines)); drone.switchToFrame(TOPIC_FORMAT_IFRAME); WebElement element = drone.findAndWait(By.cssSelector(STR)); if (!element.getText().isEmpty()) { element.sendKeys(txtLines); } drone.switchToDefaultContent(); } catch (TimeoutException...
/** * Insert text in topic text area. * * @param txtLines */
Insert text in topic text area
insertText
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/share-po/src/main/java/org/alfresco/po/share/site/discussions/AbstractTopicForm.java", "license": "lgpl-3.0", "size": 6076 }
[ "org.openqa.selenium.By", "org.openqa.selenium.TimeoutException", "org.openqa.selenium.WebElement" ]
import org.openqa.selenium.By; import org.openqa.selenium.TimeoutException; import org.openqa.selenium.WebElement;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
1,876,213
void check(Map<PathFragment, Artifact> map, RunfilesPath runfilesPath, Artifact artifact) { PathFragment path = runfilesPath.getPath(); if (policy != ConflictPolicy.IGNORE && map.containsKey(path)) { // Previous and new entry might have value of null Artifact previous = map.get(path); ...
void check(Map<PathFragment, Artifact> map, RunfilesPath runfilesPath, Artifact artifact) { PathFragment path = runfilesPath.getPath(); if (policy != ConflictPolicy.IGNORE && map.containsKey(path)) { Artifact previous = map.get(path); if (!Objects.equals(previous, artifact)) { String previousStr = (previous == null) ? ...
/** * Add an entry to a Map of symlinks, optionally reporting conflicts. * * @param runfilesPath Path relative to the .runfiles directory, used as key in map. * @param artifact Artifact to store in map. This may be null to indicate an empty file. */
Add an entry to a Map of symlinks, optionally reporting conflicts
check
{ "repo_name": "whuwxl/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java", "license": "apache-2.0", "size": 43416 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder", "com.google.devtools.build.lib.events.Event", "com.google.devtools.build.lib.vfs.PathFragment", "java.util.Map", "java.util.Objects" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder; import com.google.devtools.build.lib.events.Event; import com.google.devtools.build.lib.vfs.PathFragment; import java.util.Map; import java.util.Objects;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.collect.nestedset.*; import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.vfs.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
611,247
@Test public void hasPreviousEmptySubList() { final ListIterator<SourceLocation> iterator = SOURCE_LOCATION_LIST.subList(1, 1).listIterator(); assertThat(iterator.hasPrevious(), is(false)); }
void function() { final ListIterator<SourceLocation> iterator = SOURCE_LOCATION_LIST.subList(1, 1).listIterator(); assertThat(iterator.hasPrevious(), is(false)); }
/** * Asserts that {@link SourceLocationList.Itr#hasPrevious()} returns <code>false</code> when there are no elements in the * sublist. */
Asserts that <code>SourceLocationList.Itr#hasPrevious()</code> returns <code>false</code> when there are no elements in the sublist
hasPreviousEmptySubList
{ "repo_name": "reasm/reasm-core", "path": "src/test/java/org/reasm/source/SourceLocationListItrTest.java", "license": "mit", "size": 9273 }
[ "java.util.ListIterator", "org.hamcrest.Matchers", "org.junit.Assert" ]
import java.util.ListIterator; import org.hamcrest.Matchers; import org.junit.Assert;
import java.util.*; import org.hamcrest.*; import org.junit.*;
[ "java.util", "org.hamcrest", "org.junit" ]
java.util; org.hamcrest; org.junit;
830,778
public SubPlan getOwner(Operator copy) { Mapping mapping = copyMap.get(copy); if (mapping == null) { if (sourceMap.containsKey(copy)) { throw new IllegalArgumentException(MessageFormat.format( "the specified operator must be a copy (it seems source...
SubPlan function(Operator copy) { Mapping mapping = copyMap.get(copy); if (mapping == null) { if (sourceMap.containsKey(copy)) { throw new IllegalArgumentException(MessageFormat.format( STR, copy)); } return null; } return mapping.owner; }
/** * Returns a sub-plan which contains the target operator. * The operator must be a copy, and must not be a source operator. * @param copy a copy of operator which appears in the sub-plan * @return the owner sub-plan, or {@code null} if the sub-plan is not found * @see #getCopies(Operator) ...
Returns a sub-plan which contains the target operator. The operator must be a copy, and must not be a source operator
getOwner
{ "repo_name": "ashigeru/asakusafw-compiler", "path": "compiler-project/plan/src/main/java/com/asakusafw/lang/compiler/planning/PlanDetail.java", "license": "apache-2.0", "size": 7245 }
[ "com.asakusafw.lang.compiler.model.graph.Operator", "java.text.MessageFormat" ]
import com.asakusafw.lang.compiler.model.graph.Operator; import java.text.MessageFormat;
import com.asakusafw.lang.compiler.model.graph.*; import java.text.*;
[ "com.asakusafw.lang", "java.text" ]
com.asakusafw.lang; java.text;
1,174,932
@Override public void close() { if (tempFileLocation != null && tempFileLocation.exists()) { LOGGER.debug("Attempting to delete temporary files"); final boolean success = FileUtils.delete(tempFileLocation); if (!success) { LOGGER.warn("Failed to delete...
void function() { if (tempFileLocation != null && tempFileLocation.exists()) { LOGGER.debug(STR); final boolean success = FileUtils.delete(tempFileLocation); if (!success) { LOGGER.warn(STR); } } }
/** * Deletes any files extracted from the JAR during analysis. */
Deletes any files extracted from the JAR during analysis
close
{ "repo_name": "sirkkalap/DependencyCheck", "path": "dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/JarAnalyzer.java", "license": "apache-2.0", "size": 51579 }
[ "org.owasp.dependencycheck.utils.FileUtils" ]
import org.owasp.dependencycheck.utils.FileUtils;
import org.owasp.dependencycheck.utils.*;
[ "org.owasp.dependencycheck" ]
org.owasp.dependencycheck;
148,581
public final Property<String> passwordRaw() { return metaBean().passwordRaw().createProperty(this); }
final Property<String> function() { return metaBean().passwordRaw().createProperty(this); }
/** * Gets the the {@code passwordRaw} property. * @return the property, not null */
Gets the the passwordRaw property
passwordRaw
{ "repo_name": "McLeodMoores/starling", "path": "projects/master/src/main/java/com/opengamma/master/user/UserForm.java", "license": "apache-2.0", "size": 32861 }
[ "org.joda.beans.Property" ]
import org.joda.beans.Property;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
796,657
public Builder putAllExtraParam(Map<String, Object> map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; }
Builder function(Map<String, Object> map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; }
/** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link * PaymentIntentUpdateParams.PaymentMethodData.BillingDetails.Address#extraPara...
Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See <code>PaymentIntentUpdateParams.PaymentMethodData.BillingDetails.Address#extraParams</code> for the field documentation
putAllExtraParam
{ "repo_name": "stripe/stripe-java", "path": "src/main/java/com/stripe/param/PaymentIntentUpdateParams.java", "license": "mit", "size": 323121 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
495,711
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<StorageAccountInner> getByResourceGroupAsync(String resourceGroupName, String accountName) { final StorageAccountExpand expand = null; return getByResourceGroupWithResponseAsync(resourceGroupName, accountName, expand) .flatMap( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<StorageAccountInner> function(String resourceGroupName, String accountName) { final StorageAccountExpand expand = null; return getByResourceGroupWithResponseAsync(resourceGroupName, accountName, expand) .flatMap( (Response<StorageAccountInner> res) -> { if (res.getValue(...
/** * Returns the properties for the specified storage account including but not limited to name, SKU name, location, * and account status. The ListKeys operation should be used to retrieve storage keys. * * @param resourceGroupName The name of the resource group within the user's subscription. The ...
Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys
getByResourceGroupAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountsClientImpl.java", "license": "mit", "size": 168198 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.resourcemanager.storage.fluent.models.StorageAccountInner", "com.azure.resourcemanager.storage.models.StorageAccountExpand" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.storage.fluent.models.StorageAccountInner; import com.azure.resourcemanager.storage.models.StorageAccountExpand;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.storage.fluent.models.*; import com.azure.resourcemanager.storage.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,805,409
public CPSubsystemConfig setMissingCPMemberAutoRemovalSeconds(int missingCPMemberAutoRemovalSeconds) { checkTrue(missingCPMemberAutoRemovalSeconds >= 0, "missing cp member auto-removal seconds must be non-negative"); this.missingCPMemberAutoRemovalSeconds = missingCPMemberAutoRemovalSeconds; ...
CPSubsystemConfig function(int missingCPMemberAutoRemovalSeconds) { checkTrue(missingCPMemberAutoRemovalSeconds >= 0, STR); this.missingCPMemberAutoRemovalSeconds = missingCPMemberAutoRemovalSeconds; return this; }
/** * Sets the duration to wait before automatically removing a missing * CP member from CP Subsystem. * * @return this config instance */
Sets the duration to wait before automatically removing a missing CP member from CP Subsystem
setMissingCPMemberAutoRemovalSeconds
{ "repo_name": "mdogan/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/config/cp/CPSubsystemConfig.java", "license": "apache-2.0", "size": 27302 }
[ "com.hazelcast.internal.util.Preconditions" ]
import com.hazelcast.internal.util.Preconditions;
import com.hazelcast.internal.util.*;
[ "com.hazelcast.internal" ]
com.hazelcast.internal;
982,295
public Map<String, String> getPayload();
Map<String, String> function();
/** * Get the payload for this activity. * * @return the payload; may be null */
Get the payload for this activity
getPayload
{ "repo_name": "weebl2000/modeshape", "path": "modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/monitor/DurationActivity.java", "license": "apache-2.0", "size": 1371 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,376,248
return idRef; } /** * Sets the value of the idRef property. * * @param value * allowed object is * {@link IDRef }
return idRef; } /** * Sets the value of the idRef property. * * @param value * allowed object is * {@link IDRef }
/** * Gets the value of the idRef property. * * @return * possible object is * {@link IDRef } * */
Gets the value of the idRef property
getIDRef
{ "repo_name": "DSRCorporation/imf-conversion", "path": "imf-essence-descriptors/src/main/java/ch/ebu/ebucore/smpte/class13/type/IDRefStrongReference.java", "license": "gpl-3.0", "size": 1877 }
[ "ch.ebu.ebucore.smpte.class13.group.IDRef" ]
import ch.ebu.ebucore.smpte.class13.group.IDRef;
import ch.ebu.ebucore.smpte.class13.group.*;
[ "ch.ebu.ebucore" ]
ch.ebu.ebucore;
1,713,160
private List<Integer> getSortOrders(List<Order> tabSortCols, List<FieldSchema> tabCols) { List<Integer> sortOrders = Lists.newArrayList(); for (Order sortCol : tabSortCols) { for (FieldSchema tabCol : tabCols) { if (sortCol.getCol().equals(tabCol.getName())) { sortO...
List<Integer> function(List<Order> tabSortCols, List<FieldSchema> tabCols) { List<Integer> sortOrders = Lists.newArrayList(); for (Order sortCol : tabSortCols) { for (FieldSchema tabCol : tabCols) { if (sortCol.getCol().equals(tabCol.getName())) { sortOrders.add(sortCol.getOrder()); break; } } } return sortOrders; }
/** * Get the sort order for the sort columns. * * @param tabSortCols * @param tabCols * @return */
Get the sort order for the sort columns
getSortOrders
{ "repo_name": "alanfgates/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java", "license": "apache-2.0", "size": 31503 }
[ "com.google.common.collect.Lists", "java.util.List", "org.apache.hadoop.hive.metastore.api.FieldSchema", "org.apache.hadoop.hive.metastore.api.Order" ]
import com.google.common.collect.Lists; import java.util.List; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Order;
import com.google.common.collect.*; import java.util.*; import org.apache.hadoop.hive.metastore.api.*;
[ "com.google.common", "java.util", "org.apache.hadoop" ]
com.google.common; java.util; org.apache.hadoop;
1,016,885
public synchronized void removeChangeListener(ChangeListener l) { if (changeListeners != null && changeListeners.contains(l)) { Vector v = (Vector) changeListeners.clone(); v.removeElement(l); changeListeners = v; } }
synchronized void function(ChangeListener l) { if (changeListeners != null && changeListeners.contains(l)) { Vector v = (Vector) changeListeners.clone(); v.removeElement(l); changeListeners = v; } }
/** * Remove changelistener. * @param l changelistener */
Remove changelistener
removeChangeListener
{ "repo_name": "MaxwellM/ncBrowse-revamp-CAPSTONE", "path": "src/ncBrowse/sgt/beans/DataGroup.java", "license": "gpl-3.0", "size": 12405 }
[ "java.util.Vector", "javax.swing.event.ChangeListener" ]
import java.util.Vector; import javax.swing.event.ChangeListener;
import java.util.*; import javax.swing.event.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
2,683,996
public Observable<ServiceResponse<Page<RedisResourceInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); }
Observable<ServiceResponse<Page<RedisResourceInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); }
/** * Gets all redis caches in a resource group. * ServiceResponse<PageImpl<RedisResourceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList&lt;RedisResourceInner&gt; object wrapped in {@link ServiceResponse} if successful. */
Gets all redis caches in a resource group
listByResourceGroupNextSinglePageAsync
{ "repo_name": "herveyw/azure-sdk-for-java", "path": "azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisInner.java", "license": "mit", "size": 90834 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
1,304,920
//------------------------- AUTOGENERATED START ------------------------- ///CLOVER:OFF public static SimpleChooserPayoffStyle.Meta meta() { return SimpleChooserPayoffStyle.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(SimpleChooserPayoffStyle.Meta.INSTANCE); }
static SimpleChooserPayoffStyle.Meta function() { return SimpleChooserPayoffStyle.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(SimpleChooserPayoffStyle.Meta.INSTANCE); }
/** * The meta-bean for {@code SimpleChooserPayoffStyle}. * @return the meta-bean, not null */
The meta-bean for SimpleChooserPayoffStyle
meta
{ "repo_name": "McLeodMoores/starling", "path": "projects/financial-types/src/main/java/com/opengamma/financial/security/option/SimpleChooserPayoffStyle.java", "license": "apache-2.0", "size": 11134 }
[ "org.joda.beans.JodaBeanUtils" ]
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
1,990,748
private static boolean isCategory(Element unit) { Element properties = unit.getChild(PROPERTIES_VARIABLE); if (properties != null) { for (Iterator<?> iterator = properties.getChildren(PROPERTY_VARIABLE).iterator(); iterator.hasNext();) { Element property = (Element) iterator.next(); if (CATEGORY_TYPE....
static boolean function(Element unit) { Element properties = unit.getChild(PROPERTIES_VARIABLE); if (properties != null) { for (Iterator<?> iterator = properties.getChildren(PROPERTY_VARIABLE).iterator(); iterator.hasNext();) { Element property = (Element) iterator.next(); if (CATEGORY_TYPE.equals(property.getAttribute...
/** * returns true is the unit passed as parameter is an XML element for a p2 category * * @param unit * @return */
returns true is the unit passed as parameter is an XML element for a p2 category
isCategory
{ "repo_name": "awltech/eclipse-p2repo-index", "path": "src/main/java/com/worldline/mojo/p2repoindex/locators/UpdateSiteDescriptorReader.java", "license": "lgpl-3.0", "size": 15046 }
[ "java.util.Iterator", "org.jdom.Element" ]
import java.util.Iterator; import org.jdom.Element;
import java.util.*; import org.jdom.*;
[ "java.util", "org.jdom" ]
java.util; org.jdom;
476,281
private void putHeader(byte[] dest, int offset, int onDiskSize, int uncompressedSize, int onDiskDataSize) { offset = blockType.put(dest, offset); offset = Bytes.putInt(dest, offset, onDiskSize - HConstants.HFILEBLOCK_HEADER_SIZE); offset = Bytes.putInt(dest, offset, uncompressedSize - HCon...
void function(byte[] dest, int offset, int onDiskSize, int uncompressedSize, int onDiskDataSize) { offset = blockType.put(dest, offset); offset = Bytes.putInt(dest, offset, onDiskSize - HConstants.HFILEBLOCK_HEADER_SIZE); offset = Bytes.putInt(dest, offset, uncompressedSize - HConstants.HFILEBLOCK_HEADER_SIZE); offset ...
/** * Put the header into the given byte array at the given offset. * @param onDiskSize size of the block on disk header + data + checksum * @param uncompressedSize size of the block after decompression (but * before optional data block decoding) including header * @param onDiskDataSiz...
Put the header into the given byte array at the given offset
putHeader
{ "repo_name": "francisliu/hbase_namespace", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java", "license": "apache-2.0", "size": 69958 }
[ "org.apache.hadoop.hbase.HConstants", "org.apache.hadoop.hbase.util.Bytes" ]
import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,339,561
public File getFile() { return file; }
File function() { return file; }
/** * Returns the local file eferenced by this Hyperlink * * @return the file, or NULL if this hyperlink is not a file */
Returns the local file eferenced by this Hyperlink
getFile
{ "repo_name": "loginus/jexcelapi", "path": "src/jxl/write/biff/HyperlinkRecord.java", "license": "gpl-2.0", "size": 30837 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,351,074
public Level getLoggerLevel () { return mLogLevel; }
Level function () { return mLogLevel; }
/** * Gets the logger level of this entry. * * @return log level used to log this. */
Gets the logger level of this entry
getLoggerLevel
{ "repo_name": "jCoderZ/fawkez-old", "path": "src/java/org/jcoderz/commons/logging/LogItem.java", "license": "bsd-3-clause", "size": 13860 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
1,558,006
public static List<String> formPossibleValues(String enumeraion){ List<String> ret = new ArrayList<String>(); for (String value : enumeraion.split(";")) ret.add(value); return ret; }
static List<String> function(String enumeraion){ List<String> ret = new ArrayList<String>(); for (String value : enumeraion.split(";")) ret.add(value); return ret; }
/** * Parses string containing possible values and forms list of values * @param enumeraion possible values joined in one string * @return list of possible values */
Parses string containing possible values and forms list of values
formPossibleValues
{ "repo_name": "farkas-arpad/KROKI-mockup-tool", "path": "GraphEdit/src/graphedit/util/Utility.java", "license": "mit", "size": 944 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,578,396
public RestTemplateBuilder uriTemplateHandler(UriTemplateHandler uriTemplateHandler) { Assert.notNull(uriTemplateHandler, "UriTemplateHandler must not be null"); return new RestTemplateBuilder(this.detectRequestFactory, this.rootUri, this.messageConverters, this.requestFactory, uriTemplateHandler, this.e...
RestTemplateBuilder function(UriTemplateHandler uriTemplateHandler) { Assert.notNull(uriTemplateHandler, STR); return new RestTemplateBuilder(this.detectRequestFactory, this.rootUri, this.messageConverters, this.requestFactory, uriTemplateHandler, this.errorHandler, this.basicAuthorization, this.restTemplateCustomizers...
/** * Set the {@link UriTemplateHandler} that should be used with the * {@link RestTemplate}. * @param uriTemplateHandler the URI template handler to use * @return a new builder instance */
Set the <code>UriTemplateHandler</code> that should be used with the <code>RestTemplate</code>
uriTemplateHandler
{ "repo_name": "KiviMao/kivi", "path": "Java.Source/spring-boot/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/RestTemplateBuilder.java", "license": "apache-2.0", "size": 26968 }
[ "org.springframework.util.Assert", "org.springframework.web.util.UriTemplateHandler" ]
import org.springframework.util.Assert; import org.springframework.web.util.UriTemplateHandler;
import org.springframework.util.*; import org.springframework.web.util.*;
[ "org.springframework.util", "org.springframework.web" ]
org.springframework.util; org.springframework.web;
1,384,326
@ApiModelProperty(example = "null", value = "") public CstIcmsEnum getCstICMSSameState() { return cstICMSSameState; }
@ApiModelProperty(example = "null", value = "") CstIcmsEnum function() { return cstICMSSameState; }
/** * Get cstICMSSameState * @return cstICMSSameState **/
Get cstICMSSameState
getCstICMSSameState
{ "repo_name": "Avalara/avataxbr-clients", "path": "java-client/src/main/java/io/swagger/client/model/CfopConf.java", "license": "gpl-3.0", "size": 29385 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
856,691
Response<SqlServerInstance> getByIdWithResponse(String id, Context context);
Response<SqlServerInstance> getByIdWithResponse(String id, Context context);
/** * Retrieves a SQL Server Instance resource. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException throw...
Retrieves a SQL Server Instance resource
getByIdWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/main/java/com/azure/resourcemanager/azurearcdata/models/SqlServerInstances.java", "license": "mit", "size": 7625 }
[ "com.azure.core.http.rest.Response", "com.azure.core.util.Context" ]
import com.azure.core.http.rest.Response; import com.azure.core.util.Context;
import com.azure.core.http.rest.*; import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
2,249,205
@Test public void testPause() throws Exception { int startTicks = BukkitTester._currentTick; BukkitTester.pause(10); // pause 10 ticks assertEquals(startTicks + 10, BukkitTester._currentTick); }
void function() throws Exception { int startTicks = BukkitTester._currentTick; BukkitTester.pause(10); assertEquals(startTicks + 10, BukkitTester._currentTick); }
/** * Make sure {@link #pause} works correctly. */
Make sure <code>#pause</code> works correctly
testPause
{ "repo_name": "JCThePants/BukkitTestMock", "path": "tests/com/jcwhatever/v1_8_R3/BukkitTestTest.java", "license": "mit", "size": 8458 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,616,428
public SortedMap<String, String> getRemoteDefaultExecProperties() throws UserExecException { boolean hasExecProperties = !remoteDefaultExecProperties.isEmpty(); boolean hasPlatformProperties = !remoteDefaultPlatformProperties.isEmpty(); if (hasExecProperties && hasPlatformProperties) { throw new Us...
SortedMap<String, String> function() throws UserExecException { boolean hasExecProperties = !remoteDefaultExecProperties.isEmpty(); boolean hasPlatformProperties = !remoteDefaultPlatformProperties.isEmpty(); if (hasExecProperties && hasPlatformProperties) { throw new UserExecException( createFailureDetail( STR + STR + ...
/** * Returns the default exec properties specified by the user or an empty map if nothing was * specified. Use this method instead of directly accessing the fields. */
Returns the default exec properties specified by the user or an empty map if nothing was specified. Use this method instead of directly accessing the fields
getRemoteDefaultExecProperties
{ "repo_name": "werkt/bazel", "path": "src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java", "license": "apache-2.0", "size": 23257 }
[ "build.bazel.remote.execution.v2.Platform", "com.google.common.collect.ImmutableSortedMap", "com.google.devtools.build.lib.actions.UserExecException", "com.google.devtools.build.lib.server.FailureDetails", "com.google.protobuf.TextFormat", "java.util.SortedMap" ]
import build.bazel.remote.execution.v2.Platform; import com.google.common.collect.ImmutableSortedMap; import com.google.devtools.build.lib.actions.UserExecException; import com.google.devtools.build.lib.server.FailureDetails; import com.google.protobuf.TextFormat; import java.util.SortedMap;
import build.bazel.remote.execution.v2.*; import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.server.*; import com.google.protobuf.*; import java.util.*;
[ "build.bazel.remote", "com.google.common", "com.google.devtools", "com.google.protobuf", "java.util" ]
build.bazel.remote; com.google.common; com.google.devtools; com.google.protobuf; java.util;
166,604
public void openMapping( StepMeta stepMeta, int index ) { try { Object referencedMeta = null; Trans subTrans = getActiveSubtransformation( this, stepMeta ); if ( subTrans != null && ( stepMeta.getStepMetaInterface().getActiveReferencedObjectDescription() == null || index < 0 ) ) { ...
void function( StepMeta stepMeta, int index ) { try { Object referencedMeta = null; Trans subTrans = getActiveSubtransformation( this, stepMeta ); if ( subTrans != null && ( stepMeta.getStepMetaInterface().getActiveReferencedObjectDescription() == null index < 0 ) ) { TransMeta subTransMeta = subTrans.getTransMeta(); r...
/** * Open the transformation mentioned in the mapping... */
Open the transformation mentioned in the mapping..
openMapping
{ "repo_name": "emartin-pentaho/pentaho-kettle", "path": "ui/src/main/java/org/pentaho/di/ui/spoon/trans/TransGraph.java", "license": "apache-2.0", "size": 177998 }
[ "org.pentaho.di.core.extension.ExtensionPointHandler", "org.pentaho.di.core.extension.KettleExtensionPoint", "org.pentaho.di.core.util.Utils", "org.pentaho.di.i18n.BaseMessages", "org.pentaho.di.job.JobMeta", "org.pentaho.di.trans.Trans", "org.pentaho.di.trans.TransMeta", "org.pentaho.di.trans.step.St...
import org.pentaho.di.core.extension.ExtensionPointHandler; import org.pentaho.di.core.extension.KettleExtensionPoint; import org.pentaho.di.core.util.Utils; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.job.JobMeta; import org.pentaho.di.trans.Trans; import org.pentaho.di.trans.TransMeta; import org.p...
import org.pentaho.di.core.extension.*; import org.pentaho.di.core.util.*; import org.pentaho.di.i18n.*; import org.pentaho.di.job.*; import org.pentaho.di.trans.*; import org.pentaho.di.trans.step.*; import org.pentaho.di.ui.core.dialog.*; import org.pentaho.di.ui.spoon.job.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,207,504
protected JsonObject read(String urlS) throws Exception{ System.out.println("Execute SONAR REST query: "+urlS); hasNextPage = false; URL url = new URL(urlS); try (InputStream is = url.openStream()){ JsonElement jelement = new JsonParser().parse(new InputStreamReader(is,Charset.forName("UTF-8"))); Js...
JsonObject function(String urlS) throws Exception{ System.out.println(STR+urlS); hasNextPage = false; URL url = new URL(urlS); try (InputStream is = url.openStream()){ JsonElement jelement = new JsonParser().parse(new InputStreamReader(is,Charset.forName("UTF-8"))); JsonObject jobject = jelement.getAsJsonObject(); Json...
/** * Reads data from specified URL, and parses the answer as an XML document. * * @param urlS * @return * @throws Exception */
Reads data from specified URL, and parses the answer as an XML document
read
{ "repo_name": "qgears/qgears-review-tool", "path": "hu.qgears.sonar.client/src/hu/qgears/sonar/client/commands/post67/AbstractSonarJSONQueryHandler.java", "license": "epl-1.0", "size": 5030 }
[ "com.google.gson.JsonElement", "com.google.gson.JsonObject", "com.google.gson.JsonParser", "java.io.InputStream", "java.io.InputStreamReader", "java.nio.charset.Charset" ]
import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.Charset;
import com.google.gson.*; import java.io.*; import java.nio.charset.*;
[ "com.google.gson", "java.io", "java.nio" ]
com.google.gson; java.io; java.nio;
347,609
public InetSocketAddress[] getPeers(long timeoutValue, TimeUnit timeoutUnit) throws PeerDiscoveryException { try { return allPeers(); } catch (UnknownHostException e) { throw new PeerDiscoveryException(e); } }
InetSocketAddress[] function(long timeoutValue, TimeUnit timeoutUnit) throws PeerDiscoveryException { try { return allPeers(); } catch (UnknownHostException e) { throw new PeerDiscoveryException(e); } }
/** * Returns an array containing all the Kobocoin nodes within the list. */
Returns an array containing all the Kobocoin nodes within the list
getPeers
{ "repo_name": "machado-rev/kobocoinj", "path": "core/src/main/java/com/bushstar/kobocoinj/net/discovery/SeedPeers.java", "license": "apache-2.0", "size": 8043 }
[ "java.net.InetSocketAddress", "java.net.UnknownHostException", "java.util.concurrent.TimeUnit" ]
import java.net.InetSocketAddress; import java.net.UnknownHostException; import java.util.concurrent.TimeUnit;
import java.net.*; import java.util.concurrent.*;
[ "java.net", "java.util" ]
java.net; java.util;
1,072,900
@Override public void execute() throws UpdateExecutionException { try { sync(); getMarkLogicClient().sendUpdateQuery(getQueryString(), getBindings(), getIncludeInferred(), getBaseURI()); }catch(ForbiddenUserException | FailedRequestException e){ throw new Upda...
void function() throws UpdateExecutionException { try { sync(); getMarkLogicClient().sendUpdateQuery(getQueryString(), getBindings(), getIncludeInferred(), getBaseURI()); }catch(ForbiddenUserException FailedRequestException e){ throw new UpdateExecutionException(e); } catch (RepositoryException e) { throw new UpdateExe...
/** * Execute update query. * * @throws UpdateExecutionException */
Execute update query
execute
{ "repo_name": "akshaysonvane/marklogic-rdf4j", "path": "marklogic-rdf4j/src/main/java/com/marklogic/semantics/rdf4j/query/MarkLogicUpdateQuery.java", "license": "apache-2.0", "size": 2842 }
[ "com.marklogic.client.FailedRequestException", "com.marklogic.client.ForbiddenUserException", "java.io.IOException", "org.eclipse.rdf4j.query.MalformedQueryException", "org.eclipse.rdf4j.query.UpdateExecutionException", "org.eclipse.rdf4j.repository.RepositoryException" ]
import com.marklogic.client.FailedRequestException; import com.marklogic.client.ForbiddenUserException; import java.io.IOException; import org.eclipse.rdf4j.query.MalformedQueryException; import org.eclipse.rdf4j.query.UpdateExecutionException; import org.eclipse.rdf4j.repository.RepositoryException;
import com.marklogic.client.*; import java.io.*; import org.eclipse.rdf4j.query.*; import org.eclipse.rdf4j.repository.*;
[ "com.marklogic.client", "java.io", "org.eclipse.rdf4j" ]
com.marklogic.client; java.io; org.eclipse.rdf4j;
1,139,844
public void saveGsUser(GSUser user) throws ApplicationException;
void function(GSUser user) throws ApplicationException;
/** * Save gs profile. * * @param profile * the profile * @throws ApplicationException * the application exception */
Save gs profile
saveGsUser
{ "repo_name": "geosolutions-it/geofence", "path": "src/gui/core/plugin/userui/src/main/java/it/geosolutions/geofence/gui/client/service/GsUsersManagerRemoteService.java", "license": "gpl-3.0", "size": 3481 }
[ "it.geosolutions.geofence.gui.client.ApplicationException", "it.geosolutions.geofence.gui.client.model.GSUser" ]
import it.geosolutions.geofence.gui.client.ApplicationException; import it.geosolutions.geofence.gui.client.model.GSUser;
import it.geosolutions.geofence.gui.client.*; import it.geosolutions.geofence.gui.client.model.*;
[ "it.geosolutions.geofence" ]
it.geosolutions.geofence;
1,954,257
@Test public void testRemotePreparedStatementInsert2() throws Exception { } }
@Test void function() throws Exception { } }
/** * Remote PreparedStatement insert WITH bind variables */
Remote PreparedStatement insert WITH bind variables
testRemotePreparedStatementInsert2
{ "repo_name": "adeshr/incubator-calcite", "path": "core/src/test/java/org/apache/calcite/jdbc/CalciteRemoteDriverTest.java", "license": "apache-2.0", "size": 30042 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
240,392
protected static StringBuffer addListOfJarFiles(File libDir, StringBuffer listBuffer) throws IOException { // create list of JAR files in a given directory if (libDir.isDirectory()) { Collection<File> fileList = FileUtil.createFileList(libDir); Iterator<File> files = fileList.iterator();...
static StringBuffer function(File libDir, StringBuffer listBuffer) throws IOException { if (libDir.isDirectory()) { Collection<File> fileList = FileUtil.createFileList(libDir); Iterator<File> files = fileList.iterator(); while (files.hasNext()) { File file = files.next(); if (file.getName().toLowerCase().endsWith(JAR_F...
/** * Appends a list of JAR files in a given lib directory, separated with the OS dependent separator * (';' or ':'), to a given initial <code>StringBuffer</code> object. If <code>null</code> * <code>StringBuffer</code> object is specified, creates new <code>StringBuffer</code> object. * * @param libDir...
Appends a list of JAR files in a given lib directory, separated with the OS dependent separator (';' or ':'), to a given initial <code>StringBuffer</code> object. If <code>null</code> <code>StringBuffer</code> object is specified, creates new <code>StringBuffer</code> object
addListOfJarFiles
{ "repo_name": "apache/uima-uimaj", "path": "uimaj-core/src/main/java/org/apache/uima/pear/tools/InstallationController.java", "license": "apache-2.0", "size": 85779 }
[ "java.io.File", "java.io.IOException", "java.util.Collection", "java.util.Iterator", "org.apache.uima.pear.util.FileUtil" ]
import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.Iterator; import org.apache.uima.pear.util.FileUtil;
import java.io.*; import java.util.*; import org.apache.uima.pear.util.*;
[ "java.io", "java.util", "org.apache.uima" ]
java.io; java.util; org.apache.uima;
289,537
public void setValueAsEnum(T theValue) { Validate.notNull(myBinder, "This object does not have a binder. Constructor BoundCodeableConceptDt() should not be called!"); getCoding().clear(); if (theValue == null) { return; } getCoding().add(new CodingDt(myBinder.toSystemString(theValue), myBinder.toCodeStr...
void function(T theValue) { Validate.notNull(myBinder, STR); getCoding().clear(); if (theValue == null) { return; } getCoding().add(new CodingDt(myBinder.toSystemString(theValue), myBinder.toCodeString(theValue))); }
/** * Sets the {@link #getCoding()} to contain a coding with the code and * system defined by the given enumerated type, AND clearing any existing * codings first. If theValue is null, existing codings are cleared and no * codings are added. * * @param theValue * The value to add, or <code>nul...
Sets the <code>#getCoding()</code> to contain a coding with the code and system defined by the given enumerated type, AND clearing any existing codings first. If theValue is null, existing codings are cleared and no codings are added
setValueAsEnum
{ "repo_name": "Nodstuff/hapi-fhir", "path": "hapi-fhir-structures-dstu2/src/main/java/ca/uhn/fhir/model/dstu2/composite/BoundCodeableConceptDt.java", "license": "apache-2.0", "size": 4688 }
[ "ca.uhn.fhir.model.dstu2.composite.CodingDt", "org.apache.commons.lang3.Validate" ]
import ca.uhn.fhir.model.dstu2.composite.CodingDt; import org.apache.commons.lang3.Validate;
import ca.uhn.fhir.model.dstu2.composite.*; import org.apache.commons.lang3.*;
[ "ca.uhn.fhir", "org.apache.commons" ]
ca.uhn.fhir; org.apache.commons;
68,105
public CLIOutputResponse proplist(final PropertyListRequest request) throws IOException, ServerException { final File projectPath = new File(request.getProjectPath()); final List<String> uArgs = defaultArgs(); uArgs.add("proplist"); final CommandLineResult result = runCommand(null...
CLIOutputResponse function(final PropertyListRequest request) throws IOException, ServerException { final File projectPath = new File(request.getProjectPath()); final List<String> uArgs = defaultArgs(); uArgs.add(STR); final CommandLineResult result = runCommand(null, uArgs, projectPath, Arrays.asList(request.getPath()...
/** * Perform an "svn proplist" based on the request. * * @param request * the request * @return the response * @throws IOException * if there is a problem executing the command * @throws ServerException * if there is a Subversion issue */
Perform an "svn proplist" based on the request
proplist
{ "repo_name": "kaloyan-raev/che", "path": "plugins/plugin-svn/che-plugin-svn-ext-server/src/main/java/org/eclipse/che/plugin/svn/server/SubversionApi.java", "license": "epl-1.0", "size": 42226 }
[ "java.io.File", "java.io.IOException", "java.util.Arrays", "java.util.List", "org.eclipse.che.api.core.ServerException", "org.eclipse.che.dto.server.DtoFactory", "org.eclipse.che.plugin.svn.server.upstream.CommandLineResult", "org.eclipse.che.plugin.svn.shared.CLIOutputResponse", "org.eclipse.che.pl...
import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.List; import org.eclipse.che.api.core.ServerException; import org.eclipse.che.dto.server.DtoFactory; import org.eclipse.che.plugin.svn.server.upstream.CommandLineResult; import org.eclipse.che.plugin.svn.shared.CLIOutputResponse;...
import java.io.*; import java.util.*; import org.eclipse.che.api.core.*; import org.eclipse.che.dto.server.*; import org.eclipse.che.plugin.svn.server.upstream.*; import org.eclipse.che.plugin.svn.shared.*;
[ "java.io", "java.util", "org.eclipse.che" ]
java.io; java.util; org.eclipse.che;
325,735
public List<Round> getRounds() { return rounds; }
List<Round> function() { return rounds; }
/** * Rounds getter * * @return List<Round> */
Rounds getter
getRounds
{ "repo_name": "SGirousse/GOTE", "path": "src/com/gote/ui/newtournament/JRoundsTable.java", "license": "apache-2.0", "size": 2825 }
[ "com.gote.pojo.Round", "java.util.List" ]
import com.gote.pojo.Round; import java.util.List;
import com.gote.pojo.*; import java.util.*;
[ "com.gote.pojo", "java.util" ]
com.gote.pojo; java.util;
1,778,965
ExecutorService getWaitingThreadPool();
ExecutorService getWaitingThreadPool();
/** * Return the waiting message-processing executor */
Return the waiting message-processing executor
getWaitingThreadPool
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionManager.java", "license": "apache-2.0", "size": 15635 }
[ "java.util.concurrent.ExecutorService" ]
import java.util.concurrent.ExecutorService;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,473,693
public void test_011_basicAlter() throws Exception { Connection conn = getConnection(); // // Schema // goodStatement ( conn, "create table t_alt_1( a int, c int )" ); goodStatement ( ...
void function() throws Exception { Connection conn = getConnection(); ( conn, STR ); goodStatement ( conn, STR + STR + STR + STR + STR + STR + STR ); goodStatement ( conn, STR + STR + STR + STR + STR + STR ); ( conn, STR ); ( conn, STR ); assertResults ( conn, STR, new String[][] { { "1" , null, "-1" }, { "2" , null, "...
/** * <p> * Basic tests for altering a table and adding a generated column. * </p> */
Basic tests for altering a table and adding a generated column.
test_011_basicAlter
{ "repo_name": "splicemachine/spliceengine", "path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/lang/GeneratedColumnsTest.java", "license": "agpl-3.0", "size": 172126 }
[ "java.sql.Connection" ]
import java.sql.Connection;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,871,919
private void removeScheduledCommand(Map<Integer, HashSet<String>> scheduledCommands, String command, Integer delay) { HashSet<String> commands = scheduledCommands.get(delay); if(commands != null) { for(String scheduledCommand : commands) { if(scheduledCommand.equalsIgnoreCase(clearCommandName(command))...
void function(Map<Integer, HashSet<String>> scheduledCommands, String command, Integer delay) { HashSet<String> commands = scheduledCommands.get(delay); if(commands != null) { for(String scheduledCommand : commands) { if(scheduledCommand.equalsIgnoreCase(clearCommandName(command))) { commands.remove(scheduledCommand); ...
/** * Removes the given command from everywhere. * * @param scheduledCommands A map containing the scheduled commands, sorted by delay. * @param command The command. Not case-sensitive. */
Removes the given command from everywhere
removeScheduledCommand
{ "repo_name": "kyriog/UHPlugin", "path": "src/main/java/me/azenet/UHPlugin/UHRuntimeCommandsExecutor.java", "license": "gpl-3.0", "size": 7515 }
[ "java.util.HashSet", "java.util.Map" ]
import java.util.HashSet; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,613,721
void handleWatchStreamStart() { if (watchStreamFailures == 0) { setAndBroadcastState(OnlineState.UNKNOWN); hardAssert(onlineStateTimer == null, "onlineStateTimer shouldn't be started yet"); onlineStateTimer = workerQueue.enqueueAfterDelay( TimerId.ONLINE_STATE_TIMEOUT, ...
void handleWatchStreamStart() { if (watchStreamFailures == 0) { setAndBroadcastState(OnlineState.UNKNOWN); hardAssert(onlineStateTimer == null, STR); onlineStateTimer = workerQueue.enqueueAfterDelay( TimerId.ONLINE_STATE_TIMEOUT, ONLINE_STATE_TIMEOUT_MS, () -> { onlineStateTimer = null; hardAssert( state == OnlineState...
/** * Called by RemoteStore when a watch stream is started (including on each backoff attempt). * * <p>If this is the first attempt, it sets the OnlineState to UNKNOWN and starts the * onlineStateTimer. */
Called by RemoteStore when a watch stream is started (including on each backoff attempt). If this is the first attempt, it sets the OnlineState to UNKNOWN and starts the onlineStateTimer
handleWatchStreamStart
{ "repo_name": "firebase/firebase-android-sdk", "path": "firebase-firestore/src/main/java/com/google/firebase/firestore/remote/OnlineStateTracker.java", "license": "apache-2.0", "size": 8201 }
[ "com.google.firebase.firestore.core.OnlineState", "com.google.firebase.firestore.util.Assert", "com.google.firebase.firestore.util.AsyncQueue", "java.util.Locale" ]
import com.google.firebase.firestore.core.OnlineState; import com.google.firebase.firestore.util.Assert; import com.google.firebase.firestore.util.AsyncQueue; import java.util.Locale;
import com.google.firebase.firestore.core.*; import com.google.firebase.firestore.util.*; import java.util.*;
[ "com.google.firebase", "java.util" ]
com.google.firebase; java.util;
1,386,516
public Request getYoungest() { return requestQueue.getYoungest(); }
Request function() { return requestQueue.getYoungest(); }
/** * Returns the youngest request from the queue or null if the queue is empty * The request queue is unchanged by this call * @return the youngest request or null */
Returns the youngest request from the queue or null if the queue is empty The request queue is unchanged by this call
getYoungest
{ "repo_name": "lpellegr/programming", "path": "programming-core/src/main/java/org/objectweb/proactive/Service.java", "license": "agpl-3.0", "size": 56250 }
[ "org.objectweb.proactive.core.body.request.Request" ]
import org.objectweb.proactive.core.body.request.Request;
import org.objectweb.proactive.core.body.request.*;
[ "org.objectweb.proactive" ]
org.objectweb.proactive;
2,304,133
DecodingState finishDecode(ProtocolDecoderOutput out) throws Exception;
DecodingState finishDecode(ProtocolDecoderOutput out) throws Exception;
/** * Invoked when the associated {@link IoSession} is closed. This method is * useful when you deal with protocols which don't specify the length of a * message (e.g. HTTP responses without <tt>content-length</tt> header). * Implement this method to process the remaining data that * {@link...
Invoked when the associated <code>IoSession</code> is closed. This method is useful when you deal with protocols which don't specify the length of a message (e.g. HTTP responses without content-length header). Implement this method to process the remaining data that <code>#decode(IoBuffer, ProtocolDecoderOutput)</code>...
finishDecode
{ "repo_name": "a-zuckut/gateway", "path": "mina.core/core/src/main/java/org/apache/mina/filter/codec/statemachine/DecodingState.java", "license": "apache-2.0", "size": 2418 }
[ "org.apache.mina.filter.codec.ProtocolDecoderOutput" ]
import org.apache.mina.filter.codec.ProtocolDecoderOutput;
import org.apache.mina.filter.codec.*;
[ "org.apache.mina" ]
org.apache.mina;
2,595,568
public Rectangle getIconBounds() { Rectangle bounds = getBounds(); return new Rectangle(bounds.getLocation().translate(getIconLocation()), getIconSize()); }
Rectangle function() { Rectangle bounds = getBounds(); return new Rectangle(bounds.getLocation().translate(getIconLocation()), getIconSize()); }
/** * Returns the bounds of the Label's icon. * * @return the icon's bounds * @since 2.0 */
Returns the bounds of the Label's icon
getIconBounds
{ "repo_name": "opensagres/xdocreport.eclipse", "path": "rap/org.eclipse.draw2d/src/org/eclipse/draw2d/Label.java", "license": "lgpl-2.1", "size": 19122 }
[ "org.eclipse.draw2d.geometry.Rectangle" ]
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.draw2d.geometry.*;
[ "org.eclipse.draw2d" ]
org.eclipse.draw2d;
2,205,600
@Test public void testTimestampWithLocalTimeZone() throws Exception { Properties props = new Properties(); props.setProperty(serdeConstants.LIST_COLUMNS, "__time"); props.setProperty(serdeConstants.LIST_COLUMN_TYPES, "timestamp with local time zone"); props.setProperty(serdeConstants.TIMESTA...
void function() throws Exception { Properties props = new Properties(); props.setProperty(serdeConstants.LIST_COLUMNS, STR); props.setProperty(serdeConstants.LIST_COLUMN_TYPES, STR); props.setProperty(serdeConstants.TIMESTAMP_FORMATS, STR); final TimeZone localTz = TimeZone.getDefault(); TimeZone.setDefault(TimeZone.ge...
/** * Test serializing "timestamp with local time zone". Take a time in GMT and * have it convert it to the local time. */
Test serializing "timestamp with local time zone". Take a time in GMT and have it convert it to the local time
testTimestampWithLocalTimeZone
{ "repo_name": "alanfgates/hive", "path": "serde/src/test/org/apache/hadoop/hive/serde2/TestJsonSerDe.java", "license": "apache-2.0", "size": 11604 }
[ "java.util.List", "java.util.Properties", "java.util.TimeZone", "org.apache.hadoop.hive.common.type.TimestampTZ", "org.apache.hadoop.io.Text", "org.junit.Assert" ]
import java.util.List; import java.util.Properties; import java.util.TimeZone; import org.apache.hadoop.hive.common.type.TimestampTZ; import org.apache.hadoop.io.Text; import org.junit.Assert;
import java.util.*; import org.apache.hadoop.hive.common.type.*; import org.apache.hadoop.io.*; import org.junit.*;
[ "java.util", "org.apache.hadoop", "org.junit" ]
java.util; org.apache.hadoop; org.junit;
2,568,917
private String getItemCommandName(AbstractAudioDeviceConfig item) { if (item instanceof Sink) { return ITEM_SINK; } else if (item instanceof Source) { return ITEM_SOURCE; } else if (item instanceof SinkInput) { return ITEM_SINK_INPUT; } else if (it...
String function(AbstractAudioDeviceConfig item) { if (item instanceof Sink) { return ITEM_SINK; } else if (item instanceof Source) { return ITEM_SOURCE; } else if (item instanceof SinkInput) { return ITEM_SINK_INPUT; } else if (item instanceof SourceOutput) { return ITEM_SOURCE_OUTPUT; } return null; } /** * change the...
/** * returns the item names that can be used in commands * * @param item * @return */
returns the item names that can be used in commands
getItemCommandName
{ "repo_name": "lewie/openhab2", "path": "addons/binding/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/PulseaudioClient.java", "license": "epl-1.0", "size": 20506 }
[ "org.openhab.binding.pulseaudio.internal.items.AbstractAudioDeviceConfig", "org.openhab.binding.pulseaudio.internal.items.Sink", "org.openhab.binding.pulseaudio.internal.items.SinkInput", "org.openhab.binding.pulseaudio.internal.items.Source", "org.openhab.binding.pulseaudio.internal.items.SourceOutput" ]
import org.openhab.binding.pulseaudio.internal.items.AbstractAudioDeviceConfig; import org.openhab.binding.pulseaudio.internal.items.Sink; import org.openhab.binding.pulseaudio.internal.items.SinkInput; import org.openhab.binding.pulseaudio.internal.items.Source; import org.openhab.binding.pulseaudio.internal.items.Sou...
import org.openhab.binding.pulseaudio.internal.items.*;
[ "org.openhab.binding" ]
org.openhab.binding;
2,082,449
public static void apiManagementHeadGatewayHostnameConfiguration( com.azure.resourcemanager.apimanagement.ApiManagementManager manager) { manager .gatewayHostnameConfigurations() .getEntityTagWithResponse("rg1", "apimService1", "gw1", "default", Context.NONE); }
static void function( com.azure.resourcemanager.apimanagement.ApiManagementManager manager) { manager .gatewayHostnameConfigurations() .getEntityTagWithResponse("rg1", STR, "gw1", STR, Context.NONE); }
/** * Sample code: ApiManagementHeadGatewayHostnameConfiguration. * * @param manager Entry point to ApiManagementManager. */
Sample code: ApiManagementHeadGatewayHostnameConfiguration
apiManagementHeadGatewayHostnameConfiguration
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/samples/java/com/azure/resourcemanager/apimanagement/GatewayHostnameConfigurationGetEntityTagSamples.java", "license": "mit", "size": 1013 }
[ "com.azure.core.util.Context" ]
import com.azure.core.util.Context;
import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
383,554
public Repository getRepositoryByName(String repoName) { Query query = em.createQuery("SELECT r FROM Repository r WHERE r.repositoryName = :repositoryName"); query.setParameter("repositoryName", repoName); try { return (Repository) query.getSingleResult(); } catch(NoResultException nre) { throw ne...
Repository function(String repoName) { Query query = em.createQuery(STR); query.setParameter(STR, repoName); try { return (Repository) query.getSingleResult(); } catch(NoResultException nre) { throw new RepositoryException(STR + repoName + STR, nre); } }
/** * Get single source from a repository by it`s name * * @throws RepositoryException if no such repository was found * * @param repoName name of repository * @return Repository if was found */
Get single source from a repository by it`s name
getRepositoryByName
{ "repo_name": "myaut/salsa3", "path": "salsa3/src/com/tuneit/salsa3/RepositoryManager.java", "license": "gpl-2.0", "size": 9800 }
[ "com.tuneit.salsa3.model.Repository", "javax.persistence.NoResultException", "javax.persistence.Query" ]
import com.tuneit.salsa3.model.Repository; import javax.persistence.NoResultException; import javax.persistence.Query;
import com.tuneit.salsa3.model.*; import javax.persistence.*;
[ "com.tuneit.salsa3", "javax.persistence" ]
com.tuneit.salsa3; javax.persistence;
2,513,837
public void openDriver(SurfaceHolder holder) throws IOException { if (camera == null) { camera = Camera.open(); if (camera == null) { throw new IOException(); } camera.setPreviewDisplay(holder); if (!initialized) { ...
void function(SurfaceHolder holder) throws IOException { if (camera == null) { camera = Camera.open(); if (camera == null) { throw new IOException(); } camera.setPreviewDisplay(holder); if (!initialized) { initialized = true; configManager.initFromCameraParameters(camera); } configManager.setDesiredCameraParameters(cam...
/** * Opens the camera driver and initializes the hardware parameters. * * @param holder The surface object which the camera will draw preview frames into. * @throws IOException Indicates the camera driver failed to open. */
Opens the camera driver and initializes the hardware parameters
openDriver
{ "repo_name": "nirack/julun", "path": "commons/src/main/java/com/julun/zxing/CameraManager.java", "license": "apache-2.0", "size": 12539 }
[ "android.hardware.Camera", "android.view.SurfaceHolder", "java.io.IOException" ]
import android.hardware.Camera; import android.view.SurfaceHolder; import java.io.IOException;
import android.hardware.*; import android.view.*; import java.io.*;
[ "android.hardware", "android.view", "java.io" ]
android.hardware; android.view; java.io;
2,276,308
public Endpoint getEndpoint(){ return endpoint; }
Endpoint function(){ return endpoint; }
/** * Returns a client endpoint that uses * <code>net.jini.jeri.connection.ConnectionManager</code> to manage its * connections. This implies use of Jini ERI mux protocol. * * @return A client endpoint used in testing */
Returns a client endpoint that uses <code>net.jini.jeri.connection.ConnectionManager</code> to manage its connections. This implies use of Jini ERI mux protocol
getEndpoint
{ "repo_name": "pfirmstone/river-internet", "path": "qa/src/org/apache/river/test/spec/jeri/mux/util/AbstractMuxTest.java", "license": "apache-2.0", "size": 4528 }
[ "net.jini.jeri.Endpoint" ]
import net.jini.jeri.Endpoint;
import net.jini.jeri.*;
[ "net.jini.jeri" ]
net.jini.jeri;
1,720,941
@AfterClass public static void tearDownAfterClass() throws Exception { Employee.unbind(); }
static void function() throws Exception { Employee.unbind(); }
/** * Tear down after class. * * @throws Exception * the exception */
Tear down after class
tearDownAfterClass
{ "repo_name": "impetus-opensource/Kundera", "path": "examples/data-as-object-example/src/test/java/com/impetus/kundera/dataasobject/crud/CassandraCRUDTest.java", "license": "apache-2.0", "size": 2734 }
[ "com.impetus.kundera.dataasobject.entities.Employee" ]
import com.impetus.kundera.dataasobject.entities.Employee;
import com.impetus.kundera.dataasobject.entities.*;
[ "com.impetus.kundera" ]
com.impetus.kundera;
2,485,589
EEnum getLineType();
EEnum getLineType();
/** * Returns the meta object for enum '{@link info.limpet.stackedcharts.model.LineType <em>Line Type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for enum '<em>Line Type</em>'. * @see info.limpet.stackedcharts.model.LineType * @generated */
Returns the meta object for enum '<code>info.limpet.stackedcharts.model.LineType Line Type</code>'.
getLineType
{ "repo_name": "pecko/limpet", "path": "info.limpet.stackedcharts.model/src/info/limpet/stackedcharts/model/StackedchartsPackage.java", "license": "epl-1.0", "size": 92511 }
[ "org.eclipse.emf.ecore.EEnum" ]
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,004,367
void headers(boolean inFinished, int streamId, int associatedStreamId, List<Header> headerBlock);
void headers(boolean inFinished, int streamId, int associatedStreamId, List<Header> headerBlock);
/** * Create or update incoming headers, creating the corresponding streams if necessary. Frames * that trigger this are HEADERS and PUSH_PROMISE. * * @param inFinished true if the sender will not send further frames. * @param streamId the stream owning these headers. * @param associatedSt...
Create or update incoming headers, creating the corresponding streams if necessary. Frames that trigger this are HEADERS and PUSH_PROMISE
headers
{ "repo_name": "why168/AndroidProjects", "path": "OkHttpStudy/okhttp3/src/main/java/okhttp3/internal/http2/Http2Reader.java", "license": "mit", "size": 20160 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,368,183
@Override public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) { setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); if (isChild) { float f6 = 2.0F; GL1...
void function(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) { setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); if (isChild) { float f6 = 2.0F; GL11.glPushMatrix(); GL11.glScalef(1.5F / ...
/** * Sets the models various rotation angles then renders the model. */
Sets the models various rotation angles then renders the model
render
{ "repo_name": "PrinceOfAmber/EmberRootZoo", "path": "src/main/java/teamroots/emberroot/entity/cat/ModelWitherCat.java", "license": "mit", "size": 9329 }
[ "net.minecraft.entity.Entity" ]
import net.minecraft.entity.Entity;
import net.minecraft.entity.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
849,468
public static double[] designFrequencySampling(double[] adFrequencyResponse) { int nHalfLength = adFrequencyResponse.length; int nFullLength = nHalfLength * 2; Complex[] aFrequencyResponse = new Complex[nFullLength]; //double dScaleFactor = (double) (nFullLength - 1) / (double) nFullLength; for (int k = 0...
static double[] function(double[] adFrequencyResponse) { int nHalfLength = adFrequencyResponse.length; int nFullLength = nHalfLength * 2; Complex[] aFrequencyResponse = new Complex[nFullLength]; for (int k = 0; k < nHalfLength; k++) { } for (int k = nHalfLength; k < nFullLength; k++) { } Complex[] aComplexCoefficients ...
/** Filter design by frequency sampling. This is a design method for FIR filters. It allows to design filters with arbitrary frequency response. */
Filter design by frequency sampling
designFrequencySampling
{ "repo_name": "srnsw/xena", "path": "plugins/audio/ext/src/tritonus/src/classes/org/tritonus/lowlevel/dsp/FilterDesign.java", "license": "gpl-3.0", "size": 6862 }
[ "org.tritonus.share.TDebug" ]
import org.tritonus.share.TDebug;
import org.tritonus.share.*;
[ "org.tritonus.share" ]
org.tritonus.share;
2,586,550
@IgniteSpiConfiguration(optional = true) @Deprecated public void setMinimumBufferedMessageCount(int minBufferedMsgCnt) { // No-op. }
@IgniteSpiConfiguration(optional = true) void function(int minBufferedMsgCnt) { }
/** * Sets the minimum number of messages for this SPI, that are buffered * prior to sending. * * @param minBufferedMsgCnt Minimum buffered message count. * @deprecated Not used any more. */
Sets the minimum number of messages for this SPI, that are buffered prior to sending
setMinimumBufferedMessageCount
{ "repo_name": "kromulan/ignite", "path": "modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java", "license": "apache-2.0", "size": 135672 }
[ "org.apache.ignite.spi.IgniteSpiConfiguration" ]
import org.apache.ignite.spi.IgniteSpiConfiguration;
import org.apache.ignite.spi.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,147,972
public void setFilters(final ArrayList<QueryFilter> filters) { this.filters = filters; }
void function(final ArrayList<QueryFilter> filters) { this.filters = filters; }
/** * Each filter is a unique query and will have matching set of extensions returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. */
Each filter is a unique query and will have matching set of extensions returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query
setFilters
{ "repo_name": "Microsoft/vso-httpclient-java", "path": "Rest/alm-gallery-client/src/main/generated/com/microsoft/alm/visualstudio/services/gallery/webapi/ExtensionQuery.java", "license": "mit", "size": 3346 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,552,098
public CrashReport getCrashReporter() { return crashReporter; }
CrashReport function() { return crashReporter; }
/** * The crash reporter gets invoked when an uncaught exception is intercepted * @return the crashReporter */
The crash reporter gets invoked when an uncaught exception is intercepted
getCrashReporter
{ "repo_name": "codenameone/CodenameOne", "path": "CodenameOne/src/com/codename1/ui/Display.java", "license": "gpl-2.0", "size": 192339 }
[ "com.codename1.system.CrashReport" ]
import com.codename1.system.CrashReport;
import com.codename1.system.*;
[ "com.codename1.system" ]
com.codename1.system;
508,962
public static String concat(CharacterFilter filter, Character delimiter, String... components) { StringBuilder sb = new StringBuilder(); sb.append(filter.filterCharacters(components[0])); for (int x = 1; x < components.length; x++) { sb.append(delimiter); sb.append(filter.filterCharacters(components[x]))...
static String function(CharacterFilter filter, Character delimiter, String... components) { StringBuilder sb = new StringBuilder(); sb.append(filter.filterCharacters(components[0])); for (int x = 1; x < components.length; x++) { sb.append(delimiter); sb.append(filter.filterCharacters(components[x])); } return sb.toStri...
/** * Concatenates the given component names separated by the delimiter character. Additionally * the character filter is applied to all component names. * * @param filter Character filter to be applied to the component names * @param delimiter Delimiter to separate component names * @param components Array...
Concatenates the given component names separated by the delimiter character. Additionally the character filter is applied to all component names
concat
{ "repo_name": "DTStack/jlogstash", "path": "core/src/main/java/com/dtstack/jlogstash/metrics/scope/ScopeFormat.java", "license": "apache-2.0", "size": 7503 }
[ "com.dtstack.jlogstash.metrics.base.CharacterFilter" ]
import com.dtstack.jlogstash.metrics.base.CharacterFilter;
import com.dtstack.jlogstash.metrics.base.*;
[ "com.dtstack.jlogstash" ]
com.dtstack.jlogstash;
2,690,840
protected final String startInfo() { return "Cache started: " + U.maskName(ctx.config().getName()); }
final String function() { return STR + U.maskName(ctx.config().getName()); }
/** * Startup info. * * @return Startup info. */
Startup info
startInfo
{ "repo_name": "f7753/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java", "license": "apache-2.0", "size": 220955 }
[ "org.apache.ignite.internal.util.typedef.internal.U" ]
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.internal.util.typedef.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,627,745
public static ExecutionContext newFunctionExecutionContext(FunctionObject f, LexicalEnvironment<FunctionEnvironmentRecord> localEnv) { return new ExecutionContext(f.getRealm(), localEnv, localEnv, localEnv, f.getExecutable(), f); }
static ExecutionContext function(FunctionObject f, LexicalEnvironment<FunctionEnvironmentRecord> localEnv) { return new ExecutionContext(f.getRealm(), localEnv, localEnv, localEnv, f.getExecutable(), f); }
/** * <ul> * <li>9 Ordinary and Exotic Objects Behaviours * <ul> * <li>9.2 ECMAScript Function Objects * </ul> * </ul> * <p> * 9.2.2.1 PrepareForOrdinaryCall( F, newTarget ) * * @param f * the callee function object * @param localEnv * ...
9 Ordinary and Exotic Objects Behaviours 9.2 ECMAScript Function Objects 9.2.2.1 PrepareForOrdinaryCall( F, newTarget )
newFunctionExecutionContext
{ "repo_name": "anba/es6draft", "path": "src/main/java/com/github/anba/es6draft/runtime/ExecutionContext.java", "license": "mit", "size": 17730 }
[ "com.github.anba.es6draft.runtime.types.builtins.FunctionObject" ]
import com.github.anba.es6draft.runtime.types.builtins.FunctionObject;
import com.github.anba.es6draft.runtime.types.builtins.*;
[ "com.github.anba" ]
com.github.anba;
366,544
@NotNull @Override public Future<?> submit(@NotNull Runnable task) { throw new UnsupportedOperationException(); }
@NotNull @Override Future<?> function(@NotNull Runnable task) { throw new UnsupportedOperationException(); }
/** * Operation not supported. */
Operation not supported
submit
{ "repo_name": "SomeFire/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/StripedExecutor.java", "license": "apache-2.0", "size": 22269 }
[ "java.util.concurrent.Future", "org.jetbrains.annotations.NotNull" ]
import java.util.concurrent.Future; import org.jetbrains.annotations.NotNull;
import java.util.concurrent.*; import org.jetbrains.annotations.*;
[ "java.util", "org.jetbrains.annotations" ]
java.util; org.jetbrains.annotations;
617,876
@NotNull Builder<? extends TYPE> applyServiceConfiguration();
Builder<? extends TYPE> applyServiceConfiguration();
/** * Gets the Service configuration builder related to the instance. * <br> * The configuration options not supported by the specific implementation might be ignored. * <p> * Note that the configuration builder must be initialized with the current configuration. * * @return the Service configurati...
Gets the Service configuration builder related to the instance. The configuration options not supported by the specific implementation might be ignored. Note that the configuration builder must be initialized with the current configuration
applyServiceConfiguration
{ "repo_name": "davide-maestroni/jroutine", "path": "android-core/src/main/java/com/github/dm/jrt/android/core/config/ServiceConfigurable.java", "license": "apache-2.0", "size": 1515 }
[ "com.github.dm.jrt.android.core.config.ServiceConfiguration" ]
import com.github.dm.jrt.android.core.config.ServiceConfiguration;
import com.github.dm.jrt.android.core.config.*;
[ "com.github.dm" ]
com.github.dm;
336,888
protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ParamType_name_feature"), getString("_UI_PropertyDescriptor_descriptio...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), DbchangelogPackage.eINSTANCE.getParamType_Name(), true, false, false, ItemPropertyDescriptor.GENE...
/** * This adds a property descriptor for the Name feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Name feature.
addNamePropertyDescriptor
{ "repo_name": "dzonekl/LiquibaseEditor", "path": "plugins/org.liquidbase.model.edit/src/org/liquibase/xml/ns/dbchangelog/provider/ParamTypeItemProvider.java", "license": "mit", "size": 10371 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor", "org.liquibase.xml.ns.dbchangelog.DbchangelogPackage" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.liquibase.xml.ns.dbchangelog.DbchangelogPackage;
import org.eclipse.emf.edit.provider.*; import org.liquibase.xml.ns.dbchangelog.*;
[ "org.eclipse.emf", "org.liquibase.xml" ]
org.eclipse.emf; org.liquibase.xml;
2,819,747
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) { this.subject = subject; this.callbackHandler = callbackHandler; // this.sharedState = sharedState; // this.options = options; // initialize any configured options debug = "tru...
void function(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) { this.subject = subject; this.callbackHandler = callbackHandler; debug = "true".equalsIgnoreCase((String) options.get("debug")); }
/** * Initialize this <code>LoginModule</code>. * * <p> * * @param subject * the <code>Subject</code> to be authenticated. * <p> * * @param callbackHandler * a <code>CallbackHandler</code> for communicating with the end * user (prompting for user name...
Initialize this <code>LoginModule</code>.
initialize
{ "repo_name": "shabanovd/exist", "path": "src/org/exist/security/internal/EXistDBLoginModule.java", "license": "lgpl-2.1", "size": 8284 }
[ "java.util.Map", "javax.security.auth.Subject", "javax.security.auth.callback.CallbackHandler" ]
import java.util.Map; import javax.security.auth.Subject; import javax.security.auth.callback.CallbackHandler;
import java.util.*; import javax.security.auth.*; import javax.security.auth.callback.*;
[ "java.util", "javax.security" ]
java.util; javax.security;
1,502,788
@Test public void testCount7() { Assert.assertEquals(2, instance.count7(717)); Assert.assertEquals(1, instance.count7(7)); Assert.assertEquals(0, instance.count7(123)); Assert.assertEquals(2, instance.count7(77)); Assert.assertEquals(1, instance.count7(7123)); Assert.assertEquals(3, i...
void function() { Assert.assertEquals(2, instance.count7(717)); Assert.assertEquals(1, instance.count7(7)); Assert.assertEquals(0, instance.count7(123)); Assert.assertEquals(2, instance.count7(77)); Assert.assertEquals(1, instance.count7(7123)); Assert.assertEquals(3, instance.count7(771237)); Assert.assertEquals(4, in...
/** * Test method for {@link Recursion1#count7(int)}. */
Test method for <code>Recursion1#count7(int)</code>
testCount7
{ "repo_name": "antalpeti/CodingBat", "path": "src/test/com/codingbat/java/Recursion1Test.java", "license": "mit", "size": 24345 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,814,498
public Builder<TYPE> singleArtifact() { Preconditions.checkState(type.getLabelClass() == LabelClass.DEPENDENCY, "attribute '%s' must be a label-valued type", name); return setPropertyFlag(PropertyFlag.SINGLE_ARTIFACT, "single_artifact"); }
Builder<TYPE> function() { Preconditions.checkState(type.getLabelClass() == LabelClass.DEPENDENCY, STR, name); return setPropertyFlag(PropertyFlag.SINGLE_ARTIFACT, STR); }
/** * Makes the built attribute producing a single artifact. */
Makes the built attribute producing a single artifact
singleArtifact
{ "repo_name": "twitter-forks/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/Attribute.java", "license": "apache-2.0", "size": 98336 }
[ "com.google.common.base.Preconditions", "com.google.devtools.build.lib.packages.Type" ]
import com.google.common.base.Preconditions; import com.google.devtools.build.lib.packages.Type;
import com.google.common.base.*; import com.google.devtools.build.lib.packages.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
2,774,461
public static long getIntValue( LiteralOp op ) throws HopsException { switch( op.getValueType() ) { case DOUBLE: return UtilFunctions.toLong(op.getDoubleValue()); case INT: return op.getLongValue(); case BOOLEAN: return op.getBooleanValue() ? 1 : 0; default: throw new HopsException("Invali...
static long function( LiteralOp op ) throws HopsException { switch( op.getValueType() ) { case DOUBLE: return UtilFunctions.toLong(op.getDoubleValue()); case INT: return op.getLongValue(); case BOOLEAN: return op.getBooleanValue() ? 1 : 0; default: throw new HopsException(STR+op.getValueType()); } }
/** * Return the int value of a LiteralOp (as a long). * * Note: For comparisons, this is *only* to be used in situations * in which the value is absolutely guaranteed to be an integer. * Otherwise, a safer alternative is `getDoubleValue`. * * @param op literal operator * @return long value of literato...
Return the int value of a LiteralOp (as a long). Note: For comparisons, this is *only* to be used in situations in which the value is absolutely guaranteed to be an integer. Otherwise, a safer alternative is `getDoubleValue`
getIntValue
{ "repo_name": "sandeep-n/incubator-systemml", "path": "src/main/java/org/apache/sysml/hops/rewrite/HopRewriteUtils.java", "license": "apache-2.0", "size": 37724 }
[ "org.apache.sysml.hops.HopsException", "org.apache.sysml.hops.LiteralOp", "org.apache.sysml.runtime.util.UtilFunctions" ]
import org.apache.sysml.hops.HopsException; import org.apache.sysml.hops.LiteralOp; import org.apache.sysml.runtime.util.UtilFunctions;
import org.apache.sysml.hops.*; import org.apache.sysml.runtime.util.*;
[ "org.apache.sysml" ]
org.apache.sysml;
1,704,664
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<NetworkInterfaceTapConfigurationInner>> getWithResponseAsync( String resourceGroupName, String networkInterfaceName, String tapConfigurationName, Context context) { if (this.client.getEndpoint() == null) { return Mono ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<NetworkInterfaceTapConfigurationInner>> function( String resourceGroupName, String networkInterfaceName, String tapConfigurationName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resou...
/** * Get the specified tap configuration on a network interface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. * @param tapConfigurationName The name of the tap configuration. * @param context The context to a...
Get the specified tap configuration on a network interface
getWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceTapConfigurationsClientImpl.java", "license": "mit", "size": 61110 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.network.fluent.models.NetworkInterfaceTapConfigurationInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.NetworkInterfaceTapConfigurationInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,020,421
public static boolean isProbablyPrime(Long integer) { if (integer <= 4) return (integer == 2 || integer == 3) ? true : false; Long d = integer - 1; Long s = 0L; while (d % 2 == 0) { d /= 2; s++; } HashSet<Long> set...
static boolean function(Long integer) { if (integer <= 4) return (integer == 2 integer == 3) ? true : false; Long d = integer - 1; Long s = 0L; while (d % 2 == 0) { d /= 2; s++; } HashSet<Long> set = new HashSet<>(); int iteration = 75; while (set.size() < 50 && iteration > 0) { set.add( ThreadLocalRandom .current() .n...
/** * Tests whether the given integer is probably prime, with an error * probability less than 2^-100. * * @since 1.0 * * @param integer is a whole number which primality is being tested. * @return true if {@code integer} is probably prime, false otherwise. */
Tests whether the given integer is probably prime, with an error probability less than 2^-100
isProbablyPrime
{ "repo_name": "StevyK/Project-Euler", "path": "src/main/maths/Prime.java", "license": "gpl-3.0", "size": 5657 }
[ "java.util.HashSet", "java.util.concurrent.ThreadLocalRandom" ]
import java.util.HashSet; import java.util.concurrent.ThreadLocalRandom;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,513,802
private Node findNode(int nodeNumber, Node start) { Stack<Node> stack = new Stack<Node>(); stack.push(start); while (!stack.isEmpty()) { Node test = stack.pop(); // See if we've found it. if (test.getNodeNumber() == nodeNumber) { return test; } // Otherwise push all the childr...
Node function(int nodeNumber, Node start) { Stack<Node> stack = new Stack<Node>(); stack.push(start); while (!stack.isEmpty()) { Node test = stack.pop(); if (test.getNodeNumber() == nodeNumber) { return test; } for (int i = 0; i < test.getNumChildren(); i++) { stack.push(test.getChild(i)); } } return null; }
/** * Recursive helper that returns the node with the given number. * * @param nodeNumber * the node number of the node we're looking for * * @param start * the node at which to start the search */
Recursive helper that returns the node with the given number
findNode
{ "repo_name": "burks-pub/gecco2015", "path": "src/main/java/ec/research/gp/simple/representation/Individual.java", "license": "bsd-2-clause", "size": 24517 }
[ "java.util.Stack" ]
import java.util.Stack;
import java.util.*;
[ "java.util" ]
java.util;
1,423,033
waitUntil(p, new InfiniteTimeout()); }
waitUntil(p, new InfiniteTimeout()); }
/** * Waits for a StatePredicate to become active. * * Warning: this will wait forever unless the test itself has a timeout. * * @param p * the StatePredicate to wait for * @throws InterruptedException */
Waits for a StatePredicate to become active. Warning: this will wait forever unless the test itself has a timeout
waitUntil
{ "repo_name": "jbrains/jmock-library", "path": "jmock/src/main/java/org/jmock/lib/concurrent/Synchroniser.java", "license": "bsd-3-clause", "size": 3513 }
[ "org.jmock.lib.concurrent.internal.InfiniteTimeout" ]
import org.jmock.lib.concurrent.internal.InfiniteTimeout;
import org.jmock.lib.concurrent.internal.*;
[ "org.jmock.lib" ]
org.jmock.lib;
2,911,191
void shutdown() { store.close(); store = null; repEnv.close(); repEnv = null; } StockQuotes(String[] params) throws Exception { repConfig = new ReplicationConfig(); TimeConsistencyPolicy consistencyPolicy = new TimeConsiste...
void shutdown() { store.close(); store = null; repEnv.close(); repEnv = null; } StockQuotes(String[] params) throws Exception { repConfig = new ReplicationConfig(); TimeConsistencyPolicy consistencyPolicy = new TimeConsistencyPolicy (1, TimeUnit.SECONDS, 3, TimeUnit.SECONDS ); repConfig.setConsistencyPolicy(consistency...
/** * Shuts down the application. If this node was the master, then some other * node will be elected in its place, if a simple majority of nodes * survives this shutdown. */
Shuts down the application. If this node was the master, then some other node will be elected in its place, if a simple majority of nodes survives this shutdown
shutdown
{ "repo_name": "prat0318/dbms", "path": "mini_dbms/je-5.0.103/examples/je/rep/quote/StockQuotes.java", "license": "mit", "size": 25677 }
[ "com.sleepycat.je.Durability", "com.sleepycat.je.EnvironmentConfig", "com.sleepycat.je.rep.ReplicationConfig", "com.sleepycat.je.rep.TimeConsistencyPolicy", "java.util.concurrent.TimeUnit" ]
import com.sleepycat.je.Durability; import com.sleepycat.je.EnvironmentConfig; import com.sleepycat.je.rep.ReplicationConfig; import com.sleepycat.je.rep.TimeConsistencyPolicy; import java.util.concurrent.TimeUnit;
import com.sleepycat.je.*; import com.sleepycat.je.rep.*; import java.util.concurrent.*;
[ "com.sleepycat.je", "java.util" ]
com.sleepycat.je; java.util;
661,008
protected void viewOnPixiv() { // Create and send to intent to display the image's pixiv page in the web browser. Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(PIXIV_URL_PREFIX + image.pixivId)); startActivity(intent); }
void function() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(PIXIV_URL_PREFIX + image.pixivId)); startActivity(intent); }
/** * Opens the image Pixiv page in the system web browser. */
Opens the image Pixiv page in the system web browser
viewOnPixiv
{ "repo_name": "abergoose/nori", "path": "app/src/main/java/io/github/tjg1/nori/fragment/ImageFragment.java", "license": "isc", "size": 8771 }
[ "android.content.Intent", "android.net.Uri" ]
import android.content.Intent; import android.net.Uri;
import android.content.*; import android.net.*;
[ "android.content", "android.net" ]
android.content; android.net;
1,043,544
private static Date handleDateWithMissingLeadingZeros(String stampString, int dateLength) throws ParseException { if (dateLength == 6) { synchronized (xep0091Date6DigitFormatter) { return xep0091Date6DigitFormatter.parse(stampString); } } Calendar now = Calendar.getInstance()...
static Date function(String stampString, int dateLength) throws ParseException { if (dateLength == 6) { synchronized (xep0091Date6DigitFormatter) { return xep0091Date6DigitFormatter.parse(stampString); } } Calendar now = Calendar.getInstance(); Calendar oneDigitMonth = parseXEP91Date(stampString, xep0091Date7Digit1Mont...
/** * Parses the given date string in different ways and returns the date that * lies in the past and/or is nearest to the current date-time. * * @param stampString date in string representation * @param dateLength * @param noFuture * @return the parsed date * @throws ParseExc...
Parses the given date string in different ways and returns the date that lies in the past and/or is nearest to the current date-time
handleDateWithMissingLeadingZeros
{ "repo_name": "mcaprari/smack", "path": "source/org/jivesoftware/smack/util/StringUtils.java", "license": "apache-2.0", "size": 30758 }
[ "java.text.ParseException", "java.util.Calendar", "java.util.Date", "java.util.List" ]
import java.text.ParseException; import java.util.Calendar; import java.util.Date; import java.util.List;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
275,918
@Override public final boolean needsTaskCommit(org.apache.hadoop.mapreduce.TaskAttemptContext taskContext ) throws IOException { return needsTaskCommit((TaskAttemptContext) taskContext); }
final boolean function(org.apache.hadoop.mapreduce.TaskAttemptContext taskContext ) throws IOException { return needsTaskCommit((TaskAttemptContext) taskContext); }
/** * This method implements the new interface by calling the old method. Note * that the input types are different between the new and old apis and this * is a bridge between the two. */
This method implements the new interface by calling the old method. Note that the input types are different between the new and old apis and this is a bridge between the two
needsTaskCommit
{ "repo_name": "pombredanne/brisk-hadoop-common", "path": "src/mapred/org/apache/hadoop/mapred/OutputCommitter.java", "license": "apache-2.0", "size": 7842 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,824,344
@Override public void enterTryClauses(@NotNull ErlangParser.TryClausesContext ctx) { }
@Override public void enterTryClauses(@NotNull ErlangParser.TryClausesContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitType300
{ "repo_name": "IsThisThePayneResidence/intellidots", "path": "src/main/java/ua/edu/hneu/ast/parsers/ErlangBaseListener.java", "license": "gpl-3.0", "size": 35359 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
559,248