id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
24,701
public String toString() { return "MethodCallExprContext{wrapped=" + wrappedNode + "}"; } @Override public Optional<MethodUsage> solveMethodAsUsage(String name, List<Type> argumentsTypes, TypeSolver typeSolver) { <BUG>if (wrappedNode.getScope().isPresent()) { if (wrappedNode.getScope().get() instanceof NameExpr) { Str...
if (wrappedNode.getScope() != null) { if (wrappedNode.getScope() instanceof NameExpr) { String className = ((NameExpr) wrappedNode.getScope()).getName(); SymbolReference<TypeDeclaration> ref = solveType(className, typeSolver);
24,702
throw new UnsolvedSymbolException(ref.getCorrespondingDeclaration().toString(), "Method '" + name + "' with parameterTypes " + argumentsTypes); } } } <BUG>Type typeOfScope = JavaParserFacade.get(typeSolver).getType(wrappedNode.getScope().get()); Map<TypeParameterDeclaration, Type> inferredTypes = new HashMap<>();</BUG>...
Type typeOfScope = JavaParserFacade.get(typeSolver).getType(wrappedNode.getScope()); Map<TypeParameterDeclaration, Type> inferredTypes = new HashMap<>();
24,703
return MethodResolutionLogic.solveMethodInType(typeDeclaration, name, argumentsTypes, typeSolver); } } Type typeOfScope = null; try { <BUG>typeOfScope = JavaParserFacade.get(typeSolver).getType(wrappedNode.getScope().get()); } catch (Exception e) {</BUG> throw new RuntimeException(String.format("Issur calculating the t...
typeOfScope = JavaParserFacade.get(typeSolver).getType(wrappedNode.getScope()); } catch (Exception e) {
24,704
private Context getContext() { return JavaParserFactory.getContext(wrappedNode, typeSolver); } @Override public boolean isAbstract() { <BUG>return (!wrappedNode.getBody().isPresent()); </BUG> } private Optional<Type> typeParamByName(String name, TypeSolver typeSolver, Context context) { int i = 0;
return (wrappedNode.getBody() == null);
24,705
@Test public void typeDeclarationSuperClassImplicitlyIncludeObject() throws ParseException { CompilationUnit cu = parseSample("Issue18"); ClassOrInterfaceDeclaration clazz = Navigator.demandClass(cu, "Foo"); MethodDeclaration methodDeclaration = Navigator.demandMethod(clazz, "bar"); <BUG>ExpressionStmt expr = (Expressi...
ExpressionStmt expr = (ExpressionStmt) methodDeclaration.getBody().getStmts().get(1); TypeSolver typeSolver = new ReflectionTypeSolver();
24,706
return convertToUsageVariableType(expr.getVariables().get(0)); } else if (node instanceof InstanceOfExpr) { return PrimitiveType.BOOLEAN; } else if (node instanceof EnclosedExpr) { EnclosedExpr enclosedExpr = (EnclosedExpr) node; <BUG>return getTypeConcrete(enclosedExpr.getInner().get(), solveLambdas); } else if (node ...
return getTypeConcrete(enclosedExpr.getInner(), solveLambdas); } else if (node instanceof CastExpr) {
24,707
} return convertToUsage(type, JavaParserFactory.getContext(context, typeSolver)); } private String qName(ClassOrInterfaceType classOrInterfaceType) { String name = classOrInterfaceType.getName(); <BUG>if (classOrInterfaceType.getScope().isPresent()) { return qName(classOrInterfaceType.getScope().get()) + "." + name; }...
} else if (node instanceof VariableDeclarationExpr) { VariableDeclarationExpr expr = (VariableDeclarationExpr) node; if (expr.getVariables().size() != 1) { throw new UnsupportedOperationException();
24,708
if (!ref.isSolved()) { throw new UnsolvedSymbolException(name); } TypeDeclaration typeDeclaration = ref.getCorrespondingDeclaration(); List<Type> typeParameters = Collections.emptyList(); <BUG>if (classOrInterfaceType.getTypeArguments().isPresent()) { typeParameters = classOrInterfaceType.getTypeArguments().get().stre...
if (classOrInterfaceType.getTypeArguments() != null) { typeParameters = classOrInterfaceType.getTypeArguments().stream().map((pt) -> convertToUsage(pt, context)).collect(Collectors.toList());
24,709
} } else if (type instanceof com.github.javaparser.ast.type.PrimitiveType) { return PrimitiveType.byName(((com.github.javaparser.ast.type.PrimitiveType) type).getType().name()); } else if (type instanceof WildcardType) { WildcardType wildcardType = (WildcardType) type; <BUG>if (wildcardType.getExtends().isPresent() && ...
TypeDeclaration typeDeclaration = ref.getCorrespondingDeclaration(); List<Type> typeParameters = Collections.emptyList(); if (classOrInterfaceType.getTypeArguments() != null) { typeParameters = classOrInterfaceType.getTypeArguments().stream().map((pt) -> convertToUsage(pt, context)).collect(Collectors.toList()); if (ty...
24,710
public static JavaParserSymbolDeclaration localVar(VariableDeclarator variableDeclarator, TypeSolver typeSolver) { return new JavaParserSymbolDeclaration(variableDeclarator, variableDeclarator.getId().getName(), typeSolver, false, false, true); } public static int getParamPos(Parameter parameter) { int pos = 0; <BUG>fo...
for (Node node : getParentNode(parameter).getChildNodes()) { if (node == parameter) {
24,711
nodes.sort((n1, n2) -> n1.getBegin().compareTo(n2.getBegin())); return nodes; } private void collectAllNodes(Node node, List<Node> nodes) { nodes.add(node); <BUG>node.getChildrenNodes().forEach(c -> collectAllNodes(c, nodes)); }</BUG> public void solve(File file) throws IOException, ParseException { if (file.isDirector...
node.getChildNodes().forEach(c -> collectAllNodes(c, nodes));
24,712
return type; } public static Optional<TypeDeclaration<?>> findType(TypeDeclaration<?> td, String qualifiedName) { final String typeName = getOuterTypeName(qualifiedName); Optional<TypeDeclaration<?>> type = Optional.empty(); <BUG>for (Node n : td.getMembers().getChildrenNodes()) { if (n instanceof TypeDeclaration && ((...
for (Node n : td.getMembers()) { if (n instanceof TypeDeclaration && ((TypeDeclaration<?>) n).getName().equals(typeName)) {
24,713
NameExpr nameExpr = (NameExpr) node; if (nameExpr.getName() != null && nameExpr.getName().equals(name)) { return nameExpr; } } <BUG>for (Node child : node.getChildrenNodes()) { NameExpr res = findNameExpression(child, name);</BUG> if (res != null) { return res; }
for (Node child : node.getChildNodes()) { NameExpr res = findNameExpression(child, name);
24,714
MethodCallExpr methodCallExpr = (MethodCallExpr) node; if (methodCallExpr.getName().equals(methodName)) { return methodCallExpr; } } <BUG>for (Node child : node.getChildrenNodes()) { MethodCallExpr res = findMethodCall(child, methodName);</BUG> if (res != null) { return res; }
for (Node child : node.getChildNodes()) { MethodCallExpr res = findMethodCall(child, methodName);
24,715
VariableDeclarator variableDeclarator = (VariableDeclarator) node; if (variableDeclarator.getId().getName().equals(name)) { return variableDeclarator; } } <BUG>for (Node child : node.getChildrenNodes()) { VariableDeclarator res = demandVariableDeclaration(child, name);</BUG> if (res != null) { return res; }
for (Node child : node.getChildNodes()) { VariableDeclarator res = demandVariableDeclaration(child, name);
24,716
package com.cronutils.model.time.generator; import java.util.Collections; <BUG>import java.util.List; import org.apache.commons.lang3.Validate;</BUG> import com.cronutils.model.field.CronField; import com.cronutils.model.field.expression.FieldExpression; public abstract class FieldValueGenerator {
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
24,717
import java.util.ResourceBundle; import java.util.function.Function;</BUG> class DescriptionStrategyFactory { private DescriptionStrategyFactory() {} public static DescriptionStrategy daysOfWeekInstance(final ResourceBundle bundle, final FieldExpression expression) { <BUG>final Function<Integer, String> nominal = integ...
import java.util.function.Function; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On; final Function<Integer, String> nominal = integer -> DayOfWeek.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale());
24,718
return dom; } public static DescriptionStrategy monthsInstance(final ResourceBundle bundle, final FieldExpression expression) { return new NominalDescriptionStrategy( bundle, <BUG>integer -> new DateTime().withMonthOfYear(integer).monthOfYear().getAsText(bundle.getLocale()), expression</BUG> ); } public static Descript...
integer -> Month.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale()), expression
24,719
<BUG>package com.cronutils.model.time.generator; import com.cronutils.mapper.WeekDay;</BUG> import com.cronutils.model.field.CronField; import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.constraint.FieldConstraintsBuilder;
import java.time.LocalDate; import java.util.Collections; import java.util.List; import java.util.Set; import org.apache.commons.lang3.Validate; import com.cronutils.mapper.WeekDay;
24,720
import com.cronutils.model.field.expression.Between; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.parser.CronParserField; import com.google.common.collect.Lists; import com.google.common.collect.Sets; <BUG>import org.apache.commons.lang3.Validate; import org.joda.time.DateTime; impo...
[DELETED]
24,721
<BUG>package com.cronutils.model.time.generator; import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On;
import java.time.DayOfWeek; import java.time.LocalDate; import java.util.List; import org.apache.commons.lang3.Validate; import com.cronutils.model.field.CronField;
24,722
import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On; import com.google.common.collect.Lists; <BUG>import org.apache.commons.lang3.Validate; import org.joda.time.DateT...
package com.cronutils.model.time.generator; import java.time.DayOfWeek; import java.time.LocalDate; import java.util.List; import com.cronutils.model.field.CronField;
24,723
class OnDayOfMonthValueGenerator extends FieldValueGenerator { private int year; private int month; public OnDayOfMonthValueGenerator(CronField cronField, int year, int month) { super(cronField); <BUG>Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of month"); ...
Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of" + " month"); this.year = year;
24,724
package com.cronutils.mapper; public class ConstantsMapper { private ConstantsMapper() {} public static final WeekDay QUARTZ_WEEK_DAY = new WeekDay(2, false); <BUG>public static final WeekDay JODATIME_WEEK_DAY = new WeekDay(1, false); </BUG> public static final WeekDay CRONTAB_WEEK_DAY = new WeekDay(1, true); public st...
public static final WeekDay JAVA8 = new WeekDay(1, false);
24,725
return nextMatch; } catch (NoSuchValueException e) { throw new IllegalArgumentException(e); } } <BUG>DateTime nextClosestMatch(DateTime date) throws NoSuchValueException { </BUG> List<Integer> year = yearsValueGenerator.generateCandidates(date.getYear(), date.getYear()); TimeNode days = null; int lowestMonth = months.g...
ZonedDateTime nextClosestMatch(ZonedDateTime date) throws NoSuchValueException {
24,726
boolean questionMarkSupported = cronDefinition.getFieldDefinition(DAY_OF_WEEK).getConstraints().getSpecialChars().contains(QUESTION_MARK); if(questionMarkSupported){ return new TimeNode( generateDayCandidatesQuestionMarkSupported( <BUG>date.getYear(), date.getMonthOfYear(), </BUG> ((DayOfWeekFieldDefinition) cronDefini...
date.getYear(), date.getMonthValue(),
24,727
) ); }else{ return new TimeNode( generateDayCandidatesQuestionMarkNotSupported( <BUG>date.getYear(), date.getMonthOfYear(), </BUG> ((DayOfWeekFieldDefinition) cronDefinition.getFieldDefinition(DAY_OF_WEEK) ).getMondayDoWValue()
date.getYear(), date.getMonthValue(),
24,728
} public DateTime lastExecution(DateTime date){ </BUG> Validate.notNull(date); try { <BUG>DateTime previousMatch = previousClosestMatch(date); </BUG> if(previousMatch.equals(date)){ previousMatch = previousClosestMatch(date.minusSeconds(1)); }
public java.time.Duration timeToNextExecution(ZonedDateTime date){ return java.time.Duration.between(date, nextExecution(date)); public ZonedDateTime lastExecution(ZonedDateTime date){ ZonedDateTime previousMatch = previousClosestMatch(date);
24,729
return previousMatch; } catch (NoSuchValueException e) { throw new IllegalArgumentException(e); } } <BUG>public Duration timeFromLastExecution(DateTime date){ return new Interval(lastExecution(date), date).toDuration(); } public boolean isMatch(DateTime date){ </BUG> return nextExecution(lastExecution(date)).equals(da...
[DELETED]
24,730
<BUG>package com.cronutils.model.time.generator; import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.expression.Every; import com.cronutils.model.field.expression.FieldExpression; import com.google.common.annotations.VisibleForTesting;
import java.time.ZonedDateTime; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.cronutils.model.field.CronField;
24,731
import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.expression.Every; import com.cronutils.model.field.expression.FieldExpression; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Lists; <BUG>import org.joda.time.DateTime; import org.slf4j.Logger; i...
package com.cronutils.model.time.generator; import java.time.ZonedDateTime; import java.util.List; import com.cronutils.model.field.CronField;
24,732
private static final Logger log = LoggerFactory.getLogger(EveryFieldValueGenerator.class); public EveryFieldValueGenerator(CronField cronField) { super(cronField); log.trace(String.format( "processing \"%s\" at %s", <BUG>cronField.getExpression().asString(), DateTime.now() </BUG> )); } @Override
cronField.getExpression().asString(), ZonedDateTime.now()
24,733
@Override public boolean intersects(Collection<AxisAlignedBB> boxes1, IBlockAccess world, BlockPos pos) { if (world instanceof IMultipartBlockAccess) { IPartInfo info = ((IMultipartBlockAccess) world).getPartInfo(); for (IPartInfo info2 : info.getContainer().getParts().values()) { <BUG>if (info2 != info && intersects(b...
if (info2 != info && intersects(boxes1, info2.getPart().getOcclusionBoxes(info2))) { return true;
24,734
public interface IWireContainer { World world(); BlockPos pos(); void requestNeighborUpdate(int connectionMask); void requestNetworkUpdate(); <BUG>void requestRenderUpdate(); class Dummy implements IWireContainer {</BUG> @Override public World world() { return null;
void dropWire(); class Dummy implements IWireContainer {
24,735
dependencies = {"mod:mcmultipart"} ) public class CharsetLibWires { @CharsetModule.Instance public static CharsetLibWires instance; <BUG>@CapabilityInject(IWireProxy.class) public static Capability<IWireProxy> WIRE_CAP;</BUG> public static BlockWire blockWire; public static ItemWire itemWire; @SideOnly(Side.CLIENT)
[DELETED]
24,736
if (wire != null) { return wire.getFactory().getSelectionBox(wire.getLocation(), 0); } else { return FULL_BLOCK_AABB; } <BUG>} @Override public void onPartPlacedBy(IPartInfo part, EntityLivingBase placer, ItemStack stack) { TileEntity tile = part.getTile().getTileEntity(); if (tile != null && tile instanceof TileWire) ...
return Collections.singletonList(wire.getFactory().getSelectionBox(wire.getLocation(), 0)); return Collections.emptyList();
24,737
public IPartSlot getSlotForPlacement(World world, BlockPos pos, IBlockState state, EnumFacing facing, float hitX, float hitY, float hitZ, EntityLivingBase placer) { Wire wire = WireUtils.getWire(world, pos, WireFace.get(facing)); if (wire != null) { return EnumCenterSlot.CENTER; } else { <BUG>return EnumFaceSlot.fromFa...
return EnumFaceSlot.fromFace(facing.getOpposite());
24,738
<BUG>package pl.asie.charset.lib.wires; import mcmultipart.api.item.ItemBlockMultipart; import mcmultipart.api.multipart.IMultipart; import net.minecraft.block.Block;</BUG> import net.minecraft.block.state.IBlockState;
import mcmultipart.MCMultiPart; import mcmultipart.api.container.IPartInfo; import mcmultipart.api.multipart.MultipartHelper; import mcmultipart.api.slot.IPartSlot; import net.minecraft.block.Block;
24,739
return Observable.from(pairs); } }); } public SessionState sessionState() { <BUG>return sessionState; </BUG> } public void controlEventHandler(final ControlEventHandler controlEventHandler) { env.setControlEventHandler(new ControlEventHandler() {
return conductor.sessionState();
24,740
return Observable .from(partitions) .flatMap(new Func1<Integer, Observable<?>>() { @Override public Observable<?> call(Integer partition) { <BUG>PartitionState partitionState = sessionState.get(partition); </BUG> return conductor.startStreamForPartition( partition.shortValue(), partitionState.getUuid(),
PartitionState partitionState = sessionState().get(partition);
24,741
import com.couchbase.client.core.logging.CouchbaseLogger; import com.couchbase.client.core.logging.CouchbaseLoggerFactory; import com.couchbase.client.core.message.observe.Observe; import com.couchbase.client.core.service.ServiceType; import com.couchbase.client.core.state.AbstractStateMachine; <BUG>import com.couchbas...
import com.couchbase.client.core.state.NotConnectedException; import com.couchbase.client.core.time.Delay; import com.couchbase.client.dcp.state.PartitionState; import com.couchbase.client.dcp.state.SessionState; import com.couchbase.client.deps.io.netty.buffer.ByteBuf;
24,742
import com.couchbase.client.dcp.config.ClientEnvironment; import com.couchbase.client.deps.io.netty.buffer.ByteBuf;</BUG> import com.couchbase.client.deps.io.netty.util.internal.ConcurrentSet; import rx.*; import rx.Observable; <BUG>import rx.functions.Action0; import rx.functions.Action1; import rx.functions.Func1; </...
import com.couchbase.client.dcp.state.PartitionState; import com.couchbase.client.dcp.state.SessionState; import com.couchbase.client.deps.io.netty.buffer.ByteBuf; import rx.functions.*;
24,743
import rx.subjects.PublishSubject; import rx.subjects.Subject; import java.net.InetAddress; import java.util.*; import java.util.concurrent.TimeUnit; <BUG>import java.util.concurrent.atomic.AtomicReference; public class Conductor {</BUG> private static final CouchbaseLogger LOGGER = CouchbaseLoggerFactory.getInstance(C...
import static com.couchbase.client.dcp.util.retry.RetryBuilder.anyOf; public class Conductor {
24,744
LOGGER.trace("Ignoring config, since rev has not changed."); } } }); channels = new ConcurrentSet<DcpChannel>(); <BUG>} public Completable connect() {</BUG> Completable atLeastOneConfig = configProvider.configs().first().toCompletable(); return configProvider.start().concatWith(atLeastOneConfig); }
public SessionState sessionState() { return sessionState; public Completable connect() {
24,745
return getSeqnosForChannel(channel); } }); } private Observable<ByteBuf> getSeqnosForChannel(final DcpChannel channel) { <BUG>if (channel.state() != LifecycleState.CONNECTED) { LOGGER.debug("Rescheduling get Seqnos for channel {}, not connected (yet).", channel); return Observable .timer(100, TimeUnit.MILLISECONDS) .fl...
.just(channel) .flatMap(new Func1<DcpChannel, Observable<ByteBuf>>() {
24,746
private void add(final InetAddress node) { if (channels.contains(node)) { return; } LOGGER.debug("Adding DCP Channel against {}", node); <BUG>DcpChannel channel = new DcpChannel(node, env); </BUG> channels.add(channel); channel.connect().subscribe(); }
DcpChannel channel = new DcpChannel(node, env, this);
24,747
final Container current = (Container)myCurrentEvent.getCurrentOverComponent(); final Point point = myCurrentEvent.getPointOn(getLayeredPane(current)); Rectangle inPlaceRect = new Rectangle(point.x - 5, point.y - 5, 5, 5); if (!myCurrentEvent.equals(myLastProcessedEvent)) { hideCurrentHighlighter(); <BUG>} boolean sameT...
final DnDTarget processedTarget = getLastProcessedTarget(); boolean sameTarget = processedTarget != null && processedTarget.equals(target);
24,748
import com.eucalyptus.storage.msgs.s3.Grantee; import com.eucalyptus.storage.msgs.s3.Group; import com.google.common.base.Function; import com.google.common.base.Strings; import net.sf.json.JSONObject; <BUG>import net.sf.json.JSONSerializer; import org.apache.log4j.Logger;</BUG> import javax.persistence.Column; import ...
import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger;
24,749
import com.eucalyptus.storage.msgs.s3.TargetGrants; import com.eucalyptus.storage.msgs.s3.Upload; import com.eucalyptus.util.EucalyptusCloudException; import com.google.common.base.Strings; import edu.ucsb.eucalyptus.msgs.ComponentProperty; <BUG>import edu.ucsb.eucalyptus.util.SystemUtil; import org.apache.log4j.Logger...
import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger;
24,750
try { BucketMetadataManagers.getInstance().setAcp(bucket, fullPolicy); SetBucketAccessControlPolicyResponseType reply = request.getReply(); reply.setBucket(request.getBucket()); return reply; <BUG>} catch(Exception e) { LOG.error("Transaction error updating bucket ACL for bucket " + request.getBucket(),e); </BUG> thro...
ObjectMetadataManagers.getInstance().stop(); LOG.error("Error stopping object manager",e);
24,751
package org.jbpm.simulation.impl; <BUG>import java.util.ArrayList; import java.util.List;</BUG> import org.drools.core.command.impl.ExecutableCommand; import org.drools.core.command.impl.RegistryContext; import org.drools.core.event.DefaultProcessEventListener;
[DELETED]
24,752
public SimulateProcessPathCommand(String processId, SimulationContext context, SimulationPath path) { this.processId = processId; this.simContext = context; this.path = path; } <BUG>public KieSession execute(Context context) { </BUG> KieSession session = ((RegistryContext)context).lookup(KieSession.class); session.getE...
public KieSession execute(Context context ) {
24,753
import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentHashMap; public class InfinispanJDKTimerService extends JDKTimerService { private static Logger logger = LoggerFactory.getLogger( InfinispanTimerJobInstance.class ); <BUG>private CommandService commandService;...
private ExecutableRunner commandService; public void setCommandService(ExecutableRunner commandService) {
24,754
private static final long serialVersionUID = 4L; private InfinispanJDKCallableJob job; public JDKCallableJobCommand(InfinispanJDKCallableJob job) { this.job = job; } <BUG>public Void execute(Context context) { </BUG> try { return job.internalCall(); } catch ( Exception e ) {
public Void execute(Context context ) {
24,755
this.sessionInfo = (SessionInfo) sessionInfo; this.persistenceContext = ((PersistenceContextManager) jpm).getApplicationScopedPersistenceContext(); this.ksession = ksession; } @Override <BUG>public Void execute(Context context) { </BUG> if (sessionInfo.getJPASessionMashallingHelper() == null) { sessionInfo.setJPASessio...
public Void execute(Context context ) {
24,756
import org.drools.core.command.Interceptor;</BUG> import org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession; <BUG>import org.drools.core.process.instance.WorkItemManagerFactory; import org.drools.core.time.TimerService; import org.drools.persistence.SingleSessionCommandService; import org.drools.persist...
package org.drools.persistence.infinispan; import org.drools.core.SessionConfiguration; import org.drools.core.command.SingleSessionCommandService; import org.drools.core.runtime.ChainableRunner; import org.drools.persistence.PersistableRunner; import org.drools.persistence.TransactionManagerFactory;
24,757
private Properties configProps = new Properties(); public KnowledgeStoreServiceImpl() { setDefaultImplementations(); } protected void setDefaultImplementations() { <BUG>setCommandServiceClass( SingleSessionCommandService.class ); setProcessInstanceManagerFactoryClass( "org.jbpm.pers...
setCommandServiceClass( PersistableRunner.class ); setProcessInstanceManagerFactoryClass( "org.jbpm.persistence.processinstance.InfinispanProcessInstanceManagerFactory" );
24,758
private KieSessionConfiguration mergeConfig(KieSessionConfiguration configuration) { return ((SessionConfiguration) configuration).addDefaultProperties(configProps); } public long getStatefulKnowledgeSessionId(StatefulKnowledgeSession ksession) { if ( ksession instanceof CommandBasedStatefulKnowledgeSession ) { <BUG>Si...
SingleSessionCommandService commandService = (SingleSessionCommandService) ((CommandBasedStatefulKnowledgeSession) ksession).getRunner();
24,759
package org.drools.persistence.infinispan; import org.drools.core.command.impl.ExecutableCommand; <BUG>import org.kie.internal.command.Context; </BUG> public class JDKCallableJobCommand implements ExecutableCommand<Void> {
import org.kie.api.runtime.Context;
24,760
private static final long serialVersionUID = 4L; private InfinispanTimerJobInstance job; public JDKCallableJobCommand(InfinispanTimerJobInstance job) { this.job = job; } <BUG>public Void execute(Context context) { </BUG> try { return job.internalCall(); } catch ( Exception e ) {
public Void execute(Context context ) {
24,761
} public Void call() throws Exception { try { JDKCallableJobCommand command = new JDKCallableJobCommand( this ); TimerJobFactoryManager timerJobFactoryManager = ( (TimerService)scheduler ).getTimerJobFactoryManager(); <BUG>CommandService commandService = ( (CommandServiceTimerJobFactoryManager) timerJobFactoryManager )...
ExecutableRunner commandService = ( (CommandServiceTimerJobFactoryManager) timerJobFactoryManager ).getRunner();
24,762
if (sessionTimerJobs == null) { return Collections.emptyList(); } return sessionTimerJobs.values(); } <BUG>public CommandService getCommandService() { </BUG> return this.commandService; } private boolean hasMethod(Class<?> clazz, String methodName) {
public ExecutableRunner getCommandService() {
24,763
localConstants.add(fullName); writer.write(name(constant) + " = constant " + typeLiteral((ShadowValue)result)); } catch(ShadowException e) { <BUG>String message = BaseChecker.makeMessage(null, "Could not initialize constant " + name + ": " + e.getMessage(), node.getFile(), node.getLineStart(), node.getLineEnd(), node.g...
String message = TypeCheckException.makeMessage(null, "Could not initialize constant " + name + ": " + e.getMessage(), node.getFile(), node.getLineStart(), node.getLineEnd(), node.getColumnStart(), node.getColumnEnd() );
24,764
else if (node.isDirect()) writer.write("br label " + symbol(node.getLabel())); else if (node.isIndirect()) { StringBuilder sb = new StringBuilder("indirectbr i8* "). append(symbol(node.getOperand())).append(", [ "); <BUG>TACDestination dest = node.getDestination(); for (int i = 0; i < dest.getNumPossibilities(); i++) ...
TACPhiRef dest = node.getDestination(); for (int i = 0; i < dest.getSize(); i++) sb.append("label ").append(symbol(dest.getValue(i))).
24,765
public final void addError(Node node, Error error, String message, Type... errorTypes) { if( containsUnknown(errorTypes) ) return; // Don't add error if it has an unknown type in it. if( node == null ) addError(error, message, errorTypes); <BUG>else { message = makeMessage(error, message, node.getFile(), node.getLineSt...
else errorList.add(new TypeCheckException(error, message, node.getFile(), node.getLineStart(), node.getLineEnd(), node.getColumnStart(), node.getColumnEnd() ));
24,766
errorList.add(new TypeCheckException(error, message)); }</BUG> } protected final void addWarning(Error warning, String message) { <BUG>message = makeMessage(warning, message, getFile(), getLineStart(), getLineEnd(), getColumnStart(), getColumnEnd()); warningList.add(new TypeCheckException(warning, message));</BUG> }
public final void addError(Node node, Error error, String message, Type... errorTypes) { if( containsUnknown(errorTypes) ) return; // Don't add error if it has an unknown type in it. if( node == null ) addError(error, message, errorTypes); else errorList.add(new TypeCheckException(error, message, node.getFile(), node.g...
24,767
} @Override public final void addWarning(Node node, Error warning, String message) { if( node == null ) addWarning(warning, message); <BUG>else { message = makeMessage(warning, message, node.getFile(), node.getLineStart(), node.getLineEnd(), node.getColumnStart(), node.getColumnEnd() ); warningList.add(new TypeCheckEx...
protected final void addErrors(List<TypeCheckException> errors) { if( errors != null ) for( TypeCheckException error : errors ) addError( error.getError(), error.getMessage() );
24,768
writer.writeLeft(symbol(node.getRef()) + ':'); } private int otherCounter = 0; protected String nextLabel() { <BUG>return "%_mabel" + otherCounter++; </BUG> } protected String symbol(TACLabelRef label) { String value = label.getName();
return "%_label" + otherCounter++;
24,769
import java.util.Locale; import java.util.Map; import java.util.TreeMap; public class DependencyConvergenceReport extends AbstractProjectInfoReport <BUG>{ private List reactorProjects; private static final int PERCENTAGE = 100;</BUG> public String getOutputName() {
private static final int PERCENTAGE = 100; private static final List SUPPORTED_FONT_FAMILY_NAMES = Arrays.asList( GraphicsEnvironment .getLocalGraphicsEnvironment().getAvailableFontFamilyNames() );
24,770
sink.section1(); sink.sectionTitle1(); sink.text( getI18nString( locale, "title" ) ); sink.sectionTitle1_(); Map dependencyMap = getDependencyMap(); <BUG>generateLegend( locale, sink ); generateStats( locale, sink, dependencyMap ); generateConvergence( locale, sink, dependencyMap ); sink.section1_();</BUG> sink.body_()...
sink.lineBreak(); sink.section1_();
24,771
Iterator it = artifactMap.keySet().iterator(); while ( it.hasNext() ) { String version = (String) it.next(); sink.tableRow(); <BUG>sink.tableCell(); sink.text( version );</BUG> sink.tableCell_(); sink.tableCell(); generateVersionDetails( sink, artifactMap, version );
sink.tableCell( String.valueOf( cellWidth ) + "px" ); sink.text( version );
24,772
sink.tableCell(); sink.text( getI18nString( locale, "legend.shared" ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableCell(); iconError( sink );</BUG> sink.tableCell_(); sink.tableCell(); sink.text( getI18nString( locale, "legend.different" ) );
sink.tableCell( "15px" ); // according /images/icon_error_sml.gif iconError( sink );
24,773
sink.tableCaption(); sink.text( getI18nString( locale, "stats.caption" ) ); sink.tableCaption_();</BUG> sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.subprojects" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); s...
sink.bold(); sink.bold_(); sink.tableCaption_(); sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.subprojects" ) ); sink.tableHeaderCell_();
24,774
sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.dependencies" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( depCount ) );
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.dependencies" ) ); sink.tableHeaderCell_();
24,775
sink.text( String.valueOf( convergence ) + "%" ); sink.bold_(); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.readyrelease" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); if ( convergence >= PERCENTAGE && snapshotCount <= 0 )
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.readyrelease" ) ); sink.tableHeaderCell_();
24,776
{ ReverseDependencyLink p1 = (ReverseDependencyLink) o1; ReverseDependencyLink p2 = (ReverseDependencyLink) o2; return p1.getProject().getId().compareTo( p2.getProject().getId() ); } <BUG>else {</BUG> return 0; } }
iconError( sink );
24,777
import org.jboss.as.weld.deployment.WeldAttachments; import org.jboss.as.weld.discovery.AnnotationType; public class JaxrsAnnotationProcessor implements DeploymentUnitProcessor { @Override public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { <BUG>final DeploymentUnit deploy...
if (deploymentUnit.getParent() == null) { deploymentUnit.addToAttachmentList(WeldAttachments.INJECTION_TARGET_DEFINING_ANNOTATIONS, new AnnotationType(JaxrsAnnotations.PROVIDER.getDotName(), false)); deploymentUnit.addToAttachmentList(WeldAttachments.INJECTION_TARGET_DEFINING_ANNOTATIONS, new AnnotationType(JaxrsAnnota...
24,778
JaxrsDeploymentMarker.mark(deploymentUnit); phaseContext.addToAttachmentList(Attachments.NEXT_PHASE_DEPS, Services.JBOSS_MODULE_INDEX_SERVICE); return; } } <BUG>deploymentUnit.addToAttachmentList(WeldAttachments.INJECTION_TARGET_DEFINING_ANNOTATIONS, new AnnotationType(JaxrsAnnotations.PROVIDER.getDotName(), false)); d...
[DELETED]
24,779
protected JvmTypeReference xtextSetupRef; protected EList<Mapping> mappings; protected EList<Aspect> semantics; protected EList<String> xtext; protected EList<String> sirius; <BUG>protected EList<String> ecl; protected static final String FILE_EXTENSION_EDEFAULT = null;</BUG> protected String fileExtension = FILE_EXTEN...
protected static final String XMOF_EDEFAULT = null; protected String xmof = XMOF_EDEFAULT; protected static final String FILE_EXTENSION_EDEFAULT = null;
24,780
case MelangePackage.LANGUAGE__XTEXT: return getXtext(); case MelangePackage.LANGUAGE__SIRIUS: return getSirius(); case MelangePackage.LANGUAGE__ECL: <BUG>return getEcl(); case MelangePackage.LANGUAGE__FILE_EXTENSION:</BUG> return getFileExtension(); } return super.eGet(featureID, resolve, coreType);
case MelangePackage.LANGUAGE__XMOF: return getXmof(); case MelangePackage.LANGUAGE__FILE_EXTENSION:
24,781
getSirius().addAll((Collection<? extends String>)newValue); return; case MelangePackage.LANGUAGE__ECL: getEcl().clear(); getEcl().addAll((Collection<? extends String>)newValue); <BUG>return; case MelangePackage.LANGUAGE__FILE_EXTENSION:</BUG> setFileExtension((String)newValue); return; }
case MelangePackage.LANGUAGE__XMOF: setXmof((String)newValue); case MelangePackage.LANGUAGE__FILE_EXTENSION:
24,782
result.append(", xtext: "); result.append(xtext); result.append(", sirius: "); result.append(sirius); result.append(", ecl: "); <BUG>result.append(ecl); result.append(", fileExtension: ");</BUG> result.append(fileExtension); result.append(')'); return result.toString();
result.append(", xmof: "); result.append(xmof); result.append(", fileExtension: ");
24,783
public EAttribute getLanguage_Sirius() { return (EAttribute)languageEClass.getEStructuralFeatures().get(13); } public EAttribute getLanguage_Ecl() { return (EAttribute)languageEClass.getEStructuralFeatures().get(14); <BUG>} public EAttribute getLanguage_FileExtension() { return (EAttribute)languageEClass.getEStructural...
public EAttribute getLanguage_Xmof() { return (EAttribute)languageEClass.getEStructuralFeatures().get(16);
24,784
createEReference(languageEClass, LANGUAGE__XTEXT_SETUP_REF); createEReference(languageEClass, LANGUAGE__MAPPINGS); createEReference(languageEClass, LANGUAGE__SEMANTICS); createEAttribute(languageEClass, LANGUAGE__XTEXT); createEAttribute(languageEClass, LANGUAGE__SIRIUS); <BUG>createEAttribute(languageEClass, LANGUAGE_...
createEAttribute(languageEClass, LANGUAGE__XMOF); createEAttribute(languageEClass, LANGUAGE__FILE_EXTENSION);
24,785
initEReference(getLanguage_XtextSetupRef(), theTypesPackage.getJvmTypeReference(), null, "xtextSetupRef", null, 0, 1, Language.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getLanguage_Mappings(), this.getMapping...
initEAttribute(getLanguage_Xmof(), ecorePackage.getEString(), "xmof", null, 0, 1, Language.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getLanguage_FileExtension(), ecorePackage.getEString(), "fileExtension", null, 0, 1, Language.class, !...
24,786
public void completeLanguage_Sirius(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor); } public void completeLanguage_Ecl(EObject model, Assignment assignment, ContentAssistContext context...
public void completeLanguage_Xmof(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) { public void completeLanguage_FileExtension(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
24,787
int LANGUAGE__XTEXT_SETUP_REF = NAMED_ELEMENT_FEATURE_COUNT + 9; int LANGUAGE__MAPPINGS = NAMED_ELEMENT_FEATURE_COUNT + 10; int LANGUAGE__SEMANTICS = NAMED_ELEMENT_FEATURE_COUNT + 11; int LANGUAGE__XTEXT = NAMED_ELEMENT_FEATURE_COUNT + 12; int LANGUAGE__SIRIUS = NAMED_ELEMENT_FEATURE_COUNT + 13; <BUG>int LANGUAGE__ECL ...
int LANGUAGE__XMOF = NAMED_ELEMENT_FEATURE_COUNT + 15; int LANGUAGE__FILE_EXTENSION = NAMED_ELEMENT_FEATURE_COUNT + 16; int LANGUAGE_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 17;
24,788
int EXTERNAL_LANGUAGE__XTEXT_SETUP_REF = LANGUAGE__XTEXT_SETUP_REF; int EXTERNAL_LANGUAGE__MAPPINGS = LANGUAGE__MAPPINGS; int EXTERNAL_LANGUAGE__SEMANTICS = LANGUAGE__SEMANTICS; int EXTERNAL_LANGUAGE__XTEXT = LANGUAGE__XTEXT; int EXTERNAL_LANGUAGE__SIRIUS = LANGUAGE__SIRIUS; <BUG>int EXTERNAL_LANGUAGE__ECL = LANGUAGE__...
int EXTERNAL_LANGUAGE__XMOF = LANGUAGE__XMOF; int EXTERNAL_LANGUAGE__FILE_EXTENSION = LANGUAGE__FILE_EXTENSION;
24,789
EReference getLanguage_XtextSetupRef(); EReference getLanguage_Mappings(); EReference getLanguage_Semantics(); EAttribute getLanguage_Xtext(); EAttribute getLanguage_Sirius(); <BUG>EAttribute getLanguage_Ecl(); EAttribute getLanguage_FileExtension();</BUG> EClass getWeave(); EReference getWeave_AspectTypeRef(); EAttrib...
EAttribute getLanguage_Xmof(); EAttribute getLanguage_FileExtension();
24,790
EReference LANGUAGE__XTEXT_SETUP_REF = eINSTANCE.getLanguage_XtextSetupRef(); EReference LANGUAGE__MAPPINGS = eINSTANCE.getLanguage_Mappings(); EReference LANGUAGE__SEMANTICS = eINSTANCE.getLanguage_Semantics(); EAttribute LANGUAGE__XTEXT = eINSTANCE.getLanguage_Xtext(); EAttribute LANGUAGE__SIRIUS = eINSTANCE.getLangu...
EAttribute LANGUAGE__XMOF = eINSTANCE.getLanguage_Xmof(); EAttribute LANGUAGE__FILE_EXTENSION = eINSTANCE.getLanguage_FileExtension();
24,791
put(grammarAccess.getLanguageAccess().getGroup_3(), "rule__Language__Group_3__0"); put(grammarAccess.getLanguageAccess().getGroup_3_2(), "rule__Language__Group_3_2__0"); put(grammarAccess.getLanguageAccess().getGroup_4(), "rule__Language__Group_4__0"); put(grammarAccess.getLanguageAccess().getGroup_4_2(), "rule__Langua...
put(grammarAccess.getLanguageAccess().getGroup_7(), "rule__Language__Group_7__0"); put(grammarAccess.getLanguageAccess().getGroup_7_0(), "rule__Language__Group_7_0__0"); put(grammarAccess.getLanguageAccess().getGroup_7_0_2(), "rule__Language__Group_7_0_2__0");
24,792
put(grammarAccess.getLanguageAccess().getXtextAssignment_2_1(), "rule__Language__XtextAssignment_2_1"); put(grammarAccess.getLanguageAccess().getXtextAssignment_2_2_1(), "rule__Language__XtextAssignment_2_2_1"); put(grammarAccess.getLanguageAccess().getSiriusAssignment_3_1(), "rule__Language__SiriusAssignment_3_1"); pu...
put(grammarAccess.getLanguageAccess().getXmofAssignment_5_1(), "rule__Language__XmofAssignment_5_1"); put(grammarAccess.getLanguageAccess().getFileExtensionAssignment_6_1(), "rule__Language__FileExtensionAssignment_6_1"); put(grammarAccess.getLanguageAccess().getExactTypeNameAssignment_7_0_1(), "rule__Language__ExactTy...
24,793
import java.util.Map; import opennlp.tools.ml.AbstractEventTrainer; import opennlp.tools.ml.maxent.quasinewton.QNMinimizer.Evaluator; import opennlp.tools.ml.model.AbstractModel; import opennlp.tools.ml.model.Context; <BUG>import opennlp.tools.ml.model.DataIndexer; public class QNTrainer extends AbstractEventTrainer {<...
import opennlp.tools.util.TrainingParameters; public class QNTrainer extends AbstractEventTrainer {
24,794
package opennlp.tools.ml; import java.util.Map; <BUG>import opennlp.tools.ml.maxent.GIS; public abstract class AbstractTrainer {</BUG> public static final String ALGORITHM_PARAM = "Algorithm"; public static final String TRAINER_TYPE_PARAM = "TrainerType"; public static final String CUTOFF_PARAM = "Cutoff";
import java.util.HashMap; import opennlp.tools.util.TrainingParameters; public abstract class AbstractTrainer {
24,795
</BUG> } public boolean isValid() { try { <BUG>parameters.getIntParam(CUTOFF_PARAM, CUTOFF_DEFAULT); parameters.getIntParam(ITERATIONS_PARAM, ITERATIONS_DEFAULT); </BUG> } catch (NumberFormatException e) { return false;
public int getCutoff() { return trainingParameters.getIntParameter(CUTOFF_PARAM, CUTOFF_DEFAULT); public int getIterations() { return trainingParameters.getIntParameter(ITERATIONS_PARAM, ITERATIONS_DEFAULT); trainingParameters.getIntParameter(CUTOFF_PARAM, CUTOFF_DEFAULT); trainingParameters.getIntParameter(ITERATIONS_...
24,796
public static final String CUTOFF_PARAM = AbstractTrainer.CUTOFF_PARAM; public static final int CUTOFF_DEFAULT = AbstractTrainer.CUTOFF_DEFAULT; public static final String SORT_PARAM = "sort"; public static final boolean SORT_DEFAULT = true; <BUG>PluggableParameters parameters; public void init(Map<String,String> index...
protected TrainingParameters trainingParameters; protected Map<String,String> reportMap; public void init(TrainingParameters indexingParameters,Map<String, String> reportMap) { this.reportMap = reportMap; if (this.reportMap == null) reportMap = new HashMap<>(); trainingParameters = indexingParameters; }
24,797
package opennlp.tools.ml; import java.io.IOException; import java.util.HashMap; import java.util.Map; import opennlp.tools.ml.model.AbstractDataIndexer; <BUG>import opennlp.tools.ml.model.DataIndexer; import opennlp.tools.ml.model.Event;</BUG> import opennlp.tools.ml.model.HashSumEventStream; import opennlp.tools.ml.mo...
import opennlp.tools.ml.model.DataIndexerFactory; import opennlp.tools.ml.model.Event;
24,798
import opennlp.tools.ml.model.TwoPassDataIndexer; import opennlp.tools.util.ObjectStream; public abstract class AbstractEventTrainer extends AbstractTrainer implements EventTrainer { public static final String DATA_INDEXER_PARAM = "DataIndexer"; public static final String DATA_INDEXER_ONE_PASS_VALUE = "OnePass"; <BUG>p...
public static final String DATA_INDEXER_ONE_PASS_REAL_VALUE = "OnePassRealValue"; protected Map<String,String> reportMap = new HashMap<>(); public AbstractEventTrainer() {
24,799
@Override public boolean isValid() { if (!super.isValid()) { return false; } <BUG>String dataIndexer = parameters.getStringParam(DATA_INDEXER_PARAM, DATA_INDEXER_TWO_PASS_VALUE); if (dataIndexer != null) { if (!(DATA_INDEXER_ONE_PASS_VALUE.equals(dataIndexer) || DATA_INDEXER_TWO_PASS_VALUE .equals(dataIndexer))) { retu...
[DELETED]
24,800
public final MaxentModel train(DataIndexer indexer) throws IOException { if (!isValid()) { throw new IllegalArgumentException("trainParams are not valid!"); } MaxentModel model = doTrain(indexer); <BUG>parameters.addToReport(AbstractTrainer.TRAINER_TYPE_PARAM, EventTrainer.EVENT_VALUE); return model;</BUG> } public fin...
return model;