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
sequence
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
sequence
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void setSessionKeyPrefix(final String sessionKeyPrefix) { this.lockTemplate.withWriteLock(new LockTemplate.LockedOperation<Void>() {
void function(final String sessionKeyPrefix) { this.lockTemplate.withWriteLock(new LockTemplate.LockedOperation<Void>() {
/** * Sets the sessionsKey Prefix * * @param sessionKeyPrefix the sessions key prefix */
Sets the sessionsKey Prefix
setSessionKeyPrefix
{ "repo_name": "pivotalsoftware/session-managers", "path": "redis-store/src/main/java/com/gopivotal/manager/redis/RedisStore.java", "license": "apache-2.0", "size": 22368 }
[ "com.gopivotal.manager.LockTemplate" ]
import com.gopivotal.manager.LockTemplate;
import com.gopivotal.manager.*;
[ "com.gopivotal.manager" ]
com.gopivotal.manager;
21,761
public void CellFitScale(final float w, final float h, final String txt, final Position ln) throws IOException { this.CellFitScale(w, h, txt, null, ln, null, false, 0); }
void function(final float w, final float h, final String txt, final Position ln) throws IOException { this.CellFitScale(w, h, txt, null, ln, null, false, 0); }
/** * Cell with horizontal spacing only if necessary * * @param w * width of the cell * @param h * height of the cell * @param txt * text of the cell * @param ln * where the pointer should go after the call * @throws IOException * if the default font can not be loaded. */
Cell with horizontal spacing only if necessary
CellFitScale
{ "repo_name": "bstoots/Java-FPDF", "path": "src/main/java/com/koadweb/javafpdf/FPDF.java", "license": "mit", "size": 83636 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,089,953
void onSuccess(ExecutionInstance instance) throws FalconException;
void onSuccess(ExecutionInstance instance) throws FalconException;
/** * Invoked when an instance completes successfully. * * @param instance * @throws FalconException */
Invoked when an instance completes successfully
onSuccess
{ "repo_name": "baishuo/falcon_search", "path": "scheduler/src/main/java/org/apache/falcon/state/InstanceStateChangeHandler.java", "license": "apache-2.0", "size": 2923 }
[ "org.apache.falcon.FalconException", "org.apache.falcon.execution.ExecutionInstance" ]
import org.apache.falcon.FalconException; import org.apache.falcon.execution.ExecutionInstance;
import org.apache.falcon.*; import org.apache.falcon.execution.*;
[ "org.apache.falcon" ]
org.apache.falcon;
2,426,133
RequestDispatcher dispatcher = request.getRequestDispatcher("/hPages/search.jsp"); dispatcher.forward(request, response); }
RequestDispatcher dispatcher = request.getRequestDispatcher(STR); dispatcher.forward(request, response); }
/** * Do request. * * @param request * the request * @param response * the response * @throws ServletException * the servlet exception * @throws IOException * Signals that an I/O exception has occurred. */
Do request
doRequest
{ "repo_name": "CELAR/cloud-is", "path": "cloud-is-web/visualizationTool/src/main/java/eu/celarcloud/cloud_is/visualizationTool/servlet/pages/Search.java", "license": "apache-2.0", "size": 3507 }
[ "javax.servlet.RequestDispatcher" ]
import javax.servlet.RequestDispatcher;
import javax.servlet.*;
[ "javax.servlet" ]
javax.servlet;
2,712,759
public void exportPNG (File outfile, BufferedImage bi) throws FileNotFoundException, IOException { // FileOutputStream out = new FileOutputStream(outfile); // Creates an Output Stream for the speficied file. // JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); // Set the outout Stream to the Jpg codec. // JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi); // Creates the encoder for the current image // param.setQuality(0.95f, false); // Sets the quality of the image. // encoder.setJPEGEncodeParam(param); // // encoder.encode(bi); FileOutputStream out = new FileOutputStream(outfile); ImageWriter imagewriter = ImageIO.getImageWritersByFormatName("png").next(); ImageWriteParam writerparam = imagewriter.getDefaultWriteParam(); ImageOutputStream ios = ImageIO.createImageOutputStream(out); imagewriter.setOutput(ios); imagewriter.write(null, new IIOImage(bi, null, null), writerparam); imagewriter.dispose(); }
void function (File outfile, BufferedImage bi) throws FileNotFoundException, IOException { FileOutputStream out = new FileOutputStream(outfile); ImageWriter imagewriter = ImageIO.getImageWritersByFormatName("png").next(); ImageWriteParam writerparam = imagewriter.getDefaultWriteParam(); ImageOutputStream ios = ImageIO.createImageOutputStream(out); imagewriter.setOutput(ios); imagewriter.write(null, new IIOImage(bi, null, null), writerparam); imagewriter.dispose(); }
/** * Creates a Jpg file from a given Buffered Image. * @param Outfile complete path of output jpg file. * @param bi bufferedImage to be converted into a Jpeg file. * @throws FileNotFoundException * @throws IOException */
Creates a Jpg file from a given Buffered Image
exportPNG
{ "repo_name": "javieriserte/drawlogo", "path": "src/logodrawer/LogoDrawer.java", "license": "gpl-3.0", "size": 15062 }
[ "java.awt.image.BufferedImage", "java.io.File", "java.io.FileNotFoundException", "java.io.FileOutputStream", "java.io.IOException", "javax.imageio.IIOImage", "javax.imageio.ImageIO", "javax.imageio.ImageWriteParam", "javax.imageio.ImageWriter", "javax.imageio.stream.ImageOutputStream" ]
import java.awt.image.BufferedImage; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import javax.imageio.IIOImage; import javax.imageio.ImageIO; import javax.imageio.ImageWriteParam; import javax.imageio.ImageWriter; import javax.imageio.stream.ImageOutputStream;
import java.awt.image.*; import java.io.*; import javax.imageio.*; import javax.imageio.stream.*;
[ "java.awt", "java.io", "javax.imageio" ]
java.awt; java.io; javax.imageio;
286,171
public void setSql(Expr sql) { _sql = sql; }
void function(Expr sql) { _sql = sql; }
/** * Sets the JSP-EL expression for the SQL. */
Sets the JSP-EL expression for the SQL
setSql
{ "repo_name": "christianchristensen/resin", "path": "modules/resin/src/com/caucho/jstl/el/SqlUpdateTag.java", "license": "gpl-2.0", "size": 4423 }
[ "com.caucho.el.Expr" ]
import com.caucho.el.Expr;
import com.caucho.el.*;
[ "com.caucho.el" ]
com.caucho.el;
596,571
@Test public void testInt2Byte() { try { Message message = senderSession.createMessage(); // store a value that can't be converted to byte message.setIntProperty("prop", Integer.MAX_VALUE); message.getByteProperty("prop"); Assert.fail("sec. 3.5.4 The unmarked cases [of Table 0-4] should raise a JMS MessageFormatException.\n"); } catch (MessageFormatException e) { } catch (JMSException e) { fail(e); } }
void function() { try { Message message = senderSession.createMessage(); message.setIntProperty("prop", Integer.MAX_VALUE); message.getByteProperty("prop"); Assert.fail(STR); } catch (MessageFormatException e) { } catch (JMSException e) { fail(e); } }
/** * if a property is set as a <code>int</code>, * to get is as a <code>byte</code> throws a <code>javax.jms.MessageFormatException</code>. */
if a property is set as a <code>int</code>, to get is as a <code>byte</code> throws a <code>javax.jms.MessageFormatException</code>
testInt2Byte
{ "repo_name": "jbertram/activemq-artemis-old", "path": "tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/message/properties/MessagePropertyConversionTest.java", "license": "apache-2.0", "size": 45746 }
[ "javax.jms.JMSException", "javax.jms.Message", "javax.jms.MessageFormatException", "org.junit.Assert" ]
import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageFormatException; import org.junit.Assert;
import javax.jms.*; import org.junit.*;
[ "javax.jms", "org.junit" ]
javax.jms; org.junit;
2,457,738
public static Code3a genFunctionCallInStatement(SymbolTable symTab, String name, VSLTreeParser.argument_list_return foundArgs, CommonTree token) { Code3a code = null; Operand3a function = TypeCheck.checkVarDefined(symTab, name, token); List<Type> expectedArgs = ((FunctionType) function.type).getArguments(); if((foundArgs == null && expectedArgs == null) || (foundArgs == null && expectedArgs.size() == 0) || (foundArgs != null && foundArgs.args.size() == expectedArgs.size())) { for (int i = 0; i < expectedArgs.size(); i++) { Type expectedArgType = expectedArgs.get(i); Type foundArgType = foundArgs.args.get(i); if(expectedArgType != foundArgType) { Errors.incompatibleTypes(token, expectedArgType, foundArgType, "Location : Argument " + i + " of function " + name); System.exit(-1); } } code = new Code3a(); if(foundArgs != null) { code.append(foundArgs.code); } code.append(genCall(function)); } else { Errors.miscError(token, "Bad number of arguments :\nRequired: " + expectedArgs.size() + "\nFound: " + foundArgs.args.size()); System.exit(-1); } return code; }
static Code3a function(SymbolTable symTab, String name, VSLTreeParser.argument_list_return foundArgs, CommonTree token) { Code3a code = null; Operand3a function = TypeCheck.checkVarDefined(symTab, name, token); List<Type> expectedArgs = ((FunctionType) function.type).getArguments(); if((foundArgs == null && expectedArgs == null) (foundArgs == null && expectedArgs.size() == 0) (foundArgs != null && foundArgs.args.size() == expectedArgs.size())) { for (int i = 0; i < expectedArgs.size(); i++) { Type expectedArgType = expectedArgs.get(i); Type foundArgType = foundArgs.args.get(i); if(expectedArgType != foundArgType) { Errors.incompatibleTypes(token, expectedArgType, foundArgType, STR + i + STR + name); System.exit(-1); } } code = new Code3a(); if(foundArgs != null) { code.append(foundArgs.code); } code.append(genCall(function)); } else { Errors.miscError(token, STR + expectedArgs.size() + STR + foundArgs.args.size()); System.exit(-1); } return code; }
/** * Generates code3a for calling function in a statement * It uses VSLTreeParser.argument_list_return type because the return type of the rule argument_list is a Code3a and a List of Type object * @param symTab the SymbolTable * @param name the function name to be called * @param args the arguments associated to this function * @param token the node of the CommonTree used for errors * @return an ExpAttribute */
Generates code3a for calling function in a statement It uses VSLTreeParser.argument_list_return type because the return type of the rule argument_list is a Code3a and a List of Type object
genFunctionCallInStatement
{ "repo_name": "yjegu/Projet_Comp", "path": "src/Code3aGenerator.java", "license": "gpl-2.0", "size": 18352 }
[ "java.util.List", "org.antlr.runtime.tree.CommonTree" ]
import java.util.List; import org.antlr.runtime.tree.CommonTree;
import java.util.*; import org.antlr.runtime.tree.*;
[ "java.util", "org.antlr.runtime" ]
java.util; org.antlr.runtime;
7,831
@Test public final void whenSitterWorksFromBedtimeToMidRateIs8DollarsPerHour() { calc.setTimes(18, 18, 0); assertEquals(6 * 8, calc.calculate()); }
final void function() { calc.setTimes(18, 18, 0); assertEquals(6 * 8, calc.calculate()); }
/** * Test that rate from bed to midnight is 8 dollars/hour. */
Test that rate from bed to midnight is 8 dollars/hour
whenSitterWorksFromBedtimeToMidRateIs8DollarsPerHour
{ "repo_name": "luiscarlin/babysitter-kata", "path": "src/test/java/com/luchoc/babysitter/BabySitterCalculatorTest.java", "license": "mit", "size": 4494 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
838,014
private boolean shouldAddLinkerOutputArtifacts( RuleContext ruleContext, CcCompilationOutputs ccOutputs) { return (ruleContext.attributes().has("alwayslink", Type.BOOLEAN) && ruleContext.attributes().has("linkstatic", Type.BOOLEAN) && (emitLinkActionsIfEmpty || !ccOutputs.isEmpty())); }
boolean function( RuleContext ruleContext, CcCompilationOutputs ccOutputs) { return (ruleContext.attributes().has(STR, Type.BOOLEAN) && ruleContext.attributes().has(STR, Type.BOOLEAN) && (emitLinkActionsIfEmpty !ccOutputs.isEmpty())); }
/** * Returns true if the appropriate attributes for linker output artifacts are defined, and either * the compile action produces object files or the build is configured to produce an archive or * dynamic library even in the absence of object files. */
Returns true if the appropriate attributes for linker output artifacts are defined, and either the compile action produces object files or the build is configured to produce an archive or dynamic library even in the absence of object files
shouldAddLinkerOutputArtifacts
{ "repo_name": "dropbox/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcLinkingHelper.java", "license": "apache-2.0", "size": 46522 }
[ "com.google.devtools.build.lib.analysis.RuleContext", "com.google.devtools.build.lib.syntax.Type" ]
import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.syntax.Type;
import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.syntax.*;
[ "com.google.devtools" ]
com.google.devtools;
711,403
public Collection<CompositeActivity> getOpenedCompositeActivitys() { return Collections.unmodifiableCollection(openedCompositeActivitys); }
Collection<CompositeActivity> function() { return Collections.unmodifiableCollection(openedCompositeActivitys); }
/** * Returns a ordered collection of currently opened subnets, i.e. a path to * the currently opened subnet. * * @return collection of opened subnets */
Returns a ordered collection of currently opened subnets, i.e. a path to the currently opened subnet
getOpenedCompositeActivitys
{ "repo_name": "lucenacaio/AtidDesktop", "path": "src/org/atid/petrinet/PetriNet.java", "license": "gpl-2.0", "size": 5491 }
[ "java.util.Collection", "java.util.Collections" ]
import java.util.Collection; import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
2,661,982
protected void startTimer() { timerCalendar = Calendar.getInstance(); }
void function() { timerCalendar = Calendar.getInstance(); }
/** * Starts an inbuilt timer - to get the elapsed time call endTimer(). Subsequent calls to this function will reset the timer */
Starts an inbuilt timer - to get the elapsed time call endTimer(). Subsequent calls to this function will reset the timer
startTimer
{ "repo_name": "GeoscienceAustralia/Auscope-portal-core", "path": "src/main/java/org/auscope/portal/core/test/PortalTestClass.java", "license": "lgpl-3.0", "size": 11357 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
1,969,438
public void close() throws IOException { closed = true; }
void function() throws IOException { closed = true; }
/** * Closes this input stream and releases any system resources associated * with the stream. * * <p> The <code>close</code> method of <code>InputStream</code> does * nothing. * * @exception IOException if an I/O error occurs. */
Closes this input stream and releases any system resources associated with the stream. The <code>close</code> method of <code>InputStream</code> does nothing
close
{ "repo_name": "scnakandala/derby", "path": "java/engine/org/apache/derby/impl/jdbc/LOBInputStream.java", "license": "apache-2.0", "size": 9454 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,031,464
public void setMarkerView(MarkerView v) { mMarkerView = v; }
void function(MarkerView v) { mMarkerView = v; }
/** * sets the view that is displayed when a value is clicked on the chart * * @param v */
sets the view that is displayed when a value is clicked on the chart
setMarkerView
{ "repo_name": "CarpOrange/CarpDoctor", "path": "MPChartLib/src/com/github/mikephil/charting/charts/Chart.java", "license": "apache-2.0", "size": 47412 }
[ "com.github.mikephil.charting.components.MarkerView" ]
import com.github.mikephil.charting.components.MarkerView;
import com.github.mikephil.charting.components.*;
[ "com.github.mikephil" ]
com.github.mikephil;
273,472
public void setXslResource(Resource xslResource) { this.xslResource = xslResource; }
void function(Resource xslResource) { this.xslResource = xslResource; }
/** * API method to set the XSL Resource. * @param xslResource Resource to set as the stylesheet. * @since Ant 1.7 */
API method to set the XSL Resource
setXslResource
{ "repo_name": "Mayo-WE01051879/mayosapp", "path": "Build/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java", "license": "mit", "size": 54033 }
[ "org.apache.tools.ant.types.Resource" ]
import org.apache.tools.ant.types.Resource;
import org.apache.tools.ant.types.*;
[ "org.apache.tools" ]
org.apache.tools;
2,347,106
public static void obtainAndCacheToken(final Connection conn, User user) throws IOException, InterruptedException { try { Token<AuthenticationTokenIdentifier> token = obtainToken(conn, user); if (token == null) { throw new IOException("No token returned for user " + user.getName()); } if (LOG.isDebugEnabled()) { LOG.debug("Obtained token " + token.getKind().toString() + " for user " + user.getName()); } user.addToken(token); } catch (IOException | InterruptedException | RuntimeException e) { throw e; } catch (Exception e) { throw new UndeclaredThrowableException(e, "Unexpected exception obtaining token for user " + user.getName()); } }
static void function(final Connection conn, User user) throws IOException, InterruptedException { try { Token<AuthenticationTokenIdentifier> token = obtainToken(conn, user); if (token == null) { throw new IOException(STR + user.getName()); } if (LOG.isDebugEnabled()) { LOG.debug(STR + token.getKind().toString() + STR + user.getName()); } user.addToken(token); } catch (IOException InterruptedException RuntimeException e) { throw e; } catch (Exception e) { throw new UndeclaredThrowableException(e, STR + user.getName()); } }
/** * Obtain an authentication token for the given user and add it to the * user's credentials. * @param conn The HBase cluster connection * @param user The user for whom to obtain the token * @throws IOException If making a remote call to the authentication service fails * @throws InterruptedException If executing as the given user is interrupted */
Obtain an authentication token for the given user and add it to the user's credentials
obtainAndCacheToken
{ "repo_name": "ChinmaySKulkarni/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/security/token/ClientTokenUtil.java", "license": "apache-2.0", "size": 7882 }
[ "java.io.IOException", "java.lang.reflect.UndeclaredThrowableException", "org.apache.hadoop.hbase.client.Connection", "org.apache.hadoop.hbase.security.User", "org.apache.hadoop.security.token.Token" ]
import java.io.IOException; import java.lang.reflect.UndeclaredThrowableException; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.security.User; import org.apache.hadoop.security.token.Token;
import java.io.*; import java.lang.reflect.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.security.*; import org.apache.hadoop.security.token.*;
[ "java.io", "java.lang", "org.apache.hadoop" ]
java.io; java.lang; org.apache.hadoop;
590,200
@SuppressWarnings("try") private void doOptimize(LIR lir) { try (Indent indent = Debug.logAndIndent("eliminate redundant moves")) { callerSaveRegs = frameMap.getRegisterConfig().getCallerSaveRegisters(); initBlockData(lir); // Compute a table of the registers which are eligible for move optimization. // Unallocatable registers should never be optimized. eligibleRegs = new int[numRegs]; Arrays.fill(eligibleRegs, -1); for (Register reg : frameMap.getRegisterConfig().getAllocatableRegisters()) { if (reg.number < numRegs) { eligibleRegs[reg.number] = reg.number; } } if (!solveDataFlow(lir)) { return; } eliminateMoves(lir); } } private static final int COMPLEXITY_LIMIT = 30000;
@SuppressWarnings("try") void function(LIR lir) { try (Indent indent = Debug.logAndIndent(STR)) { callerSaveRegs = frameMap.getRegisterConfig().getCallerSaveRegisters(); initBlockData(lir); eligibleRegs = new int[numRegs]; Arrays.fill(eligibleRegs, -1); for (Register reg : frameMap.getRegisterConfig().getAllocatableRegisters()) { if (reg.number < numRegs) { eligibleRegs[reg.number] = reg.number; } } if (!solveDataFlow(lir)) { return; } eliminateMoves(lir); } } private static final int COMPLEXITY_LIMIT = 30000;
/** * The main method doing the elimination of redundant moves. */
The main method doing the elimination of redundant moves
doOptimize
{ "repo_name": "zapster/graal-core", "path": "graal/com.oracle.graal.lir/src/com/oracle/graal/lir/RedundantMoveElimination.java", "license": "gpl-2.0", "size": 23568 }
[ "com.oracle.graal.debug.Debug", "com.oracle.graal.debug.Indent", "java.util.Arrays" ]
import com.oracle.graal.debug.Debug; import com.oracle.graal.debug.Indent; import java.util.Arrays;
import com.oracle.graal.debug.*; import java.util.*;
[ "com.oracle.graal", "java.util" ]
com.oracle.graal; java.util;
2,271,750
EClass getTypeDef();
EClass getTypeDef();
/** * Returns the meta object for class '{@link de.uni_hildesheim.sse.vil.expressions.expressionDsl.TypeDef <em>Type Def</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Type Def</em>'. * @see de.uni_hildesheim.sse.vil.expressions.expressionDsl.TypeDef * @generated */
Returns the meta object for class '<code>de.uni_hildesheim.sse.vil.expressions.expressionDsl.TypeDef Type Def</code>'.
getTypeDef
{ "repo_name": "SSEHUB/EASyProducer", "path": "Plugins/Instantiation/de.uni_hildesheim.sse.vil.expressions/src-gen/de/uni_hildesheim/sse/vil/expressions/expressionDsl/ExpressionDslPackage.java", "license": "apache-2.0", "size": 174129 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,226,244
public synchronized InetSocketAddress getListenerAddress() { return listener.getAddress(); }
synchronized InetSocketAddress function() { return listener.getAddress(); }
/** * Return the socket (ip+port) on which the RPC server is listening to. * @return the socket (ip+port) on which the RPC server is listening to. */
Return the socket (ip+port) on which the RPC server is listening to
getListenerAddress
{ "repo_name": "apurtell/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java", "license": "apache-2.0", "size": 146393 }
[ "java.net.InetSocketAddress" ]
import java.net.InetSocketAddress;
import java.net.*;
[ "java.net" ]
java.net;
2,596,764
public static NabuccoPropertyDescriptor getPropertyDescriptor(String propertyName) { return PropertyCache.getInstance().retrieve(DepartmentListMsg.class).getProperty(propertyName); }
static NabuccoPropertyDescriptor function(String propertyName) { return PropertyCache.getInstance().retrieve(DepartmentListMsg.class).getProperty(propertyName); }
/** * Getter for the PropertyDescriptor. * * @param propertyName the String. * @return the NabuccoPropertyDescriptor. */
Getter for the PropertyDescriptor
getPropertyDescriptor
{ "repo_name": "NABUCCO/org.nabucco.business.organization", "path": "org.nabucco.business.organization.facade.message/src/main/gen/org/nabucco/business/organization/facade/message/DepartmentListMsg.java", "license": "epl-1.0", "size": 6009 }
[ "org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor", "org.nabucco.framework.base.facade.datatype.property.PropertyCache" ]
import org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor; import org.nabucco.framework.base.facade.datatype.property.PropertyCache;
import org.nabucco.framework.base.facade.datatype.property.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
64,628
private List<USUARIOS> internalDatabase() { // Dummy database // Create a dummy array list List<USUARIOS> users = new ArrayList<USUARIOS>(); USUARIOS user = null; // Create a new dummy user user = new USUARIOS(); user.setLOGIN("john"); // Actual password: admin user.setPASS("21232f297a57a5a743894a0e4a801fc3"); //user.setPassword("admin"); // Admin user user.setNIVEL(1); // Add to array list users.add(user); // Create a new dummy user user = new USUARIOS(); user.setLOGIN("jane"); // Actual password: user user.setPASS("ee11cbb19052e40b07aac0ca060c23ee"); //user.setPassword("user"); // Regular user user.setNIVEL(2); // Add to array list users.add(user); return users; }
List<USUARIOS> function() { List<USUARIOS> users = new ArrayList<USUARIOS>(); USUARIOS user = null; user = new USUARIOS(); user.setLOGIN("john"); user.setPASS(STR); user.setNIVEL(1); users.add(user); user = new USUARIOS(); user.setLOGIN("jane"); user.setPASS(STR); user.setNIVEL(2); users.add(user); return users; }
/** * Our fake database. Here we populate an ArrayList with a dummy list of * users. */
Our fake database. Here we populate an ArrayList with a dummy list of users
internalDatabase
{ "repo_name": "IvanSantiago/retopublico", "path": "MiMappir/src/mx/gob/sct/utic/mimappir/sigtic/db2/dao/UserDAO.java", "license": "gpl-2.0", "size": 1606 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
637,734
public CmsUUID getThreadUUID() { return m_threadUUID; }
CmsUUID function() { return m_threadUUID; }
/** * Returns the UUID of the running publish thread.<p> * * @return the UUID of the running publish thread */
Returns the UUID of the running publish thread
getThreadUUID
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/publish/CmsPublishJobInfoBean.java", "license": "lgpl-2.1", "size": 13555 }
[ "org.opencms.util.CmsUUID" ]
import org.opencms.util.CmsUUID;
import org.opencms.util.*;
[ "org.opencms.util" ]
org.opencms.util;
346,397
public void setSelectedItems(Collection<T> sel) { selectedIndexes.clear(); for (T t : sel) { Integer index = map2Index.get(t); if(index!=null) selectedIndexes.add(index); } updateBorders(); fireSelectionChanged(); }
void function(Collection<T> sel) { selectedIndexes.clear(); for (T t : sel) { Integer index = map2Index.get(t); if(index!=null) selectedIndexes.add(index); } updateBorders(); fireSelectionChanged(); }
/** * Sets the selected items * @param sel */
Sets the selected items
setSelectedItems
{ "repo_name": "jfreyss/spirit", "path": "src/com/actelion/research/spiritapp/ui/pivot/graph/ListPane.java", "license": "gpl-3.0", "size": 11476 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,583,030
public static class SchemaRdfMapper extends Mapper<LongWritable, RyaStatementWritable, NullWritable, Fact> { private Fact fact = new Fact(); @Override public void map(LongWritable key, RyaStatementWritable rsw, Context context) throws IOException, InterruptedException { fact.setTriple(rsw.getRyaStatement()); boolean isSchemaTriple = Schema.isSchemaTriple(fact.getTriple()); if (isSchemaTriple) { context.write(NullWritable.get(), fact); } countInput(isSchemaTriple, context); } } public static class SchemaFilterReducer extends Reducer<NullWritable, Fact, NullWritable, SchemaWritable> { private SchemaWritable schema; private Logger log = Logger.getLogger(SchemaFilterReducer.class); private static int LOG_INTERVAL = 1000; private boolean debug = false; private MultipleOutputs<?, ?> debugOut; private Text debugKey = new Text(); private Text debugValue = new Text();
static class SchemaRdfMapper extends Mapper<LongWritable, RyaStatementWritable, NullWritable, Fact> { private Fact fact = new Fact(); public void function(LongWritable key, RyaStatementWritable rsw, Context context) throws IOException, InterruptedException { fact.setTriple(rsw.getRyaStatement()); boolean isSchemaTriple = Schema.isSchemaTriple(fact.getTriple()); if (isSchemaTriple) { context.write(NullWritable.get(), fact); } countInput(isSchemaTriple, context); } } public static class SchemaFilterReducer extends Reducer<NullWritable, Fact, NullWritable, SchemaWritable> { private SchemaWritable schema; private Logger log = Logger.getLogger(SchemaFilterReducer.class); private static int LOG_INTERVAL = 1000; private boolean debug = false; private MultipleOutputs<?, ?> debugOut; private Text debugKey = new Text(); private Text debugValue = new Text();
/** * For a given fact, output it if it's a schema triple. */
For a given fact, output it if it's a schema triple
map
{ "repo_name": "isper3at/incubator-rya", "path": "extras/rya.reasoning/src/main/java/mvm/rya/reasoning/mr/SchemaFilter.java", "license": "apache-2.0", "size": 6282 }
[ "java.io.IOException", "org.apache.hadoop.io.LongWritable", "org.apache.hadoop.io.NullWritable", "org.apache.hadoop.io.Text", "org.apache.hadoop.mapreduce.Mapper", "org.apache.hadoop.mapreduce.Reducer", "org.apache.hadoop.mapreduce.lib.output.MultipleOutputs", "org.apache.log4j.Logger" ]
import java.io.IOException; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.NullWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; import org.apache.hadoop.mapreduce.lib.output.MultipleOutputs; import org.apache.log4j.Logger;
import java.io.*; import org.apache.hadoop.io.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.mapreduce.lib.output.*; import org.apache.log4j.*;
[ "java.io", "org.apache.hadoop", "org.apache.log4j" ]
java.io; org.apache.hadoop; org.apache.log4j;
2,910,411
public void testMoveRenameFileSourceParentRootSourceMissing() throws Exception { IgfsPath file = new IgfsPath("/" + FILE_NEW.name()); create(igfsSecondary, paths(DIR_NEW, SUBDIR_NEW), paths(file)); create(igfs, paths(DIR_NEW, SUBDIR_NEW), null); igfs.rename(file, FILE_NEW); checkExist(igfs, igfsSecondary, FILE_NEW); checkNotExist(igfs, igfsSecondary, file); }
void function() throws Exception { IgfsPath file = new IgfsPath("/" + FILE_NEW.name()); create(igfsSecondary, paths(DIR_NEW, SUBDIR_NEW), paths(file)); create(igfs, paths(DIR_NEW, SUBDIR_NEW), null); igfs.rename(file, FILE_NEW); checkExist(igfs, igfsSecondary, FILE_NEW); checkNotExist(igfs, igfsSecondary, file); }
/** * Test file move and rename when source parent is the root and the source is missing. * * @throws Exception If failed. */
Test file move and rename when source parent is the root and the source is missing
testMoveRenameFileSourceParentRootSourceMissing
{ "repo_name": "pperalta/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java", "license": "apache-2.0", "size": 57219 }
[ "org.apache.ignite.igfs.IgfsPath" ]
import org.apache.ignite.igfs.IgfsPath;
import org.apache.ignite.igfs.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,192,828
public static String getSQLTypeFromXsdType(String xsdType) { String sqlType = xsdSqlTypeMap.get(xsdType); if (sqlType == null) { sqlType = DBConstants.DataTypes.STRING; } return sqlType; }
static String function(String xsdType) { String sqlType = xsdSqlTypeMap.get(xsdType); if (sqlType == null) { sqlType = DBConstants.DataTypes.STRING; } return sqlType; }
/** * Converts from XML schema types to DS SQL types, e.g. "string" -> "STRING". */
Converts from XML schema types to DS SQL types, e.g. "string" -> "STRING"
getSQLTypeFromXsdType
{ "repo_name": "madhawa-gunasekara/carbon-data", "path": "components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/DBUtils.java", "license": "apache-2.0", "size": 54182 }
[ "org.wso2.carbon.dataservices.common.DBConstants" ]
import org.wso2.carbon.dataservices.common.DBConstants;
import org.wso2.carbon.dataservices.common.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,535,194
@Override public HashMap<String, ClassDef> getClassMap() { //return _program.getClassMap(); return null; } // runtime function list for compilation private AbstractFunction[] _runtimeFunList;
HashMap<String, ClassDef> function() { return null; } private AbstractFunction[] _runtimeFunList;
/** * Returns the class map. */
Returns the class map
getClassMap
{ "repo_name": "CleverCloud/Quercus", "path": "quercus/src/main/java/com/caucho/quercus/page/InterpretedPage.java", "license": "gpl-2.0", "size": 4132 }
[ "com.caucho.quercus.function.AbstractFunction", "com.caucho.quercus.program.ClassDef", "java.util.HashMap" ]
import com.caucho.quercus.function.AbstractFunction; import com.caucho.quercus.program.ClassDef; import java.util.HashMap;
import com.caucho.quercus.function.*; import com.caucho.quercus.program.*; import java.util.*;
[ "com.caucho.quercus", "java.util" ]
com.caucho.quercus; java.util;
2,635,543
@Override public ResourceLocator getResourceLocator() { return CityGMLEditPlugin.INSTANCE; }
ResourceLocator function() { return CityGMLEditPlugin.INSTANCE; }
/** * Return the resource locator for this item provider's resources. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Return the resource locator for this item provider's resources.
getResourceLocator
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/gml/provider/StyleVariationTypeItemProvider.java", "license": "apache-2.0", "size": 6521 }
[ "net.opengis.citygml.building.provider.CityGMLEditPlugin", "org.eclipse.emf.common.util.ResourceLocator" ]
import net.opengis.citygml.building.provider.CityGMLEditPlugin; import org.eclipse.emf.common.util.ResourceLocator;
import net.opengis.citygml.building.provider.*; import org.eclipse.emf.common.util.*;
[ "net.opengis.citygml", "org.eclipse.emf" ]
net.opengis.citygml; org.eclipse.emf;
2,426,376
public String toString(int indentFactor) throws JSONException { StringWriter sw = new StringWriter(); synchronized (sw.getBuffer()) { return this.write(sw, indentFactor, 0).toString(); } }
String function(int indentFactor) throws JSONException { StringWriter sw = new StringWriter(); synchronized (sw.getBuffer()) { return this.write(sw, indentFactor, 0).toString(); } }
/** * Make a prettyprinted JSON text of this JSONArray. Warning: This method * assumes that the data structure is acyclical. * * @param indentFactor * The number of spaces to add to each level of indentation. * @return a printable, displayable, transmittable representation of the * object, beginning with <code>[</code>&nbsp;<small>(left * bracket)</small> and ending with <code>]</code> * &nbsp;<small>(right bracket)</small>. * @throws JSONException */
Make a prettyprinted JSON text of this JSONArray. Warning: This method assumes that the data structure is acyclical
toString
{ "repo_name": "soklet/soklet", "path": "src/main/java/com/soklet/json/JSONArray.java", "license": "apache-2.0", "size": 32200 }
[ "java.io.StringWriter" ]
import java.io.StringWriter;
import java.io.*;
[ "java.io" ]
java.io;
2,676,034
public boolean isIncognito(); } public InstalledAppProviderImpl(FrameUrlDelegate frameUrlDelegate, Context context, InstantAppsHandler instantAppsHandler) { assert instantAppsHandler != null; mFrameUrlDelegate = frameUrlDelegate; mContext = context; mInstantAppsHandler = instantAppsHandler; }
boolean function(); } public InstalledAppProviderImpl(FrameUrlDelegate frameUrlDelegate, Context context, InstantAppsHandler instantAppsHandler) { assert instantAppsHandler != null; mFrameUrlDelegate = frameUrlDelegate; mContext = context; mInstantAppsHandler = instantAppsHandler; }
/** * Checks if we're in incognito. If the frame has disappeared this returns true. */
Checks if we're in incognito. If the frame has disappeared this returns true
isIncognito
{ "repo_name": "mogoweb/365browser", "path": "app/src/main/java/org/chromium/chrome/browser/installedapp/InstalledAppProviderImpl.java", "license": "apache-2.0", "size": 14066 }
[ "android.content.Context", "org.chromium.chrome.browser.instantapps.InstantAppsHandler" ]
import android.content.Context; import org.chromium.chrome.browser.instantapps.InstantAppsHandler;
import android.content.*; import org.chromium.chrome.browser.instantapps.*;
[ "android.content", "org.chromium.chrome" ]
android.content; org.chromium.chrome;
569,669
@Test(expected = ConnectionException.class) public void testFixJobsOptConnectionException() throws P4JavaException { when(server.execMapCmdList(eq(FIX.toString()), argThat(FIX_MATCHER), eq(null))) .thenThrow(ConnectionException.class); fixDelegator.fixJobs(JOB_LIST, Integer.valueOf(TEST_CHANGELIST), new FixJobsOptions()); }
@Test(expected = ConnectionException.class) void function() throws P4JavaException { when(server.execMapCmdList(eq(FIX.toString()), argThat(FIX_MATCHER), eq(null))) .thenThrow(ConnectionException.class); fixDelegator.fixJobs(JOB_LIST, Integer.valueOf(TEST_CHANGELIST), new FixJobsOptions()); }
/** * Test fix jobs with opt connection exception. * * @throws P4JavaException the p4 java exception */
Test fix jobs with opt connection exception
testFixJobsOptConnectionException
{ "repo_name": "groboclown/p4ic4idea", "path": "p4java/r18-1/src/test/java/com/perforce/p4java/impl/mapbased/server/cmd/FixDelegatorTest.java", "license": "apache-2.0", "size": 9134 }
[ "com.perforce.p4java.exception.ConnectionException", "com.perforce.p4java.exception.P4JavaException", "com.perforce.p4java.option.server.FixJobsOptions", "com.perforce.p4java.server.CmdSpec", "org.junit.Test", "org.mockito.ArgumentMatchers", "org.mockito.Mockito" ]
import com.perforce.p4java.exception.ConnectionException; import com.perforce.p4java.exception.P4JavaException; import com.perforce.p4java.option.server.FixJobsOptions; import com.perforce.p4java.server.CmdSpec; import org.junit.Test; import org.mockito.ArgumentMatchers; import org.mockito.Mockito;
import com.perforce.p4java.exception.*; import com.perforce.p4java.option.server.*; import com.perforce.p4java.server.*; import org.junit.*; import org.mockito.*;
[ "com.perforce.p4java", "org.junit", "org.mockito" ]
com.perforce.p4java; org.junit; org.mockito;
2,046,676
public void trim() { for (Entry<?> entry : entries) { entry.trim(size); } }
void function() { for (Entry<?> entry : entries) { entry.trim(size); } }
/** * Trims the number of options per suggest text term to the requested size. * For internal usage. */
Trims the number of options per suggest text term to the requested size. For internal usage
trim
{ "repo_name": "GlenRSmith/elasticsearch", "path": "server/src/main/java/org/elasticsearch/search/suggest/Suggest.java", "license": "apache-2.0", "size": 27216 }
[ "org.elasticsearch.search.suggest.Suggest" ]
import org.elasticsearch.search.suggest.Suggest;
import org.elasticsearch.search.suggest.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
233,773
public V put(K key, V value) { return mSoftReferences != null ? unwrap(mSoftReferences.put(key, new SoftReference<V>(value))) : mHardReferences.put(key, value); }
V function(K key, V value) { return mSoftReferences != null ? unwrap(mSoftReferences.put(key, new SoftReference<V>(value))) : mHardReferences.put(key, value); }
/** * See {@link java.util.Map#put(Object, Object)}. */
See <code>java.util.Map#put(Object, Object)</code>
put
{ "repo_name": "AdeebNqo/Thula", "path": "Thula/src/main/java/com/adeebnqo/Thula/common/google/SimpleCache.java", "license": "gpl-3.0", "size": 4469 }
[ "java.lang.ref.SoftReference" ]
import java.lang.ref.SoftReference;
import java.lang.ref.*;
[ "java.lang" ]
java.lang;
1,277,828
@Generated @Selector("SAMLAttributeQueryResponse") public native String SAMLAttributeQueryResponse();
@Selector(STR) native String function();
/** * The SAML AttributeQuery response received from the account provider. * The value might be nil if your account metadata request did not specify any SAML attributes or if the user does not have a valid authentication. */
The SAML AttributeQuery response received from the account provider. The value might be nil if your account metadata request did not specify any SAML attributes or if the user does not have a valid authentication
SAMLAttributeQueryResponse
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/videosubscriberaccount/VSAccountMetadata.java", "license": "apache-2.0", "size": 6471 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,586,085
public void recalculateColumnWidths() { getRpcProxy(GridClientRpc.class).recalculateColumnWidths(); }
void function() { getRpcProxy(GridClientRpc.class).recalculateColumnWidths(); }
/** * Requests that the column widths should be recalculated. * <p> * In most cases Grid will know when column widths need to be recalculated * but this method can be used to force recalculation in situations when * grid does not recalculate automatically. * * @since 7.4.1 */
Requests that the column widths should be recalculated. In most cases Grid will know when column widths need to be recalculated but this method can be used to force recalculation in situations when grid does not recalculate automatically
recalculateColumnWidths
{ "repo_name": "mstahv/framework", "path": "compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java", "license": "apache-2.0", "size": 273176 }
[ "com.vaadin.v7.shared.ui.grid.GridClientRpc" ]
import com.vaadin.v7.shared.ui.grid.GridClientRpc;
import com.vaadin.v7.shared.ui.grid.*;
[ "com.vaadin.v7" ]
com.vaadin.v7;
19,890
public void addPolicy(final ExpirationPolicy policy) { LOGGER.trace("Adding expiration policy [{}] with name [{}]", policy, policy.getName()); this.policies.put(policy.getName(), policy); }
void function(final ExpirationPolicy policy) { LOGGER.trace(STR, policy, policy.getName()); this.policies.put(policy.getName(), policy); }
/** * Add policy. * * @param policy the policy */
Add policy
addPolicy
{ "repo_name": "rkorn86/cas", "path": "core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/expiration/BaseDelegatingExpirationPolicy.java", "license": "apache-2.0", "size": 5019 }
[ "org.apereo.cas.ticket.ExpirationPolicy" ]
import org.apereo.cas.ticket.ExpirationPolicy;
import org.apereo.cas.ticket.*;
[ "org.apereo.cas" ]
org.apereo.cas;
631,334
public static RelDataType createEmptyStructType( RelDataTypeFactory typeFactory) { return typeFactory.createStructType( ImmutableList.of(), ImmutableList.of()); }
static RelDataType function( RelDataTypeFactory typeFactory) { return typeFactory.createStructType( ImmutableList.of(), ImmutableList.of()); }
/** * Records a struct type with no fields. * * @param typeFactory Type factory * @return Struct type with no fields */
Records a struct type with no fields
createEmptyStructType
{ "repo_name": "googleinterns/calcite", "path": "core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java", "license": "apache-2.0", "size": 50603 }
[ "com.google.common.collect.ImmutableList", "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.rel.type.RelDataTypeFactory" ]
import com.google.common.collect.ImmutableList; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeFactory;
import com.google.common.collect.*; import org.apache.calcite.rel.type.*;
[ "com.google.common", "org.apache.calcite" ]
com.google.common; org.apache.calcite;
2,872,398
private void verifyPossiblyUntrackedFiles() throws VcsException { Set<VirtualFile> suspiciousFiles = new HashSet<>(); synchronized(LOCK) { suspiciousFiles.addAll(myPossiblyUntrackedFiles); myPossiblyUntrackedFiles.clear(); } synchronized(myDefinitelyUntrackedFiles) { Set<VirtualFile> untrackedFiles = myGit.untrackedFiles(myProject, myRoot, suspiciousFiles); suspiciousFiles.removeAll(untrackedFiles); // files that were suspicious (and thus passed to 'git ls-files'), but are not untracked, are definitely tracked. @SuppressWarnings("UnnecessaryLocalVariable") Set<VirtualFile> trackedFiles = suspiciousFiles; myDefinitelyUntrackedFiles.addAll(untrackedFiles); myDefinitelyUntrackedFiles.removeAll(trackedFiles); } }
void function() throws VcsException { Set<VirtualFile> suspiciousFiles = new HashSet<>(); synchronized(LOCK) { suspiciousFiles.addAll(myPossiblyUntrackedFiles); myPossiblyUntrackedFiles.clear(); } synchronized(myDefinitelyUntrackedFiles) { Set<VirtualFile> untrackedFiles = myGit.untrackedFiles(myProject, myRoot, suspiciousFiles); suspiciousFiles.removeAll(untrackedFiles); @SuppressWarnings(STR) Set<VirtualFile> trackedFiles = suspiciousFiles; myDefinitelyUntrackedFiles.addAll(untrackedFiles); myDefinitelyUntrackedFiles.removeAll(trackedFiles); } }
/** * Queries Git to check the status of {@code myPossiblyUntrackedFiles} and moves them to {@code myDefinitelyUntrackedFiles}. */
Queries Git to check the status of myPossiblyUntrackedFiles and moves them to myDefinitelyUntrackedFiles
verifyPossiblyUntrackedFiles
{ "repo_name": "consulo/consulo-git", "path": "plugin/src/main/java/git4idea/repo/GitUntrackedFilesHolder.java", "license": "apache-2.0", "size": 11896 }
[ "com.intellij.openapi.vcs.VcsException", "com.intellij.openapi.vfs.VirtualFile", "java.util.HashSet", "java.util.Set" ]
import com.intellij.openapi.vcs.VcsException; import com.intellij.openapi.vfs.VirtualFile; import java.util.HashSet; import java.util.Set;
import com.intellij.openapi.vcs.*; import com.intellij.openapi.vfs.*; import java.util.*;
[ "com.intellij.openapi", "java.util" ]
com.intellij.openapi; java.util;
377,853
public Collection<ClusterNode> cacheNodes(@Nullable String cacheName, AffinityTopologyVersion topVer) { return resolveDiscoCache(CU.cacheId(cacheName), topVer).cacheNodes(cacheName); }
Collection<ClusterNode> function(@Nullable String cacheName, AffinityTopologyVersion topVer) { return resolveDiscoCache(CU.cacheId(cacheName), topVer).cacheNodes(cacheName); }
/** * Gets cache nodes for cache with given name. * * @param cacheName Cache name. * @param topVer Topology version. * @return Collection of cache nodes. */
Gets cache nodes for cache with given name
cacheNodes
{ "repo_name": "irudyak/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java", "license": "apache-2.0", "size": 123630 }
[ "java.util.Collection", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion", "org.apache.ignite.internal.util.typedef.internal.CU", "org.jetbrains.annotations.Nullable" ]
import java.util.Collection; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.util.typedef.internal.CU; import org.jetbrains.annotations.Nullable;
import java.util.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.jetbrains.annotations.*;
[ "java.util", "org.apache.ignite", "org.jetbrains.annotations" ]
java.util; org.apache.ignite; org.jetbrains.annotations;
2,632,577
public SiteCloneabilityInner withUnsupportedFeatures(List<SiteCloneabilityCriterion> unsupportedFeatures) { this.unsupportedFeatures = unsupportedFeatures; return this; }
SiteCloneabilityInner function(List<SiteCloneabilityCriterion> unsupportedFeatures) { this.unsupportedFeatures = unsupportedFeatures; return this; }
/** * Set the unsupportedFeatures value. * * @param unsupportedFeatures the unsupportedFeatures value to set * @return the SiteCloneabilityInner object itself. */
Set the unsupportedFeatures value
withUnsupportedFeatures
{ "repo_name": "herveyw/azure-sdk-for-java", "path": "azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SiteCloneabilityInner.java", "license": "mit", "size": 3678 }
[ "com.microsoft.azure.management.website.SiteCloneabilityCriterion", "java.util.List" ]
import com.microsoft.azure.management.website.SiteCloneabilityCriterion; import java.util.List;
import com.microsoft.azure.management.website.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
2,845,823
public void onHttpClientUpgrade() throws Http2Exception { if (connection().isServer()) { throw protocolError("Client-side HTTP upgrade requested for a server"); } if (prefaceSent || decoder.prefaceReceived()) { throw protocolError("HTTP upgrade must occur before HTTP/2 preface is sent or received"); } // Create a local stream used for the HTTP cleartext upgrade. connection().createLocalStream(HTTP_UPGRADE_STREAM_ID, true); }
void function() throws Http2Exception { if (connection().isServer()) { throw protocolError(STR); } if (prefaceSent decoder.prefaceReceived()) { throw protocolError(STR); } connection().createLocalStream(HTTP_UPGRADE_STREAM_ID, true); }
/** * Handles the client-side (cleartext) upgrade from HTTP to HTTP/2. * Reserves local stream 1 for the HTTP/2 response. */
Handles the client-side (cleartext) upgrade from HTTP to HTTP/2. Reserves local stream 1 for the HTTP/2 response
onHttpClientUpgrade
{ "repo_name": "sunng87/netty", "path": "codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java", "license": "apache-2.0", "size": 18124 }
[ "io.netty.handler.codec.http2.Http2Exception" ]
import io.netty.handler.codec.http2.Http2Exception;
import io.netty.handler.codec.http2.*;
[ "io.netty.handler" ]
io.netty.handler;
500,690
private boolean becomeActiveMaster(MonitoredTask startupStatus) throws InterruptedException { // TODO: This is wrong!!!! Should have new servername if we restart ourselves, // if we come back to life. this.activeMasterManager = new ActiveMasterManager(zooKeeper, this.serverName, this); this.zooKeeper.registerListener(activeMasterManager); stallIfBackupMaster(this.conf, this.activeMasterManager); // The ClusterStatusTracker is setup before the other // ZKBasedSystemTrackers because it's needed by the activeMasterManager // to check if the cluster should be shutdown. this.clusterStatusTracker = new ClusterStatusTracker(getZooKeeper(), this); this.clusterStatusTracker.start(); return this.activeMasterManager.blockUntilBecomingActiveMaster(startupStatus); }
boolean function(MonitoredTask startupStatus) throws InterruptedException { this.activeMasterManager = new ActiveMasterManager(zooKeeper, this.serverName, this); this.zooKeeper.registerListener(activeMasterManager); stallIfBackupMaster(this.conf, this.activeMasterManager); this.clusterStatusTracker = new ClusterStatusTracker(getZooKeeper(), this); this.clusterStatusTracker.start(); return this.activeMasterManager.blockUntilBecomingActiveMaster(startupStatus); }
/** * Try becoming active master. * @param startupStatus * @return True if we could successfully become the active master. * @throws InterruptedException */
Try becoming active master
becomeActiveMaster
{ "repo_name": "throughsky/lywebank", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java", "license": "apache-2.0", "size": 125853 }
[ "org.apache.hadoop.hbase.monitoring.MonitoredTask", "org.apache.hadoop.hbase.zookeeper.ClusterStatusTracker" ]
import org.apache.hadoop.hbase.monitoring.MonitoredTask; import org.apache.hadoop.hbase.zookeeper.ClusterStatusTracker;
import org.apache.hadoop.hbase.monitoring.*; import org.apache.hadoop.hbase.zookeeper.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,894,038
public void updateSensorData(SensorJob sensorJob, String priority);
void function(SensorJob sensorJob, String priority);
/** * This method adds a {@link SensorJobs} with the appropriate priority to the {@link SensorJobExecuter}. * * @param sensorJob * @param priority */
This method adds a <code>SensorJobs</code> with the appropriate priority to the <code>SensorJobExecuter</code>
updateSensorData
{ "repo_name": "philomatic/smarthome", "path": "extensions/binding/org.eclipse.smarthome.binding.digitalstrom/src/main/java/org/eclipse/smarthome/binding/digitalstrom/internal/lib/manager/DeviceStatusManager.java", "license": "epl-1.0", "size": 10246 }
[ "org.eclipse.smarthome.binding.digitalstrom.internal.lib.sensorJobExecutor.sensorJob.SensorJob" ]
import org.eclipse.smarthome.binding.digitalstrom.internal.lib.sensorJobExecutor.sensorJob.SensorJob;
import org.eclipse.smarthome.binding.digitalstrom.internal.lib.*;
[ "org.eclipse.smarthome" ]
org.eclipse.smarthome;
2,693,845
public int getBuffCount() { L2Effect[] effects = getAllEffects(); int numBuffs = 0; if (effects != null) { for (L2Effect e : effects) { if (e != null) { if (((e.getSkill().getSkillType() == L2Skill.SkillType.BUFF) || (e.getSkill().getSkillType() == L2Skill.SkillType.DEBUFF) || (e.getSkill().getSkillType() == L2Skill.SkillType.REFLECT) || (e.getSkill().getSkillType() == L2Skill.SkillType.HEAL_PERCENT) || (e.getSkill().getSkillType() == L2Skill.SkillType.MANAHEAL_PERCENT)) && !((e.getSkill().getId() > 4360) && (e.getSkill().getId() < 4367))) { // 7s buffs numBuffs++; } } } } return numBuffs; }
int function() { L2Effect[] effects = getAllEffects(); int numBuffs = 0; if (effects != null) { for (L2Effect e : effects) { if (e != null) { if (((e.getSkill().getSkillType() == L2Skill.SkillType.BUFF) (e.getSkill().getSkillType() == L2Skill.SkillType.DEBUFF) (e.getSkill().getSkillType() == L2Skill.SkillType.REFLECT) (e.getSkill().getSkillType() == L2Skill.SkillType.HEAL_PERCENT) (e.getSkill().getSkillType() == L2Skill.SkillType.MANAHEAL_PERCENT)) && !((e.getSkill().getId() > 4360) && (e.getSkill().getId() < 4367))) { numBuffs++; } } } } return numBuffs; }
/** * Return the number of skills of type(Buff, Debuff, HEAL_PERCENT, MANAHEAL_PERCENT) affecting this L2Character.<BR> * <BR> * @return The number of Buffs affecting this L2Character */
Return the number of skills of type(Buff, Debuff, HEAL_PERCENT, MANAHEAL_PERCENT) affecting this L2Character.
getBuffCount
{ "repo_name": "oonym/l2InterludeServer", "path": "L2J_Server/java/net/sf/l2j/gameserver/model/L2Character.java", "license": "gpl-2.0", "size": 231634 }
[ "net.sf.l2j.gameserver.model.L2Skill" ]
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.*;
[ "net.sf.l2j" ]
net.sf.l2j;
1,958,118
public void init(int chunkUid, boolean shouldSpliceIn, boolean reusingExtractor) { if (!reusingExtractor) { audioSampleQueueMappingDone = false; videoSampleQueueMappingDone = false; } this.chunkUid = chunkUid; for (SampleQueue sampleQueue : sampleQueues) { sampleQueue.sourceId(chunkUid); } if (shouldSpliceIn) { for (SampleQueue sampleQueue : sampleQueues) { sampleQueue.splice(); } } } // ExtractorOutput implementation. Called by the loading thread.
void function(int chunkUid, boolean shouldSpliceIn, boolean reusingExtractor) { if (!reusingExtractor) { audioSampleQueueMappingDone = false; videoSampleQueueMappingDone = false; } this.chunkUid = chunkUid; for (SampleQueue sampleQueue : sampleQueues) { sampleQueue.sourceId(chunkUid); } if (shouldSpliceIn) { for (SampleQueue sampleQueue : sampleQueues) { sampleQueue.splice(); } } }
/** * Initializes the wrapper for loading a chunk. * * @param chunkUid The chunk's uid. * @param shouldSpliceIn Whether the samples parsed from the chunk should be spliced into any * samples already queued to the wrapper. * @param reusingExtractor Whether the extractor for the chunk has already been used for preceding * chunks. */
Initializes the wrapper for loading a chunk
init
{ "repo_name": "saki4510t/ExoPlayer", "path": "library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java", "license": "apache-2.0", "size": 46528 }
[ "com.google.android.exoplayer2.source.SampleQueue" ]
import com.google.android.exoplayer2.source.SampleQueue;
import com.google.android.exoplayer2.source.*;
[ "com.google.android" ]
com.google.android;
2,460,127
protected Map createResultsMap() { if (isResultsMapCaseInsensitive()) { return CollectionFactory.createLinkedCaseInsensitiveMapIfPossible(10); } else { return new LinkedHashMap(); } }
Map function() { if (isResultsMapCaseInsensitive()) { return CollectionFactory.createLinkedCaseInsensitiveMapIfPossible(10); } else { return new LinkedHashMap(); } }
/** * Create a Map instance to be used as results map. * <p>If "isResultsMapCaseInsensitive" has been set to true, a linked case-insensitive Map * will be created if possible, else a plain HashMap (see Spring's CollectionFactory). * @return the results Map instance * @see #setResultsMapCaseInsensitive * @see org.springframework.core.CollectionFactory#createLinkedCaseInsensitiveMapIfPossible */
Create a Map instance to be used as results map. If "isResultsMapCaseInsensitive" has been set to true, a linked case-insensitive Map will be created if possible, else a plain HashMap (see Spring's CollectionFactory)
createResultsMap
{ "repo_name": "cbeams-archive/spring-framework-2.5.x", "path": "src/org/springframework/jdbc/core/JdbcTemplate.java", "license": "apache-2.0", "size": 48809 }
[ "java.util.LinkedHashMap", "java.util.Map", "org.springframework.core.CollectionFactory" ]
import java.util.LinkedHashMap; import java.util.Map; import org.springframework.core.CollectionFactory;
import java.util.*; import org.springframework.core.*;
[ "java.util", "org.springframework.core" ]
java.util; org.springframework.core;
1,438,826
static <T> List<T> wrapArgsToListIfNeeded(final T... args) { List<T> out = null; if (ArrayUtils.isNotEmpty(args) && args.length == 1 && args[0] instanceof List){ out = (List<T>) args[0]; }else{ out = Arrays.asList(args); } return out; }
static <T> List<T> wrapArgsToListIfNeeded(final T... args) { List<T> out = null; if (ArrayUtils.isNotEmpty(args) && args.length == 1 && args[0] instanceof List){ out = (List<T>) args[0]; }else{ out = Arrays.asList(args); } return out; }
/** * Wraps arguments passed into a list if necessary. * * Returns the first value as is if it is the only argument and a subtype of `java.util.List` * Otherwise, it calls Arrays.asList on args * @param args arguments as a List */
Wraps arguments passed into a list if necessary. Returns the first value as is if it is the only argument and a subtype of `java.util.List` Otherwise, it calls Arrays.asList on args
wrapArgsToListIfNeeded
{ "repo_name": "jyotikamboj/container", "path": "pf-framework/src/play/src/main/java/play/i18n/Messages.java", "license": "mit", "size": 6539 }
[ "java.util.Arrays", "java.util.List", "org.apache.commons.lang3.ArrayUtils" ]
import java.util.Arrays; import java.util.List; import org.apache.commons.lang3.ArrayUtils;
import java.util.*; import org.apache.commons.lang3.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
2,563,147
//Get the builder from the function final BoundRequestBuilder builder = supplier.call(); //create the observable from scratch return Observable.create(new Observable.OnSubscribe<Response>() {
final BoundRequestBuilder builder = supplier.call(); return Observable.create(new Observable.OnSubscribe<Response>() {
/** * Observe a request execution and emit the response to the observer. * * @param supplier * @return The cold observable (must be subscribed to in order to execute). */
Observe a request execution and emit the response to the observer
toObservable
{ "repo_name": "ooon/async-http-client", "path": "extras/rxjava/src/main/java/org/asynchttpclient/extras/rxjava/AsyncHttpObservable.java", "license": "apache-2.0", "size": 3339 }
[ "org.asynchttpclient.BoundRequestBuilder", "org.asynchttpclient.Response" ]
import org.asynchttpclient.BoundRequestBuilder; import org.asynchttpclient.Response;
import org.asynchttpclient.*;
[ "org.asynchttpclient" ]
org.asynchttpclient;
1,343,217
void deleteUser(User user, String sessionId) throws ServiceException;
void deleteUser(User user, String sessionId) throws ServiceException;
/** * Remove a user * @param user to remove * @throws ServiceException on error */
Remove a user
deleteUser
{ "repo_name": "PloughingAByteField/tiatus", "path": "service/src/main/java/org/tiatus/service/UserService.java", "license": "mit", "size": 1630 }
[ "org.tiatus.entity.User" ]
import org.tiatus.entity.User;
import org.tiatus.entity.*;
[ "org.tiatus.entity" ]
org.tiatus.entity;
1,155,163
public final List<BetweenParticipantFactor> getBetweenParticipantFactorList() { return betweenParticipantFactorList; }
final List<BetweenParticipantFactor> function() { return betweenParticipantFactorList; }
/** * Gets the between participant factor list. * * @return the between participant factor list */
Gets the between participant factor list
getBetweenParticipantFactorList
{ "repo_name": "SampleSizeShop/WebServiceCommon", "path": "src/edu/ucdenver/bios/webservice/common/domain/BetweenParticipantFactorList.java", "license": "gpl-2.0", "size": 4058 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,525,225
public List<AdditionalColumns> additionalColumns() { return this.additionalColumns; }
List<AdditionalColumns> function() { return this.additionalColumns; }
/** * Get specifies the additional columns to be added to source data. Type: array of objects (or Expression with resultType array of objects). * * @return the additionalColumns value */
Get specifies the additional columns to be added to source data. Type: array of objects (or Expression with resultType array of objects)
additionalColumns
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/datafactory/mgmt-v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/ParquetSource.java", "license": "mit", "size": 2412 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,572,312
@Override public void completed(Connection peerConnection) { final Connection connection = context.getConnection(); // Map connections peerConnectionAttribute.set(connection, peerConnection); peerConnectionAttribute.set(peerConnection, connection); // Resume filter chain execution resumeContext(); }
void function(Connection peerConnection) { final Connection connection = context.getConnection(); peerConnectionAttribute.set(connection, peerConnection); peerConnectionAttribute.set(peerConnection, connection); resumeContext(); }
/** * If peer was successfully connected - map both connections to each other. */
If peer was successfully connected - map both connections to each other
completed
{ "repo_name": "JuabyGroup/labs", "path": "labs-rpc/src/main/java/org/glassfish/grizzly/samples/tunnel/TunnelFilter.java", "license": "bsd-3-clause", "size": 8616 }
[ "org.glassfish.grizzly.Connection" ]
import org.glassfish.grizzly.Connection;
import org.glassfish.grizzly.*;
[ "org.glassfish.grizzly" ]
org.glassfish.grizzly;
2,118,894
public float getBlockDensity(Vec3d vec, AxisAlignedBB bb) { double d0 = 1.0D / ((bb.maxX - bb.minX) * 2.0D + 1.0D); double d1 = 1.0D / ((bb.maxY - bb.minY) * 2.0D + 1.0D); double d2 = 1.0D / ((bb.maxZ - bb.minZ) * 2.0D + 1.0D); double d3 = (1.0D - Math.floor(1.0D / d0) * d0) / 2.0D; double d4 = (1.0D - Math.floor(1.0D / d2) * d2) / 2.0D; if (d0 >= 0.0D && d1 >= 0.0D && d2 >= 0.0D) { int i = 0; int j = 0; for (float f = 0.0F; f <= 1.0F; f = (float)((double)f + d0)) { for (float f1 = 0.0F; f1 <= 1.0F; f1 = (float)((double)f1 + d1)) { for (float f2 = 0.0F; f2 <= 1.0F; f2 = (float)((double)f2 + d2)) { double d5 = bb.minX + (bb.maxX - bb.minX) * (double)f; double d6 = bb.minY + (bb.maxY - bb.minY) * (double)f1; double d7 = bb.minZ + (bb.maxZ - bb.minZ) * (double)f2; if (this.rayTraceBlocks(new Vec3d(d5 + d3, d6, d7 + d4), vec) == null) { ++i; } ++j; } } } return (float)i / (float)j; } else { return 0.0F; } }
float function(Vec3d vec, AxisAlignedBB bb) { double d0 = 1.0D / ((bb.maxX - bb.minX) * 2.0D + 1.0D); double d1 = 1.0D / ((bb.maxY - bb.minY) * 2.0D + 1.0D); double d2 = 1.0D / ((bb.maxZ - bb.minZ) * 2.0D + 1.0D); double d3 = (1.0D - Math.floor(1.0D / d0) * d0) / 2.0D; double d4 = (1.0D - Math.floor(1.0D / d2) * d2) / 2.0D; if (d0 >= 0.0D && d1 >= 0.0D && d2 >= 0.0D) { int i = 0; int j = 0; for (float f = 0.0F; f <= 1.0F; f = (float)((double)f + d0)) { for (float f1 = 0.0F; f1 <= 1.0F; f1 = (float)((double)f1 + d1)) { for (float f2 = 0.0F; f2 <= 1.0F; f2 = (float)((double)f2 + d2)) { double d5 = bb.minX + (bb.maxX - bb.minX) * (double)f; double d6 = bb.minY + (bb.maxY - bb.minY) * (double)f1; double d7 = bb.minZ + (bb.maxZ - bb.minZ) * (double)f2; if (this.rayTraceBlocks(new Vec3d(d5 + d3, d6, d7 + d4), vec) == null) { ++i; } ++j; } } } return (float)i / (float)j; } else { return 0.0F; } }
/** * Gets the percentage of real blocks within within a bounding box, along a specified vector. */
Gets the percentage of real blocks within within a bounding box, along a specified vector
getBlockDensity
{ "repo_name": "danielyc/test-1.9.4", "path": "build/tmp/recompileMc/sources/net/minecraft/world/World.java", "license": "gpl-3.0", "size": 141454 }
[ "net.minecraft.util.math.AxisAlignedBB", "net.minecraft.util.math.Vec3d" ]
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.*;
[ "net.minecraft.util" ]
net.minecraft.util;
1,463,009
private List<Row> initListRow(List<Event> listEventWeek) { List<Row> listRow = new ArrayList<Row>(); // il y a au moins une row dans une semaine Row firstRow = new Row(); listRow.add(firstRow); int index = 0; // contrôle s'il existe au moins un événement dans la semaine if (listEventWeek.isEmpty()) { return listRow; } for (Event evt : listEventWeek) { boolean resultAddEventInRow = false; Iterator<Row> itListRow = listRow.iterator(); index = -1; while (!resultAddEventInRow) { // récupération du row courrant Row nextRow = itListRow.next(); index++; // esaie l'ajout de l'event dans le row courrant resultAddEventInRow = addEventInRow(nextRow, evt); if (resultAddEventInRow) { // l'événement à été rajouter au row courrant, on remplace // l'ancien // row par le row courrant // listRow.removeElementAt(index); // listRow.add(index, tmpRow); break; } else { // il est impossible de rajouter l'evt dans le row courrant, on passe // au row suivant s'il existe sinon on le crée if (!(itListRow.hasNext())) { Row newRow = new Row(); resultAddEventInRow = addEventInRow(newRow, evt); // tmp sera // toujours != de // null // listRow.removeElementAt(index); // ajout en dernier; index augmente de 1 index++; listRow.add(newRow); break; } } } } return listRow; }
List<Row> function(List<Event> listEventWeek) { List<Row> listRow = new ArrayList<Row>(); Row firstRow = new Row(); listRow.add(firstRow); int index = 0; if (listEventWeek.isEmpty()) { return listRow; } for (Event evt : listEventWeek) { boolean resultAddEventInRow = false; Iterator<Row> itListRow = listRow.iterator(); index = -1; while (!resultAddEventInRow) { Row nextRow = itListRow.next(); index++; resultAddEventInRow = addEventInRow(nextRow, evt); if (resultAddEventInRow) { break; } else { if (!(itListRow.hasNext())) { Row newRow = new Row(); resultAddEventInRow = addEventInRow(newRow, evt); index++; listRow.add(newRow); break; } } } } return listRow; }
/** * to initialise the object Row in this week. if isn't possible to insert the event in the row, * the new row is created * @param Vector , the list of object Event of current week * @return Vector, the list of object Row of current week * @see com.stratelia.webactiv.util.viewGenerator.html.monthCalendar.Event * @see com.stratelia.webactiv.util.viewGenerator.html.monthCalendar.Row * @see java.util.Vector */
to initialise the object Row in this week. if isn't possible to insert the event in the row, the new row is created
initListRow
{ "repo_name": "NicolasEYSSERIC/Silverpeas-Core", "path": "web-core/src/main/java/com/stratelia/webactiv/util/viewGenerator/html/monthCalendar/Week.java", "license": "agpl-3.0", "size": 8862 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,479,318
public void testGenerateLabel() { StandardCategoryItemLabelGenerator g = new StandardCategoryItemLabelGenerator("{2}", new DecimalFormat("0.000")); DefaultCategoryDataset dataset = new DefaultCategoryDataset(); dataset.addValue(1.0, "R0", "C0"); dataset.addValue(2.0, "R0", "C1"); dataset.addValue(3.0, "R1", "C0"); dataset.addValue(null, "R1", "C1"); String s = g.generateLabel(dataset, 0, 0); assertTrue(s.startsWith("1")); assertTrue(s.endsWith("000")); // try a null value s = g.generateLabel(dataset, 1, 1); assertEquals("-", s); }
void function() { StandardCategoryItemLabelGenerator g = new StandardCategoryItemLabelGenerator("{2}", new DecimalFormat("0.000")); DefaultCategoryDataset dataset = new DefaultCategoryDataset(); dataset.addValue(1.0, "R0", "C0"); dataset.addValue(2.0, "R0", "C1"); dataset.addValue(3.0, "R1", "C0"); dataset.addValue(null, "R1", "C1"); String s = g.generateLabel(dataset, 0, 0); assertTrue(s.startsWith("1")); assertTrue(s.endsWith("000")); s = g.generateLabel(dataset, 1, 1); assertEquals("-", s); }
/** * Some checks for the generalLabel() method. */
Some checks for the generalLabel() method
testGenerateLabel
{ "repo_name": "JSansalone/JFreeChart", "path": "tests/org/jfree/chart/labels/junit/StandardCategoryItemLabelGeneratorTests.java", "license": "lgpl-2.1", "size": 7465 }
[ "java.text.DecimalFormat", "org.jfree.chart.labels.StandardCategoryItemLabelGenerator", "org.jfree.data.category.DefaultCategoryDataset" ]
import java.text.DecimalFormat; import org.jfree.chart.labels.StandardCategoryItemLabelGenerator; import org.jfree.data.category.DefaultCategoryDataset;
import java.text.*; import org.jfree.chart.labels.*; import org.jfree.data.category.*;
[ "java.text", "org.jfree.chart", "org.jfree.data" ]
java.text; org.jfree.chart; org.jfree.data;
1,448,848
public void setUseOutlinePaint(boolean flag) { this.useOutlinePaint = flag; fireChangeEvent(); } public static class State extends XYItemRendererState { public GeneralPath seriesPath; private boolean lastPointGood; public State(PlotRenderingInfo info) { super(info); this.seriesPath = new GeneralPath(); }
void function(boolean flag) { this.useOutlinePaint = flag; fireChangeEvent(); } public static class State extends XYItemRendererState { public GeneralPath seriesPath; private boolean lastPointGood; public State(PlotRenderingInfo info) { super(info); this.seriesPath = new GeneralPath(); }
/** * Sets the flag that controls whether the outline paint is used to draw * shape outlines, and sends a {@link RendererChangeEvent} to all * registered listeners. * <p> * Refer to <code>XYLineAndShapeRendererDemo2.java</code> to see the * effect of this flag. * * @param flag the flag. * * @see #getUseOutlinePaint() */
Sets the flag that controls whether the outline paint is used to draw shape outlines, and sends a <code>RendererChangeEvent</code> to all registered listeners. Refer to <code>XYLineAndShapeRendererDemo2.java</code> to see the effect of this flag
setUseOutlinePaint
{ "repo_name": "simon04/jfreechart", "path": "src/main/java/org/jfree/chart/renderer/xy/XYLineAndShapeRenderer.java", "license": "lgpl-2.1", "size": 47113 }
[ "java.awt.geom.GeneralPath", "org.jfree.chart.plot.PlotRenderingInfo" ]
import java.awt.geom.GeneralPath; import org.jfree.chart.plot.PlotRenderingInfo;
import java.awt.geom.*; import org.jfree.chart.plot.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
2,501,834
protected List<Class<?>> discoverWebServices(WebModule module) throws DeploymentException { Deployable deployable = module.getDeployable(); if (deployable instanceof DeployableJarFile) { return discoverWebServices(((DeployableJarFile) deployable).getJarFile(), AbstractWARWebServiceFinder.class.getClassLoader()); } else if (deployable instanceof DeployableBundle) { return discoverWebServices(((DeployableBundle) deployable).getBundle()); } else { throw new DeploymentException("Unsupported deployable: " + deployable.getClass()); } }
List<Class<?>> function(WebModule module) throws DeploymentException { Deployable deployable = module.getDeployable(); if (deployable instanceof DeployableJarFile) { return discoverWebServices(((DeployableJarFile) deployable).getJarFile(), AbstractWARWebServiceFinder.class.getClassLoader()); } else if (deployable instanceof DeployableBundle) { return discoverWebServices(((DeployableBundle) deployable).getBundle()); } else { throw new DeploymentException(STR + deployable.getClass()); } }
/** * Returns a list of any classes annotated with @WebService or * @WebServiceProvider annotation. */
Returns a list of any classes annotated with @WebService or
discoverWebServices
{ "repo_name": "apache/geronimo", "path": "plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/AbstractWARWebServiceFinder.java", "license": "apache-2.0", "size": 9229 }
[ "java.util.List", "org.apache.geronimo.common.DeploymentException", "org.apache.geronimo.deployment.Deployable", "org.apache.geronimo.deployment.DeployableBundle", "org.apache.geronimo.deployment.DeployableJarFile", "org.apache.geronimo.j2ee.deployment.WebModule" ]
import java.util.List; import org.apache.geronimo.common.DeploymentException; import org.apache.geronimo.deployment.Deployable; import org.apache.geronimo.deployment.DeployableBundle; import org.apache.geronimo.deployment.DeployableJarFile; import org.apache.geronimo.j2ee.deployment.WebModule;
import java.util.*; import org.apache.geronimo.common.*; import org.apache.geronimo.deployment.*; import org.apache.geronimo.j2ee.deployment.*;
[ "java.util", "org.apache.geronimo" ]
java.util; org.apache.geronimo;
2,665,168
private void invokeActivity(String title, int resId) { Intent intent = new Intent(this, MainActivity.class); intent.putExtra(EXTRA_TITLE, title); intent.putExtra(EXTRA_RESOURCE_ID, resId); intent.putExtra(EXTRA_MODE, sideNavigationView.getMode() == Mode.LEFT ? 0 : 1); // all of the other activities on top of it will be closed and this // Intent will be delivered to the (now on top) old activity as a // new Intent. intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); // no animation of transition overridePendingTransition(0, 0); }
void function(String title, int resId) { Intent intent = new Intent(this, MainActivity.class); intent.putExtra(EXTRA_TITLE, title); intent.putExtra(EXTRA_RESOURCE_ID, resId); intent.putExtra(EXTRA_MODE, sideNavigationView.getMode() == Mode.LEFT ? 0 : 1); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); overridePendingTransition(0, 0); }
/** * Start activity from SideNavigation. * * @param title title of Activity * @param resId resource if of background image */
Start activity from SideNavigation
invokeActivity
{ "repo_name": "blitz156/SideNavigation", "path": "sample/src/com/devspark/sidenavigation/sample/MainActivity.java", "license": "apache-2.0", "size": 5495 }
[ "android.content.Intent", "com.devspark.sidenavigation.SideNavigationView" ]
import android.content.Intent; import com.devspark.sidenavigation.SideNavigationView;
import android.content.*; import com.devspark.sidenavigation.*;
[ "android.content", "com.devspark.sidenavigation" ]
android.content; com.devspark.sidenavigation;
182,948
public static <K, V> Map<K, V> wrap(final String key, final Object value, final String key2, final Object value2) { final Map m = wrap(key, value); m.put(key2, value2); return m; }
static <K, V> Map<K, V> function(final String key, final Object value, final String key2, final Object value2) { final Map m = wrap(key, value); m.put(key2, value2); return m; }
/** * Wrap map. * * @param <K> the type parameter * @param <V> the type parameter * @param key the key * @param value the value * @param key2 the key 2 * @param value2 the value 2 * @return the map */
Wrap map
wrap
{ "repo_name": "Unicon/cas", "path": "core/cas-server-core-util/src/main/java/org/apereo/cas/util/CollectionUtils.java", "license": "apache-2.0", "size": 9237 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,772,124
private String normalizeWord(String word) { StringBuilder builder = null; int p = 0; int q = 0; int strLength = word.length(); for (; q < strLength; q++) { // We only normalize if the codepoint is in a given range. // Otherwise, NFKC converts too many things that would cause // confusion. For example, it converts the micro symbol in // extended Latin to the value in the Greek script. We normalize // the Unicode Alphabetic and Arabic A&B Presentation forms. char c = word.charAt(q); if (0xFB00 <= c && c <= 0xFDFF || 0xFE70 <= c && c <= 0xFEFF) { if (builder == null) { builder = new StringBuilder(strLength * 2); } builder.append(word, p, q); // Some fonts map U+FDF2 differently than the Unicode spec. // They add an extra U+0627 character to compensate. // This removes the extra character for those fonts. if (c == 0xFDF2 && q > 0 && (word.charAt(q - 1) == 0x0627 || word.charAt(q - 1) == 0xFE8D)) { builder.append("\u0644\u0644\u0647"); } else { // Trim because some decompositions have an extra space, such as U+FC5E builder.append(Normalizer .normalize(word.substring(q, q + 1), Normalizer.Form.NFKC).trim()); } p = q + 1; } } if (builder == null) { return handleDirection(word); } else { builder.append(word, p, q); return handleDirection(builder.toString()); } }
String function(String word) { StringBuilder builder = null; int p = 0; int q = 0; int strLength = word.length(); for (; q < strLength; q++) { char c = word.charAt(q); if (0xFB00 <= c && c <= 0xFDFF 0xFE70 <= c && c <= 0xFEFF) { if (builder == null) { builder = new StringBuilder(strLength * 2); } builder.append(word, p, q); if (c == 0xFDF2 && q > 0 && (word.charAt(q - 1) == 0x0627 word.charAt(q - 1) == 0xFE8D)) { builder.append(STR); } else { builder.append(Normalizer .normalize(word.substring(q, q + 1), Normalizer.Form.NFKC).trim()); } p = q + 1; } } if (builder == null) { return handleDirection(word); } else { builder.append(word, p, q); return handleDirection(builder.toString()); } }
/** * Normalize certain Unicode characters. For example, convert the single "fi" ligature to "f" and "i". Also * normalises Arabic and Hebrew presentation forms. * * @param word Word to normalize * @return Normalized word */
Normalize certain Unicode characters. For example, convert the single "fi" ligature to "f" and "i". Also normalises Arabic and Hebrew presentation forms
normalizeWord
{ "repo_name": "kalaspuffar/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java", "license": "apache-2.0", "size": 75799 }
[ "java.text.Normalizer" ]
import java.text.Normalizer;
import java.text.*;
[ "java.text" ]
java.text;
2,464,458
public void restoreTransactions(View v) throws IOException{ SoomlaStore.getInstance().restoreTransactions(); }
void function(View v) throws IOException{ SoomlaStore.getInstance().restoreTransactions(); }
/** * Queries Google Play Store's inventory. Upon success, returns a list of all metadata stored * there (the items that have been purchased). The metadata includes each item's name, * description, price, product id, etc... Upon failure, returns error message. * * @param v View * @throws IOException */
Queries Google Play Store's inventory. Upon success, returns a list of all metadata stored there (the items that have been purchased). The metadata includes each item's name, description, price, product id, etc... Upon failure, returns error message
restoreTransactions
{ "repo_name": "vedi/android-store", "path": "SoomlaAndroidExample/src/com/soomla/example/StoreGoodsActivity.java", "license": "mit", "size": 10951 }
[ "android.view.View", "com.soomla.store.SoomlaStore", "java.io.IOException" ]
import android.view.View; import com.soomla.store.SoomlaStore; import java.io.IOException;
import android.view.*; import com.soomla.store.*; import java.io.*;
[ "android.view", "com.soomla.store", "java.io" ]
android.view; com.soomla.store; java.io;
36,468
public LanguageRefSetMember getLanguageRefSetMember(String terminologyId, String terminology, String version) throws Exception;
LanguageRefSetMember function(String terminologyId, String terminology, String version) throws Exception;
/** * Returns the language refset member matching the specified parameters. * * @param terminologyId the id * @param terminology the terminology * @param version the version * @return the languageRefSetMember * @throws Exception if anything goes wrong */
Returns the language refset member matching the specified parameters
getLanguageRefSetMember
{ "repo_name": "WestCoastInformatics/SNOMED-Terminology-Server", "path": "services/src/main/java/org/ihtsdo/otf/ts/services/ContentService.java", "license": "apache-2.0", "size": 38037 }
[ "org.ihtsdo.otf.ts.rf2.LanguageRefSetMember" ]
import org.ihtsdo.otf.ts.rf2.LanguageRefSetMember;
import org.ihtsdo.otf.ts.rf2.*;
[ "org.ihtsdo.otf" ]
org.ihtsdo.otf;
784,342
ResourceFile getWSDL(String apiId, String tenantDomain) throws APIManagementException;
ResourceFile getWSDL(String apiId, String tenantDomain) throws APIManagementException;
/** * Returns the wsdl content in registry specified by the wsdl name. If it is a single WSDL, the content will be * returned as String or if it is an archive, an InputStream pointed to the content will be returned. * * @param apiId api identifier of the API * @param tenantDomain tenant * @return wsdl content matching name if exist else throws an APIManagementException */
Returns the wsdl content in registry specified by the wsdl name. If it is a single WSDL, the content will be returned as String or if it is an archive, an InputStream pointed to the content will be returned
getWSDL
{ "repo_name": "jaadds/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/APIManager.java", "license": "apache-2.0", "size": 36284 }
[ "org.wso2.carbon.apimgt.api.model.ResourceFile" ]
import org.wso2.carbon.apimgt.api.model.ResourceFile;
import org.wso2.carbon.apimgt.api.model.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
2,199,062
public void setConstraints(List<QueryConstraint> constraints) { optionsHolder.setConstraints(constraints); }
void function(List<QueryConstraint> constraints) { optionsHolder.setConstraints(constraints); }
/** * Set a List of constraints in the query options. * @param constraints The list of constraints. */
Set a List of constraints in the query options
setConstraints
{ "repo_name": "omkarudipi/java-client-api", "path": "src/main/java/com/marklogic/client/io/QueryOptionsHandle.java", "license": "apache-2.0", "size": 37180 }
[ "com.marklogic.client.admin.config.QueryOptions", "java.util.List" ]
import com.marklogic.client.admin.config.QueryOptions; import java.util.List;
import com.marklogic.client.admin.config.*; import java.util.*;
[ "com.marklogic.client", "java.util" ]
com.marklogic.client; java.util;
1,621,943
public static Constructor<?> getConstructor(Class clazz, String... parameterTypes) { try { if (parameterTypes == null || parameterTypes.length < 1) { try { return clazz.getConstructor(); } catch (Exception e) { return null; } } Constructor<?>[] constructors = clazz.getConstructors(); for (Constructor<?> c : constructors) { Class<?>[] types = c.getParameterTypes(); if (types.length != parameterTypes.length) { continue; } int i = 0; for (; i < types.length; i++) { if (!types[i].getName().equals(parameterTypes[i])) { break; } } if (i == types.length) { return c; } } } catch (Exception e) { Logger.error( FCS.get("[NoConstructorFound] className:{0}, parameterTypes:{1}", clazz.getName(), parameterTypes)); } return null; }
static Constructor<?> function(Class clazz, String... parameterTypes) { try { if (parameterTypes == null parameterTypes.length < 1) { try { return clazz.getConstructor(); } catch (Exception e) { return null; } } Constructor<?>[] constructors = clazz.getConstructors(); for (Constructor<?> c : constructors) { Class<?>[] types = c.getParameterTypes(); if (types.length != parameterTypes.length) { continue; } int i = 0; for (; i < types.length; i++) { if (!types[i].getName().equals(parameterTypes[i])) { break; } } if (i == types.length) { return c; } } } catch (Exception e) { Logger.error( FCS.get(STR, clazz.getName(), parameterTypes)); } return null; }
/** * get constructor by class and parameter type names. * @param clazz * @param parameterTypes * @return * @author <a href="mailto:[email protected]">Tyler Chen</a> * @since Jul 19, 2016 */
get constructor by class and parameter type names
getConstructor
{ "repo_name": "tylerchen/tc-util-project", "path": "src/main/java/org/iff/infra/util/ReflectHelper.java", "license": "mit", "size": 9765 }
[ "java.lang.reflect.Constructor" ]
import java.lang.reflect.Constructor;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,852,878
static File getQualifiedBinInner(File hadoopHomeDir, String executable) throws FileNotFoundException { String binDirText = "Hadoop bin directory "; File bin = new File(hadoopHomeDir, "bin"); if (!bin.exists()) { throw new FileNotFoundException(addOsText(binDirText + E_DOES_NOT_EXIST + ": " + bin)); } if (!bin.isDirectory()) { throw new FileNotFoundException(addOsText(binDirText + E_NOT_DIRECTORY + ": " + bin)); } File exeFile = new File(bin, executable); if (!exeFile.exists()) { throw new FileNotFoundException( addOsText(E_NO_EXECUTABLE + ": " + exeFile)); } if (!exeFile.isFile()) { throw new FileNotFoundException( addOsText(E_NOT_EXECUTABLE_FILE + ": " + exeFile)); } try { return exeFile.getCanonicalFile(); } catch (IOException e) { // this isn't going to happen, because of all the upfront checks. // so if it does, it gets converted to a FNFE and rethrown throw fileNotFoundException(e.toString(), e); } }
static File getQualifiedBinInner(File hadoopHomeDir, String executable) throws FileNotFoundException { String binDirText = STR; File bin = new File(hadoopHomeDir, "bin"); if (!bin.exists()) { throw new FileNotFoundException(addOsText(binDirText + E_DOES_NOT_EXIST + STR + bin)); } if (!bin.isDirectory()) { throw new FileNotFoundException(addOsText(binDirText + E_NOT_DIRECTORY + STR + bin)); } File exeFile = new File(bin, executable); if (!exeFile.exists()) { throw new FileNotFoundException( addOsText(E_NO_EXECUTABLE + STR + exeFile)); } if (!exeFile.isFile()) { throw new FileNotFoundException( addOsText(E_NOT_EXECUTABLE_FILE + STR + exeFile)); } try { return exeFile.getCanonicalFile(); } catch (IOException e) { throw fileNotFoundException(e.toString(), e); } }
/** * Inner logic of {@link #getQualifiedBin(String)}, accessible * for tests. * @param hadoopHomeDir home directory (assumed to be valid) * @param executable executable * @return path to the binary * @throws FileNotFoundException if the executable was not found/valid */
Inner logic of <code>#getQualifiedBin(String)</code>, accessible for tests
getQualifiedBinInner
{ "repo_name": "nandakumar131/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java", "license": "apache-2.0", "size": 46607 }
[ "java.io.File", "java.io.FileNotFoundException", "java.io.IOException" ]
import java.io.File; import java.io.FileNotFoundException; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
526,186
Region getRegionForDevice(DeviceId deviceId);
Region getRegionForDevice(DeviceId deviceId);
/** * Returns the region to which the specified device belongs. * * @param deviceId device identifier * @return region or null if device does not belong to any region */
Returns the region to which the specified device belongs
getRegionForDevice
{ "repo_name": "VinodKumarS-Huawei/ietf96yang", "path": "core/api/src/main/java/org/onosproject/net/region/RegionService.java", "license": "apache-2.0", "size": 1884 }
[ "org.onosproject.net.DeviceId" ]
import org.onosproject.net.DeviceId;
import org.onosproject.net.*;
[ "org.onosproject.net" ]
org.onosproject.net;
1,010,781
public Component getInitialComponent();
Component function();
/** * Get the initial component from this controller. * * @return Component The initial component */
Get the initial component from this controller
getInitialComponent
{ "repo_name": "RLDevOps/Demo", "path": "src/main/java/org/olat/core/gui/control/Controller.java", "license": "apache-2.0", "size": 2382 }
[ "org.olat.core.gui.components.Component" ]
import org.olat.core.gui.components.Component;
import org.olat.core.gui.components.*;
[ "org.olat.core" ]
org.olat.core;
40,814
public com.mozu.api.contracts.commerceruntime.channels.Channel updateChannel(com.mozu.api.contracts.commerceruntime.channels.Channel channel, String code, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.commerceruntime.channels.Channel> client = com.mozu.api.clients.commerce.ChannelClient.updateChannelClient( channel, code, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); }
com.mozu.api.contracts.commerceruntime.channels.Channel function(com.mozu.api.contracts.commerceruntime.channels.Channel channel, String code, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.commerceruntime.channels.Channel> client = com.mozu.api.clients.commerce.ChannelClient.updateChannelClient( channel, code, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); }
/** * Updates one or more details of a defined channel, including the associated sites. * <p><pre><code> * Channel channel = new Channel(); * Channel channel = channel.updateChannel( channel, code, responseFields); * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. * @param responseFields Use this field to include those fields which are not included by default. * @param channel Properties of a channel used to divide a company into logical business divisions, such as "US Retail," "US Online," or "Amazon." All sites and orders are associated with a channel. * @return com.mozu.api.contracts.commerceruntime.channels.Channel * @see com.mozu.api.contracts.commerceruntime.channels.Channel * @see com.mozu.api.contracts.commerceruntime.channels.Channel */
Updates one or more details of a defined channel, including the associated sites. <code><code> Channel channel = new Channel(); Channel channel = channel.updateChannel( channel, code, responseFields); </code></code>
updateChannel
{ "repo_name": "lakshmi-nair/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/ChannelResource.java", "license": "mit", "size": 10461 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
203,703
public List<Subject> getAllSubjects() { List<Subject> subjectList = new ArrayList<Subject>(); // Select All Query String selectQuery = "SELECT * FROM " + TABLE_ATTENDENCE + ";"; SQLiteDatabase db = this.getReadableDatabase(); Cursor cursor = db.rawQuery(selectQuery, null); // looping through all rows and adding to list if (cursor.moveToFirst()) { do { Subject subject = new Subject(); subject.setID(cursor.getInt(cursor.getColumnIndexOrThrow(KEY_ID))); subject.setName(cursor.getString(cursor.getColumnIndexOrThrow(KEY_NAME))); subject.setClassesHeld(cursor.getFloat(cursor.getColumnIndexOrThrow(KEY_CLASSES_HELD))); subject.setClassesAttended(cursor.getFloat(cursor.getColumnIndexOrThrow(KEY_CLASSES_ATTENDED))); subject.setAbsentDates(cursor.getString(cursor.getColumnIndexOrThrow(KEY_DAYS_ABSENT))); subject.setPercentage(cursor.getFloat(cursor.getColumnIndexOrThrow(KEY_PERCENTAGE))); subject.setProjectedPercentage(cursor.getString(cursor.getColumnIndexOrThrow(KEY_PROJECTED_PERCENTAGE))); // Adding contact to list subjectList.add(subject); } while (cursor.moveToNext()); } db.close(); cursor.close(); return subjectList; }
List<Subject> function() { List<Subject> subjectList = new ArrayList<Subject>(); String selectQuery = STR + TABLE_ATTENDENCE + ";"; SQLiteDatabase db = this.getReadableDatabase(); Cursor cursor = db.rawQuery(selectQuery, null); if (cursor.moveToFirst()) { do { Subject subject = new Subject(); subject.setID(cursor.getInt(cursor.getColumnIndexOrThrow(KEY_ID))); subject.setName(cursor.getString(cursor.getColumnIndexOrThrow(KEY_NAME))); subject.setClassesHeld(cursor.getFloat(cursor.getColumnIndexOrThrow(KEY_CLASSES_HELD))); subject.setClassesAttended(cursor.getFloat(cursor.getColumnIndexOrThrow(KEY_CLASSES_ATTENDED))); subject.setAbsentDates(cursor.getString(cursor.getColumnIndexOrThrow(KEY_DAYS_ABSENT))); subject.setPercentage(cursor.getFloat(cursor.getColumnIndexOrThrow(KEY_PERCENTAGE))); subject.setProjectedPercentage(cursor.getString(cursor.getColumnIndexOrThrow(KEY_PROJECTED_PERCENTAGE))); subjectList.add(subject); } while (cursor.moveToNext()); } db.close(); cursor.close(); return subjectList; }
/** * Get All Subjects * @return subjectList */
Get All Subjects
getAllSubjects
{ "repo_name": "dakshit/upes-academics-1", "path": "attendance/src/main/java/com/shalzz/attendance/DatabaseHandler.java", "license": "gpl-2.0", "size": 25842 }
[ "android.database.Cursor", "android.database.sqlite.SQLiteDatabase", "com.shalzz.attendance.model.Subject", "java.util.ArrayList", "java.util.List" ]
import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import com.shalzz.attendance.model.Subject; import java.util.ArrayList; import java.util.List;
import android.database.*; import android.database.sqlite.*; import com.shalzz.attendance.model.*; import java.util.*;
[ "android.database", "com.shalzz.attendance", "java.util" ]
android.database; com.shalzz.attendance; java.util;
966,852
public void sendAddGraphicalEffectPacket(Entity source, Entity target, int duration, GraphicalEffectRepository.Effect effect) { try { channel.send(PacketDistributor.ALL.noArg(), new AddGraphicalEffect(source, target, duration, effect)); } catch (Exception e) { getBassebombeCraft().reportAndLogException(e); } }
void function(Entity source, Entity target, int duration, GraphicalEffectRepository.Effect effect) { try { channel.send(PacketDistributor.ALL.noArg(), new AddGraphicalEffect(source, target, duration, effect)); } catch (Exception e) { getBassebombeCraft().reportAndLogException(e); } }
/** * Send {@linkplain AddGraphicalEffect} network packet from server to client. * * @param source source entity involved in the effect. * @param target target entity involved in the effect. * @param duration effect duration (in game ticks). * @param effect graphical effect . */
Send AddGraphicalEffect network packet from server to client
sendAddGraphicalEffectPacket
{ "repo_name": "athrane/bassebombecraft", "path": "src/main/java/bassebombecraft/network/NetworkChannelHelper.java", "license": "gpl-3.0", "size": 5881 }
[ "net.minecraft.entity.Entity", "net.minecraft.potion.Effect", "net.minecraftforge.fml.network.PacketDistributor" ]
import net.minecraft.entity.Entity; import net.minecraft.potion.Effect; import net.minecraftforge.fml.network.PacketDistributor;
import net.minecraft.entity.*; import net.minecraft.potion.*; import net.minecraftforge.fml.network.*;
[ "net.minecraft.entity", "net.minecraft.potion", "net.minecraftforge.fml" ]
net.minecraft.entity; net.minecraft.potion; net.minecraftforge.fml;
234,167
public static void runStartupForService(final OpenmrsService service) throws ModuleException { DaemonThread onStartupThread = new DaemonThread() {
static void function(final OpenmrsService service) throws ModuleException { DaemonThread onStartupThread = new DaemonThread() {
/** * Calls the {@link OpenmrsService#onStartup()} method, as a daemon, for an instance * implementing the {@link OpenmrsService} interface. * * @param openmrsService instance implementing the {@link OpenmrsService} interface. * @since 1.9 */
Calls the <code>OpenmrsService#onStartup()</code> method, as a daemon, for an instance implementing the <code>OpenmrsService</code> interface
runStartupForService
{ "repo_name": "milankarunarathne/openmrs-core", "path": "api/src/main/java/org/openmrs/api/context/Daemon.java", "license": "mpl-2.0", "size": 10901 }
[ "org.openmrs.api.OpenmrsService", "org.openmrs.module.ModuleException" ]
import org.openmrs.api.OpenmrsService; import org.openmrs.module.ModuleException;
import org.openmrs.api.*; import org.openmrs.module.*;
[ "org.openmrs.api", "org.openmrs.module" ]
org.openmrs.api; org.openmrs.module;
1,401,710
private static Module globalFrame( List<RuleInfoWrapper> ruleInfoList, List<ProviderInfoWrapper> providerInfoList, List<AspectInfoWrapper> aspectInfoList) { TopLevelBootstrap topLevelBootstrap = new TopLevelBootstrap( new FakeBuildApiGlobals(), new FakeSkylarkAttrApi(), new FakeSkylarkCommandLineApi(), new FakeSkylarkNativeModuleApi(), new FakeSkylarkRuleFunctionsApi(ruleInfoList, providerInfoList, aspectInfoList), new FakeStructProviderApi(), new FakeOutputGroupInfoProvider(), new FakeActionsInfoProvider(), new FakeDefaultInfoProvider()); AndroidBootstrap androidBootstrap = new AndroidBootstrap( new FakeAndroidSkylarkCommon(), new FakeApkInfoProvider(), new FakeAndroidInstrumentationInfoProvider(), new FakeAndroidDeviceBrokerInfoProvider(), new FakeAndroidResourcesInfoProvider(), new FakeAndroidNativeLibsInfoProvider(), new FakeAndroidApplicationResourceInfoProvider()); AppleBootstrap appleBootstrap = new AppleBootstrap(new FakeAppleCommon()); ConfigBootstrap configBootstrap = new ConfigBootstrap( new FakeConfigSkylarkCommon(), new FakeConfigApi(), new FakeConfigGlobalLibrary()); CcBootstrap ccBootstrap = new CcBootstrap( new FakeCcModule(), new FakeCcInfo.Provider(), new FakeCcToolchainConfigInfo.Provider(), new FakePyWrapCcHelper(), new FakeGoWrapCcHelper(), new FakePyWrapCcInfo.Provider(), new FakePyCcLinkParamsProvider.Provider()); JavaBootstrap javaBootstrap = new JavaBootstrap( new FakeJavaCommon(), new FakeJavaInfoProvider(), new FakeJavaProtoCommon(), new FakeJavaCcLinkParamsProvider.Provider()); PlatformBootstrap platformBootstrap = new PlatformBootstrap(new FakePlatformCommon()); ProtoBootstrap protoBootstrap = new ProtoBootstrap( new FakeProtoInfoApiProvider(), new FakeProtoModule(), new SkylarkAspectStub(), new ProviderStub()); PyBootstrap pyBootstrap = new PyBootstrap( new FakePyInfoProvider(), new FakePyRuntimeInfoProvider(), new FakePyStarlarkTransitions()); RepositoryBootstrap repositoryBootstrap = new RepositoryBootstrap(new FakeRepositoryModule(ruleInfoList)); TestingBootstrap testingBootstrap = new TestingBootstrap( new FakeTestingModule(), new FakeCoverageCommon(), new FakeAnalysisFailureInfoProvider(), new FakeAnalysisTestResultInfoProvider()); ImmutableMap.Builder<String, Object> envBuilder = ImmutableMap.builder(); Runtime.addConstantsToBuilder(envBuilder); MethodLibrary.addBindingsToBuilder(envBuilder); topLevelBootstrap.addBindingsToBuilder(envBuilder); androidBootstrap.addBindingsToBuilder(envBuilder); appleBootstrap.addBindingsToBuilder(envBuilder); ccBootstrap.addBindingsToBuilder(envBuilder); configBootstrap.addBindingsToBuilder(envBuilder); javaBootstrap.addBindingsToBuilder(envBuilder); platformBootstrap.addBindingsToBuilder(envBuilder); protoBootstrap.addBindingsToBuilder(envBuilder); pyBootstrap.addBindingsToBuilder(envBuilder); repositoryBootstrap.addBindingsToBuilder(envBuilder); testingBootstrap.addBindingsToBuilder(envBuilder); addNonBootstrapGlobals(envBuilder); return Module.createForBuiltins(envBuilder.build()); } // TODO(cparsons): Remove this constant by migrating the contained symbols to bootstraps. private static final String[] nonBootstrapGlobals = { "android_data", AndroidDex2OatInfoApi.NAME, AndroidManifestInfoApi.NAME, AndroidAssetsInfoApi.NAME, AndroidLibraryAarInfoApi.NAME, AndroidProguardInfoApi.NAME, AndroidIdlProviderApi.NAME, AndroidIdeInfoProviderApi.NAME, AndroidPreDexJarProviderApi.NAME, UsesDataBindingProviderApi.NAME, AndroidCcLinkParamsProviderApi.NAME, AndroidLibraryResourceClassJarProviderApi.NAME, AndroidSdkProviderApi.NAME, AndroidFeatureFlagSetProviderApi.NAME, ProguardMappingProviderApi.NAME, GeneratedExtensionRegistryProviderApi.NAME, AndroidBinaryDataInfoApi.NAME, JsModuleInfoApi.NAME, "JsInfo", "PintoModuleProvider" };
static Module function( List<RuleInfoWrapper> ruleInfoList, List<ProviderInfoWrapper> providerInfoList, List<AspectInfoWrapper> aspectInfoList) { TopLevelBootstrap topLevelBootstrap = new TopLevelBootstrap( new FakeBuildApiGlobals(), new FakeSkylarkAttrApi(), new FakeSkylarkCommandLineApi(), new FakeSkylarkNativeModuleApi(), new FakeSkylarkRuleFunctionsApi(ruleInfoList, providerInfoList, aspectInfoList), new FakeStructProviderApi(), new FakeOutputGroupInfoProvider(), new FakeActionsInfoProvider(), new FakeDefaultInfoProvider()); AndroidBootstrap androidBootstrap = new AndroidBootstrap( new FakeAndroidSkylarkCommon(), new FakeApkInfoProvider(), new FakeAndroidInstrumentationInfoProvider(), new FakeAndroidDeviceBrokerInfoProvider(), new FakeAndroidResourcesInfoProvider(), new FakeAndroidNativeLibsInfoProvider(), new FakeAndroidApplicationResourceInfoProvider()); AppleBootstrap appleBootstrap = new AppleBootstrap(new FakeAppleCommon()); ConfigBootstrap configBootstrap = new ConfigBootstrap( new FakeConfigSkylarkCommon(), new FakeConfigApi(), new FakeConfigGlobalLibrary()); CcBootstrap ccBootstrap = new CcBootstrap( new FakeCcModule(), new FakeCcInfo.Provider(), new FakeCcToolchainConfigInfo.Provider(), new FakePyWrapCcHelper(), new FakeGoWrapCcHelper(), new FakePyWrapCcInfo.Provider(), new FakePyCcLinkParamsProvider.Provider()); JavaBootstrap javaBootstrap = new JavaBootstrap( new FakeJavaCommon(), new FakeJavaInfoProvider(), new FakeJavaProtoCommon(), new FakeJavaCcLinkParamsProvider.Provider()); PlatformBootstrap platformBootstrap = new PlatformBootstrap(new FakePlatformCommon()); ProtoBootstrap protoBootstrap = new ProtoBootstrap( new FakeProtoInfoApiProvider(), new FakeProtoModule(), new SkylarkAspectStub(), new ProviderStub()); PyBootstrap pyBootstrap = new PyBootstrap( new FakePyInfoProvider(), new FakePyRuntimeInfoProvider(), new FakePyStarlarkTransitions()); RepositoryBootstrap repositoryBootstrap = new RepositoryBootstrap(new FakeRepositoryModule(ruleInfoList)); TestingBootstrap testingBootstrap = new TestingBootstrap( new FakeTestingModule(), new FakeCoverageCommon(), new FakeAnalysisFailureInfoProvider(), new FakeAnalysisTestResultInfoProvider()); ImmutableMap.Builder<String, Object> envBuilder = ImmutableMap.builder(); Runtime.addConstantsToBuilder(envBuilder); MethodLibrary.addBindingsToBuilder(envBuilder); topLevelBootstrap.addBindingsToBuilder(envBuilder); androidBootstrap.addBindingsToBuilder(envBuilder); appleBootstrap.addBindingsToBuilder(envBuilder); ccBootstrap.addBindingsToBuilder(envBuilder); configBootstrap.addBindingsToBuilder(envBuilder); javaBootstrap.addBindingsToBuilder(envBuilder); platformBootstrap.addBindingsToBuilder(envBuilder); protoBootstrap.addBindingsToBuilder(envBuilder); pyBootstrap.addBindingsToBuilder(envBuilder); repositoryBootstrap.addBindingsToBuilder(envBuilder); testingBootstrap.addBindingsToBuilder(envBuilder); addNonBootstrapGlobals(envBuilder); return Module.createForBuiltins(envBuilder.build()); } private static final String[] nonBootstrapGlobals = { STR, AndroidDex2OatInfoApi.NAME, AndroidManifestInfoApi.NAME, AndroidAssetsInfoApi.NAME, AndroidLibraryAarInfoApi.NAME, AndroidProguardInfoApi.NAME, AndroidIdlProviderApi.NAME, AndroidIdeInfoProviderApi.NAME, AndroidPreDexJarProviderApi.NAME, UsesDataBindingProviderApi.NAME, AndroidCcLinkParamsProviderApi.NAME, AndroidLibraryResourceClassJarProviderApi.NAME, AndroidSdkProviderApi.NAME, AndroidFeatureFlagSetProviderApi.NAME, ProguardMappingProviderApi.NAME, GeneratedExtensionRegistryProviderApi.NAME, AndroidBinaryDataInfoApi.NAME, JsModuleInfoApi.NAME, STR, STR };
/** * Initialize and return a global frame containing the fake build API. * * @param ruleInfoList the list of {@link RuleInfo} objects, to which rule() invocation * information will be added * @param providerInfoList the list of {@link ProviderInfo} objects, to which provider() * invocation information will be added */
Initialize and return a global frame containing the fake build API
globalFrame
{ "repo_name": "aehlig/bazel", "path": "src/main/java/com/google/devtools/build/skydoc/SkydocMain.java", "license": "apache-2.0", "size": 32372 }
[ "com.google.common.collect.ImmutableMap", "com.google.devtools.build.lib.skylarkbuildapi.TopLevelBootstrap", "com.google.devtools.build.lib.skylarkbuildapi.android.AndroidAssetsInfoApi", "com.google.devtools.build.lib.skylarkbuildapi.android.AndroidBinaryDataInfoApi", "com.google.devtools.build.lib.skylarkbuildapi.android.AndroidBootstrap", "com.google.devtools.build.lib.skylarkbuildapi.android.AndroidCcLinkParamsProviderApi", "com.google.devtools.build.lib.skylarkbuildapi.android.AndroidDex2OatInfoApi", "com.google.devtools.build.lib.skylarkbuildapi.android.AndroidFeatureFlagSetProviderApi", "com.google.devtools.build.lib.skylarkbuildapi.android.AndroidIdeInfoProviderApi", "com.google.devtools.build.lib.skylarkbuildapi.android.AndroidIdlProviderApi", "com.google.devtools.build.lib.skylarkbuildapi.android.AndroidLibraryAarInfoApi", "com.google.devtools.build.lib.skylarkbuildapi.android.AndroidLibraryResourceClassJarProviderApi", "com.google.devtools.build.lib.skylarkbuildapi.android.AndroidManifestInfoApi", "com.google.devtools.build.lib.skylarkbuildapi.android.AndroidPreDexJarProviderApi", "com.google.devtools.build.lib.skylarkbuildapi.android.AndroidProguardInfoApi", "com.google.devtools.build.lib.skylarkbuildapi.android.AndroidSdkProviderApi", "com.google.devtools.build.lib.skylarkbuildapi.android.ProguardMappingProviderApi", "com.google.devtools.build.lib.skylarkbuildapi.android.UsesDataBindingProviderApi", "com.google.devtools.build.lib.skylarkbuildapi.apple.AppleBootstrap", "com.google.devtools.build.lib.skylarkbuildapi.config.ConfigBootstrap", "com.google.devtools.build.lib.skylarkbuildapi.cpp.CcBootstrap", "com.google.devtools.build.lib.skylarkbuildapi.java.GeneratedExtensionRegistryProviderApi", "com.google.devtools.build.lib.skylarkbuildapi.java.JavaBootstrap", "com.google.devtools.build.lib.skylarkbuildapi.javascript.JsModuleInfoApi", "com.google.devtools.build.lib.skylarkbuildapi.platform.PlatformBootstrap", "com.google.devtools.build.lib.skylarkbuildapi.proto.ProtoBootstrap", "com.google.devtools.build.lib.skylarkbuildapi.python.PyBootstrap", "com.google.devtools.build.lib.skylarkbuildapi.repository.RepositoryBootstrap", "com.google.devtools.build.lib.skylarkbuildapi.stubs.ProviderStub", "com.google.devtools.build.lib.skylarkbuildapi.stubs.SkylarkAspectStub", "com.google.devtools.build.lib.skylarkbuildapi.test.TestingBootstrap", "com.google.devtools.build.lib.syntax.MethodLibrary", "com.google.devtools.build.lib.syntax.Module", "com.google.devtools.build.lib.syntax.Runtime", "com.google.devtools.build.skydoc.fakebuildapi.FakeActionsInfoProvider", "com.google.devtools.build.skydoc.fakebuildapi.FakeBuildApiGlobals", "com.google.devtools.build.skydoc.fakebuildapi.FakeConfigApi", "com.google.devtools.build.skydoc.fakebuildapi.FakeDefaultInfoProvider", "com.google.devtools.build.skydoc.fakebuildapi.FakeOutputGroupInfo", "com.google.devtools.build.skydoc.fakebuildapi.FakeSkylarkAttrApi", "com.google.devtools.build.skydoc.fakebuildapi.FakeSkylarkCommandLineApi", "com.google.devtools.build.skydoc.fakebuildapi.FakeSkylarkNativeModuleApi", "com.google.devtools.build.skydoc.fakebuildapi.FakeSkylarkRuleFunctionsApi", "com.google.devtools.build.skydoc.fakebuildapi.FakeStructApi", "com.google.devtools.build.skydoc.fakebuildapi.android.FakeAndroidApplicationResourceInfo", "com.google.devtools.build.skydoc.fakebuildapi.android.FakeAndroidDeviceBrokerInfo", "com.google.devtools.build.skydoc.fakebuildapi.android.FakeAndroidInstrumentationInfo", "com.google.devtools.build.skydoc.fakebuildapi.android.FakeAndroidNativeLibsInfo", "com.google.devtools.build.skydoc.fakebuildapi.android.FakeAndroidResourcesInfo", "com.google.devtools.build.skydoc.fakebuildapi.android.FakeAndroidSkylarkCommon", "com.google.devtools.build.skydoc.fakebuildapi.android.FakeApkInfo", "com.google.devtools.build.skydoc.fakebuildapi.apple.FakeAppleCommon", "com.google.devtools.build.skydoc.fakebuildapi.config.FakeConfigGlobalLibrary", "com.google.devtools.build.skydoc.fakebuildapi.config.FakeConfigSkylarkCommon", "com.google.devtools.build.skydoc.fakebuildapi.cpp.FakeCcInfo", "com.google.devtools.build.skydoc.fakebuildapi.cpp.FakeCcModule", "com.google.devtools.build.skydoc.fakebuildapi.cpp.FakeCcToolchainConfigInfo", "com.google.devtools.build.skydoc.fakebuildapi.cpp.FakeGoWrapCcHelper", "com.google.devtools.build.skydoc.fakebuildapi.cpp.FakePyCcLinkParamsProvider", "com.google.devtools.build.skydoc.fakebuildapi.cpp.FakePyWrapCcHelper", "com.google.devtools.build.skydoc.fakebuildapi.cpp.FakePyWrapCcInfo", "com.google.devtools.build.skydoc.fakebuildapi.java.FakeJavaCcLinkParamsProvider", "com.google.devtools.build.skydoc.fakebuildapi.java.FakeJavaCommon", "com.google.devtools.build.skydoc.fakebuildapi.java.FakeJavaInfo", "com.google.devtools.build.skydoc.fakebuildapi.java.FakeJavaProtoCommon", "com.google.devtools.build.skydoc.fakebuildapi.platform.FakePlatformCommon", "com.google.devtools.build.skydoc.fakebuildapi.proto.FakeProtoInfoApiProvider", "com.google.devtools.build.skydoc.fakebuildapi.proto.FakeProtoModule", "com.google.devtools.build.skydoc.fakebuildapi.python.FakePyInfo", "com.google.devtools.build.skydoc.fakebuildapi.python.FakePyRuntimeInfo", "com.google.devtools.build.skydoc.fakebuildapi.python.FakePyStarlarkTransitions", "com.google.devtools.build.skydoc.fakebuildapi.repository.FakeRepositoryModule", "com.google.devtools.build.skydoc.fakebuildapi.test.FakeAnalysisFailureInfoProvider", "com.google.devtools.build.skydoc.fakebuildapi.test.FakeAnalysisTestResultInfoProvider", "com.google.devtools.build.skydoc.fakebuildapi.test.FakeCoverageCommon", "com.google.devtools.build.skydoc.fakebuildapi.test.FakeTestingModule", "com.google.devtools.build.skydoc.rendering.AspectInfoWrapper", "com.google.devtools.build.skydoc.rendering.ProviderInfoWrapper", "com.google.devtools.build.skydoc.rendering.RuleInfoWrapper", "java.util.List" ]
import com.google.common.collect.ImmutableMap; import com.google.devtools.build.lib.skylarkbuildapi.TopLevelBootstrap; import com.google.devtools.build.lib.skylarkbuildapi.android.AndroidAssetsInfoApi; import com.google.devtools.build.lib.skylarkbuildapi.android.AndroidBinaryDataInfoApi; import com.google.devtools.build.lib.skylarkbuildapi.android.AndroidBootstrap; import com.google.devtools.build.lib.skylarkbuildapi.android.AndroidCcLinkParamsProviderApi; import com.google.devtools.build.lib.skylarkbuildapi.android.AndroidDex2OatInfoApi; import com.google.devtools.build.lib.skylarkbuildapi.android.AndroidFeatureFlagSetProviderApi; import com.google.devtools.build.lib.skylarkbuildapi.android.AndroidIdeInfoProviderApi; import com.google.devtools.build.lib.skylarkbuildapi.android.AndroidIdlProviderApi; import com.google.devtools.build.lib.skylarkbuildapi.android.AndroidLibraryAarInfoApi; import com.google.devtools.build.lib.skylarkbuildapi.android.AndroidLibraryResourceClassJarProviderApi; import com.google.devtools.build.lib.skylarkbuildapi.android.AndroidManifestInfoApi; import com.google.devtools.build.lib.skylarkbuildapi.android.AndroidPreDexJarProviderApi; import com.google.devtools.build.lib.skylarkbuildapi.android.AndroidProguardInfoApi; import com.google.devtools.build.lib.skylarkbuildapi.android.AndroidSdkProviderApi; import com.google.devtools.build.lib.skylarkbuildapi.android.ProguardMappingProviderApi; import com.google.devtools.build.lib.skylarkbuildapi.android.UsesDataBindingProviderApi; import com.google.devtools.build.lib.skylarkbuildapi.apple.AppleBootstrap; import com.google.devtools.build.lib.skylarkbuildapi.config.ConfigBootstrap; import com.google.devtools.build.lib.skylarkbuildapi.cpp.CcBootstrap; import com.google.devtools.build.lib.skylarkbuildapi.java.GeneratedExtensionRegistryProviderApi; import com.google.devtools.build.lib.skylarkbuildapi.java.JavaBootstrap; import com.google.devtools.build.lib.skylarkbuildapi.javascript.JsModuleInfoApi; import com.google.devtools.build.lib.skylarkbuildapi.platform.PlatformBootstrap; import com.google.devtools.build.lib.skylarkbuildapi.proto.ProtoBootstrap; import com.google.devtools.build.lib.skylarkbuildapi.python.PyBootstrap; import com.google.devtools.build.lib.skylarkbuildapi.repository.RepositoryBootstrap; import com.google.devtools.build.lib.skylarkbuildapi.stubs.ProviderStub; import com.google.devtools.build.lib.skylarkbuildapi.stubs.SkylarkAspectStub; import com.google.devtools.build.lib.skylarkbuildapi.test.TestingBootstrap; import com.google.devtools.build.lib.syntax.MethodLibrary; import com.google.devtools.build.lib.syntax.Module; import com.google.devtools.build.lib.syntax.Runtime; import com.google.devtools.build.skydoc.fakebuildapi.FakeActionsInfoProvider; import com.google.devtools.build.skydoc.fakebuildapi.FakeBuildApiGlobals; import com.google.devtools.build.skydoc.fakebuildapi.FakeConfigApi; import com.google.devtools.build.skydoc.fakebuildapi.FakeDefaultInfoProvider; import com.google.devtools.build.skydoc.fakebuildapi.FakeOutputGroupInfo; import com.google.devtools.build.skydoc.fakebuildapi.FakeSkylarkAttrApi; import com.google.devtools.build.skydoc.fakebuildapi.FakeSkylarkCommandLineApi; import com.google.devtools.build.skydoc.fakebuildapi.FakeSkylarkNativeModuleApi; import com.google.devtools.build.skydoc.fakebuildapi.FakeSkylarkRuleFunctionsApi; import com.google.devtools.build.skydoc.fakebuildapi.FakeStructApi; import com.google.devtools.build.skydoc.fakebuildapi.android.FakeAndroidApplicationResourceInfo; import com.google.devtools.build.skydoc.fakebuildapi.android.FakeAndroidDeviceBrokerInfo; import com.google.devtools.build.skydoc.fakebuildapi.android.FakeAndroidInstrumentationInfo; import com.google.devtools.build.skydoc.fakebuildapi.android.FakeAndroidNativeLibsInfo; import com.google.devtools.build.skydoc.fakebuildapi.android.FakeAndroidResourcesInfo; import com.google.devtools.build.skydoc.fakebuildapi.android.FakeAndroidSkylarkCommon; import com.google.devtools.build.skydoc.fakebuildapi.android.FakeApkInfo; import com.google.devtools.build.skydoc.fakebuildapi.apple.FakeAppleCommon; import com.google.devtools.build.skydoc.fakebuildapi.config.FakeConfigGlobalLibrary; import com.google.devtools.build.skydoc.fakebuildapi.config.FakeConfigSkylarkCommon; import com.google.devtools.build.skydoc.fakebuildapi.cpp.FakeCcInfo; import com.google.devtools.build.skydoc.fakebuildapi.cpp.FakeCcModule; import com.google.devtools.build.skydoc.fakebuildapi.cpp.FakeCcToolchainConfigInfo; import com.google.devtools.build.skydoc.fakebuildapi.cpp.FakeGoWrapCcHelper; import com.google.devtools.build.skydoc.fakebuildapi.cpp.FakePyCcLinkParamsProvider; import com.google.devtools.build.skydoc.fakebuildapi.cpp.FakePyWrapCcHelper; import com.google.devtools.build.skydoc.fakebuildapi.cpp.FakePyWrapCcInfo; import com.google.devtools.build.skydoc.fakebuildapi.java.FakeJavaCcLinkParamsProvider; import com.google.devtools.build.skydoc.fakebuildapi.java.FakeJavaCommon; import com.google.devtools.build.skydoc.fakebuildapi.java.FakeJavaInfo; import com.google.devtools.build.skydoc.fakebuildapi.java.FakeJavaProtoCommon; import com.google.devtools.build.skydoc.fakebuildapi.platform.FakePlatformCommon; import com.google.devtools.build.skydoc.fakebuildapi.proto.FakeProtoInfoApiProvider; import com.google.devtools.build.skydoc.fakebuildapi.proto.FakeProtoModule; import com.google.devtools.build.skydoc.fakebuildapi.python.FakePyInfo; import com.google.devtools.build.skydoc.fakebuildapi.python.FakePyRuntimeInfo; import com.google.devtools.build.skydoc.fakebuildapi.python.FakePyStarlarkTransitions; import com.google.devtools.build.skydoc.fakebuildapi.repository.FakeRepositoryModule; import com.google.devtools.build.skydoc.fakebuildapi.test.FakeAnalysisFailureInfoProvider; import com.google.devtools.build.skydoc.fakebuildapi.test.FakeAnalysisTestResultInfoProvider; import com.google.devtools.build.skydoc.fakebuildapi.test.FakeCoverageCommon; import com.google.devtools.build.skydoc.fakebuildapi.test.FakeTestingModule; import com.google.devtools.build.skydoc.rendering.AspectInfoWrapper; import com.google.devtools.build.skydoc.rendering.ProviderInfoWrapper; import com.google.devtools.build.skydoc.rendering.RuleInfoWrapper; import java.util.List;
import com.google.common.collect.*; import com.google.devtools.build.lib.skylarkbuildapi.*; import com.google.devtools.build.lib.skylarkbuildapi.android.*; import com.google.devtools.build.lib.skylarkbuildapi.apple.*; import com.google.devtools.build.lib.skylarkbuildapi.config.*; import com.google.devtools.build.lib.skylarkbuildapi.cpp.*; import com.google.devtools.build.lib.skylarkbuildapi.java.*; import com.google.devtools.build.lib.skylarkbuildapi.javascript.*; import com.google.devtools.build.lib.skylarkbuildapi.platform.*; import com.google.devtools.build.lib.skylarkbuildapi.proto.*; import com.google.devtools.build.lib.skylarkbuildapi.python.*; import com.google.devtools.build.lib.skylarkbuildapi.repository.*; import com.google.devtools.build.lib.skylarkbuildapi.stubs.*; import com.google.devtools.build.lib.skylarkbuildapi.test.*; import com.google.devtools.build.lib.syntax.*; import com.google.devtools.build.skydoc.fakebuildapi.*; import com.google.devtools.build.skydoc.fakebuildapi.android.*; import com.google.devtools.build.skydoc.fakebuildapi.apple.*; import com.google.devtools.build.skydoc.fakebuildapi.config.*; import com.google.devtools.build.skydoc.fakebuildapi.cpp.*; import com.google.devtools.build.skydoc.fakebuildapi.java.*; import com.google.devtools.build.skydoc.fakebuildapi.platform.*; import com.google.devtools.build.skydoc.fakebuildapi.proto.*; import com.google.devtools.build.skydoc.fakebuildapi.python.*; import com.google.devtools.build.skydoc.fakebuildapi.repository.*; import com.google.devtools.build.skydoc.fakebuildapi.test.*; import com.google.devtools.build.skydoc.rendering.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
388,879
public void register(final Class<? extends Decorator> decoratorType, final Factory<?>... factories);
void function(final Class<? extends Decorator> decoratorType, final Factory<?>... factories);
/** * Register all the given FactoryProviders after being decorated by a * decorator of the given decorator type. The decorator should be previously * registered * * Example: register(SingletonScope.class, ...); * * @param decoratorType * the decorator to be applied to all the providers * @param providerInfos * a list of factories to be registered in the container */
Register all the given FactoryProviders after being decorated by a decorator of the given decorator type. The decorator should be previously registered Example: register(SingletonScope.class, ...)
register
{ "repo_name": "mohitvargia/smsgateway-android", "path": "lib/com/calclab/suco/client/ioc/module/ModuleBuilder.java", "license": "agpl-3.0", "size": 4514 }
[ "com.calclab.suco.client.ioc.Decorator" ]
import com.calclab.suco.client.ioc.Decorator;
import com.calclab.suco.client.ioc.*;
[ "com.calclab.suco" ]
com.calclab.suco;
2,865,068
@Message(id = 259, value = "Could not find method %s.%s referenced in ejb-jar.xml") DeploymentUnitProcessingException failToFindMethodInEjbJarXml(String name, String methodName);
@Message(id = 259, value = STR) DeploymentUnitProcessingException failToFindMethodInEjbJarXml(String name, String methodName);
/** * Creates an exception indicating Could not find method specified referenced in ejb-jar.xml * * @return a {@link DeploymentUnitProcessingException} for the error. */
Creates an exception indicating Could not find method specified referenced in ejb-jar.xml
failToFindMethodInEjbJarXml
{ "repo_name": "xasx/wildfly", "path": "ejb3/src/main/java/org/jboss/as/ejb3/logging/EjbLogger.java", "license": "lgpl-2.1", "size": 147231 }
[ "org.jboss.as.server.deployment.DeploymentUnitProcessingException", "org.jboss.logging.annotations.Message" ]
import org.jboss.as.server.deployment.DeploymentUnitProcessingException; import org.jboss.logging.annotations.Message;
import org.jboss.as.server.deployment.*; import org.jboss.logging.annotations.*;
[ "org.jboss.as", "org.jboss.logging" ]
org.jboss.as; org.jboss.logging;
49,810
public static boolean isEmpty(Map map) { return (map == null || map.isEmpty()); }
static boolean function(Map map) { return (map == null map.isEmpty()); }
/** * Return {@code true} if the supplied Map is {@code null} or empty. Otherwise, return {@code * false}. * * @param map the Map to check * @return whether the given Map is empty */
Return true if the supplied Map is null or empty. Otherwise, return false
isEmpty
{ "repo_name": "sbg/sevenbridges-java", "path": "api/src/main/java/com/sevenbridges/apiclient/lang/Collections.java", "license": "apache-2.0", "size": 13517 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
237,130
public boolean shouldCollide(Body other) { // At least one body should be dynamic. if (m_type != BodyType.DYNAMIC && other.m_type != BodyType.DYNAMIC) { return false; } // Does a joint prevent collision? for (JointEdge jn = m_jointList; jn != null; jn = jn.next) { if (jn.other == other) { if (jn.joint.m_collideConnected == false) { return false; } } } return true; }
boolean function(Body other) { if (m_type != BodyType.DYNAMIC && other.m_type != BodyType.DYNAMIC) { return false; } for (JointEdge jn = m_jointList; jn != null; jn = jn.next) { if (jn.other == other) { if (jn.joint.m_collideConnected == false) { return false; } } } return true; }
/** * This is used to prevent connected bodies from colliding. * It may lie, depending on the collideConnected flag. * * @param other * @return */
This is used to prevent connected bodies from colliding. It may lie, depending on the collideConnected flag
shouldCollide
{ "repo_name": "dragome/dragome-examples", "path": "dragome-jbox2d-examples/src/main/java/org/jbox2d/dynamics/Body.java", "license": "gpl-3.0", "size": 30517 }
[ "org.jbox2d.dynamics.joints.JointEdge" ]
import org.jbox2d.dynamics.joints.JointEdge;
import org.jbox2d.dynamics.joints.*;
[ "org.jbox2d.dynamics" ]
org.jbox2d.dynamics;
870,522
EReference getSetReference_Features();
EReference getSetReference_Features();
/** * Returns the meta object for the reference '{@link org.tud.inf.st.mbt.features.SetReference#getFeatures <em>Features</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Features</em>'. * @see org.tud.inf.st.mbt.features.SetReference#getFeatures() * @see #getSetReference() * @generated */
Returns the meta object for the reference '<code>org.tud.inf.st.mbt.features.SetReference#getFeatures Features</code>'.
getSetReference_Features
{ "repo_name": "paetti1988/qmate", "path": "MATE/org.tud.inf.st.mbt.emf/src-gen/org/tud/inf/st/mbt/features/FeaturesPackage.java", "license": "apache-2.0", "size": 42307 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
406,008
private boolean isResToEditVersionableV2() { try { if (ResourceAttributeHelper.hasAttributeImplemented(getResToEdit(), "Versionable", "2")) { return true; } } catch (Exception e) { return false; } return false; }
boolean function() { try { if (ResourceAttributeHelper.hasAttributeImplemented(getResToEdit(), STR, "2")) { return true; } } catch (Exception e) { return false; } return false; }
/** * Check if resource is VersionableV2 */
Check if resource is VersionableV2
isResToEditVersionableV2
{ "repo_name": "wyona/yanel", "path": "src/resources/tinymce/src/java/org/wyona/yanel/impl/resources/tinymce/TinyMCEResource.java", "license": "apache-2.0", "size": 19597 }
[ "org.wyona.yanel.core.util.ResourceAttributeHelper" ]
import org.wyona.yanel.core.util.ResourceAttributeHelper;
import org.wyona.yanel.core.util.*;
[ "org.wyona.yanel" ]
org.wyona.yanel;
729,863
public Map<String, Double> getOutliers() { // This maps the metric name to the aggregate latency. // The metric name is the datanode ID. final Map<String, Double> stats = sendPacketDownstreamRollingAverages.getStats( minOutlierDetectionSamples); LOG.trace("DataNodePeerMetrics: Got stats: {}", stats); return slowNodeDetector.getOutliers(stats); }
Map<String, Double> function() { final Map<String, Double> stats = sendPacketDownstreamRollingAverages.getStats( minOutlierDetectionSamples); LOG.trace(STR, stats); return slowNodeDetector.getOutliers(stats); }
/** * Retrieve the set of dataNodes that look significantly slower * than their peers. */
Retrieve the set of dataNodes that look significantly slower than their peers
getOutliers
{ "repo_name": "JingchengDu/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodePeerMetrics.java", "license": "apache-2.0", "size": 6958 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
993,417
public static CharsetEncoder encoder(Charset charset) { checkNotNull(charset, "charset"); Map<Charset, CharsetEncoder> map = InternalThreadLocalMap.get().charsetEncoderCache(); CharsetEncoder e = map.get(charset); if (e != null) { e.reset().onMalformedInput(CodingErrorAction.REPLACE).onUnmappableCharacter(CodingErrorAction.REPLACE); return e; } e = encoder(charset, CodingErrorAction.REPLACE, CodingErrorAction.REPLACE); map.put(charset, e); return e; }
static CharsetEncoder function(Charset charset) { checkNotNull(charset, STR); Map<Charset, CharsetEncoder> map = InternalThreadLocalMap.get().charsetEncoderCache(); CharsetEncoder e = map.get(charset); if (e != null) { e.reset().onMalformedInput(CodingErrorAction.REPLACE).onUnmappableCharacter(CodingErrorAction.REPLACE); return e; } e = encoder(charset, CodingErrorAction.REPLACE, CodingErrorAction.REPLACE); map.put(charset, e); return e; }
/** * Returns a cached thread-local {@link CharsetEncoder} for the specified {@link Charset}. * * @param charset The specified charset * @return The encoder for the specified <code>charset</code> */
Returns a cached thread-local <code>CharsetEncoder</code> for the specified <code>Charset</code>
encoder
{ "repo_name": "maliqq/netty", "path": "common/src/main/java/io/netty/util/CharsetUtil.java", "license": "apache-2.0", "size": 6947 }
[ "io.netty.util.internal.InternalThreadLocalMap", "io.netty.util.internal.ObjectUtil", "java.nio.charset.Charset", "java.nio.charset.CharsetEncoder", "java.nio.charset.CodingErrorAction", "java.util.Map" ]
import io.netty.util.internal.InternalThreadLocalMap; import io.netty.util.internal.ObjectUtil; import java.nio.charset.Charset; import java.nio.charset.CharsetEncoder; import java.nio.charset.CodingErrorAction; import java.util.Map;
import io.netty.util.internal.*; import java.nio.charset.*; import java.util.*;
[ "io.netty.util", "java.nio", "java.util" ]
io.netty.util; java.nio; java.util;
1,180,536
@Override public void channelActive(final ChannelHandlerContext context) { this.traceOperation(context, "channelActive"); context.fireChannelActive(); }
void function(final ChannelHandlerContext context) { this.traceOperation(context, STR); context.fireChannelActive(); }
/** * The {@link Channel} of the {@link ChannelHandlerContext} is now active * * @param context {@link ChannelHandlerContext} to which this {@link RntbdRequestManager} belongs */
The <code>Channel</code> of the <code>ChannelHandlerContext</code> is now active
channelActive
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestManager.java", "license": "mit", "size": 36852 }
[ "io.netty.channel.ChannelHandlerContext" ]
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.*;
[ "io.netty.channel" ]
io.netty.channel;
2,339,633
@Override // This does not just call .setWakeMode() in the Service because doing so // would add a permission requirement to the Service. Do it here, and it's // the client app's responsibility to request that permission public void setWakeMode(Context context, int mode) { Log.d(SBMP_TAG, "setWakeMode(context, " + mode + ")"); boolean wasHeld = false; if (mWakeLock != null) { if (mWakeLock.isHeld()) { wasHeld = true; Log.d(SBMP_TAG, "Releasing wakelock"); mWakeLock.release(); } mWakeLock = null; } if (mode != 0) { PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); mWakeLock = pm.newWakeLock(mode, this.getClass().getName()); mWakeLock.setReferenceCounted(false); if (wasHeld) { Log.d(SBMP_TAG, "Acquiring wakelock"); mWakeLock.acquire(); } } }
void function(Context context, int mode) { Log.d(SBMP_TAG, STR + mode + ")"); boolean wasHeld = false; if (mWakeLock != null) { if (mWakeLock.isHeld()) { wasHeld = true; Log.d(SBMP_TAG, STR); mWakeLock.release(); } mWakeLock = null; } if (mode != 0) { PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); mWakeLock = pm.newWakeLock(mode, this.getClass().getName()); mWakeLock.setReferenceCounted(false); if (wasHeld) { Log.d(SBMP_TAG, STR); mWakeLock.acquire(); } } }
/** * Functions identically to android.media.MediaPlayer.setWakeMode(Context context, int mode) * Acquires a wake lock in the context given. You must request the appropriate permissions * in your AndroidManifest.xml file. */
Functions identically to android.media.MediaPlayer.setWakeMode(Context context, int mode) Acquires a wake lock in the context given. You must request the appropriate permissions in your AndroidManifest.xml file
setWakeMode
{ "repo_name": "AntennaPod/AntennaPod-AudioPlayer", "path": "library/src/main/java/org/antennapod/audio/ServiceBackedAudioPlayer.java", "license": "apache-2.0", "size": 48383 }
[ "android.content.Context", "android.os.PowerManager", "android.util.Log" ]
import android.content.Context; import android.os.PowerManager; import android.util.Log;
import android.content.*; import android.os.*; import android.util.*;
[ "android.content", "android.os", "android.util" ]
android.content; android.os; android.util;
2,638,573
public void addAdditionalInputPaths(Collection<Path> paths) { this.additionalInputPaths.addAll(paths); }
void function(Collection<Path> paths) { this.additionalInputPaths.addAll(paths); }
/** * Add additional input paths for this {@link Dataset}. */
Add additional input paths for this <code>Dataset</code>
addAdditionalInputPaths
{ "repo_name": "zliu41/gobblin", "path": "gobblin-compaction/src/main/java/gobblin/compaction/dataset/Dataset.java", "license": "apache-2.0", "size": 10983 }
[ "java.util.Collection", "org.apache.hadoop.fs.Path" ]
import java.util.Collection; import org.apache.hadoop.fs.Path;
import java.util.*; import org.apache.hadoop.fs.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,928,021
Single<Long> trimNonStrict(int size);
Single<Long> trimNonStrict(int size);
/** * Trims stream to few tens of entries more than specified length to trim. * * @param size - new size of stream * @return number of deleted messages */
Trims stream to few tens of entries more than specified length to trim
trimNonStrict
{ "repo_name": "mrniko/redisson", "path": "redisson/src/main/java/org/redisson/api/RStreamRx.java", "license": "apache-2.0", "size": 32410 }
[ "io.reactivex.rxjava3.core.Single" ]
import io.reactivex.rxjava3.core.Single;
import io.reactivex.rxjava3.core.*;
[ "io.reactivex.rxjava3" ]
io.reactivex.rxjava3;
1,505,159
public Oak withAsyncIndexing(@NotNull String name, long delayInSeconds) { if (this.asyncTasks == null) { asyncTasks = new HashMap<String, Long>(); } checkState(delayInSeconds > 0, "delayInSeconds value must be > 0"); asyncTasks.put(AsyncIndexUpdate.checkValidName(name), delayInSeconds); return this; }
Oak function(@NotNull String name, long delayInSeconds) { if (this.asyncTasks == null) { asyncTasks = new HashMap<String, Long>(); } checkState(delayInSeconds > 0, STR); asyncTasks.put(AsyncIndexUpdate.checkValidName(name), delayInSeconds); return this; }
/** * <p> * Enable the asynchronous (background) indexing behavior for the provided * task name. * </p> * <p> * Please note that when enabling the background indexer, you need to take * care of calling * <code>#shutdown</code> on the <code>executor</code> provided for this Oak instance. * </p> */
Enable the asynchronous (background) indexing behavior for the provided task name. Please note that when enabling the background indexer, you need to take care of calling <code>#shutdown</code> on the <code>executor</code> provided for this Oak instance.
withAsyncIndexing
{ "repo_name": "apache/jackrabbit-oak", "path": "oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java", "license": "apache-2.0", "size": 40917 }
[ "com.google.common.base.Preconditions", "java.util.HashMap", "org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate", "org.jetbrains.annotations.NotNull" ]
import com.google.common.base.Preconditions; import java.util.HashMap; import org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate; import org.jetbrains.annotations.NotNull;
import com.google.common.base.*; import java.util.*; import org.apache.jackrabbit.oak.plugins.index.*; import org.jetbrains.annotations.*;
[ "com.google.common", "java.util", "org.apache.jackrabbit", "org.jetbrains.annotations" ]
com.google.common; java.util; org.apache.jackrabbit; org.jetbrains.annotations;
158,603
private Set<String> validateJobNetworkMode(final Job job) { final String networkMode = job.getNetworkMode(); if (networkMode == null) { return emptySet(); } final Set<String> errors = Sets.newHashSet(); if (!VALID_NETWORK_MODES.contains(networkMode) && !networkMode.startsWith("container:")) { errors.add(String.format( "A Docker container's network mode must be %s, or container:<name|id>.", Joiner.on(", ").join(VALID_NETWORK_MODES))); } return errors; }
Set<String> function(final Job job) { final String networkMode = job.getNetworkMode(); if (networkMode == null) { return emptySet(); } final Set<String> errors = Sets.newHashSet(); if (!VALID_NETWORK_MODES.contains(networkMode) && !networkMode.startsWith(STR)) { errors.add(String.format( STR, Joiner.on(STR).join(VALID_NETWORK_MODES))); } return errors; }
/** * Validate the Job's network mode. * @param job The Job to check. * @return A set of error Strings */
Validate the Job's network mode
validateJobNetworkMode
{ "repo_name": "gtonic/helios", "path": "helios-client/src/main/java/com/spotify/helios/common/JobValidator.java", "license": "apache-2.0", "size": 18586 }
[ "com.google.common.base.Joiner", "com.google.common.collect.Sets", "com.spotify.helios.common.descriptors.Job", "java.lang.String", "java.util.Collections", "java.util.Set" ]
import com.google.common.base.Joiner; import com.google.common.collect.Sets; import com.spotify.helios.common.descriptors.Job; import java.lang.String; import java.util.Collections; import java.util.Set;
import com.google.common.base.*; import com.google.common.collect.*; import com.spotify.helios.common.descriptors.*; import java.lang.*; import java.util.*;
[ "com.google.common", "com.spotify.helios", "java.lang", "java.util" ]
com.google.common; com.spotify.helios; java.lang; java.util;
1,599,927
Object invoke(String methodName, Object argument, Type returnType) throws Throwable;
Object invoke(String methodName, Object argument, Type returnType) throws Throwable;
/** * Invokes the given method with the given arguments and returns * an object of the given type, or null if void. * * @param methodName the name of the method to invoke * @param argument the argument to the method * @param returnType the return type * @return the return value * @throws Throwable on error */
Invokes the given method with the given arguments and returns an object of the given type, or null if void
invoke
{ "repo_name": "aplgithub/jsonrpc4j", "path": "src/main/java/com/googlecode/jsonrpc4j/IJsonRpcClient.java", "license": "mit", "size": 2299 }
[ "java.lang.reflect.Type" ]
import java.lang.reflect.Type;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,474,495
public List<TaskWrapper> getTasksAdded() { throw new UnsupportedOperationException("Method is used only for testing"); }
List<TaskWrapper> function() { throw new UnsupportedOperationException(STR); }
/** * Gets the tasks added to the queue. * This method is used only for testing, where it is overridden. * * @throws UnsupportedOperationException if used in production, where it is not meant to be */
Gets the tasks added to the queue. This method is used only for testing, where it is overridden
getTasksAdded
{ "repo_name": "shivanshsoni/teammates", "path": "src/main/java/teammates/logic/api/TaskQueuer.java", "license": "gpl-2.0", "size": 15657 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,368,687
public void clearParameters() throws SQLException { if (statement_ != null) statement_.clearParameters(); }
void function() throws SQLException { if (statement_ != null) statement_.clearParameters(); }
/** * Clears the columns for the current row and releases all associated resources. * @exception SQLException If a database error occurs. **/
Clears the columns for the current row and releases all associated resources
clearParameters
{ "repo_name": "devjunix/libjt400-java", "path": "src/com/ibm/as400/access/AS400JDBCRowSet.java", "license": "epl-1.0", "size": 312119 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,759,449
private double returnLUVPhase(double time) { Mission mission = worker.getMission(); if (mission == null) { boolean done = false; Rover r = null; Settlement s = null; // Put light utility vehicle in return container. if (returnContainer.getUnitType() == UnitType.VEHICLE) { r = (Rover)returnContainer; done = r.setLUV(luv); // Unload any attachment parts or inventory from light utility vehicle. unloadLUVInventory(r); } else if (returnContainer.getUnitType() == UnitType.SETTLEMENT) { s = (Settlement)returnContainer; done = s.addParkedVehicle(r); // luv.findNewParkingLoc(); // Unload any attachment parts or inventory from light utility vehicle. unloadLUVInventory(s); } if (done) { if (person != null) // Remove person from light utility vehicle. luv.removePerson(person); else if (robot != null) // Remove robot from light utility vehicle. luv.removeRobot(robot); luv.setOperator(null); } else { logger.severe(luv, "Light utility vehicle: could not be stored in " + returnContainer.getName()); } } endTask(); return time; }
double function(double time) { Mission mission = worker.getMission(); if (mission == null) { boolean done = false; Rover r = null; Settlement s = null; if (returnContainer.getUnitType() == UnitType.VEHICLE) { r = (Rover)returnContainer; done = r.setLUV(luv); unloadLUVInventory(r); } else if (returnContainer.getUnitType() == UnitType.SETTLEMENT) { s = (Settlement)returnContainer; done = s.addParkedVehicle(r); unloadLUVInventory(s); } if (done) { if (person != null) luv.removePerson(person); else if (robot != null) luv.removeRobot(robot); luv.setOperator(null); } else { logger.severe(luv, STR + returnContainer.getName()); } } endTask(); return time; }
/** * Perform the return LUV phase. * * @param time the time to perform the task phase. * @return remaining time after performing the phase. */
Perform the return LUV phase
returnLUVPhase
{ "repo_name": "mars-sim/mars-sim", "path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/person/ai/task/ReturnLightUtilityVehicle.java", "license": "gpl-3.0", "size": 7445 }
[ "org.mars_sim.msp.core.UnitType", "org.mars_sim.msp.core.person.ai.mission.Mission", "org.mars_sim.msp.core.structure.Settlement", "org.mars_sim.msp.core.vehicle.Rover" ]
import org.mars_sim.msp.core.UnitType; import org.mars_sim.msp.core.person.ai.mission.Mission; import org.mars_sim.msp.core.structure.Settlement; import org.mars_sim.msp.core.vehicle.Rover;
import org.mars_sim.msp.core.*; import org.mars_sim.msp.core.person.ai.mission.*; import org.mars_sim.msp.core.structure.*; import org.mars_sim.msp.core.vehicle.*;
[ "org.mars_sim.msp" ]
org.mars_sim.msp;
342,990
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createAddingExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createMultiExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createAggregateExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createAllExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createAllocatorExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createAssociationExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createValueExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createAttributeExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createBitStringExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createSubtypeIndicationExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createSubnatureIndicationExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createLogicalExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createNameExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createNullExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createMultiplyingExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createPowerExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createRelationalExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createShiftExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createSignatureExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createSignExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createUnaryExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createOpenExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createOthersExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createRangeExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createStringExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createCharacterExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createIdentifierExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createUnitValueExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createUnaffectedExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createWaveformExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createConditionalWaveformExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createTypeQualificationExpression())); }
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createAddingExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createMultiExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createAggregateExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createAllExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createAllocatorExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createAssociationExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createValueExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createAttributeExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createBitStringExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createSubtypeIndicationExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createSubnatureIndicationExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createLogicalExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createNameExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createNullExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createMultiplyingExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createPowerExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createRelationalExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createShiftExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createSignatureExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createSignExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createUnaryExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createOpenExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createOthersExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createRangeExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createStringExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createCharacterExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createIdentifierExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createUnitValueExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createUnaffectedExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createWaveformExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createConditionalWaveformExpression())); newChildDescriptors.add (createChildParameter (StatementPackage.Literals.FOR_ITERATION_SCHEME__IN, ExpressionFactory.eINSTANCE.createTypeQualificationExpression())); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "mlanoe/x-vhdl", "path": "plugins/net.mlanoe.language.vhdl.edit/src-gen/net/mlanoe/language/vhdl/statement/provider/ForIterationSchemeItemProvider.java", "license": "gpl-3.0", "size": 10909 }
[ "java.util.Collection", "net.mlanoe.language.vhdl.expression.ExpressionFactory", "net.mlanoe.language.vhdl.statement.StatementPackage" ]
import java.util.Collection; import net.mlanoe.language.vhdl.expression.ExpressionFactory; import net.mlanoe.language.vhdl.statement.StatementPackage;
import java.util.*; import net.mlanoe.language.vhdl.expression.*; import net.mlanoe.language.vhdl.statement.*;
[ "java.util", "net.mlanoe.language" ]
java.util; net.mlanoe.language;
1,933,265
public final AssertionClause getManipDispClause() { return ((PerformanceOperationDec) getDefiningElement()).getManipDisp() .clone(); }
final AssertionClause function() { return ((PerformanceOperationDec) getDefiningElement()).getManipDisp() .clone(); }
/** * <p>This method returns the manipulation displacement clause associated with this entry.</p> * * @return An {@link AssertionClause} representation object. */
This method returns the manipulation displacement clause associated with this entry
getManipDispClause
{ "repo_name": "mikekab/RESOLVE", "path": "src/main/java/edu/clemson/cs/rsrg/typeandpopulate/entry/OperationProfileEntry.java", "license": "bsd-3-clause", "size": 5066 }
[ "edu.clemson.cs.rsrg.absyn.clauses.AssertionClause", "edu.clemson.cs.rsrg.absyn.declarations.operationdecl.PerformanceOperationDec" ]
import edu.clemson.cs.rsrg.absyn.clauses.AssertionClause; import edu.clemson.cs.rsrg.absyn.declarations.operationdecl.PerformanceOperationDec;
import edu.clemson.cs.rsrg.absyn.clauses.*; import edu.clemson.cs.rsrg.absyn.declarations.operationdecl.*;
[ "edu.clemson.cs" ]
edu.clemson.cs;
485,871
@SafeVarargs public static <T> Map<T, T> pairs(T... pairs) { if (pairs == null) { throw new IllegalArgumentException("pairs must not be null"); //$NON-NLS-1$ } if (pairs.length % 2 != 0) { throw new IllegalArgumentException("pairs must have even numbers of elements"); //$NON-NLS-1$ } Map<T, T> result = new HashMap<>(); for (int i = 0; i < pairs.length; i += 2) { result.put(pairs[i + 0], pairs[i + 1]); } return result; }
static <T> Map<T, T> function(T... pairs) { if (pairs == null) { throw new IllegalArgumentException(STR); } if (pairs.length % 2 != 0) { throw new IllegalArgumentException(STR); } Map<T, T> result = new HashMap<>(); for (int i = 0; i < pairs.length; i += 2) { result.put(pairs[i + 0], pairs[i + 1]); } return result; }
/** * Returns a map whose key and value have same type. * The map is modifiable. * @param pairs array contains key and value alternatively * @param <T> the key and value type * @return created map */
Returns a map whose key and value have same type. The map is modifiable
pairs
{ "repo_name": "asakusafw/asakusafw", "path": "utils-project/collections/src/main/java/com/asakusafw/utils/collections/Maps.java", "license": "apache-2.0", "size": 10961 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,447,474
@GET("tv/{tv_id}/season/{season_number}/episode/{episode_number}/external_ids") Call<TvExternalIds> externalIds( @Path("tv_id") int tvShowId, @Path("season_number") int tvShowSeasonNumber, @Path("episode_number") int tvShowEpisodeNumber );
@GET(STR) Call<TvExternalIds> externalIds( @Path("tv_id") int tvShowId, @Path(STR) int tvShowSeasonNumber, @Path(STR) int tvShowEpisodeNumber );
/** * Get the external ids for a TV episode by combination of a season and episode number. * * @param tvShowId A Tv Show TMDb id. * @param tvShowSeasonNumber TvSeason Number. * @param tvShowEpisodeNumber TvEpisode Number. */
Get the external ids for a TV episode by combination of a season and episode number
externalIds
{ "repo_name": "ProIcons/tmdb-java", "path": "src/main/java/com/uwetrottmann/tmdb2/services/TvEpisodesService.java", "license": "unlicense", "size": 12899 }
[ "com.uwetrottmann.tmdb2.entities.TvExternalIds" ]
import com.uwetrottmann.tmdb2.entities.TvExternalIds;
import com.uwetrottmann.tmdb2.entities.*;
[ "com.uwetrottmann.tmdb2" ]
com.uwetrottmann.tmdb2;
1,502,861
public void replaceData(int offset, int count, String data) throws DOMException { textNode.replaceData(offset, count, data); }
void function(int offset, int count, String data) throws DOMException { textNode.replaceData(offset, count, data); }
/** * Replace the characters starting at the specified 16-bit unit offset with the specified * string. * * @param offset The offset from which to start replacing. * @param count The number of 16-bit units to replace. If the sum of <code>offset</code> and * <code>count</code> exceeds <code>length</code>, then all 16-bit units to the * end of the data are replaced; (i.e., the effect is the same as a * <code>remove</code> method call with the same range, followed by an * <code>append</code> method invocation). * @param data The <code>DOMString</code> with which the range must be replaced. * @throws DOMException INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is negative * or greater than the number of 16-bit units in <code>data</code>, or if * the specified <code>count</code> is negative. <br>NO_MODIFICATION_ALLOWED_ERR: * Raised if this node is readonly. */
Replace the characters starting at the specified 16-bit unit offset with the specified string
replaceData
{ "repo_name": "arunasujith/wso2-axis2", "path": "modules/saaj/src/org/apache/axis2/saaj/TextImplEx.java", "license": "apache-2.0", "size": 12850 }
[ "org.w3c.dom.DOMException" ]
import org.w3c.dom.DOMException;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,613,053
ScriptSecurity getScriptSecurity(String scriptType, ParsedURL scriptURL, ParsedURL docURL);
ScriptSecurity getScriptSecurity(String scriptType, ParsedURL scriptURL, ParsedURL docURL);
/** * Returns the security settings for the given script * type, script url and document url * * @param scriptType type of script, as found in the * type attribute of the &lt;script&gt; element. * @param scriptURL url for the script, as defined in * the script's xlink:href attribute. If that * attribute was empty, then this parameter should * be null * @param docURL url for the document into which the * script was found. */
Returns the security settings for the given script type, script url and document url
getScriptSecurity
{ "repo_name": "git-moss/Push2Display", "path": "lib/batik-1.8/sources/org/apache/batik/bridge/UserAgent.java", "license": "lgpl-3.0", "size": 9266 }
[ "org.apache.batik.util.ParsedURL" ]
import org.apache.batik.util.ParsedURL;
import org.apache.batik.util.*;
[ "org.apache.batik" ]
org.apache.batik;
54,334
@Transactional public List<Ws> findAll() throws WsDaoException { try { return jdbcTemplate.query("SELECT id, ws_code, ws_date, supplier_name, fish_species, fish_size, fish_weight, quantity, remarks, issued_by, checked_by, received_by, is_active, is_delete, created_by, created_date, updated_by, updated_date FROM " + getTableName() + " ORDER BY id", this); } catch (Exception e) { throw new WsDaoException("Query failed", e); } }
List<Ws> function() throws WsDaoException { try { return jdbcTemplate.query(STR + getTableName() + STR, this); } catch (Exception e) { throw new WsDaoException(STR, e); } }
/** * Returns all rows from the ws table that match the criteria ''. */
Returns all rows from the ws table that match the criteria ''
findAll
{ "repo_name": "rmage/gnvc-ims", "path": "src/java/com/app/wms/engine/db/dao/spring/WsDaoImpl.java", "license": "lgpl-3.0", "size": 19191 }
[ "com.app.wms.engine.db.dto.Ws", "com.app.wms.engine.db.exceptions.WsDaoException", "java.util.List" ]
import com.app.wms.engine.db.dto.Ws; import com.app.wms.engine.db.exceptions.WsDaoException; import java.util.List;
import com.app.wms.engine.db.dto.*; import com.app.wms.engine.db.exceptions.*; import java.util.*;
[ "com.app.wms", "java.util" ]
com.app.wms; java.util;
1,456,780
public static Object fromRDF(Object input, JsonLdOptions options, RDFParser parser) throws JsonLdError { final RDFDataset dataset = parser.parse(input); // convert from RDF final Object rval = new JsonLdApi(options).fromRDF(dataset); // re-process using the generated context if outputForm is set if (options.outputForm != null) { if (JsonLdConsts.EXPANDED.equals(options.outputForm)) { return rval; } else if (JsonLdConsts.COMPACTED.equals(options.outputForm)) { return compact(rval, dataset.getContext(), options); } else if (JsonLdConsts.FLATTENED.equals(options.outputForm)) { return flatten(rval, dataset.getContext(), options); } else { throw new JsonLdError(JsonLdError.Error.UNKNOWN_ERROR, "Output form was unknown: " + options.outputForm); } } return rval; }
static Object function(Object input, JsonLdOptions options, RDFParser parser) throws JsonLdError { final RDFDataset dataset = parser.parse(input); final Object rval = new JsonLdApi(options).fromRDF(dataset); if (options.outputForm != null) { if (JsonLdConsts.EXPANDED.equals(options.outputForm)) { return rval; } else if (JsonLdConsts.COMPACTED.equals(options.outputForm)) { return compact(rval, dataset.getContext(), options); } else if (JsonLdConsts.FLATTENED.equals(options.outputForm)) { return flatten(rval, dataset.getContext(), options); } else { throw new JsonLdError(JsonLdError.Error.UNKNOWN_ERROR, STR + options.outputForm); } } return rval; }
/** * Converts an RDF dataset to JSON-LD, using a specific instance of * {@link RDFParser}. * * @param input * a serialized string of RDF in a format specified by the format * option or an RDF dataset to convert. * @param options * the options to use: [format] the format if input is not an * array: 'application/nquads' for N-Quads (default). * [useRdfType] true to use rdf:type, false to use @type * (default: false). [useNativeTypes] true to convert XSD types * into native types (boolean, integer, double), false not to * (default: true). * @param parser * A specific instance of {@link RDFParser} to use for the * conversion. * @return A JSON-LD object. * @throws JsonLdError * If there is an error converting the dataset to JSON-LD. */
Converts an RDF dataset to JSON-LD, using a specific instance of <code>RDFParser</code>
fromRDF
{ "repo_name": "jsonld-java/jsonld-java", "path": "core/src/main/java/com/github/jsonldjava/core/JsonLdProcessor.java", "license": "bsd-3-clause", "size": 26142 }
[ "com.github.jsonldjava.core.JsonLdError" ]
import com.github.jsonldjava.core.JsonLdError;
import com.github.jsonldjava.core.*;
[ "com.github.jsonldjava" ]
com.github.jsonldjava;
1,363,922
public static Object destroyKey1() { try { Region region = cache.getRegion(Region.SEPARATOR + REGION_NAME); assertNotNull(region); region.destroy("key1"); return eventId; } catch (Exception e) { fail("put failed due to ", e); } return null; }
static Object function() { try { Region region = cache.getRegion(Region.SEPARATOR + REGION_NAME); assertNotNull(region); region.destroy("key1"); return eventId; } catch (Exception e) { fail(STR, e); } return null; }
/** * does a destroy and return the eventid generated. Eventid is caught in the listener and stored * in a static variable* */
does a destroy and return the eventid generated. Eventid is caught in the listener and stored in a static variable
destroyKey1
{ "repo_name": "pdxrunner/geode", "path": "geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ha/HAEventIdPropagationDUnitTest.java", "license": "apache-2.0", "size": 27995 }
[ "org.apache.geode.cache.Region", "org.apache.geode.test.dunit.Assert" ]
import org.apache.geode.cache.Region; import org.apache.geode.test.dunit.Assert;
import org.apache.geode.cache.*; import org.apache.geode.test.dunit.*;
[ "org.apache.geode" ]
org.apache.geode;
2,208,265