nus-yam/ex-repair huggingface dataset:
Program: 190521
Project: 190521
Buggy source:
private void importText(FileObject fileObject,Importer importer,final Container container){
  final BufferedReader reader=getTextReader(fileObject);
  final TextImporter textImporter=(TextImporter)importer;
  final Report report=container.getReport();
  LongTask task=null;
  if (importer instanceof LongTask) {
    task=(LongTask)importer;
  }
  final LongTaskErrorHandler errorHandler=new LongTaskErrorHandler(){
    public void fatalError(    Throwable t){
      NotifyDescriptor.Exception ex=new NotifyDescriptor.Exception(t);
      DialogDisplayer.getDefault().notify(ex);
    }
  }
;
  executor.execute(task,new Runnable(){
    public void run(){
      try {
        textImporter.importData(reader,container.getLoader(),report);
        finishImport(container);
      }
 catch (      Exception ex) {
        throw new RuntimeException(ex);
      }
    }
  }
,"String_Node_Str" + fileObject.getNameExt(),errorHandler);
}

Fixed version (ground truth):
private void importText(FileObject fileObject,Importer importer,final Container container){
  final BufferedReader reader=getTextReader(fileObject);
  final TextImporter textImporter=(TextImporter)importer;
  final Report report=container.getReport();
  LongTask task=null;
  if (importer instanceof LongTask) {
    task=(LongTask)importer;
  }
  final LongTaskErrorHandler errorHandler=new LongTaskErrorHandler(){
    public void fatalError(    Throwable t){
      NotifyDescriptor.Exception ex=new NotifyDescriptor.Exception(t);
      DialogDisplayer.getDefault().notify(ex);
      t.printStackTrace();
    }
  }
;
  executor.execute(task,new Runnable(){
    public void run(){
      try {
        textImporter.importData(reader,container.getLoader(),report);
        finishImport(container);
      }
 catch (      Exception ex) {
        throw new RuntimeException(ex);
      }
    }
  }
,"String_Node_Str" + fileObject.getNameExt(),errorHandler);
}
Program: 190522
Project: 190522
Buggy source:
public void executeLayout(final Layout layout){
  executor.execute(new Runnable(){
    public void run(){
      GraphController graphController=Lookup.getDefault().lookup(GraphController.class);
      layout.initAlgo(graphController);
      layout.resetPropertiesValues();
      while (layout.canAlgo()) {
        layout.goAlgo();
      }
      layout.endAlgo();
    }
  }
);
}

Fixed version (ground truth):
public void executeLayout(final Layout layout){
  System.out.println("String_Node_Str");
  executor.execute(new Runnable(){
    public void run(){
      GraphController graphController=Lookup.getDefault().lookup(GraphController.class);
      System.out.println("String_Node_Str");
      layout.initAlgo(graphController);
      layout.resetPropertiesValues();
      while (layout.canAlgo()) {
        layout.goAlgo();
      }
      System.out.println("String_Node_Str");
      layout.endAlgo();
    }
  }
);
}
Program: 190523
Project: 190523
Buggy source:
public LayoutControllerImpl(){
  layouts=new ArrayList<Layout>(Lookup.getDefault().lookupAll(Layout.class));
  executor=Executors.newSingleThreadExecutor();
}

Fixed version (ground truth):
public LayoutControllerImpl(){
  layouts=new ArrayList<LayoutBuilder>(Lookup.getDefault().lookupAll(LayoutBuilder.class));
  executor=Executors.newSingleThreadExecutor();
}
Program: 190524
Project: 190524
Buggy source:
public void run(){
  GraphController graphController=Lookup.getDefault().lookup(GraphController.class);
  layout.initAlgo(graphController);
  layout.resetPropertiesValues();
  while (layout.canAlgo()) {
    layout.goAlgo();
  }
  layout.endAlgo();
}

Fixed version (ground truth):
public void run(){
  GraphController graphController=Lookup.getDefault().lookup(GraphController.class);
  System.out.println("String_Node_Str");
  layout.initAlgo(graphController);
  layout.resetPropertiesValues();
  while (layout.canAlgo()) {
    layout.goAlgo();
  }
  System.out.println("String_Node_Str");
  layout.endAlgo();
}
Program: 190525
Project: 190525
Buggy source:
public void generate(final Generator generator){
  String title=generator.getName();
  GeneratorUI ui=generator.getUI();
  if (ui != null) {
    ui.setup(generator);
    DialogDescriptor dd=new DialogDescriptor(ui.getPanel(),title);
    Object result=DialogDisplayer.getDefault().notify(dd);
    if (result != NotifyDescriptor.OK_OPTION) {
      return;
    }
    ui.unsetup();
  }
  final Container container=Lookup.getDefault().lookup(Container.class);
  container.setSource("String_Node_Str" + generator.getName());
  String taskname="String_Node_Str" + generator.getName();
  executor.execute(generator,new Runnable(){
    public void run(){
      generator.generate(container.getLoader());
      Lookup.getDefault().lookup(Processor.class).process(container.getUnloader());
    }
  }
,taskname);
}

Fixed version (ground truth):
public void generate(final Generator generator){
  String title=generator.getName();
  GeneratorUI ui=generator.getUI();
  if (ui != null) {
    ui.setup(generator);
    DialogDescriptor dd=new DialogDescriptor(ui.getPanel(),title);
    Object result=DialogDisplayer.getDefault().notify(dd);
    if (result != NotifyDescriptor.OK_OPTION) {
      return;
    }
    ui.unsetup();
  }
  final Container container=Lookup.getDefault().lookup(Container.class);
  container.setSource("String_Node_Str" + generator.getName());
  String taskname="String_Node_Str" + generator.getName();
  LongTaskErrorHandler errorHandler=new LongTaskErrorHandler(){
    public void fatalError(    Throwable t){
      NotifyDescriptor.Exception ex=new NotifyDescriptor.Exception(t);
      DialogDisplayer.getDefault().notify(ex);
    }
  }
;
  executor.execute(generator,new Runnable(){
    public void run(){
      generator.generate(container.getLoader());
      Lookup.getDefault().lookup(Processor.class).process(container.getUnloader());
    }
  }
,taskname,errorHandler);
}
Program: 190526
Project: 190526
Buggy source:
private void importXML(FileObject fileObject,Importer importer,final Container container){
  final Document document=getDocument(fileObject);
  final XMLImporter xmlImporter=(XMLImporter)importer;
  final Report report=container.getReport();
  LongTask task=null;
  if (importer instanceof LongTask) {
    task=(LongTask)importer;
  }
  executor.execute(task,new Runnable(){
    public void run(){
      try {
        xmlImporter.importData(document,container.getLoader(),report);
        finishImport(container);
      }
 catch (      Exception ex) {
        Exceptions.printStackTrace(ex);
      }
    }
  }
,"String_Node_Str" + fileObject.getNameExt());
}

Fixed version (ground truth):
private void importXML(FileObject fileObject,Importer importer,final Container container){
  final Document document=getDocument(fileObject);
  final XMLImporter xmlImporter=(XMLImporter)importer;
  final Report report=container.getReport();
  LongTask task=null;
  if (importer instanceof LongTask) {
    task=(LongTask)importer;
  }
  executor.execute(task,new Runnable(){
    public void run(){
      try {
        xmlImporter.importData(document,container.getLoader(),report);
        finishImport(container);
      }
 catch (      Exception ex) {
        Exceptions.printStackTrace(ex);
      }
    }
  }
,"String_Node_Str" + fileObject.getNameExt(),new LongTaskErrorHandler(){
    public void fatalError(    Throwable t){
      NotifyDescriptor.Exception ex=new NotifyDescriptor.Exception(t);
      DialogDisplayer.getDefault().notify(ex);
    }
  }
);
}
Program: 190527
Project: 190527
Buggy source:
public void run(){
  try {
    textImporter.importData(reader,container.getLoader(),report);
    finishImport(container);
  }
 catch (  Exception ex) {
    Exceptions.printStackTrace(ex);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    textImporter.importData(reader,container.getLoader(),report);
    finishImport(container);
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
}
Program: 190528
Project: 190528
Buggy source:
private void importText(FileObject fileObject,Importer importer,final Container container){
  final BufferedReader reader=getTextReader(fileObject);
  final TextImporter textImporter=(TextImporter)importer;
  final Report report=container.getReport();
  LongTask task=null;
  if (importer instanceof LongTask) {
    task=(LongTask)importer;
  }
  executor.execute(task,new Runnable(){
    public void run(){
      try {
        textImporter.importData(reader,container.getLoader(),report);
        finishImport(container);
      }
 catch (      Exception ex) {
        Exceptions.printStackTrace(ex);
      }
    }
  }
,"String_Node_Str" + fileObject.getNameExt());
}

Fixed version (ground truth):
private void importText(FileObject fileObject,Importer importer,final Container container){
  final BufferedReader reader=getTextReader(fileObject);
  final TextImporter textImporter=(TextImporter)importer;
  final Report report=container.getReport();
  LongTask task=null;
  if (importer instanceof LongTask) {
    task=(LongTask)importer;
  }
  final LongTaskErrorHandler errorHandler=new LongTaskErrorHandler(){
    public void fatalError(    Throwable t){
      NotifyDescriptor.Exception ex=new NotifyDescriptor.Exception(t);
      DialogDisplayer.getDefault().notify(ex);
    }
  }
;
  executor.execute(task,new Runnable(){
    public void run(){
      try {
        textImporter.importData(reader,container.getLoader(),report);
        finishImport(container);
      }
 catch (      Exception ex) {
        throw new RuntimeException(ex);
      }
    }
  }
,"String_Node_Str" + fileObject.getNameExt(),errorHandler);
}
Program: 190529
Project: 190529
Buggy source:
public void generate(ContainerLoader container){
  int max=numberOfNodes;
  if (wiringProbability > 0) {
    max+=numberOfNodes - 1;
  }
  progress.start(max);
  int progressUnit=0;
  Random random=new Random();
  NodeDraft[] nodeArray=new NodeDraft[numberOfNodes];
  for (int i=0; i < numberOfNodes && !cancel; i++) {
    NodeDraft nodeDraft=container.factory().newNodeDraft();
    nodeDraft.setId("String_Node_Str" + i);
    container.addNode(nodeDraft);
    nodeArray[i]=nodeDraft;
    progress.progress(++progressUnit);
  }
  if (wiringProbability > 0) {
    for (int i=0; i < numberOfNodes - 1 && !cancel; i++) {
      NodeDraft node1=nodeArray[i];
      for (int j=i + 1; j < numberOfNodes && !cancel; j++) {
        NodeDraft node2=nodeArray[j];
        if (random.nextDouble() < wiringProbability) {
          EdgeDraft edgeDraft=container.factory().newEdgeDraft();
          edgeDraft.setSource(node1);
          edgeDraft.setTarget(node2);
          container.addEdge(edgeDraft);
        }
      }
      progress.progress(++progressUnit);
    }
  }
}

Fixed version (ground truth):
public void generate(ContainerLoader container){
  int max=numberOfNodes;
  if (wiringProbability > 0) {
    max+=numberOfNodes - 1;
  }
  Progress.start(progress,max);
  int progressUnit=0;
  Random random=new Random();
  NodeDraft[] nodeArray=new NodeDraft[numberOfNodes];
  for (int i=0; i < numberOfNodes && !cancel; i++) {
    NodeDraft nodeDraft=container.factory().newNodeDraft();
    nodeDraft.setId("String_Node_Str" + i);
    container.addNode(nodeDraft);
    nodeArray[i]=nodeDraft;
    Progress.progress(progress,++progressUnit);
  }
  if (wiringProbability > 0) {
    for (int i=0; i < numberOfNodes - 1 && !cancel; i++) {
      NodeDraft node1=nodeArray[i];
      for (int j=i + 1; j < numberOfNodes && !cancel; j++) {
        NodeDraft node2=nodeArray[j];
        if (random.nextDouble() < wiringProbability) {
          EdgeDraft edgeDraft=container.factory().newEdgeDraft();
          edgeDraft.setSource(node1);
          edgeDraft.setTarget(node2);
          container.addEdge(edgeDraft);
        }
      }
      Progress.progress(progress,++progressUnit);
    }
  }
}
Program: 190530
Project: 190530
Buggy source:
/** 
 * Notify the user about completed workunits and show additional detailed message.
 * @param message details about the status of the task
 * @param workunit a cumulative number of workunits completed so far
 */
public void progress(String message,int workunit){
  if (handle != null) {
    int ratioProgress=(int)(100.0 * workunit / progressTotal);
    if (ratioProgress != progress100) {
      progress100=ratioProgress;
      handle.progress(message,ratioProgress);
    }
  }
}

Fixed version (ground truth):
/** 
 * Notify the user about completed workunits and show additional detailed message.
 * @param message details about the status of the task
 * @param workunit a cumulative number of workunits completed so far
 */
public void progress(String message,int workunit){
  currentUnit=workunit;
  if (handle != null) {
    int ratioProgress=(int)(100.0 * workunit / progressTotal);
    if (ratioProgress != progress100) {
      progress100=ratioProgress;
      handle.progress(message,ratioProgress);
    }
  }
}
Program: 190531
Project: 190531
Buggy source:
/** 
 * Currently indeterminate task can be switched to show percentage completed.
 * @param workunits workunits total number of workunits that will be processed
 */
public void switchToDeterminate(int workunits){
  if (handle != null) {
    this.progressTotal=workunits;
    handle.switchToDeterminate(workunits);
  }
}

Fixed version (ground truth):
/** 
 * Currently indeterminate task can be switched to show percentage completed.
 * @param workunits workunits total number of workunits that will be processed
 */
public void switchToDeterminate(int workunits){
  if (handle != null) {
    this.progressTotal=workunits;
    handle.switchToDeterminate(100);
  }
}
Program: 190532
Project: 190532
Buggy source:
public boolean cancel(){
  if (inBackground) {
    if (future.cancel(false)) {
      return true;
    }
  }
  return task.cancel();
}

Fixed version (ground truth):
public boolean cancel(){
  if (inBackground) {
    if (future.cancel(false)) {
      return true;
    }
  }
  if (task != null) {
    return task.cancel();
  }
  return false;
}
Program: 190533
Project: 190533
Buggy source:
public RunningLongTask(LongTask task,Runnable runnable,String taskName){
  this.task=task;
  this.runnable=runnable;
  this.progress=new ProgressTicket(taskName,new Cancellable(){
    public boolean cancel(){
      LongTaskExecutor.this.cancel();
      return true;
    }
  }
);
  task.setProgressTicket(progress);
}

Fixed version (ground truth):
public RunningLongTask(LongTask task,Runnable runnable,String taskName){
  this.task=task;
  this.runnable=runnable;
  this.progress=new ProgressTicket(taskName,new Cancellable(){
    public boolean cancel(){
      LongTaskExecutor.this.cancel();
      return true;
    }
  }
);
  if (task != null) {
    task.setProgressTicket(progress);
  }
}
Program: 190534
Project: 190534
Buggy source:
public void execute(LongTask task,Runnable runnable){
  execute(task,runnable,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Execute a long task with cancel and progress support. Task can be <code>null</code>. In this case <code>runnable</code> will be executed normally, but without cancel and progress support.
 * @param task the task to be executed, can be <code>null</code>.
 * @param runnable the runnable to be executed
 * @throws NullPointerException if <code>runnable</code> is null
 * @throws IllegalStateException if a task is still executing at this time
 */
public void execute(LongTask task,Runnable runnable){
  execute(task,runnable,"String_Node_Str");
}
Program: 190535
Project: 190535
Buggy source:
public void goAlgo(){
  BarnesHut barnes=new BarnesHut(getNodeForce());
  barnes.theta=getBarnesHutTheta();
  QuadTree tree=QuadTree.buildTree(graph,getBarnesHutMaxLevel());
  for (  Node node : graph.getTopNodes()) {
    NodeData data=node.getNodeData();
    ForceVector layoutData=data.getLayoutData();
    if (layoutData == null) {
      System.out.println("String_Node_Str" + graph.getLevel(node));
    }
 else {
      ForceVector f=barnes.calculateForce(data,tree);
      layoutData.add(f);
    }
  }
  AbstractForce edgeForce=getEdgeForce();
  for (  Edge e : graph.getEdges()) {
    if (graph.getLevel(e.getSource()) == 0 && graph.getLevel(e.getTarget()) == 0) {
      NodeData n1=e.getSource().getNodeData();
      NodeData n2=e.getTarget().getNodeData();
      ForceVector f1=n1.getLayoutData();
      ForceVector f2=n2.getLayoutData();
      ForceVector f=edgeForce.calculateForce(n1,n2);
      f1.add(f);
      f2.subtract(f);
    }
  }
  energy0=energy;
  energy=0;
  Displacement displacement=getDisplacement();
  for (  Node n : graph.getTopNodes()) {
    NodeData data=n.getNodeData();
    ForceVector force=data.getLayoutData();
    energy+=force.getEnergy();
    displacement.moveNode(data,force);
  }
  postAlgo();
}

Fixed version (ground truth):
public void goAlgo(){
  BarnesHut barnes=new BarnesHut(getNodeForce());
  barnes.theta=getBarnesHutTheta();
  QuadTree tree=QuadTree.buildTree(graph,getBarnesHutMaxLevel());
  for (  Node node : graph.getTopNodes()) {
    NodeData data=node.getNodeData();
    ForceVector layoutData=data.getLayoutData();
    if (layoutData == null) {
      System.out.println("String_Node_Str" + graph.getLevel(node));
    }
 else {
      ForceVector f=barnes.calculateForce(data,tree);
      layoutData.add(f);
    }
  }
  AbstractForce edgeForce=getEdgeForce();
  int count=0;
  for (  Edge e : getTopEdges(graph)) {
    count++;
    if (graph.getLevel(e.getSource()) == 0 && graph.getLevel(e.getTarget()) == 0) {
      NodeData n1=e.getSource().getNodeData();
      NodeData n2=e.getTarget().getNodeData();
      ForceVector f1=n1.getLayoutData();
      ForceVector f2=n2.getLayoutData();
      ForceVector f=edgeForce.calculateForce(n1,n2);
      f1.add(f);
      f2.subtract(f);
    }
  }
  System.out.println("String_Node_Str" + count);
  energy0=energy;
  energy=0;
  Displacement displacement=getDisplacement();
  for (  Node n : graph.getTopNodes()) {
    NodeData data=n.getNodeData();
    ForceVector force=data.getLayoutData();
    energy+=force.getEnergy();
    displacement.moveNode(data,force);
  }
  postAlgo();
}
Program: 190536
Project: 190536
Buggy source:
public void moveNode(NodeData node,ForceVector forceData){
  if (forceData.getNorm() > 1e-3) {
    ForceVector displacement=forceData.normalize();
    displacement.multiply(step);
    float x=node.x();
    float y=node.y();
    node.setX(node.x() + displacement.x());
    node.setY(node.y() + displacement.y());
  }
}

Fixed version (ground truth):
public void moveNode(NodeData node,ForceVector forceData){
  ForceVector displacement=forceData;
  displacement.multiply(step);
  float x=node.x();
  float y=node.y();
  node.setX(node.x() + displacement.x());
  node.setY(node.y() + displacement.y());
}
Program: 190537
Project: 190537
Buggy source:
public static QuadTree buildTree(ClusteredGraph graph,int maxLevel){
  float minX=Float.NEGATIVE_INFINITY;
  float maxX=Float.POSITIVE_INFINITY;
  float minY=Float.NEGATIVE_INFINITY;
  float maxY=Float.POSITIVE_INFINITY;
  for (  Node node : graph.getNodes(0)) {
    minX=Math.min(minX,node.getNodeData().x());
    maxX=Math.max(maxX,node.getNodeData().x());
    minY=Math.min(minY,node.getNodeData().y());
    maxY=Math.max(maxY,node.getNodeData().y());
  }
  float size=Math.max(maxY - minY,maxX - minX);
  QuadTree tree=new QuadTree(minX,minY,size,maxLevel);
  for (  Node node : graph.getNodes(0)) {
    tree.addNode(node.getNodeData());
  }
  return tree;
}

Fixed version (ground truth):
public static QuadTree buildTree(ClusteredGraph graph,int maxLevel){
  float minX=Float.POSITIVE_INFINITY;
  float maxX=Float.NEGATIVE_INFINITY;
  float minY=Float.POSITIVE_INFINITY;
  float maxY=Float.NEGATIVE_INFINITY;
  for (  Node node : graph.getTopNodes()) {
    minX=Math.min(minX,node.getNodeData().x());
    maxX=Math.max(maxX,node.getNodeData().x());
    minY=Math.min(minY,node.getNodeData().y());
    maxY=Math.max(maxY,node.getNodeData().y());
  }
  float size=Math.max(maxY - minY,maxX - minX);
  QuadTree tree=new QuadTree(minX,minY,size,maxLevel);
  for (  Node node : graph.getTopNodes()) {
    tree.addNode(node.getNodeData());
  }
  return tree;
}
Program: 190538
Project: 190538
Buggy source:
public void resetPropertiesValues(){
  stepRatio=(float)0.9;
  progress=0;
  converged=false;
  optimalDistance=10;
  step=optimalDistance / 10;
  relativeStrength=(float)0.1;
}

Fixed version (ground truth):
public void resetPropertiesValues(){
  stepRatio=(float)0.9;
  progress=0;
  converged=false;
  optimalDistance=getAverageEdge(graph);
  System.out.println("String_Node_Str" + optimalDistance);
  step=(float)optimalDistance / 10000;
  relativeStrength=(float)0.2;
}
Program: 190539
Project: 190539
Buggy source:
private void updateStep(){
  if (energy < energy0) {
    progress++;
    if (progress >= 5) {
      progress=0;
      step/=stepRatio;
    }
  }
 else {
    progress=0;
    step*=stepRatio;
  }
  if (Math.abs(energy - energy0) < optimalDistance * 1e-6) {
    converged=true;
  }
}

Fixed version (ground truth):
private void updateStep(){
  if (energy < energy0) {
    progress++;
    if (progress >= 5) {
      progress=0;
      step/=stepRatio;
    }
  }
 else {
    progress=0;
    step*=stepRatio;
  }
  if (Math.abs((energy - energy0) / energy) < 1e-3) {
    converged=true;
  }
}
Program: 190540
Project: 190540
Buggy source:
@Override public ForceVector calculateForce(Spatial node1,Spatial node2,float distance){
  ForceVector f=new ForceVector(node2.x() - node1.x(),node2.y() - node1.y());
  f.multiply(forceConstant / distance);
  return f;
}

Fixed version (ground truth):
@Override public ForceVector calculateForce(Spatial node1,Spatial node2,float distance){
  ForceVector f=new ForceVector(node2.x() - node1.x(),node2.y() - node1.y());
  f.multiply(-relativeStrength * optimalDistance * optimalDistance / (distance * distance));
  if (Float.isNaN(f.x()) || Float.isNaN(f.y())) {
    f=new ForceVector(100,100);
  }
  return f;
}
Program: 190541
Project: 190541
Buggy source:
public void initAlgo(GraphController graphController){
  graph=graphController.getClusteredDirectedGraph();
}

Fixed version (ground truth):
public void initAlgo(GraphController graphController){
  graph=graphController.getClusteredDirectedGraph();
  level=1;
  CoarseningStrategy coarsening=getCoarseningStrategy();
  coarsening.coarsen(getGraph());
  layout=getForceLayout();
}
Program: 190542
Project: 190542
Buggy source:
private void recursiveLayout(int level){
  System.out.println(graph.getLevelSize(0) + "String_Node_Str" + graph.getEdgeCount());
  if (graph.getLevelSize(0) > 100) {
    CoarseningStrategy coarsening=getCoarseningStrategy();
    coarsening.coarsen(graph);
    recursiveLayout(level + 1);
    layoutLevel(level);
    coarsening.refine(graph);
  }
  System.out.println("String_Node_Str" + level);
}

Fixed version (ground truth):
private void recursiveLayout(int level){
  System.out.println(getGraph().getLevelSize(0) + "String_Node_Str" + getGraph().getEdgeCount());
  if (level < 2) {
    CoarseningStrategy coarsening=getCoarseningStrategy();
    coarsening.coarsen(getGraph());
    recursiveLayout(level + 1);
    layoutLevel(level);
    coarsening.refine(getGraph());
  }
  System.out.println("String_Node_Str" + level);
}
Program: 190543
Project: 190543
Buggy source:
public void goAlgo(){
  recursiveLayout(0);
  acabou=true;
}

Fixed version (ground truth):
public void goAlgo(){
  if (layout.canAlgo()) {
    layout.goAlgo();
  }
 else {
    layout.endAlgo();
    if (level > 0) {
      CoarseningStrategy coarsening=getCoarseningStrategy();
      coarsening.refine(getGraph());
      level--;
    }
 else {
      acabou=true;
    }
  }
}
Program: 190544
Project: 190544
Buggy source:
private void layoutLevel(int level){
  YifanHu layout=getForceLayout();
  layout.initAlgo(graph);
  layout.resetPropertiesValues();
  layout.optimalDistance=10000000;
  layout.optimalDistance*=Math.pow(4.0 / 7,level / 2.0);
  System.out.println("String_Node_Str" + layout.optimalDistance);
  while (layout.canAlgo()) {
    layout.goAlgo();
  }
  layout.endAlgo();
}

Fixed version (ground truth):
private void layoutLevel(int level){
  YifanHu layout=getForceLayout();
  System.out.println("String_Node_Str" + layout.optimalDistance);
  while (layout.canAlgo()) {
    layout.goAlgo();
  }
  layout.endAlgo();
}
Program: 190545
Project: 190545
Buggy source:
public void setInited(){
  if (!inited) {
    inited=true;
    if (requestAnimation) {
      startAnimating();
      requestAnimation=false;
    }
  }
}

Fixed version (ground truth):
public void setInited(){
  if (!inited) {
    inited=true;
    if (requestAnimation) {
      graphDrawable.display();
      startAnimating();
      requestAnimation=false;
    }
  }
}
Program: 190546
Project: 190546
Buggy source:
@Override public void startAnimating(){
  if (!scheduler.isAnimating()) {
    System.out.println("String_Node_Str");
    scheduler.start();
  }
}

Fixed version (ground truth):
@Override public void startAnimating(){
  if (!scheduler.isAnimating()) {
    System.out.println("String_Node_Str");
    scheduler.start();
    graphIO.startMouseListening();
  }
}
Program: 190547
Project: 190547
Buggy source:
@Override public void stopAnimating(){
  if (scheduler.isAnimating()) {
    System.out.println("String_Node_Str");
    scheduler.stop();
  }
}

Fixed version (ground truth):
@Override public void stopAnimating(){
  if (scheduler.isAnimating()) {
    System.out.println("String_Node_Str");
    scheduler.stop();
    graphIO.stopMouseListening();
  }
}
Program: 190548
Project: 190548
Buggy source:
@Override protected void init(GL gl){
  System.out.println("String_Node_Str");
  graphComponent.setCursor(Cursor.getDefaultCursor());
  engine.initEngine(gl,glu);
  VizController.getInstance().getGraphIO().startMouseListening();
}

Fixed version (ground truth):
@Override protected void init(GL gl){
  System.out.println("String_Node_Str");
  graphComponent.setCursor(Cursor.getDefaultCursor());
  engine.initEngine(gl,glu);
}
Program: 190549
Project: 190549
Buggy source:
private void importFakeGraph(){
  CompleteTreeImporter importer=new CompleteTreeImporter(treeStructure,sightManager.getMainSight());
  importer.importGraph(3,false);
  System.out.println("String_Node_Str" + treeStructure.getTreeSize());
  RandomEdgesGenerator reg=new RandomEdgesGenerator(treeStructure);
  reg.generatPhysicalEdges(10);
  freeMode.init();
}

Fixed version (ground truth):
private void importFakeGraph(){
  CompleteTreeImporter importer=new CompleteTreeImporter(treeStructure,sightManager.getMainSight());
  importer.importGraph(5,true);
  System.out.println("String_Node_Str" + treeStructure.getTreeSize());
  RandomEdgesGenerator reg=new RandomEdgesGenerator(treeStructure);
  reg.generatPhysicalEdges(300);
  freeMode.init();
}
Program: 190550
Project: 190550
Buggy source:
public void init(){
  SightImpl sight=sightManager.getMainSight();
  SightTreeIterator enabledNodes=new SightTreeIterator(treeStructure,sight);
  for (; enabledNodes.hasNext(); ) {
    PreNode n=enabledNodes.next();
    NodeImpl ni=n.getNode();
    ni.setX(n.getPre() * 50);
    ni.setY(n.getPost() * 50);
  }
  edgeProcessing.init(sightManager.getMainSight());
  sightManager.getMainSight().getSightCache().reset();
}

Fixed version (ground truth):
public void init(){
  SightImpl sight=sightManager.getMainSight();
  edgeProcessing.init(sightManager.getMainSight());
  sightManager.getMainSight().getSightCache().reset();
}
Program: 190551
Project: 190551
Buggy source:
public NodeImpl(){
  x=((float)Math.random()) * 2000 - 1000.0f;
  y=((float)Math.random()) * 2000 - 1000.0f;
  r=(float)Math.random();
  g=(float)Math.random();
  b=(float)Math.random();
}

Fixed version (ground truth):
public NodeImpl(){
  x=((float)Math.random()) * 2000 - 1000.0f;
  y=((float)Math.random()) * 2000 - 1000.0f;
  r=(float)Math.random();
  g=(float)Math.random();
  b=(float)Math.random();
  size=((float)Math.random()) * 20 + 10;
}
Program: 190552
Project: 190552
Buggy source:
private void loadConfig(){
  NB_SUBDIVISIONS=4;
switch (potato.getLevel()) {
case 0:
    RAYON=21f;
  INFLUENCE=0.71f;
RAYON_INFLUENCE_MAX=97f;
break;
case 1:
RAYON=26.5f;
INFLUENCE=0.41f;
RAYON_INFLUENCE_MAX=127.5f;
break;
default :
RAYON=39f;
INFLUENCE=0.2f;
RAYON_INFLUENCE_MAX=179f;
break;
}
INTER=RAYON * Math.sqrt(2.0) / NB_SUBDIVISIONS;
}

Fixed version (ground truth):
private void loadConfig(Node node){
  NB_SUBDIVISIONS=4;
switch (potato.getLevel()) {
case 0:
    RAYON=21f;
  INFLUENCE=0.71f;
RAYON_INFLUENCE_MAX=97f;
break;
case 1:
RAYON=26.5f;
INFLUENCE=0.41f;
RAYON_INFLUENCE_MAX=127.5f;
break;
default :
RAYON=39f;
INFLUENCE=0.2f;
RAYON_INFLUENCE_MAX=179f;
break;
}
INTER=RAYON * Math.sqrt(2.0) / NB_SUBDIVISIONS;
}
Program: 190554
Project: 190554
Buggy source:
public void showTreeAsTable(){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  int pre=0;
  for (  PreNode p : tree) {
    System.out.println(p.pre + "String_Node_Str" + p.size+ "String_Node_Str"+ p.level+ "String_Node_Str"+ p.parent+ "String_Node_Str"+ p.post+ "String_Node_Str"+ p.preTrace);
    pre++;
  }
}

Fixed version (ground truth):
public void showTreeAsTable(SightImpl sight){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  int pre=0;
  for (  PreNode p : tree) {
    boolean enabled=p.isEnabled(sight);
    System.out.println(p.pre + "String_Node_Str" + p.size+ "String_Node_Str"+ p.level+ "String_Node_Str"+ p.parent+ "String_Node_Str"+ p.post+ "String_Node_Str"+ p.preTrace+ "String_Node_Str"+ enabled);
    pre++;
  }
}
Program: 190555
Project: 190555
Buggy source:
public void run(){
  while (true) {
    try {
      Transaction txn=Hazelcast.getTransaction();
      txn.begin();
      try {
        Order order=positionSlurperQueue.take();
        PositionPortfolioManager position=null;
        String key=order.instrument.id + "String_Node_Str" + order.portfolioManager.id;
        if ((position=(PositionPortfolioManager)portfolioManagerPositionMap.get(key)) == null) {
          position=new PositionPortfolioManager(order.instrument.id,order.portfolioManager.id);
        }
        position.addOrder(order);
        portfolioManagerPositionMap.put(position.getKey(),position);
        txn.commit();
      }
 catch (      Throwable t) {
        t.printStackTrace();
        txn.rollback();
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  for (int i=0; i < 300; i++) {
    double price=(int)(Math.random() * 50) + 1;
    topicFeed.publish(new StockPriceUpdate(StockDatabase.randomPick(),price));
  }
}
Program: 190556
Project: 190556
Buggy source:
public static void main(String[] args) throws Exception {
  BlockingQueue positionSlurperQueue=Hazelcast.getQueue("String_Node_Str");
  Map orderMap=Hazelcast.getMap("String_Node_Str");
  Map instrumentMap=Hazelcast.getMap("String_Node_Str");
  Map portfolioManagerMap=Hazelcast.getMap("String_Node_Str");
  int threads=2;
  ExecutorService threadExecutor=Executors.newFixedThreadPool(threads);
  for (int i=0; i < threads; i++) {
    threadExecutor.execute(new PositionQueueSlurper());
    System.out.println("String_Node_Str" + i);
  }
  PortfolioManager pm1=new PortfolioManager(1,"String_Node_Str");
  PortfolioManager pm2=new PortfolioManager(2,"String_Node_Str");
  portfolioManagerMap.put(pm1.id,pm1);
  portfolioManagerMap.put(pm2.id,pm1);
  Instrument stock=new Instrument(1,"String_Node_Str","String_Node_Str");
  instrumentMap.put(stock.id,stock);
  List<Order> orders=new ArrayList<Order>();
  int orderId=1;
  orders.add(new Order(orderId++,stock,pm1,10000D,101.00));
  orders.add(new Order(orderId++,stock,pm2,-8000D,101.50));
  orders.add(new Order(orderId++,stock,pm1,-4000D,102.00));
  orders.add(new Order(orderId++,stock,pm2,5000D,101.00));
  for (  Order order : orders) {
    Transaction txn=Hazelcast.getTransaction();
    txn.begin();
    try {
      orderMap.put(order.id,order);
      positionSlurperQueue.put(order);
      txn.commit();
    }
 catch (    Throwable t) {
      txn.rollback();
    }
  }
  Thread.sleep(2000);
  Map entityPositionMap=Hazelcast.getMap("String_Node_Str");
  Position p=(Position)entityPositionMap.get(1);
  Instrument i=(Instrument)instrumentMap.get(p.instrumentId);
  System.out.println(i.symbol + "String_Node_Str" + p.quantity);
  Map portfolioManagerPositionMap=Hazelcast.getMap("String_Node_Str");
  p=(Position)portfolioManagerPositionMap.get("String_Node_Str");
  i=(Instrument)instrumentMap.get(p.instrumentId);
  System.out.println(i.symbol + "String_Node_Str" + p.quantity);
  p=(Position)portfolioManagerPositionMap.get("String_Node_Str");
  i=(Instrument)instrumentMap.get(p.instrumentId);
  System.out.println(i.symbol + "String_Node_Str" + p.quantity);
}

Fixed version (ground truth):
public static void main(String[] args){
  new Node().init();
}
Program: 190558
Project: 190558
Buggy source:
@Override protected Integer doInBackground(Void... params){
  if (!new ShellCommand().canSU()) {
  }
  if (Prefs.getShowNotAokpWarning(activity)) {
    if (!Tools.getROMVersion().startsWith("String_Node_Str")) {
      return RESULT_NOT_AOKP;
    }
  }
  return RESULT_OK;
}

Fixed version (ground truth):
@Override protected Integer doInBackground(Void... params){
  if (!new ShellCommand().canSU()) {
    return RESULT_NO_ROOT;
  }
  if (Prefs.getShowNotAokpWarning(activity)) {
    if (!Tools.getROMVersion().startsWith("String_Node_Str")) {
      return RESULT_NOT_AOKP;
    }
  }
  return RESULT_OK;
}
Program: 190559
Project: 190559
Buggy source:
@SuppressWarnings("String_Node_Str") public static String notEq(String s){
  return argThat(new Not(new Equals(s)));
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static String notEq(String s){
  return Matchers.<String>argThat(new Not(new Equals(s)));
}
Program: 190560
Project: 190560
Buggy source:
UserNotFoundException(String loginName){
  this.loginName=loginName;
}

Fixed version (ground truth):
public UserNotFoundException(String loginName){
  this.loginName=loginName;
}
Program: 190561
Project: 190561
Buggy source:
PageNotFoundException(String projectName,String branchName,String path){
  this.projectName=projectName;
  this.branchName=branchName;
  this.path=path;
}

Fixed version (ground truth):
public PageNotFoundException(String projectName,String branchName,String path){
  this.projectName=projectName;
  this.branchName=branchName;
  this.path=path;
}
Program: 190564
Project: 190564
Buggy source:
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=1,permission=Permission.COMMAND_SUFFIX) public void onSuffixCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  MessageList list=MessageLists.getBestList(args[0]);
  if (list != null) {
    if (args.length == 1) {
      list.setSuffix("String_Node_Str");
      sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
      AutoMessage.getPlugin().saveConfiguration();
    }
 else {
      list.setSuffix(StringUtil.concat(args,1,args.length) + "String_Node_Str");
      sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
      AutoMessage.getPlugin().saveConfiguration();
    }
  }
 else {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}

Fixed version (ground truth):
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=1,permission=Permission.COMMAND_SUFFIX) public void onSuffixCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  MessageList list=MessageLists.getBestList(args[0]);
  if (list != null) {
    if (args.length == 1) {
      list.setSuffix("String_Node_Str");
      AutoMessage.getPlugin().saveConfiguration();
      sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
    }
 else {
      list.setSuffix("String_Node_Str" + StringUtil.concat(args,1,args.length));
      AutoMessage.getPlugin().saveConfiguration();
      sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
    }
  }
 else {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}
Program: 190565
Project: 190565
Buggy source:
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=1,permission=Permission.COMMAND_ADD) public void onAddCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  if (args.length == 1) {
    if (MessageLists.getExactList(args[0]) == null) {
      MessageLists.setList(args[0],new MessageList());
      sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
 else {
    MessageList list=MessageLists.getBestList(args[0]);
    if (list != null) {
      if (args.length >= 2) {
        if (args.length >= 3 && StringUtil.isInteger(args[1])) {
          list.addMessage(Integer.valueOf(args[1]),StringUtil.concat(args,2,args.length));
        }
 else {
          list.addMessage(StringUtil.concat(args,1,args.length));
        }
        AutoMessage.getPlugin().saveConfiguration();
        sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
      }
 else {
        sender.sendMessage(ChatColor.RED + "String_Node_Str");
      }
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=1,permission=Permission.COMMAND_ADD) public void onAddCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  if (args.length == 1) {
    if (MessageLists.getExactList(args[0]) == null) {
      MessageLists.setList(args[0],new MessageList());
      AutoMessage.getPlugin().saveConfiguration();
      sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
 else {
    MessageList list=MessageLists.getBestList(args[0]);
    if (list != null) {
      if (args.length >= 2) {
        if (args.length >= 3 && StringUtil.isInteger(args[1])) {
          list.addMessage(Integer.valueOf(args[1]),StringUtil.concat(args,2,args.length));
        }
 else {
          list.addMessage(StringUtil.concat(args,1,args.length));
        }
        AutoMessage.getPlugin().saveConfiguration();
        sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
      }
 else {
        sender.sendMessage(ChatColor.RED + "String_Node_Str");
      }
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
}
Program: 190566
Project: 190566
Buggy source:
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=2,max=2,permission=Permission.COMMAND_EXPIRY) public void onExpiryCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  MessageList list=MessageLists.getBestList(args[0]);
  if (list != null) {
    try {
      if (StringUtil.isInteger(args[1])) {
        if (Integer.valueOf(args[1]).longValue() >= 0) {
          list.setExpiry(System.currentTimeMillis() + Integer.valueOf(args[1]).longValue());
        }
 else {
          list.setExpiry(Integer.valueOf(-1).longValue());
        }
      }
 else {
        list.setExpiry(System.currentTimeMillis() + StringUtil.parseTime(args[1]));
      }
      if (list.getExpiry() != -1) {
        sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.YELLOW+ StringUtil.millisToLongDHMS(list.getExpiry() - System.currentTimeMillis())+ ChatColor.GREEN+ "String_Node_Str");
      }
 else {
        sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
      }
      AutoMessage.getPlugin().saveConfiguration();
    }
 catch (    NumberFormatException e) {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
 else {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}

Fixed version (ground truth):
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=2,max=2,permission=Permission.COMMAND_EXPIRY) public void onExpiryCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  MessageList list=MessageLists.getBestList(args[0]);
  if (list != null) {
    try {
      if (StringUtil.isInteger(args[1])) {
        if (Integer.valueOf(args[1]).longValue() >= 0) {
          list.setExpiry(System.currentTimeMillis() + Integer.valueOf(args[1]).longValue());
        }
 else {
          list.setExpiry(Integer.valueOf(-1).longValue());
        }
      }
 else {
        list.setExpiry(System.currentTimeMillis() + StringUtil.parseTime(args[1]));
      }
      AutoMessage.getPlugin().saveConfiguration();
      if (list.getExpiry() != -1) {
        sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.YELLOW+ StringUtil.millisToLongDHMS(list.getExpiry() - System.currentTimeMillis())+ ChatColor.GREEN+ "String_Node_Str");
      }
 else {
        sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
      }
    }
 catch (    NumberFormatException e) {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
 else {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}
Program: 190567
Project: 190567
Buggy source:
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=2,max=2,permission=Permission.COMMAND_INTERVAL) public void onIntervalCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  MessageList list=MessageLists.getBestList(args[0]);
  if (list != null) {
    if (StringUtil.isInteger(args[1])) {
      list.setInterval(Integer.valueOf(args[1]));
      sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.YELLOW+ Integer.valueOf(args[1])+ ChatColor.GREEN+ "String_Node_Str");
      MessageLists.schedule();
      AutoMessage.getPlugin().saveConfiguration();
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
 else {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}

Fixed version (ground truth):
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=2,max=2,permission=Permission.COMMAND_INTERVAL) public void onIntervalCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  MessageList list=MessageLists.getBestList(args[0]);
  if (list != null) {
    if (StringUtil.isInteger(args[1])) {
      list.setInterval(Integer.valueOf(args[1]));
      MessageLists.schedule();
      AutoMessage.getPlugin().saveConfiguration();
      sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.YELLOW+ Integer.valueOf(args[1])+ ChatColor.GREEN+ "String_Node_Str");
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
 else {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}
Program: 190568
Project: 190568
Buggy source:
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=1,permission=Permission.COMMAND_PREFIX) public void onPrefixCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  MessageList list=MessageLists.getBestList(args[0]);
  if (list != null) {
    if (args.length == 1) {
      list.setPrefix("String_Node_Str");
      sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
      AutoMessage.getPlugin().saveConfiguration();
    }
 else {
      list.setPrefix(StringUtil.concat(args,1,args.length) + "String_Node_Str");
      sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
      AutoMessage.getPlugin().saveConfiguration();
    }
  }
 else {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}

Fixed version (ground truth):
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=1,permission=Permission.COMMAND_PREFIX) public void onPrefixCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  MessageList list=MessageLists.getBestList(args[0]);
  if (list != null) {
    if (args.length == 1) {
      list.setPrefix("String_Node_Str");
      AutoMessage.getPlugin().saveConfiguration();
      sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
    }
 else {
      list.setPrefix(StringUtil.concat(args,1,args.length) + "String_Node_Str");
      AutoMessage.getPlugin().saveConfiguration();
      sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
    }
  }
 else {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}
Program: 190569
Project: 190569
Buggy source:
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=1,max=1,permission=Permission.COMMAND_ENABLE) public void onEnableCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  MessageList list=MessageLists.getBestList(args[0]);
  if (list != null) {
    list.setEnabled(!(list.isEnabled()));
    sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.YELLOW+ list.isEnabled()+ ChatColor.GREEN+ "String_Node_Str");
    AutoMessage.getPlugin().saveConfiguration();
  }
 else {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}

Fixed version (ground truth):
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=1,max=1,permission=Permission.COMMAND_ENABLE) public void onEnableCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  MessageList list=MessageLists.getBestList(args[0]);
  if (list != null) {
    list.setEnabled(!(list.isEnabled()));
    AutoMessage.getPlugin().saveConfiguration();
    sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.YELLOW+ list.isEnabled()+ ChatColor.GREEN+ "String_Node_Str");
  }
 else {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}
Program: 190570
Project: 190570
Buggy source:
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=3,permission=Permission.COMMAND_EDIT) public void onEditCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  MessageList list=MessageLists.getBestList(args[0]);
  if (list != null) {
    if (StringUtil.isInteger(args[1])) {
      if (list.editMessage(Integer.valueOf(args[1]),StringUtil.concat(args,2,args.length))) {
        sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
        AutoMessage.getPlugin().saveConfiguration();
      }
 else {
        sender.sendMessage(ChatColor.RED + "String_Node_Str");
      }
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
 else {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}

Fixed version (ground truth):
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=3,permission=Permission.COMMAND_EDIT) public void onEditCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  MessageList list=MessageLists.getBestList(args[0]);
  if (list != null) {
    if (StringUtil.isInteger(args[1])) {
      if (list.editMessage(Integer.valueOf(args[1]),StringUtil.concat(args,2,args.length))) {
        AutoMessage.getPlugin().saveConfiguration();
        sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
      }
 else {
        sender.sendMessage(ChatColor.RED + "String_Node_Str");
      }
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
 else {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}