id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
7,701 | + "<http:body media-type='text/plain'>"
+ "Part3" + "</http:body>" + "</http:multipart>"
+ "</http:request>";
final DBNode dbNode1 = new DBNode(new IOContent(multiReq));
final HttpRequestParser rp = new HttpRequestParser(null);
<BUG>final HttpRequest r = rp.parse(dbNode1.children().next(), null);
assertEquals(2, r.attributes.size());</BUG>
assertEquals(2, r.headers.size());
assertTrue(r.isMultipart);
assertEquals(3, r.parts.size());
| final HttpRequest r = rp.parse(dbNode1.children().next());
assertEquals(2, r.attributes.size());
|
7,702 | falseReqs.add(falseReq8);
for(final byte[] falseReq : falseReqs) {
final DBNode dbNode = new DBNode(new IOContent(falseReq));
try {
final HttpRequestParser rp = new HttpRequestParser(null);
<BUG>rp.parse(dbNode.children().next(), null);
fail("Exception not thrown");</BUG>
} catch (final QueryException ex) {
assertTrue(ex.getMessage().contains(ErrType.HC.toString()));
}
| rp.parse(dbNode.children().next());
fail("Exception not thrown");
|
7,703 | req1.bodyContent.add(Str.get("<b>b</b>"));
HttpClient.setRequestContent(fakeConn1.getOutputStream(), req1);
assertEquals("<a>a</a><b>b</b>", fakeConn1.out.toString(Strings.UTF8));
final HttpRequest req2 = new HttpRequest();
final FakeHttpConnection fakeConn2 = new FakeHttpConnection(new URL("http://www.test.com"));
<BUG>req2.payloadAttrs.put(SerializerOptions.MEDIA_TYPE.name(), "text/plain");
final FElem e2 = new FElem("a").add("a");</BUG>
req2.bodyContent.add(e2);
req2.bodyContent.add(Str.get("<b>b</b>"));
HttpClient.setRequestContent(fakeConn2.getOutputStream(), req2);
| req2.payloadAtts.put(SerializerOptions.MEDIA_TYPE.name(), "text/plain");
final FElem e2 = new FElem("a").add("a");
|
7,704 | req2.bodyContent.add(Str.get("<b>b</b>"));
HttpClient.setRequestContent(fakeConn2.getOutputStream(), req2);
assertEquals("a<b>b</b>", fakeConn2.out.toString());
final HttpRequest req3 = new HttpRequest();
final FakeHttpConnection fakeConn3 = new FakeHttpConnection(new URL("http://www.test.com"));
<BUG>req3.payloadAttrs.put(SerializerOptions.MEDIA_TYPE.name(), "text/xml");
req3.payloadAttrs.put("method", "text");
final FElem e3 = new FElem("a").add("a");</BUG>
req3.bodyContent.add(e3);
req3.bodyContent.add(Str.get("<b>b</b>"));
| req3.payloadAtts.put(SerializerOptions.MEDIA_TYPE.name(), "text/xml");
req3.payloadAtts.put("method", "text");
final FElem e3 = new FElem("a").add("a");
|
7,705 | assertEquals("a<b>b</b>", fakeConn3.out.toString());
}
@Test
public void writeBase64() throws IOException {
final HttpRequest req1 = new HttpRequest();
<BUG>req1.payloadAttrs.put("method", SerialMethod.BASEX.toString());
req1.bodyContent.add(new B64(token("test")));</BUG>
final FakeHttpConnection fakeConn1 = new FakeHttpConnection(new URL("http://www.test.com"));
HttpClient.setRequestContent(fakeConn1.getOutputStream(), req1);
assertEquals(fakeConn1.out.toString(Strings.UTF8), "test");
| req1.payloadAtts.put("method", SerialMethod.BASEX.toString());
req1.bodyContent.add(new B64(token("test")));
|
7,706 | assertEquals("<a>test</a>", fakeConn2.out.toString());
}
@Test
public void writeHex() throws IOException {
final HttpRequest req1 = new HttpRequest();
<BUG>req1.payloadAttrs.put("method", SerialMethod.BASEX.toString());
req1.bodyContent.add(new Hex(token("test")));</BUG>
final FakeHttpConnection fakeConn1 = new FakeHttpConnection(new URL("http://www.test.com"));
HttpClient.setRequestContent(fakeConn1.getOutputStream(), req1);
assertEquals(fakeConn1.out.toString(Strings.UTF8), "test");
| req1.payloadAtts.put("method", SerialMethod.BASEX.toString());
req1.bodyContent.add(new Hex(token("test")));
|
7,707 | public void responseWithCharset() throws IOException, QueryException {
final FakeHttpConnection conn = new FakeHttpConnection(new URL("http://www.test.com"));
conn.contentType = "text/plain; charset=CP1251";
final String test = "\u0442\u0435\u0441\u0442";
conn.content = Charset.forName("CP1251").encode(test).array();
<BUG>final ItemList res = new HttpResponse(null, ctx.options).getResponse(conn, true, null);
assertEquals(test, string(res.get(1).string(null)));
</BUG>
}
| final Value res = new HttpResponse(null, ctx.options).getResponse(conn, true, null);
assertEquals(test, string(res.itemAt(1).string(null)));
|
7,708 | + "...plain text...." + CRLF + CRLF
+ "--boundary42" + CRLF + "Content-Type: text/richtext" + CRLF + CRLF
+ ".... richtext..." + CRLF
+ "--boundary42" + CRLF + "Content-Type: text/x-whatever" + CRLF + CRLF
+ ".... fanciest formatted version " + CRLF + "..." + CRLF + "--boundary42--");
<BUG>final ItemList returned = new HttpResponse(null, ctx.options).getResponse(conn, true, null);
final ItemList expected = new ItemList();
final String response = "<http:response "</BUG>
+ "xmlns:http='http://expath.org/ns/http-client' "
| final Value returned = new HttpResponse(null, ctx.options).getResponse(conn, true, null);
final ValueBuilder expected = new ValueBuilder();
final String response = "<http:response "
|
7,709 | + "</http:multipart>" + "</http:response> ";
expected.add(new DBNode(new IOContent(response)).children().next());
expected.add(Str.get("...plain text....\n\n"));
expected.add(Str.get(".... richtext...\n"));
expected.add(Str.get(".... fanciest formatted version \n...\n"));
<BUG>compare(expected, returned);
</BUG>
}
@Test
public void multipartRespPreamble() throws Exception {
| compare(expected.value(), returned);
|
7,710 | + "Content-type: text/plain; charset=us-ascii" + CRLF + CRLF
+ "This is explicitly typed plain ASCII text." + CRLF
+ "It DOES end with a linebreak." + CRLF
+ CRLF + "--simple boundary--" + CRLF
+ "This is the epilogue. It is also to be ignored.");
<BUG>final ItemList returned = new HttpResponse(null, ctx.options).getResponse(conn, true, null);
final ItemList expected = new ItemList();
final String response = "<http:response "</BUG>
+ "xmlns:http='http://expath.org/ns/http-client' "
| final Value returned = new HttpResponse(null, ctx.options).getResponse(conn, true, null);
final ValueBuilder expected = new ValueBuilder();
final String response = "<http:response "
|
7,711 | package org.basex.query.func.http;
import org.basex.query.*;
import org.basex.query.func.*;
import org.basex.query.iter.*;
<BUG>import org.basex.query.util.list.*;
</BUG>
import org.basex.query.value.item.*;
import org.basex.query.value.node.*;
import org.basex.util.http.*;
| import org.basex.query.value.*;
|
7,712 | final ANode request = toEmptyNode(exprs[0], qc);
final byte[] href = exprs.length >= 2 ? toEmptyToken(exprs[1], qc) : null;
Iter iter = null;
if(exprs.length == 3) {
final Iter bodies = exprs[2].iter(qc);
<BUG>final ItemList cache = new ItemList();
for(Item body; (body = bodies.next()) != null;) cache.add(body);
iter = cache.iter();
</BUG>
}
| final ValueBuilder cache = new ValueBuilder();
iter = cache.value().iter();
|
7,713 | import org.spongepowered.api.world.Locatable;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;
import javax.annotation.Nullable;
import java.util.List;
<BUG>import java.util.Optional;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG>
public class CommandDelete extends FCCommandBase {
private static final FlagMapper MAPPER = map -> key -> value -> {
map.put(key, value);
| import java.util.stream.Stream;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
|
7,714 | .append(Text.of(TextColors.GREEN, "Usage: "))
.append(getUsage(source))
.build());
return CommandResult.empty();
} else if (isIn(REGIONS_ALIASES, parse.args[0])) {
<BUG>if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!"));
IRegion region = FGManager.getInstance().getRegion(parse.args[1]);
</BUG>
boolean isWorldRegion = false;
if (region == null) {
| String regionName = parse.args[1];
IRegion region = FGManager.getInstance().getRegion(regionName).orElse(null);
|
7,715 | </BUG>
isWorldRegion = true;
}
if (region == null)
<BUG>throw new CommandException(Text.of("No region exists with the name \"" + parse.args[1] + "\"!"));
if (region instanceof GlobalWorldRegion) {
</BUG>
throw new CommandException(Text.of("You may not delete the global region!"));
}
| if (world == null)
throw new CommandException(Text.of("No world exists with name \"" + worldName + "\"!"));
if (world == null) throw new CommandException(Text.of("Must specify a world!"));
region = FGManager.getInstance().getWorldRegion(world, regionName).orElse(null);
throw new CommandException(Text.of("No region exists with the name \"" + regionName + "\"!"));
if (region instanceof IGlobal) {
|
7,716 | source.getName() + " deleted " + (isWorldRegion ? "world" : "") + "region"
);
return CommandResult.success();
} else if (isIn(HANDLERS_ALIASES, parse.args[0])) {
if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!"));
<BUG>IHandler handler = FGManager.getInstance().gethandler(parse.args[1]);
if (handler == null)
throw new ArgumentParseException(Text.of("No handler exists with that name!"), parse.args[1], 1);
if (handler instanceof GlobalHandler)</BUG>
throw new CommandException(Text.of("You may not delete the global handler!"));
| Optional<IHandler> handlerOpt = FGManager.getInstance().gethandler(parse.args[1]);
if (!handlerOpt.isPresent())
IHandler handler = handlerOpt.get();
if (handler instanceof GlobalHandler)
|
7,717 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
else if (parse.current.index == 1) {
| return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
7,718 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
else if (parse.current.index == 1) {
| return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
7,719 | @Dependency(id = "foxcore")
},
description = "A world protection plugin built for SpongeAPI. Requires FoxCore.",
authors = {"gravityfox"},
url = "https://github.com/FoxDenStudio/FoxGuard")
<BUG>public final class FoxGuardMain {
public final Cause pluginCause = Cause.builder().named("plugin", this).build();
private static FoxGuardMain instanceField;</BUG>
@Inject
private Logger logger;
| private static FoxGuardMain instanceField;
|
7,720 | private UserStorageService userStorage;
private EconomyService economyService = null;
private boolean loaded = false;
private FCCommandDispatcher fgDispatcher;
public static FoxGuardMain instance() {
<BUG>return instanceField;
}</BUG>
@Listener
public void construct(GameConstructionEvent event) {
instanceField = this;
| }
public static Cause getCause() {
return instance().pluginCause;
}
|
7,721 | return configDirectory;
}
public boolean isLoaded() {
return loaded;
}
<BUG>public static Cause getCause() {
return instance().pluginCause;
}</BUG>
public EconomyService getEconomyService() {
return economyService;
| [DELETED] |
7,722 | import org.spongepowered.api.world.Locatable;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;
import javax.annotation.Nullable;
import java.util.*;
<BUG>import java.util.stream.Collectors;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG>
public class CommandHere extends FCCommandBase {
private static final String[] PRIORITY_ALIASES = {"priority", "prio", "p"};
private static final FlagMapper MAPPER = map -> key -> value -> {
| import java.util.stream.Stream;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
|
7,723 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
else if (parse.current.index > 0) {
| return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
7,724 | private static FGStorageManager instance;
private final Logger logger = FoxGuardMain.instance().getLogger();</BUG>
private final Set<LoadEntry> loaded = new HashSet<>();
private final Path directory = getDirectory();
private final Map<String, Path> worldDirectories;
<BUG>private FGStorageManager() {
defaultModifiedMap = new CacheMap<>((k, m) -> {</BUG>
if (k instanceof IFGObject) {
m.put((IFGObject) k, true);
return true;
| public final HashMap<IFGObject, Boolean> defaultModifiedMap;
private final UserStorageService userStorageService;
private final Logger logger = FoxGuardMain.instance().getLogger();
userStorageService = FoxGuardMain.instance().getUserStorage();
defaultModifiedMap = new CacheMap<>((k, m) -> {
|
7,725 | String name = fgObject.getName();
Path singleDir = dir.resolve(name.toLowerCase());
</BUG>
boolean shouldSave = fgObject.shouldSave();
if (force || shouldSave) {
<BUG>logger.info((shouldSave ? "S" : "Force s") + "aving handler \"" + name + "\" in directory: " + singleDir);
</BUG>
constructDirectory(singleDir);
try {
fgObject.save(singleDir);
| UUID owner = fgObject.getOwner();
boolean isOwned = !owner.equals(SERVER_UUID);
Optional<User> userOwner = userStorageService.get(owner);
String logName = (userOwner.isPresent() ? userOwner.get().getName() + ":" : "") + (isOwned ? owner + ":" : "") + name;
if (fgObject.autoSave()) {
Path singleDir = serverDir.resolve(name.toLowerCase());
logger.info((shouldSave ? "S" : "Force s") + "aving handler " + logName + " in directory: " + singleDir);
|
7,726 | if (fgObject.autoSave()) {
Path singleDir = dir.resolve(name.toLowerCase());
</BUG>
boolean shouldSave = fgObject.shouldSave();
if (force || shouldSave) {
<BUG>logger.info((shouldSave ? "S" : "Force s") + "aving world region \"" + name + "\" in directory: " + singleDir);
</BUG>
constructDirectory(singleDir);
try {
fgObject.save(singleDir);
| Path singleDir = serverDir.resolve(name.toLowerCase());
logger.info((shouldSave ? "S" : "Force s") + "aving world region " + logName + " in directory: " + singleDir);
|
7,727 | public synchronized void loadRegionLinks() {
logger.info("Loading region links");
try (DB mainDB = DBMaker.fileDB(directory.resolve("regions.foxdb").normalize().toString()).make()) {
Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen();
linksMap.entrySet().forEach(entry -> {
<BUG>IRegion region = FGManager.getInstance().getRegion(entry.getKey());
if (region != null) {
logger.info("Loading links for region \"" + region.getName() + "\"");</BUG>
String handlersString = entry.getValue();
| Optional<IRegion> regionOpt = FGManager.getInstance().getRegion(entry.getKey());
if (regionOpt.isPresent()) {
IRegion region = regionOpt.get();
logger.info("Loading links for region \"" + region.getName() + "\"");
|
7,728 | public synchronized void loadWorldRegionLinks(World world) {
logger.info("Loading world region links for world \"" + world.getName() + "\"");
try (DB mainDB = DBMaker.fileDB(worldDirectories.get(world.getName()).resolve("wregions.foxdb").normalize().toString()).make()) {
Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen();
linksMap.entrySet().forEach(entry -> {
<BUG>IRegion region = FGManager.getInstance().getWorldRegion(world, entry.getKey());
if (region != null) {
logger.info("Loading links for world region \"" + region.getName() + "\"");</BUG>
String handlersString = entry.getValue();
| Optional<IWorldRegion> regionOpt = FGManager.getInstance().getWorldRegion(world, entry.getKey());
if (regionOpt.isPresent()) {
IWorldRegion region = regionOpt.get();
logger.info("Loading links for world region \"" + region.getName() + "\"");
|
7,729 | StringBuilder builder = new StringBuilder();
for (Iterator<IHandler> it = handlers.iterator(); it.hasNext(); ) {
builder.append(it.next().getName());
if (it.hasNext()) builder.append(",");
}
<BUG>return builder.toString();
}</BUG>
private final class LoadEntry {
public final String name;
public final Type type;
| public enum Type {
REGION, WREGION, HANDLER
|
7,730 | .autoCloseQuotes(true)
.leaveFinalAsIs(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "worldregion", "handler", "controller").stream()
</BUG>
.filter(new StartsWithPredicate(parse.current.token))
.collect(GuavaCollectors.toImmutableList());
else if (parse.current.index == 1) {
| return Stream.of("region", "worldregion", "handler", "controller")
|
7,731 | @InjectView(R.id.text_main1) private TextView textView1;
@InjectView(R.id.text_main2) private TextView textView2;
@InjectView(R.id.text_main3) private TextView textView3;
@InjectView(R.id.text_main4) private TextView textView4;
@InjectView(R.id.text_main5) private TextView textView5;
<BUG>@InjectView(R.id.text_main6) private TextView textView6;
@InjectView(R.id.text_main7) private TextView textView7;
@InjectView(R.id.text_main8) private TextView textView8;
@InjectView(R.id.text_main9) private TextView textView9;
@InjectView(R.id.text_main10) private TextView textView10;</BUG>
@InjectExtra(PARAM_BYTE) private byte byteField;
| [DELETED] |
7,732 | package me.xiaopan.easy.android.sample;
<BUG>import java.util.ArrayList;
import me.xiaopan.android.easy.activity.EasyFragmentActivity;
import me.xiaopan.android.easy.inject.InjectView;
import android.os.Bundle;</BUG>
import android.view.View;
| import java.util.HashSet;
import java.util.Set;
import me.xiaopan.android.easy.util.PreferenceUtils;
import android.os.Bundle;
|
7,733 | public void recoverClusterFail() throws Exception {
mThrown.expect(RuntimeException.class);
mThrown.expectMessage(ExceptionMessage.PERMISSION_DENIED
.getMessage("Unauthorized user on root"));
FileSystem fs = mLocalAlluxioClusterResource.get().getClient();
<BUG>fs.createFile(new AlluxioURI("/testFile"));
</BUG>
mLocalAlluxioClusterResource.get().stopFS();
LoginUserTestUtils.resetLoginUser(USER);
MasterTestUtils.createLeaderFileSystemMasterFromJournal();
| fs.createFile(new AlluxioURI("/testFile")).close();
|
7,734 | public void createFileWithFileAlreadyExistsException() throws Exception {
AlluxioURI uri = new AlluxioURI(PathUtils.uniqPath());
mFileSystem.createFile(uri, mWriteBoth).close();
Assert.assertNotNull(mFileSystem.getStatus(uri));
try {
<BUG>mFileSystem.createFile(uri, mWriteBoth);
</BUG>
} catch (AlluxioException e) {
Assert.assertTrue(e instanceof FileAlreadyExistsException);
}
| [DELETED] |
7,735 | Assert.assertEquals(
ExceptionMessage.FILE_ALREADY_EXISTS.getMessage(rootAlluxioURI), e.getMessage());
}
AlluxioURI file1URI = rootAlluxioURI.join("file1");
try {
<BUG>client.createFile(file1URI, CreateFileOptions.defaults());
</BUG>
Assert.fail("create is expected to fail with FileAlreadyExistsException");
} catch (FileAlreadyExistsException e) {
Assert.assertEquals(
| client.createFile(file1URI, CreateFileOptions.defaults()).close();
|
7,736 | package com.relevantcodes.extentreports;
<BUG>import java.util.HashMap;
import com.relevantcodes.extentreports.model.Test;</BUG>
public class LogCounts {
private int pass = 0;
private int fail = 0;
| import java.util.Iterator;
import com.relevantcodes.extentreports.model.Log;
import com.relevantcodes.extentreports.model.Test;
|
7,737 | package com.relevantcodes.extentreports;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
<BUG>import org.jsoup.nodes.Element;
import com.relevantcodes.extentreports.model.Test;</BUG>
import com.relevantcodes.extentreports.model.TestAttribute;
import com.relevantcodes.extentreports.source.Icon;
import com.relevantcodes.extentreports.source.StepHtml;
| import java.util.Iterator;
import com.relevantcodes.extentreports.model.Log;
import com.relevantcodes.extentreports.model.Test;
|
7,738 | import com.relevantcodes.extentreports.source.StepHtml;
import com.relevantcodes.extentreports.source.TestHtml;
import com.relevantcodes.extentreports.utils.DateTimeUtil;
class TestBuilder {
private static int logSize;
<BUG>public static Element getHTMLTest(Test test) {
logSize = 3;
if (test.getLog().size() > 0 && test.getLog().get(0).getStepName() != "") {
logSize = 4;
}</BUG>
String testSource = TestHtml.getSource(logSize);
| logSize = test.getLogColumnSize();
|
7,739 | import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Calendar;
<BUG>import java.util.HashMap;
import java.util.Map;</BUG>
import com.relevantcodes.extentreports.model.Category;
import com.relevantcodes.extentreports.model.Log;
import com.relevantcodes.extentreports.model.Test;
| import java.util.Iterator;
import java.util.Map;
|
7,740 | private static void moveDown(final JTree tree) {
final int size = tree.getRowCount();
int row = getSelectedRow(tree);
if (row < size - 1) {
row++;
<BUG>showAndSelect(tree, row, row + 2, row, true);
</BUG>
}
}
private static void moveUp(final JTree tree) {
| showAndSelect(tree, row, row + 2, row, getSelectedRow(tree));
|
7,741 | import math.geom2d.Shape2D;
import math.geom2d.Vector2D;
import math.geom2d.polygon.Polyline2D;
public class PolyCurve2D<T extends ContinuousCurve2D> extends CurveArray2D<T>
implements ContinuousCurve2D {
<BUG>public static <T extends ContinuousCurve2D> PolyCurve2D<T> create(
Collection<T> curves) {
return new PolyCurve2D<T>(curves);
}</BUG>
public static <T extends ContinuousCurve2D> PolyCurve2D<T> create(
| [DELETED] |
7,742 | CirculinearBoundary2D newBoundary =
((CirculinearBoundary2D) this.boundary).parallel(dist);
return new GenericCirculinearDomain2D(
CirculinearContourArray2D.create(
CirculinearCurves2D.splitIntersectingContours(
<BUG>newBoundary.continuousCurves())));
}</BUG>
public CirculinearDomain2D transform(CircleInversion2D inv) {
CirculinearBoundary2D boundary2 = (CirculinearBoundary2D) boundary;
boundary2 = boundary2.transform(inv).reverse();
| newBoundary.continuousCurves()).toArray(new CirculinearContour2D[0])));
}
|
7,743 | import java.awt.Graphics2D;
import java.util.Collection;
import math.geom2d.AffineTransform2D;
public class BoundaryPolyCurve2D<T extends ContinuousOrientedCurve2D> extends
PolyOrientedCurve2D<T> implements Contour2D {
<BUG>public static <T extends ContinuousOrientedCurve2D> BoundaryPolyCurve2D<T> create(
Collection<T> curves) {
return new BoundaryPolyCurve2D<T>(curves);
}</BUG>
public static <T extends ContinuousOrientedCurve2D> BoundaryPolyCurve2D<T> create(
| [DELETED] |
7,744 | import math.geom2d.domain.PolyOrientedCurve2D;
import math.geom2d.transform.CircleInversion2D;
public class PolyCirculinearCurve2D<T extends CirculinearContinuousCurve2D>
extends PolyOrientedCurve2D<T> implements CirculinearContinuousCurve2D {
public static <T extends CirculinearContinuousCurve2D>
<BUG>PolyCirculinearCurve2D<T> create(Collection<T> curves) {
return new PolyCirculinearCurve2D<T>(curves);
}
public static <T extends CirculinearContinuousCurve2D></BUG>
PolyCirculinearCurve2D<T> create(T... curves) {
| [DELETED] |
7,745 | if (continuous instanceof CirculinearContinuousCurve2D)
curves.add((CirculinearContinuousCurve2D) continuous);
else
curves.add((CirculinearContinuousCurve2D) convert(continuous));
}
<BUG>return CirculinearCurveArray2D.create(curves);
}</BUG>
return null;
}
public static double getLength(
| return CirculinearCurveArray2D.create(curves.toArray(new CirculinearElement2D[0]));
|
7,746 | pos1 = twins1.remove(pos2);
pos2 = nextValue(positions2, pos1);
addElements(elements, curve2.subCurve(pos1, pos2));
pos1 = twins2.remove(pos2);
} while (pos1 != pos0);
<BUG>contours.add(BoundaryPolyCirculinearCurve2D.create(elements, true));
</BUG>
}
return contours;
}
| contours.add(BoundaryPolyCirculinearCurve2D.create(elements.toArray(new CirculinearElement2D[0]), true));
|
7,747 | ind = twinIndices.get(ind).remove(pos2);
}
} while (ind != ind0);
twinPositions.get(i).remove(pos0);
twinIndices.get(i).remove(pos0);
<BUG>contours.add(BoundaryPolyCirculinearCurve2D.create(elements, true));
</BUG>
}
while (!isAllEmpty(twinPositions)) {
ArrayList<CirculinearElement2D> elements = new ArrayList<CirculinearElement2D>();
| contours.add(BoundaryPolyCirculinearCurve2D.create(elements.toArray(new CirculinearElement2D[0]), true));
|
7,748 | pos2 = nextValue(positions.get(ind), pos1);
addElements(elements, curveArray[ind].subCurve(pos1, pos2));
pos1 = twinPositions.get(ind).remove(pos2);
ind = twinIndices.get(ind).remove(pos2);
} while (pos1 != pos0 || ind != ind0);
<BUG>contours.add(BoundaryPolyCirculinearCurve2D.create(elements, true));
</BUG>
}
return contours;
}
| contours.add(BoundaryPolyCirculinearCurve2D.create(elements.toArray(new CirculinearElement2D[0]), true));
|
7,749 | import math.geom2d.domain.ContinuousOrientedCurve2D;
import math.geom2d.transform.CircleInversion2D;
public class GenericCirculinearRing2D
extends PolyCirculinearCurve2D<CirculinearElement2D>
implements CirculinearRing2D {
<BUG>public static <T extends CirculinearElement2D> GenericCirculinearRing2D
create(Collection<T> curves) {
return new GenericCirculinearRing2D(curves);
}</BUG>
public static GenericCirculinearRing2D create(
| [DELETED] |
7,750 | import math.geom2d.circulinear.buffer.BufferCalculator;
import math.geom2d.curve.*;
import math.geom2d.transform.CircleInversion2D;
public class CirculinearCurveArray2D<T extends CirculinearCurve2D>
extends CurveArray2D<T> implements CirculinearCurveSet2D<T> {
<BUG>public static <T extends CirculinearCurve2D> CirculinearCurveArray2D<T> create(
Collection<T> curves) {
return new CirculinearCurveArray2D<T>(curves);
}</BUG>
public static <T extends CirculinearCurve2D> CirculinearCurveArray2D<T> create(
| [DELETED] |
7,751 | import math.geom2d.ShapeArray2D;
import math.geom2d.UnboundedShape2DException;
import math.geom2d.polygon.*;
public class DomainArray2D<T extends Domain2D> extends ShapeArray2D<T>
implements DomainSet2D<T> {
<BUG>public static <D extends Domain2D> DomainArray2D<D> create(Collection<D> array) {
return new DomainArray2D<D>(array);
}</BUG>
public static <D extends Domain2D> DomainArray2D<D> create(D... array) {
return new DomainArray2D<D>(array);
| [DELETED] |
7,752 | import math.geom2d.Box2D;
import math.geom2d.Point2D;
import math.geom2d.curve.*;
public class ContourArray2D<T extends Contour2D> extends CurveArray2D<T>
implements Boundary2D {
<BUG>public static <T extends Contour2D> ContourArray2D<T> create(
Collection<T> curves) {
return new ContourArray2D<T>(curves);
}</BUG>
public static <T extends Contour2D> ContourArray2D<T> create(
| [DELETED] |
7,753 | import math.geom2d.domain.ContinuousOrientedCurve2D;
import math.geom2d.domain.ContourArray2D;
import math.geom2d.transform.CircleInversion2D;
public class CirculinearContourArray2D<T extends CirculinearContour2D>
extends ContourArray2D<T> implements CirculinearBoundary2D {
<BUG>public static <T extends CirculinearContour2D>
CirculinearContourArray2D<T> create(Collection<T> curves) {
return new CirculinearContourArray2D<T>(curves);
}</BUG>
public static <T extends CirculinearContour2D>
| [DELETED] |
7,754 | boundary.continuousCurves();
Collection<CirculinearContour2D> parallelContours =
new ArrayList<CirculinearContour2D>(contours.size());
for(CirculinearContour2D contour : contours)
parallelContours.add(contour.parallel(dist));
<BUG>return CirculinearContourArray2D.create(parallelContours);
</BUG>
}
public CirculinearContour2D createParallelContour(
CirculinearContour2D contour, double dist) {
| return CirculinearContourArray2D.create(parallelContours.toArray(new CirculinearContour2D[0]));
|
7,755 | if (contour instanceof Circle2D) {
return ((Circle2D) contour).parallel(dist);
}
Collection<CirculinearContinuousCurve2D> parallelCurves =
getParallelElements(contour, dist);
<BUG>return BoundaryPolyCirculinearCurve2D.create(parallelCurves,
contour.isClosed());</BUG>
}
public CirculinearContinuousCurve2D createContinuousParallel(
CirculinearContinuousCurve2D curve, double dist) {
| return BoundaryPolyCirculinearCurve2D.create(parallelCurves.toArray(new CirculinearContinuousCurve2D[0]),
contour.isClosed());
|
7,756 | if (curve instanceof CirculinearElement2D) {
return ((CirculinearElement2D) curve).parallel(dist);
}
Collection<CirculinearContinuousCurve2D> parallelCurves =
getParallelElements(curve, dist);
<BUG>return PolyCirculinearCurve2D.create(parallelCurves, curve.isClosed());
</BUG>
}
private Collection<CirculinearContinuousCurve2D> getParallelElements(
CirculinearContinuousCurve2D curve, double dist) {
| return PolyCirculinearCurve2D.create(parallelCurves.toArray(new CirculinearContinuousCurve2D[0]), curve.isClosed());
|
7,757 | if(distCurves < dist-Shape2D.ACCURACY)
continue;
contours2.add(contour);
}
return new GenericCirculinearDomain2D(
<BUG>CirculinearContourArray2D.create(contours2));
}</BUG>
public CirculinearDomain2D computeBuffer(PointSet2D set,
double dist) {
Collection<CirculinearContour2D> contours =
| CirculinearContourArray2D.create(contours2.toArray(new CirculinearContour2D[0])));
|
7,758 | if(minDist < dist-Shape2D.ACCURACY)
continue;
contours2.add(ring);
}
return new GenericCirculinearDomain2D(
<BUG>CirculinearContourArray2D.create(contours2));
}</BUG>
private Collection<? extends CirculinearContour2D>
computeBufferSimpleCurve(CirculinearContinuousCurve2D curve, double d) {
Collection<CirculinearContour2D> contours =
| CirculinearContourArray2D.create(contours2.toArray(new CirculinearContour2D[0])));
|
7,759 | private CirculinearContour2D convertCurveToBoundary (
CirculinearContinuousCurve2D curve) {
if (curve instanceof CirculinearContour2D)
return (CirculinearContour2D) curve;
if (curve.isClosed())
<BUG>return GenericCirculinearRing2D.create(curve.smoothPieces());
return BoundaryPolyCirculinearCurve2D.create(curve.smoothPieces());
</BUG>
}
| return GenericCirculinearRing2D.create(curve.smoothPieces().toArray(new CirculinearElement2D[0]));
return BoundaryPolyCirculinearCurve2D.create(curve.smoothPieces().toArray(new CirculinearContinuousCurve2D[0]));
|
7,760 | public Box2D(Point2D p1, Point2D p2) {
double x1 = p1.x();
double y1 = p1.y();
double x2 = p2.x();
double y2 = p2.y();
<BUG>this.xmin = min(x1, x2);
this.xmax = max(x1, x2);
this.ymin = min(y1, y2);
this.ymax = max(y1, y2);
</BUG>
}
| this.xmin = Math.min(x1, x2);
this.xmax = Math.max(x1, x2);
this.ymin = Math.min(y1, y2);
this.ymax = Math.max(y1, y2);
|
7,761 | double xmax = NEGATIVE_INFINITY;
double ymin = POSITIVE_INFINITY;
double ymax = NEGATIVE_INFINITY;
for (Point2D point : this.vertices()) {
point = point.transform(trans);
<BUG>xmin = min(xmin, point.x());
ymin = min(ymin, point.y());
xmax = max(xmax, point.x());
ymax = max(ymax, point.y());
</BUG>
}
| xmin = Math.min(xmin, point.x());
ymin = Math.min(ymin, point.y());
xmax = Math.max(xmax, point.x());
ymax = Math.max(ymax, point.y());
|
7,762 | 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 PatchUtils {
| import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
7,763 | 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;
|
7,764 | 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"),
MISC_FILES("misc-files"),
| APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
7,765 | 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_VERSION:
if(type == Patch.PatchType.CUMULATIVE) {
| [DELETED] |
7,766 | 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, bytesToHexString(item.getContentHash()));
}
if(type != ModificationType.ADD) {
| if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|
7,767 | 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>
import java.util.List;
@MessageBundle(projectCode = "JBAS")
public interface PatchMessages {
| import org.jboss.logging.annotations.Cause;
import java.io.IOException;
|
7,768 | import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;
public class DependencyConvergenceReport
extends AbstractProjectInfoReport
<BUG>{
private List reactorProjects;
private static final int PERCENTAGE = 100;</BUG>
public String getOutputName()
{
| private static final int PERCENTAGE = 100;
private static final List SUPPORTED_FONT_FAMILY_NAMES = Arrays.asList( GraphicsEnvironment
.getLocalGraphicsEnvironment().getAvailableFontFamilyNames() );
|
7,769 | sink.section1();
sink.sectionTitle1();
sink.text( getI18nString( locale, "title" ) );
sink.sectionTitle1_();
Map dependencyMap = getDependencyMap();
<BUG>generateLegend( locale, sink );
generateStats( locale, sink, dependencyMap );
generateConvergence( locale, sink, dependencyMap );
sink.section1_();</BUG>
sink.body_();
| sink.lineBreak();
sink.section1_();
|
7,770 | Iterator it = artifactMap.keySet().iterator();
while ( it.hasNext() )
{
String version = (String) it.next();
sink.tableRow();
<BUG>sink.tableCell();
sink.text( version );</BUG>
sink.tableCell_();
sink.tableCell();
generateVersionDetails( sink, artifactMap, version );
| sink.tableCell( String.valueOf( cellWidth ) + "px" );
sink.text( version );
|
7,771 | sink.tableCell();
sink.text( getI18nString( locale, "legend.shared" ) );
sink.tableCell_();
sink.tableRow_();
sink.tableRow();
<BUG>sink.tableCell();
iconError( sink );</BUG>
sink.tableCell_();
sink.tableCell();
sink.text( getI18nString( locale, "legend.different" ) );
| sink.tableCell( "15px" ); // according /images/icon_error_sml.gif
iconError( sink );
|
7,772 | sink.tableCaption();
sink.text( getI18nString( locale, "stats.caption" ) );
sink.tableCaption_();</BUG>
sink.tableRow();
<BUG>sink.tableHeaderCell();
sink.text( getI18nString( locale, "stats.subprojects" ) + ":" );
sink.tableHeaderCell_();</BUG>
sink.tableCell();
sink.text( String.valueOf( reactorProjects.size() ) );
sink.tableCell_();
| sink.bold();
sink.bold_();
sink.tableCaption_();
sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.subprojects" ) );
sink.tableHeaderCell_();
|
7,773 | sink.tableCell();
sink.text( String.valueOf( reactorProjects.size() ) );
sink.tableCell_();
sink.tableRow_();
sink.tableRow();
<BUG>sink.tableHeaderCell();
sink.text( getI18nString( locale, "stats.dependencies" ) + ":" );
sink.tableHeaderCell_();</BUG>
sink.tableCell();
sink.text( String.valueOf( depCount ) );
| sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.dependencies" ) );
sink.tableHeaderCell_();
|
7,774 | sink.text( String.valueOf( convergence ) + "%" );
sink.bold_();
sink.tableCell_();
sink.tableRow_();
sink.tableRow();
<BUG>sink.tableHeaderCell();
sink.text( getI18nString( locale, "stats.readyrelease" ) + ":" );
sink.tableHeaderCell_();</BUG>
sink.tableCell();
if ( convergence >= PERCENTAGE && snapshotCount <= 0 )
| sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.readyrelease" ) );
sink.tableHeaderCell_();
|
7,775 | {
ReverseDependencyLink p1 = (ReverseDependencyLink) o1;
ReverseDependencyLink p2 = (ReverseDependencyLink) o2;
return p1.getProject().getId().compareTo( p2.getProject().getId() );
}
<BUG>else
{</BUG>
return 0;
}
}
| iconError( sink );
|
7,776 | return null;
}
@Override
public Object invoke() throws Exception {
Map<String, Object> resultsMap = new LinkedHashMap<String, Object>();
<BUG>List<Map<String, Object>> jsonWebServiceActionMappingMaps =
_buildJsonWebServiceActionMappingMaps();
resultsMap.put("services", jsonWebServiceActionMappingMaps);
List<Map<String, Object>> types = _buildTypesList(_types);
resultsMap.put("types", types);</BUG>
resultsMap.put("context", _contextPath);
| [DELETED] |
7,777 | 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 PatchUtils {
| import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
7,778 | 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;
|
7,779 | 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"),
MISC_FILES("misc-files"),
| APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
7,780 | 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_VERSION:
if(type == Patch.PatchType.CUMULATIVE) {
| [DELETED] |
7,781 | 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, bytesToHexString(item.getContentHash()));
}
if(type != ModificationType.ADD) {
| if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|
7,782 | 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>
import java.util.List;
@MessageBundle(projectCode = "JBAS")
public interface PatchMessages {
| import org.jboss.logging.annotations.Cause;
import java.io.IOException;
|
7,783 | boolean ret = programFile(getProgrammer(), sketchName);
ctx.executeKey("upload.postcmd");
return ret;
}
public boolean performSerialReset(boolean dtr, boolean rts, int speed, int predelay, int delay, int postdelay) {
<BUG>ctx.bullet("Resetting board.");
</BUG>
try {
CommunicationPort port = ctx.getDevice();
if (port instanceof SerialCommunicationPort) {
| if (!Base.isQuiet()) ctx.bullet("Resetting board.");
|
7,784 | ArrayList<File>sketchObjects = compileSketch();
if(sketchObjects == null) {
error("Failed compiling sketch");
return false;
}
<BUG>bullet("Compiling core...");
setCompilingProgress(20);</BUG>
if(!compileCore()) {
error("Failed compiling core");
return false;
| if (!Base.isQuiet()) bullet("Compiling core...");
setCompilingProgress(20);
|
7,785 | if(!compileCore()) {
error("Failed compiling core");
return false;
}
setCompilingProgress(30);
<BUG>bullet("Compiling libraries...");
</BUG>
if(!compileLibraries()) {
error("Failed compiling libraries");
return false;
| if (!Base.isQuiet()) bullet("Compiling libraries...");
|
7,786 | if(!compileLibraries()) {
error("Failed compiling libraries");
return false;
}
setCompilingProgress(40);
<BUG>bullet("Linking sketch...");
if(!compileLink(sketchObjects)) {</BUG>
error("Failed linking sketch");
return false;
}
| if (!Base.isQuiet()) bullet("Linking sketch...");
if(!compileLink(sketchObjects)) {
|
7,787 | editor.updateOutputTree();
}
compileSize();
long endTime = System.currentTimeMillis();
double compileTime = (double)(endTime - startTime) / 1000d;
<BUG>bullet("Compilation took " + compileTime + " seconds");
</BUG>
ctx.executeKey("compile.postcmd");
return true;
}
| if (!Base.isQuiet()) bullet("Compilation took " + compileTime + " seconds");
|
7,788 | return true;
}
public boolean compileSize() {
PropertyFile props = ctx.getMerged();
if (props.get("compile.size") != null) {
<BUG>heading("Memory usage");
ctx.startBuffer();</BUG>
ctx.executeKey("compile.size");
String output = ctx.endBuffer();
String reg = props.get("compiler.size.regex", "^\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)");
| if (!Base.isQuiet()) heading("Memory usage");
ctx.startBuffer();
|
7,789 | ctx.set("size.data", dataSize + "");
ctx.set("size.rodata", rodataSize + "");
ctx.set("size.bss", bssSize + "");
ctx.set("size.flash", (textSize + dataSize + rodataSize) + "");
ctx.set("size.ram", (bssSize + dataSize) + "");
<BUG>bullet("Program size: " + (textSize + dataSize + rodataSize) + " bytes");
bullet("Memory size: " + (bssSize + dataSize) + " bytes");
</BUG>
}
| if (!Base.isQuiet()) bullet("Program size: " + (textSize + dataSize + rodataSize) + " bytes");
if (!Base.isQuiet()) bullet("Memory size: " + (bssSize + dataSize) + " bytes");
|
7,790 | for(File file : sources) {
File objectFile = new File(dest, file.getName() + "." + objExt);
objectPaths.add(objectFile);
if(objectFile.exists() && objectFile.lastModified() > file.lastModified()) {
if(Preferences.getBoolean("compiler.verbose_compile")) {
<BUG>bullet2("Skipping " + file.getAbsolutePath() + " as not modified.");
</BUG>
}
continue;
}
| if (!Base.isQuiet()) bullet2("Skipping " + file.getAbsolutePath() + " as not modified.");
|
7,791 | ctx.parsedMessage("{\\bullet}{\\error Error at line " + errorLineNumber + " in file " + errorFile.getName() + ":}\n");
}
} catch (Exception execpt) {
}
} else {
<BUG>ctx.error("Error at line " + errorLineNumber + " in file " + errorFile.getName() + ":");
</BUG>
}
ctx.parsedMessage("{\\bullet2}{\\error " + m.group(3) + "}\n");
setLineComment(errorFile, errorLineNumber, m.group(3));
| [DELETED] |
7,792 | ctx.parsedMessage("{\\bullet}{\\warning Error at line " + errorLineNumber + " in file " + errorFile.getName() + ":}\n");
}
} catch (Exception execpt) {
}
} else {
<BUG>ctx.warning("Warning at line " + errorLineNumber + " in file " + errorFile.getName() + ":");
</BUG>
}
ctx.parsedMessage("{\\bullet2}{\\warning " + m.group(3) + "}\n");
setLineComment(errorFile, errorLineNumber, m.group(3));
| ctx.parsedMessage("{\\bullet}{\\warning Warning at line " + errorLineNumber + " in file " + errorFile.getName() + ":}\n");
|
7,793 | package org.uecide;
import java.io.*;
import java.lang.*;
import java.util.*;
import java.lang.reflect.*;
<BUG>import javax.script.*;
import org.uecide.builtin.BuiltinCommand;</BUG>
import org.uecide.varcmd.VariableCommand;
public class Context {
Board board = null;
| import java.util.regex.*;
import org.uecide.builtin.BuiltinCommand;
|
7,794 | cli.addParameter("force-join-files", "", Boolean.class, "Force joining INO and PDE files into single CPP file");
cli.addParameter("online", "", Boolean.class, "Force online mode");
cli.addParameter("offline", "", Boolean.class, "Force offline mode");
cli.addParameter("version", "", Boolean.class, "Display the UECIDE version number");
cli.addParameter("cli", "", Boolean.class, "Enter CLI mode");
<BUG>cli.addParameter("preferences", "", Boolean.class, "Display preferences dialog");
String[] argv = cli.process(args);</BUG>
headless = cli.isSet("headless");
boolean loadLastSketch = cli.isSet("last-sketch");
boolean doExit = false;
| cli.addParameter("quiet", "", Boolean.class, "Reduce the noise of output");
String[] argv = cli.process(args);
|
7,795 | super.setBackgroundDrawable((Drawable) newRipple);
}
rippleDrawable = newRipple;
}
@Override
<BUG>protected boolean verifyDrawable(Drawable who) {
</BUG>
return super.verifyDrawable(who) || rippleDrawable == who;
}
@Override
| protected boolean verifyDrawable(@NonNull Drawable who) {
|
7,796 | super.setBackgroundDrawable((Drawable) newRipple);
}
rippleDrawable = newRipple;
}
@Override
<BUG>protected boolean verifyDrawable(Drawable who) {
</BUG>
return super.verifyDrawable(who) || rippleDrawable == who;
}
@Override
| protected boolean verifyDrawable(@NonNull Drawable who) {
|
7,797 | super.setBackgroundDrawable((Drawable) newRipple);
}
rippleDrawable = newRipple;
}
@Override
<BUG>protected boolean verifyDrawable(Drawable who) {
</BUG>
return super.verifyDrawable(who) || rippleDrawable == who;
}
@Override
| protected boolean verifyDrawable(@NonNull Drawable who) {
|
7,798 | drawable.setState(myDrawableState);
invalidate();
}
}
@Override
<BUG>protected boolean verifyDrawable(Drawable who) {
</BUG>
return super.verifyDrawable(who) || who == drawable;
}
@Override
| protected boolean verifyDrawable(@NonNull Drawable who) {
|
7,799 | import android.graphics.PointF;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Parcel;
<BUG>import android.os.Parcelable;
import android.support.annotation.Nullable;</BUG>
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.view.Gravity;
| import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
|
7,800 | drawable.setState(myDrawableState);
invalidate();
}
}
@Override
<BUG>protected boolean verifyDrawable(Drawable who) {
</BUG>
return super.verifyDrawable(who) || who == drawable;
}
@Override
| protected boolean verifyDrawable(@NonNull Drawable who) {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.