id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
38,301
public static double betterRound(double numIn, int decPlac){ double opOn = Math.round(numIn * Math.pow(10, decPlac)) / Math.pow(10D, decPlac); return opOn; } public static double centerCeil(double numIn, int tiers){ <BUG>return ((numIn > 0) ? Math.ceil(numIn * tiers) : Math.floor(numIn * tiers)) / tiers; </BUG> } publi...
return ((numIn > 0) ? Math.ceil(numIn * (double) tiers) : Math.floor(numIn * (double) tiers)) / (double) tiers;
38,302
package com.Da_Technomancer.crossroads.API; import com.Da_Technomancer.crossroads.API.DefaultStorageHelper.DefaultStorage; import com.Da_Technomancer.crossroads.API.heat.DefaultHeatHandler; import com.Da_Technomancer.crossroads.API.heat.IHeatHandler; import com.Da_Technomancer.crossroads.API.magic.DefaultMagicHandler; ...
import com.Da_Technomancer.crossroads.API.rotary.DefaultAxleHandler; import com.Da_Technomancer.crossroads.API.rotary.DefaultCogHandler; import com.Da_Technomancer.crossroads.API.rotary.IAxleHandler; import com.Da_Technomancer.crossroads.API.rotary.ICogHandler;
38,303
import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityInject; import net.minecraftforge.common.capabilities.CapabilityManager; public class Capabilities{ @CapabilityInject(IHeatHandler.class) <BUG>public static Capability<IHeatHandler> HEAT_HANDLER_CAPABILITY ...
@CapabilityInject(IAxleHandler.class) public static Capability<IAxleHandler> AXLE_HANDLER_CAPABILITY = null; @CapabilityInject(ICogHandler.class) public static Capability<ICogHandler> COG_HANDLER_CAPABILITY = null;
38,304
public IEffect getMixEffect(Color col){ if(col == null){ return effect; } int top = Math.max(col.getBlue(), Math.max(col.getRed(), col.getGreen())); <BUG>if(top < rand.nextInt(128) + 128){ return voidEffect;</BUG> } return effect; }
if(top != 255){ return voidEffect;
38,305
timeWarp = new OwnLabel(getFormattedTimeWrap(), skin, "warp"); timeWarp.setName("time warp"); Container wrapWrapper = new Container(timeWarp); wrapWrapper.width(60f * GlobalConf.SCALE_FACTOR); wrapWrapper.align(Align.center); <BUG>VerticalGroup timeGroup = new VerticalGroup().align(Align.left).space(3 * GlobalConf.SCAL...
VerticalGroup timeGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR);
38,306
focusListScrollPane.setFadeScrollBars(false); focusListScrollPane.setScrollingDisabled(true, false); focusListScrollPane.setHeight(tree ? 200 * GlobalConf.SCALE_FACTOR : 100 * GlobalConf.SCALE_FACTOR); focusListScrollPane.setWidth(160); } <BUG>VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).space(3 *...
VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR);
38,307
headerGroup.addActor(expandIcon); headerGroup.addActor(detachIcon); addActor(headerGroup); expandIcon.setChecked(expanded); } <BUG>public void expand() { </BUG> if (!expandIcon.isChecked()) { expandIcon.setChecked(true); }
public void expandPane() {
38,308
</BUG> if (!expandIcon.isChecked()) { expandIcon.setChecked(true); } } <BUG>public void collapse() { </BUG> if (expandIcon.isChecked()) { expandIcon.setChecked(false); }
headerGroup.addActor(expandIcon); headerGroup.addActor(detachIcon); addActor(headerGroup); expandIcon.setChecked(expanded); public void expandPane() { public void collapsePane() {
38,309
}); playstop.addListener(new TextTooltip(txt("gui.tooltip.playstop"), skin)); TimeComponent timeComponent = new TimeComponent(skin, ui); timeComponent.initialize(); CollapsiblePane time = new CollapsiblePane(ui, txt("gui.time"), timeComponent.getActor(), skin, true, playstop); <BUG>time.align(Align.left); mainActors.ad...
time.align(Align.left).columnAlign(Align.left); mainActors.add(time);
38,310
panes.put(visualEffectsComponent.getClass().getSimpleName(), visualEffects); ObjectsComponent objectsComponent = new ObjectsComponent(skin, ui); objectsComponent.setSceneGraph(sg); objectsComponent.initialize(); CollapsiblePane objects = new CollapsiblePane(ui, txt("gui.objects"), objectsComponent.getActor(), skin, fal...
objects.align(Align.left).columnAlign(Align.left); mainActors.add(objects);
38,311
if (Constants.desktop) { MusicComponent musicComponent = new MusicComponent(skin, ui); musicComponent.initialize(); Actor[] musicActors = MusicActorsManager.getMusicActors() != null ? MusicActorsManager.getMusicActors().getActors(skin) : null; CollapsiblePane music = new CollapsiblePane(ui, txt("gui.music"), musicCompo...
music.align(Align.left).columnAlign(Align.left); mainActors.add(music);
38,312
System.out.println(change); } } }; @Override <BUG>protected Callback<VChild, Void> copyChildCallback() </BUG> { return (child) -> {
protected Callback<VChild, Void> copyIntoCallback()
38,313
package jfxtras.labs.icalendarfx.components; import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment; <BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty; import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG> import jfxtras.labs.icalendarfx.properties...
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
38,314
VEVENT ("VEVENT", Arrays.asList(PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.CATEGORIES, PropertyType.CLASSIFICATION, PropertyType.COMMENT, PropertyType.CONTACT, PropertyType.DATE_TIME_CREATED, PropertyType.DATE_TIME_END, PropertyType.DATE_TIME_STAMP, PropertyType.DATE_TIME_START, PropertyType.DESCRIPTI...
PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,
38,315
VTODO ("VTODO", Arrays.asList(PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.CATEGORIES, PropertyType.CLASSIFICATION, PropertyType.COMMENT, PropertyType.CONTACT, PropertyType.DATE_TIME_COMPLETED, PropertyType.DATE_TIME_CREATED, PropertyType.DATE_TIME_DUE, PropertyType.DATE_TIME_STAMP, PropertyType.DATE_TI...
PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,
38,316
throw new RuntimeException("not implemented"); } }, DAYLIGHT_SAVING_TIME ("DAYLIGHT", Arrays.asList(PropertyType.COMMENT, PropertyType.DATE_TIME_START, <BUG>PropertyType.IANA_PROPERTY, PropertyType.NON_STANDARD, PropertyType.RECURRENCE_DATE_TIMES, PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType....
PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,
38,317
throw new RuntimeException("not implemented"); } }, VALARM ("VALARM", Arrays.asList(PropertyType.ACTION, PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.DESCRIPTION, <BUG>PropertyType.DURATION, PropertyType.IANA_PROPERTY, PropertyType.NON_STANDARD, PropertyType.REPEAT_COUNT, PropertyType.SUMMARY, PropertyT...
DAYLIGHT_SAVING_TIME ("DAYLIGHT", Arrays.asList(PropertyType.COMMENT, PropertyType.DATE_TIME_START, PropertyType.NON_STANDARD, PropertyType.RECURRENCE_DATE_TIMES, PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM, PropertyType.TIME_ZONE_OFFSET_TO), DaylightSavingTime.class)
38,318
private ContentLineStrategy contentLineGenerator; protected void setContentLineGenerator(ContentLineStrategy contentLineGenerator) { this.contentLineGenerator = contentLineGenerator; } <BUG>protected Callback<VChild, Void> copyChildCallback() </BUG> { throw new RuntimeException("Can't copy children. copyChildCallback ...
protected Callback<VChild, Void> copyIntoCallback()
38,319
import jfxtras.labs.icalendarfx.properties.calendar.Version; import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty; public enum CalendarProperty { CALENDAR_SCALE ("CALSCALE", <BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER), CalendarSca...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), CalendarScale.class)
38,320
CalendarScale calendarScale = (CalendarScale) child; destination.setCalendarScale(calendarScale); } }, METHOD ("METHOD", <BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER), Method.class)</BUG> { @Override public VChild parse(VCalendar vCalendar, String contentLi...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), Method.class)
38,321
} list.add(new NonStandardProperty((NonStandardProperty) child)); } }, PRODUCT_IDENTIFIER ("PRODID", <BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER), ProductIdentifier.class)</BUG> { @Override public VChild parse(VCalendar vCalendar, String contentLine)
public void copyChild(VChild child, VCalendar destination) CalendarScale calendarScale = (CalendarScale) child; destination.setCalendarScale(calendarScale); METHOD ("METHOD", Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), Method.class)
38,322
ProductIdentifier productIdentifier = (ProductIdentifier) child; destination.setProductIdentifier(productIdentifier); } }, VERSION ("VERSION", <BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER), Version.class)</BUG> { @Override public VChild parse(VCalendar vCal...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), Version.class)
38,323
package jfxtras.labs.icalendarfx.components; import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment; <BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty; import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG> import jfxtras.labs.icalendarfx.properties...
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
38,324
if (index != -1) { javaName = javaName.substring(0, index); } } return javaName; <BUG>} public static boolean isRsaOaep(String algo) {</BUG> return RSA_OAEP_CEK_SET.contains(algo); } public static boolean isAesKeyWrap(String algo) {
public static boolean isRsa(String algo) { return isRsaOaep(algo) || isRsaShaSign(algo); public static boolean isRsaOaep(String algo) {
38,325
this.queryLogger = Loggers.getLogger(logger, ".query"); this.fetchLogger = Loggers.getLogger(logger, ".fetch"); queryLogger.setLevel(level); fetchLogger.setLevel(level); indexSettingsService.addListener(new ApplySettings()); <BUG>} private long parseTimeSetting(String name, long defaultNanos) { try { return componentSe...
[DELETED]
38,326
public void startFilterChain(ServletRequest servletRequest, ServletResponse servletResponse) throws IOException, ServletException { resourceMonitor.use(); try { final HttpServletRequest request = (HttpServletRequest) servletRequest; <BUG>tracer = new RequestTracer(traceRequest(request)); currentFilters = getFilterChain...
tracer = new RequestTracer(traceRequest(request) || metricsService != null, traceRequest(request)); currentFilters = getFilterChainForRequest(request.getRequestURI());
38,327
customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString()); customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName); customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString()); customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName); customTokens.put("%%mlTraceFo...
customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName); customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName); }
38,328
import org.apache.commons.logging.LogFactory; import org.sakaiproject.poll.logic.ExternalLogic; import org.sakaiproject.poll.logic.PollListManager; import org.sakaiproject.poll.logic.PollVoteManager; import org.sakaiproject.poll.model.Poll; <BUG>import org.sakaiproject.poll.model.VoteCollection; import org.springframew...
import org.springframework.validation.BindException; import org.springframework.validation.Errors;
38,329
return; Poll poll = manager.getPollById(votes.getPollId()); logger.debug("this is a vote for " + poll.getText()); List<String> options = new ArrayList<String>(); if (!(poll.getVoteClose().after(new Date()) && new Date().after(poll.getVoteOpen()))) { <BUG>logger.warn("poll is closed!"); errors.reject("vote_closed.voteCo...
if (!errors.hasFieldErrors("vote_closed")) { errors.reject("vote_closed","vote closed"); } else { errors.reject("vote_closed.voteCollections","vote closed");
38,330
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestOutputStream; import java.security.MessageDigest; <BUG>import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collections; import java.util.List;</BUG> public final class ...
import java.text.DateFormat; import java.util.Date; import java.util.List;
38,331
package org.jboss.as.patching.runner; <BUG>import org.jboss.as.boot.DirectoryStructure; import org.jboss.as.patching.LocalPatchInfo;</BUG> import org.jboss.as.patching.PatchInfo; import org.jboss.as.patching.PatchLogger; import org.jboss.as.patching.PatchMessages;
import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp; import org.jboss.as.patching.CommonAttributes; import org.jboss.as.patching.LocalPatchInfo;
38,332
private static final String PATH_DELIMITER = "/"; public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT; enum Element { ADDED_BUNDLE("added-bundle"), ADDED_MISC_CONTENT("added-misc-content"), <BUG>ADDED_MODULE("added-module"), BUNDLES("bundles"),</BUG> CUMULATIVE("cumulative"), DESCRIPTION("description"), MIS...
APPLIES_TO_VERSION("applies-to-version"), BUNDLES("bundles"),
38,333
final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { <BUG>case APPLIES_TO_VERSION: builder.addAppliesTo(value); break;</BUG> case RESULTING_VE...
[DELETED]
38,334
final StringBuilder path = new StringBuilder(); for(final String p : item.getPath()) { path.append(p).append(PATH_DELIMITER); } path.append(item.getName()); <BUG>writer.writeAttribute(Attribute.PATH.name, path.toString()); if(type != ModificationType.REMOVE) {</BUG> writer.writeAttribute(Attribute.HASH.name, bytesToHex...
if (item.isDirectory()) { writer.writeAttribute(Attribute.DIRECTORY.name, "true"); if(type != ModificationType.REMOVE) {
38,335
package org.jboss.as.patching; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.patching.runner.PatchingException; import org.jboss.logging.Messages; import org.jboss.logging.annotations.Message; <BUG>import org.jboss.logging.annotations.MessageBundle; import java.io.IOException;</BUG> impor...
import org.jboss.logging.annotations.Cause; import java.io.IOException;
38,336
USER(getUserDefinitions()), USE_DUPLICATE_DETECTION(getDuplicateDetectionDefinitions()), USE_AUTO_RECOVERY(Pooled.USE_AUTO_RECOVERY), USE_GLOBAL_POOLS(Common.USE_GLOBAL_POOLS), POOLED_CONNECTION_FACTORY(CommonAttributes.POOLED_CONNECTION_FACTORY), <BUG>TRANSACTION(CommonAttributes.TRANSACTION), </BUG> MODE(CommonAttrib...
TRANSACTION(ConnectionFactoryAttributes.Pooled.TRANSACTION),
38,337
import java.io.InputStream; import java.net.URL; import static org.assertj.core.api.Assertions.assertThat; public class TomcatWebServerTest { @Test <BUG>public void shouldBootWebServer() throws Exception { try(WeldContainer weldContainer = new Weld().disableDiscovery()</BUG> .extensions(new ConfigurationExtension()) .b...
SSLBypass.disableSSLChecks(); try(WeldContainer weldContainer = new Weld().disableDiscovery()
38,338
tomcat.start(); try(InputStream stream = new URL("http://localhost:8080/").openStream()) { String data = IOUtils.toString(stream).trim(); assertThat(data).isEqualTo(MessageProvider.DATA); } <BUG>try(InputStream stream = new URL("http://localhost:8080/rest").openStream()) { </BUG> String data = IOUtils.toString(stream)....
try(InputStream stream = new URL("https://localhost:8443/rest").openStream()) {
38,339
import java.io.InputStream; import java.net.URL; import static org.assertj.core.api.Assertions.assertThat; public class JettyBootTest { @Test <BUG>public void shouldBootWebServer() throws Exception { try(WeldContainer weldContainer = new Weld().disableDiscovery()</BUG> .extensions(new ConfigurationExtension()) .beanCla...
SSLBypass.disableSSLChecks(); try(WeldContainer weldContainer = new Weld().disableDiscovery()
38,340
webServer.start(); try(InputStream stream = new URL("http://localhost:8080/").openStream()) { String data = IOUtils.toString(stream).trim(); assertThat(data).isEqualTo(MessageProvider.DATA); } <BUG>try(InputStream stream = new URL("http://localhost:8080/").openStream()) { </BUG> String data = IOUtils.toString(stream).t...
try(InputStream stream = new URL("https://localhost:8443/").openStream()) {
38,341
} public String getAddress() { return address; } public boolean isSecuredConfigured(){ <BUG>return securedPort != 0 && keystorePath != null && truststorePassword != null; }</BUG> public int getSecuredPort(){ return securedPort; }
public int getPort() { return port; return securedPort != 0;
38,342
import android.view.ViewGroup; import android.widget.RelativeLayout; import com.taobao.luaview.userdata.kit.UDUnicode; import com.taobao.luaview.userdata.ui.UDSpannableString; import org.luaj.vm2.Globals; <BUG>import org.luaj.vm2.LuaValue; import java.util.concurrent.atomic.AtomicInteger;</BUG> public class LuaViewUtil...
import org.luaj.vm2.Varargs; import java.util.concurrent.atomic.AtomicInteger;
38,343
import android.widget.BaseAdapter; import android.widget.ListView; import com.taobao.luaview.userdata.base.UDLuaTable; import com.taobao.luaview.userdata.list.UDBaseListView; import com.taobao.luaview.userdata.list.UDListView; <BUG>import com.taobao.luaview.userdata.ui.UDView; import com.taobao.luaview.view.adapter.LVL...
import com.taobao.luaview.util.LuaViewUtil; import com.taobao.luaview.view.adapter.LVListViewAdapter;
38,344
@Override public UDView getUserdata() { return mLuaUserdata; } @Override <BUG>public void addLVView(View view, Varargs varargs) { } @Override</BUG> public void setChildNodeViews(ArrayList<UDView> childNodeViews) { }
public void onItemClick(AdapterView<?> parent, View view, int position, long id) { final UDLuaTable cellData = (UDLuaTable) view.getTag(); final int row = position - LVListView.this.getHeaderViewsCount(); mAdapter.onCellClicked(cellData, row); }); this.setOnItemLongClickListener(new OnItemLongClickListener() {
38,345
setRefreshing(false); } @Override public UDView getUserdata() { return mListView != null ? mListView.getUserdata() : null; <BUG>} @Override public void addLVView(View view, Varargs varargs) {</BUG> } @Override
[DELETED]
38,346
this.mLayout = new IcsLinearLayout(globals.getContext(), R.attr.lv_vpiIconPageIndicatorStyle); init(); } private void init() { this.setHorizontalScrollBarEnabled(false); <BUG>addView(mLayout, LuaViewUtil.createRelativeLayoutParamsMM()); </BUG> } @Override public UDView getUserdata() {
super.addView(mLayout, LuaViewUtil.createRelativeLayoutParamsMM());
38,347
@Override public UDView getUserdata() { return mLuaUserdata; } @Override <BUG>public void addLVView(View view, Varargs a) { if(this != view) { this.addView(view); } } @Override</BUG> public void setChildNodeViews(ArrayList<UDView> childNodeViews) {
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { mLuaUserdata.callPageCallbackScrolling(position, positionOffset, DimenUtil.pxToDpi(positionOffsetPixels));
38,348
this.mLuaUserdata = new UDRefreshLayout(this, globals, metaTable, varargs != null ? varargs.arg1() : null); init(globals); } private void init(Globals globals) { mContainer = new LVViewGroup(globals, mLuaUserdata.getmetatable(), null); <BUG>addView(mContainer, LuaViewUtil.createRelativeLayoutParamsMM()); </BUG> } @Over...
super.addView(mContainer, LuaViewUtil.createRelativeLayoutParamsMM());
38,349
@Override public UDView getUserdata() { return mLuaUserdata; } @Override <BUG>public void addLVView(final View view, Varargs varargs) { if(mContainer != view) { final ViewGroup.LayoutParams layoutParams = LuaViewUtil.getOrCreateLayoutParams(view); mContainer.addView(LuaViewUtil.removeFromParent(view), layoutParams);</...
[DELETED]
38,350
return (T) (new UDViewGroup(this, globals, metaTable, varargs)); } @Override public T getUserdata() { return mLuaUserdata; <BUG>} @Override public void addLVView(final View view, Varargs a) { if (this != view) {//不能自己加自己 final ViewGroup.LayoutParams layoutParams = LuaViewUtil.getOrCreateLayoutParams(view); LVViewGroup....
[DELETED]
38,351
init(globals); } private void init(Globals globals) { this.setHorizontalScrollBarEnabled(false);//不显示滚动条 mContainer = new LVViewGroup(globals, mLuaUserdata.getmetatable(), null); <BUG>addView(mContainer, LuaViewUtil.createRelativeLayoutParamsMM()); </BUG> } @Override public UDView getUserdata() {
super.addView(mContainer, LuaViewUtil.createRelativeLayoutParamsMM());
38,352
@Override public UDView getUserdata() { return mLuaUserdata; } @Override <BUG>public void addLVView(final View view, Varargs varargs) { if(mContainer != view) { final ViewGroup.LayoutParams layoutParams = LuaViewUtil.getOrCreateLayoutParams(view); mContainer.addView(LuaViewUtil.removeFromParent(view), layoutParams);</B...
[DELETED]
38,353
initPanel(); } @NonNull public UDCustomPanel createUserdata(Globals globals, LuaValue metaTable, Varargs varargs) { return new UDCustomPanel(this, globals, metaTable, varargs); <BUG>} @Override public void addLVView(final View view, Varargs a) { if (this != view) { final ViewGroup.LayoutParams layoutParams = LuaViewUti...
[DELETED]
38,354
return LuaUtil.callFunction(mOnLayout); } public UDViewGroup addView(UDView subView) { final ViewGroup viewGroup = getContainer(); if (viewGroup != null && subView != null && subView.getView() != null) { <BUG>final View view = subView.getView(); if (viewGroup instanceof ILVViewGroup) { ((ILVViewGroup) viewGroup).addLVV...
LuaViewUtil.addView(viewGroup, view, null);
38,355
package org.luaj.vm2; <BUG>import android.content.Context; import com.taobao.luaview.cache.AppCache;</BUG> import com.taobao.luaview.debug.DebugConnection; import com.taobao.luaview.global.LuaResourceFinder; import com.taobao.luaview.global.LuaView;
import android.view.ViewGroup; import com.taobao.luaview.cache.AppCache;
38,356
import java.io.Reader; import java.lang.ref.WeakReference; import java.util.Stack; public class Globals extends LuaTable { private WeakReference<LuaView> mLuaView; <BUG>public ILVViewGroup container; private ILVViewGroup tmpContainer; private Stack<ILVViewGroup> mContainers; public InputStream STDIN = null;</BUG> publi...
public ViewGroup container; private ViewGroup tmpContainer; private Stack<ViewGroup> mContainers; public InputStream STDIN = null;
38,357
package com.taobao.luaview.fun.base; import android.view.View; import android.view.ViewGroup; import com.taobao.luaview.global.LuaViewConfig; <BUG>import com.taobao.luaview.global.LuaViewManager; import com.taobao.luaview.view.interfaces.ILVView;</BUG> import org.luaj.vm2.Globals; import org.luaj.vm2.LuaValue; import o...
import com.taobao.luaview.util.LuaViewUtil; import com.taobao.luaview.view.interfaces.ILVView;
38,358
if (LuaViewConfig.isLibsLazyLoad()) { metatable = LuaViewManager.createMetatable(libClass); } ILVView view = createView(globals, metatable, args); if (globals.container instanceof ViewGroup && view instanceof View && ((View) view).getParent() == null) { <BUG>globals.container.addLVView((View) view, args); }</BUG> retur...
LuaViewUtil.addView(globals.container, (View) view, args);
38,359
package com.taobao.luaview.global; import android.content.Context; import android.os.StrictMode; import android.text.TextUtils; <BUG>import android.view.View; import android.webkit.URLUtil;</BUG> import com.taobao.luaview.cache.LuaCache; import com.taobao.luaview.debug.DebugConnection; import com.taobao.luaview.fun.bin...
import android.view.ViewGroup; import android.webkit.URLUtil;
38,360
DefaultMaxAccountVolumes("Account Defaults", ManagementServer.class, Long.class, "max.account.volumes", "20", "The default maximum number of volumes that can be created for an account", null), DirectAgentLoadSize("Advanced", ManagementServer.class, Integer.class, "direct.agent.load.size", "16", "The number of direct ag...
ClusterMessageTimeOutSeconds("Advanced", ManagementServer.class, Integer.class, "cluster.message.timeout.seconds", "300", "Time (in seconds) to wait before a inter-management server message post times out.", null), DnsBasicZoneUpdates("Advanced", NetworkManager.class, String.class, "network.dns.basiczone.updates", "all...
38,361
import com.gooddata.warehouse.WarehouseService;</BUG> import com.gooddata.dataset.DatasetService; import com.gooddata.gdc.DataStoreService; import com.gooddata.gdc.GdcService; <BUG>import com.gooddata.http.client.GoodDataHttpClient; import com.gooddata.http.client.LoginSSTRetrievalStrategy; import com.gooddata.http.cli...
import com.gooddata.connector.ConnectorService; import com.gooddata.dataload.processes.ProcessService; import com.gooddata.featureflag.FeatureFlagService; import com.gooddata.md.maintenance.ExportImportService; import com.gooddata.notification.NotificationService; import com.gooddata.util.ResponseErrorHandler; import c...
38,362
accountService = new AccountService(getRestTemplate()); projectService = new ProjectService(getRestTemplate(), accountService); metadataService = new MetadataService(getRestTemplate()); modelService = new ModelService(getRestTemplate()); gdcService = new GdcService(getRestTemplate()); <BUG>dataStoreService = new DataSt...
dataStoreService = new DataStoreService(getHttpClient(), getRestTemplate(), gdcService, endpoint.toUri());
38,363
package com.gooddata; <BUG>import com.gooddata.http.client.GoodDataHttpClient; import com.gooddata.http.client.LoginSSTRetrievalStrategy; import com.gooddata.http.client.SSTRetrievalStrategy;</BUG> import com.gooddata.md.Attribute; import com.gooddata.md.Metric;
[DELETED]
38,364
import com.gooddata.md.Metric; import com.gooddata.md.ScheduledMail; import com.gooddata.md.report.Report; import com.gooddata.md.report.ReportDefinition; import com.gooddata.project.Project; <BUG>import org.apache.http.HttpHost; import org.apache.http.client.HttpClient;</BUG> import org.apache.http.impl.client.HttpCli...
import com.gooddata.authentication.LoginPasswordAuthentication; import org.apache.http.client.HttpClient;
38,365
for(BlockBasalt.EnumType type : BlockBasalt.EnumType.values()) { registerModel(BLOCK_BASALT, type.ordinal(), BLOCK_BASALT.getRegistryName().toString(), String.format("type=%s", type.getName())); registerModel(SLAB_BASALT, type.ordinal(), SLAB_BASALT.getRegistryName().toString(), String.format("half=bottom,type=%s", typ...
registerModel(WALL_BASALT, type.ordinal(), String.format(WALL_BASALT.getRegistryName().toString() + "_%s", type.getName()), "inventory"); registerModel(FENCE_BASALT, type.ordinal(), String.format(FENCE_BASALT.getRegistryName().toString() + "_%s", type.getName()), "inventory");
38,366
registerModel(BLOCK_NETHERRACK, type.ordinal(), BLOCK_NETHERRACK.getRegistryName().toString(), String.format("type=%s", type.getName())); registerModel(ORE_QUARTZ, type.ordinal(), ORE_QUARTZ.getRegistryName().toString(), String.format("type=%s", type.getName())); registerModel(BLOCK_BRICK_NETHER, type.ordinal(), BLOCK_...
registerModel(WALL_BRICK_NETHER, type.ordinal(), String.format(WALL_BRICK_NETHER.getRegistryName().toString() + "_%s", type.getName()), "inventory"); registerModel(FENCE_BRICK_NETHER, type.ordinal(), String.format(FENCE_BRICK_NETHER.getRegistryName().toString() + "_%s", type.getName()), "inventory");
38,367
return getMetaFromState(state); } @Override public IBlockState getStateFromMeta(int meta) { <BUG>return getDefaultState().withProperty(TYPE, EnumType.fromMeta(meta)); </BUG> } @Override public int getMetaFromState(IBlockState state)
return getDefaultState().withProperty(TYPE, BlockElderMushroom.EnumType.fromMeta(meta));
38,368
{ return toString().toLowerCase();</BUG> } <BUG>public static EnumType fromMeta(int meta) { if(meta < 0 || meta >= values().length) { meta = 0; } return values()[meta]; } } }</BUG>
for(BlockElderMushroom.EnumType type : BlockElderMushroom.EnumType.values()) list.add(new ItemStack(item, 1, type.ordinal()));
38,369
return Item.getItemFromBlock(NetherExBlocks.SLAB_BASALT); } @Override public int damageDropped(IBlockState state) { <BUG>return state.getValue(TYPE).ordinal(); }</BUG> @Override public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
return getMetaFromState(state);
38,370
package nex.block; <BUG>import net.minecraft.block.material.Material; public class BlockHyphae extends BlockNetherEx</BUG> { public BlockHyphae() {
import net.minecraft.block.state.IBlockState; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraftforge.common.IPlantable; import nex.init.NetherExBlocks; @SuppressWarnings("ConstantConditions") public class BlockHyphae extends Bloc...
38,371
return Item.getItemFromBlock(NetherExBlocks.SLAB_BRICK_NETHER); } @Override public int damageDropped(IBlockState state) { <BUG>return state.getValue(TYPE).ordinal(); }</BUG> @Override public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
return getMetaFromState(state);
38,372
public void testSuccessfulExceptionRouter() throws Exception { Mock session = getMockSession(); OutboundMessageRouter messageRouter = new OutboundMessageRouter(); messageRouter.setCatchAllStrategy(new LoggingCatchAllStrategy()); <BUG>UMOEndpoint endpoint1 = new MuleEndpoint("test://AlwaysFail", false); UMOEndpoint end...
UMOEndpoint endpoint1 = new MuleEndpoint("test://Dummy1", false); UMOEndpoint endpoint2 = new MuleEndpoint("test://Dummy2", false); UMOEndpoint endpoint3 = new MuleEndpoint("test://Dummy3", false);
38,373
endpoints.add(endpoint3); router.setEndpoints(endpoints); assertEquals(filter, router.getFilter()); UMOMessage message = new MuleMessage("test event"); assertTrue(router.isMatch(message)); <BUG>session.expect("dispatchEvent", C.eq(message, endpoint1)); router.route(message, (UMOSession) session.proxy(), false); sessi...
session.expect("sendEvent", C.eq(message, endpoint1)); UMOMessage result = router.route(message, (UMOSession) session.proxy(), false); assertNull("Async call should've returned null.", result); session.verify();
38,374
import org.mule.umo.routing.RoutingException; public class ExceptionBasedRouter extends FilteringOutboundRouter { public UMOMessage route(UMOMessage message, UMOSession session, boolean synchronous) throws RoutingException { <BUG>UMOMessage result = null; if (endpoints == null || endpoints.size() == 0) { </BUG> throw n...
final int endpointsCount = endpoints.size(); if (endpoints == null || endpointsCount == 0) {
38,375
try {</BUG> dispatch(session, message, endpoint); success = true; break; } catch (UMOException e) { <BUG>logger.info("Failed to disparch to endpoint: " + endpoint.getEndpointURI().toString() + </BUG> ". Error was: " + e.getMessage() + ". Trying next endpoint"); } }
logger.info("Failed to send to endpoint: " + endpoint.getEndpointURI().toString() + } else { try { logger.info("Failed to dispatch to endpoint: " + endpoint.getEndpointURI().toString() +
38,376
package fr.inria.astor.core.validation.validators; import java.util.HashMap; import java.util.Map; <BUG>import fr.inria.astor.core.entities.ProgramVariantValidationResult; public class CompoundValidationResult extends ProgramVariantValidationResult { protected Map<String,ProgramVariantValidationResult> validations = ...
import fr.inria.astor.core.entities.TestCaseVariantValidationResult; public class CompoundValidationResult implements TestCaseVariantValidationResult { protected Map<String,TestCaseVariantValidationResult> validations = new HashMap<>();
38,377
public void setRegressionExecuted(boolean regressionExecuted) { } @Override public int getPassingTestCases() { int count = 0; <BUG>for (ProgramVariantValidationResult pv : this.validations.values()) { </BUG> count+= pv.getPassingTestCases(); } return count;
for (TestCaseVariantValidationResult pv : this.validations.values()) {
38,378
protected MutationSupporter mutatorSupporter = null; protected ProjectRepairFacade projectFacade = null; protected Date dateInitEvolution = new Date(); protected FaultLocalizationStrategy faultLocalization = null; protected int generationsExecuted = 0; <BUG>protected SolutionVariantSortCriterion patchSortCriterion = nu...
protected FitnessFunction fitnessFunction = null; public AstorCoreEngine(MutationSupporter mutatorExecutor, ProjectRepairFacade projFacade) throws JSAPException {
38,379
protected abstract void applyPreviousMutationOperationToSpoonElement(OperatorInstance operation) throws IllegalAccessException; protected abstract void applyNewMutationOperationToSpoonElement(OperatorInstance operation) throws IllegalAccessException; protected boolean validateInstance(ProgramVariant variant) { <BUG>Pro...
boolean wasSuc = validationResult.isSuccessful();
38,380
ConfigurationProperties.setProperty("forceExecuteRegression", Boolean.TRUE.toString()); boolean validInstance = validateInstance(originalVariant); if (validInstance) { throw new IllegalStateException("The application under repair has not failling test cases"); } <BUG>double fitness = originalVariant.getFitness(); log.d...
double fitness = this.fitnessFunction.calculateFitnessValue(originalVariant); originalVariant.setFitness(fitness); log.debug("The original fitness is : "+fitness);
38,381
protected CompilationResult compilationResult = null; protected boolean isSolution = false; protected int lastGenAnalyzed = 0; protected Date bornDate = new Date(); protected List<CtClass> modifiedClasses = new ArrayList<CtClass>(); <BUG>ProgramVariantValidationResult validationResult = null; public ProgramVariant(){</...
public ProgramVariant(){
38,382
solutionVariant.getOperations().put(generationsExecuted, Arrays.asList(pointOperation)); applyNewMutationOperationToSpoonElement(pointOperation); boolean solution = processCreatedVariant(solutionVariant, generationsExecuted); if (solution) { this.solutions.add(solutionVariant); <BUG>if (ConfigurationProperties.getPrope...
if (ConfigurationProperties.getPropertyBool("stopfirst")){ log.debug(" modpoint analyzed "+modifPointsAnalyzed + ", operators "+operatorExecuted); return; } }
38,383
+((this.getManualTestValidation() != null)?"\nmanual_regression: "+(getManualTestValidation()):"") +((getEvoValidation() != null)?"\nevo_regression: "+ (getEvoValidation()):"") ; } @Override <BUG>public boolean wasSuccessful() { return (getValidation("failing") == null || getValidation("failing").wasSuccessful()) </BU...
[DELETED]
38,384
interpB.setROIdata(roiBounds, roiIter); if (nod == null) { nod = interpB.getNoDataRange(); } if (destNod == null) { <BUG>destNod = interpB.getDestinationNoData(); </BUG> } } if (nod != null) {
destNod = new double[]{interpB.getDestinationNoData()};
38,385
s_ix = startPts[0].x; s_iy = startPts[0].y; if (setDestinationNoData) { for (int x = dst_min_x; x < clipMinX; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
38,386
dstPixelOffset += dstPixelStride; } if (setDestinationNoData && clipMinX <= clipMaxX) { for (int x = clipMaxX; x < dst_max_x; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
38,387
s_ix = startPts[0].x; s_iy = startPts[0].y; if (setDestinationNoData) { for (int x = dst_min_x; x < clipMinX; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
38,388
final int w10 = roiIter.getSample(x0, y0 + 1, 0) & 0xff; final int w11 = roiIter.getSample(x0 + 1, y0 + 1, 0) & 0xff; if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) { if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDa...
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
38,389
dstPixelOffset += dstPixelStride; } if (setDestinationNoData && clipMinX <= clipMaxX) { for (int x = clipMaxX; x < dst_max_x; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
38,390
for (int k2 = 0; k2 < dst_num_bands; k2++) { int s00 = srcDataArrays[k2][posx + posy + bandOffsets[k2]]; int s01 = srcDataArrays[k2][posxhigh + posy + bandOffsets[k2]]; int s10 = srcDataArrays[k2][posx + posyhigh + bandOffsets[k2]]; int s11 = srcDataArrays[k2][posxhigh + posyhigh + bandOffsets[k2]]; <BUG>int w00 = byte...
int w00 = byteLookupTable[k2][s00&0xFF] == destinationNoDataByte[k2] ? 0 : 1; int w01 = byteLookupTable[k2][s01&0xFF] == destinationNoDataByte[k2] ? 0 : 1; int w10 = byteLookupTable[k2][s10&0xFF] == destinationNoDataByte[k2] ? 0 : 1; int w11 = byteLookupTable[k2][s11&0xFF] == destinationNoDataByte[k2] ? 0 : 1;
38,391
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = (byte) (intResult & 0xff); } } } else if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> } } if (fracx < fracdx1) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
38,392
s_ix = startPts[0].x; s_iy = startPts[0].y; if (setDestinationNoData) { for (int x = dst_min_x; x < clipMinX; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
38,393
int w11 = w11index < roiDataLength ? roiDataArray[w11index] & 0xff : 0; if (baseIndex > roiDataLength || w00 == 0 || (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0)) { if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataB...
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
38,394
final int s00 = srcDataArrays[k2][posx + posy + bandOffsets[k2]]; final int s01 = srcDataArrays[k2][posxhigh + posy + bandOffsets[k2]]; final int s10 = srcDataArrays[k2][posx + posyhigh + bandOffsets[k2]]; final int s11 = srcDataArrays[k2][posxhigh + posyhigh + bandOffsets[k2]]; <BUG>w00 = byteLookupTable[s00&0xFF] == ...
w00 = byteLookupTable[k2][s00&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w01 = byteLookupTable[k2][s01&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w10 = byteLookupTable[k2][s10&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w11 = byteLookupTable[k2][s11&0xFF] == destinationNoDataByte[k2] ? 0 : 1;
38,395
dstPixelOffset += dstPixelStride; } if (setDestinationNoData && clipMinX <= clipMaxX) { for (int x = clipMaxX; x < dst_max_x; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
38,396
s_ix = startPts[0].x; s_iy = startPts[0].y; if (setDestinationNoData) { for (int x = dst_min_x; x < clipMinX; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
38,397
int w10 = roiIter.getSample(x0, y0 + 1, 0) & 0xff; int w11 = roiIter.getSample(x0 + 1, y0 + 1, 0) & 0xff; if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) { if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BU...
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
38,398
+ bandOffsets[k2]]; final int s10 = srcDataArrays[k2][posx + posyhigh + bandOffsets[k2]]; final int s11 = srcDataArrays[k2][posxhigh + posyhigh + bandOffsets[k2]]; <BUG>w00 = byteLookupTable[s00&0xFF] == destinationNoDataByte ? 0 : 1; w01 = byteLookupTable[s01&0xFF] == destinationNoDataByte ? 0 : 1; w10 = byteLookupT...
w00 = byteLookupTable[k2][s00&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w01 = byteLookupTable[k2][s01&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w10 = byteLookupTable[k2][s10&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w11 = byteLookupTable[k2][s11&0xFF] == destinationNoDataByte[k2] ? 0 : 1;
38,399
dstPixelOffset += dstPixelStride; } if (setDestinationNoData && clipMinX <= clipMaxX) { for (int x = clipMaxX; x < dst_max_x; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
38,400
s_ix = startPts[0].x; s_iy = startPts[0].y; if (setDestinationNoData) { for (int x = dst_min_x; x < clipMinX; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];