nus-yam/ex-repair huggingface dataset:
Program: 141841
Project: 141841
Buggy source:
protected void doRun(){
  UIJob job=new UIJob("String_Node_Str"){
    @Override public IStatus runInUIThread(    IProgressMonitor monitor){
      monitor.beginTask("String_Node_Str",100);
      if (nodes == null) {
        nodes=(List<RepositoryNode>)selection.toList();
      }
      int step=100;
      int size=nodes.size();
      if (size > 0) {
        step/=size;
      }
      for (      RepositoryNode node : nodes) {
        monitor.worked(step);
        try {
          WSDLUtils.validateWsdl(node);
          Definition wsdlDefinition=WSDLUtils.getWsdlDefinition(node);
          process(wsdlDefinition);
        }
 catch (        CoreException e) {
          e.printStackTrace();
          monitor.done();
          nodes=null;
          return new Status(IStatus.ERROR,Activator.PLUGIN_ID,e.getMessage(),e);
        }
      }
      nodes=null;
      monitor.done();
      return Status.OK_STATUS;
    }
  }
;
  job.setUser(true);
  job.schedule();
}

Fixed version (ground truth):
protected void doRun(){
  final IWorkspaceRunnable op=new IWorkspaceRunnable(){
    public void run(    IProgressMonitor monitor) throws CoreException {
      monitor.beginTask("String_Node_Str",100);
      if (nodes == null) {
        nodes=(List<RepositoryNode>)selection.toList();
      }
      int step=100;
      int size=nodes.size();
      if (size > 0) {
        step/=size;
      }
      for (      RepositoryNode node : nodes) {
        monitor.worked(step);
        WSDLUtils.validateWsdl(node);
        Definition wsdlDefinition=WSDLUtils.getWsdlDefinition(node);
        process(wsdlDefinition);
        if (monitor.isCanceled()) {
          break;
        }
      }
      nodes=null;
      monitor.done();
    }
  }
;
  IRunnableWithProgress iRunnableWithProgress=new IRunnableWithProgress(){
    public void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      IWorkspace workspace=ResourcesPlugin.getWorkspace();
      try {
        ISchedulingRule schedulingRule=workspace.getRoot();
        workspace.run(op,schedulingRule,IWorkspace.AVOID_UPDATE,monitor);
      }
 catch (      CoreException e) {
        nodes=null;
        throw new InvocationTargetException(e);
      }
    }
  }
;
  try {
    new ProgressMonitorDialog(null).run(true,true,iRunnableWithProgress);
  }
 catch (  InvocationTargetException e) {
    ExceptionHandler.process(e);
    nodes=null;
  }
catch (  InterruptedException e) {
  }
}
Program: 141850
Project: 141850
Buggy source:
public void init(TreeViewer viewer,IStructuredSelection selection){
  boolean canWork=!selection.isEmpty() && selection.size() == 1;
  if (canWork) {
    Object o=selection.getFirstElement();
    RepositoryNode node=(RepositoryNode)o;
switch (node.getType()) {
case REPOSITORY_ELEMENT:
      if (node.getParent().getContentType() != CamelRepositoryNodeType.repositoryRoutesType) {
        canWork=false;
      }
    break;
default :
  canWork=false;
}
RepositoryNode parent=node.getParent();
if (canWork && parent != null && parent instanceof BinRepositoryNode) {
canWork=false;
}
}
setEnabled(canWork);
}

Fixed version (ground truth):
public void init(TreeViewer viewer,IStructuredSelection selection){
  boolean canWork=!selection.isEmpty() && selection.size() == 1;
  if (canWork) {
    Object o=selection.getFirstElement();
    RepositoryNode node=(RepositoryNode)o;
switch (node.getType()) {
case REPOSITORY_ELEMENT:
      if (node.getParent() == null || node.getParent().getContentType() != CamelRepositoryNodeType.repositoryRoutesType) {
        canWork=false;
      }
    break;
default :
  canWork=false;
}
RepositoryNode parent=node.getParent();
if (canWork && parent != null && parent instanceof BinRepositoryNode) {
canWork=false;
}
}
setEnabled(canWork);
}
Program: 141851
Project: 141851
Buggy source:
/** 
 * ftang Comment method "evaluateNameInRoutine".
 */
protected void evaluateName(){
  String jobName=nameText.getText().trim();
  boolean isValid=isNameValidInRountine(jobName);
  if (!isValid || !Pattern.matches(RepositoryConstants.getPattern(ERepositoryObjectType.PROCESS),nameText.getText()) || nameText.getText().trim().contains("String_Node_Str")) {
    nameStatus=createStatus(IStatus.ERROR,"String_Node_Str");
    updatePageStatus();
  }
}

Fixed version (ground truth):
/** 
 * ftang Comment method "evaluateNameInRoutine".
 */
protected void evaluateName(){
  String jobName=nameText.getText().trim();
  boolean isValid=isNameValidInRountine(jobName);
  if (!isValid || !Pattern.matches(RepositoryConstants.getPattern(ERepositoryObjectType.ROUTINES),nameText.getText()) || nameText.getText().trim().contains("String_Node_Str")) {
    nameStatus=createStatus(IStatus.ERROR,"String_Node_Str");
    updatePageStatus();
  }
}
Program: 141852
Project: 141852
Buggy source:
/** 
 * ftang Comment method "evaluateNameInRoutine".
 */
protected void evaluateName(){
  String jobName=nameText.getText().trim();
  boolean isValid=isNameValidInRountine(jobName);
  if (!isValid || !Pattern.matches(RepositoryConstants.getPattern(ERepositoryObjectType.PROCESS),nameText.getText()) || nameText.getText().trim().contains("String_Node_Str")) {
    nameStatus=createStatus(IStatus.ERROR,"String_Node_Str");
    updatePageStatus();
  }
}

Fixed version (ground truth):
/** 
 * ftang Comment method "evaluateNameInRoutine".
 */
protected void evaluateName(){
  String jobName=nameText.getText().trim();
  boolean isValid=isNameValidInRountine(jobName);
  if (!isValid || !Pattern.matches(RepositoryConstants.getPattern(ERepositoryObjectType.ROUTINES),nameText.getText()) || nameText.getText().trim().contains("String_Node_Str")) {
    nameStatus=createStatus(IStatus.ERROR,"String_Node_Str");
    updatePageStatus();
  }
}
Program: 141854
Project: 141854
Buggy source:
protected void evaluateTextField(){
  super.evaluateTextField();
  if (nameStatus.getSeverity() == IStatus.OK) {
    evaluateNameInRoutine();
  }
}

Fixed version (ground truth):
protected void evaluateTextField(){
  super.evaluateTextField();
  if (nameStatus.getSeverity() == IStatus.OK) {
    evaluateName();
  }
}
Program: 141856
Project: 141856
Buggy source:
protected void evaluateTextField(){
  super.evaluateTextField();
  if (nameStatus.getSeverity() == IStatus.OK) {
    evaluateNameInRoutine();
  }
}

Fixed version (ground truth):
protected void evaluateTextField(){
  super.evaluateTextField();
  if (nameStatus.getSeverity() == IStatus.OK) {
    evaluateName();
  }
}
Program: 141860
Project: 141860
Buggy source:
/** 
 * Insert a new <code>Line</code> at the specified <code>lineNumber</code> position.  If the page is full after insertion, the last line of the content (<strong>not</strong> including footer) will be removed and returned.
 * @param line the <code>Line</code> that will be inserted.
 * @param lineNumber the line number position in which the new line will be inserted.
 * @return discarded <code>Line</code> if insertion causes overflow and a line is removed, or<code>null</code> if no line is discarded.
 */
public Line insert(Line line,int lineNumber){
  Line result=null;
  if (lineNumber < header.length) {
    throw new IllegalArgumentException("String_Node_Str" + lineNumber);
  }
  if ((pageLength != null) && (lineNumber > pageLength)) {
    throw new IllegalArgumentException("String_Node_Str" + lineNumber);
  }
  content.add(lineNumber - header.length - 1,line);
  if (isOverflow()) {
    result=content.get(content.size() - 1);
    content.remove(result);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Insert a new <code>Line</code> at the specified <code>lineNumber</code> position.  If the page is full after insertion, the last line of the content (<strong>not</strong> including footer) will be removed and returned.
 * @param line the <code>Line</code> that will be inserted.
 * @param lineNumber the line number position in which the new line will be inserted.
 * @return discarded <code>Line</code> if insertion causes overflow and a line is removed, or<code>null</code> if no line is discarded.
 */
public Line insert(Line line,int lineNumber){
  Line result=null;
  if (lineNumber < header.length) {
    throw new IllegalArgumentException("String_Node_Str" + lineNumber);
  }
  if ((pageLength != null) && (lineNumber > pageLength)) {
    throw new IllegalArgumentException("String_Node_Str" + lineNumber);
  }
  content.add(lineNumber - header.length - 1,line);
  if (isOverflow()) {
    result=content.get(content.size() - 1);
    content.remove(content.size() - 1);
  }
  return result;
}
Program: 141861
Project: 141861
Buggy source:
/** 
 * Create a new template from an URI.
 * @param uri the URI to file that will be read.
 * @throws IOException if error occured when reading the file.
 */
public JsonTemplate(URI uri) throws IOException {
  this(new File(uri));
}

Fixed version (ground truth):
/** 
 * Create a new template from an <code>InputStream</code>.
 * @param inputStream the input stream that will be read.
 * @param charset character set of the input stream.
 * @throws IOException if error occured when reading the input stream.
 */
public JsonTemplate(InputStream inputStream,Charset charset) throws IOException {
  InputStreamReader isr=new InputStreamReader(inputStream,charset);
  StringWriter sw=new StringWriter();
  int c;
  while ((c=isr.read()) != -1) {
    sw.write(c);
  }
  this.originalText=sw.getBuffer().toString();
}
Program: 141863
Project: 141863
Buggy source:
/** 
 * @param metricRegistry registry containing the metrics
 */
public void setMetricRegistry(MetricRegistry metricRegistry){
  this.metrics=Preconditions.checkNotNull(metricRegistry,"String_Node_Str");
  this.openRequestCounter=metrics.counter(name(server.getId(),"String_Node_Str"));
  this.openSessionsCounter=metrics.counter(name(server.getId(),"String_Node_Str"));
  this.sentMessageMeter=metrics.meter(name(server.getId(),"String_Node_Str"));
  this.receivedMessageMeter=metrics.meter(name(server.getId(),"String_Node_Str"));
  this.errorMeter=metrics.meter(name(server.getId(),"String_Node_Str"));
  this.circuitBreakerTrippedCounter=metrics.counter(name(server.getId(),"String_Node_Str"));
  this.circuitBreakerTimeGauge=new Gauge<Double>(){
    @Override public Double getValue(){
      if (server != null) {
        return server.getCircuitBreakerRemainingTime();
      }
 else {
        return 0.0;
      }
    }
  }
;
  this.metrics.register(name(objectId,server.getId(),"String_Node_Str"),circuitBreakerTimeGauge);
  this.latencyHistogram=new Histogram(new SlidingWindowReservoir(100));
  this.metrics.register(name(objectId,server.getId(),"String_Node_Str"),this.latencyHistogram);
  this.errorsPerSecond=new SlidingTimeWindowReservoir(1,TimeUnit.SECONDS);
}

Fixed version (ground truth):
/** 
 * @param metricRegistry registry containing the metrics
 */
public void setMetricRegistry(MetricRegistry metricRegistry){
  this.metrics=Preconditions.checkNotNull(metricRegistry,"String_Node_Str");
  this.openRequestCounter=metrics.counter(name(server.getId(),"String_Node_Str"));
  this.openSessionsCounter=metrics.counter(name(server.getId(),"String_Node_Str"));
  this.sentMessageMeter=metrics.meter(name(server.getId(),"String_Node_Str"));
  this.receivedMessageMeter=metrics.meter(name(server.getId(),"String_Node_Str"));
  this.errorMeter=metrics.meter(name(server.getId(),"String_Node_Str"));
  this.circuitBreakerTrippedCounter=metrics.counter(name(server.getId(),"String_Node_Str"));
  this.circuitBreakerTimeGauge=new Gauge<Double>(){
    @Override public Double getValue(){
      if (server != null) {
        return server.getCircuitBreakerRemainingTime();
      }
 else {
        return 0.0;
      }
    }
  }
;
  this.metrics.register(name(objectId,server.getId(),"String_Node_Str"),circuitBreakerTimeGauge);
  this.latencyHistogram=new Histogram(new SlidingWindowReservoir(100));
  this.metrics.register(name(objectId,server.getId(),"String_Node_Str"),this.latencyHistogram);
  this.errorsPerSecond=new SlidingTimeWindowReservoir(1,TimeUnit.SECONDS,new Clock(){
    private long start=System.nanoTime();
    @Override public long getTick(){
      return System.nanoTime() - start;
    }
  }
);
}
Program: 141864
Project: 141864
Buggy source:
@Test @Ignore("String_Node_Str") public void ShortCircuitTest() throws InterruptedException {
  Janus janus=new Janus(VIP_TEST,new ConstServerList(VIP_TEST,"String_Node_Str"),new RandomLoadBalancer(),new ServerStatsFactory(ServerStats.class,new MetricRegistry()));
  ServerStats stats=janus.getServer();
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),false);
  Assert.assertTrue(stats.getServerInstance().getCircuitBreakerRemainingTime() <= 0.0);
  stats.incrementErrors();
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),false);
  stats.incrementErrors();
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),false);
  stats.incrementErrors();
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),true);
  ServerStats stats2=janus.getServer();
  Assert.assertNull(stats2);
  Thread.sleep(2000);
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),false);
  stats=janus.getServer();
  Assert.assertNotNull(stats);
  stats.incrementErrors();
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),false);
  stats.incrementErrors();
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),false);
  stats.incrementErrors();
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),true);
  Assert.assertTrue(stats.getServerInstance().getCircuitBreakerRemainingTime() > 0.0);
  Thread.sleep(1005);
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),true);
}

Fixed version (ground truth):
@Test public void ShortCircuitTest() throws InterruptedException {
  Janus janus=new Janus(VIP_TEST,new ConstServerList(VIP_TEST,"String_Node_Str"),new RandomLoadBalancer(),new ServerStatsFactory(ServerStats.class,new MetricRegistry()));
  ServerStats stats=janus.getServer();
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),false);
  Assert.assertTrue(stats.getServerInstance().getCircuitBreakerRemainingTime() <= 0.0);
  stats.incrementErrors();
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),false);
  stats.incrementErrors();
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),false);
  stats.incrementErrors();
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),true);
  ServerStats stats2=janus.getServer();
  Assert.assertNull(stats2);
  Thread.sleep(2000);
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),false);
  stats=janus.getServer();
  Assert.assertNotNull(stats);
  stats.incrementErrors();
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),false);
  stats.incrementErrors();
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),false);
  stats.incrementErrors();
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),true);
  Assert.assertTrue(stats.getServerInstance().getCircuitBreakerRemainingTime() > 0.0);
  Thread.sleep(1005);
  Assert.assertEquals(stats.getServerInstance().isShortCircuited(),true);
}
Program: 141865
Project: 141865
Buggy source:
/** 
 * @param name The name of the screen view event
 * @param id Screen view ID
 * @param context Custom context for the event
 * @param timestamp Optional user-provided timestamp for the event
 */
public void trackScreenView(String name,String id,List<SchemaPayload> context,long timestamp){
  Preconditions.checkNotNull(id);
  Preconditions.checkArgument(!name.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!id.isEmpty(),"String_Node_Str");
  Map<String,String> screenViewProperties=new HashMap<String,String>();
  screenViewProperties.put(Parameter.SV_NAME,name);
  screenViewProperties.put(Parameter.SV_ID,id);
  SchemaPayload payload=new SchemaPayload();
  payload.setSchema(this.baseSchemaPath + "String_Node_Str" + this.schemaTag+ "String_Node_Str"+ this.schemaVersion);
  payload.setData(screenViewProperties);
  trackUnstructuredEvent(payload.getMap(),context,timestamp);
}

Fixed version (ground truth):
/** 
 * @param name The name of the screen view event
 * @param id Screen view ID
 * @param context Custom context for the event
 * @param timestamp Optional user-provided timestamp for the event
 */
public void trackScreenView(String name,String id,List<SchemaPayload> context,long timestamp){
  Preconditions.checkArgument(name != null || id != null);
  TrackerPayload trackerPayload=new TrackerPayload();
  trackerPayload.add(Parameter.SV_NAME,name);
  trackerPayload.add(Parameter.SV_ID,id);
  SchemaPayload payload=new SchemaPayload();
  payload.setSchema(this.baseSchemaPath + "String_Node_Str" + this.schemaTag+ "String_Node_Str"+ this.schemaVersion);
  payload.setData(trackerPayload);
  trackUnstructuredEvent(payload.getMap(),context,timestamp);
}
Program: 141866
Project: 141866
Buggy source:
@Test public void testTrackScreenView() throws Exception {
}

Fixed version (ground truth):
@Test public void testTrackScreenView() throws Exception {
  Emitter emitter=new Emitter(testURL,HttpMethod.POST);
  Subject subject=new Subject();
  subject.setViewPort(320,480);
  Tracker tracker=new Tracker(emitter,subject,"String_Node_Str","String_Node_Str",false);
  emitter.setRequestMethod(RequestMethod.Asynchronous);
  SchemaPayload context=new SchemaPayload();
  Map<String,String> someContext=new HashMap<String,String>();
  someContext.put("String_Node_Str","String_Node_Str");
  context.setSchema("String_Node_Str");
  context.setData(someContext);
  ArrayList<SchemaPayload> contextList=new ArrayList<SchemaPayload>();
  contextList.add(context);
  tracker.trackScreenView(null,"String_Node_Str",contextList,0);
  emitter.flushBuffer();
}
Program: 141867
Project: 141867
Buggy source:
@Override public void addMap(Map map,Boolean base64_encoded,String type_encoded,String type_no_encoded){
  if (map == null) {
    logger.debug("String_Node_Str");
    return;
  }
  String mapString;
  try {
    mapString=objectMapper.writeValueAsString(map);
  }
 catch (  JsonProcessingException e) {
    e.printStackTrace();
    return;
  }
  if (base64_encoded) {
    objectNode.put(type_encoded,Util.base64Encode(mapString));
  }
 else {
    add(type_no_encoded,map);
  }
}

Fixed version (ground truth):
@Override public void addMap(Map map,Boolean base64_encoded,String type_encoded,String type_no_encoded){
  if (map == null) {
    logger.debug("String_Node_Str");
    return;
  }
  String mapString;
  try {
    mapString=objectMapper.writeValueAsString(map);
  }
 catch (  JsonProcessingException e) {
    e.printStackTrace();
    return;
  }
  if (base64_encoded) {
    objectNode.put(type_encoded,Util.base64Encode(mapString));
  }
 else {
    add(type_no_encoded,mapString);
  }
}
Program: 141868
Project: 141868
Buggy source:
@Override public Map getMap(){
  HashMap<String,String> map=new HashMap<String,String>();
  try {
    map=objectMapper.readValue(objectNode.toString(),new TypeReference<HashMap<String,String>>(){
    }
);
  }
 catch (  JsonMappingException e) {
    e.printStackTrace();
  }
catch (  JsonParseException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  return map;
}

Fixed version (ground truth):
@Override public Map getMap(){
  HashMap<String,String> map=new HashMap<String,String>();
  try {
    map=objectMapper.readValue(objectNode.toString(),new TypeReference<Map>(){
    }
);
  }
 catch (  JsonMappingException e) {
    e.printStackTrace();
  }
catch (  JsonParseException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  return map;
}
Program: 141869
Project: 141869
Buggy source:
@Test public void testGetMap() throws Exception {
}

Fixed version (ground truth):
@Test public void testGetMap() throws Exception {
  Payload payload;
  String res;
  LinkedHashMap<String,Object> foo=new LinkedHashMap<String,Object>();
  ArrayList<String> bar=new ArrayList<String>();
  bar.add("String_Node_Str");
  bar.add("String_Node_Str");
  foo.put("String_Node_Str","String_Node_Str");
  foo.put("String_Node_Str",bar);
  LinkedHashMap<String,Object> data=new LinkedHashMap<String,Object>();
  data.put("String_Node_Str",foo);
  payload=new TrackerPayload();
  payload.setData(foo);
  assertEquals(data,payload.getMap());
}
Program: 141870
Project: 141870
Buggy source:
/** 
 * @param name The name of the screen view event
 * @param id Screen view ID
 * @param context Custom context for the event
 * @param timestamp Optional user-provided timestamp for the event
 */
public void trackScreenView(String name,String id,List<Map> context,long timestamp){
  Preconditions.checkNotNull(id);
  Preconditions.checkArgument(!name.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!id.isEmpty(),"String_Node_Str");
  Map<String,String> screenViewProperties=new HashMap<String,String>();
  screenViewProperties.put(Parameter.SV_NAME,name);
  screenViewProperties.put(Parameter.SV_ID,id);
  SchemaPayload payload=new SchemaPayload();
  payload.setSchema(this.baseSchemaPath + "String_Node_Str" + this.schemaTag+ Version.VERSION);
  payload.setData(screenViewProperties);
  trackUnstructuredEvent(payload.getMap(),context,timestamp);
}

Fixed version (ground truth):
/** 
 * @param name The name of the screen view event
 * @param id Screen view ID
 * @param context Custom context for the event
 * @param timestamp Optional user-provided timestamp for the event
 */
public void trackScreenView(String name,String id,List<Map> context,long timestamp){
  Preconditions.checkNotNull(id);
  Preconditions.checkArgument(!name.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!id.isEmpty(),"String_Node_Str");
  Map<String,String> screenViewProperties=new HashMap<String,String>();
  screenViewProperties.put(Parameter.SV_NAME,name);
  screenViewProperties.put(Parameter.SV_ID,id);
  SchemaPayload payload=new SchemaPayload();
  payload.setSchema(this.baseSchemaPath + "String_Node_Str" + this.schemaTag+ "String_Node_Str"+ this.schemaVersion);
  payload.setData(screenViewProperties);
  trackUnstructuredEvent(payload.getMap(),context,timestamp);
}
Program: 141871
Project: 141871
Buggy source:
/** 
 * Sets the JSON schema to be used mainly for self-describing JSON.
 * @param vendor Schema vendor
 * @param schemaTag Schema tag type
 * @param version Schema version tag
 */
public void setSchema(String vendor,String schemaTag,String version){
  this.contextSchema=vendor + "String_Node_Str" + schemaTag+ version;
  this.unstructSchema=vendor + "String_Node_Str" + schemaTag+ version;
  this.baseSchemaPath=vendor;
  this.schemaTag=schemaTag;
}

Fixed version (ground truth):
/** 
 * Sets the JSON schema to be used mainly for self-describing JSON.
 * @param vendor Schema vendor
 * @param schemaTag Schema tag type
 * @param version Schema version tag
 */
public void setSchema(String vendor,String schemaTag,String version){
  this.contextSchema=vendor + "String_Node_Str" + schemaTag+ "String_Node_Str"+ version;
  this.unstructSchema=vendor + "String_Node_Str" + schemaTag+ "String_Node_Str"+ version;
  this.baseSchemaPath=vendor;
  this.schemaTag=schemaTag;
  this.schemaVersion=version;
}
Program: 141872
Project: 141872
Buggy source:
public SchemaPayload setData(Object data){
  objectNode.putPOJO(Parameter.DATA,objectMapper.valueToTree(data));
  return this;
}

Fixed version (ground truth):
public SchemaPayload setData(Object data){
  try {
    objectNode.putPOJO(Parameter.DATA,objectMapper.writeValueAsString(data));
  }
 catch (  JsonProcessingException e) {
    e.printStackTrace();
  }
  return this;
}
Program: 141873
Project: 141873
Buggy source:
public SchemaPayload(Payload payload){
  ObjectNode data;
  if (payload.getClass() == TrackerPayload.class) {
    logger.debug("String_Node_Str");
    logger.debug("String_Node_Str");
    data=(ObjectNode)((TrackerPayload)payload).getNode();
  }
 else {
    logger.debug("String_Node_Str");
    data=objectMapper.valueToTree(payload.getMap());
  }
  objectNode.set(Parameter.DATA,data);
}

Fixed version (ground truth):
public SchemaPayload(Payload payload){
  ObjectNode data;
  if (payload.getClass() == TrackerPayload.class) {
    logger.debug("String_Node_Str");
    logger.debug("String_Node_Str");
    data=(ObjectNode)payload.getNode();
  }
 else {
    logger.debug("String_Node_Str");
    data=objectMapper.valueToTree(payload.getMap());
  }
  objectNode.set(Parameter.DATA,data);
}
Program: 141874
Project: 141874
Buggy source:
public Map getMap(){
  HashMap<String,String> map=new HashMap<String,String>();
  try {
    map=objectMapper.readValue(objectNode.toString(),new TypeReference<Map>(){
    }
);
  }
 catch (  JsonMappingException e) {
    e.printStackTrace();
  }
catch (  JsonParseException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  return map;
}

Fixed version (ground truth):
public Map getMap(){
  HashMap map=new HashMap();
  try {
    map=objectMapper.readValue(objectNode.toString(),new TypeReference<HashMap>(){
    }
);
  }
 catch (  JsonMappingException e) {
    e.printStackTrace();
  }
catch (  JsonParseException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  return map;
}
Program: 141875
Project: 141875
Buggy source:
@Override public void add(String key,Object value){
  logger.debug("String_Node_Str",key,value);
  objectNode.putPOJO(key,value.toString());
}

Fixed version (ground truth):
@Override public void add(String key,Object value){
  logger.debug("String_Node_Str",key,value);
  try {
    objectNode.putPOJO(key,objectMapper.writeValueAsString(value));
  }
 catch (  JsonProcessingException e) {
    e.printStackTrace();
  }
}
Program: 141876
Project: 141876
Buggy source:
public void addMap(Map map,Boolean base64_encoded,String type_encoded,String type_no_encoded){
  if (map == null) {
    logger.debug("String_Node_Str");
    return;
  }
  String mapString;
  try {
    mapString=objectMapper.writeValueAsString(map);
  }
 catch (  JsonProcessingException e) {
    e.printStackTrace();
    return;
  }
  if (base64_encoded) {
    objectNode.put(type_encoded,Util.base64Encode(mapString));
  }
 else {
    add(type_no_encoded,map.toString());
  }
}

Fixed version (ground truth):
public void addMap(Map map,Boolean base64_encoded,String type_encoded,String type_no_encoded){
  if (map == null) {
    logger.debug("String_Node_Str");
    return;
  }
  String mapString;
  try {
    mapString=objectMapper.writeValueAsString(map);
  }
 catch (  JsonProcessingException e) {
    e.printStackTrace();
    return;
  }
  if (base64_encoded) {
    objectNode.put(type_encoded,Util.base64Encode(mapString));
  }
 else {
    add(type_no_encoded,map);
  }
}
Program: 141877
Project: 141877
Buggy source:
@Test public void testTrackPageView3() throws Exception {
  Emitter emitter=new Emitter(testURL,HttpMethod.GET);
  Subject subject=new Subject();
  subject.setViewPort(320,480);
  Tracker tracker=new Tracker(emitter,subject,"String_Node_Str","String_Node_Str",true);
  emitter.setRequestMethod(RequestMethod.Asynchronous);
  Map<String,String> context=new HashMap<String,String>();
  ArrayList<Map> contextList=new ArrayList<Map>();
  context.put("String_Node_Str","String_Node_Str");
  contextList.add(context);
  tracker.trackPageView("String_Node_Str","String_Node_Str","String_Node_Str",contextList,0);
  emitter.flushBuffer();
}

Fixed version (ground truth):
@Test public void testTrackPageView3() throws Exception {
  Emitter emitter=new Emitter(localURL,HttpMethod.GET);
  Subject subject=new Subject();
  subject.setViewPort(320,480);
  Tracker tracker=new Tracker(emitter,subject,"String_Node_Str","String_Node_Str",false);
  emitter.setRequestMethod(RequestMethod.Asynchronous);
  Map<String,String> context=new HashMap<String,String>();
  ArrayList<Map> contextList=new ArrayList<Map>();
  context.put("String_Node_Str","String_Node_Str");
  contextList.add(context);
  tracker.trackPageView("String_Node_Str","String_Node_Str","String_Node_Str",contextList,0);
  emitter.flushBuffer();
}
Program: 141878
Project: 141878
Buggy source:
/** 
 * @param eventData The properties of the event. Has two field:A "data" field containing the event properties and A "schema" field identifying the schema against which the data is validated
 * @param context Custom context for the event
 * @param timestamp Optional user-provided timestamp for the event
 */
public void trackUnstructuredEvent(Map<String,Object> eventData,Map context,long timestamp){
  Payload payload=new TrackerPayload();
  SchemaPayload envelope=new SchemaPayload();
  envelope.setSchema(unstructSchema);
  envelope.setData(eventData);
  payload.add(Parameter.EVENT,Constants.EVENT_UNSTRUCTURED);
  payload.addMap(envelope.getMap(),base64Encoded,Parameter.UNSTRUCTURED_ENCODED,Parameter.UNSTRUCTURED);
  completePayload(payload,context,timestamp);
  addTrackerPayload(payload);
}

Fixed version (ground truth):
/** 
 * @param eventData The properties of the event. Has two field:A "data" field containing the event properties and A "schema" field identifying the schema against which the data is validated
 * @param context Custom context for the event
 * @param timestamp Optional user-provided timestamp for the event
 */
public void trackUnstructuredEvent(Map<String,Object> eventData,List<Map> context,long timestamp){
  Payload payload=new TrackerPayload();
  SchemaPayload envelope=new SchemaPayload();
  envelope.setSchema(unstructSchema);
  envelope.setData(eventData);
  payload.add(Parameter.EVENT,Constants.EVENT_UNSTRUCTURED);
  payload.addMap(envelope.getMap(),base64Encoded,Parameter.UNSTRUCTURED_ENCODED,Parameter.UNSTRUCTURED);
  completePayload(payload,context,timestamp);
  addTrackerPayload(payload);
}
Program: 141881
Project: 141881
Buggy source:
/** 
 * @param pageUrl URL of the viewed page
 * @param pageTitle Title of the viewed page
 * @param referrer Referrer of the page
 * @param context Custom context for the event
 * @param timestamp Optional user-provided timestamp for the event
 */
public void trackPageView(String pageUrl,String pageTitle,String referrer,Map context,double timestamp){
  Preconditions.checkNotNull(pageUrl);
  Preconditions.checkArgument(!pageUrl.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!pageTitle.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!referrer.isEmpty(),"String_Node_Str");
  Payload payload=new TrackerPayload();
  payload.add(Parameter.EVENT,Constants.EVENT_PAGE_VIEW);
  payload.add(Parameter.PAGE_URL,pageUrl);
  payload.add(Parameter.PAGE_TITLE,pageTitle);
  payload.add(Parameter.PAGE_REFR,referrer);
  completePayload(payload,context,timestamp);
  addTrackerPayload(payload);
}

Fixed version (ground truth):
/** 
 * @param pageUrl URL of the viewed page
 * @param pageTitle Title of the viewed page
 * @param referrer Referrer of the page
 * @param context Custom context for the event
 * @param timestamp Optional user-provided timestamp for the event
 */
public void trackPageView(String pageUrl,String pageTitle,String referrer,List<Map> context,double timestamp){
  Preconditions.checkNotNull(pageUrl);
  Preconditions.checkArgument(!pageUrl.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!pageTitle.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!referrer.isEmpty(),"String_Node_Str");
  Payload payload=new TrackerPayload();
  payload.add(Parameter.EVENT,Constants.EVENT_PAGE_VIEW);
  payload.add(Parameter.PAGE_URL,pageUrl);
  payload.add(Parameter.PAGE_TITLE,pageTitle);
  payload.add(Parameter.PAGE_REFR,referrer);
  completePayload(payload,context,timestamp);
  addTrackerPayload(payload);
}
Program: 141882
Project: 141882
Buggy source:
/** 
 * @param payload Payload builder
 * @param context Custom context for the event
 * @param timestamp Optional user-provided timestamp for the event
 * @return A completed Payload
 */
private Payload completePayload(Payload payload,Map context,double timestamp){
  payload.add(Parameter.APPID,this.appId);
  payload.add(Parameter.NAMESPACE,this.namespace);
  payload.add(Parameter.TRACKER_VERSION,Version.VERSION);
  payload.add(Parameter.TIMESTAMP,(timestamp == 0 ? Util.getTimestamp() : timestamp));
  if (context != null) {
    SchemaPayload envelope=new SchemaPayload();
    envelope.setSchema(contextSchema);
    envelope.setData(context);
    payload.addMap(context,this.base64Encoded,Parameter.CONTEXT_ENCODED,Parameter.CONTEXT);
  }
  if (this.subject != null)   payload.addMap(subject.getSubject());
  return payload;
}

Fixed version (ground truth):
/** 
 * @param payload Payload builder
 * @param context Custom context for the event
 * @param timestamp Optional user-provided timestamp for the event
 * @return A completed Payload
 */
private Payload completePayload(Payload payload,List<Map> context,double timestamp){
  payload.add(Parameter.APPID,this.appId);
  payload.add(Parameter.NAMESPACE,this.namespace);
  payload.add(Parameter.TRACKER_VERSION,Version.VERSION);
  payload.add(Parameter.TIMESTAMP,(timestamp == 0 ? Util.getTimestamp() : timestamp));
  if (context != null) {
    SchemaPayload envelope=new SchemaPayload();
    envelope.setSchema(contextSchema);
    envelope.setData(context);
    payload.addMap(envelope.getMap(),this.base64Encoded,Parameter.CONTEXT_ENCODED,Parameter.CONTEXT);
  }
  if (this.subject != null)   payload.addMap(subject.getSubject());
  return payload;
}
Program: 141883
Project: 141883
Buggy source:
/** 
 * @param category Category of the event
 * @param action The event itself
 * @param label Refer to the object the action is performed on
 * @param property Property associated with either the action or the object
 * @param value A value associated with the user action
 * @param context Custom context for the event
 * @param timestamp Optional user-provided timestamp for the event
 */
public void trackStructuredEvent(String category,String action,String label,String property,int value,Map context,long timestamp){
  Preconditions.checkNotNull(label);
  Preconditions.checkNotNull(property);
  Preconditions.checkArgument(!label.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!property.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!category.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!action.isEmpty(),"String_Node_Str");
  Payload payload=new TrackerPayload();
  payload.add(Parameter.EVENT,Constants.EVENT_STRUCTURED);
  payload.add(Parameter.SE_CATEGORY,category);
  payload.add(Parameter.SE_ACTION,action);
  payload.add(Parameter.SE_LABEL,label);
  payload.add(Parameter.SE_PROPERTY,property);
  payload.add(Parameter.SE_VALUE,value);
  completePayload(payload,context,timestamp);
  addTrackerPayload(payload);
}

Fixed version (ground truth):
/** 
 * @param category Category of the event
 * @param action The event itself
 * @param label Refer to the object the action is performed on
 * @param property Property associated with either the action or the object
 * @param value A value associated with the user action
 * @param context Custom context for the event
 * @param timestamp Optional user-provided timestamp for the event
 */
public void trackStructuredEvent(String category,String action,String label,String property,int value,List<Map> context,long timestamp){
  Preconditions.checkNotNull(label);
  Preconditions.checkNotNull(property);
  Preconditions.checkArgument(!label.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!property.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!category.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!action.isEmpty(),"String_Node_Str");
  Payload payload=new TrackerPayload();
  payload.add(Parameter.EVENT,Constants.EVENT_STRUCTURED);
  payload.add(Parameter.SE_CATEGORY,category);
  payload.add(Parameter.SE_ACTION,action);
  payload.add(Parameter.SE_LABEL,label);
  payload.add(Parameter.SE_PROPERTY,property);
  payload.add(Parameter.SE_VALUE,value);
  completePayload(payload,context,timestamp);
  addTrackerPayload(payload);
}
Program: 141884
Project: 141884
Buggy source:
/** 
 * @param name The name of the screen view event
 * @param id Screen view ID
 * @param context Custom context for the event
 * @param timestamp Optional user-provided timestamp for the event
 */
public void trackScreenView(String name,String id,Map context,long timestamp){
  Preconditions.checkNotNull(id);
  Preconditions.checkArgument(!name.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!id.isEmpty(),"String_Node_Str");
  Map<String,String> screenViewProperties=new HashMap<String,String>();
  screenViewProperties.put(Parameter.SV_NAME,name);
  screenViewProperties.put(Parameter.SV_ID,id);
  SchemaPayload payload=new SchemaPayload();
  payload.setSchema(this.baseSchemaPath + "String_Node_Str" + this.schemaTag+ Version.VERSION);
  payload.setData(screenViewProperties);
  trackUnstructuredEvent(payload.getMap(),context,timestamp);
}

Fixed version (ground truth):
/** 
 * @param name The name of the screen view event
 * @param id Screen view ID
 * @param context Custom context for the event
 * @param timestamp Optional user-provided timestamp for the event
 */
public void trackScreenView(String name,String id,List<Map> context,long timestamp){
  Preconditions.checkNotNull(id);
  Preconditions.checkArgument(!name.isEmpty(),"String_Node_Str");
  Preconditions.checkArgument(!id.isEmpty(),"String_Node_Str");
  Map<String,String> screenViewProperties=new HashMap<String,String>();
  screenViewProperties.put(Parameter.SV_NAME,name);
  screenViewProperties.put(Parameter.SV_ID,id);
  SchemaPayload payload=new SchemaPayload();
  payload.setSchema(this.baseSchemaPath + "String_Node_Str" + this.schemaTag+ Version.VERSION);
  payload.setData(screenViewProperties);
  trackUnstructuredEvent(payload.getMap(),context,timestamp);
}
Program: 141885
Project: 141885
Buggy source:
public TransactionItem(String order_id,String sku,double price,int quantity,String name,String category,String currency,Map context){
  put(Parameter.EVENT,"String_Node_Str");
  put(Parameter.TI_ITEM_ID,order_id);
  put(Parameter.TI_ITEM_SKU,sku);
  put(Parameter.TI_ITEM_NAME,name);
  put(Parameter.TI_ITEM_CATEGORY,category);
  put(Parameter.TI_ITEM_PRICE,price);
  put(Parameter.TI_ITEM_QUANTITY,quantity);
  put(Parameter.TI_ITEM_CURRENCY,currency);
  put(Parameter.CONTEXT,context);
  put(Parameter.TIMESTAMP,Util.getTimestamp());
}

Fixed version (ground truth):
public TransactionItem(String order_id,String sku,double price,int quantity,String name,String category,String currency,List<Map> context){
  put(Parameter.EVENT,"String_Node_Str");
  put(Parameter.TI_ITEM_ID,order_id);
  put(Parameter.TI_ITEM_SKU,sku);
  put(Parameter.TI_ITEM_NAME,name);
  put(Parameter.TI_ITEM_CATEGORY,category);
  put(Parameter.TI_ITEM_PRICE,price);
  put(Parameter.TI_ITEM_QUANTITY,quantity);
  put(Parameter.TI_ITEM_CURRENCY,currency);
  put(Parameter.CONTEXT,context);
  put(Parameter.TIMESTAMP,Util.getTimestamp());
}
Program: 141886
Project: 141886
Buggy source:
public PayloadMap track_page_view_config(String page_url,String page_title,String referrer,String vendor,JSONObject context) throws UnsupportedEncodingException ;

Fixed version (ground truth):
public PayloadMap track_page_view_config(String page_url,String page_title,String referrer,JSONObject context) throws UnsupportedEncodingException ;
Program: 141887
Project: 141887
Buggy source:
public PayloadMap track_struct_event_config(String category,String action,String label,String property,String value,String vendor,JSONObject context) throws UnsupportedEncodingException ;

Fixed version (ground truth):
public PayloadMap track_struct_event_config(String category,String action,String label,String property,String value,JSONObject context) throws UnsupportedEncodingException ;
Program: 141888
Project: 141888
Buggy source:
public PayloadMap track_ecommerce_transaction_item_config(String order_id,String sku,double price,int quantity,String name,String category,String currency,String vendor,JSONObject context) throws UnsupportedEncodingException ;

Fixed version (ground truth):
public PayloadMap track_ecommerce_transaction_item_config(String order_id,String sku,String price,String quantity,String name,String category,String currency,JSONObject context,String transaction_id) throws UnsupportedEncodingException ;
Program: 141889
Project: 141889
Buggy source:
public void track_ecommerce_transaction_item(String order_id,String sku,double price,int quantity,String name,String category,String currency,String context) throws JSONException, URISyntaxException, IOException ;

Fixed version (ground truth):
public void track_ecommerce_transaction_item(String order_id,String sku,Double price,Integer quantity,String name,String category,String currency,String context,String transaction_id) throws JSONException, URISyntaxException, IOException ;
Program: 141890
Project: 141890
Buggy source:
public void track_page_view(String page_url,String page_title,String referrer,String context) throws UnsupportedEncodingException, IOException, URISyntaxException, JSONException ;

Fixed version (ground truth):
public void track_page_view(String page_url,String page_title,String referrer,String context) throws IOException, URISyntaxException, JSONException ;
Program: 141891
Project: 141891
Buggy source:
public void track() throws URISyntaxException, ClientProtocolException, IOException ;

Fixed version (ground truth):
public void track() throws URISyntaxException, IOException ;
Program: 141893
Project: 141893
Buggy source:
/** 
 * @see com.kixeye.kixmpp.server.module.KixmppModule#getFeatures(io.netty.channel.Channel)
 */
public List<Element> getFeatures(Channel channel){
  List<Element> features=new LinkedList<>();
  features.add(new Element("String_Node_Str",Namespace.getNamespace("String_Node_Str","String_Node_Str")));
  Boolean isSessionEnabled=channel.attr(IS_SESSION_ESTABLISHED).get();
  if (isSessionEnabled == null) {
    Element bind=new Element("String_Node_Str",null,"String_Node_Str");
    features.add(bind);
  }
  return features;
}

Fixed version (ground truth):
/** 
 * @see com.kixeye.kixmpp.server.module.KixmppModule#getFeatures(io.netty.channel.Channel)
 */
public List<Element> getFeatures(Channel channel){
  List<Element> features=new LinkedList<>();
  Boolean isSessionEnabled=channel.attr(IS_SESSION_ESTABLISHED).get();
  if (isSessionEnabled == null) {
    Element bind=new Element("String_Node_Str",null,"String_Node_Str");
    features.add(bind);
  }
  return features;
}
Program: 141895
Project: 141895
Buggy source:
public void convert(){
  try {
    StaticPlanFixer spf=new StaticPlanFixer(plan,pc);
    spf.convert();
    ReplJoinFixer rjf=new ReplJoinFixer(plan,spf.getStaticPlan(),pc);
    rjf.convert();
    if (rjf.getReplFileMap().size() > 0) {
      splan.setReplFileMap(rjf.getReplFileMap());
    }
    if (spf.getStaticPlan().size() > 0) {
      splan.setStaticPlan(spf.getStaticPlan());
    }
    visit();
    splan.setRootMap(rootMap);
    if (missingRoots.size() > 0) {
      System.out.println("String_Node_Str" + missingRoots);
    }
  }
 catch (  VisitorException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void convert(){
  try {
    StaticPlanFixer spf=new StaticPlanFixer(plan,pc);
    spf.convert();
    ReplJoinFixer rjf=new ReplJoinFixer(plan,spf.getStaticPlan(),pc);
    rjf.convert();
    if (rjf.getReplFileMap().size() > 0) {
      splan.setReplFileMap(rjf.getReplFileMap());
    }
    if (spf.getStaticPlan().size() > 0) {
      splan.setStaticPlan(spf.getStaticPlan());
    }
    visit();
    splan.setRootMap(rootMap);
    if (missingRoots.size() > 0) {
      log.warn("String_Node_Str" + missingRoots);
    }
  }
 catch (  VisitorException e) {
    e.printStackTrace();
  }
}
Program: 141896
Project: 141896
Buggy source:
public StormExecutionEngine(PigContext pigContext,boolean run_local){
  super(pigContext);
  this.launcher=new StormLauncher(run_local,false);
}

Fixed version (ground truth):
public StormExecutionEngine(PigContext pigContext,boolean run_local){
  super(pigContext);
  pigContext.getProperties().setProperty(PigConfiguration.OPT_FETCH,"String_Node_Str");
  this.launcher=new StormLauncher(run_local,false);
}
Program: 141898
Project: 141898
Buggy source:
public List<Integer> chooseTasks(int taskId,final TridentTuple tup){
  if (gr.is_set_fields()) {
    return new ArrayList(){
{
        add(targetTasks.get(tup.select(gr_fields).hashCode() % num_tasks));
      }
    }
;
  }
 else   if (gr.is_set_shuffle()) {
    return new ArrayList(){
{
        add(targetTasks.get(r.nextInt(num_tasks) % num_tasks));
      }
    }
;
  }
 else   if (wrapped != null) {
    return wrapped.chooseTasks(taskId,tup);
  }
 else {
    throw new RuntimeException("String_Node_Str" + gr.getSetField());
  }
}

Fixed version (ground truth):
public List<Integer> chooseTasks(int taskId,final TridentTuple tup){
  if (gr.is_set_fields()) {
    return new ArrayList(){
{
        add(targetTasks.get(Math.abs(tup.select(gr_fields).hashCode()) % num_tasks));
      }
    }
;
  }
 else   if (gr.is_set_shuffle()) {
    return new ArrayList(){
{
        add(targetTasks.get(r.nextInt(num_tasks)));
      }
    }
;
  }
 else   if (wrapped != null) {
    return wrapped.chooseTasks(taskId,tup);
  }
 else {
    throw new RuntimeException("String_Node_Str" + gr.getSetField());
  }
}
Program: 141899
Project: 141899
Buggy source:
@Override public void reportError(Throwable t){
}

Fixed version (ground truth):
@Override public void reportError(Throwable t){
  throw new RuntimeException(t);
}
Program: 141900
Project: 141900
Buggy source:
@Override public void execute(Tuple input){
  boolean send_coord=false;
  int coord_type=1;
  if (input.getSourceStreamId().equals("String_Node_Str")) {
    if (pipeline.commit(input)) {
      coord_type=3;
    }
 else {
      coord_type=4;
    }
    send_coord=true;
  }
 else   if (input.getSourceStreamId().equals("String_Node_Str")) {
    seenCoord+=1;
    if (seenCoord == expectedCoord) {
      pipeline.flush();
      send_coord=true;
      seenCoord=0;
    }
  }
 else {
    send_coord=pipeline.execute(input);
    if (send_coord) {
      pipeline.flush();
    }
  }
  if (send_coord) {
    long batchid=input.getLong(0);
    collector.emit("String_Node_Str",input,new Values(batchid,coord_type));
  }
  collector.ack(input);
}

Fixed version (ground truth):
@Override public void execute(Tuple input){
  try {
    boolean send_coord=false;
    int coord_type=1;
    if (input.getSourceStreamId().equals("String_Node_Str")) {
      if (pipeline.commit(input)) {
        coord_type=3;
      }
 else {
        coord_type=4;
      }
      send_coord=true;
    }
 else     if (input.getSourceStreamId().equals("String_Node_Str")) {
      seenCoord+=1;
      if (seenCoord == expectedCoord) {
        pipeline.flush();
        send_coord=true;
        seenCoord=0;
      }
    }
 else {
      send_coord=pipeline.execute(input);
      if (send_coord) {
        pipeline.flush();
      }
    }
    if (send_coord) {
      long batchid=input.getLong(0);
      collector.emit("String_Node_Str",input,new Values(batchid,coord_type));
    }
    collector.ack(input);
  }
 catch (  Throwable e) {
    collector.fail(input);
  }
}
Program: 141901
Project: 141901
Buggy source:
public Integer getParallelism(){
  int parallelism=0;
  for (  FStream v : G.vertexSet()) {
    if (v.getParallelism() > parallelism) {
      parallelism=v.getParallelism();
    }
  }
  if (parallelism == 0) {
    return null;
  }
  return parallelism;
}

Fixed version (ground truth):
public Integer getParallelism(){
  int parallelism=0;
  for (  FStream v : G.vertexSet()) {
    if (v.getIsStage0Agg()) {
      continue;
    }
    if (v.getParallelism() > parallelism) {
      parallelism=v.getParallelism();
    }
  }
  if (parallelism == 0) {
    return null;
  }
  return parallelism;
}
Program: 141902
Project: 141902
Buggy source:
@Override public void nextTuple(){
  try {
    byte[] cur=q.poll(10,TimeUnit.MILLISECONDS);
    if (cur != null) {
      collector.emit(new Values(cur));
    }
  }
 catch (  InterruptedException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@Override public void nextTuple(){
  try {
    byte[] cur=q.poll(10,TimeUnit.MILLISECONDS);
    if (cur != null) {
      int msgid=rand.nextInt();
      outstanding.put(msgid,cur);
      collector.emit(new Values(cur),msgid);
    }
  }
 catch (  InterruptedException e) {
    throw new RuntimeException(e);
  }
}