nus-yam/ex-repair huggingface dataset:
Program: 91010
Project: 91010
Buggy source:
private void unlinkFromTarget(final E edge,final E tmpEdge,final V tmpVertex){
  vertexPool.getByInternalPoolIndex(edge.getTargetVertexInternalPoolIndex(),tmpVertex);
  final int targetInIndex=tmpVertex.getFirstInEdgeIndex();
  if (targetInIndex == edge.getInternalPoolIndex()) {
    tmpVertex.setFirstInEdgeIndex(edge.getNextTargetEdgeIndex());
  }
 else {
    getByInternalPoolIndex(targetInIndex,tmpEdge);
    int nextTargetEdgeIndex=tmpEdge.getNextTargetEdgeIndex();
    while (nextTargetEdgeIndex >= 0) {
      getByInternalPoolIndex(nextTargetEdgeIndex,tmpEdge);
      nextTargetEdgeIndex=tmpEdge.getNextTargetEdgeIndex();
    }
    tmpEdge.setNextTargetEdgeIndex(edge.getNextTargetEdgeIndex());
  }
}

Fixed version (ground truth):
private void unlinkFromTarget(final E edge,final E tmpEdge,final V tmpVertex){
  vertexPool.getByInternalPoolIndex(edge.getTargetVertexInternalPoolIndex(),tmpVertex);
  final int targetInIndex=tmpVertex.getFirstInEdgeIndex();
  if (targetInIndex == edge.getInternalPoolIndex()) {
    tmpVertex.setFirstInEdgeIndex(edge.getNextTargetEdgeIndex());
  }
 else {
    getByInternalPoolIndex(targetInIndex,tmpEdge);
    int nextTargetEdgeIndex=tmpEdge.getNextTargetEdgeIndex();
    while (nextTargetEdgeIndex != edge.getInternalPoolIndex()) {
      getByInternalPoolIndex(nextTargetEdgeIndex,tmpEdge);
      nextTargetEdgeIndex=tmpEdge.getNextTargetEdgeIndex();
    }
    tmpEdge.setNextTargetEdgeIndex(edge.getNextTargetEdgeIndex());
  }
}
Program: 91011
Project: 91011
Buggy source:
private void unlinkFromTarget(final E edge,final E tmpEdge,final V tmpVertex){
  vertexPool.getByInternalPoolIndex(edge.getTargetVertexInternalPoolIndex(),tmpVertex);
  final int targetInIndex=tmpVertex.getFirstInEdgeIndex();
  if (targetInIndex == edge.getInternalPoolIndex()) {
    tmpVertex.setFirstInEdgeIndex(edge.getNextTargetEdgeIndex());
  }
 else {
    getByInternalPoolIndex(targetInIndex,tmpEdge);
    int nextTargetEdgeIndex=tmpEdge.getNextTargetEdgeIndex();
    while (nextTargetEdgeIndex >= 0) {
      getByInternalPoolIndex(nextTargetEdgeIndex,tmpEdge);
      nextTargetEdgeIndex=tmpEdge.getNextTargetEdgeIndex();
    }
    tmpEdge.setNextTargetEdgeIndex(edge.getNextTargetEdgeIndex());
  }
}

Fixed version (ground truth):
private void unlinkFromTarget(final E edge,final E tmpEdge,final V tmpVertex){
  vertexPool.getByInternalPoolIndex(edge.getTargetVertexInternalPoolIndex(),tmpVertex);
  final int targetInIndex=tmpVertex.getFirstInEdgeIndex();
  if (targetInIndex == edge.getInternalPoolIndex()) {
    tmpVertex.setFirstInEdgeIndex(edge.getNextTargetEdgeIndex());
  }
 else {
    getByInternalPoolIndex(targetInIndex,tmpEdge);
    int nextTargetEdgeIndex=tmpEdge.getNextTargetEdgeIndex();
    while (nextTargetEdgeIndex != edge.getInternalPoolIndex()) {
      getByInternalPoolIndex(nextTargetEdgeIndex,tmpEdge);
      nextTargetEdgeIndex=tmpEdge.getNextTargetEdgeIndex();
    }
    tmpEdge.setNextTargetEdgeIndex(edge.getNextTargetEdgeIndex());
  }
}
Program: 91012
Project: 91012
Buggy source:
/** 
 * Make this   {@link PoolObject} refer to the same data as {@code obj}
 * @param obj A  {@link PoolObject}, usually of the same type as this one.
 */
@Override @SuppressWarnings("String_Node_Str") public O refTo(final O obj){
  updateAccess(obj.memPool,obj.index);
  return (O)this;
}

Fixed version (ground truth):
/** 
 * Make this   {@link PoolObject} refer to the same data as {@code obj}
 * @param obj A  {@link PoolObject}, usually of the same type as this one.
 */
@Override @SuppressWarnings("String_Node_Str") public O refTo(final O obj){
  updateAccess(((PoolObject<?,T>)obj).memPool,((PoolObject<?,T>)obj).index);
  return (O)this;
}
Program: 91013
Project: 91013
Buggy source:
TrackSchemeEdge(final AbstractEdgePool<TrackSchemeEdge,TrackSchemeVertex,ByteMappedElement> pool){
  super(pool);
  setSelected(false);
}

Fixed version (ground truth):
TrackSchemeEdge(final AbstractEdgePool<TrackSchemeEdge,TrackSchemeVertex,ByteMappedElement> pool){
  super(pool);
}
Program: 91014
Project: 91014
Buggy source:
public BreadthFirstIterator(final V root,final Graph<V,E> graph){
  super(graph);
  this.queue=createVertexDeque();
  queue.offer(root);
  fetchNext();
}

Fixed version (ground truth):
public BreadthFirstIterator(final V root,final Graph<V,E> graph){
  super(graph);
  this.queue=createVertexDeque();
  queue.offer(root);
  fetchNext();
  visited.add(root);
}
Program: 91015
Project: 91015
Buggy source:
public DepthFirstIterator(final V root,final Graph<V,E> graph){
  super(graph);
  stack=createVertexStack();
  stack.push(root);
  fetchNext();
}

Fixed version (ground truth):
public DepthFirstIterator(final V root,final Graph<V,E> graph){
  super(graph);
  stack=createVertexStack();
  stack.push(root);
  fetchNext();
  visited.add(root);
}
Program: 91016
Project: 91016
Buggy source:
@Override public List<O> subList(final int fromIndex,final int toIndex){
  return new PoolObjectList<O,T>(this,(TIntArrayList)indices.subList(fromIndex,fromIndex));
}

Fixed version (ground truth):
@Override public List<O> subList(final int fromIndex,final int toIndex){
  return new PoolObjectList<O,T>(this,(TIntArrayList)indices.subList(fromIndex,toIndex));
}
Program: 91017
Project: 91017
Buggy source:
@Override public SpotList subList(final int fromIndex,final int toIndex){
  return new SpotList(this,getIndexCollection().subList(fromIndex,fromIndex));
}

Fixed version (ground truth):
@Override public SpotList subList(final int fromIndex,final int toIndex){
  return new SpotList(this,getIndexCollection().subList(fromIndex,toIndex));
}
Program: 91019
Project: 91019
Buggy source:
private int build(final Collection<O> objects){
  final KDTreeNode<O,T> n1=createRef();
  final KDTreeNode<O,T> n2=createRef();
  final KDTreeNode<O,T> n3=createRef();
  for (  final O obj : objects)   create(n1).init(obj);
  final int max=objects.size() - 1;
  final int r=makeNode(0,max,0,n1,n2,n3);
  releaseRef(n1);
  releaseRef(n2);
  releaseRef(n3);
  return r;
}

Fixed version (ground truth):
private void build(final Collection<O> objects){
  final KDTreeNode<O,T> n1=createRef();
  final KDTreeNode<O,T> n2=createRef();
  final KDTreeNode<O,T> n3=createRef();
  for (  final O obj : objects)   create(n1).init(obj);
  final int max=objects.size() - 1;
  final int r=makeNode(0,max,0,n1,n2,n3);
  releaseRef(n1);
  releaseRef(n2);
  releaseRef(n3);
  rootIndex=r;
}
Program: 91020
Project: 91020
Buggy source:
private KDTree(final int initialCapacity,final NodeFactory<O,T> nodeFactory,final int numDimensions,final Collection<O> objects,final Pool<O,?> objectPool){
  super(initialCapacity,nodeFactory);
  this.n=numDimensions;
  this.objectPool=objectPool;
  this.rootIndex=build(objects);
}

Fixed version (ground truth):
private KDTree(final int initialCapacity,final NodeFactory<O,T> nodeFactory,final int numDimensions,final Collection<O> objects,final Pool<O,?> objectPool){
  super(initialCapacity,nodeFactory);
  this.n=numDimensions;
  this.objectPool=objectPool;
}
Program: 91021
Project: 91021
Buggy source:
public static <O extends PoolObject<O,?> & RealLocalizable,T extends MappedElement>KDTree<O,T> kdtree(final Collection<O> objects,final Pool<O,?> objectPool,final MemPool.Factory<T> poolFactory){
  if (objects.isEmpty())   return null;
  return new NodeFactory<O,T>(objects,objectPool,poolFactory).kdtree;
}

Fixed version (ground truth):
public static <O extends PoolObject<O,?> & RealLocalizable,T extends MappedElement>KDTree<O,T> kdtree(final Collection<O> objects,final Pool<O,?> objectPool,final MemPool.Factory<T> poolFactory){
  if (objects.isEmpty())   return null;
  final KDTree<O,T> kdtree=new NodeFactory<O,T>(objects,objectPool,poolFactory).kdtree;
  kdtree.build(objects);
  return kdtree;
}
Program: 91022
Project: 91022
Buggy source:
public int create(){
  if (firstFreeIndex < 0)   return append();
 else {
    final int index=firstFreeIndex;
    updateAccess(dataAccess,firstFreeIndex);
    firstFreeIndex=dataAccess.getIndex(4);
    return index;
  }
}

Fixed version (ground truth):
public int create(){
  ++size;
  if (firstFreeIndex < 0)   return append();
 else {
    final int index=firstFreeIndex;
    updateAccess(dataAccess,firstFreeIndex);
    firstFreeIndex=dataAccess.getIndex(4);
    return index;
  }
}
Program: 91023
Project: 91023
Buggy source:
public void free(final int index){
  if (index >= 0 && index < allocatedSize) {
    updateAccess(dataAccess,index);
    final boolean isFree=dataAccess.getInt(0) == FREE_ELEMENT_MAGIC_NUMBER;
    if (!isFree) {
      dataAccess.putIndex(FREE_ELEMENT_MAGIC_NUMBER,0);
      dataAccess.putIndex(firstFreeIndex,4);
      firstFreeIndex=index;
    }
  }
}

Fixed version (ground truth):
public void free(final int index){
  if (index >= 0 && index < allocatedSize) {
    updateAccess(dataAccess,index);
    final boolean isFree=dataAccess.getInt(0) == FREE_ELEMENT_MAGIC_NUMBER;
    if (!isFree) {
      --size;
      dataAccess.putIndex(FREE_ELEMENT_MAGIC_NUMBER,0);
      dataAccess.putIndex(firstFreeIndex,4);
      firstFreeIndex=index;
    }
  }
}
Program: 91024
Project: 91024
Buggy source:
@Override public String transform(TextNode node,String original){
  StringBuilder build=new StringBuilder();
  char[] ca=original.toCharArray();
  for (int i=0; i < ca.length; i++) {
switch (ca[i]) {
case '&':
      build.append("String_Node_Str");
    if (offsets != null) {
      offsets.add(node.begin + i,4);
    }
  break;
case '<':
build.append("String_Node_Str");
if (offsets != null) {
offsets.add(node.begin + i,3);
}
break;
case '>':
build.append("String_Node_Str");
if (offsets != null) {
offsets.add(node.begin + i,3);
}
break;
case '"':
build.append("String_Node_Str");
if (offsets != null) {
offsets.add(node.begin + i,5);
}
break;
case '\n':
case '\r':
String parentTagNode=node.parent != null ? node.parent.getName().toLowerCase() : null;
if (parentTagNode != null && attributes != null && attributes.containsKey(parentTagNode) && !attributes.get(parentTagNode).transformNewLines) {
break;
}
if (i + 1 < ca.length && ((ca[i] == '\n' && ca[i + 1] == '\r') || (ca[i] == '\r' && ca[i + 1] == '\n'))) {
if (offsets != null) {
offsets.add(node.begin + i,3);
}
i++;
}
 else if (offsets != null) {
offsets.add(node.begin + i,4);
}
build.append("String_Node_Str");
break;
default :
build.append(ca[i]);
}
}
return build.toString();
}

Fixed version (ground truth):
@Override public String transform(TextNode node,String original){
  StringBuilder build=new StringBuilder();
  char[] ca=original.toCharArray();
  for (int i=0; i < ca.length; i++) {
switch (ca[i]) {
case '&':
      build.append("String_Node_Str");
    if (offsets != null) {
      offsets.add(node.begin + i,4);
    }
  break;
case '<':
build.append("String_Node_Str");
if (offsets != null) {
offsets.add(node.begin + i,3);
}
break;
case '>':
build.append("String_Node_Str");
if (offsets != null) {
offsets.add(node.begin + i,3);
}
break;
case '"':
build.append("String_Node_Str");
if (offsets != null) {
offsets.add(node.begin + i,5);
}
break;
case '\n':
case '\r':
String parentTagNode=node.parent != null ? node.parent.getName().toLowerCase() : null;
if (parentTagNode != null && attributes != null && attributes.containsKey(parentTagNode) && !attributes.get(parentTagNode).transformNewLines) {
build.append(ca[i]);
break;
}
if (i + 1 < ca.length && ((ca[i] == '\n' && ca[i + 1] == '\r') || (ca[i] == '\r' && ca[i + 1] == '\n'))) {
if (offsets != null) {
offsets.add(node.begin + i,3);
}
i++;
}
 else if (offsets != null) {
offsets.add(node.begin + i,4);
}
build.append("String_Node_Str");
break;
default :
build.append(ca[i]);
}
}
return build.toString();
}
Program: 91025
Project: 91025
Buggy source:
@Override public String transform(TextNode node,String original){
  StringBuilder build=new StringBuilder();
  char[] ca=original.toCharArray();
  for (int i=0; i < ca.length; i++) {
switch (ca[i]) {
case '&':
      build.append("String_Node_Str");
    offsets.add(node.begin + i,4);
  break;
case '<':
build.append("String_Node_Str");
offsets.add(node.begin + i,3);
break;
case '>':
build.append("String_Node_Str");
offsets.add(node.begin + i,3);
break;
case '"':
build.append("String_Node_Str");
offsets.add(node.begin + i,5);
break;
case '\n':
case '\r':
if (i + i < ca.length && ((ca[i] == '\n' && ca[i + 1] == '\r') || (ca[i] == '\r' && ca[i + 1] == '\n'))) {
offsets.add(node.begin + i,3);
i++;
}
 else {
offsets.add(node.begin + i,4);
}
build.append("String_Node_Str");
break;
default :
build.append(ca[i]);
}
}
return build.toString();
}

Fixed version (ground truth):
@Override public String transform(TextNode node,String original){
  StringBuilder build=new StringBuilder();
  char[] ca=original.toCharArray();
  for (int i=0; i < ca.length; i++) {
switch (ca[i]) {
case '&':
      build.append("String_Node_Str");
    offsets.add(node.begin + i,4);
  break;
case '<':
build.append("String_Node_Str");
offsets.add(node.begin + i,3);
break;
case '>':
build.append("String_Node_Str");
offsets.add(node.begin + i,3);
break;
case '"':
build.append("String_Node_Str");
offsets.add(node.begin + i,5);
break;
case '\n':
case '\r':
if (i + 1 < ca.length && ((ca[i] == '\n' && ca[i + 1] == '\r') || (ca[i] == '\r' && ca[i + 1] == '\n'))) {
offsets.add(node.begin + i,3);
i++;
}
 else {
offsets.add(node.begin + i,4);
}
build.append("String_Node_Str");
break;
default :
build.append(ca[i]);
}
}
return build.toString();
}
Program: 91027
Project: 91027
Buggy source:
/** 
 * ServiceProperties are currently only used for automatic ordering of the  execution of EnhancementEngines (e.g. by the WeightedChain implementation). ORDERING_PRE_PROCESSING: All values >= 200 are considered for engines that do some kind of preprocessing of the content. This includes e.g. the  conversion of media formats such as extracting the plain text from HTML,  keyframes from videos, wave form from mp3 ...; extracting metadata directly  encoded within the parsed content such as ID3 tags from MP3 or RDFa,  microdata provided by HTML content. use a value <   {@link ServiceProperties#ORDERING_PRE_PROCESSING}and >=   {@link ServiceProperties#ORDERING_PRE_PROCESSING}.
 */
public Map<String,Object> getServiceProperties(){
  return Collections.unmodifiableMap(Collections.singletonMap(ENHANCEMENT_ENGINE_ORDERING,(Object)ORDERING_PRE_PROCESSING));
}

Fixed version (ground truth):
/** 
 * ServiceProperties are currently only used for automatic ordering of the  execution of EnhancementEngines (e.g. by the WeightedChain implementation). ORDERING_PRE_PROCESSING: All values >= 200 are considered for engines that do some kind of preprocessing of the content. This includes e.g. the  conversion of media formats such as extracting the plain text from HTML,  keyframes from videos, wave form from mp3 ...; extracting metadata directly  encoded within the parsed content such as ID3 tags from MP3 or RDFa,  microdata provided by HTML content. use a value <   {@link ServiceProperties#ORDERING_PRE_PROCESSING}and >=   {@link ServiceProperties#ORDERING_PRE_PROCESSING}.
 */
@Override public Map<String,Object> getServiceProperties(){
  return Collections.unmodifiableMap(Collections.singletonMap(ENHANCEMENT_ENGINE_ORDERING,(Object)ORDERING_PRE_PROCESSING));
}
Program: 91028
Project: 91028
Buggy source:
protected void deactivate(ComponentContext ctx){
  dataFileTracker.removeAll(modelFileListener);
  config=null;
  super.deactivate(ctx);
}

Fixed version (ground truth):
@Override protected void deactivate(ComponentContext ctx){
  dataFileTracker.removeAll(modelFileListener);
  config=null;
  super.deactivate(ctx);
}
Program: 91029
Project: 91029
Buggy source:
protected boolean initConfig(ModelProvider MPi){
  System.out.println("String_Node_Str");
  this.MPi=MPi;
  lmodel=new LanguageModel();
  amodel=new AcousticModel();
  dmodel=new DictionaryModel();
  if (!CUSTOM_MODEL_AVAILABLE) {
    System.out.println("String_Node_Str");
    amodel=MPi.getDefaultModel(getDefaultLanguage(),amodel);
    System.out.println("String_Node_Str");
    dmodel=MPi.getDefaultModel(getDefaultLanguage(),dmodel);
    System.out.println("String_Node_Str");
    lmodel=MPi.getDefaultModel(getDefaultLanguage(),lmodel);
  }
 else {
    lmodel=this.MPi.getModel(languageModelFile,lmodel,null);
    amodel=this.MPi.getModel(acousticModelFile,amodel,bundleSymbolicName);
    dmodel=this.MPi.getModel(dictionaryModelFile,dmodel,null);
  }
  if (amodel == null || dmodel == null || lmodel == null)   return false;
  return true;
}

Fixed version (ground truth):
protected boolean initConfig(ModelProvider MPi){
  System.out.println("String_Node_Str");
  this.MPi=MPi;
  lmodel=new LanguageModel();
  amodel=new AcousticModel();
  dmodel=new DictionaryModel();
  if (!CUSTOM_MODEL_AVAILABLE) {
    System.out.println("String_Node_Str");
    amodel=MPi.getDefaultModel(getDefaultLanguage(),amodel);
    System.out.println("String_Node_Str");
    dmodel=MPi.getDefaultModel(getDefaultLanguage(),dmodel);
    System.out.println("String_Node_Str");
    lmodel=MPi.getDefaultModel(getDefaultLanguage(),lmodel);
  }
 else {
    lmodel=this.MPi.getModel(languageModelFile,lmodel,bundleSymbolicName);
    amodel=this.MPi.getModel(acousticModelFile,amodel,bundleSymbolicName);
    dmodel=this.MPi.getModel(dictionaryModelFile,dmodel,bundleSymbolicName);
  }
  return amodel != null && dmodel != null && lmodel != null;
}
Program: 91030
Project: 91030
Buggy source:
public SphinxConfig(){
}

Fixed version (ground truth):
public SphinxConfig(){
  this.dictionaryModelFile=new HashSet<String>();
  this.languageModelFile=new HashSet<String>();
  this.acousticModelFile=new HashSet<String>();
}
Program: 91031
Project: 91031
Buggy source:
/** 
 * Responds the content of the app.
 */
@Override public void handleGET(CoapExchange request){
  try {
    File file=new File(getInstalledPath());
    @SuppressWarnings("String_Node_Str") Scanner scanner=new Scanner(file).useDelimiter("String_Node_Str");
    String content=scanner.next();
    scanner.close();
    request.respond(ResponseCode.CONTENT,content);
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
    request.respond(ResponseCode.INTERNAL_SERVER_ERROR);
  }
}

Fixed version (ground truth):
/** 
 * Responds the content of the app.
 */
@Override public void handleGET(CoapExchange request){
  try {
    File file=new File(getInstalledPath());
    @SuppressWarnings("String_Node_Str") Scanner scanner=new Scanner(file).useDelimiter("String_Node_Str");
    String content=scanner.next();
    scanner.close();
    request.respond(ResponseCode.CONTENT,content);
  }
 catch (  FileNotFoundException|NoSuchElementException e) {
    e.printStackTrace();
    request.respond(ResponseCode.INTERNAL_SERVER_ERROR);
  }
}
Program: 91032
Project: 91032
Buggy source:
private void callJSCallback(CoapExchange exchange,CoapCallback callback){
  try {
    callback.call(new JavaScriptCoapExchange(exchange),exchange.advanced().getRequest());
  }
 catch (  NashornException e) {
    System.err.println("String_Node_Str" + e.getFileName() + "String_Node_Str"+ e.getLineNumber()+ "String_Node_Str"+ e.getMessage());
    throw e;
  }
}

Fixed version (ground truth):
private void callJSCallback(CoapExchange exchange,CoapCallback callback){
  try {
    callback.call(new JavaScriptCoapExchange(exchange),exchange.advanced().getRequest());
  }
 catch (  NashornException e) {
    exchange.respond(CoAP.ResponseCode.INTERNAL_SERVER_ERROR,e.getMessage());
    System.err.println("String_Node_Str" + e.getFileName() + "String_Node_Str"+ e.getLineNumber()+ "String_Node_Str"+ e.getMessage());
    throw e;
  }
}
Program: 91034
Project: 91034
Buggy source:
/** 
 * Deletes the file with the code of this app.
 * @throws IOException if file does not exist or is not deletable.
 */
private void deleteLib() throws IOException {
  String apppath=getInstalledPath();
  File file=new File(apppath);
  if (!file.exists())   throw new IOException("String_Node_Str" + apppath + "String_Node_Str"+ name+ "String_Node_Str");
  if (!file.canWrite())   throw new IOException("String_Node_Str" + apppath + "String_Node_Str"+ name+ "String_Node_Str");
  System.out.println("String_Node_Str" + apppath);
  boolean success=file.delete();
  if (!success)   throw new IOException("String_Node_Str" + apppath + "String_Node_Str"+ name+ "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Deletes the file with the code of this lib.
 * @throws IOException if file does not exist or is not deletable.
 */
private void deleteLib() throws IOException {
  String apppath=getInstalledPath();
  File file=new File(apppath);
  if (!file.exists())   throw new IOException("String_Node_Str" + apppath + "String_Node_Str"+ name+ "String_Node_Str");
  if (!file.canWrite())   throw new IOException("String_Node_Str" + apppath + "String_Node_Str"+ name+ "String_Node_Str");
  System.out.println("String_Node_Str" + apppath);
  boolean success=file.delete();
  if (!success)   throw new IOException("String_Node_Str" + apppath + "String_Node_Str"+ name+ "String_Node_Str");
}
Program: 91035
Project: 91035
Buggy source:
/** 
 * Deletes this app and all instances of it from the server. The AppManager stops the execution of all instances of this app and removes all config files from their parent resources and from the disk.
 */
@Override public void handleDELETE(CoapExchange request){
  try {
    manager.deleteApps(name);
    deleteLib();
    delete();
    request.respond(CoAP.ResponseCode.DELETED);
  }
 catch (  IOException e) {
    e.printStackTrace();
    request.respond(CoAP.ResponseCode.INTERNAL_SERVER_ERROR,e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Deletes this app and all instances of it from the server. The AppManager stops the execution of all instances of this app and removes all config files from their parent resources and from the disk.
 */
@Override public void handleDELETE(CoapExchange request){
  try {
    deleteLib();
    delete();
    request.respond(CoAP.ResponseCode.DELETED);
  }
 catch (  IOException e) {
    e.printStackTrace();
    request.respond(CoAP.ResponseCode.INTERNAL_SERVER_ERROR,e.getMessage());
  }
}
Program: 91036
Project: 91036
Buggy source:
private void prepareServerConfiguration() throws IOException {
  appFolder=new File("String_Node_Str");
  cleanupConfiguration();
  appFolder.mkdir();
  appFolder.deleteOnExit();
  new File("String_Node_Str").mkdir();
  new File("String_Node_Str").mkdir();
  new File("String_Node_Str").mkdir();
{
    PrintWriter writer=new PrintWriter("String_Node_Str","String_Node_Str");
    writer.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    writer.close();
  }
}

Fixed version (ground truth):
private void prepareServerConfiguration() throws IOException {
  appFolder=new File("String_Node_Str");
  cleanupConfiguration();
  appFolder.mkdir();
  appFolder.deleteOnExit();
  new File("String_Node_Str" + File.separator + "String_Node_Str").mkdir();
  new File("String_Node_Str" + File.separator + "String_Node_Str").mkdir();
  new File("String_Node_Str" + File.separator + "String_Node_Str").mkdir();
{
    PrintWriter writer=new PrintWriter("String_Node_Str","String_Node_Str");
    writer.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    writer.close();
  }
}
Program: 91037
Project: 91037
Buggy source:
/** 
 * Adds a config, creates a correspondig resource and adds it as subresource.
 * @param appconfig the configuration
 */
public void addConfig(AppConfig appconfig){
  String identifier=appconfig.getName();
  appconfigs.add(appconfig);
  Resource res=appconfig.createConfigResource(identifier);
  add(res);
}

Fixed version (ground truth):
/** 
 * Adds a config, creates a correspondig resource and adds it as subresource.
 * @param appconfig the configuration
 */
public void addConfig(final AppConfig appconfig){
  String identifier=appconfig.getName();
  appconfigs.add(appconfig);
  final Resource res=appconfig.createConfigResource(identifier);
  appconfig.getObservable().addObserver(new Observer(){
    public void update(    Observable o,    Object arg){
      if (!(arg instanceof AppConfig.ConfigChangeSet))       return;
      AbstractConfig.ConfigChangeSet set=(AbstractConfig.ConfigChangeSet)arg;
      if (set.contains(AppConfig.AVAILABILITY)) {
        if (appconfig.getProperty(AppConfig.AVAILABILITY).equals(AppConfig.UNABAILABLE)) {
          appconfigs.remove(appconfig);
          AppConfigsResource.this.delete(res);
        }
      }
    }
  }
);
  add(res);
}
Program: 91038
Project: 91038
Buggy source:
@Override @Transactional(readOnly=true) public Optional<MethodDescriptor> getMethodById(@NotNull Long methodId){
  GetMethodsRequest request=GetMethodsRequest.defaults().toBuilder().maxResults(1).suppressUntrackedMethods(false).suppressSyntheticMethods(false).build();
  MethodDescriptorRowCallbackHandler rowCallbackHandler=new MethodDescriptorRowCallbackHandler("String_Node_Str");
  jdbcTemplate.query(rowCallbackHandler.getSelectStatement(),rowCallbackHandler,customerIdProvider.getCustomerId(),methodId);
  return rowCallbackHandler.getResult(request).stream().findFirst();
}

Fixed version (ground truth):
@Override @Transactional(readOnly=true) public Optional<MethodDescriptor> getMethodById(@NotNull Long methodId){
  GetMethodsRequest request=GetMethodsRequest.defaults().toBuilder().maxResults(1).suppressUntrackedMethods(false).suppressSyntheticMethods(false).minCollectedDays(0).build();
  MethodDescriptorRowCallbackHandler rowCallbackHandler=new MethodDescriptorRowCallbackHandler("String_Node_Str");
  jdbcTemplate.query(rowCallbackHandler.getSelectStatement(),rowCallbackHandler,customerIdProvider.getCustomerId(),methodId);
  return rowCallbackHandler.getResult(request).stream().findFirst();
}
Program: 91039
Project: 91039
Buggy source:
@Override public void onApplicationEvent(ApplicationReadyEvent event){
  sendNotification(String.format("String_Node_Str",settings.getApplicationName(),settings.getDisplayVersion(),settings.getDnsCname()),Channel.BUILDS);
}

Fixed version (ground truth):
@Override public void onApplicationEvent(ApplicationReadyEvent event){
  doSend(String.format("String_Node_Str",settings.getApplicationName(),settings.getDisplayVersion(),settings.getDnsCname()),Channel.BUILDS);
}
Program: 91040
Project: 91040
Buggy source:
@PreDestroy public void notifyShutdown(){
  sendNotification(String.format("String_Node_Str",settings.getApplicationName(),settings.getDisplayVersion(),settings.getDnsCname()),Channel.BUILDS);
}

Fixed version (ground truth):
@PreDestroy public void notifyShutdown(){
  doSend(String.format("String_Node_Str",settings.getApplicationName(),settings.getDisplayVersion(),settings.getDnsCname()),Channel.BUILDS);
}
Program: 91041
Project: 91041
Buggy source:
@Override @Async public void sendNotification(String text,Channel channel){
  String ch=channel.name().toLowerCase().replace("String_Node_Str","String_Node_Str");
  doSendPayload(Payload.builder().text(text).channel(ch).build());
}

Fixed version (ground truth):
@Override @Async public void sendNotification(String text,Channel channel){
  doSend(text,channel);
}
Program: 91042
Project: 91042
Buggy source:
@Override @Transactional public CustomerData registerAgentDataPublication(CustomerData customerData,Instant publishedAt){
  CustomerData result=customerData;
  if (customerData.getPricePlan().getMaxCollectionPeriodDays() > 0 && customerData.getTrialPeriodEndsAt() == null) {
    result=customerData.toBuilder().collectionStartedAt(publishedAt).trialPeriodEndsAt(publishedAt.plus(customerData.getPricePlan().getMaxCollectionPeriodDays(),DAYS)).build();
    int updated=jdbcTemplate.update("String_Node_Str" + "String_Node_Str",Timestamp.from(Instant.now()),Timestamp.from(result.getCollectionStartedAt()),Timestamp.from(result.getTrialPeriodEndsAt()),customerData.getCustomerId());
    if (updated <= 0) {
      logger.warn("String_Node_Str",result);
    }
 else {
      logger.info("String_Node_Str",result);
    }
  }
  return result;
}

Fixed version (ground truth):
@Override @Transactional public CustomerData registerAgentDataPublication(CustomerData customerData,Instant publishedAt){
  final CustomerData result;
  if (customerData.getPricePlan().getMaxCollectionPeriodDays() > 0 && customerData.getTrialPeriodEndsAt() == null) {
    result=startTrialPeriod(customerData,publishedAt);
  }
 else   if (customerData.getCollectionStartedAt() == null) {
    result=recordCollectionStarted(customerData,publishedAt);
  }
 else {
    result=customerData;
  }
  return result;
}
Program: 91044
Project: 91044
Buggy source:
private boolean updateAgentState(CustomerData customerData,String jvmUuid){
}

Fixed version (ground truth):
private boolean updateAgentState(CustomerData customerData,String jvmUuid){
  long customerId=customerData.getCustomerId();
  Instant now=Instant.now();
  int updated=jdbcTemplate.update("String_Node_Str" + "String_Node_Str",customerId,Timestamp.from(now.minusSeconds(60)));
  if (updated > 0) {
    log.info("String_Node_Str",updated,customerData);
  }
  Timestamp nextExpectedPollTimestamp=Timestamp.from(now.plusSeconds(customerData.getPricePlan().getPollIntervalSeconds()));
  updated=jdbcTemplate.update("String_Node_Str",Timestamp.from(now),nextExpectedPollTimestamp,customerId,jvmUuid);
  if (updated == 0) {
    log.info("String_Node_Str",customerId,jvmUuid);
    jdbcTemplate.update("String_Node_Str",customerId,jvmUuid,Timestamp.from(now),nextExpectedPollTimestamp,Boolean.TRUE);
  }
 else {
    log.debug("String_Node_Str",customerId,jvmUuid);
  }
  Integer numOtherEnabledLiveAgents=jdbcTemplate.queryForObject("String_Node_Str" + "String_Node_Str",Integer.class,customerId,Timestamp.from(now.minusSeconds(10)),jvmUuid);
  String planName=customerData.getPlanName();
  int maxNumberOfAgents=customerData.getPricePlan().getMaxNumberOfAgents();
  boolean enabled=numOtherEnabledLiveAgents < maxNumberOfAgents;
  if (!enabled) {
    log.warn("String_Node_Str",customerId,numOtherEnabledLiveAgents,planName,maxNumberOfAgents);
  }
 else {
    log.debug("String_Node_Str",customerId,numOtherEnabledLiveAgents + 1,planName,maxNumberOfAgents);
  }
  jdbcTemplate.update("String_Node_Str",enabled,jvmUuid);
  return enabled;
}
Program: 91045
Project: 91045
Buggy source:
@Override public HerokuProvisionResponse provision(HerokuProvisionRequest request){
  log.debug("String_Node_Str",request);
  String licenseKey=customerService.addCustomer(CustomerService.AddCustomerRequest.builder().source("String_Node_Str").externalId(request.getUuid()).name(request.getHeroku_id()).plan(request.getPlan()).build());
  Map<String,String> config=new HashMap<>();
  config.put("String_Node_Str",settings.getHerokuCodekvastUrl());
  config.put("String_Node_Str",licenseKey);
  HerokuProvisionResponse response=HerokuProvisionResponse.builder().id(request.getUuid()).config(config).build();
  log.debug("String_Node_Str",response);
  return response;
}

Fixed version (ground truth):
@Override public HerokuProvisionResponse provision(HerokuProvisionRequest request){
  log.debug("String_Node_Str",request);
  String licenseKey=customerService.addCustomer(CustomerService.AddCustomerRequest.builder().source(CustomerService.Source.HEROKU).externalId(request.getUuid()).name(request.getHeroku_id()).plan(request.getPlan()).build());
  Map<String,String> config=new HashMap<>();
  config.put("String_Node_Str",settings.getHerokuCodekvastUrl());
  config.put("String_Node_Str",licenseKey);
  HerokuProvisionResponse response=HerokuProvisionResponse.builder().id(request.getUuid()).config(config).build();
  log.debug("String_Node_Str",response);
  return response;
}
Program: 91046
Project: 91046
Buggy source:
private String doHerokuSingleSignOn(String externalId,long timestampSeconds,String token,String email) throws AuthenticationException {
  String expectedToken=makeHerokuSsoToken(externalId,timestampSeconds);
  log.debug("String_Node_Str",externalId,token,timestampSeconds,expectedToken);
  long nowSeconds=System.currentTimeMillis() / 1000L;
  if (timestampSeconds > nowSeconds + 60) {
    throw new NonceExpiredException("String_Node_Str");
  }
  if (timestampSeconds < nowSeconds - 5 * 60) {
    throw new NonceExpiredException("String_Node_Str");
  }
  if (!expectedToken.equals(token)) {
    throw new BadCredentialsException("String_Node_Str");
  }
  CustomerData customerData=customerService.getCustomerDataByExternalId(externalId);
  customerService.registerLogin(customerData,email,"String_Node_Str");
  return webappTokenProvider.createWebappToken(customerData.getCustomerId(),WebappCredentials.builder().externalId(externalId).customerName(customerData.getCustomerName()).email(email).source(customerData.getSource()).build());
}

Fixed version (ground truth):
private String doHerokuSingleSignOn(String externalId,long timestampSeconds,String token,String email) throws AuthenticationException {
  String expectedToken=makeHerokuSsoToken(externalId,timestampSeconds);
  log.debug("String_Node_Str",externalId,token,timestampSeconds,expectedToken);
  long nowSeconds=System.currentTimeMillis() / 1000L;
  if (timestampSeconds > nowSeconds + 60) {
    throw new NonceExpiredException("String_Node_Str");
  }
  if (timestampSeconds < nowSeconds - 5 * 60) {
    throw new NonceExpiredException("String_Node_Str");
  }
  if (!expectedToken.equals(token)) {
    throw new BadCredentialsException("String_Node_Str");
  }
  CustomerData customerData=customerService.getCustomerDataByExternalId(externalId);
  customerService.registerLogin(customerData,email,CustomerService.Source.HEROKU);
  return webappTokenProvider.createWebappToken(customerData.getCustomerId(),WebappCredentials.builder().externalId(externalId).customerName(customerData.getCustomerName()).email(email).source(customerData.getSource()).build());
}
Program: 91047
Project: 91047
Buggy source:
/** 
 * Save an uploaded   {@link CodeBasePublication} into the import area where it will be processed by another thread.
 * @param licenseKey          The agent's licenseKey.
 * @param codeBaseFingerprint Is the {@link CodeBaseFingerprint#getSha256()} value for the code base.
 * @param inputStream         The data input stream.
 * @return The resulting file or null of the code base was already uploaded.
 * @throws LicenseViolationException If invalid license or license violations
 */
File saveCodeBasePublication(String licenseKey,String codeBaseFingerprint,InputStream inputStream) throws LicenseViolationException, IOException ;

Fixed version (ground truth):
/** 
 * Save an uploaded   {@link CodeBasePublication} into the import area where it will be processed by another thread.
 * @param licenseKey          The agent's licenseKey.
 * @param codeBaseFingerprint Is the {@link CodeBaseFingerprint}'s SHA-256 value for the code base.
 * @param inputStream         The data input stream.
 * @return The resulting file or null of the code base was already uploaded.
 * @throws LicenseViolationException If invalid license or license violations
 */
File saveCodeBasePublication(String licenseKey,String codeBaseFingerprint,InputStream inputStream) throws LicenseViolationException, IOException ;
Program: 91048
Project: 91048
Buggy source:
/** 
 * Save an uploaded   {@link InvocationDataPublication} into the import area where it will be processed by another thread.
 * @param licenseKey          The agent's licenseKey.
 * @param codeBaseFingerprint Is the associated code base's {@link CodeBaseFingerprint#getSha256()} value.
 * @param inputStream         The data input stream.
 * @return The resulting file
 * @throws LicenseViolationException If invalid license or license violations
 */
File saveInvocationDataPublication(String licenseKey,String codeBaseFingerprint,InputStream inputStream) throws LicenseViolationException, IOException ;

Fixed version (ground truth):
/** 
 * Save an uploaded   {@link InvocationDataPublication} into the import area where it will be processed by another thread.
 * @param licenseKey          The agent's licenseKey.
 * @param codeBaseFingerprint Is the associated code base's {@link CodeBaseFingerprint}'s SHA-256 value.
 * @param inputStream         The data input stream.
 * @return The resulting file or null if the invocation data was already uploaded.
 * @throws LicenseViolationException If invalid license or license violations
 */
File saveInvocationDataPublication(String licenseKey,String codeBaseFingerprint,InputStream inputStream) throws LicenseViolationException, IOException ;
Program: 91050
Project: 91050
Buggy source:
@Inject public TestDataGenerator(ImportDAO importDao){
  this.importDao=importDao;
  Class[] testClasses={TestClass1.class,TestClass2.class};
  long localId=1;
  for (  Class testClass : testClasses) {
    for (    Method method : testClass.getDeclaredMethods()) {
      methods.add(new MethodDescriptor(localId,method));
      localId+=1;
    }
  }
}

Fixed version (ground truth):
@Inject public TestDataGenerator(ImportDAO importDao){
  this.importDao=importDao;
  Class[] testClasses={TestClass1.class,TestClass2.class};
  long localId=0;
  for (  Class testClass : testClasses) {
    for (    Method method : testClass.getDeclaredMethods()) {
      methods.add(new MethodDescriptor(localId,method));
      localId+=1;
    }
  }
}
Program: 91051
Project: 91051
Buggy source:
@Override public void processRow(ResultSet rs) throws SQLException {
  long id=rs.getLong("String_Node_Str");
  String signature=rs.getString("String_Node_Str");
  if (!queryState.isSameMethod(id)) {
    log.trace("String_Node_Str",id,signature);
    queryState.addTo(result);
    queryState=new QueryState(id);
  }
  queryState.countRow();
  long startedAt=rs.getTimestamp("String_Node_Str").getTime();
  long dumpedAt=rs.getTimestamp("String_Node_Str").getTime();
  long invokedAtMillis=rs.getLong("String_Node_Str");
  MethodDescriptor.MethodDescriptorBuilder builder=queryState.getBuilder();
  builder.occursInApplication(ApplicationId.of(rs.getString("String_Node_Str"),rs.getString("String_Node_Str")),ApplicationDescriptor.builder().startedAtMillis(startedAt).dumpedAtMillis(dumpedAt).invokedAtMillis(invokedAtMillis).status(SignatureStatus.valueOf(rs.getString("String_Node_Str"))).build()).collectedInEnvironment(rs.getString("String_Node_Str"),EnvironmentDescriptor.builder().hostName(rs.getString("String_Node_Str")).tags(splitOnCommaOrSemicolon(rs.getString("String_Node_Str"))).collectedSinceMillis(startedAt).collectedToMillis(dumpedAt).invokedAtMillis(invokedAtMillis).build()).declaringType(rs.getString("String_Node_Str")).modifiers(rs.getString("String_Node_Str")).packageName(rs.getString("String_Node_Str")).signature(signature).visibility(rs.getString("String_Node_Str"));
}

Fixed version (ground truth):
@Override public void processRow(ResultSet rs) throws SQLException {
  long id=rs.getLong("String_Node_Str");
  String signature=rs.getString("String_Node_Str");
  if (!queryState.isSameMethod(id)) {
    log.trace("String_Node_Str",id,signature);
    queryState.addTo(result);
    queryState=new QueryState(id);
  }
  queryState.countRow();
  long startedAt=rs.getTimestamp("String_Node_Str").getTime();
  long dumpedAt=rs.getTimestamp("String_Node_Str").getTime();
  long invokedAtMillis=rs.getLong("String_Node_Str");
  MethodDescriptor.MethodDescriptorBuilder builder=queryState.getBuilder();
  String appName=rs.getString("String_Node_Str");
  String appVersion=rs.getString("String_Node_Str");
  queryState.saveApplication(ApplicationDescriptor.builder().name(appName).version(appVersion).startedAtMillis(startedAt).dumpedAtMillis(dumpedAt).invokedAtMillis(invokedAtMillis).status(SignatureStatus.valueOf(rs.getString("String_Node_Str"))).build());
  queryState.saveEnvironment(EnvironmentDescriptor.builder().name(rs.getString("String_Node_Str")).hostName(rs.getString("String_Node_Str")).tags(splitOnCommaOrSemicolon(rs.getString("String_Node_Str"))).collectedSinceMillis(startedAt).collectedToMillis(dumpedAt).invokedAtMillis(invokedAtMillis).build());
  builder.declaringType(rs.getString("String_Node_Str")).modifiers(rs.getString("String_Node_Str")).packageName(rs.getString("String_Node_Str")).signature(signature).visibility(rs.getString("String_Node_Str"));
}
Program: 91052
Project: 91052
Buggy source:
private Collection<String> splitOnCommaOrSemicolon(String tags){
  String[] strings=tags.split("String_Node_Str");
  return Arrays.asList(strings);
}

Fixed version (ground truth):
private Set<String> splitOnCommaOrSemicolon(String tags){
  return new HashSet<>(Arrays.asList(tags.split("String_Node_Str")));
}
Program: 91053
Project: 91053
Buggy source:
void addTo(List<MethodDescriptor> result){
  if (builder != null) {
    log.debug("String_Node_Str",methodId,rows);
    result.add(builder.build());
  }
}

Fixed version (ground truth):
void addTo(List<MethodDescriptor> result){
  if (builder != null) {
    log.debug("String_Node_Str",methodId,rows);
    builder.occursInApplications(new TreeSet<>(applications.values()));
    builder.collectedInEnvironments(new TreeSet<>(environments.values()));
    result.add(builder.build());
  }
}
Program: 91054
Project: 91054
Buggy source:
public static ApplicationId of(String name,String version){
  return new ApplicationId(name,version);
}

Fixed version (ground truth):
public static ApplicationId of(ApplicationDescriptor applicationDescriptor){
  return new ApplicationId(applicationDescriptor.getName(),applicationDescriptor.getVersion());
}
Program: 91055
Project: 91055
Buggy source:
/** 
 * Maximum value of occursInApplications.getDumpedAtMillis
 */
public long getCollectedToMillis(){
  return occursInApplications.values().stream().map(ApplicationDescriptor::getDumpedAtMillis).reduce(Math::max).orElse(0L);
}

Fixed version (ground truth):
/** 
 * Maximum value of occursInApplications.getDumpedAtMillis
 */
public long getCollectedToMillis(){
  return occursInApplications.stream().map(ApplicationDescriptor::getDumpedAtMillis).reduce(Math::max).orElse(0L);
}
Program: 91056
Project: 91056
Buggy source:
/** 
 * Minimum value of occursInApplications.startedAtMillis
 */
public long getCollectedSinceMillis(){
  return occursInApplications.values().stream().map(ApplicationDescriptor::getStartedAtMillis).reduce(Math::min).orElse(0L);
}

Fixed version (ground truth):
/** 
 * Minimum value of occursInApplications.startedAtMillis
 */
public long getCollectedSinceMillis(){
  return occursInApplications.stream().map(ApplicationDescriptor::getStartedAtMillis).reduce(Math::min).orElse(0L);
}
Program: 91057
Project: 91057
Buggy source:
/** 
 * Maximum value of occursInApplications.invokedAtMillis;
 */
public long getLastInvokedAtMillis(){
  return occursInApplications.values().stream().map(ApplicationDescriptor::getInvokedAtMillis).reduce(Math::max).orElse(0L);
}

Fixed version (ground truth):
/** 
 * Maximum value of occursInApplications.invokedAtMillis;
 */
public long getLastInvokedAtMillis(){
  return occursInApplications.stream().map(ApplicationDescriptor::getInvokedAtMillis).reduce(Math::max).orElse(0L);
}
Program: 91058
Project: 91058
Buggy source:
@Override protected void doStoreNormalizedSignature(JvmState jvmState,String normalizedSignature,long invokedAtMillis,SignatureConfidence confidence){
  invocationsCollector.put(jvmState.getJvm().getJvmUuid(),jvmState.getJvm().getStartedAtMillis(),normalizedSignature,invokedAtMillis,confidence);
}

Fixed version (ground truth):
@Override protected void doStoreNormalizedSignature(JvmState jvmState,String normalizedSignature,long invokedAtMillis,SignatureStatus status){
  invocationsCollector.put(jvmState.getJvm().getJvmUuid(),jvmState.getJvm().getStartedAtMillis(),normalizedSignature,invokedAtMillis,status);
}
Program: 91059
Project: 91059
Buggy source:
@Transactional public void put(String jvmUuid,long jvmStartedAtMillis,String signature,long invokedAtMillis,SignatureConfidence confidence){
  if (jvmUuid == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (jvmStartedAtMillis <= 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (signature == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (invokedAtMillis < 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (confidence == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (invokedAtMillis > 0 && invokedAtMillis < jvmStartedAtMillis) {
    log.debug("String_Node_Str",invokedAtMillis,jvmStartedAtMillis);
    return;
  }
  int count=jdbcTemplate.queryForObject("String_Node_Str" + "String_Node_Str",Integer.class,jvmUuid,signature,invokedAtMillis);
  if (count == 0) {
    long millisSinceJvmStart=invokedAtMillis == 0L ? 0L : invokedAtMillis - jvmStartedAtMillis;
    jdbcTemplate.update("String_Node_Str" + "String_Node_Str",jvmUuid,signature,invokedAtMillis,millisSinceJvmStart,confidence.ordinal());
  }
}

Fixed version (ground truth):
@Transactional public void put(String jvmUuid,long jvmStartedAtMillis,String signature,long invokedAtMillis,SignatureStatus status){
  if (jvmUuid == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (jvmStartedAtMillis <= 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (signature == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (invokedAtMillis < 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (status == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (invokedAtMillis > 0 && invokedAtMillis < jvmStartedAtMillis) {
    log.debug("String_Node_Str",invokedAtMillis,jvmStartedAtMillis);
    return;
  }
  int count=jdbcTemplate.queryForObject("String_Node_Str" + "String_Node_Str",Integer.class,jvmUuid,signature,invokedAtMillis);
  if (count == 0) {
    long millisSinceJvmStart=invokedAtMillis == 0L ? 0L : invokedAtMillis - jvmStartedAtMillis;
    jdbcTemplate.update("String_Node_Str" + "String_Node_Str",jvmUuid,signature,invokedAtMillis,millisSinceJvmStart,status.ordinal());
  }
}
Program: 91060
Project: 91060
Buggy source:
/** 
 * Retrieve the number of collectors for a certain application name.
 */
int getNumCollectors(long organisationId,String appName);

Fixed version (ground truth):
/** 
 * Retrieve the number of collectors for a certain application name/version.
 */
int getNumCollectors(long organisationId,String appName,String appVersion);
Program: 91061
Project: 91061
Buggy source:
@Override public int getNumCollectors(long organisationId,String appName){
  return jdbcTemplate.queryForObject("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",Integer.class,organisationId,appName);
}

Fixed version (ground truth):
@Override public int getNumCollectors(long organisationId,String appName,String appVersion){
  return jdbcTemplate.queryForObject("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",Integer.class,organisationId,appName,appVersion);
}