id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
40,001 | for (Role cp : map.keySet()) {
rmap.put(map.get(cp), cp);
}
return rmap;
}
<BUG>public HashMap<Role, Variable> createMapFromReverseMap(HashMap<Variable, Role> rmap) {
HashMap<Role, Variable> map = new HashMap<Role, Variable>();
</BUG>
for (Variable cp : rmap.keySet()) {
| public LinkedHashMap<Role, Variable> createMapFromReverseMap(Map<Variable, Role> rmap) {
LinkedHashMap<Role, Variable> map = new LinkedHashMap<Role, Variable>();
|
40,002 | for (Role cp : roleMap.keySet()) {
map.put(cp.getRoleId(), roleMap.get(cp));
}
return map;
}
<BUG>public HashMap<String, Role> getStringVariableMap() {
HashMap<String, Role> map = new HashMap<String, Role>();
</BUG>
for (Variable var : variableMap.keySet()) {
| public LinkedHashMap<String, Role> getStringVariableMap() {
LinkedHashMap<String, Role> map = new LinkedHashMap<String, Role>();
|
40,003 | ArrayList<KBObject> args = new ArrayList<KBObject>(inputs);
args.addAll(outputs);
for (KBObject arg : args) {
KBObject argid = this.kb.getDatatypePropertyValue(arg, dmap.get("hasArgumentID"));
String role = (String) argid.getValue();
<BUG>for(Variable var : varMap.keySet()) {
Role r = varMap.get(var);
if(r.getRoleId().equals(role))</BUG>
setInvocationArguments(invocation, arg, var, inputs.contains(arg));
| for(Role r : roleMap.keySet()) {
Variable var = roleMap.get(r);
if(r.getRoleId().equals(role))
|
40,004 | package com.auth0.jwtdecodejava.impl;
import com.auth0.jwtdecodejava.interfaces.Header;
<BUG>import com.fasterxml.jackson.databind.JsonNode;
import java.util.Map;</BUG>
import static com.auth0.jwtdecodejava.impl.ClaimImpl.extractClaim;
import static com.auth0.jwtdecodejava.impl.PublicClaims.*;
class HeaderImpl implements Header {
| import java.util.Collections;
import java.util.Map;
|
40,005 | import static com.auth0.jwtdecodejava.impl.ClaimImpl.extractClaim;
import static com.auth0.jwtdecodejava.impl.PublicClaims.*;
class HeaderImpl implements Header {
private final Map<String, JsonNode> tree;
HeaderImpl(Map<String, JsonNode> tree) {
<BUG>this.tree = tree;
}</BUG>
@Override
public String getAlgorithm() {
return extractClaim(ALGORITHM, tree).asString();
| this.tree = Collections.unmodifiableMap(tree);
}
|
40,006 | import com.auth0.jwtdecodejava.interfaces.Claim;
import com.auth0.jwtdecodejava.interfaces.Header;
import com.auth0.jwtdecodejava.interfaces.JWT;
import com.auth0.jwtdecodejava.interfaces.Payload;
import java.util.Date;
<BUG>public final class JWTDecoder implements JWT {
private Header header;</BUG>
private Payload payload;
private String signature;
private JWTDecoder(String jwt) throws JWTDecodeException {
| private Header header;
|
40,007 | private Payload payload;
private String signature;
private JWTDecoder(String jwt) throws JWTDecodeException {
parseToken(jwt);
}
<BUG>public static JWT decode(String token) throws JWTDecodeException {
return new JWTDecoder(token);</BUG>
}
private void parseToken(String token) throws JWTDecodeException {
final String[] parts = SignUtils.splitToken(token);
| return new JWTDecoder(token);
|
40,008 | package com.auth0.jwtdecodejava.impl;
import com.auth0.jwtdecodejava.interfaces.Claim;
import com.auth0.jwtdecodejava.interfaces.Payload;
<BUG>import com.fasterxml.jackson.databind.JsonNode;
import java.util.Date;</BUG>
import java.util.Map;
import static com.auth0.jwtdecodejava.impl.ClaimImpl.extractClaim;
class PayloadImpl implements Payload {
| import java.util.Collections;
import java.util.Date;
|
40,009 | this.audience = audience;
this.expiresAt = expiresAt;
this.notBefore = notBefore;
this.issuedAt = issuedAt;
this.jwtId = jwtId;
<BUG>this.tree = tree;
}</BUG>
@Override
public String getIssuer() {
return issuer;
| this.tree = Collections.unmodifiableMap(tree);
}
|
40,010 | throw new IllegalArgumentException("The Algorithm cannot be null.");
}
this.algorithm = algorithm;
this.claims = new HashMap<>();
}
<BUG>public static JWTVerifier init(Algorithm algorithm) throws IllegalArgumentException {
return new JWTVerifier(algorithm);
}
public JWTVerifier withIssuer(String issuer) {
</BUG>
requireClaim(PublicClaims.ISSUER, issuer);
| public Verification withIssuer(String issuer) {
|
40,011 | package me.jcala.blog.conf;
import me.jcala.blog.interceptor.UserSecurityInterceptor;
<BUG>import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration</BUG>
public class WebMvcConf extends WebMvcConfigurerAdapter{
| import org.springframework.context.annotation.Bean;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import java.util.Arrays;
@Configuration
|
40,012 | @Select({
"select username,email,",
"github,twitter,avatar",
"from admin limit 1"
})
<BUG>Info select() throws Exception;
</BUG>
@Select({
"select count(*) ",
"from admin ",
| Info select() throws RuntimeException;
|
40,013 | "select count(*) ",
"from admin ",
"where username = #{un} ",
"and password = #{pw}"
})
<BUG>int selectByPw(@Param("un") String username, @Param("pw") String password) throws Exception;
</BUG>
@Select({
"select count(*) ",
"from admin ",
| int selectByPw(@Param("un") String username, @Param("pw") String password) throws RuntimeException;
|
40,014 | "update admin ",
"set md = #{if.md},",
"resume = #{if.resume} ",
"limit 1"
})
<BUG>void updateResume(@Param("if") Info info) throws Exception;
</BUG>
@Update({
"update admin",
"set avatar = #{ava}",
| void updateResume(@Param("if") Info info) throws RuntimeException;
|
40,015 | @Controller
public class InfoCtrl {
@Autowired
private InfoSer infoSer;
@GetMapping("/admin/info")
<BUG>public String info(Model model) throws Exception {
</BUG>
Info info = infoSer.getInfo();
model.addAttribute("info", info);
return "admin/info";
| public String info(Model model) throws RuntimeException {
|
40,016 | model.addAttribute("result", 0);
return "admin/result";
}
}
@PostMapping("/admin/pass.action")
<BUG>public String passModify(String old_pass, String new_pass, HttpServletRequest request) {
</BUG>
int result = infoSer.modifyPw(old_pass, new_pass);
if (result == 0) {
infoSer.destroySession(request);
| public String passModify(String old_pass, String new_pass, HttpServletRequest request) throws RuntimeException{
|
40,017 | </BUG>
@Select({"select vid,date,title",
"from blog_view",
"order by date desc",
"limit #{st},12"})
<BUG>List<BlogView> selectArc(@Param("st") int start) throws Exception;
</BUG>
@Select({
"select title,tags,md",
"from blog_view",
| @Select("select count(*) from blog_view")
int selectBlogNum() throws RuntimeException;
@Select("select distinct name from view_tag")
@ResultType(String.class)
List<String> selectTags() throws RuntimeException;
List<BlogView> selectArc(@Param("st") int start) throws RuntimeException;
|
40,018 | "select title,tags,md",
"from blog_view",
"where vid = #{id}",
"limit 1"
})
<BUG>BlogView selectAdmin(@Param("id") int id) throws Exception;
</BUG>
@Select({
"select title,article",
"from blog_view",
| BlogView selectAdmin(@Param("id") int id) throws RuntimeException;
|
40,019 | "select title,article",
"from blog_view",
"where vid = #{id}",
"limit 1"
})
<BUG>BlogView selectView(@Param("id") int id) throws Exception;
</BUG>
@Select({
"select vid,title ",
"from blog_view",
| BlogView selectView(@Param("id") int id) throws RuntimeException;
|
40,020 | "select date,title",
"from blog_view",
"where vid = #{vid}",
"limit 1"
})
<BUG>BlogView selectTagView(@Param("vid") int vid) throws Exception;
</BUG>
@Insert({"insert into blog_view " ,
"(date,title,article,tags,md) " ,
"values(#{bv.date},#{bv.title}," ,
| BlogView selectTagView(@Param("vid") int vid) throws RuntimeException;
|
40,021 | @RequestMapping("/admin")
public class ProjectCtrl {
@Autowired
private ProjectSer projectSer;
@GetMapping("/project/{page}")
<BUG>public String project(@PathVariable int page, Model model){
</BUG>
model.addAttribute("current",page);
model.addAttribute("pageNum",projectSer.adminGetPageNum());
model.addAttribute("proList",projectSer.adminGetPros(page));
| public String project(@PathVariable int page, Model model) throws RuntimeException{
|
40,022 | model.addAttribute("pageNum",projectSer.adminGetPageNum());
model.addAttribute("proList",projectSer.adminGetPros(page));
return "admin/project";
}
@PostMapping("/addPro.action")
<BUG>public String addProject(Project project){
</BUG>
projectSer.addPro(project);
return "redirect:/admin/project/1";
}
| public String addProject(Project project) throws RuntimeException{
|
40,023 | projectSer.deletePro(id);
return "redirect:/admin/project/1";
}
@ResponseBody
@GetMapping("/pro.json")
<BUG>public Project getProJson(HttpServletRequest request){
</BUG>
String idStr=request.getParameter("id");
return projectSer.getProById(idStr);
}
| public Project getProJson(HttpServletRequest request) throws RuntimeException{
|
40,024 | </BUG>
String idStr=request.getParameter("id");
return projectSer.getProById(idStr);
}
@PostMapping("/updPro.action")
<BUG>public String updatePro(Project project){
</BUG>
projectSer.updatePro(project);
return "redirect:/admin/project/1";
}
| projectSer.deletePro(id);
@ResponseBody
@GetMapping("/pro.json")
public Project getProJson(HttpServletRequest request) throws RuntimeException{
public String updatePro(Project project) throws RuntimeException{
|
40,025 | @Controller
public class MoniterCtrl {
@Autowired
private MoniterSer moniterSer;
@GetMapping("/admin")
<BUG>public String moniter(Model model, HttpServletRequest request) throws Exception {
</BUG>
model.addAttribute("freeMemory",moniterSer.getFreeMemery());
return "admin/moniter";
}
| public String moniter(Model model, HttpServletRequest request) throws RuntimeException {
|
40,026 | </BUG>
return uploadSer.uploadPic(request);
}
@PostMapping("/admin/file/uplAva.action")
<BUG>public String uploadAva(HttpServletRequest request, Model model){
</BUG>
Info info=uploadSer.updateAvatar(request);
model.addAttribute("info",info);
return "admin/info";
}
| public class FileCtrl {
@Autowired
private FileUploadSer uploadSer;
@PostMapping("/admin/file/uplPic.action")
@ResponseBody
public UploadPic uploadPic(HttpServletRequest request) throws RuntimeException{
public String uploadAva(HttpServletRequest request, Model model) throws RuntimeException{
|
40,027 | @GetMapping("/blogAdd")
public String blogAdd() {
return "admin/blog_add";
}
@GetMapping("/update{id:\\d+}")
<BUG>public String blogModify(@PathVariable int id,Model model) {
</BUG>
BlogView blogView=blogSer.adminGetBlog(id);
if (blogView==null){
return "error";
| public String blogModify(@PathVariable int id,Model model) throws RuntimeException{
|
40,028 | model.addAttribute("blog",blogView);
return "admin/blog_modify";
}
}
@PostMapping("/post.action")
<BUG>public String postAction(BlogView view,Model model){
</BUG>
boolean result=blogSer.addBlog(view);
if (result){
return "redirect:/admin/blogList/1";
| public String postAction(BlogView view,Model model) throws RuntimeException{
|
40,029 | model.addAttribute("result",0);
return "admin/result";
}
}
@PostMapping("/update.action")
<BUG>public String update(BlogView view,Model model){
</BUG>
boolean result=blogSer.updateBlog(view);
if (result){
model.addAttribute("targetUrl","/post/"+view.getVid());
| public String update(BlogView view,Model model) throws RuntimeException{
|
40,030 | package com.twitter.distributedlog.acl;
<BUG>import com.twitter.distributedlog.DistributedLogConfiguration;
import com.twitter.distributedlog.ZooKeeperClient;
import com.twitter.distributedlog.ZooKeeperClientBuilder;</BUG>
import com.twitter.distributedlog.ZooKeeperClientUtils;
import com.twitter.distributedlog.ZooKeeperClusterTestCase;
| import com.twitter.distributedlog.TestZooKeeperClientBuilder;
|
40,031 | return URI.create("distributedlog://127.0.0.1:" + zkPort + path);
}
@Before
public void setup() throws Exception {
executorService = Executors.newSingleThreadScheduledExecutor();
<BUG>zkc = ZooKeeperClientBuilder.newBuilder()
.uri(createURI("/"))
.zkAclId(null)
.sessionTimeoutMs(10000).build();</BUG>
conf = new DistributedLogConfiguration();
| zkc = TestZooKeeperClientBuilder.newBuilder()
.build();
|
40,032 | static final Logger LOG = LoggerFactory.getLogger(TestLogSegmentMetadata.class);
static final int TEST_REGION_ID = 0xf - 1;
private ZooKeeperClient zkc;
@Before
public void setup() throws Exception {
<BUG>zkc = ZooKeeperClientBuilder.newBuilder().zkAclId(null).zkServers(zkServers).sessionTimeoutMs(10000).build();
}</BUG>
@After
public void teardown() throws Exception {
zkc.close();
| zkc = TestZooKeeperClientBuilder.newBuilder()
.zkServers(zkServers)
}
|
40,033 | import com.twitter.distributedlog.metadata.DLMetadata;
import com.twitter.distributedlog.namespace.DistributedLogNamespace;
import com.twitter.distributedlog.namespace.DistributedLogNamespaceBuilder;
import com.twitter.distributedlog.util.ConfUtils;
import com.twitter.distributedlog.util.FutureUtils;
<BUG>import com.twitter.distributedlog.util.PermitLimiter;
import com.twitter.distributedlog.util.Utils;</BUG>
import com.twitter.util.Await;
import com.twitter.util.Duration;
import com.twitter.util.Future;
| import com.twitter.distributedlog.util.RetryPolicyUtils;
import com.twitter.distributedlog.util.Utils;
|
40,034 | URI uri = createDLMURI("/" + name);
populateData(new HashMap<Long, DLSN>(), conf, name, 10, 10, false);
DistributedLogManager distributedLogManager = createNewDLM(conf, name);
List<LogSegmentMetadata> segments = distributedLogManager.getLogSegments();
LOG.info("Segments before modifying completion time : {}", segments);
<BUG>ZooKeeperClient zkc = ZooKeeperClientBuilder.newBuilder().zkAclId(null).uri(uri)
.sessionTimeoutMs(conf.getZKSessionTimeoutMilliseconds())
.connectionTimeoutMs(conf.getZKSessionTimeoutMilliseconds())</BUG>
.build();
| ZooKeeperClient zkc = TestZooKeeperClientBuilder.newBuilder(conf)
|
40,035 | .setEnableLedgerAllocatorPool(true).setLedgerAllocatorPoolName("test");
private ZooKeeperClient zooKeeperClient;
@Before
public void setup() throws Exception {
zooKeeperClient =
<BUG>ZooKeeperClientBuilder.newBuilder()
.uri(createDLMURI("/"))
.zkAclId(null)
.sessionTimeoutMs(10000).build();</BUG>
}
| TestZooKeeperClientBuilder.newBuilder()
.build();
|
40,036 | import com.twitter.distributedlog.DLMTestUtil;
import com.twitter.distributedlog.DLSN;
import com.twitter.distributedlog.DistributedLogConfiguration;
import com.twitter.distributedlog.DistributedLogManager;
import com.twitter.distributedlog.LogSegmentMetadata;
<BUG>import com.twitter.distributedlog.TestDistributedLogBase;
import com.twitter.distributedlog.ZooKeeperClient;
import com.twitter.distributedlog.ZooKeeperClientBuilder;</BUG>
import com.twitter.distributedlog.metadata.DryrunLogSegmentMetadataStoreUpdater;
import com.twitter.distributedlog.metadata.LogSegmentMetadataStoreUpdater;
| import com.twitter.distributedlog.TestZooKeeperClientBuilder;
|
40,037 | package org.neo4j.ogm.entity.io;
<BUG>import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
</BUG>
import org.neo4j.ogm.annotation.EndNode;
| import java.util.*;
|
40,038 | <BUG>package org.neo4j.ogm.context;
import org.neo4j.ogm.MetaData;</BUG>
import org.neo4j.ogm.entity.io.*;
import org.neo4j.ogm.exception.MappingException;
import org.neo4j.ogm.metadata.ClassInfo;
| import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.neo4j.ogm.MetaData;
|
40,039 | import org.neo4j.ogm.metadata.FieldInfo;
import org.neo4j.ogm.model.RowModel;
import org.neo4j.ogm.utils.ClassUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
<BUG>import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;</BUG>
public class SingleUseEntityMapper {
| [DELETED] |
40,040 | }
public MethodInfo identityGetter() {
for (MethodInfo methodInfo : methodsInfo().getters()) {
AnnotationInfo annotationInfo = methodInfo.getAnnotations().get(GraphId.CLASS);
if (annotationInfo != null) {
<BUG>if (methodInfo.getDescriptor().equals("()Ljava/lang/Long;")) {
</BUG>
return methodInfo;
}
}
| String simpleName() {
return className.substring(className.lastIndexOf('.') + 1);
|
40,041 | }
public MethodInfo identitySetter() {
for (MethodInfo methodInfo : methodsInfo().setters()) {
AnnotationInfo annotationInfo = methodInfo.getAnnotations().get(GraphId.CLASS);
if (annotationInfo != null) {
<BUG>if (methodInfo.getDescriptor().equals("(Ljava/lang/Long;)V")) {
</BUG>
return methodInfo;
}
}
| public void addSubclass(ClassInfo subclass) {
if (subclass.directSuperclass != null && subclass.directSuperclass != this) {
throw new RuntimeException(subclass.className + " has two superclasses: " + subclass.directSuperclass.className + ", " + this.className);
|
40,042 | }
List<MethodInfo> methodInfos = new ArrayList<>();
String typeSignature = "L" + iteratedType.getName().replace('.', '/') + ";";
String arrayOfTypeSignature = "()[" + typeSignature;
try {
<BUG>for (MethodInfo methodInfo : propertyGetters()) {
if (methodInfo.getTypeParameterDescriptor() != null) {
if (methodInfo.getTypeParameterDescriptor().equals(typeSignature)) {
methodInfos.add(methodInfo);
}
} else {
if (methodInfo.getDescriptor().equals(arrayOfTypeSignature)) {
</BUG>
methodInfos.add(methodInfo);
| throw new MappingException("No identity field found for class: " + this.className);
|
40,043 | if (fieldInfo.hasPropertyConverter()) {
value = fieldInfo.getPropertyConverter().toEntityAttribute(value);
FieldWriter.write(field, instance, value);
}
else {
<BUG>if (fieldInfo.isScalar()) {
String descriptor = fieldInfo.getTypeParameterDescriptor() == null ? fieldInfo.getDescriptor()
: fieldInfo.getTypeParameterDescriptor();</BUG>
value = Utils.coerceTypes(ClassUtils.getType(descriptor), value);
}
| String descriptor = fieldInfo.getTypeDescriptor();
|
40,044 | package org.qcri.rheem.core.function;
import org.qcri.rheem.core.optimizer.ProbabilisticDoubleInterval;
<BUG>import org.qcri.rheem.core.optimizer.costs.LoadEstimator;
</BUG>
import org.qcri.rheem.core.types.BasicDataUnitType;
import org.qcri.rheem.core.types.DataUnitType;
import java.util.Optional;
| import org.qcri.rheem.core.optimizer.costs.LoadProfileEstimator;
|
40,045 | private final SerializableFunction<Input, Iterable<Output>> javaImplementation;
private ProbabilisticDoubleInterval selectivity;
public FlatMapDescriptor(SerializableFunction<Input, Iterable<Output>> javaImplementation,
Class<Input> inputTypeClass,
Class<Output> outputTypeClass) {
<BUG>this(javaImplementation, inputTypeClass, outputTypeClass, null);
</BUG>
}
public FlatMapDescriptor(SerializableFunction<Input, Iterable<Output>> javaImplementation,
Class<Input> inputTypeClass,
| this(javaImplementation, inputTypeClass, outputTypeClass, (ProbabilisticDoubleInterval) null);
|
40,046 | }</BUG>
public FlatMapDescriptor(SerializableFunction<Input, Iterable<Output>> javaImplementation,
Class<Input> inputTypeClass,
Class<Output> outputTypeClass,
<BUG>LoadEstimator cpuLoadEstimator,
LoadEstimator ramLoadEstimator) {
this(javaImplementation,
inputTypeClass,
outputTypeClass,
null,
cpuLoadEstimator,
ramLoadEstimator);</BUG>
}
| ProbabilisticDoubleInterval selectivity) {
this(javaImplementation, inputTypeClass, outputTypeClass, selectivity, null);
|
40,047 | package org.qcri.rheem.basic.operators;
import org.qcri.rheem.core.function.TransformationDescriptor;
<BUG>import org.qcri.rheem.core.optimizer.costs.DefaultLoadEstimator;
import org.qcri.rheem.core.plan.rheemplan.UnarySink;</BUG>
import org.qcri.rheem.core.types.DataSetType;
import java.util.Objects;
public class TextFileSink<T> extends UnarySink<T> {
| import org.qcri.rheem.core.optimizer.costs.NestableLoadProfileEstimator;
import org.qcri.rheem.core.plan.rheemplan.UnarySink;
|
40,048 | this(
textFileUrl,
new TransformationDescriptor<>(
Objects::toString,
typeClass,
<BUG>String.class,
new DefaultLoadEstimator(1, 1, .99d, (in, out) -> 10 * in[0]),
new DefaultLoadEstimator(1, 1, .99d, (in, out) -> 1000)
)</BUG>
);
| new NestableLoadProfileEstimator(
|
40,049 | package org.qcri.rheem.core.function;
import org.qcri.rheem.core.optimizer.ProbabilisticDoubleInterval;
<BUG>import org.qcri.rheem.core.optimizer.costs.LoadEstimator;
</BUG>
import org.qcri.rheem.core.types.BasicDataUnitType;
import org.qcri.rheem.core.types.DataUnitType;
import java.util.Optional;
| import org.qcri.rheem.core.optimizer.costs.LoadProfileEstimator;
|
40,050 | private final SerializableFunction<Iterable<Input>, Iterable<Output>> javaImplementation;
private ProbabilisticDoubleInterval selectivity;
public MapPartitionsDescriptor(SerializableFunction<Iterable<Input>, Iterable<Output>> javaImplementation,
Class<Input> inputTypeClass,
Class<Output> outputTypeClass) {
<BUG>this(javaImplementation, inputTypeClass, outputTypeClass, null);
</BUG>
}
public MapPartitionsDescriptor(SerializableFunction<Iterable<Input>, Iterable<Output>> javaImplementation,
Class<Input> inputTypeClass,
| this(javaImplementation, inputTypeClass, outputTypeClass, (ProbabilisticDoubleInterval) null);
|
40,051 | package org.qcri.rheem.core.function;
import org.qcri.rheem.core.optimizer.ProbabilisticDoubleInterval;
<BUG>import org.qcri.rheem.core.optimizer.costs.LoadEstimator;
</BUG>
import org.qcri.rheem.core.types.BasicDataUnitType;
import java.util.Optional;
public class PredicateDescriptor<Input> extends FunctionDescriptor {
| import org.qcri.rheem.core.optimizer.costs.LoadProfileEstimator;
|
40,052 | private final SerializablePredicate<Input> javaImplementation;
private String sqlImplementation;
private ProbabilisticDoubleInterval selectivity;
public PredicateDescriptor(SerializablePredicate<Input> javaImplementation,
Class<Input> inputTypeClass) {
<BUG>this(javaImplementation, inputTypeClass, null);
</BUG>
}
public PredicateDescriptor(SerializablePredicate<Input> javaImplementation,
Class<Input> inputTypeClass,
| this(javaImplementation, inputTypeClass, (ProbabilisticDoubleInterval) null);
|
40,053 | package org.qcri.rheem.core.function;
<BUG>import org.qcri.rheem.core.optimizer.costs.LoadEstimator;
import org.qcri.rheem.core.types.BasicDataUnitType;</BUG>
import org.qcri.rheem.core.types.DataUnitGroupType;
import org.qcri.rheem.core.types.DataUnitType;
import java.util.Iterator;
| import org.qcri.rheem.core.optimizer.costs.LoadProfileEstimator;
import org.qcri.rheem.core.optimizer.costs.NestableLoadProfileEstimator;
import org.qcri.rheem.core.types.BasicDataUnitType;
|
40,054 | throws IOException, PortalException {
final Locale locale = RequestContextUtils.getLocale(request);
String sourceId = request.getParameter("sourceID");
String method = request.getParameter("method");
String destinationId = request.getParameter("elementID");
<BUG>if(moveElementInternal(request,sourceId, destinationId, method)) {
</BUG>
return new ModelAndView("jsonView",
Collections.singletonMap("response", getMessage("success.move.portlet",
"Portlet moved successfully", locale)));
| if(moveElementInternal(request, sourceId, destinationId, method)) {
|
40,055 | private LocalBroadcastManager mLocalBroadcastManager;
private String mActiveDownloadUrlString;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
<BUG>setContentView(R.layout.activity_app_details2);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);</BUG>
toolbar.setTitle(""); // Nice and clean toolbar
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
| setContentView(R.layout.app_details2);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
40,056 | .inflate(R.layout.app_details2_screenshots, parent, false);
return new ScreenShotsViewHolder(view);
} else if (viewType == VIEWTYPE_WHATS_NEW) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.app_details2_whatsnew, parent, false);
<BUG>return new WhatsNewViewHolder(view);
} else if (viewType == VIEWTYPE_LINKS) {</BUG>
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.app_details2_links, parent, false);
return new ExpandableLinearLayoutViewHolder(view);
| } else if (viewType == VIEWTYPE_DONATE) {
.inflate(R.layout.app_details2_donate, parent, false);
return new DonateViewHolder(view);
} else if (viewType == VIEWTYPE_LINKS) {
|
40,057 | import org.neo4j.kernel.api.exceptions.InvalidTransactionTypeKernelException;
import org.neo4j.kernel.api.exceptions.KernelException;
import org.neo4j.kernel.api.exceptions.LabelNotFoundKernelException;
import org.neo4j.kernel.api.exceptions.ProcedureException;
import org.neo4j.kernel.api.exceptions.PropertyKeyIdNotFoundKernelException;
<BUG>import org.neo4j.kernel.api.exceptions.RelationshipTypeIdNotFoundKernelException;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;</BUG>
import org.neo4j.kernel.api.exceptions.legacyindex.AutoIndexingKernelException;
import org.neo4j.kernel.api.exceptions.legacyindex.LegacyIndexNotFoundKernelException;
import org.neo4j.kernel.api.exceptions.schema.AlreadyConstrainedException;
| import org.neo4j.kernel.api.exceptions.index.IndexNotApplicableKernelException;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;
|
40,058 | import org.neo4j.kernel.api.constraints.RelationshipPropertyConstraint;
import org.neo4j.kernel.api.exceptions.EntityNotFoundException;
import org.neo4j.kernel.api.exceptions.LabelNotFoundKernelException;
import org.neo4j.kernel.api.exceptions.ProcedureException;
import org.neo4j.kernel.api.exceptions.PropertyKeyIdNotFoundKernelException;
<BUG>import org.neo4j.kernel.api.exceptions.RelationshipTypeIdNotFoundKernelException;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;</BUG>
import org.neo4j.kernel.api.exceptions.legacyindex.LegacyIndexNotFoundKernelException;
import org.neo4j.kernel.api.exceptions.schema.DuplicateSchemaRuleException;
import org.neo4j.kernel.api.exceptions.schema.IndexBrokenKernelException;
| import org.neo4j.kernel.api.exceptions.index.IndexNotApplicableKernelException;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;
|
40,059 | Iterator<Token> relationshipTypesGetAllTokens();
int labelCount();
int propertyKeyCount();
int relationshipTypeCount();
PrimitiveLongIterator nodesGetForLabel( int labelId );
<BUG>PrimitiveLongIterator indexQuery( NewIndexDescriptor index, IndexQuery... predicates ) throws IndexNotFoundKernelException;
PrimitiveLongIterator nodesGetAll();</BUG>
PrimitiveLongIterator relationshipsGetAll();
RelationshipIterator nodeGetRelationships( long nodeId, Direction direction, int[] relTypes )
throws EntityNotFoundException;
| PrimitiveLongIterator indexQuery( NewIndexDescriptor index, IndexQuery... predicates )
throws IndexNotFoundKernelException, IndexNotApplicableKernelException;
PrimitiveLongIterator nodesGetAll();
|
40,060 | package org.neo4j.storageengine.api.schema;
import org.neo4j.collection.primitive.PrimitiveLongCollections;
import org.neo4j.collection.primitive.PrimitiveLongIterator;
<BUG>import org.neo4j.graphdb.Resource;
import org.neo4j.kernel.api.schema_new.IndexQuery;</BUG>
public interface IndexReader extends Resource
{
long countIndexedNodes( long nodeId, Object... propertyValues );
| import org.neo4j.kernel.api.exceptions.index.IndexNotApplicableKernelException;
import org.neo4j.kernel.api.schema_new.IndexQuery;
|
40,061 | import org.neo4j.collection.primitive.PrimitiveIntSet;
import org.neo4j.collection.primitive.PrimitiveLongIterator;
import org.neo4j.cursor.Cursor;
import org.neo4j.kernel.api.exceptions.EntityNotFoundException;
import org.neo4j.kernel.api.exceptions.InvalidTransactionTypeKernelException;
<BUG>import org.neo4j.kernel.api.exceptions.KernelException;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;</BUG>
import org.neo4j.kernel.api.exceptions.legacyindex.AutoIndexingKernelException;
import org.neo4j.kernel.api.exceptions.schema.ConstraintValidationException;
import org.neo4j.kernel.api.exceptions.schema.IndexBrokenKernelException;
| import org.neo4j.kernel.api.exceptions.index.IndexNotApplicableKernelException;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;
|
40,062 | import org.neo4j.collection.primitive.PrimitiveLongIterator;
import org.neo4j.collection.primitive.PrimitiveLongSet;
import org.neo4j.graphdb.schema.IndexDefinition;
import org.neo4j.helpers.collection.Iterators;
import org.neo4j.kernel.api.ReadOperations;
<BUG>import org.neo4j.kernel.api.Statement;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;</BUG>
import org.neo4j.kernel.api.exceptions.schema.SchemaRuleNotFoundException;
import org.neo4j.kernel.api.schema.IndexDescriptorFactory;
import org.neo4j.kernel.api.schema.NodePropertyDescriptor;
| import org.neo4j.kernel.api.exceptions.index.IndexNotApplicableKernelException;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;
|
40,063 | import org.neo4j.kernel.api.constraints.NodePropertyConstraint;
import org.neo4j.kernel.api.constraints.UniquenessConstraint;
import org.neo4j.kernel.api.exceptions.EntityNotFoundException;
import org.neo4j.kernel.api.exceptions.InvalidTransactionTypeKernelException;
import org.neo4j.kernel.api.exceptions.KernelException;
<BUG>import org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException;
</BUG>
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;
import org.neo4j.kernel.api.exceptions.legacyindex.AutoIndexingKernelException;
import org.neo4j.kernel.api.exceptions.schema.AlreadyConstrainedException;
| import org.neo4j.kernel.api.exceptions.index.IndexNotApplicableKernelException;
|
40,064 | throw new UniquePropertyValueValidationException( constraint,
ConstraintValidationException.Phase.VALIDATION,
new IndexEntryConflictException( existing, NO_SUCH_NODE, value ) );
}
}
<BUG>catch ( IndexNotFoundKernelException | IndexBrokenKernelException e )
</BUG>
{
throw new UnableToValidateConstraintException( constraint, e );
}
| catch ( IndexNotFoundKernelException | IndexBrokenKernelException | IndexNotApplicableKernelException e )
|
40,065 | import org.neo4j.kernel.api.schema_new.SchemaBoundary;
import org.neo4j.kernel.api.schema_new.SchemaDescriptorFactory;</BUG>
import org.neo4j.kernel.api.security.SecurityContext;
<BUG>import org.neo4j.kernel.api.schema_new.index.IndexBoundary;
import org.neo4j.kernel.api.schema_new.index.NewIndexDescriptor;
import org.neo4j.kernel.impl.locking.Locks;</BUG>
import org.neo4j.test.DoubleLatch;
import static org.junit.Assert.assertTrue;
public class NodeGetUniqueFromIndexSeekIT extends KernelIntegrationTest
{
| import org.neo4j.kernel.api.TokenWriteOperations;
import org.neo4j.kernel.api.exceptions.KernelException;
import org.neo4j.kernel.api.exceptions.index.IndexNotApplicableKernelException;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;
import org.neo4j.kernel.api.exceptions.schema.IndexBrokenKernelException;
import org.neo4j.kernel.api.properties.Property;
import org.neo4j.kernel.api.schema.NodePropertyDescriptor;
|
40,066 | return list;
}
}
private interface ReaderInteraction
{
<BUG>PrimitiveLongIterator results( IndexReader reader );
</BUG>
}
protected void updateAndCommit( List<IndexEntryUpdate> updates )
throws IOException, IndexEntryConflictException
| PrimitiveLongIterator results( IndexReader reader ) throws Exception;
|
40,067 | package org.neo4j.kernel.api.index;
<BUG>import org.neo4j.collection.primitive.PrimitiveLongIterator;
import org.neo4j.kernel.api.schema_new.IndexQuery;</BUG>
import org.neo4j.storageengine.api.schema.IndexReader;
import org.neo4j.storageengine.api.schema.IndexSampler;
public class DelegatingIndexReader implements IndexReader
| import org.neo4j.kernel.api.exceptions.index.IndexNotApplicableKernelException;
import org.neo4j.kernel.api.schema_new.IndexQuery;
|
40,068 | public IndexSampler createSampler()
{
return delegate.createSampler();
}
@Override
<BUG>public PrimitiveLongIterator query( IndexQuery... predicates )
</BUG>
{
return delegate.query( predicates );
}
| public PrimitiveLongIterator query( IndexQuery... predicates ) throws IndexNotApplicableKernelException
|
40,069 | import org.neo4j.kernel.api.exceptions.EntityNotFoundException;
import org.neo4j.kernel.api.exceptions.InvalidTransactionTypeKernelException;
import org.neo4j.kernel.api.exceptions.LabelNotFoundKernelException;
import org.neo4j.kernel.api.exceptions.PropertyKeyIdNotFoundKernelException;
import org.neo4j.kernel.api.exceptions.RelationshipTypeIdNotFoundKernelException;
<BUG>import org.neo4j.kernel.api.exceptions.TransactionFailureException;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;</BUG>
import org.neo4j.kernel.api.exceptions.legacyindex.AutoIndexingKernelException;
import org.neo4j.kernel.api.exceptions.legacyindex.LegacyIndexNotFoundKernelException;
import org.neo4j.kernel.api.exceptions.schema.AlreadyConstrainedException;
| import org.neo4j.kernel.api.exceptions.index.IndexNotApplicableKernelException;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;
|
40,070 | PrimitiveLongIterator changesFiltered = filterIndexStateChangesForScanOrSeek( state, index, value,
exactMatches );
return single( resourceIterator( changesFiltered, committed ), NO_SUCH_NODE );
}
@Override
<BUG>public PrimitiveLongIterator indexQuery( KernelStatement state, NewIndexDescriptor index,
IndexQuery...predicates ) throws IndexNotFoundKernelException
{</BUG>
StorageStatement storeStatement = state.getStoreStatement();
| public PrimitiveLongIterator indexQuery( KernelStatement state, NewIndexDescriptor index, IndexQuery... predicates )
throws IndexNotFoundKernelException, IndexNotApplicableKernelException
{
|
40,071 | package org.neo4j.kernel.impl.api.operations;
import org.neo4j.collection.primitive.PrimitiveIntIterator;
import org.neo4j.collection.primitive.PrimitiveIntSet;
import org.neo4j.collection.primitive.PrimitiveLongIterator;
import org.neo4j.cursor.Cursor;
<BUG>import org.neo4j.kernel.api.exceptions.EntityNotFoundException;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;</BUG>
import org.neo4j.kernel.api.exceptions.schema.IndexBrokenKernelException;
import org.neo4j.kernel.api.schema_new.IndexQuery;
import org.neo4j.kernel.api.schema_new.index.NewIndexDescriptor;
| import org.neo4j.kernel.api.exceptions.index.IndexNotApplicableKernelException;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;
|
40,072 | import org.neo4j.storageengine.api.RelationshipItem;
public interface EntityReadOperations
{
PrimitiveLongIterator nodesGetForLabel( KernelStatement state, int labelId );
PrimitiveLongIterator indexQuery( KernelStatement statement, NewIndexDescriptor index, IndexQuery... predicates )
<BUG>throws IndexNotFoundKernelException;
long nodeGetFromUniqueIndexSeek( KernelStatement state, NewIndexDescriptor index, Object value )
throws IndexNotFoundKernelException, IndexBrokenKernelException;
</BUG>
long nodesCountIndexed( KernelStatement statement, NewIndexDescriptor index, long nodeId, Object value )
| throws IndexNotFoundKernelException, IndexNotApplicableKernelException;
throws IndexNotFoundKernelException, IndexBrokenKernelException, IndexNotApplicableKernelException;
|
40,073 | package org.neo4j.kernel.impl.api;
import org.mockito.Matchers;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.neo4j.collection.primitive.PrimitiveLongCollections;
<BUG>import org.neo4j.kernel.api.ReadOperations;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;</BUG>
import org.neo4j.kernel.api.schema_new.IndexQuery;
import org.neo4j.kernel.api.txstate.TransactionState;
import org.neo4j.kernel.impl.api.operations.CountsOperations;
| import org.neo4j.kernel.api.exceptions.index.IndexNotApplicableKernelException;
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;
|
40,074 | when( indexReader.query( Matchers.isA( IndexQuery.ExactPredicate.class ) ) ).thenReturn( PrimitiveLongCollections.emptyIterator() );
StorageStatement storageStatement = mock( StorageStatement.class );
when( storageStatement.getIndexReader( Matchers.any() ) ).thenReturn( indexReader );
when( state.getStoreStatement() ).thenReturn( storageStatement );
}
<BUG>catch ( IndexNotFoundKernelException e )
{</BUG>
throw new Error( e );
}
when( state.txState() ).thenReturn( txState );
| catch ( IndexNotFoundKernelException | IndexNotApplicableKernelException e )
{
|
40,075 | package org.neo4j.consistency.checking.full;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import org.neo4j.collection.primitive.Primitive;
<BUG>import org.neo4j.collection.primitive.PrimitiveIntSet;
import org.neo4j.collection.primitive.PrimitiveLongIterator;</BUG>
import org.neo4j.collection.primitive.PrimitiveLongPeekingIterator;
import org.neo4j.consistency.checking.ChainCheck;
import org.neo4j.consistency.checking.CheckerEngine;
| import org.neo4j.collection.primitive.PrimitiveLongCollections;
import org.neo4j.collection.primitive.PrimitiveLongIterator;
|
40,076 | import org.neo4j.consistency.checking.CheckerEngine;
import org.neo4j.consistency.checking.RecordCheck;
import org.neo4j.consistency.checking.cache.CacheAccess;
import org.neo4j.consistency.checking.index.IndexAccessors;
import org.neo4j.consistency.report.ConsistencyReport;
<BUG>import org.neo4j.consistency.store.RecordAccess;
import org.neo4j.kernel.api.schema_new.IndexQuery;</BUG>
import org.neo4j.kernel.impl.api.LookupFilter;
import org.neo4j.kernel.impl.store.record.IndexRule;
import org.neo4j.kernel.impl.store.record.NodeRecord;
| import org.neo4j.kernel.api.exceptions.index.IndexNotApplicableKernelException;
import org.neo4j.kernel.api.schema_new.IndexQuery;
|
40,077 | import org.neo4j.kernel.api.exceptions.schema.ConstraintValidationException;
import org.neo4j.kernel.api.schema.NodePropertyDescriptor;
import org.neo4j.kernel.api.ReadOperations;
import org.neo4j.kernel.api.Statement;
import org.neo4j.kernel.api.exceptions.EntityNotFoundException;
<BUG>import org.neo4j.kernel.api.exceptions.InvalidTransactionTypeKernelException;
import org.neo4j.kernel.api.exceptions.Status;</BUG>
import org.neo4j.kernel.api.exceptions.index.IndexNotFoundKernelException;
import org.neo4j.kernel.api.exceptions.schema.SchemaKernelException;
import org.neo4j.kernel.api.exceptions.schema.SchemaRuleNotFoundException;
| import org.neo4j.kernel.api.exceptions.KernelException;
import org.neo4j.kernel.api.exceptions.Status;
|
40,078 | package org.opennms.netmgt.alarmd.northbounder.syslog;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
<BUG>import java.util.Map;
import org.opennms.core.utils.LogUtils;</BUG>
import org.opennms.core.utils.PropertiesUtils;
import org.opennms.netmgt.alarmd.api.NorthboundAlarm;
import org.opennms.netmgt.alarmd.api.NorthboundAlarm.AlarmType;
| import org.apache.commons.lang.StringUtils;
import org.opennms.core.utils.LogUtils;
|
40,079 | String msg = "Syslog forwarding configuration is not initialized.";
IllegalStateException e = new IllegalStateException(msg);
LogUtils.errorf(this, e, msg);
throw e;
}
<BUG>createNorthboundInstances();
setNaglesDelay(m_config.getNaglesDelay());</BUG>
setMaxBatchSize(m_config.getBatchSize());
setMaxPreservedAlarms(m_config.getQueueSize());
}
| createNorthboundInstance();
setNaglesDelay(m_config.getNaglesDelay());
|
40,080 | LogUtils.debugf(this, "UEI: %s, rejected.", alarm.getUei());
return false;
}
@Override
public void forwardAlarms(List<NorthboundAlarm> alarms) throws NorthbounderException {
<BUG>List<SyslogDestination> dests = getDestinations();
if (dests == null) {
String errorMsg = "No Syslog destinations are defined.";
IllegalStateException e = new IllegalStateException(errorMsg);
LogUtils.errorf(this, e, errorMsg);
throw e;
}</BUG>
if (alarms == null) {
| String errorMsg = "No alarms in alarms list for syslog forwarding.";
|
40,081 | } catch (SyslogRuntimeException e) {
String msg = "Could not create northbound instance, %s";
LogUtils.errorf(this, e, msg, instName);
throw e;
}
<BUG>}
}
}
private SyslogConfigIF createConfig(SyslogDestination dest,
SyslogProtocol protocol, int fac) {</BUG>
SyslogConfigIF config;
| private SyslogConfigIF createConfig(final SyslogDestination dest, final SyslogProtocol protocol, int fac) {
|
40,082 | default:
config = new UDPNetSyslogConfig(fac, "localhost", 514);
}
return config;
}
<BUG>private int convertFacility(SyslogFacility facility) {
</BUG>
int fac;
switch (facility) {
case KERN:
| private int convertFacility(final SyslogFacility facility) {
|
40,083 | package org.neo4j.kernel.api.impl.index;
<BUG>import static org.junit.Assert.assertEquals;
import static org.neo4j.graphdb.DynamicLabel.label;
import static org.neo4j.helpers.collection.IteratorUtil.asUniqueSet;</BUG>
import java.io.File;
import java.io.IOException;
| [DELETED] |
40,084 | assertEquals( 1, doIndexLookup( myLabel, 13 ).size() );
}
@Test
public void removeShouldBeIdempotentWhenDoingRecovery() throws Exception
{
<BUG>startDb(createLuceneIndexFactory());
Label myLabel = label( "MyLabel" );
createIndex( myLabel );
long node = createNode( myLabel, 12 );</BUG>
rotateLogs();
| startDb( createLuceneIndexFactory() );
IndexDefinition indexDefinition = createIndex( myLabel );
waitForIndex( indexDefinition );
long node = createNode( myLabel, 12 );
|
40,085 | Node node = db.createNode( label );
node.setProperty( NUM_BANANAS_KEY, number );
tx.success();
return node.getId();
}
<BUG>finally
{
tx.finish();
}</BUG>
}
| [DELETED] |
40,086 | tx.finish();
}</BUG>
}
private void updateNode( long nodeId, int value )
{
<BUG>Transaction tx = db.beginTx();
try</BUG>
{
Node node = db.getNodeById( nodeId );
| Node node = db.createNode( label );
node.setProperty( NUM_BANANAS_KEY, number );
tx.success();
return node.getId();
try ( Transaction tx = db.beginTx() )
|
40,087 | life.start();
}
finally
{
neoStore.setRecoveredStatus( false );
<BUG>}
neoStore.makeStoreOk();
propertyKeyTokenHolder.addTokens( ((TokenStore<?>) neoStore.getPropertyKeyTokenStore())
.getTokens( Integer.MAX_VALUE ) );
relationshipTypeTokens.addTokens( ((TokenStore<?>) neoStore.getRelationshipTypeTokenStore())
.getTokens( Integer.MAX_VALUE ) );
labelTokens.addTokens( ((TokenStore<?>) neoStore.getLabelTokenStore()).getTokens( Integer.MAX_VALUE ) );
}</BUG>
catch ( Throwable e )
| propertyKeyTokenHolder.addTokens( neoStore.getPropertyKeyTokenStore().getTokens( Integer.MAX_VALUE ) );
relationshipTypeTokens.addTokens( neoStore.getRelationshipTypeTokenStore().getTokens( Integer.MAX_VALUE ) );
labelTokens.addTokens( neoStore.getLabelTokenStore().getTokens( Integer.MAX_VALUE ) );
|
40,088 | public boolean isDumbAware() {
return true;
}
@Override
public boolean isApplicable(AnActionEvent event, final Map<String, Object> _params) {
<BUG>return SNodeOperations.isInstanceOf(((SNode) MapSequence.fromMap(_params).get("selectedNode")), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, "jetbrains.mps.baseLanguage.structure.ClassConcept")) && ListSequence.fromList(((List<SNode>) BHReflection.invoke(SNodeOperations.cast(((SNode) MapSequence.fromMap(_params).get("selectedNode")), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, "jetbrains.mps.baseLanguage.structure.ClassConcept")), SMethodTrimmedId.create("getMethodsToOverride", null, "4GM03FJm3zL")))).isNotEmpty();
</BUG>
}
@Override
public void doUpdate(@NotNull AnActionEvent event, final Map<String, Object> _params) {
| return SNodeOperations.isInstanceOf(event.getData(MPSCommonDataKeys.NODE), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, "jetbrains.mps.baseLanguage.structure.ClassConcept")) && ListSequence.fromList(((List<SNode>) BHReflection.invoke(SNodeOperations.cast(event.getData(MPSCommonDataKeys.NODE), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, "jetbrains.mps.baseLanguage.structure.ClassConcept")), SMethodTrimmedId.create("getMethodsToOverride", null, "4GM03FJm3zL")))).isNotEmpty();
|
40,089 | }
}
return true;
}
@Override
<BUG>public void doExecute(@NotNull final AnActionEvent event, final Map<String, Object> _params) {
final Project project = ((IOperationContext) MapSequence.fromMap(_params).get("operationContext")).getProject();
new OverrideImplementMethodAction(project, ((SNode) MapSequence.fromMap(_params).get("selectedNode")), ((EditorContext) MapSequence.fromMap(_params).get("editorContext")), true).run();</BUG>
}
}
| public void doUpdate(@NotNull AnActionEvent event, final Map<String, Object> _params) {
this.setEnabledState(event.getPresentation(), this.isApplicable(event, _params));
|
40,090 | import jetbrains.mps.smodel.behaviour.BHReflection;
import jetbrains.mps.core.aspects.behaviour.SMethodTrimmedId;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.ide.actions.MPSCommonDataKeys;
import jetbrains.mps.ide.editor.MPSEditorDataKeys;
<BUG>import jetbrains.mps.smodel.IOperationContext;
import jetbrains.mps.project.Project;
import jetbrains.mps.smodel.ModelAccess;
</BUG>
import jetbrains.mps.util.Computable;
| import jetbrains.mps.project.MPSProject;
import jetbrains.mps.smodel.ModelAccessHelper;
|
40,091 | import jetbrains.mps.smodel.behaviour.BHReflection;
import jetbrains.mps.core.aspects.behaviour.SMethodTrimmedId;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.ide.actions.MPSCommonDataKeys;
import jetbrains.mps.ide.editor.MPSEditorDataKeys;
<BUG>import jetbrains.mps.smodel.IOperationContext;
import jetbrains.mps.project.Project;
import jetbrains.mps.smodel.ModelAccess;
</BUG>
import jetbrains.mps.util.Computable;
| import jetbrains.mps.project.MPSProject;
import jetbrains.mps.smodel.ModelAccessHelper;
|
40,092 | import jetbrains.mps.smodel.behaviour.BHReflection;
import jetbrains.mps.core.aspects.behaviour.SMethodTrimmedId;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.ide.actions.MPSCommonDataKeys;
import jetbrains.mps.ide.editor.MPSEditorDataKeys;
<BUG>import jetbrains.mps.smodel.IOperationContext;
import jetbrains.mps.project.Project;
import jetbrains.mps.smodel.ModelAccess;
</BUG>
import jetbrains.mps.util.Computable;
| import jetbrains.mps.project.MPSProject;
import jetbrains.mps.smodel.ModelAccessHelper;
|
40,093 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
40,094 | }
@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);
|
40,095 | 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 != null) {
c.moveToFirst();
}
| MemoEntry.COLUMN_ORDER + " ASC", null);
|
40,096 | 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(
|
40,097 | 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.Adapter<RecyclerView.ViewHolder> implements EditMode {
</BUG>
private List<MemoEntity> memoList;
| import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter;
public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
|
40,098 | 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, EditMemoDialogFragment.MemoCallback callback) {
this.mActivity = activity;</BUG>
this.topicId = topicId;
this.memoList = memoList;
| public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {
super(recyclerView);
this.mActivity = activity;
|
40,099 | 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) {
|
40,100 | 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;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.