id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
38,701 | };
}
@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,702 | 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,703 | 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,704 | public static void validateStateIsFromCurrentMaster(ESLogger logger, DiscoveryNodes currentNodes, ClusterState newClusterState) {
if (currentNodes.masterNodeId() == null) {
return;
}
if (!currentNodes.masterNodeId().equals(newClusterState.nodes().masterNodeId())) {
<BUG>logger.warn("received a cluster state from a diff... | [DELETED] |
38,705 | package org.elasticsearch.discovery.zen;
import org.elasticsearch.cluster.ClusterName;
<BUG>import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.test.ESTestCase;</BUG>
import java.util.Collections;
import java.util.LinkedList;
| import org.elasticsearch.Version;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.transport.DummyTransportAddress;
import org.elasticsearch.common.transport.TransportAddress;
import org.elasticsearch.test.ESTestCase;
|
38,706 | import static org.hamcrest.core.IsNull.nullValue;
public class ZenDiscoveryUnitTest extends ESTestCase {
public void testShouldIgnoreNewClusterState() {
ClusterName clusterName = new ClusterName("abc");
DiscoveryNodes.Builder currentNodes = DiscoveryNodes.builder();
<BUG>currentNodes.masterNodeId("a");
DiscoveryNodes.B... | currentNodes.masterNodeId("a").put(new DiscoveryNode("a", DummyTransportAddress.INSTANCE, Version.CURRENT));
newNodes.masterNodeId("a").put(new DiscoveryNode("a", DummyTransportAddress.INSTANCE, Version.CURRENT));
ClusterState.Builder currentState = ClusterState.builder(clusterName);
|
38,707 | assertFalse("should not ignore, because new state's version is equal to current state's version", shouldIgnoreOrRejectNewClusterState(logger, currentState.build(), newState.build()));
currentState.version(1);
newState.version(2);
assertFalse("should not ignore, because new state's version is higher to current state's v... | currentNodes.masterNodeId("b").put(new DiscoveryNode("b", DummyTransportAddress.INSTANCE, Version.CURRENT));
if (randomBoolean()) {
|
38,708 | public enum ATableViewCellBackgroundStyle { Single, Top, Middle, Bottom };
private ATableView mTableView;
private ATableViewCellBackgroundStyle mCellBackgroundStyle;
private float mStrokeWidth;
private Paint mSeparatorPaint;
<BUG>private Paint mEtchedPaint;
private Paint mBackgroundPaint;</BUG>
private Paint mSelected... | private Paint mTopEtchedPaint;
private Paint mBottomEtchedPaint;
private Paint mBackgroundPaint;
|
38,709 | mTableView.getSeparatorStyle() == ATableViewCellSeparatorStyle.SingleLineEtched) {
int etchedLineColor = res.getColor(R.color.atv_cell_grouped_etched_line);
if (backgroundStyle == ATableViewCellBackgroundStyle.Top) {
etchedLineColor = res.getColor(R.color.atv_cell_grouped_top_cell_etched_line);
}
<BUG>mEtchedPaint = ne... | mTopEtchedPaint = new Paint(getPaint());
mTopEtchedPaint.setColor(etchedLineColor);
mBottomEtchedPaint = new Paint(getPaint());
mBottomEtchedPaint.setColor(etchedLineColor);
|
38,710 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
max... | iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
38,711 | final int lineStride = dst.getScanlineStride();
final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final byte[][] data = dst.getByteDataArrays();
final float[] warpData = new float[2 * dstWidth];
<BUG>int lineOffset = 0;
if (ctable == null) { // source does not have IndexColor... | if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
38,712 | pixelOffset += pixelStride;
} // COLS LOOP
} // ROWS LOOP
}
} else {// source has IndexColorModel
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| } else if (caseB) {
for (int h = 0; h < dstHeight; h++) {
|
38,713 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
max... | iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
38,714 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += l... | if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
38,715 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
max... | iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
38,716 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += l... | if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
38,717 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
max... | iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
38,718 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final int[][] data = dst.getIntDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineS... | if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
38,719 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
max... | iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
38,720 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final float[][] data = dst.getFloatDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += l... | if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
38,721 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
max... | iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
38,722 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final double[][] data = dst.getDoubleDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset +=... | if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
38,723 | 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,724 | 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,725 | 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,726 | 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,727 | 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,728 | 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,729 | String command = null;
String result = null;
Socket socket;
while (continueListenning() && (socket = getSocket()) != null) {
try {
<BUG>time = System.currentTimeMillis();
try {</BUG>
InputStream inputStream = socket.getInputStream();
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "ISO-8859-1")... | InetAddress ipAddress = socket.getInetAddress();
|
38,730 | InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "ISO-8859-1");
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
command = bufferedReader.readLine();
if (command == null) {
command = "DISCONNECTED";
<BUG>} else {
result = AdministrationTCP.this.processCommand(command);
</BU... | Client client = Client.get(ipAddress);
User user = client == null ? null : client.getUser();
result = AdministrationTCP.this.processCommand(user, command);
|
38,731 | } catch (SocketException ex) {
Server.logDebug("interrupted " + getName() + " connection.");
result = "INTERRUPTED\n";
} finally {
socket.close();
<BUG>InetAddress address = socket.getInetAddress();
</BUG>
clearSocket();
Server.logAdministration(
time,
| InetAddress address = ipAddress;
|
38,732 | @SideOnly(Side.CLIENT)
public class GuiSeedAnalyzer extends GuiContainer {
public static final ResourceLocation texture = new ResourceLocation(Reference.MOD_ID, "textures/gui/GuiSeedAnalyzer.png");
public TileEntitySeedAnalyzer seedAnalyzer;
private boolean journalOpen;
<BUG>private GuiJournal guiJournal;
</BUG>
public... | private AgriGuiWrapper guiJournal;
|
38,733 | return;
}
ItemStack journal = seedAnalyzer.getStackInSlot(ContainerSeedAnalyzer.journalSlotId);
if(journal != null) {
journalOpen = true;
<BUG>guiJournal = new GuiJournal(journal);
</BUG>
guiJournal.setWorldAndResolution(this.mc, this.width, this.height);
}
}
| guiJournal = new AgriGuiWrapper(new GuiJournal(journal));
|
38,734 | import net.i2p.router.MessageSelector;
import net.i2p.router.ReplyJob;
import net.i2p.router.Router;
import net.i2p.router.RouterContext;
import net.i2p.router.TunnelInfo;
<BUG>import net.i2p.util.Log;
public class OutboundClientMessageOneShotJob extends JobImpl {</BUG>
private Log _log;
private long _overallExpiration... | import net.i2p.util.SimpleScheduler;
import net.i2p.util.SimpleTimer;
public class OutboundClientMessageOneShotJob extends JobImpl {
|
38,735 | ctx.statManager().createRateStat("client.leaseSetFailedRemoteTime", "How long we tried to look for a remote leaseSet (when we failed)?", "ClientMessages", new long[] { 5*60*1000l, 60*60*1000l, 24*60*60*1000l });
ctx.statManager().createRateStat("client.dispatchPrepareTime", "How long until we've queued up the dispatch ... | _initialized = true;
}
}
long timeoutMs = OVERALL_TIMEOUT_MS_DEFAULT;
|
38,736 | private String hashPair() {
if (_hashPair == null)
_hashPair = _to.calculateHash().toBase64() + _from.calculateHash().toBase64();
return _hashPair;
}
<BUG>private Hash sourceFromHashPair(String s) {
</BUG>
return new Hash(Base64.decode(s.substring(44, 88)));
}
private void clearCaches() {
| private static Hash sourceFromHashPair(String s) {
|
38,737 | if (t != null && t.equals(_outTunnel))
_tunnelCache.remove(key);
}
}
}
<BUG>private void cleanLeaseSetCache(HashMap tc) {
long now = getContext().clock().now();
</BUG>
List deleteList = new ArrayList();
| _backloggedTunnelCache.remove(key);
t = (TunnelInfo) _tunnelCache.get(key);
private static void cleanLeaseSetCache(RouterContext ctx, HashMap tc) {
long now = ctx.clock().now();
|
38,738 | for (Iterator iter = deleteList.iterator(); iter.hasNext(); ) {
String k = (String) iter.next();
tc.remove(k);
}
}
<BUG>private void cleanLeaseCache(HashMap tc) {
</BUG>
List deleteList = new ArrayList();
for (Iterator iter = tc.entrySet().iterator(); iter.hasNext(); ) {
Map.Entry entry = (Map.Entry)iter.next();
| private static void cleanLeaseCache(HashMap tc) {
|
38,739 | for (Iterator iter = deleteList.iterator(); iter.hasNext(); ) {
String k = (String) iter.next();
tc.remove(k);
}
}
<BUG>private void cleanTunnelCache(HashMap tc) {
</BUG>
List deleteList = new ArrayList();
for (Iterator iter = tc.entrySet().iterator(); iter.hasNext(); ) {
Map.Entry entry = (Map.Entry)iter.next();
| private static void cleanLeaseCache(HashMap tc) {
|
38,740 | List deleteList = new ArrayList();
for (Iterator iter = tc.entrySet().iterator(); iter.hasNext(); ) {
Map.Entry entry = (Map.Entry)iter.next();
String k = (String) entry.getKey();
TunnelInfo tunnel = (TunnelInfo) entry.getValue();
<BUG>if (!getContext().tunnelManager().isValidTunnel(sourceFromHashPair(k), tunnel))
</BU... | Lease l = (Lease) entry.getValue();
if (l.isExpired(Router.CLOCK_FUDGE_FACTOR))
|
38,741 | package org.mule.providers.email;
import org.mule.config.i18n.Messages;
import org.mule.providers.AbstractMessageAdapter;
<BUG>import org.mule.umo.MessagingException;
import org.mule.umo.provider.MessageTypeNotSupportedException;</BUG>
import javax.mail.Address;
import javax.mail.Header;
import javax.mail.Message;
| import org.mule.umo.transformer.TransformerException;
import org.mule.umo.provider.MessageTypeNotSupportedException;
|
38,742 | import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Enumeration;
public class MailMessageAdapter extends AbstractMessageAdapter {
<BUG>public static final String PROPERTY_TO_ADDRESSES = "toAddresses";
public static final String PROPERTY_FROM_ADDRESS = "fr... | [DELETED] |
38,743 | return i2;
}
public static String propertiesToString(Map props, boolean newline)
{
StringBuffer buf = new StringBuffer();
<BUG>buf.append("Properties{");
if (newline) {</BUG>
buf.append("\n");
}
Map.Entry entry;
| if(props==null || props.entrySet().size()==0) {
buf.append("none}");
return buf.toString();
if (newline) {
|
38,744 | StringBuilder builder = new StringBuilder();
for (int i = 0; i < length; ++i)
{
builder.append("*");
}
<BUG>WebSocketFrame textFrame = FrameBuilder.text(builder.toString()).asFrame();
</BUG>
Generator generator = new Generator(policy);
ByteBuffer actual = generator.generate(textFrame);
ByteBuffer expected = ByteBuffer.... | WebSocketFrame textFrame = WebSocketFrame.text(builder.toString());
|
38,745 | StringBuilder builder = new StringBuilder();
for (int i = 0; i < length; ++i)
{
builder.append("*");
}
<BUG>WebSocketFrame textFrame = FrameBuilder.text(builder.toString()).asFrame();
</BUG>
Generator generator = new Generator(policy);
ByteBuffer actual = generator.generate(textFrame);
ByteBuffer expected = ByteBuffer.... | WebSocketFrame textFrame = WebSocketFrame.text(builder.toString());
|
38,746 | StringBuilder builder = new StringBuilder();
for (int i = 0; i < length; ++i)
{
builder.append("*");
}
<BUG>WebSocketFrame textFrame = FrameBuilder.text(builder.toString()).asFrame();
</BUG>
Generator generator = new Generator(policy);
ByteBuffer actual = generator.generate(textFrame);
ByteBuffer expected = ByteBuffer.... | WebSocketFrame textFrame = WebSocketFrame.text(builder.toString());
|
38,747 | StringBuilder builder = new StringBuilder();
for (int i = 0; i < length; ++i)
{
builder.append("*");
}
<BUG>WebSocketFrame textFrame = FrameBuilder.text(builder.toString()).asFrame();
</BUG>
Generator generator = new Generator(policy);
ByteBuffer actual = generator.generate(textFrame);
ByteBuffer expected = ByteBuffer.... | WebSocketFrame textFrame = WebSocketFrame.text(builder.toString());
|
38,748 | for ( int i = 0 ; i < length ; ++i)
{
bb.put("*".getBytes());
}
bb.flip();
<BUG>WebSocketFrame binaryFrame = FrameBuilder.binary(BufferUtil.toArray(bb)).asFrame();
</BUG>
Generator generator = new Generator(policy);
ByteBuffer actual = generator.generate(binaryFrame);
ByteBuffer expected = ByteBuffer.allocate(length + ... | WebSocketFrame binaryFrame = WebSocketFrame.binary(BufferUtil.toArray(bb));
|
38,749 | for ( int i = 0 ; i < length ; ++i)
{
bb.put("*".getBytes());
}
bb.flip();
<BUG>WebSocketFrame binaryFrame = FrameBuilder.binary(BufferUtil.toArray(bb)).asFrame();
</BUG>
Generator generator = new Generator(policy);
ByteBuffer actual = generator.generate(binaryFrame);
ByteBuffer expected = ByteBuffer.allocate(length + ... | WebSocketFrame binaryFrame = WebSocketFrame.binary(BufferUtil.toArray(bb));
|
38,750 | for ( int i = 0 ; i < length ; ++i)
{
bb.put("*".getBytes());
}
bb.flip();
<BUG>WebSocketFrame binaryFrame = FrameBuilder.binary(BufferUtil.toArray(bb)).asFrame();
</BUG>
Generator generator = new Generator(policy);
ByteBuffer actual = generator.generate(binaryFrame);
ByteBuffer expected = ByteBuffer.allocate(length + ... | WebSocketFrame binaryFrame = WebSocketFrame.binary(BufferUtil.toArray(bb));
|
38,751 | for ( int i = 0 ; i < length ; ++i)
{
bb.put("*".getBytes());
}
bb.flip();
<BUG>WebSocketFrame binaryFrame = FrameBuilder.binary(BufferUtil.toArray(bb)).asFrame();
</BUG>
Generator generator = new Generator(policy);
ByteBuffer actual = generator.generate(binaryFrame);
ByteBuffer expected = ByteBuffer.allocate(length + ... | WebSocketFrame binaryFrame = WebSocketFrame.binary(BufferUtil.toArray(bb));
|
38,752 | {
return new WebSocketFrame(OpCode.BINARY).setPayload(buf);
<BUG>}
public static WebSocketFrame binary()
{
return new WebSocketFrame(OpCode.BINARY);</BUG>
}
public static WebSocketFrame text()
{
return new WebSocketFrame(OpCode.TEXT);
| public static final int MAX_CONTROL_PAYLOAD = 125;
return new WebSocketFrame(OpCode.BINARY);
public static WebSocketFrame binary(byte buf[])
|
38,753 | else if (t == ANY_CYPHER_OPTION) {
r = AnyCypherOption(b, 0);
}
else if (t == ANY_FUNCTION_INVOCATION) {
r = AnyFunctionInvocation(b, 0);
<BUG>}
else if (t == BULK_IMPORT_QUERY) {</BUG>
r = BulkImportQuery(b, 0);
}
else if (t == CALL) {
| else if (t == ARRAY) {
r = Array(b, 0);
else if (t == BULK_IMPORT_QUERY) {
|
38,754 | if (!r) r = MapLiteral(b, l + 1);
if (!r) r = MapProjection(b, l + 1);
if (!r) r = CountStar(b, l + 1);
if (!r) r = ListComprehension(b, l + 1);
if (!r) r = PatternComprehension(b, l + 1);
<BUG>if (!r) r = Expression1_12(b, l + 1);
if (!r) r = FilterFunctionInvocation(b, l + 1);</BUG>
if (!r) r = ExtractFunctionInvocat... | if (!r) r = Array(b, l + 1);
if (!r) r = FilterFunctionInvocation(b, l + 1);
|
38,755 | package org.wordpress.android.util;
<BUG>import android.content.Context;
import android.text.TextUtils;</BUG>
import android.util.Log;
import java.io.PrintWriter;
import java.io.StringWriter;
| import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.text.TextUtils;
|
38,756 | canvas.drawOval(rectF, paint);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
canvas.drawBitmap(bitmap, rect, rect, paint);
return output;
}
<BUG>public static Bitmap getRoundedEdgeBitmap(final Bitmap bitmap, int radius) {
</BUG>
if (bitmap == null) {
return null;
}
| public static Bitmap getRoundedEdgeBitmap(final Bitmap bitmap, int radius, int borderColor) {
|
38,757 | if (TextUtils.isEmpty(imageUrl)) {
return "";
}
int schemePos = imageUrl.indexOf("://");
if (schemePos == -1) {
<BUG>return imageUrl;
}</BUG>
imageUrl = UrlUtils.removeQuery(imageUrl);
if (isMshotsUrl(imageUrl)) {
return imageUrl + "?w=" + width + "&h=" + height;
| int fragmentPos = imageUrl.indexOf("#");
if (fragmentPos > 0) {
imageUrl = imageUrl.substring(0, fragmentPos);
|
38,758 | String decodedModel = prop.getProperty(undecodedModel.replaceAll(" ", "_"));
if (decodedModel != null && !decodedModel.trim().equals("")) {
model = decodedModel;
}
} catch (IOException e) {
<BUG>AppLog.e(T.UTILS, e.getMessage());
}</BUG>
if (model == null) { //Device model not found in the list
if (undecodedModel.star... | AppLog.e(T.UTILS, "Can't read `android_models.properties` file from assets, or it's in the wrong form.", e);
AppLog.d(T.UTILS, "If you need more info about the file, please check the reference implementation available " +
"here: https://github.com/wordpress-mobile/WordPress-Android/blob/dd989429bd701a66bcba911de08f2e8d... |
38,759 | String[] proj = { MediaStore.Video.Media._ID };
Uri contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
String sortOrder = MediaStore.Video.VideoColumns.DATE_TAKEN + " DESC";
CursorLoader loader = new CursorLoader(activity, contentUri, proj, null, null, sortOrder);
Cursor cursor = loader.loadInBackground();
<BUG>... | long value = cursor.getLong(0);
SqlUtils.closeCursor(cursor);
return Uri.parse(contentUri.toString() + "/" + value);
|
38,760 | package org.wordpress.android.util.helpers;
import android.text.Editable;
import android.text.Html;
import android.text.style.BulletSpan;
import android.text.style.LeadingMarginSpan;
<BUG>import org.xml.sax.XMLReader;
import java.util.Vector;
public class WPHtmlTagHandler implements Html.TagHandler {
private int mList... | import java.util.ArrayList;
import java.util.List;
private static final int SPAN_INDENT_WIDTH = 15;
private List<String> mListParents = new ArrayList<>();
|
38,761 | private int mListItemCount = 0;
private Vector<String> mListParents = new Vector<String>();
</BUG>
@Override
public void handleTag(final boolean opening, final String tag, Editable output,
<BUG>final XMLReader xmlReader) {
if (tag.equals("ul") || tag.equals("ol") || tag.equals("dd")) {</BUG>
if (opening) {
mListParents... | private List<String> mListParents = new ArrayList<>();
if (tag != null) {
if (tag.equals("ul") || tag.equals("ol") || tag.equals("dd")) {
|
38,762 | }
mListItemCount = 0;
} else if (tag.equals("li") && !opening) {
handleListTag(output);
}
<BUG>}
private void handleListTag(Editable output) {
if (mListParents.lastElement().equals("ul")) {
output.append("\n");</BUG>
String[] split = output.toString().split("\n");
| int size = mListParents.size();
if (size > 0 && output != null) {
if ("ul".equals(mListParents.get(size - 1))) {
output.append("\n");
|
38,763 | int start = 0;
if (split.length != 1) {
int lastIndex = split.length - 1;
start = output.length() - split[lastIndex].length() - 1;
}
<BUG>output.setSpan(new BulletSpan(15 * mListParents.size()), start, output.length(), 0);
} else if (mListParents.lastElement().equals("ol")) {
mListItemCount++;</BUG>
output.append("\n"... | output.setSpan(new BulletSpan(SPAN_INDENT_WIDTH * mListParents.size()), start, output.length(), 0);
} else if ("ol".equals(mListParents.get(size - 1))) {
mListItemCount++;
|
38,764 | 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,765 | 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,766 | } 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,767 |
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,768 | 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,769 | 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,770 | 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,771 | for (PackageIndex index : packageIndices) {
for (Package pkg : index.getPackages()) {
for (ArduinoPlatform curPlatform : pkg.getInstalledPlatforms()) {
if (architecture.equalsIgnoreCase(curPlatform.getArchitecture())
&& (vendor.equalsIgnoreCase(pkg.getMaintainer()))) {
<BUG>ArduinoPlatform latestPlatform = pkg.getLates... | Package pkg = index.getPackage(packageName);
if (pkg != null) {
ArduinoPlatform platform = pkg.getLatestPlatform(platformName);
if (platform != null) {
Board board = platform.getBoard(boardName);
if (board != null) {
return board;
|
38,772 | createMarker( res,
t.getMessage(),
-1 );
}
return false;
<BUG>} else if ( res instanceof IFile && "xls".equals( res.getFileExtension() ) ) {
removeProblemsFor( res );</BUG>
try {
if ( clean ) {
DroolsEclipsePlugin.getDefault().invalidateResource( res );
| } else if ( "xls".equals( fileExtension ) ) {
removeProblemsFor( res );
|
38,773 | createMarker( res,
t.getMessage(),
-1 );
}
return false;
<BUG>} else if ( res instanceof IFile && "csv".equals( res.getFileExtension() ) ) {
removeProblemsFor( res );</BUG>
try {
if ( clean ) {
DroolsEclipsePlugin.getDefault().invalidateResource( res );
| } else if ( "xls".equals( fileExtension ) ) {
removeProblemsFor( res );
|
38,774 | createMarker( res,
t.getMessage(),
-1 );
}
return false;
<BUG>} else if ( res instanceof IFile && "rf".equals( res.getFileExtension() ) ) {
removeProblemsFor( res );</BUG>
try {
if ( clean ) {
DroolsEclipsePlugin.getDefault().invalidateResource( res );
| } else if ( "xls".equals( fileExtension ) ) {
removeProblemsFor( res );
|
38,775 | createMarker( res,
t.getMessage(),
-1 );
}
return false;
<BUG>} else if ( res instanceof IFile && ("bpmn".equals( res.getFileExtension() )
|| "bpmn2".equals( res.getFileExtension() )) ) {
</BUG>
removeProblemsFor( res );
try {
| } else if ( "xls".equals( fileExtension ) ) {
|
38,776 | import betterquesting.api.misc.IDataSync;
import betterquesting.api.misc.IJsonSaveLoad;
import betterquesting.api.questing.party.IParty;
import com.google.gson.JsonObject;
public interface ILifeDatabase extends IJsonSaveLoad<JsonObject>, IDataSync
<BUG>{
public int getDefaultLives();
public int getMaxLives();</BUG>
pub... | @Deprecated
@Deprecated
public int getMaxLives();
|
38,777 | import com.google.gson.JsonObject;
public class GuiRewardEditDefault extends GuiScreenThemed
</BUG>
{
<BUG>public final IReward reward;
public final JsonObject json;
public boolean isDone = false;
public GuiRewardEditDefault(GuiScreen parent, IReward reward)
</BUG>
{
| public class GuiRewardEditDefault extends GuiScreenThemed implements ICallback<JsonObject>
private final IQuest quest;
private final int qID;
private final int rID;
private final JsonObject json;
private boolean isDone = false;
public GuiRewardEditDefault(GuiScreen parent, IQuest quest, IReward reward)
|
38,778 | this.drawTooltip(tTip, mx, my);
}
}
@Override
public void actionPerformed(GuiButton button)
<BUG>{
super.actionPerformed(button);
if(button.id == 0 && callback != null)
{
callback.setValue(stackSelect);
}</BUG>
}
| [DELETED] |
38,779 | this.buttonList.add(btnClaim);
refreshEmbedded();
}
@Override
public void drawBackPanel(int mx, int my, float partialTick)
<BUG>{
super.drawBackPanel(mx, my, partialTick);RenderUtils.DrawLine(this.guiLeft + sizeX/2, this.guiTop + 32, this.guiLeft + sizeX/2, this.guiTop + sizeY - 24, 1, getTextColor());
if(selTask != nu... | super.drawBackPanel(mx, my, partialTick);
if(selTask != null)
|
38,780 | public static final IPropertyType<EnumQuestVisibility> VISIBILITY = new PropertyTypeEnum<EnumQuestVisibility>(new ResourceLocation("betterquesting:visibility"), EnumQuestVisibility.NORMAL);
public static final IPropertyType<EnumLogic> LOGIC_TASK = new PropertyTypeEnum<EnumLogic>(new ResourceLocation("betterquesting:tas... | public static final IPropertyType<String> SOUND_UNLOCK = new PropertyTypeString(new ResourceLocation("betterquesting:snd_unlock"), "minecraft:ui.button.click");
public static final IPropertyType<String> SOUND_UPDATE = new PropertyTypeString(new ResourceLocation("betterquesting:snd_update"), "minecraft:entity.player.lev... |
38,781 | package org.apache.solr.handler.dataimport;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;
import javax.naming.NamingException;
<BUG>import javax.naming.spi.InitialContextFactory;
import org.easymock.EasyMock;
import org.easymock.IAnswer;
import org.easymock.IMocksControl;</BUG>
public clas... | import static org.mockito.Mockito.*;
|
38,782 | startupScripts.add(parseScript(subElement));
} else if ("shutdown-cql".equals(name)) {
shutdownScripts.add(parseScript(subElement));
}
}
<BUG>if (poolingOptionsBuilder != null) {
builder.addPropertyValue("poolingOptions", getSourceBeanDefinition(poolingOptionsBuilder, context, element));
}
builder.addPropertyValue("key... | builder.addPropertyValue("keyspaceSpecifications", newKeyspaceSetFlattenerBeanDefinition(
element, parserContext, keyspaceActionSpecificationBeanDefinitions));
builder.addPropertyValue("poolingOptions", getSourceBeanDefinition(
poolingOptionsBuilder, parserContext, element));
|
38,783 | ManagedList<String> networkTopologyReplicationFactors = new ManagedList<String>();
if (element != null) {
addOptionalPropertyValue(builder, "replicationStrategy", element, "class",
KeyspaceAttributes.DEFAULT_REPLICATION_STRATEGY.name());
<BUG>addOptionalPropertyValue(builder, "replicationFactor", element, "replication-... | addOptionalPropertyValue(builder, "replicationFactor", element, "replication-factor",
String.valueOf(KeyspaceAttributes.DEFAULT_REPLICATION_FACTOR));
for (Element dataCenter : DomUtils.getChildElementsByTagName(element, "data-center")) {
|
38,784 | import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
<BUG>public class ParsingUtils {
public static void addOptionalPropertyValue(BeanDefinitionBuilder builder, String proper... | public abstract class ParsingUtils {
public static void addOptionalPropertyReference(BeanDefinitionBuilder builder, String propertyName, Attr attribute) {
addProperty(builder, propertyName, attribute.getValue(), null, false, true);
public static void addOptionalPropertyReference(BeanDefinitionBuilder builder, String pr... |
38,785 |
String attrName, String defaultValue, boolean required) {
addProperty(builder, propertyName, element.getAttribute(attrName), defaultValue, required, true);</BUG>
}
<BUG>public static void addProperty(BeanDefinitionBuilder builder, String propertyName, Element element, String attrName,
String defaultValue, boolean req... | import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
public abstract class ParsingUtils {
public static void addOptionalPropertyReference(BeanDefinitionBuilder builder, String... |
38,786 | builder.addPropertyReference(propertyName, value);
} else {
builder.addPropertyValue(propertyName, value);
}
<BUG>}
public static AbstractBeanDefinition getSourceBeanDefinition(BeanDefinitionBuilder builder, ParserContext context,
Element element) {
Assert.notNull(element, "Element must not be null!");
Assert.notNull(c... | return builder;
public static AbstractBeanDefinition getSourceBeanDefinition(BeanDefinitionBuilder builder,
ParserContext parserContext, Element element) {
Assert.notNull(parserContext, "ParserContext must not be null");
return getSourceBeanDefinition(builder, parserContext.extractSource(element));
|
38,787 | package com.github.masahirosuzuka.PhoneGapIntelliJPlugin;
<BUG>import com.github.masahirosuzuka.PhoneGapIntelliJPlugin.util.PhoneGapSettings;
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
import com.in... | import com.github.masahirosuzuka.PhoneGapIntelliJPlugin.commandLine.PhoneGapCommandLine;
import com.intellij.execution.configurations.PathEnvironmentVariableUtil;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.search.FilenameIndex;
import com.intellij.p... |
38,788 | String message = "Platform " + trimmedPlatform + " already added";
if (output.getExitCode() != 0 && (contains(output.getStderr(), message) || contains(output.getStdout(), message))) {
return new ProcessOutput(0);
}
return output;
<BUG>}
public ProcessOutput build(@NotNull String platform) throws ExecutionException {
St... | [DELETED] |
38,789 | import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class PhoneGapRunConfiguration extends LocatableConfigurationBase {
@Nullable
public String myExecutable;
<BUG>@Nullable
public String myCommand;</BUG>
@Nullable
public String getCommand() {
return myCommand;
| public String myWorkDir;
public String myCommand;
|
38,790 | versionsToKeep = (maxVersion - maxVersionByTime);
} else {
versionsToKeep = Math.min(versionsToKeep, (maxVersion - maxVersionByTime));
}
}
<BUG>}
if ((maxVersion - versionsToKeep) <= 0) {
</BUG>
internalCleanup(dbc, resource);
return 0;
| int structureVersions = 0;
conn = m_sqlManager.getConnection(dbc);
if (!noHistoryStructure) {
if (((maxVersion - versionsToKeep) <= 0)) {
|
38,791 | if (res.wasNull()) {
minResPublishTagToKeep = Integer.MAX_VALUE;
}
while (res.next()) {
}
<BUG>} else {
m_sqlManager.closeAll(dbc, conn, stmt, res);
internalCleanup(dbc, resource);
return structureVersions;</BUG>
}
| [DELETED] |
38,792 | package com.cronutils.model.time.generator;
import java.util.Collections;
<BUG>import java.util.List;
import org.apache.commons.lang3.Validate;</BUG>
import com.cronutils.model.field.CronField;
import com.cronutils.model.field.expression.FieldExpression;
public abstract class FieldValueGenerator {
| import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.Validate;
|
38,793 | import java.util.ResourceBundle;
import java.util.function.Function;</BUG>
class DescriptionStrategyFactory {
private DescriptionStrategyFactory() {}
public static DescriptionStrategy daysOfWeekInstance(final ResourceBundle bundle, final FieldExpression expression) {
<BUG>final Function<Integer, String> nominal = integ... | import java.util.function.Function;
import com.cronutils.model.field.expression.FieldExpression;
import com.cronutils.model.field.expression.On;
final Function<Integer, String> nominal = integer -> DayOfWeek.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale());
|
38,794 | return dom;
}
public static DescriptionStrategy monthsInstance(final ResourceBundle bundle, final FieldExpression expression) {
return new NominalDescriptionStrategy(
bundle,
<BUG>integer -> new DateTime().withMonthOfYear(integer).monthOfYear().getAsText(bundle.getLocale()),
expression</BUG>
);
}
public static Descript... | integer -> Month.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale()),
expression
|
38,795 | <BUG>package com.cronutils.model.time.generator;
import com.cronutils.mapper.WeekDay;</BUG>
import com.cronutils.model.field.CronField;
import com.cronutils.model.field.CronFieldName;
import com.cronutils.model.field.constraint.FieldConstraintsBuilder;
| import java.time.LocalDate;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang3.Validate;
import com.cronutils.mapper.WeekDay;
|
38,796 | import com.cronutils.model.field.expression.Between;
import com.cronutils.model.field.expression.FieldExpression;
import com.cronutils.parser.CronParserField;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
<BUG>import org.apache.commons.lang3.Validate;
import org.joda.time.DateTime;
impo... | [DELETED] |
38,797 | <BUG>package com.cronutils.model.time.generator;
import com.cronutils.model.field.CronField;</BUG>
import com.cronutils.model.field.CronFieldName;
import com.cronutils.model.field.expression.FieldExpression;
import com.cronutils.model.field.expression.On;
| import java.time.DayOfWeek;
import java.time.LocalDate;
import java.util.List;
import org.apache.commons.lang3.Validate;
import com.cronutils.model.field.CronField;
|
38,798 | import com.cronutils.model.field.CronField;</BUG>
import com.cronutils.model.field.CronFieldName;
import com.cronutils.model.field.expression.FieldExpression;
import com.cronutils.model.field.expression.On;
import com.google.common.collect.Lists;
<BUG>import org.apache.commons.lang3.Validate;
import org.joda.time.DateT... | package com.cronutils.model.time.generator;
import java.time.DayOfWeek;
import java.time.LocalDate;
import java.util.List;
import com.cronutils.model.field.CronField;
|
38,799 | class OnDayOfMonthValueGenerator extends FieldValueGenerator {
private int year;
private int month;
public OnDayOfMonthValueGenerator(CronField cronField, int year, int month) {
super(cronField);
<BUG>Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of month");
... | Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of" +
" month");
this.year = year;
|
38,800 | package com.cronutils.mapper;
public class ConstantsMapper {
private ConstantsMapper() {}
public static final WeekDay QUARTZ_WEEK_DAY = new WeekDay(2, false);
<BUG>public static final WeekDay JODATIME_WEEK_DAY = new WeekDay(1, false);
</BUG>
public static final WeekDay CRONTAB_WEEK_DAY = new WeekDay(1, true);
public st... | public static final WeekDay JAVA8 = new WeekDay(1, false);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.