id int64 22 34.9k | original_code stringlengths 31 107k | code_wo_comment stringlengths 29 77.3k | cleancode stringlengths 25 62.1k | repo stringlengths 6 65 | label listlengths 4 4 |
|---|---|---|---|---|---|
16,577 | public void dumpIncrements(Statement stmt, Block block,
ListIterator<Statement> stmtIt, RCTracker increments) {
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.INCR)) {
// TODO: can we guarantee that the refcount var is available i... | public void dumpIncrements(Statement stmt, Block block,
ListIterator<Statement> stmtIt, RCTracker increments) {
for (RefCountType rcType: RefcountPass.RC_TYPES) {
for (Entry<AliasKey, Long> e: increments.rcIter(rcType, RCDir.INCR)) {
Var var = increments.getRefCountVar(e.getKey()... | public void dumpincrements(statement stmt, block block, listiterator<statement> stmtit, rctracker increments) { for (refcounttype rctype: refcountpass.rc_types) { for (entry<aliaskey, long> e: increments.rciter(rctype, rcdir.incr)) { var var = increments.getrefcountvar(e.getkey()); assert(var != null); long incr = e.ge... | hsphcdm/swift-t | [
1,
0,
0,
0
] |
24,810 | public static void main(String args[]) throws FileNotFoundException {
// TODO: use sane arg parsing
if (args.length != 2) {
throw new RuntimeException("usage: AnalyzeMethodEntry trace-in trace-out");
}
String inFileName = args[0];
String outFileName = args[1];
... | public static void main(String args[]) throws FileNotFoundException {
if (args.length != 2) {
throw new RuntimeException("usage: AnalyzeMethodEntry trace-in trace-out");
}
String inFileName = args[0];
String outFileName = args[1];
Deserializer<TraceEvent> d
... | public static void main(string args[]) throws filenotfoundexception { if (args.length != 2) { throw new runtimeexception("usage: analyzemethodentry trace-in trace-out"); } string infilename = args[0]; string outfilename = args[1]; deserializer<traceevent> d = deserializer.getdeserializer(new fileinputstream(infilename)... | glasser/amock | [
0,
1,
0,
0
] |
24,886 | @Test
public void testAuthRequest() throws IOException, MessageException, DiscoveryException, ConsumerException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMockRequest(session);
HttpServletResponse re... | @Test
public void testAuthRequest() throws IOException, MessageException, DiscoveryException, ConsumerException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMockRequest(session);
HttpServletResponse re... | @test public void testauthrequest() throws ioexception, messageexception, discoveryexception, consumerexception { discoveryinformation info = createmockinfo(); httpsession session = createmocksession(info, false, false, true); httpservletrequest req = createmockrequest(session); httpservletresponse resp = createmockres... | isabella232/explorer-2 | [
1,
0,
0,
0
] |
24,887 | @Test(expected = RuntimeException.class)
public void testAuthRequestIOException() throws IOException, MessageException, DiscoveryException, ConsumerException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMo... | @Test(expected = RuntimeException.class)
public void testAuthRequestIOException() throws IOException, MessageException, DiscoveryException, ConsumerException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMo... | @test(expected = runtimeexception.class) public void testauthrequestioexception() throws ioexception, messageexception, discoveryexception, consumerexception { discoveryinformation info = createmockinfo(); httpsession session = createmocksession(info, false, false, true); httpservletrequest req = createmockrequest(sess... | isabella232/explorer-2 | [
1,
0,
0,
0
] |
24,888 | @Test
public void testVerifyResponse() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, true, true, true);
HttpServletRequest req = createMockRequest(session);
... | @Test
public void testVerifyResponse() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, true, true, true);
HttpServletRequest req = createMockRequest(session);
... | @test public void testverifyresponse() throws ioexception, messageexception, discoveryexception, consumerexception, associationexception { discoveryinformation info = createmockinfo(); httpsession session = createmocksession(info, true, true, true); httpservletrequest req = createmockrequest(session); authrequest authr... | isabella232/explorer-2 | [
1,
0,
0,
0
] |
24,889 | @Test
public void testVerifyResponseNullIdentifier() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMockReque... | @Test
public void testVerifyResponseNullIdentifier() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, true);
HttpServletRequest req = createMockReque... | @test public void testverifyresponsenullidentifier() throws ioexception, messageexception, discoveryexception, consumerexception, associationexception { discoveryinformation info = createmockinfo(); httpsession session = createmocksession(info, false, false, true); httpservletrequest req = createmockrequest(session); a... | isabella232/explorer-2 | [
1,
0,
0,
0
] |
24,890 | @Test
public void testVerifyResponseNoEmail() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, false);
HttpServletRequest req = createMockRequest(ses... | @Test
public void testVerifyResponseNoEmail() throws IOException, MessageException, DiscoveryException, ConsumerException, AssociationException {
DiscoveryInformation info = createMockInfo();
HttpSession session = createMockSession(info, false, false, false);
HttpServletRequest req = createMockRequest(ses... | @test public void testverifyresponsenoemail() throws ioexception, messageexception, discoveryexception, consumerexception, associationexception { discoveryinformation info = createmockinfo(); httpsession session = createmocksession(info, false, false, false); httpservletrequest req = createmockrequest(session); authreq... | isabella232/explorer-2 | [
1,
0,
0,
0
] |
8,549 | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper) {
ObjectHelper.requireNonNull(other, "other is null");
return zip(this, other, zipper);
... | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper) {
ObjectHelper.requireNonNull(other, "other is null");
return zip(this, other, zipper);
... | @checkreturnvalue @schedulersupport(schedulersupport.none) public final <u, r> observable<r> zipwith(observablesource<? extends u> other, bifunction<? super t, ? super u, ? extends r> zipper) { objecthelper.requirenonnull(other, "other is null"); return zip(this, other, zipper); } | jaysooong/RxJava | [
0,
0,
0,
0
] |
8,550 | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper, boolean delayError) {
return zip(this, other, zipper, delayError);
} | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper, boolean delayError) {
return zip(this, other, zipper, delayError);
} | @checkreturnvalue @schedulersupport(schedulersupport.none) public final <u, r> observable<r> zipwith(observablesource<? extends u> other, bifunction<? super t, ? super u, ? extends r> zipper, boolean delayerror) { return zip(this, other, zipper, delayerror); } | jaysooong/RxJava | [
0,
0,
0,
0
] |
8,551 | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper, boolean delayError, int bufferSize) {
return zip(this, other, zipper, delayError, bufferSize);
} | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
BiFunction<? super T, ? super U, ? extends R> zipper, boolean delayError, int bufferSize) {
return zip(this, other, zipper, delayError, bufferSize);
} | @checkreturnvalue @schedulersupport(schedulersupport.none) public final <u, r> observable<r> zipwith(observablesource<? extends u> other, bifunction<? super t, ? super u, ? extends r> zipper, boolean delayerror, int buffersize) { return zip(this, other, zipper, delayerror, buffersize); } | jaysooong/RxJava | [
0,
0,
0,
0
] |
25,117 | private void cleanProxy(SdlDisconnectedReason disconnectedReason) throws SdlException {
try {
// ALM Specific Cleanup
if (_advancedLifecycleManagementEnabled) {
_sdlConnectionState = SdlConnectionState.SDL_DISCONNECTED;
firstTimeFull = true;
// Should we wait for the interface to be unregistered?
... | private void cleanProxy(SdlDisconnectedReason disconnectedReason) throws SdlException {
try {
if (_advancedLifecycleManagementEnabled) {
_sdlConnectionState = SdlConnectionState.SDL_DISCONNECTED;
firstTimeFull = true;
Boolean waitForInterfaceUnregistered = false;
synchronized(CONNECTION_... | private void cleanproxy(sdldisconnectedreason disconnectedreason) throws sdlexception { try { if (_advancedlifecyclemanagementenabled) { _sdlconnectionstate = sdlconnectionstate.sdl_disconnected; firsttimefull = true; boolean waitforinterfaceunregistered = false; synchronized(connection_reference_lock) { if (sdlsession... | iconcells/healthydrive | [
1,
0,
0,
0
] |
16,985 | @Test
public void testQuayGithubPublishAlternateStructure() {
systemExit.expectSystemExitWithStatus(Client.API_ERROR);
Client.main(new String[] { "--config", ResourceHelpers.resourceFilePath("config_file.txt"), "tool", "publish", "--entry",
"quay.io/dockstoretestuser/quayandgithubalterna... | @Test
public void testQuayGithubPublishAlternateStructure() {
systemExit.expectSystemExitWithStatus(Client.API_ERROR);
Client.main(new String[] { "--config", ResourceHelpers.resourceFilePath("config_file.txt"), "tool", "publish", "--entry",
"quay.io/dockstoretestuser/quayandgithubalterna... | @test public void testquaygithubpublishalternatestructure() { systemexit.expectsystemexitwithstatus(client.api_error); client.main(new string[] { "--config", resourcehelpers.resourcefilepath("config_file.txt"), "tool", "publish", "--entry", "quay.io/dockstoretestuser/quayandgithubalternate", "--script" }); } | garyluu/dockstore-cli | [
0,
1,
0,
0
] |
16,986 | @Test
public void testQuayBitbucketPublishAlternateStructure() {
systemExit.expectSystemExitWithStatus(Client.API_ERROR);
Client.main(new String[] { "--config", ResourceHelpers.resourceFilePath("config_file.txt"), "tool", "publish", "--entry",
"quay.io/dockstoretestuser/quayandbitbucketa... | @Test
public void testQuayBitbucketPublishAlternateStructure() {
systemExit.expectSystemExitWithStatus(Client.API_ERROR);
Client.main(new String[] { "--config", ResourceHelpers.resourceFilePath("config_file.txt"), "tool", "publish", "--entry",
"quay.io/dockstoretestuser/quayandbitbucketa... | @test public void testquaybitbucketpublishalternatestructure() { systemexit.expectsystemexitwithstatus(client.api_error); client.main(new string[] { "--config", resourcehelpers.resourcefilepath("config_file.txt"), "tool", "publish", "--entry", "quay.io/dockstoretestuser/quayandbitbucketalternate", "--script" }); } | garyluu/dockstore-cli | [
0,
1,
0,
0
] |
16,991 | @Test
public void testRefreshingUserMetadata() {
// Setup database
// Refresh a tool
Client.main(new String[] { "--config", ResourceHelpers.resourceFilePath("config_file.txt"), "tool", "refresh", "--entry",
"quay.io/dockstoretestuser/quayandbitbucket", "--script" });
// C... | @Test
public void testRefreshingUserMetadata() {
Client.main(new String[] { "--config", ResourceHelpers.resourceFilePath("config_file.txt"), "tool", "refresh", "--entry",
"quay.io/dockstoretestuser/quayandbitbucket", "--script" });
final long count... | @test public void testrefreshingusermetadata() { client.main(new string[] { "--config", resourcehelpers.resourcefilepath("config_file.txt"), "tool", "refresh", "--entry", "quay.io/dockstoretestuser/quayandbitbucket", "--script" }); final long count = testingpostgres.runselectstatement("select count(*) from user_profile... | garyluu/dockstore-cli | [
0,
0,
1,
0
] |
654 | public void promptForOperatorCard(String message) throws IOException {
framebuffer.draw((Graphics2D graphics) ->
baseScreenLayout(graphics,"Insert Operator Card", message, Color.white)
);
// TODO: Wait on the Operator Card instead
framebuffer.pressEnter();
} | public void promptForOperatorCard(String message) throws IOException {
framebuffer.draw((Graphics2D graphics) ->
baseScreenLayout(graphics,"Insert Operator Card", message, Color.white)
);
framebuffer.pressEnter();
} | public void promptforoperatorcard(string message) throws ioexception { framebuffer.draw((graphics2d graphics) -> basescreenlayout(graphics,"insert operator card", message, color.white) ); framebuffer.pressenter(); } | isabella232/subzero | [
0,
1,
0,
0
] |
656 | public void removeOperatorCard(String message) throws IOException {
framebuffer.draw((Graphics2D graphics) ->
baseScreenLayout(graphics,"Remove Operator Card", message, Color.white)
);
// TODO: Wait on the Operator Card to be removed
framebuffer.pressEnter();
renderLoading();
} | public void removeOperatorCard(String message) throws IOException {
framebuffer.draw((Graphics2D graphics) ->
baseScreenLayout(graphics,"Remove Operator Card", message, Color.white)
);
framebuffer.pressEnter();
renderLoading();
} | public void removeoperatorcard(string message) throws ioexception { framebuffer.draw((graphics2d graphics) -> basescreenlayout(graphics,"remove operator card", message, color.white) ); framebuffer.pressenter(); renderloading(); } | isabella232/subzero | [
0,
1,
0,
0
] |
33,435 | @SuppressWarnings("unchecked")
public static Map<String, Object> getElasticMapping(SearchableClassMapping scm) {
Map<String, Object> elasticTypeMappingProperties = new LinkedHashMap<String, Object>();
String parentType = null;
if (!scm.isAll()) {
// "_all" : {"enabled" : true}
... | @SuppressWarnings("unchecked")
public static Map<String, Object> getElasticMapping(SearchableClassMapping scm) {
Map<String, Object> elasticTypeMappingProperties = new LinkedHashMap<String, Object>();
String parentType = null;
if (!scm.isAll()) {
elasticTypeMappingProper... | @suppresswarnings("unchecked") public static map<string, object> getelasticmapping(searchableclassmapping scm) { map<string, object> elastictypemappingproperties = new linkedhashmap<string, object>(); string parenttype = null; if (!scm.isall()) { elastictypemappingproperties.put("_all", collections.singletonmap("enable... | iGivefirst/elasticsearch-grails-plugin | [
1,
1,
0,
1
] |
25,248 | public static HistogramChart fromData(Iterable<? extends Vector> data,
int numBuckets) {
// Do a pass to compute range
double min = Double.MAX_VALUE, max = Double.MIN_VALUE;
ArrayList<Double> copy = new ArrayList();
for (Vector datum : data) {
double x = datum.get(0);
copy.add(x);
min = Math.min(min... | public static HistogramChart fromData(Iterable<? extends Vector> data,
int numBuckets) {
double min = Double.MAX_VALUE, max = Double.MIN_VALUE;
ArrayList<Double> copy = new ArrayList();
for (Vector datum : data) {
double x = datum.get(0);
copy.add(x);
min = Math.min(min, x);
max = Math.max(max, x... | public static histogramchart fromdata(iterable<? extends vector> data, int numbuckets) { double min = double.max_value, max = double.min_value; arraylist<double> copy = new arraylist(); for (vector datum : data) { double x = datum.get(0); copy.add(x); min = math.min(min, x); max = math.max(max, x); } double[] array = m... | good-loop/open-code | [
0,
1,
0,
0
] |
17,078 | public int getActualMaximum(int field) {
final int fieldsForFixedMax = ERA_MASK|DAY_OF_WEEK_MASK|HOUR_MASK|AM_PM_MASK|
HOUR_OF_DAY_MASK|MINUTE_MASK|SECOND_MASK|MILLISECOND_MASK|
ZONE_OFFSET_MASK|DST_OFFSET_MASK;
if ((fieldsForFixedMax & (1<<field)) != 0) {
return getM... | public int getActualMaximum(int field) {
final int fieldsForFixedMax = ERA_MASK|DAY_OF_WEEK_MASK|HOUR_MASK|AM_PM_MASK|
HOUR_OF_DAY_MASK|MINUTE_MASK|SECOND_MASK|MILLISECOND_MASK|
ZONE_OFFSET_MASK|DST_OFFSET_MASK;
if ((fieldsForFixedMax & (1<<field)) != 0) {
return getM... | public int getactualmaximum(int field) { final int fieldsforfixedmax = era_mask|day_of_week_mask|hour_mask|am_pm_mask| hour_of_day_mask|minute_mask|second_mask|millisecond_mask| zone_offset_mask|dst_offset_mask; if ((fieldsforfixedmax & (1<<field)) != 0) { return getmaximum(field); } japaneseimperialcalendar jc = getno... | joeriddles/doclitify | [
0,
1,
0,
0
] |
752 | public JobState getJobStatus(MonitorID monitorID) throws SSHApiException {
String jobID = monitorID.getJobID();
//todo so currently we execute the qstat for each job but we can use user based monitoring
//todo or we should concatenate all the commands and execute them in one go and parse the res... | public JobState getJobStatus(MonitorID monitorID) throws SSHApiException {
String jobID = monitorID.getJobID();
return getStatusFromString(cluster.getJobStatus(jobID).toString());
} | public jobstate getjobstatus(monitorid monitorid) throws sshapiexception { string jobid = monitorid.getjobid(); return getstatusfromstring(cluster.getjobstatus(jobid).tostring()); } | glahiru/airavata-1 | [
1,
0,
0,
0
] |
17,350 | @Override
protected void removeFSWindowListener(Window w) {
realFSWindow.removeWindowListener(fsWindowListener);
fsWindowListener = null;
/**
* Bug 4933099: There is some funny-business to deal with when this
* method is called with a Window instead of a Frame. See 4836744... | @Override
protected void removeFSWindowListener(Window w) {
realFSWindow.removeWindowListener(fsWindowListener);
fsWindowListener = null;
final WWindowPeer wpeer = AWTAccessor.getComponentAccessor()
.getPeer(realFSWindow);
if (wpee... | @override protected void removefswindowlistener(window w) { realfswindow.removewindowlistener(fswindowlistener); fswindowlistener = null; final wwindowpeer wpeer = awtaccessor.getcomponentaccessor() .getpeer(realfswindow); if (wpeer != null) { if (ownerorigbounds != null) { if (ownerorigbounds.width == 0) ownerorigboun... | jaylinhong/jdk14-learn | [
0,
0,
1,
0
] |
991 | private Node initRaftNode() throws IOException {
NodeOptions nodeOptions = this.context.nodeOptions();
nodeOptions.setFsm(this.stateMachine);
// TODO: When support sharding, groupId needs to be bound to shard Id
String groupId = this.context.group();
PeerId endpoint = this.contex... | private Node initRaftNode() throws IOException {
NodeOptions nodeOptions = this.context.nodeOptions();
nodeOptions.setFsm(this.stateMachine);
String groupId = this.context.group();
PeerId endpoint = this.context.endpoint();
return RaftServiceFactory.createAndInitR... | private node initraftnode() throws ioexception { nodeoptions nodeoptions = this.context.nodeoptions(); nodeoptions.setfsm(this.statemachine); string groupid = this.context.group(); peerid endpoint = this.context.endpoint(); return raftservicefactory.createandinitraftnode(groupid, endpoint, nodeoptions); } | hhxx2015/hugegraph | [
1,
0,
0,
0
] |
1,032 | public static void pvpDamageBalance(AbstractDealDamageHandler.AttackInfo attack, MapleCharacter player) {
matk = player.getTotalMagic();
luk = player.getTotalLuk();
watk = player.getTotalWatk();
switch (attack.skill) {
case 0: // normal attack
multi = 1;
... | public static void pvpDamageBalance(AbstractDealDamageHandler.AttackInfo attack, MapleCharacter player) {
matk = player.getTotalMagic();
luk = player.getTotalLuk();
watk = player.getTotalWatk();
switch (attack.skill) {
case 0:
multi = 1;
maxHei... | public static void pvpdamagebalance(abstractdealdamagehandler.attackinfo attack, maplecharacter player) { matk = player.gettotalmagic(); luk = player.gettotalluk(); watk = player.gettotalwatk(); switch (attack.skill) { case 0: multi = 1; maxheight = 35; isaoe = false; break; case 1001004: skil = skillfactory.getskill(1... | hugogrochau/VoidMS | [
0,
0,
1,
0
] |
17,449 | public ImmutableMap<Name, Long> snapshotModifiedTimes(JimfsPath path) throws IOException {
ImmutableMap.Builder<Name, Long> modifiedTimes = ImmutableMap.builder();
store.readLock().lock();
try {
Directory dir = (Directory) lookUp(path, Options.FOLLOW_LINKS).requireDirectory(path).file();
// TODO... | public ImmutableMap<Name, Long> snapshotModifiedTimes(JimfsPath path) throws IOException {
ImmutableMap.Builder<Name, Long> modifiedTimes = ImmutableMap.builder();
store.readLock().lock();
try {
Directory dir = (Directory) lookUp(path, Options.FOLLOW_LINKS).requireDirectory(path).file();
... | public immutablemap<name, long> snapshotmodifiedtimes(jimfspath path) throws ioexception { immutablemap.builder<name, long> modifiedtimes = immutablemap.builder(); store.readlock().lock(); try { directory dir = (directory) lookup(path, options.follow_links).requiredirectory(path).file(); for (directoryentry entry : dir... | hlemorvan/jimfs | [
1,
0,
0,
0
] |
33,843 | private static String createDocument(Docs service) throws IOException {
// TODO: Create a new Google Document in the authorized account.
} | private static String createDocument(Docs service) throws IOException {
} | private static string createdocument(docs service) throws ioexception { } | googleworkspace/docs-transcripts | [
0,
1,
0,
0
] |
33,850 | private void detectTitle() {
Document doc = this.contentView.getDocument();
if (doc instanceof HTMLDocument) {
HTMLDocument hdoc = (HTMLDocument)doc;
System.out.println("Document Property:" + hdoc.getProperty(Document.TitleProperty));
// the following stuff did not work and I don't know why!
... | private void detectTitle() {
Document doc = this.contentView.getDocument();
if (doc instanceof HTMLDocument) {
HTMLDocument hdoc = (HTMLDocument)doc;
System.out.println("Document Property:" + hdoc.getProperty(Document.TitleProperty));
Element element = hdoc.getElement(hdoc.getDefaultRoot... | private void detecttitle() { document doc = this.contentview.getdocument(); if (doc instanceof htmldocument) { htmldocument hdoc = (htmldocument)doc; system.out.println("document property:" + hdoc.getproperty(document.titleproperty)); element element = hdoc.getelement(hdoc.getdefaultrootelement(), styleconstants.nameat... | hubersn/SwingHelpViewer | [
0,
1,
1,
0
] |
17,467 | public void testMissing()
{
MissingNode n = MissingNode.getInstance();
assertTrue(n.isMissingNode());
assertEquals(JsonToken.NOT_AVAILABLE, n.asToken());
assertEquals("", n.asText());
assertStandardEquals(n);
// 10-Dec-2018, tatu: With 2.10, should serialize same as v... | public void testMissing()
{
MissingNode n = MissingNode.getInstance();
assertTrue(n.isMissingNode());
assertEquals(JsonToken.NOT_AVAILABLE, n.asToken());
assertEquals("", n.asText());
assertStandardEquals(n);
assertEquals("", n.toString());
... | public void testmissing() { missingnode n = missingnode.getinstance(); asserttrue(n.ismissingnode()); assertequals(jsontoken.not_available, n.astoken()); assertequals("", n.astext()); assertstandardequals(n); assertequals("", n.tostring()); assertnodenumbersfornonnumeric(n); asserttrue(n.asboolean(true)); assertequals(... | jebbench/jackson-dataformat-velocypack | [
0,
0,
1,
0
] |
25,662 | public static String removerAcento(String palavra){
return Normalizer.normalize(palavra, Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]", "");
} | public static String removerAcento(String palavra){
return Normalizer.normalize(palavra, Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]", "");
} | public static string removeracento(string palavra){ return normalizer.normalize(palavra, normalizer.form.nfd).replaceall("[^\\p{ascii}]", ""); } | guilhermejulio/PAA-IndiceInvertido | [
0,
0,
0,
0
] |
1,238 | public void handler() {
PORT_START(); /* DSW0 */
/* According to the manual, 0x04, 0x08 and 0x10 should always be off,
but... */
PORT_DIPNAME( 0x07, 0x00, "Rank" ); PORT_DIPSETTING( 0x00, "A" ); PORT_DIPSETTING( 0x01, "B" ); PORT_DIPSETTING( 0x02, "C" ); PORT_DIPSETTING( 0x03, "D" ); PORT_DIPSET... | public void handler() {
PORT_START();
PORT_DIPNAME( 0x07, 0x00, "Rank" ); PORT_DIPSETTING( 0x00, "A" ); PORT_DIPSETTING( 0x01, "B" ); PORT_DIPSETTING( 0x02, "C" ); PORT_DIPSETTING( 0x03, "D" ); PORT_DIPSETTING( 0x04, "E" ); PORT_DIPSETTING( 0x05, "F" ); PORT_DIPSETTING( 0x06, "G" ); PORT... | public void handler() { port_start(); port_dipname( 0x07, 0x00, "rank" ); port_dipsetting( 0x00, "a" ); port_dipsetting( 0x01, "b" ); port_dipsetting( 0x02, "c" ); port_dipsetting( 0x03, "d" ); port_dipsetting( 0x04, "e" ); port_dipsetting( 0x05, "f" ); port_dipsetting( 0x06, "g" ); port_dipsetting( 0x07, "h" ); port_d... | javaemus/ArcoFlexDroid | [
0,
1,
0,
0
] |
25,814 | private void updateProcessorsContexts(Map<Long, Map<String, Object>> allContexts) {
// this code used to be smart about which validator was used at which java-path, and provide only the contexts for that particular
// java-path to the processor; but that doesn't work in SEER*DMS where some edits are per... | private void updateProcessorsContexts(Map<Long, Map<String, Object>> allContexts) {
for (ValidatingProcessor p : _processors.values())
p.setContexts(allContexts);
} | private void updateprocessorscontexts(map<long, map<string, object>> allcontexts) { for (validatingprocessor p : _processors.values()) p.setcontexts(allcontexts); } | imsweb/validation | [
1,
0,
0,
0
] |
9,444 | public void dealWithEvent(WatchEvent<?> event) {
// could expand more processes here
LOG.info("{}:\t {} event.", event.context(), event.kind());
} | public void dealWithEvent(WatchEvent<?> event) {
LOG.info("{}:\t {} event.", event.context(), event.kind());
} | public void dealwithevent(watchevent<?> event) { log.info("{}:\t {} event.", event.context(), event.kind()); } | huangzhanqiao/yuzhouwan | [
0,
1,
0,
0
] |
25,930 | @Override
// TODO: copy header file inclusion
public AFunction cloneOnFileImpl(String newName, AFile file) {
// if (!function.hasBody()) {
// /*add the clone to the original place in order to be included where needed */
// return makeCloneAndInsert(newName, function, true);
// }
... | @Override
public AFunction cloneOnFileImpl(String newName, AFile file) {
var tu = (TranslationUnit) file.getNode();
var cloneFunction = makeCloneAndInsert(newNa... | @override public afunction cloneonfileimpl(string newname, afile file) { var tu = (translationunit) file.getnode(); var clonefunction = makecloneandinsert(newname, tu, true); translationunit originalfile = function.getancestortry(translationunit.class).orelse(null); if (originalfile != null) { var includescopy = treeno... | joaonmatos/clava | [
0,
1,
0,
0
] |
1,452 | public ServerWebExchangeLimiterBuilder partitionByPathInfo(
Function<String, String> pathToGroup) {
return partitionResolver(exchange -> {
// TODO: pathWithinApplication?
String path = exchange.getRequest().getPath().contextPath().value();
return Optional.ofNullable(path).map(pathToGroup).orElse(null);
... | public ServerWebExchangeLimiterBuilder partitionByPathInfo(
Function<String, String> pathToGroup) {
return partitionResolver(exchange -> {
String path = exchange.getRequest().getPath().contextPath().value();
return Optional.ofNullable(path).map(pathToGroup).orElse(null);
});
} | public serverwebexchangelimiterbuilder partitionbypathinfo( function<string, string> pathtogroup) { return partitionresolver(exchange -> { string path = exchange.getrequest().getpath().contextpath().value(); return optional.ofnullable(path).map(pathtogroup).orelse(null); }); } | gujiedmc/spring-cloud-netflix | [
1,
0,
0,
0
] |
18,082 | @Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
URI requestUrl = exchange.getRequiredAttribute(GATEWAY_REQUEST_URL_ATTR);
String scheme = requestUrl.getScheme();
if (isAlreadyRouted(exchange) || !"forward".equals(scheme)) {
return chain.filter(exchange);
}
// TOD... | @Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
URI requestUrl = exchange.getRequiredAttribute(GATEWAY_REQUEST_URL_ATTR);
String scheme = requestUrl.getScheme();
if (isAlreadyRouted(exchange) || !"forward".equals(scheme)) {
return chain.filter(exchange);
}
if (... | @override public mono<void> filter(serverwebexchange exchange, gatewayfilterchain chain) { uri requesturl = exchange.getrequiredattribute(gateway_request_url_attr); string scheme = requesturl.getscheme(); if (isalreadyrouted(exchange) || !"forward".equals(scheme)) { return chain.filter(exchange); } if (log.istraceenabl... | godblessthequeen/spring-cloud-gateway | [
0,
1,
0,
0
] |
1,759 | protected void doInjection(InjectElement injectElement, Screen<?> controller) {
String name = getInjectionName(injectElement);
Class<?> type = getInjectionType(injectElement);
Object instance = getInjectedInstance(type, name, injectElement, controller);
if (instance != null) {
... | protected void doInjection(InjectElement injectElement, Screen<?> controller) {
String name = getInjectionName(injectElement);
Class<?> type = getInjectionType(injectElement);
Object instance = getInjectedInstance(type, name, injectElement, controller);
if (instance != null) {
... | protected void doinjection(injectelement injectelement, screen<?> controller) { string name = getinjectionname(injectelement); class<?> type = getinjectiontype(injectelement); object instance = getinjectedinstance(type, name, injectelement, controller); if (instance != null) { assignvalue(injectelement.getelement(), in... | jmix-framework/jmix | [
0,
1,
0,
0
] |
9,974 | @Override
public void testCreateTableWithColumnComment()
{
// TODO https://github.com/trinodb/trino/issues/12469 Support column comment when creating tables
String tableName = "test_create_" + randomTableSuffix();
assertQueryFails(
"CREATE TABLE " + tableName + "(" +
... | @Override
public void testCreateTableWithColumnComment()
{
String tableName = "test_create_" + randomTableSuffix();
assertQueryFails(
"CREATE TABLE " + tableName + "(" +
"id INT WITH (primary_key=true)," +
"a VARCHAR COMMENT... | @override public void testcreatetablewithcolumncomment() { string tablename = "test_create_" + randomtablesuffix(); assertqueryfails( "create table " + tablename + "(" + "id int with (primary_key=true)," + "a varchar comment 'test comment')" + "with (partition_by_hash_columns = array['id'], partition_by_hash_buckets = ... | hitjl/trino | [
1,
0,
0,
0
] |
26,362 | public void checkOrUpdateToken() {
// TODO check token is valid or refresh token from server?
} | public void checkOrUpdateToken() {
} | public void checkorupdatetoken() { } | hujianhong/DesignPattern | [
0,
1,
0,
0
] |
2,038 | @Override
public Context start(String spanName, Context context) {
Objects.requireNonNull(spanName, "'spanName' cannot be null.");
Objects.requireNonNull(context, "'context' cannot be null.");
Builder spanBuilder = getSpanBuilder(spanName, context);
Span span = spanBuilder.startSpan(... | @Override
public Context start(String spanName, Context context) {
Objects.requireNonNull(spanName, "'spanName' cannot be null.");
Objects.requireNonNull(context, "'context' cannot be null.");
Builder spanBuilder = getSpanBuilder(spanName, context);
Span span = spanBuilder.startSpan(... | @override public context start(string spanname, context context) { objects.requirenonnull(spanname, "'spanname' cannot be null."); objects.requirenonnull(context, "'context' cannot be null."); builder spanbuilder = getspanbuilder(spanname, context); span span = spanbuilder.startspan(); if (span.isrecording()) { string ... | janjaali/azure-sdk-for-java | [
1,
0,
0,
0
] |
2,046 | @Test
void testExampleWithSettingsReader() {
// This way is not so good, once you cannot test for different values
// to see how your application will behave.
SettingsReader originalReader = new SettingsReader();
String v = originalReader.get(Settings.Home.address);
Assertion... | @Test
void testExampleWithSettingsReader() {
SettingsReader originalReader = new SettingsReader();
String v = originalReader.get(Settings.Home.address);
Assertions.assertEquals("This is my house", v);
} | @test void testexamplewithsettingsreader() { settingsreader originalreader = new settingsreader(); string v = originalreader.get(settings.home.address); assertions.assertequals("this is my house", v); } | gabrsar/DynamicSettingsExample | [
1,
0,
0,
0
] |
18,450 | @Override
protected void doSomeWork(long positionUs, long elapsedRealtimeUs) throws ExoPlaybackException {
if (outputStreamEnded) {
return;
}
sourceIsReady = source.continueBuffering(trackIndex, positionUs);
checkForDiscontinuity(positionUs);
// Try and read a format if we don't have one alr... | @Override
protected void doSomeWork(long positionUs, long elapsedRealtimeUs) throws ExoPlaybackException {
if (outputStreamEnded) {
return;
}
sourceIsReady = source.continueBuffering(trackIndex, positionUs);
checkForDiscontinuity(positionUs);
if (format == null && !readFormat(positionUs)... | @override protected void dosomework(long positionus, long elapsedrealtimeus) throws exoplaybackexception { if (outputstreamended) { return; } sourceisready = source.continuebuffering(trackindex, positionus); checkfordiscontinuity(positionus); if (format == null && !readformat(positionus)) { return; } if (decoder == nul... | hori-ryota/ExoPlayer | [
0,
1,
0,
0
] |
18,486 | public void initialize(short[] normalizedCounts, int maxSymbol, int tableLog)
{
int tableSize = 1 << tableLog;
// tableSize = 1 << 3 = 8 in my case
byte[] table = new byte[tableSize]; // TODO: allocate in workspace
// store the symbol which is spread
int highThreshold = table... | public void initialize(short[] normalizedCounts, int maxSymbol, int tableLog)
{
int tableSize = 1 << tableLog;
byte[] table = new byte[tableSize];
int highThreshold = tableSize - 1;
log2Size = tableLog;
int[] cumulative ... | public void initialize(short[] normalizedcounts, int maxsymbol, int tablelog) { int tablesize = 1 << tablelog; byte[] table = new byte[tablesize]; int highthreshold = tablesize - 1; log2size = tablelog; int[] cumulative = new int[max_symbol + 2]; cumulative[0] = 0; for (int i = 1; i <= maxsymbol + 1; i++) { if (normali... | ibelee/aircompressor | [
0,
1,
0,
0
] |
10,317 | public DmnModelInstance convert(InputStream inputStream) {
SpreadsheetMLPackage spreadSheetPackage = null;
try {
spreadSheetPackage = SpreadsheetMLPackage.load(inputStream);
} catch (Docx4JException e) {
// TODO: checked exception
throw new RuntimeException("cannot load document", e);
... | public DmnModelInstance convert(InputStream inputStream) {
SpreadsheetMLPackage spreadSheetPackage = null;
try {
spreadSheetPackage = SpreadsheetMLPackage.load(inputStream);
} catch (Docx4JException e) {
throw new RuntimeException("cannot load document", e);
}
WorkbookPart workbook... | public dmnmodelinstance convert(inputstream inputstream) { spreadsheetmlpackage spreadsheetpackage = null; try { spreadsheetpackage = spreadsheetmlpackage.load(inputstream); } catch (docx4jexception e) { throw new runtimeexception("cannot load document", e); } workbookpart workbookpart = spreadsheetpackage.getworkbookp... | gerdreiss/camunda-dmn-xlsx | [
1,
1,
0,
0
] |
18,768 | @Test
public void testLast() {
// TODO: Test with file that has BOM
// TODO: Test with file that has multiple bytes for the last codepoint
// TODO: Test with file that requires a surrogate pair for the last codepoint
assertThat(utf8It.last()).isEqualTo('g');
} | @Test
public void testLast() {
assertThat(utf8It.last()).isEqualTo('g');
} | @test public void testlast() { assertthat(utf8it.last()).isequalto('g'); } | hatfieldlibrary/solr-ocrhighlighting | [
0,
0,
0,
1
] |
18,959 | @Test
public void testCascadeMergeWithNewEntity() {
setUp();
EntityMasterCascade master = new EntityMasterCascade();
master.setDescription("Master version 1");
entityManager.persist(master);
Integer masterId = master.getPersistenceId();
EntityDetailCascade detail = new EntityDetailCascade();
... | @Test
public void testCascadeMergeWithNewEntity() {
setUp();
EntityMasterCascade master = new EntityMasterCascade();
master.setDescription("Master version 1");
entityManager.persist(master);
Integer masterId = master.getPersistenceId();
EntityDetailCascade detail = new EntityDetailCascade();
... | @test public void testcascademergewithnewentity() { setup(); entitymastercascade master = new entitymastercascade(); master.setdescription("master version 1"); entitymanager.persist(master); integer masterid = master.getpersistenceid(); entitydetailcascade detail = new entitydetailcascade(); detail.setmaster(master); d... | jandppw/ppwcode | [
1,
0,
0,
0
] |
10,979 | @Override
public int choosePartition(Message msg, TopicMetadata metadata) {
// if key is specified, we should use key as routing;
// if key is not specified and no sequence id is provided, not an effectively-once publish, use the default
// round-robin routing.
if (msg.hasKey() || ms... | @Override
public int choosePartition(Message msg, TopicMetadata metadata) {
if (msg.hasKey() || msg.getSequenceId() < 0) {
return super.choosePartition(msg, metadata);
}
return (int) (msg.getSequenceId() % metadata.n... | @override public int choosepartition(message msg, topicmetadata metadata) { if (msg.haskey() || msg.getsequenceid() < 0) { return super.choosepartition(msg, metadata); } return (int) (msg.getsequenceid() % metadata.numpartitions()); } | ialvarez79/pulsar | [
0,
0,
1,
0
] |
11,039 | @RequestMapping(value = "/logs", method = RequestMethod.POST)
@ResponseBody
public String logs(@RequestBody String body) throws IOException {
// "application/logplex-1" does not conform to RFC5424.
// It leaves out STRUCTURED-DATA but does not replace it with
// a NILVALUE. To workaround this, we inject... | @RequestMapping(value = "/logs", method = RequestMethod.POST)
@ResponseBody
public String logs(@RequestBody String body) throws IOException {
String[] parts = body.split("router - ");
String log = parts[0] + "router - [] " + (parts.length > 1 ? parts[1] : "");
RFC6587SyslogDeserializer parse... | @requestmapping(value = "/logs", method = requestmethod.post) @responsebody public string logs(@requestbody string body) throws ioexception { string[] parts = body.split("router - "); string log = parts[0] + "router - [] " + (parts.length > 1 ? parts[1] : ""); rfc6587syslogdeserializer parser = new rfc6587syslogdeseria... | jkutner/heroku-replay-spring | [
1,
0,
0,
0
] |
19,239 | public void drawFrameInThread()
{
if (frameBuffer == null)
{
return; // Framebuffer is not up yet
}
// Select gpuToVram PBO an read pixels from GPU to VRAM
glBindBuffer(GL_PIXEL_PACK_BUFFER, gpuToVram);
glReadPixels(0, 0, frameBuffer.getWidth(), frameBuffer.getHeight(), G... | public void drawFrameInThread()
{
if (frameBuffer == null)
{
return;
}
glBindBuffer(GL_PIXEL_PACK_BUFFER, gpuToVram);
glReadPixels(0, 0, frameBuffer.getWidth(), frameBuffer.getHeight(), GL_BGRA, GL_UNSIGNED_BYTE, 0);
glBindBuffer(GL_PIXEL_PACK_BUFFER, vramToSy... | public void drawframeinthread() { if (framebuffer == null) { return; } glbindbuffer(gl_pixel_pack_buffer, gputovram); glreadpixels(0, 0, framebuffer.getwidth(), framebuffer.getheight(), gl_bgra, gl_unsigned_byte, 0); glbindbuffer(gl_pixel_pack_buffer, vramtosys); bytebuffer bytebuf = glmapbuffer(gl_pixel_pack_buffer, g... | ihmcrobotics/ihmc-jmonkey-engine-toolkit | [
1,
0,
0,
0
] |
11,207 | @NonNull
@Override
public final ListenableFuture<InitialResult<T>> loadInitial(
@NonNull final ListenablePositionalDataSource.LoadInitialParams params) {
final ResolvableFuture<InitialResult<T>> future = ResolvableFuture.create();
getExecutor().execute(new Runnable() {
@O... | @NonNull
@Override
public final ListenableFuture<InitialResult<T>> loadInitial(
@NonNull final ListenablePositionalDataSource.LoadInitialParams params) {
final ResolvableFuture<InitialResult<T>> future = ResolvableFuture.create();
getExecutor().execute(new Runnable() {
@O... | @nonnull @override public final listenablefuture<initialresult<t>> loadinitial( @nonnull final listenablepositionaldatasource.loadinitialparams params) { final resolvablefuture<initialresult<t>> future = resolvablefuture.create(); getexecutor().execute(new runnable() { @override public void run() { final loadinitialpar... | j420247/platform_frameworks_support | [
1,
0,
0,
0
] |
19,457 | private void leave(String reason, EntityBareJid alternateAddress)
{
OperationSetBasicTelephonyJabberImpl basicTelephony
= (OperationSetBasicTelephonyJabberImpl) provider
.getOperationSet(OperationSetBasicTelephony.class);
if(basicTelephony != null && this.publishedConfere... | private void leave(String reason, EntityBareJid alternateAddress)
{
OperationSetBasicTelephonyJabberImpl basicTelephony
= (OperationSetBasicTelephonyJabberImpl) provider
.getOperationSet(OperationSetBasicTelephony.class);
if(basicTelephony != null && this.publishedConfere... | private void leave(string reason, entitybarejid alternateaddress) { operationsetbasictelephonyjabberimpl basictelephony = (operationsetbasictelephonyjabberimpl) provider .getoperationset(operationsetbasictelephony.class); if(basictelephony != null && this.publishedconference != null) { activecallsrepositoryjabberimpl a... | hamilton467/jitsi | [
1,
0,
0,
0
] |
3,213 | protected abstract Object[] significantAttributes(); | protected abstract Object[] significantAttributes(); | protected abstract object[] significantattributes(); | grimwm/flatcode | [
1,
0,
0,
0
] |
11,466 | @JsonGetter("x-apiheader_cc")
public String getXApiheaderCc ( ) {
return this.xApiheaderCc;
} | @JsonGetter("x-apiheader_cc")
public String getXApiheaderCc ( ) {
return this.xApiheaderCc;
} | @jsongetter("x-apiheader_cc") public string getxapiheadercc ( ) { return this.xapiheadercc; } | geniusdibya/pepipost-sdk-java | [
0,
0,
0,
0
] |
11,467 | @JsonSetter("x-apiheader_cc")
public void setXApiheaderCc (String value) {
this.xApiheaderCc = value;
} | @JsonSetter("x-apiheader_cc")
public void setXApiheaderCc (String value) {
this.xApiheaderCc = value;
} | @jsonsetter("x-apiheader_cc") public void setxapiheadercc (string value) { this.xapiheadercc = value; } | geniusdibya/pepipost-sdk-java | [
0,
0,
0,
0
] |
11,468 | @JsonGetter("x-apiheader")
public String getXApiheader ( ) {
return this.xApiheader;
} | @JsonGetter("x-apiheader")
public String getXApiheader ( ) {
return this.xApiheader;
} | @jsongetter("x-apiheader") public string getxapiheader ( ) { return this.xapiheader; } | geniusdibya/pepipost-sdk-java | [
0,
0,
0,
0
] |
11,469 | @JsonSetter("x-apiheader")
public void setXApiheader (String value) {
this.xApiheader = value;
} | @JsonSetter("x-apiheader")
public void setXApiheader (String value) {
this.xApiheader = value;
} | @jsonsetter("x-apiheader") public void setxapiheader (string value) { this.xapiheader = value; } | geniusdibya/pepipost-sdk-java | [
0,
0,
0,
0
] |
11,470 | @JsonGetter("attributes")
public Object getAttributes ( ) {
return this.attributes;
} | @JsonGetter("attributes")
public Object getAttributes ( ) {
return this.attributes;
} | @jsongetter("attributes") public object getattributes ( ) { return this.attributes; } | geniusdibya/pepipost-sdk-java | [
0,
0,
0,
0
] |
11,471 | @JsonSetter("attributes")
public void setAttributes (Object value) {
this.attributes = value;
} | @JsonSetter("attributes")
public void setAttributes (Object value) {
this.attributes = value;
} | @jsonsetter("attributes") public void setattributes (object value) { this.attributes = value; } | geniusdibya/pepipost-sdk-java | [
0,
0,
0,
0
] |
11,472 | @JsonGetter("attachments")
public List<Attachments> getAttachments ( ) {
return this.attachments;
} | @JsonGetter("attachments")
public List<Attachments> getAttachments ( ) {
return this.attachments;
} | @jsongetter("attachments") public list<attachments> getattachments ( ) { return this.attachments; } | geniusdibya/pepipost-sdk-java | [
0,
0,
0,
0
] |
11,473 | @JsonSetter("attachments")
public void setAttachments (List<Attachments> value) {
this.attachments = value;
} | @JsonSetter("attachments")
public void setAttachments (List<Attachments> value) {
this.attachments = value;
} | @jsonsetter("attachments") public void setattachments (list<attachments> value) { this.attachments = value; } | geniusdibya/pepipost-sdk-java | [
0,
0,
0,
0
] |
11,474 | @JsonGetter("recipient_cc")
public List<String> getRecipientCc ( ) {
return this.recipientCc;
} | @JsonGetter("recipient_cc")
public List<String> getRecipientCc ( ) {
return this.recipientCc;
} | @jsongetter("recipient_cc") public list<string> getrecipientcc ( ) { return this.recipientcc; } | geniusdibya/pepipost-sdk-java | [
0,
0,
0,
0
] |
11,475 | @JsonSetter("recipient_cc")
public void setRecipientCc (List<String> value) {
this.recipientCc = value;
} | @JsonSetter("recipient_cc")
public void setRecipientCc (List<String> value) {
this.recipientCc = value;
} | @jsonsetter("recipient_cc") public void setrecipientcc (list<string> value) { this.recipientcc = value; } | geniusdibya/pepipost-sdk-java | [
0,
0,
0,
0
] |
3,347 | private Charge createDisputedCharge(int chargeValueCents, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException, InterruptedException {
Map<String, Object> chargeParams = new HashMap<String, Object>();
chargeParams.putAll(defaultChargePa... | private Charge createDisputedCharge(int chargeValueCents, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException, InterruptedException {
Map<String, Object> chargeParams = new HashMap<String, Object>();
chargeParams.putAll(defaultChargePa... | private charge createdisputedcharge(int chargevaluecents, requestoptions options) throws authenticationexception, invalidrequestexception, apiconnectionexception, cardexception, apiexception, interruptedexception { map<string, object> chargeparams = new hashmap<string, object>(); chargeparams.putall(defaultchargeparams... | hardeepnagi/stripe-java | [
1,
0,
0,
0
] |
3,349 | @Override
public void onInitialize() {
super.onInitialize();
// unpack model
final Map<String, Object> modelData = this.model.getObject();
final String eid = (String) modelData.get("eid");
final String firstName = (String) modelData.get("firstName");
final String lastName = (String) modelData.get("lastName... | @Override
public void onInitialize() {
super.onInitialize();
final Map<String, Object> modelData = this.model.getObject();
final String eid = (String) modelData.get("eid");
final String firstName = (String) modelData.get("firstName");
final String lastName = (String) modelData.get("lastName");
final Stri... | @override public void oninitialize() { super.oninitialize(); final map<string, object> modeldata = this.model.getobject(); final string eid = (string) modeldata.get("eid"); final string firstname = (string) modeldata.get("firstname"); final string lastname = (string) modeldata.get("lastname"); final string displayname ... | jd3538/Marist-Sakai-11.x | [
0,
1,
0,
0
] |
11,653 | private void configureComponents() {
//Associate the data with the formLayout columns and load the data.
try
{
//1 - Set properties of the form
this.formLayout.addClassName("fichier-form");
this.formLayout.setSizeFull(); //sets the form size to fill the scre... | private void configureComponents() {
try
{
this.formLayout.addClassName("fichier-form");
this.formLayout.setSizeFull();
this.txtCodeDomaineActivite.setWidth(100, Unit.PIXELS);
this.txtCodeDomaineActivite.setRequired(true);
... | private void configurecomponents() { try { this.formlayout.addclassname("fichier-form"); this.formlayout.setsizefull(); this.txtcodedomaineactivite.setwidth(100, unit.pixels); this.txtcodedomaineactivite.setrequired(true); this.txtcodedomaineactivite.setrequiredindicatorvisible(true); this.txtcodedomaineactivite.addcla... | jdissou/sigdep01_01 | [
1,
0,
0,
0
] |
3,516 | public int read(ByteBuffer buffer) {
if (disconnected)
return -1;
int startPos = readBuffer.position();
int bufferRemaining = buffer.remaining();
int readBufferRemaining = readBuffer.remaining();
if (bufferRemaining >= readBufferRemaining)
buffer.put(readB... | public int read(ByteBuffer buffer) {
if (disconnected)
return -1;
int startPos = readBuffer.position();
int bufferRemaining = buffer.remaining();
int readBufferRemaining = readBuffer.remaining();
if (bufferRemaining >= readBufferRemaining)
buffer.put(readB... | public int read(bytebuffer buffer) { if (disconnected) return -1; int startpos = readbuffer.position(); int bufferremaining = buffer.remaining(); int readbufferremaining = readbuffer.remaining(); if (bufferremaining >= readbufferremaining) buffer.put(readbuffer); else { for (int i = 0; i < bufferremaining; i++) buffer.... | george-mcintyre/epics-core-java-backport-1.5 | [
1,
0,
0,
0
] |
3,517 | public int write(ByteBuffer buffer) throws IOException {
if (disconnected)
return -1; // TODO: not by the JavaDoc API spec
if (throwExceptionOnSend)
throw new IOException("text IO exception");
// we could write remaining bytes, but for test this is enough
if (b... | public int write(ByteBuffer buffer) throws IOException {
if (disconnected)
return -1;
if (throwExceptionOnSend)
throw new IOException("text IO exception");
if (buffer.remaining() > writeBuffer.remaining())
return 0;
int startPos = buffer.pos... | public int write(bytebuffer buffer) throws ioexception { if (disconnected) return -1; if (throwexceptiononsend) throw new ioexception("text io exception"); if (buffer.remaining() > writebuffer.remaining()) return 0; int startpos = buffer.position(); writebuffer.put(buffer); return buffer.position() - startpos; } | george-mcintyre/epics-core-java-backport-1.5 | [
1,
0,
0,
0
] |
3,520 | private KeyAttributes getDefaultKeyAttributes() {
KeyAttributes keyAttributes = new KeyAttributes();
keyAttributes.setAlgorithm("RSA");
keyAttributes.setMode("ECB");
keyAttributes.setDigestAlgorithm("SHA-384");
// keyAttributes.id;
keyAttributes.setKeyLength(3072);
// ... | private KeyAttributes getDefaultKeyAttributes() {
KeyAttributes keyAttributes = new KeyAttributes();
keyAttributes.setAlgorithm("RSA");
keyAttributes.setMode("ECB");
keyAttributes.setDigestAlgorithm("SHA-384");
keyAttributes.setKeyLength(3072);
keyAttributes.setPaddingMod... | private keyattributes getdefaultkeyattributes() { keyattributes keyattributes = new keyattributes(); keyattributes.setalgorithm("rsa"); keyattributes.setmode("ecb"); keyattributes.setdigestalgorithm("sha-384"); keyattributes.setkeylength(3072); keyattributes.setpaddingmode("oaepwithsha-384andmgf1padding"); keyattribute... | intel-secl/key-broker-service | [
0,
0,
1,
0
] |
11,748 | @Test
public void testAddressCreateAsBtcOnTestnet() {
Network network = Network.findBuiltin("bitcoin-testnet").get();
Optional<Address> ob1 = Address.create("mm7DDqVkFd35XcWecFipfTYM5dByBzn7nq", network);
assertTrue(ob1.isPresent());
Address b1 = ob1.get();
assertEquals("mm7D... | @Test
public void testAddressCreateAsBtcOnTestnet() {
Network network = Network.findBuiltin("bitcoin-testnet").get();
Optional<Address> ob1 = Address.create("mm7DDqVkFd35XcWecFipfTYM5dByBzn7nq", network);
assertTrue(ob1.isPresent());
Address b1 = ob1.get();
assertEquals("mm7D... | @test public void testaddresscreateasbtcontestnet() { network network = network.findbuiltin("bitcoin-testnet").get(); optional<address> ob1 = address.create("mm7ddqvkfd35xcwecfipftym5dbybzn7nq", network); asserttrue(ob1.ispresent()); address b1 = ob1.get(); assertequals("mm7ddqvkfd35xcwecfipftym5dbybzn7nq", b1.tostring... | globalid/walletkit | [
0,
0,
0,
1
] |
3,563 | protected final char[] readLine() throws IOException {
boolean foundLine = false;
char[] returnLine = null;
char[] partialLine = null;
while (!foundLine) {
// System.out.println("readline " + positionInBuffer + " " + new
// String(buffer));
if (positionInBuffer < 0 || !buffer.hasRemaining()) {
// r... | protected final char[] readLine() throws IOException {
boolean foundLine = false;
char[] returnLine = null;
char[] partialLine = null;
while (!foundLine) {
if (positionInBuffer < 0 || !buffer.hasRemaining()) {
charactersRead = read();
totalCharactersRead += charactersRead;
positionInBuf... | protected final char[] readline() throws ioexception { boolean foundline = false; char[] returnline = null; char[] partialline = null; while (!foundline) { if (positioninbuffer < 0 || !buffer.hasremaining()) { charactersread = read(); totalcharactersread += charactersread; positioninbuffer = 0; } int[] lineboundaries =... | jayaskren/FastOpencsv | [
1,
0,
1,
0
] |
20,113 | public int getCurrentIdentifier() {
// TODO stop casting documents to ints
return (int) (offset + current);
} | public int getCurrentIdentifier() {
return (int) (offset + current);
} | public int getcurrentidentifier() { return (int) (offset + current); } | hao44le/CS473HW4-Galago-3.10 | [
1,
0,
0,
0
] |
11,952 | public double compare(String v1, String v2) {
// FIXME: it should be possible here to say that, actually, we
// didn't learn anything from comparing these two values, so that
// probability is set to 0.5.
if (comparator == null)
return 0.5; // we ignore properties with no comparator
double sim... | public double compare(String v1, String v2) {
if (comparator == null)
return 0.5;
double sim = comparator.compare(v1, v2);
if (sim >= 0.5)
return ((high - 0.5) * (sim * sim)) + 0.5;
else
return low;
} | public double compare(string v1, string v2) { if (comparator == null) return 0.5; double sim = comparator.compare(v1, v2); if (sim >= 0.5) return ((high - 0.5) * (sim * sim)) + 0.5; else return low; } | haoyuan/Duke | [
0,
0,
1,
0
] |
12,056 | @Override
public synchronized void connected(final Mesos mesos) {
System.out.println("Connected");
state = State.CONNECTED;
retryTimer = new Timer();
retryTimer.schedule(new TimerTask() {
@Override
public void run() {
doReliableRegistration(mesos);
}
}... | @Override
public synchronized void connected(final Mesos mesos) {
System.out.println("Connected");
state = State.CONNECTED;
retryTimer = new Timer();
retryTimer.schedule(new TimerTask() {
@Override
public void run() {
doReliableRegistration(mesos);
}
}... | @override public synchronized void connected(final mesos mesos) { system.out.println("connected"); state = state.connected; retrytimer = new timer(); retrytimer.schedule(new timertask() { @override public void run() { doreliableregistration(mesos); } }, 0, 1000); } | j143/mesos | [
1,
0,
0,
0
] |
12,180 | private static boolean isCacheContainsAllEntryAttributes(WSResourceConfig targetConfig, List<RNSEntryResponseType> entries)
{
String targetContainerId = targetConfig.getContainerId();
if (targetContainerId == null)
return true;
boolean attributesMissingFromResourcesOfSameContainer = false;
for (RNSEntryResp... | private static boolean isCacheContainsAllEntryAttributes(WSResourceConfig targetConfig, List<RNSEntryResponseType> entries)
{
String targetContainerId = targetConfig.getContainerId();
if (targetContainerId == null)
return true;
boolean attributesMissingFromResourcesOfSameContainer = false;
for (RNSEntryResp... | private static boolean iscachecontainsallentryattributes(wsresourceconfig targetconfig, list<rnsentryresponsetype> entries) { string targetcontainerid = targetconfig.getcontainerid(); if (targetcontainerid == null) return true; boolean attributesmissingfromresourcesofsamecontainer = false; for (rnsentryresponsetype ent... | genesis-2/trunk | [
1,
0,
0,
0
] |
20,495 | @Override
public void onNotificationPosted(StatusBarNotification sbn) {
Prefs prefs = GBApplication.getPrefs();
if (GBApplication.isRunningLollipopOrLater()) {
if ("call".equals(sbn.getNotification().category) && prefs.getBoolean("notification_support_voip_calls", false)) {
... | @Override
public void onNotificationPosted(StatusBarNotification sbn) {
Prefs prefs = GBApplication.getPrefs();
if (GBApplication.isRunningLollipopOrLater()) {
if ("call".equals(sbn.getNotification().category) && prefs.getBoolean("notification_support_voip_calls", false)) {
... | @override public void onnotificationposted(statusbarnotification sbn) { prefs prefs = gbapplication.getprefs(); if (gbapplication.isrunninglollipoporlater()) { if ("call".equals(sbn.getnotification().category) && prefs.getboolean("notification_support_voip_calls", false)) { handlecallnotification(sbn); return; } } if (... | hurjeesic/YourSleeping | [
1,
0,
1,
0
] |
20,579 | public List<PlayItem> queryForPlayableItems (final String query1, final String query2, final int maxResults) throws MorriganException {
List<PlayItem> ret = new LinkedList<PlayItem>();
List<MediaListReference> items = new LinkedList<MediaListReference>();
List<MediaListReference> matches = new LinkedList<MediaLis... | public List<PlayItem> queryForPlayableItems (final String query1, final String query2, final int maxResults) throws MorriganException {
List<PlayItem> ret = new LinkedList<PlayItem>();
List<MediaListReference> items = new LinkedList<MediaListReference>();
List<MediaListReference> matches = new LinkedList<MediaLis... | public list<playitem> queryforplayableitems (final string query1, final string query2, final int maxresults) throws morriganexception { list<playitem> ret = new linkedlist<playitem>(); list<medialistreference> items = new linkedlist<medialistreference>(); list<medialistreference> matches = new linkedlist<medialistrefer... | haku/Morrigan | [
1,
0,
1,
0
] |
12,405 | public static /*@Real*/ double blackFormulaImpliedStdDevApproximation(
final PlainVanillaPayoff payoff,
@Real final double strike,
@Real final double forward,
@Real final double blackPrice) {
// TODO : complete
return blackFormulaImpliedStdDevApproximation... | public static double blackFormulaImpliedStdDevApproximation(
final PlainVanillaPayoff payoff,
@Real final double strike,
@Real final double forward,
@Real final double blackPrice) {
return blackFormulaImpliedStdDevApproximation(payoff, strike, forward, bla... | public static double blackformulaimpliedstddevapproximation( final plainvanillapayoff payoff, @real final double strike, @real final double forward, @real final double blackprice) { return blackformulaimpliedstddevapproximation(payoff, strike, forward, blackprice, 1.0, 0.0); } | imperialft/jquantlib | [
0,
1,
0,
0
] |
12,406 | public static /*@Real*/ double blackFormulaImpliedStdDevApproximation(
final PlainVanillaPayoff payoff,
@Real final double strike,
@Real final double forward,
@Real final double blackPrice,
@DiscountFactor final double discount) {
// TODO : complete
... | public static double blackFormulaImpliedStdDevApproximation(
final PlainVanillaPayoff payoff,
@Real final double strike,
@Real final double forward,
@Real final double blackPrice,
@DiscountFactor final double discount) {
return blackFormulaImpl... | public static double blackformulaimpliedstddevapproximation( final plainvanillapayoff payoff, @real final double strike, @real final double forward, @real final double blackprice, @discountfactor final double discount) { return blackformulaimpliedstddevapproximation(payoff, strike, forward, blackprice, discount, 0.0); ... | imperialft/jquantlib | [
0,
1,
0,
0
] |
12,417 | @Override
protected String doInBackground(Object[] par) {
// do above Server call here
Rule mRule = (Rule) par[0];
String user = (String) par[1];
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(urlRulesApi);
List<N... | @Override
protected String doInBackground(Object[] par) {
Rule mRule = (Rule) par[0];
String user = (String) par[1];
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(urlRulesApi);
List<NameValuePair> params = new Ar... | @override protected string doinbackground(object[] par) { rule mrule = (rule) par[0]; string user = (string) par[1]; httpclient client = new defaulthttpclient(); httppost post = new httppost(urlrulesapi); list<namevaluepair> params = new arraylist<namevaluepair>(); params.add(new basicnamevaluepair("rule_title", mrule.... | gsi-upm/ewe-tasker-android | [
0,
1,
0,
0
] |
12,418 | @Override
protected String doInBackground(String[] par) {
// do above Server call here
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(urlInputApi);
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new B... | @Override
protected String doInBackground(String[] par) {
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(urlInputApi);
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("inputEvent... | @override protected string doinbackground(string[] par) { httpclient client = new defaulthttpclient(); httppost post = new httppost(urlinputapi); list<namevaluepair> params = new arraylist<namevaluepair>(); params.add(new basicnamevaluepair("inputevent", par[0])); params.add(new basicnamevaluepair("user", par[1])); par... | gsi-upm/ewe-tasker-android | [
0,
1,
0,
0
] |
12,580 | @Bean
public MongoClient mongoClient() {
MongoClientOptions.Builder options = MongoClientOptions.builder() //TODO: make connection options configurable
.connectionsPerHost(4)
.maxConnectionIdleTime(60000)
.maxConnectionLifeTime(120000);
ServerAddress... | @Bean
public MongoClient mongoClient() {
MongoClientOptions.Builder options = MongoClientOptions.builder()
.connectionsPerHost(4)
.maxConnectionIdleTime(60000)
.maxConnectionLifeTime(120000);
ServerAddress serverAddress = new ServerAddress(mongoConfi... | @bean public mongoclient mongoclient() { mongoclientoptions.builder options = mongoclientoptions.builder() .connectionsperhost(4) .maxconnectionidletime(60000) .maxconnectionlifetime(120000); serveraddress serveraddress = new serveraddress(mongoconfiguration.gethost(), mongoconfiguration.getport()); mongocredential cre... | hutoroff/jagpb | [
1,
0,
0,
0
] |
20,776 | public CompoundBitVectorInterval binaryXor(
CompoundBitVectorInterval pState,
boolean pAllowSignedWrapAround,
final OverflowEventHandler pOverflowEventHandler) {
checkBitVectorCompatibilityWith(pState.info);
if (isBottom() || pState.isBottom()) {
return bottom(info);
}
if (isSing... | public CompoundBitVectorInterval binaryXor(
CompoundBitVectorInterval pState,
boolean pAllowSignedWrapAround,
final OverflowEventHandler pOverflowEventHandler) {
checkBitVectorCompatibilityWith(pState.info);
if (isBottom() || pState.isBottom()) {
return bottom(info);
}
if (isSing... | public compoundbitvectorinterval binaryxor( compoundbitvectorinterval pstate, boolean pallowsignedwraparound, final overfloweventhandler poverfloweventhandler) { checkbitvectorcompatibilitywith(pstate.info); if (isbottom() || pstate.isbottom()) { return bottom(info); } if (issingleton() && pstate.issingleton()) { retur... | jcdubois/cpachecker | [
1,
0,
0,
0
] |
20,777 | public CompoundBitVectorInterval binaryNot(
boolean pAllowSignedWrapAround, final OverflowEventHandler pOverflowEventHandler) {
if (isBottom()) {
return bottom(info);
}
CompoundBitVectorInterval result = bottom(info);
for (BitVectorInterval interval : intervals) {
if (!interval.isSingl... | public CompoundBitVectorInterval binaryNot(
boolean pAllowSignedWrapAround, final OverflowEventHandler pOverflowEventHandler) {
if (isBottom()) {
return bottom(info);
}
CompoundBitVectorInterval result = bottom(info);
for (BitVectorInterval interval : intervals) {
if (!interval.isSingl... | public compoundbitvectorinterval binarynot( boolean pallowsignedwraparound, final overfloweventhandler poverfloweventhandler) { if (isbottom()) { return bottom(info); } compoundbitvectorinterval result = bottom(info); for (bitvectorinterval interval : intervals) { if (!interval.issingleton()) { return getinternal(info.... | jcdubois/cpachecker | [
1,
0,
0,
0
] |
20,778 | public CompoundBitVectorInterval binaryOr(
CompoundBitVectorInterval pState,
boolean pAllowSignedWrapAround,
final OverflowEventHandler pOverflowEventHandler) {
checkBitVectorCompatibilityWith(pState.info);
if (isBottom() || pState.isBottom()) {
return bottom(info);
}
if (isSingl... | public CompoundBitVectorInterval binaryOr(
CompoundBitVectorInterval pState,
boolean pAllowSignedWrapAround,
final OverflowEventHandler pOverflowEventHandler) {
checkBitVectorCompatibilityWith(pState.info);
if (isBottom() || pState.isBottom()) {
return bottom(info);
}
if (isSingl... | public compoundbitvectorinterval binaryor( compoundbitvectorinterval pstate, boolean pallowsignedwraparound, final overfloweventhandler poverfloweventhandler) { checkbitvectorcompatibilitywith(pstate.info); if (isbottom() || pstate.isbottom()) { return bottom(info); } if (issingleton() && containszero()) { return pstat... | jcdubois/cpachecker | [
1,
0,
0,
0
] |
12,631 | private boolean isEmailValid(String email) {
//TODO: Replace this with your own logic
return email.contains("@");
} | private boolean isEmailValid(String email) {
return email.contains("@");
} | private boolean isemailvalid(string email) { return email.contains("@"); } | herbertkip/Web-App | [
1,
0,
0,
0
] |
12,632 | private boolean isPasswordValid(String password) {
//TODO: Replace this with your own logic
return password.length() > 4;
} | private boolean isPasswordValid(String password) {
return password.length() > 4;
} | private boolean ispasswordvalid(string password) { return password.length() > 4; } | herbertkip/Web-App | [
1,
0,
0,
0
] |
20,863 | public void runOpMode()
{
initRobot();
gyro.calibrate();
while (!isStopRequested() &&
gyro.isCalibrating())
{
sleep(50);
}
waitForStart();
//startRobot();
//sleep(1000); //Give motors time to ramp up to speed
long mi... | public void runOpMode()
{
initRobot();
gyro.calibrate();
while (!isStopRequested() &&
gyro.isCalibrating())
{
sleep(50);
}
waitForStart();
long minLoopInterval = Long.MAX_VALUE;
long maxLoopInterval = Long.MIN... | public void runopmode() { initrobot(); gyro.calibrate(); while (!isstoprequested() && gyro.iscalibrating()) { sleep(50); } waitforstart(); long minloopinterval = long.max_value; long maxloopinterval = long.min_value; long loopcount = 0; long prevlooptime; long minsampleinterval = long.max_value; long maxsampleinterval ... | goncalvesm1/Robot_Project | [
0,
1,
0,
0
] |
12,744 | @PostMapping(value = "/{id}/msg", consumes = "text/plain", produces = "text/plain")
public String receiveOrderAndReturnResult(@PathVariable int id, @RequestBody String command) {
command = command.toLowerCase().trim();
logger.debug("User (" + id + ") sent command: " + command);
// TODO: repl... | @PostMapping(value = "/{id}/msg", consumes = "text/plain", produces = "text/plain")
public String receiveOrderAndReturnResult(@PathVariable int id, @RequestBody String command) {
command = command.toLowerCase().trim();
logger.debug("User (" + id + ") sent command: " + command);
if ("... | @postmapping(value = "/{id}/msg", consumes = "text/plain", produces = "text/plain") public string receiveorderandreturnresult(@pathvariable int id, @requestbody string command) { command = command.tolowercase().trim(); logger.debug("user (" + id + ") sent command: " + command); if ("start".equals(command)) { return gam... | hjaremko/cute-animals | [
1,
0,
0,
0
] |
20,968 | public synchronized List<PlayerInput> findInputsByPlayerNumberAndSimTick(final int playerNumber, final long simTick) {
List<PlayerInput> playerInputs = new ArrayList<PlayerInput>();
// TODO Do not use linear search?
for (PlayerInput playerInput : this.playerInputs) {
if (playerInput.... | public synchronized List<PlayerInput> findInputsByPlayerNumberAndSimTick(final int playerNumber, final long simTick) {
List<PlayerInput> playerInputs = new ArrayList<PlayerInput>();
for (PlayerInput playerInput : this.playerInputs) {
if (playerInput.getPlayerNumber() == playerNumber ... | public synchronized list<playerinput> findinputsbyplayernumberandsimtick(final int playernumber, final long simtick) { list<playerinput> playerinputs = new arraylist<playerinput>(); for (playerinput playerinput : this.playerinputs) { if (playerinput.getplayernumber() == playernumber && playerinput.getsimtick() == simti... | guxuede/gm | [
1,
0,
0,
0
] |
12,982 | @Override
public BaseURL toBaseURL(FacesContext facesContext) throws MalformedURLException {
BaseURL baseURL;
String uri = bridgeURI.toString();
// If the URL is opaque, meaning it starts with something like "portlet:" or "mailto:" and
// doesn't have the double-forward-slash like "http://" does, then
if (br... | @Override
public BaseURL toBaseURL(FacesContext facesContext) throws MalformedURLException {
BaseURL baseURL;
String uri = bridgeURI.toString();
if (bridgeURI.isOpaque()) {
if (bridgeURI.isPortletScheme()) {
String portletMode = getParameter(Bridge.PORTLET_MODE_PARAME... | @override public baseurl tobaseurl(facescontext facescontext) throws malformedurlexception { baseurl baseurl; string uri = bridgeuri.tostring(); if (bridgeuri.isopaque()) { if (bridgeuri.isportletscheme()) { string portletmode = getparameter(bridge.portlet_mode_parameter); boolean modechanged = ((portletmode != null) &... | jgorny/liferay-faces-bridge-impl | [
0,
1,
0,
0
] |
13,218 | public static <N, T extends N> int getItemSize(ReadableWDocument<N, ?, T> doc, N node) {
// Short circuit if it's a text node, implementation is simpler
T textNode = doc.asText(node);
if (textNode != null) {
return doc.getLength(textNode);
}
// Otherwise, calculate two locations and subtract
... | public static <N, T extends N> int getItemSize(ReadableWDocument<N, ?, T> doc, N node) {
T textNode = doc.asText(node);
if (textNode != null) {
return doc.getLength(textNode);
}
N parent = doc.getParentElement(node);
if (parent == null) {
noteCodeThatWillBreakWithMult... | public static <n, t extends n> int getitemsize(readablewdocument<n, ?, t> doc, n node) { t textnode = doc.astext(node); if (textnode != null) { return doc.getlength(textnode); } n parent = doc.getparentelement(node); if (parent == null) { notecodethatwillbreakwithmultipleroots(); return doc.size(); } n next = doc.getne... | gburd/wave | [
1,
0,
0,
0
] |
13,290 | private void resolveAllProperties(Properties props, IXMLElement xmlProp, File file) throws CompilerException
{
variableSubstitutor.setBracesRequired(true);
for (Enumeration e = props.keys(); e.hasMoreElements();)
{
String name = (String) e.nextElement();
String value ... | private void resolveAllProperties(Properties props, IXMLElement xmlProp, File file) throws CompilerException
{
variableSubstitutor.setBracesRequired(true);
for (Enumeration e = props.keys(); e.hasMoreElements();)
{
String name = (String) e.nextElement();
String value ... | private void resolveallproperties(properties props, ixmlelement xmlprop, file file) throws compilerexception { variablesubstitutor.setbracesrequired(true); for (enumeration e = props.keys(); e.hasmoreelements();) { string name = (string) e.nextelement(); string value = props.getproperty(name); int mods = -1; do { strin... | guilhermemota/izpack | [
1,
0,
0,
0
] |
13,571 | public PeRatio computePeRatio(final TickerPrice price) {
/*
* TODO: Need to verify the denominator to be used in this formula. I was not able to understand this from the
* document
*/
return PeRatio.compute(price, computeDividendYield(price));
} | public PeRatio computePeRatio(final TickerPrice price) {
return PeRatio.compute(price, computeDividendYield(price));
} | public peratio computeperatio(final tickerprice price) { return peratio.compute(price, computedividendyield(price)); } | javacreed/super-simple-stocks | [
0,
1,
0,
0
] |
29,973 | @Override
public MultiSelect<T> build() {
final MultiSelectListBox<ITEM> component = getComponent();
// check DataProvider
if (!new ExceptionSwallowingSupplier<>(() -> component.getDataProvider()).get().isPresent()) {
// default data provider
component.setDataProvider(DataProvider.ofCollection(Collections.... | @Override
public MultiSelect<T> build() {
final MultiSelectListBox<ITEM> component = getComponent();
if (!new ExceptionSwallowingSupplier<>(() -> component.getDataProvider()).get().isPresent()) {
component.setDataProvider(DataProvider.ofCollection(Collections.emptySet()));
}
if (!customItemCaptionGen... | @override public multiselect<t> build() { final multiselectlistbox<item> component = getcomponent(); if (!new exceptionswallowingsupplier<>(() -> component.getdataprovider()).get().ispresent()) { component.setdataprovider(dataprovider.ofcollection(collections.emptyset())); } if (!customitemcaptiongenerator && !itemcapt... | holon-platform/holon-vaadin-flow | [
0,
0,
1,
0
] |
29,974 | @Override
public ListMultiSelectInputBuilder<T, ITEM> required(boolean required) {
// TODO not supported at time of writing
// getComponent().setRequiredIndicatorVisible(required);
return getConfigurator();
} | @Override
public ListMultiSelectInputBuilder<T, ITEM> required(boolean required) {
return getConfigurator();
} | @override public listmultiselectinputbuilder<t, item> required(boolean required) { return getconfigurator(); } | holon-platform/holon-vaadin-flow | [
0,
1,
0,
0
] |
13,607 | public void generateMethods(FhirToHapiTypeConverter converter, List<Method> methods) {
List<HapiType> types = converter.getHapiTypes();
System.out.println("Attribute path:" + converter.getFullAttributePath());
if ("Immunization.doseQuantity".equals(converter.getFullAttributePath())) {
... | public void generateMethods(FhirToHapiTypeConverter converter, List<Method> methods) {
List<HapiType> types = converter.getHapiTypes();
System.out.println("Attribute path:" + converter.getFullAttributePath());
if ("Immunization.doseQuantity".equals(converter.getFullAttributePath())) {
... | public void generatemethods(fhirtohapitypeconverter converter, list<method> methods) { list<hapitype> types = converter.gethapitypes(); system.out.println("attribute path:" + converter.getfullattributepath()); if ("immunization.dosequantity".equals(converter.getfullattributepath())) { system.out.println("start debuggin... | hapifhir/hapi-profile-code-generator | [
0,
1,
0,
0
] |
13,608 | public void handlePrimitiveTypeMethods(FhirToHapiTypeConverter converter, HapiType type, List<Method> methods) {
String attributeName = converter.parseAttributeName();
if (converter.isMultiType()) {
handlePrimitiveMultiType(converter, type, methods, attributeName);//TODO Path never appears t... | public void handlePrimitiveTypeMethods(FhirToHapiTypeConverter converter, HapiType type, List<Method> methods) {
String attributeName = converter.parseAttributeName();
if (converter.isMultiType()) {
handlePrimitiveMultiType(converter, type, methods, attributeName)
} else {
... | public void handleprimitivetypemethods(fhirtohapitypeconverter converter, hapitype type, list<method> methods) { string attributename = converter.parseattributename(); if (converter.ismultitype()) { handleprimitivemultitype(converter, type, methods, attributename) } else { if(converter.ismultiplecardinality()) { handle... | hapifhir/hapi-profile-code-generator | [
1,
0,
0,
0
] |
30,286 | private Algorithm configIntermedAlgo(final boolean hasBeenPreviouslySorted) {
AbstractMultiStepAlgo algorithm = null;
Map<StepIOKeys, AlgoIOKeys> stepToAlgoKeysMapping = new StepAlgoKeyMapBuilder()
.add(INTERMEDIATE_DISTINCT_VALUES_HOLDER, DISTINCT_VALUES_HOLDER)... | private Algorithm configIntermedAlgo(final boolean hasBeenPreviouslySorted) {
AbstractMultiStepAlgo algorithm = null;
Map<StepIOKeys, AlgoIOKeys> stepToAlgoKeysMapping = new StepAlgoKeyMapBuilder()
.add(INTERMEDIATE_DISTINCT_VALUES_HOLDER, DISTINCT_VALUES_HOLDER)... | private algorithm configintermedalgo(final boolean hasbeenpreviouslysorted) { abstractmultistepalgo algorithm = null; map<stepiokeys, algoiokeys> steptoalgokeysmapping = new stepalgokeymapbuilder() .add(intermediate_distinct_values_holder, distinct_values_holder) .add(intermediate_serialized_file, intermediate_output_f... | humbletrader/katechaki | [
1,
0,
0,
0
] |
30,517 | private static void findIntersection(Map<String, LineString> linesByName) {
for (Entry<String, LineString> entryA : linesByName.entrySet()) {
for (Entry<String, LineString> entryB : linesByName.entrySet()) {
System.out.println("Checking " + entryA.getKey() + " against "
... | private static void findIntersection(Map<String, LineString> linesByName) {
for (Entry<String, LineString> entryA : linesByName.entrySet()) {
for (Entry<String, LineString> entryB : linesByName.entrySet()) {
System.out.println("Checking " + entryA.getKey() + " against "
... | private static void findintersection(map<string, linestring> linesbyname) { for (entry<string, linestring> entrya : linesbyname.entryset()) { for (entry<string, linestring> entryb : linesbyname.entryset()) { system.out.println("checking " + entrya.getkey() + " against " + entryb.getkey()); if (entrya.equals(entryb)) co... | jettmarks/clueRide-angular | [
1,
0,
0,
0
] |
30,631 | public static double TotalHashCapacity(double bytes, double fpp) {
double word_bits = 32;
double bucket_words = 8;
double hash_bits = 32;
double result = 1;
// TODO: unify this exponential + binary search with the bytes needed function above
while (Fpp(result, bytes) < fpp) {
result *= 2;
... | public static double TotalHashCapacity(double bytes, double fpp) {
double word_bits = 32;
double bucket_words = 8;
double hash_bits = 32;
double result = 1;
while (Fpp(result, bytes) < fpp) {
result *= 2;
}
if (result == 1) return 0;
double lo = 0;
while (lo + 1 < result) {... | public static double totalhashcapacity(double bytes, double fpp) { double word_bits = 32; double bucket_words = 8; double hash_bits = 32; double result = 1; while (fpp(result, bytes) < fpp) { result *= 2; } if (result == 1) return 0; double lo = 0; while (lo + 1 < result) { double mid = lo + (result - lo) / 2; double t... | jbapple/libfilter | [
1,
0,
0,
0
] |
14,341 | @Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// add MQTT listener
MqttService.add_mqttListener(this);
// need to bind the UI activity and the background service
Intent intent=new Intent(getActivity(),MqttService.class... | @Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MqttService.add_mqttListener(this);
Intent intent=new Intent(getActivity(),MqttService.class);
MqttService.setCur_topic("pic_data");
startForegroundService(getActivity(),... | @override public void oncreate(@nullable bundle savedinstancestate) { super.oncreate(savedinstancestate); mqttservice.add_mqttlistener(this); intent intent=new intent(getactivity(),mqttservice.class); mqttservice.setcur_topic("pic_data"); startforegroundservice(getactivity(),intent); } | gjbang/graduation-design | [
1,
1,
0,
0
] |
22,629 | public synchronized void stop() {
task = null; // set the flag and while loop in the run() will exit
i = 0;
notify(); // try to wake up the thread which associate this object
} | public synchronized void stop() {
task = null;
i = 0;
notify();
} | public synchronized void stop() { task = null; i = 0; notify(); } | jmwhite999/_multithreaded_greyscaling | [
1,
0,
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.