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
31,506
public void testToString() { System.out.println("testToString"); // TODO add your test code below by replacing the default call to fail. fail("The test case is empty."); }
public void testToString() { System.out.println("testToString"); fail("The test case is empty."); }
public void testtostring() { system.out.println("testtostring"); fail("the test case is empty."); }
CBIIT/camod
[ 0, 0, 0, 1 ]
31,507
public void testEquals() { System.out.println("testEquals"); // TODO add your test code below by replacing the default call to fail. fail("The test case is empty."); }
public void testEquals() { System.out.println("testEquals"); fail("The test case is empty."); }
public void testequals() { system.out.println("testequals"); fail("the test case is empty."); }
CBIIT/camod
[ 0, 0, 0, 1 ]
15,312
private void initMenuItems() { menuItemFileOpen.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { var fileChooser = new FileChooser(); var selected = fileChooser.showOpenDialog(null); if (select...
private void initMenuItems() { menuItemFileOpen.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { var fileChooser = new FileChooser(); var selected = fileChooser.showOpenDialog(null); if (select...
private void initmenuitems() { menuitemfileopen.setonaction(new eventhandler<actionevent>() { @override public void handle(actionevent event) { var filechooser = new filechooser(); var selected = filechooser.showopendialog(null); if (selected != null) { ifmlengine.loadstory(selected); } } }); menuitemfilerestart.setdis...
IFML2/ifml-player
[ 0, 1, 0, 0 ]
15,473
private static Path resolve(Path parent, String path) { // Ensure directories exist File directory = parent.toFile(); if (!directory.exists() && !directory.mkdirs()) { // Failed to create directories... should probably let this crash ScalingHealth.LOGGER.error("Failed to ...
private static Path resolve(Path parent, String path) { File directory = parent.toFile(); if (!directory.exists() && !directory.mkdirs()) { ScalingHealth.LOGGER.error("Failed to create config directory '{}'. This won't end well...", directory.getAbsolu...
private static path resolve(path parent, string path) { file directory = parent.tofile(); if (!directory.exists() && !directory.mkdirs()) { scalinghealth.logger.error("failed to create config directory '{}'. this won't end well...", directory.getabsolutepath()); } return parent.resolve(path); }
Cyborgmas/ScalingHealth
[ 0, 0, 1, 0 ]
15,483
private static Object invokeAnnotation(Class<?> clazz, Object[] trees) throws InstantiationException, IllegalAccessException, InvocationTargetException { Constructor<?> ctor = clazz.getDeclaredConstructors()[0]; ctor.setAccessible(true); Object instance = ctor.newInstance(); Method metho...
private static Object invokeAnnotation(Class<?> clazz, Object[] trees) throws InstantiationException, IllegalAccessException, InvocationTargetException { Constructor<?> ctor = clazz.getDeclaredConstructors()[0]; ctor.setAccessible(true); Object instance = ctor.newInstance(); Method metho...
private static object invokeannotation(class<?> clazz, object[] trees) throws instantiationexception, illegalaccessexception, invocationtargetexception { constructor<?> ctor = clazz.getdeclaredconstructors()[0]; ctor.setaccessible(true); object instance = ctor.newinstance(); method method = null; method[] declaredmetho...
FogInTheFrog/intellij-scala
[ 0, 1, 0, 0 ]
23,785
private static void replaceParagraphWithPreface(final Context context, final XWPFParagraph paragraph) { try (final CursorHelper cursorHelper = context.newCursorHelper(paragraph)) { // TODO insert preface } finally { context.getDocument().removeBodyElement(context.getDocument().ge...
private static void replaceParagraphWithPreface(final Context context, final XWPFParagraph paragraph) { try (final CursorHelper cursorHelper = context.newCursorHelper(paragraph)) { } finally { context.getDocument().removeBodyElement(context.getDocument().getPosOfParagraph(paragra...
private static void replaceparagraphwithpreface(final context context, final xwpfparagraph paragraph) { try (final cursorhelper cursorhelper = context.newcursorhelper(paragraph)) { } finally { context.getdocument().removebodyelement(context.getdocument().getposofparagraph(paragraph)); } }
FIT-Mobility/dimo-tool-suite
[ 0, 1, 0, 0 ]
15,634
public void sendObjOutbound(MongoSession ms, SubNode parent, SubNode node, boolean forceSendToPublic) { exec.run(() -> { try { boolean isAccnt = NodeType.ACCOUNT.s().equals(node.getType()); // Get the inReplyTo from the parent property (foreign node) or if not found g...
public void sendObjOutbound(MongoSession ms, SubNode parent, SubNode node, boolean forceSendToPublic) { exec.run(() -> { try { boolean isAccnt = NodeType.ACCOUNT.s().equals(node.getType()); String inReplyTo = !isAccnt ? apUtil.buildUrlF...
public void sendobjoutbound(mongosession ms, subnode parent, subnode node, boolean forcesendtopublic) { exec.run(() -> { try { boolean isaccnt = nodetype.account.s().equals(node.gettype()); string inreplyto = !isaccnt ? aputil.buildurlforreplyto(ms, parent) : null; aplist attachments = !isaccnt ? apub.createattachments...
Clay-Ferguson/Quantizr
[ 1, 0, 0, 0 ]
15,732
@Override public ReactionToIncomingMessage processIncomingMessage(Object message) { if (isIncomingMessageValid(message, CableCheckReqType.class, cableCheckRes)) { V2GMessage v2gMessageReq = (V2GMessage) message; CableCheckReqType cableCheckReq = (CableCheckReqType) v2gMessageReq.getBody().getBodyElement(...
@Override public ReactionToIncomingMessage processIncomingMessage(Object message) { if (isIncomingMessageValid(message, CableCheckReqType.class, cableCheckRes)) { V2GMessage v2gMessageReq = (V2GMessage) message; CableCheckReqType cableCheckReq = (CableCheckReqType) v2gMessageReq.getBody().getBodyElement(...
@override public reactiontoincomingmessage processincomingmessage(object message) { if (isincomingmessagevalid(message, cablecheckreqtype.class, cablecheckres)) { v2gmessage v2gmessagereq = (v2gmessage) message; cablecheckreqtype cablecheckreq = (cablecheckreqtype) v2gmessagereq.getbody().getbodyelement().getvalue(); s...
I2SE/RISE-V2G
[ 0, 1, 0, 0 ]
15,882
public static void startActionFoo(Context context, String param1, String param2) { Intent intent = new Intent(context, MyIntentService.class); intent.setAction(ACTION_FOO); intent.putExtra(EXTRA_PARAM1, param1); intent.putExtra(EXTRA_PARAM2, param2); context.startService(intent);...
public static void startActionFoo(Context context, String param1, String param2) { Intent intent = new Intent(context, MyIntentService.class); intent.setAction(ACTION_FOO); intent.putExtra(EXTRA_PARAM1, param1); intent.putExtra(EXTRA_PARAM2, param2); context.startService(intent);...
public static void startactionfoo(context context, string param1, string param2) { intent intent = new intent(context, myintentservice.class); intent.setaction(action_foo); intent.putextra(extra_param1, param1); intent.putextra(extra_param2, param2); context.startservice(intent); }
CasterIO/Bootstrap
[ 0, 1, 0, 0 ]
15,883
public static void startActionBaz(Context context, String param1, String param2) { Intent intent = new Intent(context, MyIntentService.class); intent.setAction(ACTION_BAZ); intent.putExtra(EXTRA_PARAM1, param1); intent.putExtra(EXTRA_PARAM2, param2); context.startService(intent);...
public static void startActionBaz(Context context, String param1, String param2) { Intent intent = new Intent(context, MyIntentService.class); intent.setAction(ACTION_BAZ); intent.putExtra(EXTRA_PARAM1, param1); intent.putExtra(EXTRA_PARAM2, param2); context.startService(intent);...
public static void startactionbaz(context context, string param1, string param2) { intent intent = new intent(context, myintentservice.class); intent.setaction(action_baz); intent.putextra(extra_param1, param1); intent.putextra(extra_param2, param2); context.startservice(intent); }
CasterIO/Bootstrap
[ 0, 1, 0, 0 ]
24,133
public String deResolve(eu.hyvar.feature.HyFeatureAttribute element, eu.hyvar.context.contextValidity.HyAttributeValidityFormula container, EReference reference) { return HyFeatureResolverUtil.deresolveFeatureAttribute(element, new Date()); }
public String deResolve(eu.hyvar.feature.HyFeatureAttribute element, eu.hyvar.context.contextValidity.HyAttributeValidityFormula container, EReference reference) { return HyFeatureResolverUtil.deresolveFeatureAttribute(element, new Date()); }
public string deresolve(eu.hyvar.feature.hyfeatureattribute element, eu.hyvar.context.contextvalidity.hyattributevalidityformula container, ereference reference) { return hyfeatureresolverutil.deresolvefeatureattribute(element, new date()); }
DarwinSPL/DarwinSPL
[ 0, 1, 0, 0 ]
15,951
public ExpressionStageOptions generateExpressionStageOptions() { List<String> allExpressionStagesRaw = retrieveExpressionStages.getDmelanogasterExpressionStages(); ExpressionStageOptions expressionStageOptions = new ExpressionStageOptions(); List<ExpressionStageGroup> expressionStageGroupList = new LinkedList<Exp...
public ExpressionStageOptions generateExpressionStageOptions() { List<String> allExpressionStagesRaw = retrieveExpressionStages.getDmelanogasterExpressionStages(); ExpressionStageOptions expressionStageOptions = new ExpressionStageOptions(); List<ExpressionStageGroup> expressionStageGroupList = new LinkedList<Exp...
public expressionstageoptions generateexpressionstageoptions() { list<string> allexpressionstagesraw = retrieveexpressionstages.getdmelanogasterexpressionstages(); expressionstageoptions expressionstageoptions = new expressionstageoptions(); list<expressionstagegroup> expressionstagegrouplist = new linkedlist<expressio...
CodingBash/fly-transcription-webapp
[ 1, 1, 0, 0 ]
7,837
public Image LoadImageAnim(String fileName, int frames) { Image image = new Image(); int framesCount = 1; if (SUPPORT_FILEFORMAT_GIF) { if (rCore.IsFileExtension(fileName, ".gif")) { byte[] fileData = null; try{ BufferedImage tmpImg...
public Image LoadImageAnim(String fileName, int frames) { Image image = new Image(); int framesCount = 1; if (SUPPORT_FILEFORMAT_GIF) { if (rCore.IsFileExtension(fileName, ".gif")) { byte[] fileData = null; try{ BufferedImage tmpImg...
public image loadimageanim(string filename, int frames) { image image = new image(); int framescount = 1; if (support_fileformat_gif) { if (rcore.isfileextension(filename, ".gif")) { byte[] filedata = null; try{ bufferedimage tmpimg = imageio.read(new file(filename)); bytearrayoutputstream os = new bytearrayoutputstrea...
CreedVI/Raylib-J
[ 0, 1, 0, 0 ]
7,893
public static GetEntityResponse<EventInfo> toEvent( final IcalCallback cb, final BwCalendar cal, final Icalendar ical, final Component val, final boolean mergeAttendees) { final var resp = new GetEntityResponse<EventInfo>(); if (val == null) { return Respo...
public static GetEntityResponse<EventInfo> toEvent( final IcalCallback cb, final BwCalendar cal, final Icalendar ical, final Component val, final boolean mergeAttendees) { final var resp = new GetEntityResponse<EventInfo>(); if (val == null) { return Respo...
public static getentityresponse<eventinfo> toevent( final icalcallback cb, final bwcalendar cal, final icalendar ical, final component val, final boolean mergeattendees) { final var resp = new getentityresponse<eventinfo>(); if (val == null) { return response.notok(resp, failed, "no component supplied"); } string curre...
Bedework/bw-calendar-convert
[ 1, 0, 1, 0 ]
7,967
@GET @Produces(MediaType.APPLICATION_JSON) // FIXME Uncomment when overrides can be handled // @OutSchema("wdk.users.get-by-id") public JSONObject getById(@QueryParam("includePreferences") Boolean includePreferences) throws WdkModelException { UserBundle userBundle = getUserBundle(Access.PUBLIC); List<U...
@GET @Produces(MediaType.APPLICATION_JSON) public JSONObject getById(@QueryParam("includePreferences") Boolean includePreferences) throws WdkModelException { UserBundle userBundle = getUserBundle(Access.PUBLIC); List<UserPropertyName> propDefs = getWdkModel().getModelConfig() .getAccountDB().get...
@get @produces(mediatype.application_json) public jsonobject getbyid(@queryparam("includepreferences") boolean includepreferences) throws wdkmodelexception { userbundle userbundle = getuserbundle(access.public); list<userpropertyname> propdefs = getwdkmodel().getmodelconfig() .getaccountdb().getuserpropertynames(); ret...
EuPathDB-Infra/WDK
[ 1, 0, 0, 0 ]
24,418
public static void useDropper(PlayerEntity player, Object tank, int button) { ItemStack stack = player.inventory.getItemStack(); if (stack.isEmpty() || !(stack.getItem() instanceof ItemGaugeDropper)) { return; } if (!stack.isEmpty()) { Flui...
public static void useDropper(PlayerEntity player, Object tank, int button) { ItemStack stack = player.inventory.getItemStack(); if (stack.isEmpty() || !(stack.getItem() instanceof ItemGaugeDropper)) { return; } if (!stack.isEmpty()) { Flui...
public static void usedropper(playerentity player, object tank, int button) { itemstack stack = player.inventory.getitemstack(); if (stack.isempty() || !(stack.getitem() instanceof itemgaugedropper)) { return; } if (!stack.isempty()) { fluidstack storedfluid = storageutils.getstoredfluidfromnbt(stack); if (tank instanc...
Chiefwright/Mekanism
[ 0, 1, 0, 0 ]
24,703
@Override public boolean onStartNode(ProjectPath path) { JpaEntityMap entityMap = (JpaEntityMap) path.getObject(); // TODO: andrus, 4/28/2006 - actually we need to analyze preloaded classes and // see how they were annotated to choose the right access type... enti...
@Override public boolean onStartNode(ProjectPath path) { JpaEntityMap entityMap = (JpaEntityMap) path.getObject(); entityMap.setAccess(AccessType.FIELD); return true; }
@override public boolean onstartnode(projectpath path) { jpaentitymap entitymap = (jpaentitymap) path.getobject(); entitymap.setaccess(accesstype.field); return true; }
JavaQualitasCorpus/cayenne-3.0.1
[ 1, 0, 0, 0 ]
24,704
@Override public boolean onStartNode(ProjectPath path) { JpaRelationship relationship = (JpaRelationship) path.getObjectParent(); JpaJoinColumn column = (JpaJoinColumn) path.getObject(); if (column.getTable() == null) { JpaEntity entity = path.firstInstanceOf(...
@Override public boolean onStartNode(ProjectPath path) { JpaRelationship relationship = (JpaRelationship) path.getObjectParent(); JpaJoinColumn column = (JpaJoinColumn) path.getObject(); if (column.getTable() == null) { JpaEntity entity = path.firstInstanceOf(...
@override public boolean onstartnode(projectpath path) { jparelationship relationship = (jparelationship) path.getobjectparent(); jpajoincolumn column = (jpajoincolumn) path.getobject(); if (column.gettable() == null) { jpaentity entity = path.firstinstanceof(jpaentity.class); column.settable(entity.gettable().getname(...
JavaQualitasCorpus/cayenne-3.0.1
[ 0, 1, 0, 0 ]
16,569
private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) { // Get the method for generating test values GenerateTest testGen; try { if(testType == TestType.EXHAUSTIVE) { testGen = new Exhaustiv...
private Result executeTest(Path.ID id, QCInterpreter interpreter, Decl.FunctionOrMethod dec, TestType testType, int numTest, BigInteger lowerLimit, BigInteger upperLimit) { GenerateTest testGen; try { if(testType == TestType.EXHAUSTIVE) { testGen = new ExhaustiveGenerateTest(dec.getParameters(), interprete...
private result executetest(path.id id, qcinterpreter interpreter, decl.functionormethod dec, testtype testtype, int numtest, biginteger lowerlimit, biginteger upperlimit) { generatetest testgen; try { if(testtype == testtype.exhaustive) { testgen = new exhaustivegeneratetest(dec.getparameters(), interpreter, numtest, l...
JC626/quickcheck-for-whiley
[ 0, 0, 1, 0 ]
8,419
@GET @Path("getDefaultNotebook") @Produces(MediaType.TEXT_PLAIN) public String getDefaultNotebook() { final String defaultNotebookUrl = this.bkConfig.getDefaultNotebookUrl(); // TODO, assume the url is a file path for now. java.nio.file.Path defaultNotebookFile = Paths.get(defaultNotebookUrl); Str...
@GET @Path("getDefaultNotebook") @Produces(MediaType.TEXT_PLAIN) public String getDefaultNotebook() { final String defaultNotebookUrl = this.bkConfig.getDefaultNotebookUrl(); java.nio.file.Path defaultNotebookFile = Paths.get(defaultNotebookUrl); String content = this.utils.readFile(defaultNoteboo...
@get @path("getdefaultnotebook") @produces(mediatype.text_plain) public string getdefaultnotebook() { final string defaultnotebookurl = this.bkconfig.getdefaultnotebookurl(); java.nio.file.path defaultnotebookfile = paths.get(defaultnotebookurl); string content = this.utils.readfile(defaultnotebookfile); if (content ==...
NunoEdgarGFlowHub/beaker-notebook
[ 1, 0, 0, 0 ]
8,421
@POST @Path("setPreference") public synchronized void setPreference( @FormParam("preferencename") String preferenceName, @FormParam("preferencevalue") String preferenceValue) { if ((preferenceName == null) || (preferenceValue == null)) return; Object newValue = null; // Validate boolean pr...
@POST @Path("setPreference") public synchronized void setPreference( @FormParam("preferencename") String preferenceName, @FormParam("preferencevalue") String preferenceValue) { if ((preferenceName == null) || (preferenceValue == null)) return; Object newValue = null; String[] booleanPr...
@post @path("setpreference") public synchronized void setpreference( @formparam("preferencename") string preferencename, @formparam("preferencevalue") string preferencevalue) { if ((preferencename == null) || (preferencevalue == null)) return; object newvalue = null; string[] booleanprefs = {"advanced-mode", "allow-ano...
NunoEdgarGFlowHub/beaker-notebook
[ 1, 0, 0, 0 ]
8,420
private void resetConfig() { final String configFileUrl = this.bkConfig.getConfigFileUrl(); final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl(); // TODO, assume the url is a file path for now. java.nio.file.Path configFile = Paths.get(configFileUrl); java.nio.file.Path preferenceFi...
private void resetConfig() { final String configFileUrl = this.bkConfig.getConfigFileUrl(); final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl(); java.nio.file.Path configFile = Paths.get(configFileUrl); java.nio.file.Path preferenceFile = Paths.get(preferenceFileUrl); try { ...
private void resetconfig() { final string configfileurl = this.bkconfig.getconfigfileurl(); final string preferencefileurl = this.bkconfig.getpreferencefileurl(); java.nio.file.path configfile = paths.get(configfileurl); java.nio.file.path preferencefile = paths.get(preferencefileurl); try { jsonparser parser = new jso...
NunoEdgarGFlowHub/beaker-notebook
[ 1, 0, 0, 0 ]
8,457
@Override @StartHandler(phase = Phase.INBOUND_EVENT_CONNECTORS) public void start() { if (activeProcessorThreads() > 0 || workLauncherRunning.get()) { if (state.get().isRunning()) { // then it's ok. It's already running return; } else { ...
@Override @StartHandler(phase = Phase.INBOUND_EVENT_CONNECTORS) public void start() { if (activeProcessorThreads() > 0 || workLauncherRunning.get()) { if (state.get().isRunning()) { return; } else { throw new Illegal...
@override @starthandler(phase = phase.inbound_event_connectors) public void start() { if (activeprocessorthreads() > 0 || worklauncherrunning.get()) { if (state.get().isrunning()) { return; } else { throw new illegalstateexception("cannot start this processor. it is pending shutdown..."); } } state previousstate = stat...
Mu-L/AxonFramework
[ 0, 0, 1, 0 ]
275
public void update(Observable arg0, Object arg) { // arg is Event if (!(arg instanceof Event)) return; Event event = (Event) arg; // check the event function against the functions we have notifications watching for String function = event.getEvent(); //we err on the side of caution here in checking all e...
public void update(Observable arg0, Object arg) { if (!(arg instanceof Event)) return; Event event = (Event) arg; String function = event.getEvent(); if (UserDirectoryService.SECURE_ADD_USER.equals(function) || UserDirectoryService.SECURE_UPDATE_USER_OWN_PASSWORD.equals(function) || UserDirectorySe...
public void update(observable arg0, object arg) { if (!(arg instanceof event)) return; event event = (event) arg; string function = event.getevent(); if (userdirectoryservice.secure_add_user.equals(function) || userdirectoryservice.secure_update_user_own_password.equals(function) || userdirectoryservice.secure_update_u...
RyanAFinney/sakai
[ 1, 0, 0, 0 ]
286
public static String getAppProcess32Bit() { return getAppProcess32Bit(true); }
public static String getAppProcess32Bit() { return getAppProcess32Bit(true); }
public static string getappprocess32bit() { return getappprocess32bit(true); }
Lobesitdoll/librootjava
[ 0, 0, 0, 0 ]
8,492
@Pure @Override public boolean equals(@Nullable Object o) { if (o == null) return false; // never happens if (this == o) return true; // This test is illegal because WeakKey is a generic type, // so use the getClass hack below instead. // if (!(o instanceof WeakKey)) return false; ...
@Pure @Override public boolean equals(@Nullable Object o) { if (o == null) return false; if (this == o) return true; if (!(o.getClass().equals(WeakKey.class))) return false; Object t = this.get(); @SuppressWarnings("unchecked") Object u = ((WeakKey) o).get()...
@pure @override public boolean equals(@nullable object o) { if (o == null) return false; if (this == o) return true; if (!(o.getclass().equals(weakkey.class))) return false; object t = this.get(); @suppresswarnings("unchecked") object u = ((weakkey) o).get(); if ((t == null) || (u == null)) return false; if (t == u) re...
Nargeshdb/plume-util
[ 1, 0, 0, 0 ]
16,687
public void applyGPSSetting() { // verify if GPS enable on device if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) { GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext()); Boolean showGPSLocation = gp...
public void applyGPSSetting() { if(GPSService.isGPSProviderEnable(context) || GPSService.isNetworkProviderEnable(context)) { GPSSettingController gpsSettingController = new GPSSettingController(mMapView.getContext()); Boolean showGPSLocation = gpsSettingController.getGPSLocationS...
public void applygpssetting() { if(gpsservice.isgpsproviderenable(context) || gpsservice.isnetworkproviderenable(context)) { gpssettingcontroller gpssettingcontroller = new gpssettingcontroller(mmapview.getcontext()); boolean showgpslocation = gpssettingcontroller.getgpslocationstate(); boolean showgpslocationoncenter ...
MalteBerlin/TerraMobile
[ 0, 1, 0, 0 ]
325
void tracksDropped(Point startPoint, Point dropPoint, List<Track> tracks) { // This cast is horrid but we can't fix everything at once. TrackPanel panel = ((TrackPanel) getParent()); List<MouseableRegion> regions = getMouseRegions(); if (regions.isEmpty()) { ...
void tracksDropped(Point startPoint, Point dropPoint, List<Track> tracks) { TrackPanel panel = ((TrackPanel) getParent()); List<MouseableRegion> regions = getMouseRegions(); if (regions.isEmpty()) { panel.addTracks(tracks); } el...
void tracksdropped(point startpoint, point droppoint, list<track> tracks) { trackpanel panel = ((trackpanel) getparent()); list<mouseableregion> regions = getmouseregions(); if (regions.isempty()) { panel.addtracks(tracks); } else { boolean before = true; mouseableregion dropregion = null; mouseableregion startregion =...
Karimi-Lab/ALEA
[ 1, 0, 0, 0 ]
343
@AfterMethod public void cleanupResources() throws SQLException { TEST_NUMBER++; //todo issue #232 fix increment topic partition name for tests on multi jvm ALL_RESOURCES.cleanUpClusters(); DB_RESOURCE.executeResource(JDBCUtil.DROP_TABLE_SQL_RESOURCE); }
@AfterMethod public void cleanupResources() throws SQLException { TEST_NUMBER++; ALL_RESOURCES.cleanUpClusters(); DB_RESOURCE.executeResource(JDBCUtil.DROP_TABLE_SQL_RESOURCE); }
@aftermethod public void cleanupresources() throws sqlexception { test_number++; all_resources.cleanupclusters(); db_resource.executeresource(jdbcutil.drop_table_sql_resource); }
MayerRoman/Lagerta
[ 0, 0, 1, 0 ]
24,925
private void scheduleCleanup() { if (cleanupRegistration != null) { // Already scheduled return; } cleanupRegistration = ui.beforeClientResponse(ui, ignore -> { cleanupRegistration = null; pendingCleanup = false; // TODO Avoid copying b...
private void scheduleCleanup() { if (cleanupRegistration != null) { return; } cleanupRegistration = ui.beforeClientResponse(ui, ignore -> { cleanupRegistration = null; pendingCleanup = false; properties.keySet().stream().fil...
private void schedulecleanup() { if (cleanupregistration != null) { return; } cleanupregistration = ui.beforeclientresponse(ui, ignore -> { cleanupregistration = null; pendingcleanup = false; properties.keyset().stream().filter(property -> !lastused.contains(property)).collect(collectors.tolist()) .foreach(unused -> pr...
Legioth/reactivevaadin
[ 0, 1, 0, 0 ]
24,936
@Override protected Path getPath(Canvas canvas, Paint paint) { Path path = new Path(); String text = formatText(); if (text == null) { return path; } // TODO: get path while TextPath is set. if (setupFillPaint(paint, 1.0f, getBox(paint, text))) { ...
@Override protected Path getPath(Canvas canvas, Paint paint) { Path path = new Path(); String text = formatText(); if (text == null) { return path; } if (setupFillPaint(paint, 1.0f, getBox(paint, text))) { applyTextPropertiesToPaint(paint); ...
@override protected path getpath(canvas canvas, paint paint) { path path = new path(); string text = formattext(); if (text == null) { return path; } if (setupfillpaint(paint, 1.0f, getbox(paint, text))) { applytextpropertiestopaint(paint); paint.gettextpath(text, 0, text.length(), 0, -paint.ascent(), path); path.trans...
L8RMedia/exponent
[ 0, 1, 0, 0 ]
8,573
public void translate() { //TODO: translate code }
public void translate() { }
public void translate() { }
JC-Bodoque/geometric-transformer
[ 0, 1, 0, 0 ]
636
@Override public <Q extends Facet> Q getFacet(final Class<Q> facetType) { final Q facet = super.getFacet(facetType); Q noopFacet = null; if (isNotANoopFacet(facet)) { return facet; } else { noopFacet = facet; } if (interfaces() != null) { ...
@Override public <Q extends Facet> Q getFacet(final Class<Q> facetType) { final Q facet = super.getFacet(facetType); Q noopFacet = null; if (isNotANoopFacet(facet)) { return facet; } else { noopFacet = facet; } if (interfaces() != null) { ...
@override public <q extends facet> q getfacet(final class<q> facettype) { final q facet = super.getfacet(facettype); q noopfacet = null; if (isnotanoopfacet(facet)) { return facet; } else { noopfacet = facet; } if (interfaces() != null) { final list<objectspecification> interfaces = interfaces(); for (int i = 0; i < in...
K-Rhen/isis
[ 1, 0, 0, 0 ]
643
protected void blast(T message) { logger.debug("blast called for message: " + message); Map<String,Object> filter = KStringUtil.toMap(message.getFilter()); Long affinityAppId = null; Map<String, Object> data = createPayLoadData(message); List<D> deviceList = getDeviceList(filter, affinityAppId, message.isSand...
protected void blast(T message) { logger.debug("blast called for message: " + message); Map<String,Object> filter = KStringUtil.toMap(message.getFilter()); Long affinityAppId = null; Map<String, Object> data = createPayLoadData(message); List<D> deviceList = getDeviceList(filter, affinityAppId, message.isSand...
protected void blast(t message) { logger.debug("blast called for message: " + message); map<string,object> filter = kstringutil.tomap(message.getfilter()); long affinityappid = null; map<string, object> data = createpayloaddata(message); list<d> devicelist = getdevicelist(filter, affinityappid, message.issandbox()); in...
LinuxTek/kona-app-model
[ 0, 0, 1, 0 ]
17,067
protected void closeLayout( ) { //TODO support specified height/width/alignment if ( root != null ) { root.setContentHeight( childHeight ); IStyle areaStyle = root.getStyle( ); int width = getCurrentIP( ) + getOffsetX( ) + getDimensionValue( areaStyle .getProperty( StyleConstants.STYLE_...
protected void closeLayout( ) { if ( root != null ) { root.setContentHeight( childHeight ); IStyle areaStyle = root.getStyle( ); int width = getCurrentIP( ) + getOffsetX( ) + getDimensionValue( areaStyle .getProperty( StyleConstants.STYLE_PADDING_RIGHT ) ) + getDimensionValue( area...
protected void closelayout( ) { if ( root != null ) { root.setcontentheight( childheight ); istyle areastyle = root.getstyle( ); int width = getcurrentip( ) + getoffsetx( ) + getdimensionvalue( areastyle .getproperty( styleconstants.style_padding_right ) ) + getdimensionvalue( areastyle .getproperty( styleconstants.sty...
JamesCao2048/BlizzardData
[ 0, 1, 1, 0 ]
8,889
private void performEnableScreen() { synchronized (mGlobalLock) { if (DEBUG_BOOT) Slog.i(TAG_WM, "performEnableScreen: mDisplayEnabled=" + mDisplayEnabled + " mForceDisplayEnabled=" + mForceDisplayEnabled + " mShowingBootMessages=" + mShowingBootMessages ...
private void performEnableScreen() { synchronized (mGlobalLock) { if (DEBUG_BOOT) Slog.i(TAG_WM, "performEnableScreen: mDisplayEnabled=" + mDisplayEnabled + " mForceDisplayEnabled=" + mForceDisplayEnabled + " mShowingBootMessages=" + mShowingBootMessages ...
private void performenablescreen() { synchronized (mgloballock) { if (debug_boot) slog.i(tag_wm, "performenablescreen: mdisplayenabled=" + mdisplayenabled + " mforcedisplayenabled=" + mforcedisplayenabled + " mshowingbootmessages=" + mshowingbootmessages + " msystembooted=" + msystembooted + " monlycore=" + monlycore, ...
LynzhX/android_frameworks_base-1
[ 1, 0, 0, 0 ]
8,894
boolean viewServerGetFocusedWindow(Socket client) { if (isSystemSecure()) { return false; } boolean result = true; WindowState focusedWindow = getFocusedWindow(); BufferedWriter out = null; // Any uncaught exception will crash the system process try { ...
boolean viewServerGetFocusedWindow(Socket client) { if (isSystemSecure()) { return false; } boolean result = true; WindowState focusedWindow = getFocusedWindow(); BufferedWriter out = null; try { OutputStream clientStream = client.getOutput...
boolean viewservergetfocusedwindow(socket client) { if (issystemsecure()) { return false; } boolean result = true; windowstate focusedwindow = getfocusedwindow(); bufferedwriter out = null; try { outputstream clientstream = client.getoutputstream(); out = new bufferedwriter(new outputstreamwriter(clientstream), 8 * 102...
LynzhX/android_frameworks_base-1
[ 0, 1, 0, 0 ]
17,124
@Test public void simpleEndpointReturnsPostsWithoutTransformation() { //This unit-test class is the wrong place to test that behaviour, unless it becomes an integration test //Given ForumPosts posts = generateTestPosts(); when(exampleApiService.getPosts()).thenReturn(posts); ...
@Test public void simpleEndpointReturnsPostsWithoutTransformation() { ForumPosts posts = generateTestPosts(); when(exampleApiService.getPosts()).thenReturn(posts); ForumPosts controllerOutput = exerciseController.posts(); assertEquals(controllerOutput....
@test public void simpleendpointreturnspostswithouttransformation() { forumposts posts = generatetestposts(); when(exampleapiservice.getposts()).thenreturn(posts); forumposts controlleroutput = exercisecontroller.posts(); assertequals(controlleroutput.size(), 2); asserttrue(controlleroutput.get(0).gettitle().contains("...
JoseAlban/etc
[ 0, 0, 0, 1 ]
17,125
@Test public void transformedEndpointReturnsPostsWithCurrentDate() { //This unit-test class is the wrong place to test that behaviour, unless it becomes an integration test //Given TransformedForumPosts transformed = generateTransformedTestPosts(); when(exampleApiService.getTransform...
@Test public void transformedEndpointReturnsPostsWithCurrentDate() { TransformedForumPosts transformed = generateTransformedTestPosts(); when(exampleApiService.getTransformedPosts()).thenReturn(transformed); TransformedForumPosts controllerOutput = exerciseController....
@test public void transformedendpointreturnspostswithcurrentdate() { transformedforumposts transformed = generatetransformedtestposts(); when(exampleapiservice.gettransformedposts()).thenreturn(transformed); transformedforumposts controlleroutput = exercisecontroller.transformed(); assertequals(controlleroutput.size(),...
JoseAlban/etc
[ 0, 0, 0, 1 ]
33,512
@Override public void doServerTick(World world) { super.doServerTick(world); Entity rider = entity.getControllingPassenger(); pokemob.setGeneralState(GeneralStates.CONTROLLED, rider != null); if (rider == null) return; Config config = PokecubeCore.instance.getConfig(); ...
@Override public void doServerTick(World world) { super.doServerTick(world); Entity rider = entity.getControllingPassenger(); pokemob.setGeneralState(GeneralStates.CONTROLLED, rider != null); if (rider == null) return; Config config = PokecubeCore.instance.getConfig(); ...
@override public void doservertick(world world) { super.doservertick(world); entity rider = entity.getcontrollingpassenger(); pokemob.setgeneralstate(generalstates.controlled, rider != null); if (rider == null) return; config config = pokecubecore.instance.getconfig(); boolean move = false; entity.rotationyaw = pokemob...
Pokecube-Development/Pokecube-Core
[ 1, 0, 0, 0 ]
17,267
public void split (FeatureSelection fs) { if (ilist == null) throw new IllegalStateException ("Frozen. Cannot split."); InstanceList ilist0 = new InstanceList (ilist.getPipe()); InstanceList ilist1 = new InstanceList (ilist.getPipe()); for (int i = 0; i < ilist.size(); i++) { Instance instance = ...
public void split (FeatureSelection fs) { if (ilist == null) throw new IllegalStateException ("Frozen. Cannot split."); InstanceList ilist0 = new InstanceList (ilist.getPipe()); InstanceList ilist1 = new InstanceList (ilist.getPipe()); for (int i = 0; i < ilist.size(); i++) { Instance instance = ...
public void split (featureselection fs) { if (ilist == null) throw new illegalstateexception ("frozen. cannot split."); instancelist ilist0 = new instancelist (ilist.getpipe()); instancelist ilist1 = new instancelist (ilist.getpipe()); for (int i = 0; i < ilist.size(); i++) { instance instance = ilist.getinstance(i); f...
JULIELab/jcore-dependencies
[ 0, 0, 0, 1 ]
25,541
Uri findNext() { // TODO: Unify with searchSubtitles() if (mPrefs.scopeUri != null || isTvBox) { DocumentFile video = null; File videoRaw = null; if (!isTvBox && mPrefs.scopeUri != null) { if ("com.android.externalstorage.documents".equals(mPrefs.media...
Uri findNext() { if (mPrefs.scopeUri != null || isTvBox) { DocumentFile video = null; File videoRaw = null; if (!isTvBox && mPrefs.scopeUri != null) { if ("com.android.externalstorage.documents".equals(mPrefs.mediaUri.getHost())) { ...
uri findnext() { if (mprefs.scopeuri != null || istvbox) { documentfile video = null; file videoraw = null; if (!istvbox && mprefs.scopeuri != null) { if ("com.android.externalstorage.documents".equals(mprefs.mediauri.gethost())) { video = subtitleutils.finduriinscope(this, mprefs.scopeuri, mprefs.mediauri); } else { d...
Radfanyemen/Player
[ 0, 1, 0, 0 ]
17,459
private void mOSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mOSActionPerformed // TODO add your handling code here: // new ViewOrdemServico().setVisible(true); }
private void mOSActionPerformed(java.awt.event.ActionEvent evt) { }
private void mosactionperformed(java.awt.event.actionevent evt) { }
LeandroDosSantosPereira/sistemaBarbearia
[ 0, 1, 0, 0 ]
9,278
@SubscribeEvent(priority = EventPriority.NORMAL) public void onRenderOverlay(RenderGameOverlayEvent.Post event) { /* if (event.getType() != RenderGameOverlayEvent.ElementType.CROSSHAIRS) { return; } FIXME: still needed? if so, search for ported way */ ItemStack ac...
@SubscribeEvent(priority = EventPriority.NORMAL) public void onRenderOverlay(RenderGameOverlayEvent.Post event) { ItemStack activeStack = mc.player.getUseItem(); if (activeStack.getItem() instanceof ModularCrossbowItem) { ModularCrossbowItem item = (ModularCrossbowItem) activeStack.getItem(); gui.set...
@subscribeevent(priority = eventpriority.normal) public void onrenderoverlay(rendergameoverlayevent.post event) { itemstack activestack = mc.player.getuseitem(); if (activestack.getitem() instanceof modularcrossbowitem) { modularcrossbowitem item = (modularcrossbowitem) activestack.getitem(); gui.setprogress(item.getpr...
LordGrimmauld/tetra
[ 1, 0, 0, 0 ]
33,945
public static boolean isAlphabetic(String s) { if (isEmpty(s)) return defaultEmptyOK; // Search through string's characters one by one // until we find a non-alphabetic character. // When we do, return false; if we don't, return true. for (int i = 0; i < s.length(); i++) { ...
public static boolean isAlphabetic(String s) { if (isEmpty(s)) return defaultEmptyOK; for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (!isLetter(c)) return false; } return true; }
public static boolean isalphabetic(string s) { if (isempty(s)) return defaultemptyok; for (int i = 0; i < s.length(); i++) { char c = s.charat(i); if (!isletter(c)) return false; } return true; }
Mark110/e-commerce
[ 1, 0, 0, 0 ]
17,649
private void rollupParameters(TLParamGroup sourceParamGroup, TLParamGroup targetParamGroup, RollupReferenceHandler referenceHandler, ModelElementCloner cloner) { for (TLParameter sourceParam : sourceParamGroup.getParameters()) { TLMemberField<?> sourceFieldRef = sourceParam.getFieldRef(); ...
private void rollupParameters(TLParamGroup sourceParamGroup, TLParamGroup targetParamGroup, RollupReferenceHandler referenceHandler, ModelElementCloner cloner) { for (TLParameter sourceParam : sourceParamGroup.getParameters()) { TLMemberField<?> sourceFieldRef = sourceParam.getFieldRef(); ...
private void rollupparameters(tlparamgroup sourceparamgroup, tlparamgroup targetparamgroup, rollupreferencehandler referencehandler, modelelementcloner cloner) { for (tlparameter sourceparam : sourceparamgroup.getparameters()) { tlmemberfield<?> sourcefieldref = sourceparam.getfieldref(); if (sourcefieldref != null) { ...
OpenTravel/OTM-DE-Compiler
[ 0, 1, 0, 0 ]
9,475
private static List<TestConfiguration> getAdditionalConfigurations(Activity activity) { List<TestConfiguration> additionalConfigurations = new ArrayList<>(); if (Constants.USE_GMS_CONFIGURATION) { additionalConfigurations.add(new GmsPermissionConfiguration(activity)); } // TO...
private static List<TestConfiguration> getAdditionalConfigurations(Activity activity) { List<TestConfiguration> additionalConfigurations = new ArrayList<>(); if (Constants.USE_GMS_CONFIGURATION) { additionalConfigurations.add(new GmsPermissionConfiguration(activity)); } ...
private static list<testconfiguration> getadditionalconfigurations(activity activity) { list<testconfiguration> additionalconfigurations = new arraylist<>(); if (constants.use_gms_configuration) { additionalconfigurations.add(new gmspermissionconfiguration(activity)); } return additionalconfigurations; }
LaudateCorpus1/security-certification-resources
[ 1, 0, 0, 0 ]
9,644
@Override public void simpleRender(RenderManager rm) { //TODO: add render code }
@Override public void simpleRender(RenderManager rm) { }
@override public void simplerender(rendermanager rm) { }
MeFisto94/test-bot-1
[ 0, 1, 0, 0 ]
9,670
public int applyLayers(int[] data) { checkNotNull(data); BlockVector3 minY = region.getMinimumPoint(); int originX = minY.getBlockX(); int originZ = minY.getBlockZ(); int maxY = region.getMaximumPoint().getBlockY(); BlockState fillerAir = BlockTypes.AIR.getDefaultState();...
public int applyLayers(int[] data) { checkNotNull(data); BlockVector3 minY = region.getMinimumPoint(); int originX = minY.getBlockX(); int originZ = minY.getBlockZ(); int maxY = region.getMaximumPoint().getBlockY(); BlockState fillerAir = BlockTypes.AIR.getDefaultState();...
public int applylayers(int[] data) { checknotnull(data); blockvector3 miny = region.getminimumpoint(); int originx = miny.getblockx(); int originz = miny.getblockz(); int maxy = region.getmaximumpoint().getblocky(); blockstate fillerair = blocktypes.air.getdefaultstate(); int blockschanged = 0; blockstateholder<blockst...
IronApollo/FastAsyncWorldEdit
[ 0, 1, 0, 0 ]
9,671
public int apply(int[] data) throws MaxChangedBlocksException { checkNotNull(data); BlockVector3 minY = region.getMinimumPoint(); int originX = minY.getBlockX(); int originY = minY.getBlockY(); int originZ = minY.getBlockZ(); int maxY = region.getMaximumPoint().getBlockY(...
public int apply(int[] data) throws MaxChangedBlocksException { checkNotNull(data); BlockVector3 minY = region.getMinimumPoint(); int originX = minY.getBlockX(); int originY = minY.getBlockY(); int originZ = minY.getBlockZ(); int maxY = region.getMaximumPoint().getBlockY(...
public int apply(int[] data) throws maxchangedblocksexception { checknotnull(data); blockvector3 miny = region.getminimumpoint(); int originx = miny.getblockx(); int originy = miny.getblocky(); int originz = miny.getblockz(); int maxy = region.getmaximumpoint().getblocky(); blockstate fillerair = blocktypes.air.getdefa...
IronApollo/FastAsyncWorldEdit
[ 0, 1, 0, 0 ]
1,494
private void initialization(int minXSize, int maxXSize) { // TODO: current implementation is less elegant. code refactoring may be needed. dfaConfig = new DFAConfig(); // allocates a new config every time. Random r = new Random(); dfaConfig.stateSize = r.nextInt((maxXSize - minXSize) + 1...
private void initialization(int minXSize, int maxXSize) { dfaConfig = new DFAConfig(); Random r = new Random(); dfaConfig.stateSize = r.nextInt((maxXSize - minXSize) + 1) + minXSize; dfaConfig.faultyStateSize = Math.max(dfaConfig.stateSize / 10, 4); LOGGER.debug("Generate...
private void initialization(int minxsize, int maxxsize) { dfaconfig = new dfaconfig(); random r = new random(); dfaconfig.statesize = r.nextint((maxxsize - minxsize) + 1) + minxsize; dfaconfig.faultystatesize = math.max(dfaconfig.statesize / 10, 4); logger.debug("generated overall state size and faulty state size: {}, ...
OES2018/randomly-generation-of-diagnosable-dfa
[ 1, 0, 0, 0 ]
34,283
@Override public BiomeProvider load(AnnotatedType t, Object c, ConfigLoader loader) throws LoadException { return loader.loadType(BiomePipelineProvider.class, c); // TODO: actually implement this lol }
@Override public BiomeProvider load(AnnotatedType t, Object c, ConfigLoader loader) throws LoadException { return loader.loadType(BiomePipelineProvider.class, c); }
@override public biomeprovider load(annotatedtype t, object c, configloader loader) throws loadexception { return loader.loadtype(biomepipelineprovider.class, c); }
PolyhedralDev/Terra-biome-provider-pipeline
[ 0, 1, 0, 0 ]
34,349
public List<List<String>> rows() { try { List<List<String>> results = new ArrayList<>(); for (BaseWork baseWork : topSortedWork) { String vertexName = baseWork.getName(); VertexProgress progress = progressCountsMap.get(vertexName); if (progress != null) { // Map 1 ........
public List<List<String>> rows() { try { List<List<String>> results = new ArrayList<>(); for (BaseWork baseWork : topSortedWork) { String vertexName = baseWork.getName(); VertexProgress progress = progressCountsMap.get(vertexName); if (progress != null) { ...
public list<list<string>> rows() { try { list<list<string>> results = new arraylist<>(); for (basework basework : topsortedwork) { string vertexname = basework.getname(); vertexprogress progress = progresscountsmap.get(vertexname); if (progress != null) { results.add( arrays.aslist( getnamewithprogress(vertexname, prog...
JSA-Insubria/hive
[ 1, 0, 0, 0 ]
9,779
Statement compileSQLProcedureStatementOrNull(Routine routine, StatementCompound context) { Statement cs = null; HsqlName label = null; RangeVariable[] rangeVariables = context == null ? routine.getParameterRangeVariables() ...
Statement compileSQLProcedureStatementOrNull(Routine routine, StatementCompound context) { Statement cs = null; HsqlName label = null; RangeVariable[] rangeVariables = context == null ? routine.getParameterRangeVariables() ...
statement compilesqlprocedurestatementornull(routine routine, statementcompound context) { statement cs = null; hsqlname label = null; rangevariable[] rangevariables = context == null ? routine.getparameterrangevariables() : context.getrangevariables(); if (!routine.istrigger() && issimplename() && !isreservedkey()) { ...
RabadanLab/Pegasus
[ 0, 1, 0, 0 ]
34,400
public int pcToLine(int pc) { /* * Line number entries don't have to appear in any particular * order, so we have to do a linear search. TODO: If * this turns out to be a bottleneck, consider sorting the * list prior to use. */ int sz = size(); int be...
public int pcToLine(int pc) { int sz = size(); int bestPc = -1; int bestLine = -1; for (int i = 0; i < sz; i++) { Item one = get(i); int onePc = one.getStartPc(); if ((onePc <= pc) && (onePc > bestPc)) { bestPc = onePc; ...
public int pctoline(int pc) { int sz = size(); int bestpc = -1; int bestline = -1; for (int i = 0; i < sz; i++) { item one = get(i); int onepc = one.getstartpc(); if ((onepc <= pc) && (onepc > bestpc)) { bestpc = onepc; bestline = one.getlinenumber(); if (bestpc == pc) { break; } } } return bestline; }
MaTriXy/atlas
[ 1, 0, 0, 0 ]
9,846
public void free() { currState = NO_STATE; if (Sage.DBG) System.out.println("Closing down mplayer"); if (uiMgr != null) uiMgr.putFloat("mplayer/last_volume", currVolume); timeGuessMillis = 0; guessTimestamp = 0; currVolume = 1.0f; if (mpStdin != null && isMPlayerRunning()) { ...
public void free() { currState = NO_STATE; if (Sage.DBG) System.out.println("Closing down mplayer"); if (uiMgr != null) uiMgr.putFloat("mplayer/last_volume", currVolume); timeGuessMillis = 0; guessTimestamp = 0; currVolume = 1.0f; if (mpStdin != null && isMPlayerRunning()) { ...
public void free() { currstate = no_state; if (sage.dbg) system.out.println("closing down mplayer"); if (uimgr != null) uimgr.putfloat("mplayer/last_volume", currvolume); timeguessmillis = 0; guesstimestamp = 0; currvolume = 1.0f; if (mpstdin != null && ismplayerrunning()) { thread t = new thread("playersendcmd") { pub...
Narflex/sagetv
[ 0, 0, 1, 0 ]
26,236
@Test public void testNullValueDisallowed() throws Exception { { String str = "{ \"id\": 123, \"petId\": 345, \"quantity\": 100, \"status\": \"placed\" }"; org.openapitools.client.model.Order o = json.getContext(null).readValue(str, org.openapitools.client.model.Order.class); ...
@Test public void testNullValueDisallowed() throws Exception { { String str = "{ \"id\": 123, \"petId\": 345, \"quantity\": 100, \"status\": \"placed\" }"; org.openapitools.client.model.Order o = json.getContext(null).readValue(str, org.openapitools.client.model.Order.class); ...
@test public void testnullvaluedisallowed() throws exception { { string str = "{ \"id\": 123, \"petid\": 345, \"quantity\": 100, \"status\": \"placed\" }"; org.openapitools.client.model.order o = json.getcontext(null).readvalue(str, org.openapitools.client.model.order.class); assertequals(100l, (long)o.getquantity()); ...
IonBazan/openapi-generator
[ 0, 0, 1, 0 ]
9,930
public static String getUserDocumentsPath() { if (m_documents == null) { //TODO: Should I look at the OneDrive entry first? // The OneDrive key from the web is different from mine. m_documents = Advapi32Util.registryGetStringValue(HKEY_CURRENT_USER, "Software\\Microsoft\...
public static String getUserDocumentsPath() { if (m_documents == null) { m_documents = Advapi32Util.registryGetStringValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Personal"); if (m_documents == null) { ...
public static string getuserdocumentspath() { if (m_documents == null) { m_documents = advapi32util.registrygetstringvalue(hkey_current_user, "software\\microsoft\\windows\\currentversion\\explorer\\shell folders", "personal"); if (m_documents == null) { m_documents = advapi32util.registrygetstringvalue(hkey_current_us...
SIMRacingApps/SIMRacingAppsServer
[ 1, 0, 0, 0 ]
34,529
public void testWrongName() { try { construct("--- !!org.yaml.snakeyaml.constructor.TestBean\nwrongName: No one\nage: 24\nborn: 1982-05-03\n"); fail("IntrospectionException expected."); } catch (Exception e) { // TODO improve the error message - the pointer should be ...
public void testWrongName() { try { construct("--- !!org.yaml.snakeyaml.constructor.TestBean\nwrongName: No one\nage: 24\nborn: 1982-05-03\n"); fail("IntrospectionException expected."); } catch (Exception e) { assertEquals( ...
public void testwrongname() { try { construct("--- !!org.yaml.snakeyaml.constructor.testbean\nwrongname: no one\nage: 24\nborn: 1982-05-03\n"); fail("introspectionexception expected."); } catch (exception e) { assertequals( "cannot create property=wrongname for javabean=#<org.jvyaml.testbean name=\"null\" age=0 born=\"...
PRECISE/ROSLab
[ 1, 0, 0, 0 ]
1,770
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Request request = (Request) o; if (objectID != request.objectID) return false; if (methodIdentifier != null ? !methodIden...
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Request request = (Request) o; if (objectID != request.objectID) return false; if (methodIdentifier != null ? !methodIden...
@override public boolean equals(object o) { if (this == o) return true; if (o == null || getclass() != o.getclass()) return false; request request = (request) o; if (objectid != request.objectid) return false; if (methodidentifier != null ? !methodidentifier.equals(request.methodidentifier) : request.methodidentifier !...
MatzeS/blackbird_java
[ 0, 0, 1, 0 ]
34,690
@Override public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws ServletException, IOException { log.debug("Authentication success"); // TODO: Optimize Map<String, Object> res...
@Override public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws ServletException, IOException { log.debug("Authentication success"); Map<String, Object> result = new HashMap<...
@override public void onauthenticationsuccess(httpservletrequest request, httpservletresponse response, authentication authentication) throws servletexception, ioexception { log.debug("authentication success"); map<string, object> result = new hashmap<>(1); result.put("redirect", sitproperties.redirect()); jsonwriter.w...
O70/spring-laboratory
[ 1, 0, 0, 0 ]
18,316
private Set<String> findUris(Graph graph) { Set<String> result = new HashSet<>(); for (Triple t : graph.iterate()) { try { String object = t.getObject().toString().replace("<", "").replace(">", ""); // check for valid uri new URL(object).toURI(...
private Set<String> findUris(Graph graph) { Set<String> result = new HashSet<>(); for (Triple t : graph.iterate()) { try { String object = t.getObject().toString().replace("<", "").replace(">", ""); new URL(object).toURI(); resu...
private set<string> finduris(graph graph) { set<string> result = new hashset<>(); for (triple t : graph.iterate()) { try { string object = t.getobject().tostring().replace("<", "").replace(">", ""); new url(object).touri(); result.add(object); } catch (malformedurlexception e) { e.printstacktrace(); } catch (urisyntaxe...
Interactions-HSG/wot-search
[ 1, 0, 0, 0 ]
10,287
@Override public PipelineData execute(ActionExpressionType expression, PipelineData input, ExecutionContext context, OperationResult globalResult) throws ScriptExecutionException { boolean rebind = expressionHelper.getArgumentAsBoolean(expression.getParameter(), PARAM_REBIND_RESOURCES, input, context, false...
@Override public PipelineData execute(ActionExpressionType expression, PipelineData input, ExecutionContext context, OperationResult globalResult) throws ScriptExecutionException { boolean rebind = expressionHelper.getArgumentAsBoolean(expression.getParameter(), PARAM_REBIND_RESOURCES, input, context, false...
@override public pipelinedata execute(actionexpressiontype expression, pipelinedata input, executioncontext context, operationresult globalresult) throws scriptexecutionexception { boolean rebind = expressionhelper.getargumentasboolean(expression.getparameter(), param_rebind_resources, input, context, false, param_rebi...
Neovision-xin/dev
[ 1, 0, 0, 0 ]
34,916
private boolean analyzeLastLine( PageAnalysis analysis, PageElementTag tag, Collection<CheckErrorResult> errors) { // TODO: Refactor // Check type of tag if (!HtmlTagType.CENTER.equals(tag.getType()) && !HtmlTagType.SMALL.equals(tag.getType())) { return false; } // Check na...
private boolean analyzeLastLine( PageAnalysis analysis, PageElementTag tag, Collection<CheckErrorResult> errors) { if (!HtmlTagType.CENTER.equals(tag.getType()) && !HtmlTagType.SMALL.equals(tag.getType())) { return false; } Integer namespace = analysis.getPage().getName...
private boolean analyzelastline( pageanalysis analysis, pageelementtag tag, collection<checkerrorresult> errors) { if (!htmltagtype.center.equals(tag.gettype()) && !htmltagtype.small.equals(tag.gettype())) { return false; } integer namespace = analysis.getpage().getnamespace(); if ((namespace == null) || (namespace.int...
RogueScholar/wpcleaner
[ 1, 0, 0, 0 ]
10,562
@Override public CFG createCFG() { CFG cfg = new CFG(null); BasicBlock start = new BasicBlock("PROGRAM-START", BasicBlock.NOT_REDUCIBLE); BasicBlock end = new BasicBlock("PROGRAM-END", BasicBlock.REDUCIBLE_SINGLETON); cfg.start = start; cfg.end = end; cfg.addVertex(st...
@Override public CFG createCFG() { CFG cfg = new CFG(null); BasicBlock start = new BasicBlock("PROGRAM-START", BasicBlock.NOT_REDUCIBLE); BasicBlock end = new BasicBlock("PROGRAM-END", BasicBlock.REDUCIBLE_SINGLETON); cfg.start = start; cfg.end = end; cfg.addVertex(st...
@override public cfg createcfg() { cfg cfg = new cfg(null); basicblock start = new basicblock("program-start", basicblock.not_reducible); basicblock end = new basicblock("program-end", basicblock.reducible_singleton); cfg.start = start; cfg.end = end; cfg.addvertex(start); cfg.addvertex(end); cfg firstcfg = body.get(0)...
LouisJenkinsCS/DSL
[ 1, 0, 0, 0 ]
2,478
public boolean isHeld(IControllerEvent event) { return activationMap.containsKey(event); }
public boolean isHeld(IControllerEvent event) { return activationMap.containsKey(event); }
public boolean isheld(icontrollerevent event) { return activationmap.containskey(event); }
Matthewacon/mh4-hackathon
[ 0, 0, 0, 0 ]
18,874
public void setAir(final World world) { // TODO maybe see if there is a way to find the default "air" for this // world world.setBlockState(this.getPos(), Blocks.AIR.getDefaultState()); }
public void setAir(final World world) { world.setBlockState(this.getPos(), Blocks.AIR.getDefaultState()); }
public void setair(final world world) { world.setblockstate(this.getpos(), blocks.air.getdefaultstate()); }
MetaltyrantMk2/Pokecube-Issues-and-Wiki
[ 1, 0, 0, 0 ]
2,498
@PluginMethod public void writeFile(PluginCall call) { String path = call.getString("path"); String data = call.getString("data"); Boolean recursive = call.getBoolean("recursive", false); if (path == null) { Logger.error(getLogTag(), "No path or filename retrieved from ca...
@PluginMethod public void writeFile(PluginCall call) { String path = call.getString("path"); String data = call.getString("data"); Boolean recursive = call.getBoolean("recursive", false); if (path == null) { Logger.error(getLogTag(), "No path or filename retrieved from ca...
@pluginmethod public void writefile(plugincall call) { string path = call.getstring("path"); string data = call.getstring("data"); boolean recursive = call.getboolean("recursive", false); if (path == null) { logger.error(getlogtag(), "no path or filename retrieved from call", null); call.reject("no_path"); return; } if...
RetoeGo/Stuby
[ 1, 0, 0, 0 ]
2,512
public MyPair<List<List<FpgaInternalMove>>,List<MyPair<FpgaInternalState,List<FpgaInternalMove>>>> getNextStates(FpgaInternalState state){ if(this.theMachine.isTerminal(state.getCompactMachineState())) { return null; } // Retrieve all legal moves List<List<CompactMove>> movesForAllRoles; try { movesForA...
public MyPair<List<List<FpgaInternalMove>>,List<MyPair<FpgaInternalState,List<FpgaInternalMove>>>> getNextStates(FpgaInternalState state){ if(this.theMachine.isTerminal(state.getCompactMachineState())) { return null; } List<List<CompactMove>> movesForAllRoles; try { movesForAllRoles = this.theMachine.ge...
public mypair<list<list<fpgainternalmove>>,list<mypair<fpgainternalstate,list<fpgainternalmove>>>> getnextstates(fpgainternalstate state){ if(this.themachine.isterminal(state.getcompactmachinestate())) { return null; } list<list<compactmove>> movesforallroles; try { movesforallroles = this.themachine.getalllegalmoves(s...
Lucsparidans/GGP-Project
[ 1, 0, 0, 0 ]
10,940
public void setWindow(SpectralWindow window) { // Use the same window everywhere. for (int i = 0; i < ffts.length; i++) { ffts[i].setWindow(window); // TODO review, both sides or just one iffts[i].setWindow(window); } }
public void setWindow(SpectralWindow window) { for (int i = 0; i < ffts.length; i++) { ffts[i].setWindow(window); iffts[i].setWindow(window); } }
public void setwindow(spectralwindow window) { for (int i = 0; i < ffts.length; i++) { ffts[i].setwindow(window); iffts[i].setwindow(window); } }
RubbaBoy/jsyn
[ 1, 0, 0, 0 ]
19,154
public void registBroadcastReceiver(){ mRegistrationBroadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if(action.equals(QuickstartPreferences.REGISTRATION_READ...
public void registBroadcastReceiver(){ mRegistrationBroadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if(action.equals(QuickstartPreferences.REGISTRATION_READ...
public void registbroadcastreceiver(){ mregistrationbroadcastreceiver = new broadcastreceiver() { @override public void onreceive(context context, intent intent) { string action = intent.getaction(); if(action.equals(quickstartpreferences.registration_ready)){ }else if(action.equals(quickstartpreferences.registration_g...
KyoungjunPark/SmartClass
[ 0, 1, 0, 0 ]
10,985
static void addChildElement( BasePropertyWriter p, Map<String, BasePropertyWriter> childElements, FlowElementsContainer process, Collection<ElementParameters> simulationParameters, List<ItemDefinition> itemDefinitions, List<RootElement> rootElement...
static void addChildElement( BasePropertyWriter p, Map<String, BasePropertyWriter> childElements, FlowElementsContainer process, Collection<ElementParameters> simulationParameters, List<ItemDefinition> itemDefinitions, List<RootElement> rootElement...
static void addchildelement( basepropertywriter p, map<string, basepropertywriter> childelements, flowelementscontainer process, collection<elementparameters> simulationparameters, list<itemdefinition> itemdefinitions, list<rootelement> rootelements) { childelements.put(p.getelement().getid(), p); if (p.getelement() in...
Prodaxis/kie-wb-common
[ 0, 0, 1, 0 ]
19,324
@Test public void testGetWithTwoTags() { int limit = THREAD_COUNT; // TODO How to set this? queryParameters.put("limit", Arrays.asList(String.valueOf(limit))); // TODO pick iteration and pod at random queryParameters.put("tag", Arrays.asList("iteration:1", "podname:" + workerP...
@Test public void testGetWithTwoTags() { int limit = THREAD_COUNT; queryParameters.put("limit", Arrays.asList(String.valueOf(limit))); queryParameters.put("tag", Arrays.asList("iteration:1", "podname:" + workerPodNames.get(0))); logger.info("Query parameters: " + query...
@test public void testgetwithtwotags() { int limit = thread_count; queryparameters.put("limit", arrays.aslist(string.valueof(limit))); queryparameters.put("tag", arrays.aslist("iteration:1", "podname:" + workerpodnames.get(0))); logger.info("query parameters: " + queryparameters.size()); list<datum> traces = simplerest...
PikBot/jaeger-performance
[ 1, 1, 0, 0 ]
19,350
@Override public List<InputSplit> getSplits(JobContext context) throws IOException { final Configuration conf = context.getConfiguration(); final KijiURI inputTableURI = getInputTableURI(conf); final Kiji kiji = Kiji.Factory.open(inputTableURI, conf); final KijiTable table = kiji.openTable(inputTableU...
@Override public List<InputSplit> getSplits(JobContext context) throws IOException { final Configuration conf = context.getConfiguration(); final KijiURI inputTableURI = getInputTableURI(conf); final Kiji kiji = Kiji.Factory.open(inputTableURI, conf); final KijiTable table = kiji.openTable(inputTableU...
@override public list<inputsplit> getsplits(jobcontext context) throws ioexception { final configuration conf = context.getconfiguration(); final kijiuri inputtableuri = getinputtableuri(conf); final kiji kiji = kiji.factory.open(inputtableuri, conf); final kijitable table = kiji.opentable(inputtableuri.gettable()); fi...
NeoGridBR/kiji-schema
[ 1, 0, 0, 0 ]
11,228
private void onHeartClicked(MenuItem item) { ArrayList favoritesList = null; String filename = "favorites.json"; FileInputStream inputStream = null; try { inputStream = openFileInput(filename); String json = IOUtils.toString(inputStream, "UTF-8"); Gson...
private void onHeartClicked(MenuItem item) { ArrayList favoritesList = null; String filename = "favorites.json"; FileInputStream inputStream = null; try { inputStream = openFileInput(filename); String json = IOUtils.toString(inputStream, "UTF-8"); Gson...
private void onheartclicked(menuitem item) { arraylist favoriteslist = null; string filename = "favorites.json"; fileinputstream inputstream = null; try { inputstream = openfileinput(filename); string json = ioutils.tostring(inputstream, "utf-8"); gson gson = new gson(); favoriteslist = gson.fromjson(json, arraylist.cl...
Newbhope/cu-bus
[ 0, 0, 1, 0 ]
11,229
private void getStopLocation(String stopId) { final RequestQueue queue = Volley.newRequestQueue(this); Uri stopUrlUri = Uri.parse(getStopUrl) .buildUpon() .appendQueryParameter(key_param, getResources().getString(R.string.api_key)) .appendQueryParameter(st...
private void getStopLocation(String stopId) { final RequestQueue queue = Volley.newRequestQueue(this); Uri stopUrlUri = Uri.parse(getStopUrl) .buildUpon() .appendQueryParameter(key_param, getResources().getString(R.string.api_key)) .appendQueryParameter(st...
private void getstoplocation(string stopid) { final requestqueue queue = volley.newrequestqueue(this); uri stopurluri = uri.parse(getstopurl) .buildupon() .appendqueryparameter(key_param, getresources().getstring(r.string.api_key)) .appendqueryparameter(stop_param, stopid) .build(); string stopurl = stopurluri.tostring...
Newbhope/cu-bus
[ 1, 0, 0, 0 ]
11,234
private void buildWeightList( List<TDataNodeInfo> onlineDataNodes, List<TRegionReplicaSet> allocatedRegions) { // TODO: The remaining disk capacity of DataNode can also be calculated into the weightList int maximumRegionNum = 0; Map<TDataNodeLocation, Integer> countMap = new HashMap<>(); for (TDat...
private void buildWeightList( List<TDataNodeInfo> onlineDataNodes, List<TRegionReplicaSet> allocatedRegions) { int maximumRegionNum = 0; Map<TDataNodeLocation, Integer> countMap = new HashMap<>(); for (TDataNodeInfo dataNodeInfo : onlineDataNodes) { maxId = Math.max(maxId, dataNodeInfo.getLo...
private void buildweightlist( list<tdatanodeinfo> onlinedatanodes, list<tregionreplicaset> allocatedregions) { int maximumregionnum = 0; map<tdatanodelocation, integer> countmap = new hashmap<>(); for (tdatanodeinfo datanodeinfo : onlinedatanodes) { maxid = math.max(maxid, datanodeinfo.getlocation().getdatanodeid()); c...
RYH61/iotdb
[ 1, 0, 0, 0 ]
11,434
public static Connection getConnectionDB() { File dbDir = new File(CoreContext.DB_DATA_PATH); if (!dbDir.exists()) dbDir.mkdir(); Connection connection = null; try { // если базы нет, то она будет создана автоматически, // иначе будет создано подключение к существующей базе connection = DriverManager.g...
public static Connection getConnectionDB() { File dbDir = new File(CoreContext.DB_DATA_PATH); if (!dbDir.exists()) dbDir.mkdir(); Connection connection = null; try { "jdbc:hsqldb:file:" + dbDir.getPath() + File.separator + CoreContext.DB_LIBRARY_FILE_NAME, "SA", ""); } catch (SQLException e) { ...
public static connection getconnectiondb() { file dbdir = new file(corecontext.db_data_path); if (!dbdir.exists()) dbdir.mkdir(); connection connection = null; try { "jdbc:hsqldb:file:" + dbdir.getpath() + file.separator + corecontext.db_library_file_name, "sa", ""); } catch (sqlexception e) { system.err.println("error...
NikitaFeodonit/bqtj
[ 1, 1, 0, 0 ]
3,313
public void setOverrides(final LegacyOverridesMixin overrides) { this.overrides = overrides; }
public void setOverrides(final LegacyOverridesMixin overrides) { this.overrides = overrides; }
public void setoverrides(final legacyoverridesmixin overrides) { this.overrides = overrides; }
KellyShao/tessera
[ 0, 0, 0, 1 ]
19,819
private float getFuelAbsorptionCoefficient() { // TODO: Lookup type of fuel and get data from there return 0.5f; }
private float getFuelAbsorptionCoefficient() { return 0.5f; }
private float getfuelabsorptioncoefficient() { return 0.5f; }
RAFIWE/BigReactors-1.7.10-Fixed
[ 0, 1, 0, 0 ]
3,445
@Override public void teleopPeriodic() { SmartDashboard.putString("Robot/GamePhase", "TELEOP"); double timestamp = Timer.getFPGATimestamp(); double throttle = mControlBoard.getThrottle(); double turn = mControlBoard.getTurn(); try { if (mSuperstructure...
@Override public void teleopPeriodic() { SmartDashboard.putString("Robot/GamePhase", "TELEOP"); double timestamp = Timer.getFPGATimestamp(); double throttle = mControlBoard.getThrottle(); double turn = mControlBoard.getTurn(); try { if (mSuperstructure...
@override public void teleopperiodic() { smartdashboard.putstring("robot/gamephase", "teleop"); double timestamp = timer.getfpgatimestamp(); double throttle = mcontrolboard.getthrottle(); double turn = mcontrolboard.getturn(); try { if (msuperstructure.isdrivercontrolled()) { drivesignal command = arcadedrivehelper.arc...
MaximillianHays/2019-DeepSpace
[ 0, 1, 0, 0 ]
3,595
public ByteBuffer encode() throws IOException { // TODO: an implementation that can use more than one chunk ByteArrayOutputStream bout = new ByteArrayOutputStream(); try (DataOutputStream os = new DataOutputStream(bout)) { /* add the data for each entry */ for (ByteBuffer entry : entries) { /* copy to tem...
public ByteBuffer encode() throws IOException { ByteArrayOutputStream bout = new ByteArrayOutputStream(); try (DataOutputStream os = new DataOutputStream(bout)) { for (ByteBuffer entry : entries) { byte[] temp = new byte[entry.limit()]; entry.position(0); entry.get(temp); entry.position(0)...
public bytebuffer encode() throws ioexception { bytearrayoutputstream bout = new bytearrayoutputstream(); try (dataoutputstream os = new dataoutputstream(bout)) { for (bytebuffer entry : entries) { byte[] temp = new byte[entry.limit()]; entry.position(0); entry.get(temp); entry.position(0); os.write(temp); } int prev =...
Lmctruck30/mopar
[ 0, 1, 0, 0 ]
11,794
public ClassInfo extendedFindClass(String className) { // ClassDoc.findClass has this bug that we're working around here: // If you have a class PackageManager with an inner class PackageInfo // and you call it with "PackageInfo" it doesn't find it. return searchInnerClasses(className.split("\\."), 0); ...
public ClassInfo extendedFindClass(String className) { return searchInnerClasses(className.split("\\."), 0); }
public classinfo extendedfindclass(string classname) { return searchinnerclasses(classname.split("\\."), 0); }
Keneral/ae1
[ 0, 0, 1, 0 ]
12,226
@Override public void buildFunctionIfNecessary(FunctionConf functionConf) { // Snapshot the directory before installing dependencies List<Path> beforeSnapshot = getDirectorySnapshot(functionConf); loggingHelper.logInfoWithName(log, functionConf.getFunctionName(), "Copying Greengrass SDK"); ...
@Override public void buildFunctionIfNecessary(FunctionConf functionConf) { List<Path> beforeSnapshot = getDirectorySnapshot(functionConf); loggingHelper.logInfoWithName(log, functionConf.getFunctionName(), "Copying Greengrass SDK"); copySdk(log, functionConf, resourceHelper, ioHelpe...
@override public void buildfunctionifnecessary(functionconf functionconf) { list<path> beforesnapshot = getdirectorysnapshot(functionconf); logginghelper.loginfowithname(log, functionconf.getfunctionname(), "copying greengrass sdk"); copysdk(log, functionconf, resourcehelper, iohelper); if (hasdependencies(functionconf...
QuinnCiccoretti/aws-greengrass-provisioner
[ 0, 0, 0, 0 ]
20,549
private static Reporter trade(String starting_date, final String ending_date, Portfolio portfolio, Reporter reporter, String order_file_name,boolean include_trading_fees,boolean pay_dividends) { int final_time = 0; //last day must also be included Strategy strategy = new Strategy(portfolio, portfolio.ge...
private static Reporter trade(String starting_date, final String ending_date, Portfolio portfolio, Reporter reporter, String order_file_name,boolean include_trading_fees,boolean pay_dividends) { int final_time = 0; Strategy strategy = new Strategy(portfolio, portfolio.getDatabase(),include_trading_fees)...
private static reporter trade(string starting_date, final string ending_date, portfolio portfolio, reporter reporter, string order_file_name,boolean include_trading_fees,boolean pay_dividends) { int final_time = 0; strategy strategy = new strategy(portfolio, portfolio.getdatabase(),include_trading_fees); long starting_...
KGKallasmaa/S_P500_trading_options
[ 1, 1, 0, 0 ]
12,644
public void sendMessage(long chatId, Response response) { var request = responseToSendMessageConverter.convert(response, chatId); telegramBot.execute(request, new Callback<>() { @Override public void onResponse(SendMessage sendMessage, SendResponse sendResponse) { ...
public void sendMessage(long chatId, Response response) { var request = responseToSendMessageConverter.convert(response, chatId); telegramBot.execute(request, new Callback<>() { @Override public void onResponse(SendMessage sendMessage, SendResponse sendResponse) { ...
public void sendmessage(long chatid, response response) { var request = responsetosendmessageconverter.convert(response, chatid); telegrambot.execute(request, new callback<>() { @override public void onresponse(sendmessage sendmessage, sendresponse sendresponse) { } @override public void onfailure(sendmessage sendmessa...
MisterRnobe/sodexo-tg-bot
[ 1, 0, 0, 0 ]
12,762
public static DatabindException from(SerializerProvider ctxt, String msg, Throwable problem) { // 17-Aug-2015, tatu: As per [databind#903] this is bit problematic as // SerializerProvider instance does not currently hold on to generator... return new DatabindException(ctxt.getGenerator(), msg,...
public static DatabindException from(SerializerProvider ctxt, String msg, Throwable problem) { return new DatabindException(ctxt.getGenerator(), msg, problem); }
public static databindexception from(serializerprovider ctxt, string msg, throwable problem) { return new databindexception(ctxt.getgenerator(), msg, problem); }
Migwel/jackson-databind
[ 0, 0, 1, 0 ]
12,861
private void parseMedia() { assertTypeAndAdvance(PXStylesheetTokenType.MEDIA); // TODO: support media types, NOT, and ONLY. Skipping for now while (isType(PXStylesheetTokenType.IDENTIFIER)) { advance(); } // 'and' may appear here advanceIfIsType(PXStylesheetTo...
private void parseMedia() { assertTypeAndAdvance(PXStylesheetTokenType.MEDIA); while (isType(PXStylesheetTokenType.IDENTIFIER)) { advance(); } advanceIfIsType(PXStylesheetTokenType.AND); if (isType(PXStylesheetTokenType.LPAREN)) { p...
private void parsemedia() { asserttypeandadvance(pxstylesheettokentype.media); while (istype(pxstylesheettokentype.identifier)) { advance(); } advanceifistype(pxstylesheettokentype.and); if (istype(pxstylesheettokentype.lparen)) { parsemediaexpressions(); } if (istype(pxstylesheettokentype.lcurly)) { try { advance(); w...
Pixate/pixate-freestyle-android
[ 1, 0, 0, 0 ]
21,298
private void init() { try { // TODO: detect if already have a gradle setup // TODO: later, use always same and symlink if possible to save time setupBuildFiles(); Files.createDirectories(srcFolder); Files.walkFileTree(projectHome.toPath(), new FileTransferProcessor()); } catc...
private void init() { try { setupBuildFiles(); Files.createDirectories(srcFolder); Files.walkFileTree(projectHome.toPath(), new FileTransferProcessor()); } catch (Exception e) { throw new RuntimeException(e); } }
private void init() { try { setupbuildfiles(); files.createdirectories(srcfolder); files.walkfiletree(projecthome.topath(), new filetransferprocessor()); } catch (exception e) { throw new runtimeexception(e); } }
K1UBC/BlangModel
[ 1, 0, 0, 0 ]
30,159
public <T> DynamicType.Builder<T> apply(DynamicType.Builder<T> builder) { TypeDescription description = builder.toTypeDescription(); List<MethodDescription> methods = getMethodDescriptionList(description); enhanceCasesByDynamicDefinitions(methods); builder = enhanceCasesByOverrides(builder, description, methods...
public <T> DynamicType.Builder<T> apply(DynamicType.Builder<T> builder) { TypeDescription description = builder.toTypeDescription(); List<MethodDescription> methods = getMethodDescriptionList(description); enhanceCasesByDynamicDefinitions(methods); builder = enhanceCasesByOverrides(builder, description, methods...
public <t> dynamictype.builder<t> apply(dynamictype.builder<t> builder) { typedescription description = builder.totypedescription(); list<methoddescription> methods = getmethoddescriptionlist(description); enhancecasesbydynamicdefinitions(methods); builder = enhancecasesbyoverrides(builder, description, methods); if(ca...
OrienteerBAP/Transponder
[ 0, 1, 0, 0 ]
30,162
@Ignore @Test public void testDelete() throws Exception { final Map<String, Object> headers = new HashMap<String, Object>(); // parameter type is String headers.put("CamelGoogleDrive.fileId", null); // parameter type is String headers.put("CamelGoogleDrive.parentId", null...
@Ignore @Test public void testDelete() throws Exception { final Map<String, Object> headers = new HashMap<String, Object>(); headers.put("CamelGoogleDrive.fileId", null); headers.put("CamelGoogleDrive.parentId", null); final com.google.api.services.drive.Drive.Par...
@ignore @test public void testdelete() throws exception { final map<string, object> headers = new hashmap<string, object>(); headers.put("camelgoogledrive.fileid", null); headers.put("camelgoogledrive.parentid", null); final com.google.api.services.drive.drive.parents.delete result = requestbodyandheaders("direct://del...
NelloCarotenuto/Weakness-Detector-for-Java
[ 1, 0, 0, 0 ]
30,229
@Test public void processMessage_shouldSetValue_CodedMatchingABooleanConceptForObsIfTheAnswerIs0Or1AndQuestionDatatypeIsCoded() throws Exception { ObsService os = Context.getObsService(); String hl7string = "MSH|^~\\&|FORMENTRY|AMRS.ELD|HL7LISTENER|AMRS.ELD|20080226102656||ORU^R01|JqnfhKKtouEz8kzTk6Zo|P|2...
@Test public void processMessage_shouldSetValue_CodedMatchingABooleanConceptForObsIfTheAnswerIs0Or1AndQuestionDatatypeIsCoded() throws Exception { ObsService os = Context.getObsService(); String hl7string = "MSH|^~\\&|FORMENTRY|AMRS.ELD|HL7LISTENER|AMRS.ELD|20080226102656||ORU^R01|JqnfhKKtouEz8kzTk6Zo|P|2...
@test public void processmessage_shouldsetvalue_codedmatchingabooleanconceptforobsiftheansweris0or1andquestiondatatypeiscoded() throws exception { obsservice os = context.getobsservice(); string hl7string = "msh|^~\\&|formentry|amrs.eld|hl7listener|amrs.eld|20080226102656||oru^r01|jqnfhkktouez8kztk6zo|p|2.5|1||||||||16...
RuiDTLima/diffuzz
[ 1, 0, 0, 0 ]
22,244
private static void processPendingMoveToTrash(final Context context, Store remoteStore, Mailbox newMailbox, EmailContent.Message oldMessage, final EmailContent.Message newMessage) throws MessagingException { // 0. No remote move if the message is local-only if (newMessage.mServer...
private static void processPendingMoveToTrash(final Context context, Store remoteStore, Mailbox newMailbox, EmailContent.Message oldMessage, final EmailContent.Message newMessage) throws MessagingException { if (newMessage.mServerId == null || newMessage.mServerId.equals("") ...
private static void processpendingmovetotrash(final context context, store remotestore, mailbox newmailbox, emailcontent.message oldmessage, final emailcontent.message newmessage) throws messagingexception { if (newmessage.mserverid == null || newmessage.mserverid.equals("") || newmessage.mserverid.startswith(local_ser...
Keneral/apackages
[ 1, 0, 0, 0 ]
14,054
@Override public void enableDebug() { // Turn on Crunch runtime error catching. //TODO: allow configurable getConfiguration().setBoolean("crunch.debug", true); }
@Override public void enableDebug() { getConfiguration().setBoolean("crunch.debug", true); }
@override public void enabledebug() { getconfiguration().setboolean("crunch.debug", true); }
KeerthiYanda91/crunch
[ 1, 0, 0, 0 ]
14,145
private Optional<DecodedJWT> authenticateRequest(HttpServletRequest req, HttpServletResponse resp) { String authHeader = StringUtil.trimToEmpty(req.getHeader("Authorization")); String authBearerToken = authHeader.replaceFirst("^Bearer ", ""); if (authHeader.isEmpty()) { LOG.warn("No ...
private Optional<DecodedJWT> authenticateRequest(HttpServletRequest req, HttpServletResponse resp) { String authHeader = StringUtil.trimToEmpty(req.getHeader("Authorization")); String authBearerToken = authHeader.replaceFirst("^Bearer ", ""); if (authHeader.isEmpty()) { LOG.warn("No ...
private optional<decodedjwt> authenticaterequest(httpservletrequest req, httpservletresponse resp) { string authheader = stringutil.trimtoempty(req.getheader("authorization")); string authbearertoken = authheader.replacefirst("^bearer ", ""); if (authheader.isempty()) { log.warn("no authorization header in request"); r...
Mustard/chatterbox
[ 1, 1, 0, 0 ]
22,340
public List<DccdSB> getSearchBeans() { List<DccdSB> searchBeans = new ArrayList<DccdSB>(); if (!hasTridas()) return searchBeans; // just an empty list // get all the ObjectEntity's in the tree List<Entity> entities = getSubTreeAsList(); for (Entity entity : entities) { // only objects, exclude derive...
public List<DccdSB> getSearchBeans() { List<DccdSB> searchBeans = new ArrayList<DccdSB>(); if (!hasTridas()) return searchBeans; List<Entity> entities = getSubTreeAsList(); for (Entity entity : entities) { if (entity instanceof ObjectEntity) { DccdSB searchBean = new DccdObjectSB(); ...
public list<dccdsb> getsearchbeans() { list<dccdsb> searchbeans = new arraylist<dccdsb>(); if (!hastridas()) return searchbeans; list<entity> entities = getsubtreeaslist(); for (entity entity : entities) { if (entity instanceof objectentity) { dccdsb searchbean = new dccdobjectsb(); searchbean = fillsearchbean(searchbe...
PaulBoon/dccd-lib
[ 1, 0, 0, 0 ]
22,391
public Integer getLastmodifiedby() { return this.lastmodifiedby; }
public Integer getLastmodifiedby() { return this.lastmodifiedby; }
public integer getlastmodifiedby() { return this.lastmodifiedby; }
PLOS/named-entity.service
[ 0, 0, 1, 0 ]
22,404
@Override public Loader<Cursor> onCreateLoader(int id, Bundle args) { //TODO Need a fix to make sure the value is not null String locationSetting = Utility.getPreferredLocation(getActivity()); //Sort order: Ascending by date String sortOrder = WeatherContract.WeatherEntry.COLUMN_DATE...
@Override public Loader<Cursor> onCreateLoader(int id, Bundle args) { String locationSetting = Utility.getPreferredLocation(getActivity()); String sortOrder = WeatherContract.WeatherEntry.COLUMN_DATE + " ASC"; Uri weatherForLocationUri = WeatherContract.WeatherEntry.b...
@override public loader<cursor> oncreateloader(int id, bundle args) { string locationsetting = utility.getpreferredlocation(getactivity()); string sortorder = weathercontract.weatherentry.column_date + " asc"; uri weatherforlocationuri = weathercontract.weatherentry.buildweatherlocationwithstartdate(locationsetting, sy...
SafwanAhmad/Sunshine-Version-2
[ 0, 0, 1, 0 ]
22,471
@Test public void inexistentItemTest() { String searchQuery = "awobsafhtui5we5t57zuo77izufh"; SearchResultsPage searchQueryPage = startPage.getSearchComponent().searchFor(searchQuery); String searchQueryDisplayText = searchQueryPage.getItemSearchQuery(); Assert.assertEquals(searchQueryDisplayText, searchQuer...
@Test public void inexistentItemTest() { String searchQuery = "awobsafhtui5we5t57zuo77izufh"; SearchResultsPage searchQueryPage = startPage.getSearchComponent().searchFor(searchQuery); String searchQueryDisplayText = searchQueryPage.getItemSearchQuery(); Assert.assertEquals(searchQueryDisplayText, searchQuer...
@test public void inexistentitemtest() { string searchquery = "awobsafhtui5we5t57zuo77izufh"; searchresultspage searchquerypage = startpage.getsearchcomponent().searchfor(searchquery); string searchquerydisplaytext = searchquerypage.getitemsearchquery(); assert.assertequals(searchquerydisplaytext, searchquery); int num...
MPDL/imeji-gui-testing
[ 0, 1, 0, 0 ]
30,799
public final Node createView(OpenedFile file, String path) { Node node = createView0(file, path); node.getProperties().put("editor", this); node.getProperties().put("file", file); // probably a memory leak node.getProperties().put("path", path); return node; }
public final Node createView(OpenedFile file, String path) { Node node = createView0(file, path); node.getProperties().put("editor", this); node.getProperties().put("file", file); node.getProperties().put("path", path); return node; }
public final node createview(openedfile file, string path) { node node = createview0(file, path); node.getproperties().put("editor", this); node.getproperties().put("file", file); node.getproperties().put("path", path); return node; }
MiniDigger/standalone-app
[ 0, 0, 1, 0 ]