id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
17,501 | sum = 0;
}
}
} else if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
}
}
if (fracx < fracdx1) {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
17,502 | s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
17,503 | final int offsetY = KERNEL_LINE_DIM * (int) (shift * fracy);
final int pos = posx + posy;
if (baseIndex > roiDataLength || roiDataArray[baseIndex] == 0) {
if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
}
}
} else {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
17,504 | weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
17,505 | dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
17,506 | s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
17,507 | final int offsetY = KERNEL_LINE_DIM * (int) (shift * fracy);
final int pos = posx + posy;
if (!roiBounds.contains(x0, y0)) {
if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
}
}
} else {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
17,508 | weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
17,509 | dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataFloat[k2];
|
17,510 | s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,511 | final int posyROI = (s_iy - srcRectY) * roiScanlineStride;
final int baseIndex = (posx / dst_num_bands) + posyROI;
if (baseIndex > roiDataLength || roiDataArray[baseIndex] == 0) {
if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
}
}
} else {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,512 | : 0);
}
}
}
if (tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,513 | dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,514 | s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,515 | int x0 = src.getX() + posx / srcPixelStride;
int y0 = src.getY() + posy / srcScanlineStride;
if (!roiBounds.contains(x0, y0)) {
if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
}
}
} else {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,516 | pixelKernel[h][z] = srcDataArrays[k2][pos + (z - 1)
tmpROI += roiIter.getSample(x0 + h - 1, y0 + z - 1, 0) & 0xff;
}
}
if (tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,517 | dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,518 | weightVert &= (0x0F - (1 << h));
}
sumArray[h] = tempSum;
}
if (weight == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
} else {
double[] tempData = bicubicInpaintingDouble(sumArray, weightVert,
emptyArray);
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,519 | sum = 0;
}
}
} else if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
}
}
if (fracx < fracdx1) {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,520 | s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,521 | final int offsetY = KERNEL_LINE_DIM * (int) (shift * fracy);
final int pos = posx + posy;
if (baseIndex > roiDataLength || roiDataArray[baseIndex] == 0) {
if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
}
}
} else {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,522 | weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,523 | dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,524 | s_ix = startPts[0].x;
s_iy = startPts[0].y;
if (setDestinationNoData) {
for (int x = dst_min_x; x < clipMinX; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
} else
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,525 | final int offsetY = KERNEL_LINE_DIM * (int) (shift * fracy);
final int pos = posx + posy;
if (!roiBounds.contains(x0, y0)) {
if (setDestinationNoData) {
for (int k2 = 0; k2 < dst_num_bands; k2++) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
}
}
} else {
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,526 | weight &= (0xffff - (1 << 4 * h + z));
}
}
}
if (weight == 0 || tmpROI == 0) {
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
} else {
for (int h = 0; h < KERNEL_LINE_DIM; h++) {
double tempSum = 0;
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,527 | dstPixelOffset += dstPixelStride;
}
if (setDestinationNoData && clipMinX <= clipMaxX) {
for (int x = clipMaxX; x < dst_max_x; x++) {
for (int k2 = 0; k2 < dst_num_bands; k2++)
<BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble;
</BUG>
dstPixelOffset += dstPixelStride;
}
}
| dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataDouble[k2];
|
17,528 | import com.eucalyptus.auth.euare.UpdateUserResponseType;
import com.eucalyptus.auth.euare.UpdateUserType;
import com.eucalyptus.auth.euare.UploadServerCertificateResponseType;
import com.eucalyptus.auth.euare.UploadServerCertificateType;
import com.eucalyptus.auth.euare.UploadSigningCertificateResponseType;
<BUG>import com.eucalyptus.auth.euare.UploadSigningCertificateType;
import com.eucalyptus.auth.ldap.LdapSync;</BUG>
import com.eucalyptus.auth.policy.PatternUtils;
import com.eucalyptus.auth.policy.PolicySpec;
import com.eucalyptus.auth.policy.ern.EuareResourceName;
| import com.eucalyptus.auth.euare.checker.InvalidValueException;
import com.eucalyptus.auth.euare.checker.ValueChecker;
import com.eucalyptus.auth.euare.checker.ValueCheckerFactory;
import com.eucalyptus.auth.ldap.LdapSync;
|
17,529 | resourceRegistration.registerReadOnlyAttribute(runtimeAttribute, XMLDataSourceRuntimeHandler.INSTANCE);
} else {
resourceRegistration.registerReadOnlyAttribute(Constants.CONNECTION_PROPERTY_VALUE, null);
}
}
<BUG>static void registerTransformers111(ResourceTransformationDescriptionBuilder parentBuilder) {
</BUG>
parentBuilder.addChildResource(PATH_CONNECTION_PROPERTY)
.getAttributeBuilder()
.addRejectCheck(RejectAttributeChecker.UNDEFINED, Constants.CONNECTION_PROPERTY_VALUE)
| static void registerTransformers11x(ResourceTransformationDescriptionBuilder parentBuilder) {
|
17,530 | import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
<BUG>import android.support.v4.app.NavUtils;
import android.support.v7.app.AppCompatActivity;</BUG>
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.ContextMenu;
| import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.AppCompatActivity;
|
17,531 | import android.database.ContentObserver;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
<BUG>import android.support.v4.app.NavUtils;
import android.support.v7.app.AppCompatActivity;</BUG>
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.ContextMenu;
| import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.AppCompatActivity;
|
17,532 | import android.os.Handler;
import android.os.Looper;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.preference.PreferenceManager;
<BUG>import android.support.design.widget.FloatingActionButton;
import android.support.v7.widget.Toolbar;</BUG>
import android.util.Log;
import android.view.ContextMenu;
import android.view.KeyEvent;
| import android.support.v4.view.MenuItemCompat;
import android.support.v7.widget.Toolbar;
|
17,533 | mAltitude.setOnCheckedChangeListener(mCheckedChangeListener);
mDistance.setOnCheckedChangeListener(mCheckedChangeListener);
mCompass.setOnCheckedChangeListener(mCheckedChangeListener);
mLocation.setOnCheckedChangeListener(mCheckedChangeListener);
builder.setTitle(R.string.dialog_layer_title).setIcon(android.R.drawable.ic_dialog_map).setPositiveButton
<BUG>(R.string.btn_okay, null).setView(view);
</BUG>
dialog = builder.create();
return dialog;
case DIALOG_NOTRACK:
| (android.R.string.ok, null).setView(view);
|
17,534 | import java.util.logging.Logger;
import java.util.stream.Stream;
import static java.lang.reflect.Modifier.isPublic;
import static java.util.Arrays.sort;
import static java.util.Comparator.comparing;
<BUG>import static java.util.Objects.requireNonNull;
import static org.dalesbred.internal.utils.TypeUtils.*;</BUG>
public final class DefaultInstantiatorRegistry implements InstantiatorRegistry {
@NotNull
private final Dialect dialect;
| import static org.dalesbred.internal.utils.CollectionUtils.arrayOfType;
import static org.dalesbred.internal.utils.TypeUtils.*;
|
17,535 | List<ChangeLog> changesOnFilesystem = cubeController.changesOnFilesystem(cubeID);
assertThat(changesOnFilesystem, notNullValue());
assertThat(changesOnFilesystem.size() > 0, is(true));
}
@Test
<BUG>public void should_copy_files_from_container(@ArquillianResource CubeController cubeController, @ArquillianResource CubeID cubeID) throws IOException {
File newFolder = folder.newFolder();
cubeController.copyFileDirectoryFromContainer(cubeID, "/tomcat/logs", newFolder.getAbsolutePath());
File logFolder = newFolder.listFiles()[0];
assertThat(logFolder, notNullValue());
assertThat(logFolder.listFiles().length > 0, is(true));
}
@Test</BUG>
public void should_enrich_test_with_docker_client(@ArquillianResource CubeController cubeController) {
| [DELETED] |
17,536 | String adapterName = entry.getKey();
if (entry.getValue() instanceof LinkedHashMap) {
Map<String, ?> adapter = (LinkedHashMap) entry.getValue();
long rxBytes = NumberConversion.convertToLong(adapter.get("rx_bytes"));
long txBytes = NumberConversion.convertToLong(adapter.get("tx_bytes"));
<BUG>nwStats.put("rx_bytes", NumberConversion.humanReadableByteCount(rxBytes, decimal));
nwStats.put("tx_bytes", NumberConversion.humanReadableByteCount(txBytes, decimal));
nwStatsForEachNICAndTotal.put(adapterName, nwStats);</BUG>
totalRxBytes += rxBytes;
totalTxBytes += txBytes;
| nwStats.put("rx_bytes", rxBytes);
nwStats.put("tx_bytes", txBytes);
nwStatsForEachNICAndTotal.put(adapterName, nwStats);
|
17,537 | import java.net.URI;
import java.util.Calendar;
import java.util.Date;
import java.util.Formatter;
import java.util.List;
<BUG>import javax.ws.rs.core.UriBuilder;
import org.apache.commons.httpclient.URIException;
import org.apache.commons.httpclient.util.URIUtil;</BUG>
import org.suigeneris.jrcs.rcs.Version;
import org.xwiki.rest.Relations;
| [DELETED] |
17,538 | if (home != null) {
space.setHome(home.getPrefixedFullName());
space.setXwikiRelativeUrl(home.getURL("view"));
space.setXwikiAbsoluteUrl(home.getExternalURL("view"));
}
<BUG>String pagesUri = UriBuilder.fromUri(baseUri).path(PagesResource.class).build(wikiName, spaceName).toString();
</BUG>
Link pagesLink = objectFactory.createLink();
pagesLink.setHref(pagesUri);
pagesLink.setRel(Relations.PAGES);
| String pagesUri = uri(baseUri, PagesResource.class, wikiName, spaceName);
|
17,539 | Link pagesLink = objectFactory.createLink();
pagesLink.setHref(pagesUri);
pagesLink.setRel(Relations.PAGES);
space.getLinks().add(pagesLink);
if (home != null) {
<BUG>String homeUri =
UriBuilder.fromUri(baseUri).path(PageResource.class).build(wikiName, spaceName, home.getName())
.toString();</BUG>
Link homeLink = objectFactory.createLink();
| String homeUri = uri(baseUri, PageResource.class, wikiName, spaceName, home.getName());
|
17,540 | .toString();</BUG>
Link homeLink = objectFactory.createLink();
homeLink.setHref(homeUri);
homeLink.setRel(Relations.HOME);
space.getLinks().add(homeLink);
<BUG>}
String searchUri =
UriBuilder.fromUri(baseUri).path(SpaceSearchResource.class).build(wikiName, spaceName).toString();</BUG>
Link searchLink = objectFactory.createLink();
searchLink.setHref(searchUri);
| Link pagesLink = objectFactory.createLink();
pagesLink.setHref(pagesUri);
pagesLink.setRel(Relations.PAGES);
space.getLinks().add(pagesLink);
if (home != null) {
String homeUri = uri(baseUri, PageResource.class, wikiName, spaceName, home.getName());
String searchUri = uri(baseUri, SpaceSearchResource.class, wikiName, spaceName);
|
17,541 | if (!languages.isEmpty()) {
if (!doc.getDefaultLanguage().equals("")) {
translations.setDefault(doc.getDefaultLanguage());
Translation translation = objectFactory.createTranslation();
translation.setLanguage(doc.getDefaultLanguage());
<BUG>String pageTranslationUri =
UriBuilder.fromUri(baseUri).path(PageResource.class)
.build(doc.getWiki(), doc.getSpace(), doc.getName()).toString();</BUG>
Link pageTranslationLink = objectFactory.createLink();
pageTranslationLink.setHref(pageTranslationUri);
| uri(baseUri, PageResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
|
17,542 | }
}
for (String language : languages) {
Translation translation = objectFactory.createTranslation();
translation.setLanguage(language);
<BUG>String pageTranslationUri =
UriBuilder.fromUri(baseUri).path(PageTranslationResource.class)
.build(doc.getWiki(), doc.getSpace(), doc.getName(), language).toString();</BUG>
Link pageTranslationLink = objectFactory.createLink();
pageTranslationLink.setHref(pageTranslationUri);
| uri(baseUri, PageTranslationResource.class, doc.getWiki(), doc.getSpace(), doc.getName(), language);
|
17,543 | Link pageTranslationLink = objectFactory.createLink();
pageTranslationLink.setHref(pageTranslationUri);
pageTranslationLink.setRel(Relations.PAGE);
translation.getLinks().add(pageTranslationLink);
String historyUri =
<BUG>UriBuilder.fromUri(baseUri).path(PageTranslationHistoryResource.class)
.build(doc.getWiki(), doc.getSpace(), doc.getName(), language).toString();
Link historyLink = objectFactory.createLink();</BUG>
historyLink.setHref(historyUri);
historyLink.setRel(Relations.HISTORY);
| uri(baseUri, PageTranslationHistoryResource.class, doc.getWiki(), doc.getSpace(), doc.getName(),
language);
Link historyLink = objectFactory.createLink();
|
17,544 | pageSummary.setParent(doc.getParent());
if (parent != null && !parent.isNew()) {
pageSummary.setParentId(parent.getPrefixedFullName());
} else {
pageSummary.setParentId("");
<BUG>}
String spaceUri =
UriBuilder.fromUri(baseUri).path(SpaceResource.class).build(doc.getWiki(), doc.getSpace()).toString();</BUG>
Link spaceLink = objectFactory.createLink();
spaceLink.setHref(spaceUri);
| String spaceUri = uri(baseUri, SpaceResource.class, doc.getWiki(), doc.getSpace());
|
17,545 | UriBuilder.fromUri(baseUri).path(SpaceResource.class).build(doc.getWiki(), doc.getSpace()).toString();</BUG>
Link spaceLink = objectFactory.createLink();
spaceLink.setHref(spaceUri);
spaceLink.setRel(Relations.SPACE);
pageSummary.getLinks().add(spaceLink);
<BUG>if (parent != null) {
String parentUri =
UriBuilder.fromUri(baseUri).path(PageResource.class)
.build(parent.getWiki(), parent.getSpace(), parent.getName()).toString();</BUG>
Link parentLink = objectFactory.createLink();
| pageSummary.setParent(doc.getParent());
if (parent != null && !parent.isNew()) {
pageSummary.setParentId(parent.getPrefixedFullName());
} else {
pageSummary.setParentId("");
}
String spaceUri = uri(baseUri, SpaceResource.class, doc.getWiki(), doc.getSpace());
String parentUri = uri(baseUri, PageResource.class, parent.getWiki(), parent.getSpace(), parent.getName());
|
17,546 | Link historyLink = objectFactory.createLink();
historyLink.setHref(historyUri);
historyLink.setRel(Relations.HISTORY);
pageSummary.getLinks().add(historyLink);
if (!doc.getChildren().isEmpty()) {
<BUG>String pageChildrenUri =
UriBuilder.fromUri(baseUri).path(PageChildrenResource.class)
.build(doc.getWiki(), doc.getSpace(), doc.getName()).toString();</BUG>
Link pageChildrenLink = objectFactory.createLink();
pageChildrenLink.setHref(pageChildrenUri);
| uri(baseUri, PageChildrenResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
|
17,547 | objectsLink.setRel(Relations.OBJECTS);
pageSummary.getLinks().add(objectsLink);
}
com.xpn.xwiki.api.Object tagsObject = doc.getObject("XWiki.TagClass", 0);
if (tagsObject != null) {
<BUG>if (tagsObject.getProperty("tags") != null) {
String tagsUri =
UriBuilder.fromUri(baseUri).path(PageTagsResource.class)
.build(doc.getWiki(), doc.getSpace(), doc.getName()).toString();</BUG>
Link tagsLink = objectFactory.createLink();
| String tagsUri = uri(baseUri, PageTagsResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
|
17,548 | tagsLink.setHref(tagsUri);
tagsLink.setRel(Relations.TAGS);
pageSummary.getLinks().add(tagsLink);
}
}
<BUG>String syntaxesUri = UriBuilder.fromUri(baseUri).path(SyntaxesResource.class).build().toString();
Link syntaxesLink = objectFactory.createLink();</BUG>
syntaxesLink.setHref(syntaxesUri);
syntaxesLink.setRel(Relations.SYNTAXES);
pageSummary.getLinks().add(syntaxesLink);
| String syntaxesUri = uri(baseUri, SyntaxesResource.class);
Link syntaxesLink = objectFactory.createLink();
|
17,549 | }
return historySummary;
}
private static void fillAttachment(Attachment attachment, ObjectFactory objectFactory, URI baseUri,
<BUG>com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl,
XWiki xwikiApi, Boolean withPrettyNames)
{</BUG>
Document doc = xwikiAttachment.getDocument();
attachment.setId(String.format("%s@%s", doc.getPrefixedFullName(), xwikiAttachment.getFilename()));
| com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl, XWiki xwikiApi,
{
|
17,550 | Calendar calendar = Calendar.getInstance();
calendar.setTime(xwikiAttachment.getDate());
attachment.setDate(calendar);
attachment.setXwikiRelativeUrl(xwikiRelativeUrl);
attachment.setXwikiAbsoluteUrl(xwikiAbsoluteUrl);
<BUG>String pageUri =
UriBuilder.fromUri(baseUri).path(PageResource.class).build(doc.getWiki(), doc.getSpace(), doc.getName())
.toString();</BUG>
Link pageLink = objectFactory.createLink();
| String pageUri = uri(baseUri, PageResource.class, doc.getWiki(), doc.getSpace(), doc.getName());
|
17,551 | }
return attachmentUri;
}</BUG>
public static Attachment createAttachment(ObjectFactory objectFactory, URI baseUri,
<BUG>com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl,
XWiki xwikiApi, Boolean withPrettyNames)
{</BUG>
Attachment attachment = objectFactory.createAttachment();
fillAttachment(attachment, objectFactory, baseUri, xwikiAttachment, xwikiRelativeUrl, xwikiAbsoluteUrl,
| com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl, XWiki xwikiApi,
{
|
17,552 | attachmentLink.setRel(Relations.ATTACHMENT_DATA);
attachment.getLinks().add(attachmentLink);
return attachment;
}
public static Attachment createAttachmentAtVersion(ObjectFactory objectFactory, URI baseUri,
<BUG>com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl,
XWiki xwikiApi, Boolean withPrettyNames)
{</BUG>
Attachment attachment = new Attachment();
| com.xpn.xwiki.api.Attachment xwikiAttachment, String xwikiRelativeUrl, String xwikiAbsoluteUrl, XWiki xwikiApi,
{
|
17,553 | .build(doc.getWiki(), doc.getSpace(), doc.getName(), doc.getVersion(),
xwikiObject.getClassName(),
xwikiObject.getNumber()).toString();</BUG>
} else {
<BUG>propertiesUri =
UriBuilder
.fromUri(baseUri)
.path(ObjectPropertiesResource.class)
.build(doc.getWiki(), doc.getSpace(), doc.getName(), xwikiObject.getClassName(),
xwikiObject.getNumber()).toString();</BUG>
}
| fillObjectSummary(objectSummary, objectFactory, baseUri, doc, xwikiObject, xwikiApi, withPrettyNames);
Link objectLink = getObjectLink(objectFactory, baseUri, doc, xwikiObject, useVersion, Relations.OBJECT);
objectSummary.getLinks().add(objectLink);
String propertiesUri;
if (useVersion) {
uri(baseUri, ObjectPropertiesAtPageVersionResource.class, doc.getWiki(), doc.getSpace(), doc.getName(),
doc.getVersion(), xwikiObject.getClassName(), xwikiObject.getNumber());
uri(baseUri, ObjectPropertiesResource.class, doc.getWiki(), doc.getSpace(), doc.getName(),
xwikiObject.getClassName(), xwikiObject.getNumber());
|
17,554 | .build(doc.getWiki(), doc.getSpace(), doc.getName(), doc.getVersion(),
xwikiObject.getClassName(), xwikiObject.getNumber(), propertyClass.getName())
.toString();</BUG>
} else {
<BUG>propertyUri =
UriBuilder
.fromUri(baseUri)
.path(ObjectPropertyResource.class)
.build(doc.getWiki(), doc.getSpace(), doc.getName(), xwikiObject.getClassName(),
xwikiObject.getNumber(), propertyClass.getName()).toString();</BUG>
}
| propertiesUri =
uri(baseUri, ObjectPropertiesResource.class, doc.getWiki(), doc.getSpace(), doc.getName(),
xwikiObject.getClassName(), xwikiObject.getNumber());
|
17,555 | .build(doc.getWiki(), doc.getSpace(), doc.getName(), doc.getVersion(),
xwikiObject.getClassName(),
xwikiObject.getNumber()).toString();</BUG>
} else {
<BUG>objectUri =
UriBuilder
.fromUri(baseUri)
.path(ObjectResource.class)
.build(doc.getWiki(), doc.getSpace(), doc.getName(), xwikiObject.getClassName(),
xwikiObject.getNumber()).toString();</BUG>
}
| private static Link getObjectLink(ObjectFactory objectFactory, URI baseUri, Document doc, BaseObject xwikiObject,
boolean useVersion, String relation)
String objectUri;
if (useVersion) {
uri(baseUri, ObjectAtPageVersionResource.class, doc.getWiki(), doc.getSpace(), doc.getName(),
doc.getVersion(), xwikiObject.getClassName(), xwikiObject.getNumber());
uri(baseUri, ObjectResource.class, doc.getWiki(), doc.getSpace(), doc.getName(),
xwikiObject.getClassName(), xwikiObject.getNumber());
|
17,556 | Link propertyLink = objectFactory.createLink();
propertyLink.setHref(propertyUri);
propertyLink.setRel(Relations.SELF);
property.getLinks().add(propertyLink);
clazz.getProperties().add(property);
<BUG>}
String classUri =
UriBuilder.fromUri(baseUri).path(ClassResource.class).build(wikiName, xwikiClass.getName()).toString();</BUG>
Link classLink = objectFactory.createLink();
classLink.setHref(classUri);
| String classUri = uri(baseUri, ClassResource.class, wikiName, xwikiClass.getName());
|
17,557 | String classUri =
UriBuilder.fromUri(baseUri).path(ClassResource.class).build(wikiName, xwikiClass.getName()).toString();</BUG>
Link classLink = objectFactory.createLink();
classLink.setHref(classUri);
classLink.setRel(Relations.SELF);
<BUG>clazz.getLinks().add(classLink);
String propertiesUri =
UriBuilder.fromUri(baseUri).path(ClassPropertiesResource.class).build(wikiName, xwikiClass.getName())
.toString();</BUG>
Link propertyLink = objectFactory.createLink();
| propertyLink.setHref(propertyUri);
propertyLink.setRel(Relations.SELF);
property.getLinks().add(propertyLink);
clazz.getProperties().add(property);
}
String classUri = uri(baseUri, ClassResource.class, wikiName, xwikiClass.getName());
String propertiesUri = uri(baseUri, ClassPropertiesResource.class, wikiName, xwikiClass.getName());
|
17,558 | <BUG>package org.xwiki.rest.internal;
import org.apache.commons.lang3.StringUtils;</BUG>
import org.xwiki.component.manager.ComponentManager;
import org.xwiki.context.Execution;
import org.xwiki.model.reference.EntityReferenceSerializer;
| import java.net.URI;
import javax.ws.rs.core.UriBuilder;
import org.apache.commons.httpclient.URIException;
import org.apache.commons.httpclient.util.URIUtil;
import org.apache.commons.lang3.StringUtils;
|
17,559 | import org.openmrs.GlobalProperty;
import org.openmrs.Person;</BUG>
import org.openmrs.PersonName;
import org.openmrs.Privilege;
import org.openmrs.Provider;
<BUG>import org.openmrs.Role;
import org.openmrs.api.AdministrationService;</BUG>
import org.openmrs.api.ConceptService;
import org.openmrs.api.PersonService;
import org.openmrs.api.ProviderService;
| import org.openmrs.Location;
import org.openmrs.OpenmrsMetadata;
import org.openmrs.PatientIdentifierType;
import org.openmrs.Person;
import org.openmrs.VisitType;
import org.openmrs.api.AdministrationService;
|
17,560 | unknownProvider.setPerson(unknownPerson);
unknownProvider.setIdentifier("UNKNOWN");
unknownProvider.setUuid("f9badd80-ab76-11e2-9e96-0800200c9a66");
providerService.saveProvider(unknownProvider);
}
<BUG>coreApiUnknownProviderUuid.setPropertyValue(unknownProvider.getUuid());
adminService.saveGlobalProperty(coreApiUnknownProviderUuid);
emrApiUnknownProviderUuid.setPropertyValue(unknownProvider.getUuid());
adminService.saveGlobalProperty(emrApiUnknownProviderUuid);
}</BUG>
public ConceptSource createConceptSource(ConceptService conceptService) {
| if(mapping == null){
mapping = new MetadataTermMapping(emrSource, EmrApiConstants.GP_UNKNOWN_PROVIDER, unknownProvider);
metadataMappingService.saveMetadataTermMapping(mapping);
} else if (mapping.getMetadataUuid() == null){
mapping.setMappedObject(unknownProvider);
metadataMappingService.saveMetadataTermMapping(mapping);
|
17,561 | <BUG>package org.openmrs.module.emrapi;
public class EmrApiConstants {</BUG>
public static final String GP_UNKNOWN_LOCATION = "emr.unknownLocation";
public static final String GP_UNKNOWN_PROVIDER = "emr.unknownProvider";
public static final String GP_ORDERING_PROVIDER_ENCOUNTER_ROLE = "emr.orderingProviderEncounterRole";
| import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class EmrApiConstants {
|
17,562 | public static final String PRIMARY_IDENTIFIER_TYPE = "emr.primaryIdentifierType";
public static final String GP_EXTRA_PATIENT_IDENTIFIER_TYPES = "emr.extraPatientIdentifierTypes";
public static final String SAME_AS_CONCEPT_MAP_TYPE_UUID = "35543629-7d8c-11e1-909d-c80aa9edcf4e";
public static final String NARROWER_THAN_CONCEPT_MAP_TYPE_UUID = "43ac5109-7d8c-11e1-909d-c80aa9edcf4e";
public static final String EMR_CONCEPT_SOURCE_NAME = "org.openmrs.module.emrapi";
<BUG>public static final String EMR_CONCEPT_SOURCE_DESCRIPTION = "Source used to tag concepts used in the EMR API module";
public static final String EMR_CONCEPT_SOURCE_UUID = "edd52713-8887-47b7-ba9e-6e1148824ca4";</BUG>
public static final String GP_DIAGNOSIS_SET_OF_SETS = "emr.concept.diagnosisSetOfSets";
public static final String GP_NON_DIAGNOSIS_CONCEPT_SETS = "emrapi.nonDiagnosisConceptSets";
public static final String GP_SUPPRESSED_DIAGNOSIS_CONCEPTS = "emrapi.suppressedDiagnosisConcepts";
| public static final String EMR_METADATA_SOURCE_NAME = "org.openmrs.module.emrapi";
public static final String EMR_METADATA_SOURCE_DESCRIPTION = "Source used to tag metadata used in the EMR API module";
public static final String EMR_CONCEPT_SOURCE_UUID = "edd52713-8887-47b7-ba9e-6e1148824ca4";
|
17,563 | if (currentprojectId != bModel.getProject().getId()) {
bModel.clearRememberedFeatures();
}
currentprojectId = bModel.getProject().getId();
bModel.setConstraints(loadConstraints(bModel.getProject()));
<BUG>LOG.debug("Configured BratAnnotatorModel for user [" + bModel.getUser()
+ "] f:[" + bModel.getFirstSentenceAddress() + "] l:["
+ bModel.getLastSentenceAddress() + "] s:["
+ bModel.getSentenceAddress() + "]");
}</BUG>
private void setCurationSegmentBeginEnd()
| LOG.debug("Configured BratAnnotatorModel for user [" + bModel.getUser() + "] f:["
+ bModel.getFirstVisibleSentenceNumber() + "] l:["
+ bModel.getLastVisibleSentenceNumber() + "] s:[" + bModel.getFocusSentenceNumber()
|
17,564 | </BUG>
{
return firstSentenceAddress;
}
@Override
<BUG>public void setFirstSentenceAddress(int aFirstSentenceAddress)
</BUG>
{
firstSentenceAddress = aFirstSentenceAddress;
}
| public void setSentenceAddress(int aSentenceAddress)
displayWindowStartSentenceAddress = aSentenceAddress;
public int getFirstSentenceInCasAddress()
public void setFirstSentenceInCasAddress(int aFirstSentenceAddress)
|
17,565 | public void initForDocument(JCas aJCas, RepositoryService aRepository)
{
getSelection().clear();
clearArmedSlot();
setSentenceAddress(BratAjaxCasUtil.getFirstSentenceAddress(aJCas));
<BUG>setFirstSentenceAddress(BratAjaxCasUtil.getFirstSentenceAddress(aJCas));
setLastSentenceAddress(BratAjaxCasUtil.getLastSentenceAddress(aJCas));</BUG>
getPreferences().setWindowSize(aRepository.getNumberOfSentences());
Sentence sentence = selectByAddr(aJCas, Sentence.class, getSentenceAddress());
| setFirstSentenceInCasAddress(BratAjaxCasUtil.getFirstSentenceAddress(aJCas));
|
17,566 | error("chains cannot be reversed");
return;
}
repository.writeCas(aBModel.getMode(), aBModel.getDocument(), aBModel.getUser(), jCas);
int sentenceNumber = getSentenceNumber(jCas, originFs.getBegin());
<BUG>aBModel.setSentenceNumber(sentenceNumber);
</BUG>
aBModel.getDocument().setSentenceAccessed(sentenceNumber);
if (aBModel.getPreferences().isScrollPage()) {
autoScroll(jCas, aBModel, false);
| aBModel.setFocusSentenceNumber(sentenceNumber);
|
17,567 | aBModel.setSentenceAddress(address);
}
else {
Sentence sentence = selectSentenceAt(jCas, aBModel.getSentenceBeginOffset(),
aBModel.getSentenceEndOffset());
<BUG>int address = findWindowStartCenteringOnSelection(jCas, getAddr(sentence),
aBModel.getSelection().getBegin(), aBModel.getProject(), aBModel.getDocument(),</BUG>
aBModel.getPreferences().getWindowSize());
aBModel.setSentenceAddress(address);
}
| int address = findWindowStartCenteringOnSelection(jCas, sentence,
aBModel.getSelection().getBegin(), aBModel.getProject(), aBModel.getDocument(),
|
17,568 | else {
break;
}
s = si.get();
}
<BUG>Sentence c = (Sentence) selectByAddr(aJcas.getCas(), aSentenceAddress);
Sentence n = (Sentence) selectByAddr(aJcas.getCas(), getAddr(s));
if (aWindowSize == 2 && n.getBegin() > c.getBegin()) {</BUG>
return getAddr(s);
}
| Sentence c = (Sentence) aSentence;
Sentence n = (Sentence) s;
if (aWindowSize == 2 && n.getBegin() > c.getBegin()) {
|
17,569 | bModel.getSentenceEndOffset());
int lastAddressInPage = getLastSentenceAddressInDisplayWindow(aJCas,
getAddr(firstSentence), bModel.getPreferences().getWindowSize());
Sentence lastSentenceInPage = (Sentence) selectByAddr(aJCas, FeatureStructure.class,
lastAddressInPage);
<BUG>bModel.setFirstSentenceNumber(BratAjaxCasUtil.getSentenceNumber(aJCas, firstSentence.getBegin()));
bModel.setLastSentenceNumber(BratAjaxCasUtil.getSentenceNumber(aJCas, lastSentenceInPage.getBegin()));
</BUG>
}
| bModel.setFirstVisibleSentenceNumber(BratAjaxCasUtil.getSentenceNumber(aJCas, firstSentence.getBegin()));
bModel.setLastVisibleSentenceNumber(BratAjaxCasUtil.getSentenceNumber(aJCas, lastSentenceInPage.getBegin()));
|
17,570 | import de.tudarmstadt.ukp.clarin.webanno.model.SourceDocument;
import de.tudarmstadt.ukp.clarin.webanno.model.User;
public interface AnnotatorState
{
public void initForDocument(JCas aJCas, RepositoryService aRepository);
<BUG>public int getSentenceNumber();
public void setSentenceNumber(int sentenceNumber);
</BUG>
public int getSentenceAddress();
| public int getFocusSentenceNumber();
public void setFocusSentenceNumber(int sentenceNumber);
|
17,571 | int previousSentenceAddress = BratAjaxCasUtil
.getPreviousDisplayWindowSentenceBeginAddress(jCas, bModel
.getSentenceAddress(), bModel.getPreferences()
.getWindowSize());
if(previousSentenceAddress==bModel.getSentenceAddress()
<BUG>&& bModel.getSentenceAddress()!=bModel.getFirstSentenceAddress()){
previousSentenceAddress = bModel.getFirstSentenceAddress();
</BUG>
}
| && bModel.getSentenceAddress()!=bModel.getFirstSentenceInCasAddress()){
previousSentenceAddress = bModel.getFirstSentenceInCasAddress();
|
17,572 | bModel.getSentenceEndOffset());
int lastAddressInPage = getLastSentenceAddressInDisplayWindow(aJCas,
getAddr(firstSentence), bModel.getPreferences().getWindowSize());
Sentence lastSentenceInPage = (Sentence) selectByAddr(aJCas, FeatureStructure.class,
lastAddressInPage);
<BUG>bModel.setFirstSentenceNumber(BratAjaxCasUtil.getSentenceNumber(aJCas, firstSentence.getBegin()));
bModel.setLastSentenceNumber(BratAjaxCasUtil.getSentenceNumber(aJCas, lastSentenceInPage.getBegin()));
</BUG>
}
| bModel.setFirstVisibleSentenceNumber(BratAjaxCasUtil.getSentenceNumber(aJCas, firstSentence.getBegin()));
bModel.setLastVisibleSentenceNumber(BratAjaxCasUtil.getSentenceNumber(aJCas, lastSentenceInPage.getBegin()));
|
17,573 | if (currentprojectId != bModel.getProject().getId()) {
bModel.clearRememberedFeatures();
}
currentprojectId = bModel.getProject().getId();
LOG.debug("Configured BratAnnotatorModel for user [" + bModel.getUser() + "] f:["
<BUG>+ bModel.getFirstSentenceAddress() + "] l:[" + bModel.getLastSentenceAddress()
+ "] s:[" + bModel.getSentenceAddress() + "]");
gotoPageTextField.setModelObject(1);</BUG>
updateSentenceAddress(jcas, aTarget);
aTarget.add(AnnotationPage.this);
| + bModel.getFirstVisibleSentenceNumber() + "] l:["
+ bModel.getLastVisibleSentenceNumber() + "] s:["
+ bModel.getFocusSentenceNumber() + "]");
gotoPageTextField.setModelObject(1);
|
17,574 | public NodeFirstRelationshipStage( Configuration config, NodeStore nodeStore,
RelationshipGroupStore relationshipGroupStore, NodeRelationshipLink cache )
{
super( "Node --> Relationship", config, false );
add( new ReadNodeRecordsStep( control(), config.batchSize(), config.movingAverageSize(), nodeStore ) );
<BUG>add( new NodeFirstRelationshipStep( control(), config.workAheadSize(), config.movingAverageSize(),
nodeStore, relationshipGroupStore, cache ) );
add( new UpdateRecordsStep<>( control(), config.workAheadSize(), config.movingAverageSize(), nodeStore ) );</BUG>
}
| add( new RecordProcessorStep<>( control(), "LINK", config.workAheadSize(), config.movingAverageSize(),
new NodeFirstRelationshipProcessor( relationshipGroupStore, cache ), false ) );
add( new UpdateRecordsStep<>( control(), config.workAheadSize(), config.movingAverageSize(), nodeStore ) );
|
17,575 | import org.neo4j.kernel.impl.api.CountsAccessor;
import org.neo4j.kernel.impl.store.NodeLabelsField;
import org.neo4j.kernel.impl.store.NodeStore;
import org.neo4j.kernel.impl.store.record.NodeRecord;
import org.neo4j.unsafe.impl.batchimport.cache.NodeLabelsCache;
<BUG>public class NodeCountsProcessor implements StoreProcessor<NodeRecord>
</BUG>
{
private final NodeStore nodeStore;
private final long[] labelCounts;
| public class NodeCountsProcessor implements RecordProcessor<NodeRecord>
|
17,576 | super.addStatsProviders( providers );
providers.add( monitor );
}
@Override
protected void done()
<BUG>{
monitor.stop();</BUG>
}
@Override
public int numberOfProcessors()
| super.done();
monitor.stop();
|
17,577 | import org.neo4j.kernel.impl.store.RelationshipGroupStore;
import org.neo4j.kernel.impl.store.record.NodeRecord;
import org.neo4j.kernel.impl.store.record.RelationshipGroupRecord;
import org.neo4j.unsafe.impl.batchimport.cache.NodeRelationshipLink;
import org.neo4j.unsafe.impl.batchimport.cache.NodeRelationshipLink.GroupVisitor;
<BUG>public class NodeFirstRelationshipProcessor implements StoreProcessor<NodeRecord>, GroupVisitor
</BUG>
{
private final RelationshipGroupStore relGroupStore;
private final NodeRelationshipLink nodeRelationshipLink;
| public class NodeFirstRelationshipProcessor implements RecordProcessor<NodeRecord>, GroupVisitor
|
17,578 | import de.vanita5.twittnuker.receiver.NotificationReceiver;
import de.vanita5.twittnuker.service.LengthyOperationsService;
import de.vanita5.twittnuker.util.ActivityTracker;
import de.vanita5.twittnuker.util.AsyncTwitterWrapper;
import de.vanita5.twittnuker.util.DataStoreFunctionsKt;
<BUG>import de.vanita5.twittnuker.util.DataStoreUtils;
import de.vanita5.twittnuker.util.ImagePreloader;</BUG>
import de.vanita5.twittnuker.util.InternalTwitterContentUtils;
import de.vanita5.twittnuker.util.JsonSerializer;
import de.vanita5.twittnuker.util.NotificationManagerWrapper;
| import de.vanita5.twittnuker.util.DebugLog;
import de.vanita5.twittnuker.util.ImagePreloader;
|
17,579 | final List<InetAddress> addresses = mDns.lookup(host);
for (InetAddress address : addresses) {
c.addRow(new String[]{host, address.getHostAddress()});
}
} catch (final IOException ignore) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, ignore);
}</BUG>
}
| DebugLog.w(LOGTAG, null, ignore);
|
17,580 | @Override
public void afterExecute(Bus handler, SingleResponse<Relationship> result) {
if (result.hasData()) {
handler.post(new FriendshipUpdatedEvent(accountKey, userKey, result.getData()));
} else if (result.hasException()) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, "Unable to update friendship", result.getException());
}</BUG>
}
| public UserKey[] getAccountKeys() {
return DataStoreUtils.getActivatedAccountKeys(context);
|
17,581 | MicroBlog microBlog = MicroBlogAPIFactory.getInstance(context, accountId);
if (!Utils.isOfficialCredentials(context, accountId)) continue;
try {
microBlog.setActivitiesAboutMeUnread(cursor);
} catch (MicroBlogException e) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, e);
}</BUG>
}
| DebugLog.w(LOGTAG, null, e);
|
17,582 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
twitter.updateProfileBannerImage(fileBody);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.format("Unable to delete %s", file));
}</BUG>
}
| if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
17,583 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
twitter.updateProfileBackgroundImage(fileBody, tile);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.format("Unable to delete %s", file));
}</BUG>
}
| twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
17,584 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
return twitter.updateProfileImage(fileBody);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.format("Unable to delete %s", file));
}</BUG>
}
| twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
17,585 | import de.vanita5.twittnuker.annotation.CustomTabType;
import de.vanita5.twittnuker.library.MicroBlog;
import de.vanita5.twittnuker.library.MicroBlogException;
import de.vanita5.twittnuker.library.twitter.model.RateLimitStatus;
import de.vanita5.twittnuker.library.twitter.model.Status;
<BUG>import de.vanita5.twittnuker.fragment.AbsStatusesFragment;
import org.mariotaku.sqliteqb.library.AllColumns;</BUG>
import org.mariotaku.sqliteqb.library.Columns;
import org.mariotaku.sqliteqb.library.Columns.Column;
import org.mariotaku.sqliteqb.library.Expression;
| import org.mariotaku.pickncrop.library.PNCUtils;
import org.mariotaku.sqliteqb.library.AllColumns;
|
17,586 | context.getApplicationContext().sendBroadcast(intent);
}
}
@Nullable
public static Location getCachedLocation(Context context) {
<BUG>if (BuildConfig.DEBUG) {
Log.v(LOGTAG, "Fetching cached location", new Exception());
}</BUG>
Location location = null;
| DebugLog.v(LOGTAG, "Fetching cached location", new Exception());
|
17,587 | import java.util.List;
import java.util.Map.Entry;
import javax.inject.Singleton;
import okhttp3.Dns;
@Singleton
<BUG>public class TwidereDns implements Constants, Dns {
</BUG>
private static final String RESOLVER_LOGTAG = "TwittnukerDns";
private final SharedPreferences mHostMapping;
private final SharedPreferencesWrapper mPreferences;
| public class TwidereDns implements Dns, Constants {
|
17,588 | for (Location location : twitter.getAvailableTrends()) {
map.put(location);
}
return map.pack();
} catch (final MicroBlogException e) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, e);
}</BUG>
}
| DebugLog.w(LOGTAG, null, e);
|
17,589 | public class Relationship {
private static final int ARROWHEAD_LENGTH = 10;</BUG>
private static final int ARROWHEAD_WIDTH = ARROWHEAD_LENGTH / 2;
private Line edge;
private HTML label;
<BUG>private Widget from;
private Widget to;
</BUG>
private Line arrowheadLeft;
| package org.neo4j.server.ext.visualization.gwt.client;
import org.vaadin.gwtgraphics.client.Line;
import com.google.gwt.dom.client.Style;
import com.google.gwt.dom.client.Style.Position;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.ui.HTML;
private static final int ARROWHEAD_LENGTH = 10;
private Node from;
private Node to;
|
17,590 | arrowheadRight = new Line(0, 0, 0, 0);
parent.add(arrowheadRight);
updateArrowhead();
}
private void addEdge(VGraphComponent parent) {
<BUG>edge = new Line((int) Math.round(getCenterX(from)),
(int) Math.round(getCenterY(from)),
(int) Math.round(getCenterX(to)),
(int) Math.round(getCenterY(to)));
</BUG>
parent.add(edge);
| [DELETED] |
17,591 | label = new HTML("<div style='text-align:center'>" + type + "</div>");
parent.add(label);
Style style = label.getElement().getStyle();
style.setPosition(Position.ABSOLUTE);
style.setBackgroundColor("white");
<BUG>style.setFontSize(9, Unit.PX);
</BUG>
updateLabel();
}
void update() {
| style.setFontSize(10, Unit.PX);
|
17,592 | void update() {
updateEdge();
updateLabel();
updateArrowhead();
}
<BUG>private void updateArrowhead() {
double originX = getArrowheadOrigin(getCenterX(from), getCenterX(to));
double originY = getArrowheadOrigin(getCenterY(from), getCenterY(to));
double angle = Math.atan2(getCenterY(to) - getCenterY(from),
getCenterX(to) - getCenterX(from));</BUG>
double leftX = originX
| double fromX = from.getCenterX();
double fromY = from.getCenterY();
double toX = to.getCenterX();
double toY = to.getCenterY();
double originX = getArrowheadOrigin(fromX, toX);
double originY = getArrowheadOrigin(fromY, toY);
double angle = Math.atan2(toY - fromY, toX - fromX);
|
17,593 | double rightY = originY
+ rotateY(-ARROWHEAD_LENGTH, ARROWHEAD_WIDTH, angle);
updateLine(arrowheadRight, originX, originY, rightX, rightY);
}
private void updateEdge() {
<BUG>updateLine(edge, getCenterX(from), getCenterY(from), getCenterX(to),
getCenterY(to));
</BUG>
}
| updateLine(edge, from.getCenterX(), from.getCenterY(), to.getCenterX(),
to.getCenterY());
|
17,594 | cgl.setLexicalvalue(valueEdit);
cgl.setIdgroup(idDomaine);
cgl.setIdthesaurus(idTheso);
cgl.setLang(langueEdit);
GroupHelper cgh = new GroupHelper();
<BUG>if (!cgh.isDomainExist(connect.getPoolConnexion(),
cgl.getLexicalvalue(),</BUG>
cgl.getIdthesaurus(), cgl.getLang())) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error") + " :", langueBean.getMsg("sTerme.error4")));
return;
| if (cgh.isDomainExist(connect.getPoolConnexion(),
cgl.getLexicalvalue(),
|
17,595 | Term terme = new Term();
terme.setId_thesaurus(idTheso);
terme.setLang(langueEdit);
terme.setLexical_value(valueEdit);
terme.setId_term(idT);
<BUG>if (new TermHelper().isTermExist(connect.getPoolConnexion(),
</BUG>
terme.getLexical_value(),
terme.getId_thesaurus(), terme.getLang())) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error") + " :", langueBean.getMsg("sTerme.error4")));
| if (termHelper.isTermExist(connect.getPoolConnexion(),
|
17,596 | Term terme = new Term();
terme.setId_thesaurus(idTheso);
terme.setLang(langueEdit);
terme.setLexical_value(valueEdit);
terme.setId_term(idT);
<BUG>if (new TermHelper().isTermExist(connect.getPoolConnexion(),
</BUG>
terme.getLexical_value(),
terme.getId_thesaurus(), terme.getLang())) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error") + " :", langueBean.getMsg("sTerme.error4")));
| if (termHelper.isTermExist(connect.getPoolConnexion(),
|
17,597 | langues = new ArrayList<>();
HashMap<String, String> tempMapL = new HashMap<>();
for (NodeTermTraduction ntt : tempNTT) {
tempMapL.put(ntt.getLang(), ntt.getLexicalValue());
}
<BUG>langues.addAll(tempMapL.entrySet());
}</BUG>
langueEdit = "";
valueEdit = "";
if (!tradExist) {
| if(newTraduction) {
nom = termHelper.getThisTerm(connect.getPoolConnexion(),idC, idTheso, idlangue).getLexical_value();
|
17,598 | if (n.getTitle().trim().isEmpty()) {
dynamicTreeNode = (TreeNode) new MyTreeNode(1, n.getIdConcept(), idTheso, idlangue, "", "", "dossier", n.getIdConcept(), root);
} else {
dynamicTreeNode = (TreeNode) new MyTreeNode(1, n.getIdConcept(), idTheso, idlangue, "", "", "dossier", n.getTitle(), root);
}
<BUG>new DefaultTreeNode("fake", dynamicTreeNode);
}</BUG>
}
public void onNodeExpand(NodeExpandEvent event) {
String theso = ((MyTreeNode) event.getTreeNode()).getIdTheso();
| DefaultTreeNode defaultTreeNode = new DefaultTreeNode("fake", dynamicTreeNode);
defaultTreeNode.setExpanded(true);
|
17,599 | SKOSXmlDocument sxd = new ReadFileSKOS().readStringBuffer(sb);
for (SKOSResource resource : sxd.getResourcesList()) {
NodeAlignment na = new NodeAlignment();
na.setInternal_id_concept(idC);
na.setInternal_id_thesaurus(idTheso);
<BUG>na.setThesaurus_target("OpenTheso");
</BUG>
na.setUri_target(resource.getUri());
for(SKOSLabel label : resource.getLabelsList()) {
switch (label.getProperty()) {
| na.setThesaurus_target("Pactols");
|
17,600 | import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
<BUG>import android.support.v4.app.NavUtils;
import android.support.v7.app.AppCompatActivity;</BUG>
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.ContextMenu;
| import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.AppCompatActivity;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.