id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
19,501
inputExtraRuleCommentDatetimeReplacement.setText(site.extraRule.commentDatetime.replacement); } if (site.extraRule.commentContent != null) { inputExtraRuleCommentContentSelector.setText(joinSelector(site.extraRule.commentContent)); inputExtraRuleCommentContentRegex.setText(site.extraRule.commentContent.regex); <BUG>inp...
[DELETED]
19,502
lastSite.galleryRule.cover = loadSelector(inputGalleryRuleCoverSelector, inputGalleryRuleCoverRegex, inputGalleryRuleCoverReplacement); lastSite.galleryRule.category = loadSelector(inputGalleryRuleCategorySelector, inputGalleryRuleCategoryRegex, inputGalleryRuleCategoryReplacement); lastSite.galleryRule.datetime = load...
lastSite.galleryRule.pictureRule = (lastSite.galleryRule.pictureRule == null) ? new PictureRule() : lastSite.galleryRule.pictureRule; lastSite.galleryRule.pictureRule.thumbnail = loadSelector(inputGalleryRulePictureThumbnailSelector, inputGalleryRulePictureThumbnailRegex, inputGalleryRulePictureThumbnailReplacement); l...
19,503
lastSite.extraRule.cover = loadSelector(inputExtraRuleCoverSelector, inputExtraRuleCoverRegex, inputExtraRuleCoverReplacement); lastSite.extraRule.category = loadSelector(inputExtraRuleCategorySelector, inputExtraRuleCategoryRegex, inputExtraRuleCategoryReplacement); lastSite.extraRule.datetime = loadSelector(inputExtr...
lastSite.extraRule.pictureRule = (lastSite.extraRule.pictureRule == null) ? new PictureRule() : lastSite.extraRule.pictureRule; lastSite.extraRule.pictureRule.thumbnail = loadSelector(inputExtraRulePictureThumbnailSelector, inputExtraRulePictureThumbnailRegex, inputExtraRulePictureThumbnailReplacement); lastSite.extraR...
19,504
notifyItemChanged(position); if (mItemClickListener != null) mItemClickListener.onItemClick(v, position); } }); <BUG>if (tag.selected) label.getChildAt(0).setBackgroundResource(R.color.colorPrimary); else label.getChildAt(0).setBackgroundResource(R.color.dimgray);</BUG> }
[DELETED]
19,505
loadPicture(picture, task, null, true); } else if (!TextUtils.isEmpty(picture.pic) && !highRes) { picture.retries = 0; loadPicture(picture, task, null, false); } else if (task.collection.site.hasFlag(Site.FLAG_SINGLE_PAGE_BIG_PICTURE) <BUG>&& task.collection.site.extraRule != null && task.collection.site.extraRule.pic...
&& task.collection.site.extraRule != null) { if(task.collection.site.extraRule.pictureRule != null && task.collection.site.extraRule.pictureRule.url != null) getPictureUrl(picture, task, task.collection.site.extraRule.pictureRule.url, task.collection.site.extraRule.pictureRule.highRes); else if(task.collection.site.ext...
19,506
if (Picture.hasPicPosfix(picture.url)) { picture.pic = picture.url; loadPicture(picture, task, null, false); } else if (task.collection.site.hasFlag(Site.FLAG_JS_NEEDED_ALL)) { <BUG>new Handler(Looper.getMainLooper()).post(()->{ </BUG> WebView webView = new WebView(HViewerApplication.mContext); WebSettings mWebSettings...
new Handler(Looper.getMainLooper()).post(() -> {
19,507
if(command.isHidden()) { continue; } String alias = command instanceof CommandMarry ? "" : command.getAliases()[0] + " "; String text = "&a/marry " + alias + command.getUsage() + " &f- &7" + command.getDescription(); <BUG>if(command.getExecutionFee() == 0.0 || !Bukkit.getVersion().contains("Spigot")) { </BUG> reply(tex...
if(command.getExecutionFee() == 0.0 || !Bukkit.getVersion().contains("Spigot") || !marriage.dependencies().isEconomyEnabled()) {
19,508
.replace("{heart}", "\u2764") .replace("{partner}", partner); status = formatIcons(status); status = ChatColor.translateAlternateColorCodes('&', status); } <BUG>event.setFormat(format.replace("{marriage_status}", status)); </BUG> } if(format.contains("{marriage_gender}")) { String gender = mplayer.getGender().getChatPr...
format = format.replace("{marriage_status}", status);
19,509
} if(format.contains("{marriage_gender}")) { String gender = mplayer.getGender().getChatPrefix(); gender = formatIcons(gender); gender = ChatColor.translateAlternateColorCodes('&', gender); <BUG>event.setFormat(format.replace("{marriage_gender}", gender)); } }</BUG> private String formatIcons(String text) {
format = format.replace("{marriage_status}", status); format = format.replace("{marriage_gender}", gender); event.setFormat(format);
19,510
} @RootTask static Task<Exec.Result> exec(String parameter, int number) { Task<String> task1 = MyTask.create(parameter); Task<Integer> task2 = Adder.create(number, number + 2); <BUG>return Task.ofType(Exec.Result.class).named("exec", "/bin/sh") .in(() -> task1)</BUG> .in(() -> task2) .process(Exec.exec((str, i) -> args...
return Task.named("exec", "/bin/sh").ofType(Exec.Result.class) .in(() -> task1)
19,511
return args; } static class MyTask { static final int PLUS = 10; static Task<String> create(String parameter) { <BUG>return Task.ofType(String.class).named("MyTask", parameter) .in(() -> Adder.create(parameter.length(), PLUS))</BUG> .in(() -> Fib.create(parameter.length())) .process((sum, fib) -> something(parameter, s...
return Task.named("MyTask", parameter).ofType(String.class) .in(() -> Adder.create(parameter.length(), PLUS))
19,512
} @RootTask public static Task<String> standardArgs(int first, String second) { firstInt = first; secondString = second; <BUG>return Task.ofType(String.class).named("StandardArgs", first, second) .process(() -> second + " " + first * 100);</BUG> } @Test public void shouldParseFlags() throws Exception {
return Task.named("StandardArgs", first, second).ofType(String.class) .process(() -> second + " " + first * 100);
19,513
assertThat(parsedEnum, is(CustomEnum.BAR)); } @RootTask public static Task<String> enums(CustomEnum enm) { parsedEnum = enm; <BUG>return Task.ofType(String.class).named("Enums", enm) .process(enm::toString);</BUG> } @Test public void shouldParseCustomTypes() throws Exception {
return Task.named("Enums", enm).ofType(String.class) .process(enm::toString);
19,514
assertThat(parsedType.content, is("blarg parsed for you!")); } @RootTask public static Task<String> customType(CustomType myType) { parsedType = myType; <BUG>return Task.ofType(String.class).named("Types", myType.content) .process(() -> myType.content);</BUG> } public enum CustomEnum { BAR
return Task.named("Types", myType.content).ofType(String.class) .process(() -> myType.content);
19,515
TaskContext taskContext = TaskContext.inmem(); TaskContext.Value<Long> value = taskContext.evaluate(fib92); value.consume(f92 -> System.out.println("fib(92) = " + f92)); } static Task<Long> create(long n) { <BUG>TaskBuilder<Long> fib = Task.ofType(Long.class).named("Fib", n); </BUG> if (n < 2) { return fib .process(() ...
TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
19,516
EditorCell_Collection result = jetbrains.mps.nodeEditor.cells.EditorCell_Collection.createIndent2(editorContext, node); result.setBig(true); result.getStyle().putAll(StyleRegistry.getInstance().getStyle("LINE_COMMENT"), 1); result.addEditorCell(createCommentConstantCell(editorContext, node, true)); result.addEditorCell...
result.setCellId("main_comment_collection"); return result;
19,517
} private EditorCell_Constant createCommentConstantCell(jetbrains.mps.openapi.editor.EditorContext editorContext, SNode node, boolean left) { EditorCell_Constant cell = new EditorCell_Constant(editorContext, node, left ? "/*" : "*/", false); StyleImpl style = new StyleImpl(); style.set(left ? StyleAttributes.PUNCTUATIO...
cell.setCellId(left ? "left_comment_constant" : "right_comment_constant"); return cell;
19,518
import org.jetbrains.annotations.NotNull; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.openapi.editor.EditorContext; import jetbrains.mps.openapi.editor.selection.Selection; import jetbrains.mps.openapi.editor.selection.SingularSelection; <BUG>import jetbrains.mps.opena...
import jetbrains.mps.openapi.editor.cells.EditorCell_Label; import jetbrains.mps.nodeEditor.cells.CellFinderUtil;
19,519
import jetbrains.mps.editor.runtime.cells.AbstractCellAction; import org.jetbrains.mps.openapi.model.SNode; import org.jetbrains.annotations.NotNull; import jetbrains.mps.openapi.editor.EditorContext; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; <BUG>import jetbrains.mps.openapi.editor.cell...
import jetbrains.mps.openapi.editor.cells.EditorCell_Label; import jetbrains.mps.nodeEditor.cells.CellFinderUtil;
19,520
w.writeMarkup( " <i>(Optional)</i>" ); } if ( parameter.getExpression() != null && parameter.getExpression().startsWith( "${component." ) ) { w.writeMarkup( " <i>(Discovered)</i>" ); <BUG>} w.endElement(); // td</BUG> w.startElement( "td" ); w.startElement( "code" ); w.addAttribute( "title", parameter.getType() );
else if ( parameter.getRequirement() != null ) w.endElement(); // td
19,521
package org.apache.maven.tools.plugin.generator; import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.Parameter; <BUG>import org.apache.maven.plugin.descriptor.PluginDescriptor; import org.apache.maven.tools.plugin.util.PluginUtils;</BUG> import org.codehaus.plexus.util.IO...
import org.apache.maven.plugin.descriptor.Requirement; import org.apache.maven.tools.plugin.util.PluginUtils;
19,522
w.startElement( "executionStrategy" ); w.writeText( mojoDescriptor.getExecutionStrategy() ); w.endElement(); List parameters = mojoDescriptor.getParameters(); w.startElement( "parameters" ); <BUG>Collection requirements = new ArrayList(); Set configuration = new HashSet();</BUG> if ( parameters != null ) { for ( int j ...
Map requirements = new HashMap(); Set configuration = new HashSet();
19,523
if ( description == null ) { throw new InvalidParameterException( "description", i ); } } <BUG>private MojoDescriptor createMojoDescriptor( JavaSource javaSource, PluginDescriptor pluginDescriptor ) throws InvalidPluginDescriptorException {</BUG> MojoDescriptor mojoDescriptor = new MojoDescriptor(); mojoDescriptor.setP...
private MojoDescriptor createMojoDescriptor( JavaSource javaSource, PluginDescriptor pluginDescriptor )
19,524
if ( !StringUtils.isEmpty( alias ) ) { pd.setAlias( alias ); } pd.setExpression( parameter.getNamedParameter( PARAMETER_EXPRESSION ) ); <BUG>pd.setDefaultValue( parameter.getNamedParameter( PARAMETER_DEFAULT_VALUE ) ); mojoDescriptor.addParameter( pd );</BUG> } } private Map extractFieldParameterTags( JavaClass javaCla...
mojoDescriptor.addParameter( pd );
19,525
JavaField[] classFields = javaClass.getFields(); if ( classFields != null ) { for ( int i = 0; i < classFields.length; i++ ) { <BUG>JavaField field = classFields[i]; DocletTag paramTag = field.getTagByName( PARAMETER ); if ( paramTag != null )</BUG> { rawParams.put( field.getName(), field );
if ( field.getTagByName( PARAMETER ) != null || field.getTagByName( COMPONENT ) != null )
19,526
private boolean required; private boolean editable = true; private String description; private String expression; private String deprecated; <BUG>private String defaultValue; public String getName()</BUG> { return name; }
private Requirement requirement; public String getName()
19,527
customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString()); customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName); customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString()); customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName); customTokens.put("%%mlTraceFo...
customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName); customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName); }
19,528
} @RootTask static Task<Exec.Result> exec(String parameter, int number) { Task<String> task1 = MyTask.create(parameter); Task<Integer> task2 = Adder.create(number, number + 2); <BUG>return Task.ofType(Exec.Result.class).named("exec", "/bin/sh") .in(() -> task1)</BUG> .in(() -> task2) .process(Exec.exec((str, i) -> args...
return Task.named("exec", "/bin/sh").ofType(Exec.Result.class) .in(() -> task1)
19,529
return args; } static class MyTask { static final int PLUS = 10; static Task<String> create(String parameter) { <BUG>return Task.ofType(String.class).named("MyTask", parameter) .in(() -> Adder.create(parameter.length(), PLUS))</BUG> .in(() -> Fib.create(parameter.length())) .process((sum, fib) -> something(parameter, s...
return Task.named("MyTask", parameter).ofType(String.class) .in(() -> Adder.create(parameter.length(), PLUS))
19,530
final String instanceField = "from instance"; final TaskContext context = TaskContext.inmem(); final AwaitingConsumer<String> val = new AwaitingConsumer<>(); @Test public void shouldJavaUtilSerialize() throws Exception { <BUG>Task<Long> task1 = Task.ofType(Long.class).named("Foo", "Bar", 39) .process(() -> 9999L); Task...
Task<Long> task1 = Task.named("Foo", "Bar", 39).ofType(Long.class) Task<String> task2 = Task.named("Baz", 40).ofType(String.class) .in(() -> task1)
19,531
assertEquals(des.id().name(), "Baz"); assertEquals(val.awaitAndGet(), "[9999] hello 10004"); } @Test(expected = NotSerializableException.class) public void shouldNotSerializeWithInstanceFieldReference() throws Exception { <BUG>Task<String> task = Task.ofType(String.class).named("WithRef") .process(() -> instanceField +...
Task<String> task = Task.named("WithRef").ofType(String.class) .process(() -> instanceField + " causes an outer reference");
19,532
serialize(task); } @Test public void shouldSerializeWithLocalReference() throws Exception { String local = instanceField; <BUG>Task<String> task = Task.ofType(String.class).named("WithLocalRef") .process(() -> local + " won't cause an outer reference");</BUG> serialize(task); Task<String> des = deserialize(); context.e...
Task<String> task = Task.named("WithLocalRef").ofType(String.class) .process(() -> local + " won't cause an outer reference");
19,533
} @RootTask public static Task<String> standardArgs(int first, String second) { firstInt = first; secondString = second; <BUG>return Task.ofType(String.class).named("StandardArgs", first, second) .process(() -> second + " " + first * 100);</BUG> } @Test public void shouldParseFlags() throws Exception {
return Task.named("StandardArgs", first, second).ofType(String.class) .process(() -> second + " " + first * 100);
19,534
assertThat(parsedEnum, is(CustomEnum.BAR)); } @RootTask public static Task<String> enums(CustomEnum enm) { parsedEnum = enm; <BUG>return Task.ofType(String.class).named("Enums", enm) .process(enm::toString);</BUG> } @Test public void shouldParseCustomTypes() throws Exception {
return Task.named("Enums", enm).ofType(String.class) .process(enm::toString);
19,535
assertThat(parsedType.content, is("blarg parsed for you!")); } @RootTask public static Task<String> customType(CustomType myType) { parsedType = myType; <BUG>return Task.ofType(String.class).named("Types", myType.content) .process(() -> myType.content);</BUG> } public enum CustomEnum { BAR
return Task.named("Types", myType.content).ofType(String.class) .process(() -> myType.content);
19,536
TaskContext taskContext = TaskContext.inmem(); TaskContext.Value<Long> value = taskContext.evaluate(fib92); value.consume(f92 -> System.out.println("fib(92) = " + f92)); } static Task<Long> create(long n) { <BUG>TaskBuilder<Long> fib = Task.ofType(Long.class).named("Fib", n); </BUG> if (n < 2) { return fib .process(() ...
TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
19,537
import io.vertx.core.AsyncResult; import io.vertx.core.Future; import io.vertx.core.Handler; import io.vertx.core.Vertx; import io.vertx.core.json.JsonArray; <BUG>import io.vertx.core.json.JsonObject; import javax.inject.Inject;</BUG> import java.util.ArrayList; import java.util.List; public class ZooKeeperCassandraCon...
import org.apache.curator.utils.ZKPaths; import javax.inject.Inject;
19,538
public class ZooKeeperCassandraConfigurator extends EnvironmentCassandraConfigurator { private final WhenConfiguratorHelper helper; private final When when; private AsyncResult<Void> initResult; private final List<Handler<AsyncResult<Void>>> onReadyCallbacks = new ArrayList<>(); <BUG>protected String pathPrefix = ""; <...
protected String pathPrefix = "cassandra";
19,539
}); } private void initZooKeeper() { List<Promise<Void>> promises = new ArrayList<>(); if (DEFAULT_SEEDS.equals(seeds)) { <BUG>promises.add(helper.getConfigElement(getPathPrefix() + "/cassandra/seeds").then( </BUG> value -> { JsonArray array = value.asJsonArray(); if (array != null) {
promises.add(helper.getConfigElement(ZKPaths.makePath(getPathPrefix(), "seeds")).then(
19,540
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
19,541
} @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_memo); <BUG>ChinaPhoneHelper.setStatusBar(this,true); </BUG> topicId = getIntent().getLongExtra("topicId", -1); if (topicId == -1) { finish();
ChinaPhoneHelper.setStatusBar(this, true);
19,542
MemoEntry.COLUMN_REF_TOPIC__ID + " = ?" , new String[]{String.valueOf(topicId)}); } public Cursor selectMemo(long topicId) { Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null, <BUG>MemoEntry._ID + " DESC", null); </BUG> if (c != nu...
MemoEntry.COLUMN_ORDER + " ASC", null);
19,543
MemoEntry._ID + " = ?", new String[]{String.valueOf(memoId)}); } public long updateMemoContent(long memoId, String memoContent) { ContentValues values = new ContentValues(); <BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent); return db.update(</BUG> MemoEntry.TABLE_NAME, values, MemoEntry._ID + " = ?",
return db.update(
19,544
import android.widget.RelativeLayout; import android.widget.TextView; import com.kiminonawa.mydiary.R; import com.kiminonawa.mydiary.db.DBManager; import com.kiminonawa.mydiary.shared.EditMode; <BUG>import com.kiminonawa.mydiary.shared.ThemeManager; import java.util.List; public class MemoAdapter extends RecyclerView.A...
import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter; public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
19,545
private DBManager dbManager; private boolean isEditMode = false; private EditMemoDialogFragment.MemoCallback callback; private static final int TYPE_HEADER = 0; private static final int TYPE_ITEM = 1; <BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMe...
public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) { super(recyclerView); this.mActivity = activity;
19,546
this.memoList = memoList; this.dbManager = dbManager; this.callback = callback; } @Override <BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { </BUG> View view; if (isEditMode) { if (viewType == TYPE_HEADER) {
public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
19,547
editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment"); } }); } } <BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { private View rootView; private TextView TV_memo_item_content;</BUG> private ImageView IV_memo_item_delete;
protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener { private ImageView IV_memo_item_dot; private TextView TV_memo_item_content;
19,548
((VirtualNodeSet) result).setInPredicate(Expression.NO_CONTEXT_ID != contextId); return result; } if (hasPreloadedData()) { DocumentSet docs = getDocumentSet(contextSet); <BUG>if (!optimized && (currentSet == null || currentDocs == null || !(docs.equalDocs(currentDocs)))) { ElementIndex index = context.getBroker().get...
if (currentSet == null || currentDocs == null || (!optimized && !(docs == currentDocs || docs.equalDocs(currentDocs)))) { ElementIndex index = context.getBroker().getElementIndex();
19,549
result.addAll(p.directSelectChild(test.getName(), contextId)); } return result; } else if (hasPreloadedData()) { DocumentSet docs = getDocumentSet(contextSet); <BUG>if (!optimized && (currentSet == null || currentDocs == null || !(docs == currentDocs || docs.equalDocs(currentDocs)))) { </BUG> ElementIndex index = cont...
if (currentSet == null || currentDocs == null || (!optimized && !(docs == currentDocs || docs.equalDocs(currentDocs)))) {
19,550
contextSet); vset.setInPredicate(Expression.NO_CONTEXT_ID != contextId); return vset; } else if (hasPreloadedData()) { DocumentSet docs = getDocumentSet(contextSet); <BUG>if (!optimized && (currentSet == null || currentDocs == null || !(docs == currentDocs || docs.equalDocs(currentDocs)))) { </BUG> ElementIndex index ...
if (currentSet == null || currentDocs == null || (!optimized && !(docs == currentDocs || docs.equalDocs(currentDocs)))) {
19,551
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestOutputStream; import java.security.MessageDigest; <BUG>import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collections; import java.util.List;</BUG> public final class ...
import java.text.DateFormat; import java.util.Date; import java.util.List;
19,552
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;
19,553
private static final String PATH_DELIMITER = "/"; public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT; enum Element { ADDED_BUNDLE("added-bundle"), ADDED_MISC_CONTENT("added-misc-content"), <BUG>ADDED_MODULE("added-module"), BUNDLES("bundles"),</BUG> CUMULATIVE("cumulative"), DESCRIPTION("description"), MIS...
APPLIES_TO_VERSION("applies-to-version"), BUNDLES("bundles"),
19,554
final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { <BUG>case APPLIES_TO_VERSION: builder.addAppliesTo(value); break;</BUG> case RESULTING_VE...
[DELETED]
19,555
final StringBuilder path = new StringBuilder(); for(final String p : item.getPath()) { path.append(p).append(PATH_DELIMITER); } path.append(item.getName()); <BUG>writer.writeAttribute(Attribute.PATH.name, path.toString()); if(type != ModificationType.REMOVE) {</BUG> writer.writeAttribute(Attribute.HASH.name, bytesToHex...
if (item.isDirectory()) { writer.writeAttribute(Attribute.DIRECTORY.name, "true"); if(type != ModificationType.REMOVE) {
19,556
package org.jboss.as.patching; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.patching.runner.PatchingException; import org.jboss.logging.Messages; import org.jboss.logging.annotations.Message; <BUG>import org.jboss.logging.annotations.MessageBundle; import java.io.IOException;</BUG> impor...
import org.jboss.logging.annotations.Cause; import java.io.IOException;
19,557
import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.Messages; import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.Function; import com.intellij.util.ui.UIUtil; <BUG>import git4idea.GitVcs; import git4idea.merge.GitConflictResolver;</BUG> import git4idea.repo.GitRepository;...
import git4idea.MessageManager; import git4idea.NotificationManager; import git4idea.merge.GitConflictResolver;
19,558
import javax.swing.event.HyperlinkEvent; import java.util.ArrayList; import java.util.Collection; import java.util.concurrent.atomic.AtomicBoolean; abstract class GitBranchOperation { <BUG>private static final String UNMERGED_FILES_ERROR_TITLE = "Can't checkout because of unmerged files"; @NotNull protected final Proje...
static final String UNMERGED_FILES_ERROR_NOTIFICATION_DESCRIPTION = "You have to <a href='resolve'>resolve</a> all merge conflicts before checkout.<br/>" + "After resolving conflicts you also probably would want to commit your files to the current branch."; @NotNull protected final Project myProject;
19,559
UIUtil.invokeAndWaitIfNeeded(new Runnable() { @Override public void run() { String description = message + getRollbackProposal(); ok.set(Messages.OK == <BUG>Messages.showYesNoDialog(myProject, description, title, "Rollback", "Don't rollback", Messages.getErrorIcon())); </BUG> } }); if (ok.get()) {
MessageManager.showYesNoDialog(myProject, description, title, "Rollback", "Don't rollback", Messages.getErrorIcon()));
19,560
private void showUnmergedFilesDialogWithRollback() { final AtomicBoolean ok = new AtomicBoolean(); UIUtil.invokeAndWaitIfNeeded(new Runnable() { @Override public void run() { String description = "You have to resolve all merge conflicts before checkout.<br/>" + getRollbackProposal(); <BUG>ok.set(Messages.OK == Messages...
ok.set(Messages.OK == MessageManager.showYesNoDialog(myProject, description, UNMERGED_FILES_ERROR_TITLE, "Rollback", "Don't rollback", Messages.getErrorIcon()));
19,561
if (ok.get()) { rollback(); } } private void showUnmergedFilesNotification() { <BUG>String title = UNMERGED_FILES_ERROR_TITLE; String description = "You have to <a href='resolve'>resolve</a> all merge conflicts before checkout.<br/>" + "After resolving conflicts you also probably would want to commit your files to the ...
String description = UNMERGED_FILES_ERROR_NOTIFICATION_DESCRIPTION; NotificationManager.getInstance(myProject).notify(GitVcs.IMPORTANT_ERROR_NOTIFICATION, title, description, NotificationType.ERROR, new NotificationListener() {
19,562
import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.openapi.util.text.StringUtil; import com.intellij.ui.components.JBLabel; <BUG>import com.intellij.util.ArrayUtil; import git4idea.GitBranch;</BUG> import git4idea...
import git4idea.DialogManager; import git4idea.GitBranch;
19,563
@NotNull Map<GitRepository, List<GitCommit>> commits, @NotNull String branchToDelete, @NotNull List<String> mergedToBranches, @Nullable String currentBranch) { GitBranchIsNotFullyMergedDialog dialog = new GitBranchIsNotFullyMergedDialog(project, commits, branchToDelete, currentBranch, mergedToBranches); <BUG>dialog.sho...
DialogManager.getInstance(project).showDialog(dialog); return dialog.isOK();
19,564
import org.apache.ibatis.session.SqlSession; import org.sonar.api.BatchComponent; import org.sonar.api.ServerComponent; import org.sonar.api.issue.IssueQuery; import org.sonar.core.persistence.MyBatis; <BUG>import javax.annotation.CheckForNull; import java.util.Collection;</BUG> import java.util.Collections; import jav...
import javax.annotation.Nullable; import java.util.Collection;
19,565
import com.google.common.collect.Sets; import org.apache.ibatis.session.SqlSession; import org.sonar.api.ServerComponent; import org.sonar.core.persistence.MyBatis; import javax.annotation.Nullable; <BUG>import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set;</BUG> import stati...
import java.util.*;
19,566
if (componentIds.isEmpty()) { return Collections.emptySet(); } String sql; Map<String, Object> params; <BUG>List <List<Integer>> componentIdsPartition = Lists.partition(newArrayList(componentIds), 1000); if (userId == null) {</BUG> sql = "keepAuthorizedComponentIdsForAnonymous"; params = ImmutableMap.of("role", role, "...
List<List<Integer>> componentIdsPartition = Lists.partition(newArrayList(componentIds), 1000); if (userId == null) {
19,567
return Sets.newHashSet(session.<Integer>selectList(sql, params)); } public boolean isAuthorizedComponentId(int componentId, @Nullable Integer userId, String role) { return keepAuthorizedComponentIds(Sets.newHashSet(componentId), userId, role).size() == 1; } <BUG>public Set<Integer> selectAuthorizedRootProjectsIds(@Null...
public Collection<Integer> selectAuthorizedRootProjectsIds(@Nullable Integer userId, String role) {
19,568
import org.apache.sling.jcr.resource.JcrResourceConstants; import org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl; import org.apache.sling.jcr.resource.internal.helper.MapEntries; import org.apache.sling.jcr.resource.internal.helper.Mapping; import org.apache.sling.performance.annotation.Performan...
import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
19,569
@PerformanceTestSuite public ParameterizedTestList testPerformance() throws Exception { Helper helper = new Helper(); ParameterizedTestList testCenter = new ParameterizedTestList(); testCenter.setTestSuiteTitle("jcr.resource-2.0.10"); <BUG>testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper)); ...
testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith1000VanityPathTest",helper, 100, 10)); testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith5000VanityPathTest",helper, 100, 50)); testCenter.addTestObject(new ResolveNonExistingWithManyV...
19,570
package org.apache.sling.performance; <BUG>import static org.mockito.Mockito.*; import javax.jcr.NamespaceRegistry;</BUG> import javax.jcr.Session; import junitx.util.PrivateAccessor;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.mock; import javax.jcr.NamespaceRegistry;
19,571
import org.apache.sling.jcr.resource.JcrResourceConstants; import org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl; import org.apache.sling.jcr.resource.internal.helper.MapEntries; import org.apache.sling.jcr.resource.internal.helper.Mapping; import org.apache.sling.performance.annotation.Performan...
import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
19,572
import org.apache.sling.api.resource.ResourceResolver; import org.apache.sling.jcr.api.SlingRepository; import org.apache.sling.jcr.resource.JcrResourceConstants; import org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory; import org.apache.sling.performance.annotation.PerformanceTestSuite; <BU...
import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
19,573
@PerformanceTestSuite public ParameterizedTestList testPerformance() throws Exception { Helper helper = new Helper(); ParameterizedTestList testCenter = new ParameterizedTestList(); testCenter.setTestSuiteTitle("jcr.resource-2.2.0"); <BUG>testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper)); t...
testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith1000VanityPathTest",helper, 100, 10)); testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith5000VanityPathTest",helper, 100, 50)); testCenter.addTestObject(new ResolveNonExistingWithManyV...
19,574
cgl.setLexicalvalue(valueEdit); cgl.setIdgroup(idDomaine); cgl.setIdthesaurus(idTheso); cgl.setLang(langueEdit); GroupHelper cgh = new GroupHelper(); <BUG>if (!cgh.isDomainExist(connect.getPoolConnexion(), cgl.getLexicalvalue(),</BUG> cgl.getIdthesaurus(), cgl.getLang())) { FacesContext.getCurrentInstance().addMessage(...
if (cgh.isDomainExist(connect.getPoolConnexion(), cgl.getLexicalvalue(),
19,575
Term terme = new Term(); terme.setId_thesaurus(idTheso); terme.setLang(langueEdit); terme.setLexical_value(valueEdit); terme.setId_term(idT); <BUG>if (new TermHelper().isTermExist(connect.getPoolConnexion(), </BUG> terme.getLexical_value(), terme.getId_thesaurus(), terme.getLang())) { FacesContext.getCurrentInstance()....
if (termHelper.isTermExist(connect.getPoolConnexion(),
19,576
Term terme = new Term(); terme.setId_thesaurus(idTheso); terme.setLang(langueEdit); terme.setLexical_value(valueEdit); terme.setId_term(idT); <BUG>if (new TermHelper().isTermExist(connect.getPoolConnexion(), </BUG> terme.getLexical_value(), terme.getId_thesaurus(), terme.getLang())) { FacesContext.getCurrentInstance()....
if (termHelper.isTermExist(connect.getPoolConnexion(),
19,577
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();
19,578
if (n.getTitle().trim().isEmpty()) { dynamicTreeNode = (TreeNode) new MyTreeNode(1, n.getIdConcept(), idTheso, idlangue, "", "", "dossier", n.getIdConcept(), root); } else { dynamicTreeNode = (TreeNode) new MyTreeNode(1, n.getIdConcept(), idTheso, idlangue, "", "", "dossier", n.getTitle(), root); } <BUG>new DefaultTree...
DefaultTreeNode defaultTreeNode = new DefaultTreeNode("fake", dynamicTreeNode); defaultTreeNode.setExpanded(true);
19,579
SKOSXmlDocument sxd = new ReadFileSKOS().readStringBuffer(sb); for (SKOSResource resource : sxd.getResourcesList()) { NodeAlignment na = new NodeAlignment(); na.setInternal_id_concept(idC); na.setInternal_id_thesaurus(idTheso); <BUG>na.setThesaurus_target("OpenTheso"); </BUG> na.setUri_target(resource.getUri()); for(SK...
na.setThesaurus_target("Pactols");
19,580
throw new OutOfMemoryError("Native allocator returned address == 0"); } } catch (UnsatisfiedLinkError e) { throw new RuntimeException("No native JavaCPP library in memory. (Has Loader.load() been called?)", e); } catch (OutOfMemoryError e) { <BUG>OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new BytePoint...
OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new BytePointer(" + size + "): " + "totalBytes = " + formatBytes(totalBytes()) + ", physicalBytes = " + formatBytes(physicalBytes()));
19,581
throw new OutOfMemoryError("Native allocator returned address == 0"); } } catch (UnsatisfiedLinkError e) { throw new RuntimeException("No native JavaCPP library in memory. (Has Loader.load() been called?)", e); } catch (OutOfMemoryError e) { <BUG>OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new IntPointe...
OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new IntPointer(" + size + "): " + "totalBytes = " + formatBytes(totalBytes()) + ", physicalBytes = " + formatBytes(physicalBytes()));
19,582
throw new OutOfMemoryError("Native allocator returned address == 0"); } } catch (UnsatisfiedLinkError e) { throw new RuntimeException("No native JavaCPP library in memory. (Has Loader.load() been called?)", e); } catch (OutOfMemoryError e) { <BUG>OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new FloatPoin...
OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new FloatPointer(" + size + "): " + "totalBytes = " + formatBytes(totalBytes()) + ", physicalBytes = " + formatBytes(physicalBytes()));
19,583
break; } i++; } long size = Long.parseLong(string.substring(0, i)); <BUG>switch (string.substring(i).toLowerCase()) { </BUG> case "": break; default: throw new NumberFormatException("Cannot parse into bytes: " + string); }
switch (string.substring(i).trim().toLowerCase()) {
19,584
limit = arrayLimit; return b; } public Buffer asBuffer() { return asByteBuffer(); <BUG>} public static native Pointer memchr(Pointer p, int ch, long size);</BUG> public static native int memcmp(Pointer p1, Pointer p2, long size); public static native Pointer memcpy(Pointer dst, Pointer src, long size); public static na...
public static native Pointer malloc(long size); public static native Pointer calloc(long n, long size); public static native Pointer realloc(Pointer p, long size); public static native void free(Pointer p); public static native Pointer memchr(Pointer p, int ch, long size);
19,585
throw new OutOfMemoryError("Native allocator returned address == 0"); } } catch (UnsatisfiedLinkError e) { throw new RuntimeException("No native JavaCPP library in memory. (Has Loader.load() been called?)", e); } catch (OutOfMemoryError e) { <BUG>OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new BoolPoint...
OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new BoolPointer(" + size + "): " + "totalBytes = " + formatBytes(totalBytes()) + ", physicalBytes = " + formatBytes(physicalBytes()));
19,586
throw new OutOfMemoryError("Native allocator returned address == 0"); } } catch (UnsatisfiedLinkError e) { throw new RuntimeException("No native JavaCPP library in memory. (Has Loader.load() been called?)", e); } catch (OutOfMemoryError e) { <BUG>OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new PointerPo...
OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new PointerPointer(" + size + "): " + "totalBytes = " + formatBytes(totalBytes()) + ", physicalBytes = " + formatBytes(physicalBytes()));
19,587
throw new OutOfMemoryError("Native allocator returned address == 0"); } } catch (UnsatisfiedLinkError e) { throw new RuntimeException("No native JavaCPP library in memory. (Has Loader.load() been called?)", e); } catch (OutOfMemoryError e) { <BUG>OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new LongPoint...
OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new LongPointer(" + size + "): " + "totalBytes = " + formatBytes(totalBytes()) + ", physicalBytes = " + formatBytes(physicalBytes()));
19,588
throw new OutOfMemoryError("Native allocator returned address == 0"); } } catch (UnsatisfiedLinkError e) { throw new RuntimeException("No native JavaCPP library in memory. (Has Loader.load() been called?)", e); } catch (OutOfMemoryError e) { <BUG>OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new CharPoint...
OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new CharPointer(" + size + "): " + "totalBytes = " + formatBytes(totalBytes()) + ", physicalBytes = " + formatBytes(physicalBytes()));
19,589
throw new OutOfMemoryError("Native allocator returned address == 0"); } } catch (UnsatisfiedLinkError e) { throw new RuntimeException("No native JavaCPP library in memory. (Has Loader.load() been called?)", e); } catch (OutOfMemoryError e) { <BUG>OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new CLongPoin...
OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new CLongPointer(" + size + "): " + "totalBytes = " + formatBytes(totalBytes()) + ", physicalBytes = " + formatBytes(physicalBytes()));
19,590
throw new OutOfMemoryError("Native allocator returned address == 0"); } } catch (UnsatisfiedLinkError e) { throw new RuntimeException("No native JavaCPP library in memory. (Has Loader.load() been called?)", e); } catch (OutOfMemoryError e) { <BUG>OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new DoublePoi...
OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new DoublePointer(" + size + "): " + "totalBytes = " + formatBytes(totalBytes()) + ", physicalBytes = " + formatBytes(physicalBytes()));
19,591
assertTrue(Pointer.DeallocatorReference.totalBytes >= (chunks - 1) * chunkSize * byteSize); try { fieldReference = pointers; new BytePointer(chunkSize); fail("OutOfMemoryError should have been thrown."); <BUG>} catch (OutOfMemoryError e) { } for (int j = 0; j < chunks; j++) {</BUG> pointers[j] = null; } fieldReference ...
} catch (OutOfMemoryError e) { System.out.println(e); System.out.println(e.getCause()); for (int j = 0; j < chunks; j++) {
19,592
assertTrue(Pointer.DeallocatorReference.totalBytes >= (chunks - 1) * chunkSize * shortSize); try { fieldReference = pointers; new ShortPointer(chunkSize); fail("OutOfMemoryError should have been thrown."); <BUG>} catch (OutOfMemoryError e) { } for (int j = 0; j < chunks; j++) {</BUG> pointers[j] = null; } fieldReferenc...
} catch (OutOfMemoryError e) { System.out.println(e); System.out.println(e.getCause()); for (int j = 0; j < chunks; j++) {
19,593
assertTrue(Pointer.DeallocatorReference.totalBytes >= (chunks - 1) * chunkSize * intSize); try { fieldReference = pointers; new IntPointer(chunkSize); fail("OutOfMemoryError should have been thrown."); <BUG>} catch (OutOfMemoryError e) { } for (int j = 0; j < chunks; j++) {</BUG> pointers[j] = null; } fieldReference = ...
} catch (OutOfMemoryError e) { System.out.println(e); System.out.println(e.getCause()); for (int j = 0; j < chunks; j++) {
19,594
assertTrue(Pointer.DeallocatorReference.totalBytes >= (chunks - 1) * chunkSize * longSize); try { fieldReference = pointers; new LongPointer(chunkSize); fail("OutOfMemoryError should have been thrown."); <BUG>} catch (OutOfMemoryError e) { } for (int j = 0; j < chunks; j++) {</BUG> pointers[j] = null; } fieldReference ...
} catch (OutOfMemoryError e) { System.out.println(e); System.out.println(e.getCause()); for (int j = 0; j < chunks; j++) {
19,595
assertTrue(Pointer.DeallocatorReference.totalBytes >= (chunks - 1) * chunkSize * floatSize); try { fieldReference = pointers; new FloatPointer(chunkSize); fail("OutOfMemoryError should have been thrown."); <BUG>} catch (OutOfMemoryError e) { } for (int j = 0; j < chunks; j++) {</BUG> pointers[j] = null; } fieldReferenc...
} catch (OutOfMemoryError e) { System.out.println(e); System.out.println(e.getCause()); for (int j = 0; j < chunks; j++) {
19,596
assertTrue(Pointer.DeallocatorReference.totalBytes >= (chunks - 1) * chunkSize * doubleSize); try { fieldReference = pointers; new DoublePointer(chunkSize); fail("OutOfMemoryError should have been thrown."); <BUG>} catch (OutOfMemoryError e) { } for (int j = 0; j < chunks; j++) {</BUG> pointers[j] = null; } fieldRefere...
} catch (OutOfMemoryError e) { System.out.println(e); System.out.println(e.getCause()); for (int j = 0; j < chunks; j++) {
19,597
assertTrue(Pointer.DeallocatorReference.totalBytes >= (chunks - 1) * chunkSize * charSize); try { fieldReference = pointers; new CharPointer(chunkSize); fail("OutOfMemoryError should have been thrown."); <BUG>} catch (OutOfMemoryError e) { } for (int j = 0; j < chunks; j++) {</BUG> pointers[j] = null; } fieldReference ...
} catch (OutOfMemoryError e) { System.out.println(e); System.out.println(e.getCause()); for (int j = 0; j < chunks; j++) {
19,598
throw new OutOfMemoryError("Native allocator returned address == 0"); } } catch (UnsatisfiedLinkError e) { throw new RuntimeException("No native JavaCPP library in memory. (Has Loader.load() been called?)", e); } catch (OutOfMemoryError e) { <BUG>OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new SizeTPoin...
OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new SizeTPointer(" + size + "): " + "totalBytes = " + formatBytes(totalBytes()) + ", physicalBytes = " + formatBytes(physicalBytes()));
19,599
throw new OutOfMemoryError("Native allocator returned address == 0"); } } catch (UnsatisfiedLinkError e) { throw new RuntimeException("No native JavaCPP library in memory. (Has Loader.load() been called?)", e); } catch (OutOfMemoryError e) { <BUG>OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new ShortPoin...
OutOfMemoryError e2 = new OutOfMemoryError("Cannot allocate new ShortPointer(" + size + "): " + "totalBytes = " + formatBytes(totalBytes()) + ", physicalBytes = " + formatBytes(physicalBytes()));
19,600
import com.yahoo.sketches.SketchesStateException; import com.yahoo.sketches.Util; final class IntersectionImpl extends SetOperation implements Intersection { private final short seedHash_; private final Memory mem_; <BUG>private final Object memObj_; private final long memAdd_; private final boolean memValid_;</BUG> pr...
[DELETED]