id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
38,601 | package org.dummy.web.service;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
<BUG>import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;</BUG>
import javax.ws.rs.core.Response;
@Path("/")
public class DummyThirdPartyWebService {
| import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
|
38,602 | private Configurator configurator;
private Database database;
private final WebServer webServer;
private final StartupHealthCheck startupHealthCheck;
private final AddressResolver addressResolver;
<BUG>private List<ServerModule> serverModules = new ArrayList<ServerModule>();
public NeoServerWithEmbeddedWebServer(Addres... | private ExtensionInitializer extensionInitializer;
public NeoServerWithEmbeddedWebServer(AddressResolver addressResolver, StartupHealthCheck startupHealthCheck, File configFile, WebServer webServer) {
|
38,603 | return configurator.configuration().getInt(Configurator.WEBSERVER_PORT_PROPERTY_KEY, Configurator.DEFAULT_WEBSERVER_PORT);
}
@Override
public void stop() {
try {
<BUG>stopModules();
stopDatabase();</BUG>
stopWebServer();
log.info("Successfully shutdown Neo Server on port [%d], database [%s]", getWebServerPort(), getDat... | stopExtensionInitializers();
stopDatabase();
|
38,604 | log.info("Successfully shutdown Neo Server on port [%d], database [%s]", getWebServerPort(), getDatabase().getLocation());
} catch (Exception e) {
log.warn("Failed to cleanly shutdown Neo Server on port [%d], database [%s]. Reason: %s", getWebServerPort(), getDatabase().getLocation(),
e.getMessage());
}
<BUG>}
private ... | private void stopExtensionInitializers()
extensionInitializer.stop( );
private void stopWebServer() {
|
38,605 | package org.neo4j.server;
import org.apache.commons.configuration.Configuration;
import org.neo4j.server.configuration.Configurator;
<BUG>import org.neo4j.server.database.Database;
import org.neo4j.server.plugins.PluginManager;
public interface NeoServer {</BUG>
void start();
Configuration getConfiguration();
| import org.neo4j.server.plugins.Injectable;
import java.util.Collection;
import java.util.List;
import java.util.Set;
public interface NeoServer {
|
38,606 | public static void visitUpPathSections(final PsiFile psiFile, int depth, final SectionVisitor visitor) {
if(depth-- <= 0) {
return;
}
final int finalDepth = depth;
<BUG>BladeTemplateUtil.visitExtends(psiFile, new BladeTemplateUtil.ExtendsVisitor() {
</BUG>
@Override
public void visit(@NotNull PsiElement psiElement, @No... | BladeTemplateUtil.visitExtends(psiFile, new DirectiveParameterVisitor() {
|
38,607 | boolean enabled = false;
int title = R.string.search_POI_level_btn;
if (location == null) {
title = R.string.search_poi_location;
enabled = false;
<BUG>} else if (!isNameFinderFilter() && !isSearchByNameFilter()) {
</BUG>
title = R.string.search_POI_level_btn;
enabled = (taskAlreadyFinished || currentSearchTask.getStat... | } else if (filter != null && !isNameFinderFilter() && !isSearchByNameFilter()) {
|
38,608 | rtype.value = parser.getAttributeValue("", "value"); //$NON-NLS-1$
if (rtype.value != null && rtype.value.length() == 0) { //$NON-NLS-1$
rtype.value = null;
}
if (poiParentCategory != null) {
<BUG>rtype.poiCategory = AmenityType.valueOf(poiParentCategory.toUpperCase());
</BUG>
rtype.poiSpecified = true;
}
if (poiParent... | rtype.poiCategory = AmenityType.fromString(poiParentCategory);
|
38,609 | ;
private final String defaultTag;
private AmenityType(String defaultTag) {
this.defaultTag = defaultTag;
}
<BUG>public static AmenityType fromString(String s){
try {
return AmenityType.valueOf(s.toUpperCase());
} catch (IllegalArgumentException e) {
return AmenityType.OTHER;
}
}</BUG>
public String getDefaultTag() {
| public static AmenityType fromString(String s) {
for (AmenityType t : values()) {
if (t.name().equalsIgnoreCase(s)) {
return t;
return OTHER;
|
38,610 | private final int id;
private GuiButton2 craftButton;
private GuiImageButton craftingWindowButton;
private GuiImageButton explosiveWindowButton;
private GuiImageButton triggerWindowButton;
<BUG>private GuiImageButton otherWindowButton;
</BUG>
public GuiWarheadStation(EntityPlayer player, TileWarheadStationClient tile, ... | private GuiImageButton autocraftingButton;
|
38,611 | case 2:
baseTexture = guiTexture2;
break;
case 3:
baseTexture = guiTexture3;
<BUG>break;
}</BUG>
}
@Override
public void initGui()
| case 4:
|
38,612 | }
@Override
public void initGui()
{
super.initGui();
<BUG>craftingWindowButton = addButton(GuiImageButton.newRefreshButton(1, guiLeft - 18, guiTop + 5));
explosiveWindowButton = addButton(GuiImageButton.newRefreshButton(2, guiLeft - 18, guiTop + 5 + 19));
triggerWindowButton = addButton(GuiImageButton.newRefreshButto... | craftingWindowButton = addButton(GuiImageButton.newButton18(1, guiLeft - 18, guiTop + 5, 0, 0).setTexture(Assets.GUI_BUTTONS));
explosiveWindowButton = addButton(GuiImageButton.newButton18(2, guiLeft - 18, guiTop + 5 + 19, 1, 0).setTexture(Assets.GUI_BUTTONS));
triggerWindowButton = addButton(GuiImageButton.newButton18... |
38,613 | public static final ResourceLocation FoF_STATION_TEXTURE = texture("console-fof");
public static final ResourceLocation ANTENNA_TEXTURE = texture("antenna");
public static final ResourceLocation SMALL_WORKSTATION_TEXTURE = texture("small-missile-workstation");
public static final ResourceLocation SMALL_WORKSTATION_TEXT... | public static final ResourceLocation GUI_BUTTONS = new ResourceLocation(ICBM.DOMAIN, "textures/gui/gui.buttons.32pix.png");
public static IModelCustom model(String name)
|
38,614 | import com.skin.ayada.config.TemplateConfig;
import com.skin.ayada.factory.TagFactoryManager;
import com.skin.ayada.io.StringStream;
import com.skin.ayada.jstl.TagInfo;
import com.skin.ayada.jstl.TagLibrary;
<BUG>import com.skin.ayada.jstl.TagLibraryFactory;
</BUG>
import com.skin.ayada.runtime.TagFactory;
import com.s... | import com.skin.ayada.jstl.TagLibraryManager;
|
38,615 | String prefix = attributes.get("prefix");
String uri = attributes.get("uri");
this.loadTagLibrary(prefix, uri);
return;
}
<BUG>else if(nodeName.equals("t:import"))
{</BUG>
Map<String, String> attributes = this.getAttributes();
if(this.stream.peek(-2) != '/')
{
| else if(nodeName.equals(TPL_DIRECTIVE_IMPORT))
|
38,616 | String file = attributes.get("file");
String encoding = attributes.get("encoding");
this.include(stack, list, type, file, encoding);
return;
}
<BUG>else if(nodeName.equals("t:text"))
{</BUG>
int line = this.lineNumber;
this.getAttributes();
this.skipCRLF();
| else if(nodeName.equals(TPL_DIRECTIVE_TEXT))
{
|
38,617 | String content = this.readNodeContent(nodeName);
this.pushTextNode(stack, list, content, line);
this.skipCRLF();
return;
}
<BUG>else if(nodeName.equals("t:comment"))
{</BUG>
this.getAttributes();
this.skipCRLF();
this.readNodeContent(nodeName);
| else if(nodeName.equals(TPL_DIRECTIVE_COMMENT))
{
|
38,618 | return;
}
String tagClassName = className;
if(tagClassName == null || tagClassName.trim().length() < 1)
{
<BUG>tagClassName = this.tagLibrary.getTagClassName(tagName);
}</BUG>
if(tagClassName == null)
{
return;
| else if(nodeName.equals(TPL_DIRECTIVE_COMMENT))
this.getAttributes();
this.skipCRLF();
this.readNodeContent(nodeName);
this.skipCRLF();
|
38,619 | }</BUG>
if(tagClassName == null)
{
return;
}
<BUG>TagLibrary tagLibrary = this.getTagLibrary();
if(tagLibrary != null)
{
tagLibrary.setup(tagName.trim(), tagClassName.trim(), bodyContent, null);
</BUG>
}
| else if(nodeName.equals(TPL_DIRECTIVE_COMMENT))
this.getAttributes();
this.skipCRLF();
this.readNodeContent(nodeName);
this.skipCRLF();
|
38,620 | for(int i = 0, size = list.size(); i < size; i++)
{
Node node = list.get(i);
int nodeType = node.getNodeType();
if(nodeType == NodeType.TEXT || nodeType == NodeType.EXPRESSION || nodeType == NodeType.VARIABLE)
<BUG>{
if(node.getTextContent().length() > 0)
</BUG>
{
node.setOffset(nodes.size());
| String content = node.getTextContent();
if(content.length() > 0)
|
38,621 | context.put("options.fastJstl", String.valueOf(this.fastJstl));
context.put("compiler.version", Version.getVersion());
context.put("jsp.directive.import", jspDirective);
context.put("jsp.declaration", jspDeclaration);
context.put("jsp.method.body", methodBody);
<BUG>context.put("jsp.subclass.body", subClassBOdy);
retur... | context.put("jsp.static.declaration", staticDeclaration);
return this.replace(JAVA_TEMPLATE, context);
|
38,622 | import com.intellij.openapi.editor.EditorFactory;
import com.intellij.openapi.editor.EditorSettings;
import com.intellij.openapi.editor.markup.TextAttributes;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.progress.ProcessCanceledException;
<BUG>import com.intellij.openapi.project.DumbAw... | import com.intellij.openapi.project.DumbService;
import com.intellij.openapi.project.Project;
|
38,623 | boolean defaultProject = Boolean.TRUE.toString().equals(element.getAttributeValue(ATTRIBUTE_DEFAULT_PROJECT));
if (haveNonEmptyMappings || !defaultProject) {
myMappingsLoaded = true;
}
StartupManager.getInstance(myProject).runWhenProjectIsInitialized(new Runnable() {
<BUG>public void run() {
myMappings.setDirectoryMapp... | DumbService.getInstance(myProject).runWhenSmart(new Runnable() {
|
38,624 | chart.addYAxisLabels(AxisLabelsFactory.newAxisLabels(labels));
chart.addXAxisLabels(AxisLabelsFactory.newNumericRangeAxisLabels(0, max));
chart.setBarWidth(BarChart.AUTO_RESIZE);
chart.setSize(600, 500);
chart.setHorizontal(true);
<BUG>chart.setTitle("Total Evaluations by User");
showChartImg(resp, chart.toURLString())... | chart.setDataEncoding(DataEncoding.TEXT);
return chart;
}
|
38,625 | checkEvaluationsEqual(eval4, foundissueProto.getEvaluations(0));
checkEvaluationsEqual(eval5, foundissueProto.getEvaluations(1));
}
public void testGetRecentEvaluationsNoneFound() throws Exception {
DbIssue issue = createDbIssue("fad", persistenceHelper);
<BUG>DbEvaluation eval1 = createEvaluation(issue, "someone", 100... | [DELETED] |
38,626 | public int read() throws IOException {
return inputStream.read();
}
});
}
<BUG>}
protected DbEvaluation createEvaluation(DbIssue issue, String who, long when) {</BUG>
DbUser user;
Query query = getPersistenceManager().newQuery("select from " + persistenceHelper.getDbUserClass().getName()
+ " where openid == :myopenid")... | @SuppressWarnings({"unchecked"})
protected DbEvaluation createEvaluation(DbIssue issue, String who, long when) {
|
38,627 | eval.setComment("my comment");
eval.setDesignation("MUST_FIX");
eval.setIssue(issue);
eval.setWhen(when);
eval.setWho(user.createKeyObject());
<BUG>eval.setEmail(who);
return eval;</BUG>
}
protected PersistenceManager getPersistenceManager() {
return testHelper.getPersistenceManager();
| issue.addEvaluation(eval);
return eval;
|
38,628 | cgl.setLexicalvalue(valueEdit);
cgl.setIdgroup(idDomaine);
cgl.setIdthesaurus(idTheso);
cgl.setLang(langueEdit);
GroupHelper cgh = new GroupHelper();
<BUG>if (!cgh.isDomainExist(connect.getPoolConnexion(),
cgl.getLexicalvalue(),</BUG>
cgl.getIdthesaurus(), cgl.getLang())) {
FacesContext.getCurrentInstance().addMessage(... | if (cgh.isDomainExist(connect.getPoolConnexion(),
cgl.getLexicalvalue(),
|
38,629 | Term terme = new Term();
terme.setId_thesaurus(idTheso);
terme.setLang(langueEdit);
terme.setLexical_value(valueEdit);
terme.setId_term(idT);
<BUG>if (new TermHelper().isTermExist(connect.getPoolConnexion(),
</BUG>
terme.getLexical_value(),
terme.getId_thesaurus(), terme.getLang())) {
FacesContext.getCurrentInstance().... | if (termHelper.isTermExist(connect.getPoolConnexion(),
|
38,630 | Term terme = new Term();
terme.setId_thesaurus(idTheso);
terme.setLang(langueEdit);
terme.setLexical_value(valueEdit);
terme.setId_term(idT);
<BUG>if (new TermHelper().isTermExist(connect.getPoolConnexion(),
</BUG>
terme.getLexical_value(),
terme.getId_thesaurus(), terme.getLang())) {
FacesContext.getCurrentInstance().... | if (termHelper.isTermExist(connect.getPoolConnexion(),
|
38,631 | langues = new ArrayList<>();
HashMap<String, String> tempMapL = new HashMap<>();
for (NodeTermTraduction ntt : tempNTT) {
tempMapL.put(ntt.getLang(), ntt.getLexicalValue());
}
<BUG>langues.addAll(tempMapL.entrySet());
}</BUG>
langueEdit = "";
valueEdit = "";
if (!tradExist) {
| if(newTraduction) {
nom = termHelper.getThisTerm(connect.getPoolConnexion(),idC, idTheso, idlangue).getLexical_value();
|
38,632 | if (n.getTitle().trim().isEmpty()) {
dynamicTreeNode = (TreeNode) new MyTreeNode(1, n.getIdConcept(), idTheso, idlangue, "", "", "dossier", n.getIdConcept(), root);
} else {
dynamicTreeNode = (TreeNode) new MyTreeNode(1, n.getIdConcept(), idTheso, idlangue, "", "", "dossier", n.getTitle(), root);
}
<BUG>new DefaultTree... | DefaultTreeNode defaultTreeNode = new DefaultTreeNode("fake", dynamicTreeNode);
defaultTreeNode.setExpanded(true);
|
38,633 | SKOSXmlDocument sxd = new ReadFileSKOS().readStringBuffer(sb);
for (SKOSResource resource : sxd.getResourcesList()) {
NodeAlignment na = new NodeAlignment();
na.setInternal_id_concept(idC);
na.setInternal_id_thesaurus(idTheso);
<BUG>na.setThesaurus_target("OpenTheso");
</BUG>
na.setUri_target(resource.getUri());
for(SK... | na.setThesaurus_target("Pactols");
|
38,634 | import org.apache.sling.api.SlingConstants;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.servlets.SlingSafeMethodsServlet;
import org.apache.sling.api.wrappers.SlingHttpServletRequestWrapper;
<BUG>import org.apache.sling.api.wrapp... | import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private final Logger log = LoggerFactory.getLogger(getClass());
@Override
|
38,635 | @Nullable
private DatasetTypeMeta getTypeInfo(NamespaceId namespaceId, String typeName) throws Exception {
DatasetTypeId datasetTypeId = ConversionHelpers.toDatasetTypeId(namespaceId, typeName);
try {
return typeService.getType(datasetTypeId);
<BUG>} catch (DatasetTypeNotFoundException e) {
DatasetTypeId systemDatasetT... | } catch (DatasetTypeNotFoundException exnWithSystemNS) {
throw e;
|
38,636 | }
private void enableExplore(DatasetId datasetInstance, DatasetSpecification spec,
DatasetInstanceConfiguration creationProperties) {
try {
exploreFacade.enableExploreDataset(datasetInstance.toId(), spec);
<BUG>} catch (Exception e) {
String msg = String.format("Cannot enable exploration of dataset instance %s of type ... | metaCache.invalidate(instance);
DatasetTypeMeta typeMeta = getTypeInfo(instance.getParent(), spec.getType());
if (typeMeta == null) {
throw new DatasetNotFoundException(instance.toId());
|
38,637 | package org.opennms.netmgt.utils;
<BUG>import java.sql.Connection;
import java.sql.PreparedStatement;</BUG>
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
| [DELETED] |
38,638 | package com.james.status.views;
<BUG>import android.animation.Animator;
import android.animation.LayoutTransition;</BUG>
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.app.WallpaperInfo;
| import android.animation.ArgbEvaluator;
import android.animation.LayoutTransition;
|
38,639 | package com.james.status.dialogs;
<BUG>import android.animation.Animator;
import android.content.Context;</BUG>
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
| import android.animation.ArgbEvaluator;
import android.animation.ValueAnimator;
import android.content.Context;
|
38,640 | public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
<BUG>}).start();
} else {</BUG>
colorImage.setImageDrawable(new ColorDrawable(color));
colorHex.removeTextChangedListener(textWatcher);
colorHex.setText(String.format("#%06X", (0xFFFFFF & color)));
| });
animator.start();
} else {
|
38,641 | package com.projecttango.examples.java.augmentedreality;
import com.google.atap.tangoservice.Tango;
import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;
import com.google.atap.tangoservice.TangoCameraIntrinsics;
import com.google.atap.tangoservice.TangoConfig;
<BUG>import com.google.atap.tangoservice.TangoC... | import com.google.atap.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
|
38,642 | super.onResume();
if (!mIsConnected) {
mTango = new Tango(AugmentedRealityActivity.this, new Runnable() {
@Override
public void run() {
<BUG>try {
connectTango();</BUG>
setupRenderer();
mIsConnected = true;
} catch (TangoOutOfDateException e) {
| TangoSupport.initialize();
connectTango();
|
38,643 | if (lastFramePose.statusCode == TangoPoseData.POSE_VALID) {
mRenderer.updateRenderCameraPose(lastFramePose, mExtrinsics);
mCameraPoseTimestamp = lastFramePose.timestamp;</BUG>
} else {
<BUG>Log.w(TAG, "Can't get device pose at time: " + mRgbTimestampGlThread);
}</BUG>
}
}
}
@Override
| mRenderer.updateRenderCameraPose(lastFramePose);
mCameraPoseTimestamp = lastFramePose.timestamp;
Log.w(TAG, "Can't get device pose at time: " +
|
38,644 | import org.rajawali3d.materials.Material;
import org.rajawali3d.materials.methods.DiffuseMethod;
import org.rajawali3d.materials.textures.ATexture;
import org.rajawali3d.materials.textures.StreamingTexture;
import org.rajawali3d.materials.textures.Texture;
<BUG>import org.rajawali3d.math.Matrix4;
import org.rajawali3d.... | import org.rajawali3d.math.Quaternion;
import org.rajawali3d.math.vector.Vector3;
|
38,645 | translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE);
translationMoon.setTransformable3D(moon);
getCurrentScene().registerAnimation(translationMoon);
translationMoon.play();
}
<BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) {
Pose cameraPose = ScenePoseCalculator.t... | public void updateRenderCameraPose(TangoPoseData cameraPose) {
float[] rotation = cameraPose.getRotationAsFloats();
float[] translation = cameraPose.getTranslationAsFloats();
Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]);
getCurrentCamera().setRotation(quaternion.conjugate()... |
38,646 | package com.projecttango.examples.java.helloareadescription;
import com.google.atap.tangoservice.Tango;
<BUG>import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;
import com.google.atap.tangoservice.TangoConfig;</BUG>
import com.google.atap.tangoservice.TangoCoordinateFramePair;
import com.google.atap.tangos... | import com.google.atap.tangoservice.TangoAreaDescriptionMetaData;
import com.google.atap.tangoservice.TangoConfig;
|
38,647 | import net.buycraft.plugin.execution.placeholder.UuidPlaceholder;
import net.buycraft.plugin.execution.strategy.CommandExecutor;
import net.buycraft.plugin.execution.strategy.PostCompletedCommandsTask;
import net.buycraft.plugin.execution.strategy.QueuedCommandExecutor;
import net.buycraft.plugin.shared.config.Buycraft... | import net.buycraft.plugin.shared.util.FakeProxySelector;
import net.buycraft.plugin.shared.util.Ipv4PreferDns;
|
38,648 | import org.spongepowered.api.event.Listener;
import org.spongepowered.api.event.game.state.GamePreInitializationEvent;
import org.spongepowered.api.event.game.state.GameStoppingServerEvent;
import org.spongepowered.api.plugin.Plugin;
import org.spongepowered.api.text.Text;
<BUG>import java.io.IOException;
import java.n... | import java.net.ProxySelector;
import java.nio.file.FileAlreadyExistsException;
|
38,649 | httpClient = new OkHttpClient.Builder()
.connectTimeout(1, TimeUnit.SECONDS)
.writeTimeout(3, TimeUnit.SECONDS)
.readTimeout(3, TimeUnit.SECONDS)
.cache(new Cache(baseDirectory.resolve("cache").toFile(), 1024 * 1024 * 10))
<BUG>.dns(new Ipv4PreferDns())
.build();</BUG>
String curVersion = getClass().getAnnotation(Plugi... | .proxySelector(ProxySelector.getDefault() == null ? FakeProxySelector.INSTANCE : ProxySelector.getDefault())
.build();
|
38,650 | import net.buycraft.plugin.execution.placeholder.UuidPlaceholder;
import net.buycraft.plugin.execution.strategy.CommandExecutor;
import net.buycraft.plugin.execution.strategy.PostCompletedCommandsTask;
import net.buycraft.plugin.execution.strategy.QueuedCommandExecutor;
import net.buycraft.plugin.shared.config.Buycraft... | import net.buycraft.plugin.shared.util.FakeProxySelector;
import net.buycraft.plugin.shared.util.Ipv4PreferDns;
|
38,651 | import okhttp3.Cache;
import okhttp3.OkHttpClient;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
<BUG>import java.io.IOException;
import java.nio.file.Files;</BUG>
import java.nio.file.Path;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
| import java.net.ProxySelector;
import java.nio.file.Files;
|
38,652 | bugsnagClient = new Client("cac4ea0fdbe89b5004d8ab8d5409e594", false);
bugsnagClient.setAppVersion(getDescription().getVersion());
bugsnagClient.setProjectPackages("net.buycraft.plugin");
bugsnagClient.setLogger(new BugsnagNilLogger());
bugsnagClient.addBeforeNotify(new BuycraftBeforeNotify());
<BUG>bugsnagClient.addTo... | bugsnagClient.addToTab("app", "minecraftPlatform", "bukkit");
|
38,653 | httpClient = new OkHttpClient.Builder()
.connectTimeout(1, TimeUnit.SECONDS)
.writeTimeout(3, TimeUnit.SECONDS)
.readTimeout(3, TimeUnit.SECONDS)
.cache(new Cache(new File(getDataFolder(), "cache"), 1024 * 1024 * 10))
<BUG>.dns(new Ipv4PreferDns())
.build();</BUG>
String serverKey = configuration.getServerKey();
if (se... | .proxySelector(ProxySelector.getDefault() == null ? FakeProxySelector.INSTANCE : ProxySelector.getDefault())
.build();
|
38,654 | import net.buycraft.plugin.execution.placeholder.UuidPlaceholder;
import net.buycraft.plugin.execution.strategy.CommandExecutor;
import net.buycraft.plugin.execution.strategy.PostCompletedCommandsTask;
import net.buycraft.plugin.execution.strategy.QueuedCommandExecutor;
import net.buycraft.plugin.shared.config.Buycraft... | import net.buycraft.plugin.shared.util.FakeProxySelector;
import net.buycraft.plugin.shared.util.Ipv4PreferDns;
|
38,655 | import net.md_5.bungee.api.plugin.Plugin;
import okhttp3.Cache;
import okhttp3.Dispatcher;
import okhttp3.OkHttpClient;
import java.io.File;
<BUG>import java.io.IOException;
import java.nio.file.Files;</BUG>
import java.nio.file.Path;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;... | import java.net.ProxySelector;
import java.nio.file.Files;
|
38,656 | .connectTimeout(1, TimeUnit.SECONDS)
.writeTimeout(3, TimeUnit.SECONDS)
.readTimeout(3, TimeUnit.SECONDS)
.dispatcher(new Dispatcher(getExecutorService()))
.cache(cache)
<BUG>.dns(new Ipv4PreferDns())
.build();</BUG>
String serverKey = configuration.getServerKey();
if (serverKey == null || serverKey.equals("INVALID")) ... | .proxySelector(ProxySelector.getDefault() == null ? FakeProxySelector.INSTANCE : ProxySelector.getDefault())
.build();
|
38,657 | @Override
public void handle(Request request, Response response) {
RuleQuery query = createRuleQuery(ruleService.newRuleQuery(), request);
SearchOptions searchOptions = SearchOptions.create(request);
QueryContext queryContext = mapping.newQueryOptions(searchOptions);
<BUG>if (Boolean.valueOf(request.paramAsBoolean("fac... | Boolean facets = request.paramAsBoolean("facets");
if (facets != null && facets) {
queryContext.addFacets(Arrays.asList("languages", "repositories", "tags"));
|
38,658 | }else if(programsSelected.size() == 1){
lytProgsPanel.setVisibility(View.VISIBLE);
lytProg2MAHAdsExtDlg.setVisibility(View.GONE);
prog1 = programsSelected.get(0);
((TextView)view.findViewById(R.id.tvProg1NameMAHAdsExtDlg)).setText(prog1.getName());
<BUG>if (prog1.getImg() != null && !prog1.getImg().trim().isEmpty()) {
... | Picasso.with(view.getContext())
.load(MAHAdsController.urlRootOnServer + prog1.getImg())
.placeholder(R.drawable.img_place_holder_normal)
.error(R.drawable.img_not_found)
.into((ImageView) view.findViewById(R.id.ivProg1ImgMAHAds));
AngledLinearLayout prog1LytNewText = (AngledLinearLayout)view.findViewById(R.id.lytProg1... |
38,659 | package org.apache.hadoop.hbase.master.handler;
import java.util.ArrayList;
import java.util.List;
<BUG>import java.io.IOException;
import com.google.common.base.Predicate;</BUG>
import com.google.common.collect.Iterables;
import com.google.common.collect.Iterators;
import com.google.common.collect.Lists;
| import java.util.concurrent.CountDownLatch;
import com.google.common.base.Predicate;
|
38,660 | import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.client.ResultScanner;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.client.Table;
<BUG>import org.apache.hadoop.hbase.master.HMaster;
import org.apache.hadoop.hbase... | import org.apache.hadoop.hbase.coprocessor.BaseMasterObserver;
import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
import org.apache.hadoop.hbase.coprocessor.MasterCoprocessorEnvironment;
import org.apache.hadoop.hbase.coprocessor.ObserverContext;
import org.apache.hadoop.hbase.testclassification.MasterTests;
|
38,661 | import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import static org.junit.Assert.assertEquals;
<BUG>import static org.junit.Assert.assertTrue;
@Category({ MasterTests.class, MediumTests.class })</BUG>
public class TestEnableTableHandler {
private ... | import static org.junit.Assert.fail;
@Category({ MasterTests.class, MediumTests.class })
|
38,662 | public class TestEnableTableHandler {
private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private static final Log LOG = LogFactory.getLog(TestEnableTableHandler.class);
private static final byte[] FAMILYNAME = Bytes.toBytes("fam");
@Before
<BUG>public void setUp() throws Exception {
TEST_UT... | TEST_UTIL.getConfiguration().set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY,
MasterSyncObserver.class.getName());
TEST_UTIL.startMiniCluster(1);
|
38,663 | public void testDeleteForSureClearsAllTableRowsFromMeta()
throws IOException, InterruptedException {
final TableName tableName = TableName.valueOf("testDeleteForSureClearsAllTableRowsFromMeta");
final HBaseAdmin admin = TEST_UTIL.getHBaseAdmin();
final HTableDescriptor desc = new HTableDescriptor(tableName);
<BUG>desc.... | try {
createTable(TEST_UTIL, desc, HBaseTestingUtility.KEYS_FOR_HBA_CREATE_TABLE);
} catch (Exception e) {
e.printStackTrace();
fail("Got an exception while creating " + tableName);
}
try (Table metaTable = TEST_UTIL.getConnection().getTable(TableName.META_TABLE_NAME)) {
|
38,664 | import de.vanita5.twittnuker.receiver.NotificationReceiver;
import de.vanita5.twittnuker.service.LengthyOperationsService;
import de.vanita5.twittnuker.util.ActivityTracker;
import de.vanita5.twittnuker.util.AsyncTwitterWrapper;
import de.vanita5.twittnuker.util.DataStoreFunctionsKt;
<BUG>import de.vanita5.twittnuker.u... | import de.vanita5.twittnuker.util.DebugLog;
import de.vanita5.twittnuker.util.ImagePreloader;
|
38,665 | final List<InetAddress> addresses = mDns.lookup(host);
for (InetAddress address : addresses) {
c.addRow(new String[]{host, address.getHostAddress()});
}
} catch (final IOException ignore) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, ignore);
}</BUG>
}
| DebugLog.w(LOGTAG, null, ignore);
|
38,666 | @Override
public void afterExecute(Bus handler, SingleResponse<Relationship> result) {
if (result.hasData()) {
handler.post(new FriendshipUpdatedEvent(accountKey, userKey, result.getData()));
} else if (result.hasException()) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, "Unable to update friendship", result.getExcepti... | public UserKey[] getAccountKeys() {
return DataStoreUtils.getActivatedAccountKeys(context);
|
38,667 | MicroBlog microBlog = MicroBlogAPIFactory.getInstance(context, accountId);
if (!Utils.isOfficialCredentials(context, accountId)) continue;
try {
microBlog.setActivitiesAboutMeUnread(cursor);
} catch (MicroBlogException e) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, e);
}</BUG>
}
| DebugLog.w(LOGTAG, null, e);
|
38,668 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
twitter.updateProfileBannerImage(fileBody);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.form... | if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
38,669 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
twitter.updateProfileBackgroundImage(fileBody, tile);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, S... | twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
38,670 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
return twitter.updateProfileImage(fileBody);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.for... | twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
38,671 | import de.vanita5.twittnuker.annotation.CustomTabType;
import de.vanita5.twittnuker.library.MicroBlog;
import de.vanita5.twittnuker.library.MicroBlogException;
import de.vanita5.twittnuker.library.twitter.model.RateLimitStatus;
import de.vanita5.twittnuker.library.twitter.model.Status;
<BUG>import de.vanita5.twittnuker... | import org.mariotaku.pickncrop.library.PNCUtils;
import org.mariotaku.sqliteqb.library.AllColumns;
|
38,672 | context.getApplicationContext().sendBroadcast(intent);
}
}
@Nullable
public static Location getCachedLocation(Context context) {
<BUG>if (BuildConfig.DEBUG) {
Log.v(LOGTAG, "Fetching cached location", new Exception());
}</BUG>
Location location = null;
| DebugLog.v(LOGTAG, "Fetching cached location", new Exception());
|
38,673 | import java.util.List;
import java.util.Map.Entry;
import javax.inject.Singleton;
import okhttp3.Dns;
@Singleton
<BUG>public class TwidereDns implements Constants, Dns {
</BUG>
private static final String RESOLVER_LOGTAG = "TwittnukerDns";
private final SharedPreferences mHostMapping;
private final SharedPreferencesWra... | public class TwidereDns implements Dns, Constants {
|
38,674 | for (Location location : twitter.getAvailableTrends()) {
map.put(location);
}
return map.pack();
} catch (final MicroBlogException e) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, e);
}</BUG>
}
| DebugLog.w(LOGTAG, null, e);
|
38,675 | import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.LocalFileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.util.Progressable;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AFileSystem extends FileSyste... | import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AFileSystem extends FileSystem {
|
38,676 | public void initialize(URI name, Configuration conf) throws IOException {
super.initialize(name, conf);
uri = URI.create(name.getScheme() + "://" + name.getAuthority());
workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri,
this.getWorkingDirectory());
<BUG>String accessKey = conf.get(... | String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null));
String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
|
38,677 | } else {
accessKey = userInfo;
}
}
AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain(
<BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey),
new InstanceProfileCredentialsProvider(),
new S3AAnonymousAWSCredentialsProvider()
);</BUG>
bucket = name.getHost();
| new BasicAWSCredentialsProvider(accessKey, secretKey),
new AnonymousAWSCredentialsProvider()
|
38,678 |
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT));
</BUG>
s3 = new AmazonS3Client(credentials, awsConf);
<BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS);
partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THR... | new InstanceProfileCredentialsProvider(),
new AnonymousAWSCredentialsProvider()
bucket = name.getHost();
ClientConfiguration awsConf = new ClientConfiguration();
awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS)));
awsConf.setProtocol(conf.g... |
38,679 | cannedACL = null;
}
if (!s3.doesBucketExist(bucket)) {
throw new IOException("Bucket " + bucket + " does not exist");
}
<BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART);
long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_... | boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART));
long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART... |
38,680 | import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AOutputStream extends OutputStream {</BUG>
private OutputStream backupStream;
private File backup... | import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AOutputStream extends OutputStream {
|
38,681 | this.client = client;
this.progress = progress;
this.fs = fs;
this.cannedACL = cannedACL;
this.statistics = statistics;
<BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
</BUG>
if (conf.get(BUFFER_DIR, null) ... | partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
|
38,682 | public NodeFirstRelationshipStage( Configuration config, NodeStore nodeStore,
RelationshipGroupStore relationshipGroupStore, NodeRelationshipLink cache )
{
super( "Node --> Relationship", config, false );
add( new ReadNodeRecordsStep( control(), config.batchSize(), config.movingAverageSize(), nodeStore ) );
<BUG>add( n... | add( new RecordProcessorStep<>( control(), "LINK", config.workAheadSize(), config.movingAverageSize(),
new NodeFirstRelationshipProcessor( relationshipGroupStore, cache ), false ) );
add( new UpdateRecordsStep<>( control(), config.workAheadSize(), config.movingAverageSize(), nodeStore ) );
|
38,683 | import org.neo4j.kernel.impl.api.CountsAccessor;
import org.neo4j.kernel.impl.store.NodeLabelsField;
import org.neo4j.kernel.impl.store.NodeStore;
import org.neo4j.kernel.impl.store.record.NodeRecord;
import org.neo4j.unsafe.impl.batchimport.cache.NodeLabelsCache;
<BUG>public class NodeCountsProcessor implements StoreP... | public class NodeCountsProcessor implements RecordProcessor<NodeRecord>
|
38,684 | import org.neo4j.kernel.impl.store.RelationshipGroupStore;
import org.neo4j.kernel.impl.store.record.NodeRecord;
import org.neo4j.kernel.impl.store.record.RelationshipGroupRecord;
import org.neo4j.unsafe.impl.batchimport.cache.NodeRelationshipLink;
import org.neo4j.unsafe.impl.batchimport.cache.NodeRelationshipLink.Gro... | public class NodeFirstRelationshipProcessor implements RecordProcessor<NodeRecord>, GroupVisitor
|
38,685 | package me.xiaopan.android.easy.app;
<BUG>import me.xiaopan.android.easy.inject.DisableInject;
</BUG>
import me.xiaopan.android.easy.inject.InjectContentView;
import me.xiaopan.android.easy.inject.Injector;
import me.xiaopan.android.easy.util.ActivityUtils;
| import me.xiaopan.android.easy.inject.DisableInjector;
|
38,686 | };
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
<BUG>if(getClass().getAnnotation(DisableInject.class) == null){
</BUG>
injector = new Injector(this);
injector.injectOtherMembers();
}
| if(getClass().getAnnotation(DisableInjector.class) == null){
|
38,687 | package me.xiaopan.android.easy.app;
import java.util.Locale;
<BUG>import me.xiaopan.android.easy.inject.DisableInject;
</BUG>
import me.xiaopan.android.easy.inject.InjectContentView;
import me.xiaopan.android.easy.inject.Injector;
import me.xiaopan.android.easy.util.ActivityPool;
| import me.xiaopan.android.easy.inject.DisableInjector;
|
38,688 | package me.xiaopan.android.easy.app;
<BUG>import me.xiaopan.android.easy.inject.DisableInject;
</BUG>
import me.xiaopan.android.easy.inject.Injector;
import android.app.IntentService;
public abstract class EasyIntentService extends IntentService{
| import me.xiaopan.android.easy.inject.DisableInjector;
|
38,689 | import android.app.IntentService;
public abstract class EasyIntentService extends IntentService{
private Injector injector;
public EasyIntentService(String name) {
super(name);
<BUG>if(getClass().getAnnotation(DisableInject.class) == null){
</BUG>
injector = new Injector(this, getBaseContext());
}
if(injector != null){... | if(getClass().getAnnotation(DisableInjector.class) == null){
|
38,690 | package me.xiaopan.android.easy.app;
import java.util.Locale;
<BUG>import me.xiaopan.android.easy.inject.DisableInject;
</BUG>
import me.xiaopan.android.easy.inject.InjectContentView;
import me.xiaopan.android.easy.inject.Injector;
import me.xiaopan.android.easy.util.ActivityPool;
| import me.xiaopan.android.easy.inject.DisableInjector;
|
38,691 | package me.xiaopan.android.easy.app;
<BUG>import me.xiaopan.android.easy.inject.DisableInject;
</BUG>
import me.xiaopan.android.easy.inject.InjectContentView;
import me.xiaopan.android.easy.inject.Injector;
import me.xiaopan.android.easy.util.ActivityUtils;
| import me.xiaopan.android.easy.inject.DisableInjector;
|
38,692 | };
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
<BUG>if(getClass().getAnnotation(DisableInject.class) == null){
</BUG>
injector = new Injector(this);
injector.injectOtherMembers();
}
| if(getClass().getAnnotation(DisableInjector.class) == null){
|
38,693 | package me.xiaopan.android.easy.app;
import java.util.Locale;
<BUG>import me.xiaopan.android.easy.inject.DisableInject;
</BUG>
import me.xiaopan.android.easy.inject.InjectContentView;
import me.xiaopan.android.easy.inject.Injector;
import me.xiaopan.android.easy.util.ActivityPool;
| import me.xiaopan.android.easy.inject.DisableInjector;
|
38,694 | package me.xiaopan.android.easy.app;
import java.util.Locale;
<BUG>import me.xiaopan.android.easy.inject.DisableInject;
</BUG>
import me.xiaopan.android.easy.inject.InjectContentView;
import me.xiaopan.android.easy.inject.Injector;
import me.xiaopan.android.easy.util.ActivityPool;
| import me.xiaopan.android.easy.inject.DisableInjector;
|
38,695 | package me.xiaopan.android.easy.app;
import java.util.Locale;
<BUG>import me.xiaopan.android.easy.inject.DisableInject;
</BUG>
import me.xiaopan.android.easy.inject.InjectContentView;
import me.xiaopan.android.easy.inject.Injector;
import me.xiaopan.android.easy.util.ActivityPool;
| import me.xiaopan.android.easy.inject.DisableInjector;
|
38,696 | package me.xiaopan.android.easy.app;
import java.util.Locale;
<BUG>import me.xiaopan.android.easy.inject.DisableInject;
</BUG>
import me.xiaopan.android.easy.inject.InjectContentView;
import me.xiaopan.android.easy.inject.Injector;
import me.xiaopan.android.easy.util.ActivityPool;
| import me.xiaopan.android.easy.inject.DisableInjector;
|
38,697 | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Set;
import me.xiaopan.android.easy.R;
import me.xiaopan.android.easy.app.EasyActivity;
<BUG>import me.xiaopan.android.easy.inject.DisableInject;
</BUG>
import me.xiaopan.android.easy.inject.Inject;
import me.xiaopan.android.easy.util.PreferenceUtils... | import me.xiaopan.android.easy.inject.DisableInjector;
|
38,698 | import android.view.LayoutInflater;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.TextView;
<BUG>@DisableInject
</BUG>
public class NormalActivity extends EasyActivity {
private TextView textView1;
pri... | @DisableInjector
|
38,699 | package me.xiaopan.android.easy.app;
import java.util.Locale;
<BUG>import me.xiaopan.android.easy.inject.DisableInject;
</BUG>
import me.xiaopan.android.easy.inject.InjectContentView;
import me.xiaopan.android.easy.inject.Injector;
import me.xiaopan.android.easy.util.ActivityPool;
| import me.xiaopan.android.easy.inject.DisableInjector;
|
38,700 | package me.xiaopan.android.easy.app;
<BUG>import me.xiaopan.android.easy.inject.DisableInject;
</BUG>
import me.xiaopan.android.easy.inject.InjectContentView;
import me.xiaopan.android.easy.inject.Injector;
import me.xiaopan.android.easy.util.ActivityUtils;
| import me.xiaopan.android.easy.inject.DisableInjector;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.