nus-yam/ex-repair huggingface dataset:
Program: 34795
Project: 34795
Buggy source:
@Override public void run(){
  try {
    Thread.sleep(4000L);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
  Minecraft mc=Minecraft.getMinecraft();
synchronized (mc) {
    Field[] fields=Minecraft.class.getDeclaredFields();
    for (int a=0; a < fields.length; a++) {
      if (MusicTicker.class.isAssignableFrom(fields[a].getType())) {
        fields[a].setAccessible(true);
        try {
          fields[a].set(mc,new CustomMusicTicker(mc));
          DragonUtil.info("String_Node_Str");
        }
 catch (        Exception ex) {
          ex.printStackTrace();
          DragonUtil.severe("String_Node_Str");
          return;
        }
        break;
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    Thread.sleep(4000L);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
  Minecraft mc=Minecraft.getMinecraft();
synchronized (mc) {
    Field[] fields=Minecraft.class.getDeclaredFields();
    for (int a=0; a < fields.length; a++) {
      if (MusicTicker.class.isAssignableFrom(fields[a].getType())) {
        fields[a].setAccessible(true);
        try {
          fields[a].set(mc,CustomMusicTicker.getInstance());
          DragonUtil.info("String_Node_Str");
        }
 catch (        Exception ex) {
          ex.printStackTrace();
          DragonUtil.severe("String_Node_Str");
          return;
        }
        break;
      }
    }
  }
}
Program: 34798
Project: 34798
Buggy source:
protected ComponentScatteredFeatureIsland(Random rand,int x,int z){
  super(rand,x,20,z,224,160,224);
  this.startX=x;
  this.startZ=z;
  coordBaseMode=0;
  boundingBox=new StructureBoundingBox(x,20,z,x + sizeX - 1,160 + sizeY - 1,z + sizeZ - 1);
}

Fixed version (ground truth):
protected ComponentScatteredFeatureIsland(Random rand,int x,int z){
  super(rand,x,20,z,208,160,208);
  this.startX=x;
  this.startZ=z;
  coordBaseMode=0;
  boundingBox=new StructureBoundingBox(x,20,z,x + sizeX - 1,160 + sizeY - 1,z + sizeZ - 1);
}
Program: 34799
Project: 34799
Buggy source:
public MapGenIsland(){
  super(16,25,1600,224);
}

Fixed version (ground truth):
public MapGenIsland(){
  super(16,25,1600,208);
}
Program: 34800
Project: 34800
Buggy source:
public Block getBlock(int xInChunk,int yInChunk,int zInChunk){
  if (xInChunk < 0 || xInChunk >= 16 || yInChunk < 0 || yInChunk >= ySize || zInChunk < 0 || zInChunk >= 16) {
    Thread.dumpStack();
    DragonUtil.warning("String_Node_Str",xInChunk,yInChunk,zInChunk);
    return Blocks.air;
  }
  Block block=storedBlocks[yInChunk * 256 + xInChunk * 16 + zInChunk];
  return block == null ? Blocks.air : block;
}

Fixed version (ground truth):
public Block getBlock(int xInChunk,int yInChunk,int zInChunk){
  if (xInChunk < 0 || xInChunk >= 16 || yInChunk < 0 || yInChunk >= ySize || zInChunk < 0 || zInChunk >= 16) {
    DragonUtil.warning("String_Node_Str",xInChunk,yInChunk,zInChunk);
    return Blocks.air;
  }
  Block block=storedBlocks[yInChunk * 256 + xInChunk * 16 + zInChunk];
  return block == null ? Blocks.air : block;
}
Program: 34801
Project: 34801
Buggy source:
/** 
 * Returns the execution plan, read from the given file path.
 * @param testCaseFolderName    testCaseFolderName Name of the folder created under /artifacts/CEP for the particular test case.
 * @param executionPlanFileName Execution plan file name, relative to the test artifacts folder.
 * @return execution plan as a string.
 * @throws Exception
 */
protected String getExecutionPlanFromFile(String testCaseFolderName,String executionPlanFileName) throws Exception {
  String relativeFilePath=getTestArtifactLocation() + CEPIntegrationTestConstants.RELATIVE_PATH_TO_TEST_ARTIFACTS + testCaseFolderName+ "String_Node_Str"+ executionPlanFileName;
  relativeFilePath=relativeFilePath.replaceAll("String_Node_Str",Matcher.quoteReplacement(File.separator));
  return ConfigurationUtil.readFile(relativeFilePath);
}

Fixed version (ground truth):
/** 
 * Returns the execution plan, read from the given file path.
 * @param testCaseFolderName    testCaseFolderName Name of the folder created under /artifacts/CEP for theparticular test case.
 * @param executionPlanFileName Execution plan file name, relative to the test artifacts folder.
 * @return execution plan as a string.
 * @throws Exception
 */
protected String getExecutionPlanFromFile(String testCaseFolderName,String executionPlanFileName) throws Exception {
  String relativeFilePath=getTestArtifactLocation() + CEPIntegrationTestConstants.RELATIVE_PATH_TO_TEST_ARTIFACTS + testCaseFolderName+ "String_Node_Str"+ executionPlanFileName;
  relativeFilePath=relativeFilePath.replaceAll("String_Node_Str",Matcher.quoteReplacement(File.separator));
  return ConfigurationUtil.readFile(relativeFilePath);
}
Program: 34802
Project: 34802
Buggy source:
/** 
 * @param testCaseFolderName testCaseFolderName Name of the folder created under /artifacts/CEP for the particular test case.
 * @param configFileName     Name of the JSON config-file created under above folder.
 * @return The above JSON-configuration, as a string
 * @throws Exception
 */
protected String getJSONArtifactConfiguration(String testCaseFolderName,String configFileName) throws Exception {
  String relativeFilePath=getTestArtifactLocation() + CEPIntegrationTestConstants.RELATIVE_PATH_TO_TEST_ARTIFACTS + testCaseFolderName+ "String_Node_Str"+ configFileName;
  relativeFilePath=relativeFilePath.replaceAll("String_Node_Str",Matcher.quoteReplacement(File.separator));
  JSONParser jsonParser=new JSONParser();
  return jsonParser.parse(new FileReader(relativeFilePath)).toString();
}

Fixed version (ground truth):
/** 
 * @param testCaseFolderName testCaseFolderName Name of the folder created under /artifacts/CEP for theparticular test case.
 * @param configFileName     Name of the JSON config-file created under above folder.
 * @return The above JSON-configuration, as a string
 * @throws Exception
 */
protected String getJSONArtifactConfiguration(String testCaseFolderName,String configFileName) throws Exception {
  String relativeFilePath=getTestArtifactLocation() + CEPIntegrationTestConstants.RELATIVE_PATH_TO_TEST_ARTIFACTS + testCaseFolderName+ "String_Node_Str"+ configFileName;
  relativeFilePath=relativeFilePath.replaceAll("String_Node_Str",Matcher.quoteReplacement(File.separator));
  JSONParser jsonParser=new JSONParser();
  return jsonParser.parse(new FileReader(relativeFilePath)).toString();
}
Program: 34805
Project: 34805
Buggy source:
public void setCoordsPoly(Coordinate[] coords){
  StringBuilder sb=new StringBuilder("String_Node_Str");
  for (int i=0; i < coords.length; i++) {
    if (i != 0) {
      sb.append("String_Node_Str");
    }
    sb.append("String_Node_Str").append(coords[i].x).append("String_Node_Str").append(coords[i].y).append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  coordinates=sb.toString();
}

Fixed version (ground truth):
public void setCoordsPoly(Coordinate[] coords){
  StringBuilder sb=new StringBuilder();
  if (coords.length != 0) {
    sb.append("String_Node_Str");
    for (int i=0; i < coords.length; i++) {
      if (i != 0) {
        sb.append("String_Node_Str");
      }
      sb.append("String_Node_Str").append(coords[i].x).append("String_Node_Str").append(coords[i].y).append("String_Node_Str");
    }
    sb.append("String_Node_Str");
  }
 else {
    sb.append("String_Node_Str");
  }
  coordinates=sb.toString();
}
Program: 34806
Project: 34806
Buggy source:
@Test(groups={"String_Node_Str"},description="String_Node_Str") public void testGetAllEventStreamInfoDto(){
  String samplePath="String_Node_Str" + File.separator + "String_Node_Str";
  try {
    String streamDefinitionAsString=getJSONArtifactConfiguration(samplePath,"String_Node_Str");
    eventStreamManagerAdminServiceClient.addEventStreamAsString(streamDefinitionAsString);
    StreamDefinitionInfoDto[] allEventStreamInfoDto=eventSimulatorAdminServiceClient.getAllEventStreamInfoDto();
    Assert.assertEquals(allEventStreamInfoDto.length,1);
    Assert.assertEquals(allEventStreamInfoDto[0].getStreamName(),"String_Node_Str");
    Assert.assertEquals(allEventStreamInfoDto[0].getStreamVersion(),"String_Node_Str");
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Test(groups={"String_Node_Str"},description="String_Node_Str") public void testGetAllEventStreamInfoDto(){
  String samplePath="String_Node_Str" + File.separator + "String_Node_Str";
  try {
    String streamDefinitionAsString=getJSONArtifactConfiguration(samplePath,"String_Node_Str");
    eventStreamManagerAdminServiceClient.addEventStreamAsString(streamDefinitionAsString);
    StreamDefinitionInfoDto[] allEventStreamInfoDto=eventSimulatorAdminServiceClient.getAllEventStreamInfoDto();
    Assert.assertEquals(allEventStreamInfoDto.length,1);
    Assert.assertEquals(allEventStreamInfoDto[0].getStreamName(),"String_Node_Str");
    Assert.assertEquals(allEventStreamInfoDto[0].getStreamVersion(),"String_Node_Str");
    eventStreamManagerAdminServiceClient.removeEventStream("String_Node_Str","String_Node_Str");
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 34807
Project: 34807
Buggy source:
@Override protected void process(ComplexEventChunk<StreamEvent> streamEventChunk,Processor nextProcessor,StreamEventCloner streamEventCloner){
  while (streamEventChunk.hasNext()) {
    StreamEvent streamEvent=streamEventChunk.next();
    String eventId=(String)streamEvent.getOutputData()[variablePosition];
    if (eventsBuffer.containsKey(eventId)) {
      eventsBuffer.get(eventId).add(streamEvent);
      if (eventsBuffer.get(eventId).size() == getDeployedExecutionPlansCount()) {
        ComplexEventChunk fusedEvent=eventsFuser(streamEvent);
        nextProcessor.process(fusedEvent);
        eventsBuffer.remove(eventId);
      }
    }
 else     if (getDeployedExecutionPlansCount().equals(1)) {
      nextProcessor.process(streamEventChunk);
    }
 else {
      ArrayList<StreamEvent> buffer=new ArrayList<StreamEvent>();
      buffer.add(streamEvent);
      eventsBuffer.put(eventId,buffer);
    }
  }
}

Fixed version (ground truth):
@Override protected void process(ComplexEventChunk<StreamEvent> streamEventChunk,Processor nextProcessor,StreamEventCloner streamEventCloner){
  while (streamEventChunk.hasNext()) {
    StreamEvent streamEvent=streamEventChunk.next();
    String eventId=(String)streamEvent.getOutputData()[variablePosition];
    if (eventsBuffer.containsKey(eventId)) {
      eventsBuffer.get(eventId).add(streamEvent);
      if (eventsBuffer.get(eventId).size() == getDeployedExecutionPlansCount()) {
        fuseEvent(streamEvent);
        eventsBuffer.remove(eventId);
      }
 else {
        streamEventChunk.remove();
      }
    }
 else     if (getDeployedExecutionPlansCount().equals(1)) {
      nextProcessor.process(streamEventChunk);
    }
 else {
      ArrayList<StreamEvent> buffer=new ArrayList<StreamEvent>();
      buffer.add(streamEvent);
      eventsBuffer.put(eventId,buffer);
      streamEventChunk.remove();
    }
  }
  nextProcessor.process(streamEventChunk);
}
Program: 34808
Project: 34808
Buggy source:
private void measureThroughput(List<Event> eventList){
  String threadName=Thread.currentThread().getName();
  long receivedTimeNanos=System.nanoTime();
  long producerIndex=0;
  long timeStampNanos=0;
  for (  Event event : eventList) {
    long currentTotal=totalEventCount++;
    long currentGroupCount=groupCount++;
    producerIndex=(Long)event.getMetaData()[1];
    if (groupCount >= groupSize) {
      double elapsedTimeInSec=(receivedTimeNanos - groupStartTimeNanos) / 1000000000D;
      double totalElapsedTimeInSec=(receivedTimeNanos - totalStartTimeNanos) / 1000000000D;
      double totalThroughput=totalEventCount / totalElapsedTimeInSec;
      double throughput=groupCount / elapsedTimeInSec;
      log.info("String_Node_Str" + threadName + "String_Node_Str"+ totalElapsedTimeInSec+ "String_Node_Str"+ currentGroupCount+ "String_Node_Str"+ groupStartIndex+ "String_Node_Str"+ producerIndex+ "String_Node_Str"+ throughput+ "String_Node_Str"+ currentTotal+ "String_Node_Str"+ totalThroughput+ "String_Node_Str");
      groupStartTimeNanos=System.nanoTime();
      groupStartIndex=producerIndex;
      groupCount=0;
    }
  }
}

Fixed version (ground truth):
private void measureThroughput(List<Event> eventList){
  String threadName=Thread.currentThread().getName();
  long receivedTimeNanos=System.nanoTime();
  long producerIndex=0;
  long timeStampNanos=0;
  for (  Event event : eventList) {
    long currentTotal=totalEventCount++;
    long currentGroupCount=groupCount++;
    producerIndex=(Long)event.getMetaData()[1];
    if (groupCount >= receiverGroupSize) {
      double elapsedTimeInSec=(receivedTimeNanos - groupStartTimeNanos) / 1000000000D;
      double totalElapsedTimeInSec=(receivedTimeNanos - totalStartTimeNanos) / 1000000000D;
      double totalThroughput=totalEventCount / totalElapsedTimeInSec;
      double throughput=groupCount / elapsedTimeInSec;
      log.info("String_Node_Str" + threadName + "String_Node_Str"+ totalElapsedTimeInSec+ "String_Node_Str"+ currentGroupCount+ "String_Node_Str"+ groupStartIndex+ "String_Node_Str"+ producerIndex+ "String_Node_Str"+ throughput+ "String_Node_Str"+ currentTotal+ "String_Node_Str"+ totalThroughput+ "String_Node_Str");
      groupStartTimeNanos=System.nanoTime();
      groupStartIndex=producerIndex;
      groupCount=0;
    }
  }
}
Program: 34809
Project: 34809
Buggy source:
public static void main(String[] args) throws DataBridgeException {
  if (args.length > 0) {
    totalEvents=Long.valueOf(args[0]);
  }
  if (args.length > 1) {
    groupSize=Integer.valueOf(args[1]);
  }
  if (args.length > 2) {
    warmUpThreshold=Integer.valueOf(args[2]);
  }
  if (args.length > 3) {
    sleepAfterWarmUpMillis=Long.valueOf(args[3]);
  }
  ThriftReceiver thriftReceiver=perfTestClient.new ThriftReceiver();
  thriftReceiver.setReceiverPort(7661);
  ThriftPublisher thriftPublisher=perfTestClient.new ThriftPublisher();
  Thread testServerThread=new Thread(thriftReceiver);
  Thread publisherClient=new Thread(thriftPublisher);
synchronized (perfTestClient) {
    try {
      testServerThread.start();
      Thread.sleep(2000);
      publisherClient.start();
      perfTestClient.wait();
      thriftReceiver.stop();
    }
 catch (    InterruptedException ignored) {
      System.out.println("String_Node_Str" + ignored.getMessage());
    }
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws DataBridgeException {
  if (args.length > 0) {
    totalEvents=Long.valueOf(args[0]);
  }
  if (args.length > 1) {
    receiverGroupSize=Integer.valueOf(args[1]);
  }
  if (args.length > 2) {
    warmUpThreshold=Integer.valueOf(args[2]);
  }
  if (args.length > 3) {
    sleepAfterWarmUpMillis=Long.valueOf(args[3]);
  }
  ThriftReceiver thriftReceiver=perfTestClient.new ThriftReceiver();
  thriftReceiver.setReceiverPort(7661);
  ThriftPublisher thriftPublisher=perfTestClient.new ThriftPublisher();
  Thread testServerThread=new Thread(thriftReceiver);
  Thread publisherClient=new Thread(thriftPublisher);
synchronized (perfTestClient) {
    try {
      testServerThread.start();
      Thread.sleep(2000);
      publisherClient.start();
      perfTestClient.wait();
      thriftReceiver.stop();
    }
 catch (    InterruptedException ignored) {
      System.out.println("String_Node_Str" + ignored.getMessage());
    }
  }
}
Program: 34811
Project: 34811
Buggy source:
private void measureThroughput(List<Event> eventList){
  String threadName=Thread.currentThread().getName();
  long receivedTimeNanos=System.nanoTime();
  long producerIndex=0;
  long timeStampNanos=0;
  if (continuityCheckEnabled && !isEventsContinuous(eventList)) {
    log.warn("String_Node_Str");
  }
  for (  Event event : eventList) {
    long currentTotal=totalEventCount.incrementAndGet();
    long currentGroupCount=groupCount.incrementAndGet();
    producerIndex=(Long)event.getMetaData()[1];
    timeStampNanos=(Long)event.getMetaData()[3];
    log.trace("String_Node_Str" + threadName + "String_Node_Str"+ producerIndex+ "String_Node_Str"+ timeStampNanos+ "String_Node_Str"+ Arrays.toString(event.getPayloadData()));
    if (groupCount.compareAndSet(groupSize,0)) {
      double elapsedTimeInSec=(receivedTimeNanos - groupStartTimeNanos) / 1000000000D;
      double totalElapsedTimeInSec=(receivedTimeNanos - totalStartTimeNanos) / 1000000000D;
      double totalThroughput=totalEventCount.get() / totalElapsedTimeInSec;
      double throughput=currentGroupCount / elapsedTimeInSec;
      log.info("String_Node_Str" + threadName + "String_Node_Str"+ totalElapsedTimeInSec+ "String_Node_Str"+ currentGroupCount+ "String_Node_Str"+ groupStartIndex+ "String_Node_Str"+ producerIndex+ "String_Node_Str"+ throughput+ "String_Node_Str"+ currentTotal+ "String_Node_Str"+ totalThroughput+ "String_Node_Str");
      groupStartTimeNanos=System.nanoTime();
      groupStartIndex=producerIndex;
    }
  }
}

Fixed version (ground truth):
private void measureThroughput(List<Event> eventList){
  String threadName=Thread.currentThread().getName();
  long receivedTimeNanos=System.nanoTime();
  long producerIndex=0;
  long timeStampNanos=0;
  if (continuityCheckEnabled && !isEventsContinuous(eventList)) {
    log.warn("String_Node_Str");
  }
  for (  Event event : eventList) {
    long currentTotal=totalEventCount.incrementAndGet();
    long currentGroupCount=groupCount.incrementAndGet();
    producerIndex=(Long)event.getMetaData()[1];
    timeStampNanos=(Long)event.getMetaData()[3];
    log.trace("String_Node_Str" + threadName + "String_Node_Str"+ producerIndex+ "String_Node_Str"+ timeStampNanos+ "String_Node_Str"+ Arrays.toString(event.getPayloadData()));
    if (groupCount.compareAndSet(receiverGroupSize,0)) {
      double elapsedTimeInSec=(receivedTimeNanos - groupStartTimeNanos) / 1000000000D;
      double totalElapsedTimeInSec=(receivedTimeNanos - totalStartTimeNanos) / 1000000000D;
      double totalThroughput=totalEventCount.get() / totalElapsedTimeInSec;
      double throughput=currentGroupCount / elapsedTimeInSec;
      log.info("String_Node_Str" + threadName + "String_Node_Str"+ totalElapsedTimeInSec+ "String_Node_Str"+ currentGroupCount+ "String_Node_Str"+ groupStartIndex+ "String_Node_Str"+ producerIndex+ "String_Node_Str"+ throughput+ "String_Node_Str"+ currentTotal+ "String_Node_Str"+ totalThroughput+ "String_Node_Str");
      groupStartTimeNanos=System.nanoTime();
      groupStartIndex=producerIndex;
    }
  }
}
Program: 34812
Project: 34812
Buggy source:
public static void main(String[] args) throws DataBridgeException {
  if (args.length == 0) {
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
  }
  if (args.length > 0) {
    totalEvents=Long.valueOf(args[0]);
    if (totalEvents <= 0) {
      longRunningMode=true;
    }
  }
  if (args.length > 1) {
    groupSize=Integer.valueOf(args[1]);
  }
  if (args.length > 2) {
    warmUpThreshold=Integer.valueOf(args[2]);
  }
  if (args.length > 3) {
    sleepAfterWarmUpMillis=Long.valueOf(args[3]);
  }
  ThriftReceiver thriftReceiver=perfTestClient.new ThriftReceiver();
  thriftReceiver.setReceiverPort(7661);
  ThriftPublisher thriftPublisher=perfTestClient.new ThriftPublisher();
  Thread testServerThread=new Thread(thriftReceiver);
  Thread publisherClient=new Thread(thriftPublisher);
synchronized (perfTestClient) {
    try {
      testServerThread.start();
      Thread.sleep(2000);
      publisherClient.start();
      perfTestClient.wait();
      thriftReceiver.stop();
    }
 catch (    InterruptedException ignored) {
      System.out.println("String_Node_Str" + ignored.getMessage());
    }
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws DataBridgeException {
  if (args.length == 0) {
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
  }
  if (args.length > 0) {
    totalEvents=Long.valueOf(args[0]);
    if (totalEvents <= 0) {
      longRunningMode=true;
    }
  }
  if (args.length > 1) {
    receiverGroupSize=Integer.valueOf(args[1]);
  }
  if (args.length > 2) {
    warmUpThreshold=Integer.valueOf(args[2]);
  }
  if (args.length > 3) {
    sleepAfterWarmUpMillis=Long.valueOf(args[3]);
  }
  ThriftReceiver thriftReceiver=null;
  Thread testServerThread=null;
  if (receiverOnSameJvm) {
    thriftReceiver=perfTestClient.new ThriftReceiver();
    thriftReceiver.setReceiverPort(7661);
    testServerThread=new Thread(thriftReceiver);
  }
  ThriftPublisher thriftPublisher=perfTestClient.new ThriftPublisher();
  Thread publisherClient=new Thread(thriftPublisher);
synchronized (perfTestClient) {
    try {
      if (testServerThread != null) {
        testServerThread.start();
        Thread.sleep(2000);
      }
      publisherClient.start();
      perfTestClient.wait();
      if (thriftReceiver != null) {
        thriftReceiver.stop();
      }
    }
 catch (    InterruptedException e) {
      System.out.println("String_Node_Str" + e.getMessage());
    }
  }
}
Program: 34814
Project: 34814
Buggy source:
/** 
 * Animates the ActionButton onto the screen so that the user may interact. Animation occurs from the bottom of the screen, moving up until it reaches the appropriate distance from the bottom.
 */
public void show(){
  final Activity activity=(Activity)getContext();
  FrameLayout.LayoutParams params=new FrameLayout.LayoutParams(toDp(activity,width),toDp(activity,height));
  this.setLayoutParams(params);
  FrameLayout parent=(FrameLayout)activity.findViewById(android.R.id.content);
  parent.addView(this);
  Display display=activity.getWindowManager().getDefaultDisplay();
  Point size=new Point();
  display.getSize(size);
  float screenWidth=size.x;
  float screenHeight=size.y;
  setTranslationX(screenWidth - toDp(activity,distanceFromRight));
  ObjectAnimator animator=ObjectAnimator.ofFloat(this,View.Y,screenHeight,screenHeight - toDp(activity,distanceFromBottom) - toDp(activity,DEFAULT_HEIGHT));
  animator.setInterpolator(new DecelerateInterpolator());
  animator.setDuration(DEFAULT_ANIMATION_TIME);
  animator.start();
  isShowing=true;
}

Fixed version (ground truth):
/** 
 * Animates the ActionButton onto the screen so that the user may interact. Animation occurs from the bottom of the screen, moving up until it reaches the appropriate distance from the bottom.
 */
public void show(){
  final Activity activity=(Activity)getContext();
  ViewGroup.LayoutParams params=new FrameLayout.LayoutParams(toDp(activity,width),toDp(activity,height));
  this.setLayoutParams(params);
  FrameLayout parent=(FrameLayout)activity.findViewById(android.R.id.content);
  parent.addView(this);
  Display display=activity.getWindowManager().getDefaultDisplay();
  Point size=new Point();
  display.getSize(size);
  float screenWidth=size.x;
  float screenHeight=size.y;
  setTranslationX(screenWidth - toDp(activity,distanceFromRight));
  ObjectAnimator animator=ObjectAnimator.ofFloat(this,View.Y,screenHeight,screenHeight - toDp(activity,distanceFromBottom) - toDp(activity,distanceFromBottom));
  animator.setInterpolator(new DecelerateInterpolator());
  animator.setDuration(DEFAULT_ANIMATION_TIME);
  animator.start();
  isShowing=true;
}
Program: 34816
Project: 34816
Buggy source:
protected TopScoreDocCollector doSearchWithCeiling(final AbstractSearchRequest request,final IndexSearcher indexSearcher,final Query query) throws IOException {
  int topHitCount=getTopDocsCollectorHitNum(request,AbstractSearchRequest.UNDEFINED);
  if (AbstractSearchRequest.UNDEFINED != topHitCount) {
    final TopScoreDocCollector hits=TopScoreDocCollector.create(topHitCount);
    indexSearcher.search(query,hits);
    return hits;
  }
 else {
    topHitCount=1000;
    TopScoreDocCollector hits=TopScoreDocCollector.create(topHitCount);
    indexSearcher.search(query,hits);
    if (topHitCount < hits.getTotalHits()) {
      topHitCount=hits.getTotalHits();
      if (getLogger().isDebugEnabled()) {
        getLogger().debug("String_Node_Str" + topHitCount + "String_Node_Str");
      }
      hits=TopScoreDocCollector.create(topHitCount);
      indexSearcher.search(query,hits);
    }
    return hits;
  }
}

Fixed version (ground truth):
protected TopScoreDocCollector doSearchWithCeiling(final AbstractSearchRequest request,final IndexSearcher indexSearcher,final Query query) throws IOException {
  int topHitCount=getTopDocsCollectorHitNum(request,AbstractSearchRequest.UNDEFINED);
  if (AbstractSearchRequest.UNDEFINED != topHitCount) {
    final TopScoreDocCollector hits=TopScoreDocCollector.create(topHitCount);
    indexSearcher.search(query,hits);
    return hits;
  }
 else {
    topHitCount=1000;
    TopScoreDocCollector hits=TopScoreDocCollector.create(topHitCount);
    indexSearcher.search(query,hits);
    if (topHitCount < hits.getTotalHits()) {
      topHitCount=hits.getTotalHits();
      if (getLogger().isDebugEnabled()) {
        getLogger().debug("String_Node_Str" + topHitCount + "String_Node_Str"+ "String_Node_Str");
      }
      hits=TopScoreDocCollector.create(topHitCount);
      indexSearcher.search(query,hits);
    }
    return hits;
  }
}
Program: 34817
Project: 34817
Buggy source:
private void printStats(final long startTimeInMillis){
  long t=System.currentTimeMillis() - startTimeInMillis;
  long s=t / 1000L;
  if (t > 60 * 1000) {
    long m=t / 1000L / 60L;
    System.err.printf("String_Node_Str",m,s - (m * 60));
  }
 else {
    System.err.printf("String_Node_Str",s);
  }
  Runtime r=Runtime.getRuntime();
  System.err.printf("String_Node_Str",(r.totalMemory() - r.freeMemory()) / MB,r.totalMemory() / MB);
}

Fixed version (ground truth):
private void printStats(final long startTimeInMillis){
  long t=System.currentTimeMillis() - startTimeInMillis;
  long s=TimeUnit.MILLISECONDS.toSeconds(t);
  if (t > TimeUnit.MINUTES.toMillis(1)) {
    long m=TimeUnit.MILLISECONDS.toMinutes(t);
    System.err.printf("String_Node_Str",m,s - (m * 60));
  }
 else {
    System.err.printf("String_Node_Str",s);
  }
  Runtime r=Runtime.getRuntime();
  System.err.printf("String_Node_Str",(r.totalMemory() - r.freeMemory()) / MB,r.totalMemory() / MB);
}
Program: 34818
Project: 34818
Buggy source:
@Override public String toString(){
  return new StringBuilder().append(groupKey).append("String_Node_Str").append(artifactInfos.toString()).toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return groupKey + "String_Node_Str" + artifactInfos;
}
Program: 34819
Project: 34819
Buggy source:
/** 
 * Pack a context into a target directory. If the directory does not exists, it will be created. If the directory exists, it should be writable.
 * @param context the context to pack-up
 * @param targetDir the directory where to write results, has to be non-null
 * @throws IllegalArgumentException when the targetDir already exists and is not a writable directory.
 * @throws IOException on lethal IO problem
 */
void packIndex(IndexPackingRequest request) throws IOException, IllegalArgumentException ;

Fixed version (ground truth):
/** 
 * Pack a context into a target directory. If the directory does not exists, it will be created. If the directory exists, it should be writable.
 * @param request the request to process.
 * @throws IllegalArgumentException when the targetDir already exists and is not a writable directory.
 * @throws IOException on lethal IO problem
 */
void packIndex(IndexPackingRequest request) throws IOException, IllegalArgumentException ;
Program: 34820
Project: 34820
Buggy source:
public long readHeader() throws IOException {
  final byte HDRBYTE=(byte)((IndexDataWriter.VERSION << 24) >> 24);
  if (HDRBYTE != dis.readByte()) {
    throw new IOException("String_Node_Str");
  }
  return dis.readLong();
}

Fixed version (ground truth):
public long readHeader() throws IOException {
  final byte hdrbyte=(byte)((IndexDataWriter.VERSION << 24) >> 24);
  if (hdrbyte != dis.readByte()) {
    throw new IOException("String_Node_Str");
  }
  return dis.readLong();
}
Program: 34823
Project: 34823
Buggy source:
public ArtifactContext getArtifactContext(IndexingContext context,File file);

Fixed version (ground truth):
ArtifactContext getArtifactContext(IndexingContext context,File file);
Program: 34824
Project: 34824
Buggy source:
private static int readerIndex(int n,int[] starts,int numSubReaders){
  int lo=0;
  int hi=numSubReaders - 1;
  while (hi >= lo) {
    int mid=(lo + hi) >>> 1;
    int midValue=starts[mid];
    if (n < midValue)     hi=mid - 1;
 else     if (n > midValue)     lo=mid + 1;
 else {
      while (mid + 1 < numSubReaders && starts[mid + 1] == midValue) {
        mid++;
      }
      return mid;
    }
  }
  return hi;
}

Fixed version (ground truth):
private static int readerIndex(int n,int[] starts,int numSubReaders){
  int lo=0;
  int hi=numSubReaders - 1;
  while (hi >= lo) {
    int mid=(lo + hi) >>> 1;
    int midValue=starts[mid];
    if (n < midValue) {
      hi=mid - 1;
    }
 else     if (n > midValue) {
      lo=mid + 1;
    }
 else {
      while (mid + 1 < numSubReaders && starts[mid + 1] == midValue) {
        mid++;
      }
      return mid;
    }
  }
  return hi;
}
Program: 34825
Project: 34825
Buggy source:
public void deleteArtifactFromIndex(ArtifactContext ac,IndexingContext context) throws IOException ;

Fixed version (ground truth):
void deleteArtifactFromIndex(ArtifactContext ac,IndexingContext context) throws IOException ;
Program: 34826
Project: 34826
Buggy source:
public void deleteArtifactsFromIndex(Collection<ArtifactContext> acs,IndexingContext context) throws IOException ;

Fixed version (ground truth):
void deleteArtifactsFromIndex(Collection<ArtifactContext> acs,IndexingContext context) throws IOException ;
Program: 34827
Project: 34827
Buggy source:
public void addArtifactToIndex(ArtifactContext ac,IndexingContext context) throws IOException ;

Fixed version (ground truth):
void addArtifactToIndex(ArtifactContext ac,IndexingContext context) throws IOException ;
Program: 34828
Project: 34828
Buggy source:
public void addArtifactsToIndex(Collection<ArtifactContext> acs,IndexingContext context) throws IOException ;

Fixed version (ground truth):
void addArtifactsToIndex(Collection<ArtifactContext> acs,IndexingContext context) throws IOException ;
Program: 34829
Project: 34829
Buggy source:
/** 
 * Do the search in all contexts, no matter if the context is searchable or not
 */
public GroupedSearchResponse forceSearchGrouped(GroupedSearchRequest request,Collection<IndexingContext> indexingContexts) throws IOException ;

Fixed version (ground truth):
/** 
 * Do the search in all contexts, no matter if the context is searchable or not
 */
GroupedSearchResponse forceSearchGrouped(GroupedSearchRequest request,Collection<IndexingContext> indexingContexts) throws IOException ;
Program: 34830
Project: 34830
Buggy source:
@Deprecated public Set<ArtifactInfo> searchFlat(Comparator<ArtifactInfo> artifactInfoComparator,Collection<IndexingContext> indexingContexts,Query query) throws IOException ;

Fixed version (ground truth):
@Deprecated Set<ArtifactInfo> searchFlat(Comparator<ArtifactInfo> artifactInfoComparator,Collection<IndexingContext> indexingContexts,Query query) throws IOException ;
Program: 34831
Project: 34831
Buggy source:
/** 
 * Do the search only on searchable contexts
 */
public GroupedSearchResponse searchGrouped(GroupedSearchRequest request,Collection<IndexingContext> indexingContexts) throws IOException ;

Fixed version (ground truth):
/** 
 * Do the search only on searchable contexts
 */
GroupedSearchResponse searchGrouped(GroupedSearchRequest request,Collection<IndexingContext> indexingContexts) throws IOException ;
Program: 34832
Project: 34832
Buggy source:
/** 
 * Do the search only on searchable contexts
 */
public FlatSearchResponse searchFlatPaged(FlatSearchRequest request,Collection<IndexingContext> indexingContexts) throws IOException ;

Fixed version (ground truth):
/** 
 * Do the search only on searchable contexts
 */
FlatSearchResponse searchFlatPaged(FlatSearchRequest request,Collection<IndexingContext> indexingContexts) throws IOException ;
Program: 34833
Project: 34833
Buggy source:
/** 
 * Do the search in all contexts, no matter if the context is searchable or not
 */
public IteratorSearchResponse forceSearchIteratorPaged(IteratorSearchRequest request,Collection<IndexingContext> indexingContexts) throws IOException ;

Fixed version (ground truth):
/** 
 * Do the search in all contexts, no matter if the context is searchable or not
 */
IteratorSearchResponse forceSearchIteratorPaged(IteratorSearchRequest request,Collection<IndexingContext> indexingContexts) throws IOException ;
Program: 34834
Project: 34834
Buggy source:
/** 
 * Do the search in all contexts, no matter if the context is searchable or not
 */
public FlatSearchResponse forceSearchFlatPaged(FlatSearchRequest request,Collection<IndexingContext> indexingContexts) throws IOException ;

Fixed version (ground truth):
/** 
 * Do the search in all contexts, no matter if the context is searchable or not
 */
FlatSearchResponse forceSearchFlatPaged(FlatSearchRequest request,Collection<IndexingContext> indexingContexts) throws IOException ;
Program: 34835
Project: 34835
Buggy source:
/** 
 * Do the search only on searchable contexts
 */
public IteratorSearchResponse searchIteratorPaged(IteratorSearchRequest request,Collection<IndexingContext> indexingContexts) throws IOException ;

Fixed version (ground truth):
/** 
 * Do the search only on searchable contexts
 */
IteratorSearchResponse searchIteratorPaged(IteratorSearchRequest request,Collection<IndexingContext> indexingContexts) throws IOException ;
Program: 34836
Project: 34836
Buggy source:
/** 
 * Returns the indexer fields that this IndexCreator introduces to index.
 * @return
 */
public Collection<IndexerField> getIndexerFields();

Fixed version (ground truth):
/** 
 * Returns the indexer fields that this IndexCreator introduces to index.
 * @return
 */
Collection<IndexerField> getIndexerFields();
Program: 34837
Project: 34837
Buggy source:
private final static String readUTF(DataInput in) throws IOException {
  int utflen=in.readInt();
  byte[] bytearr=new byte[utflen];
  char[] chararr=new char[utflen];
  int c, char2, char3;
  int count=0;
  int chararr_count=0;
  in.readFully(bytearr,0,utflen);
  while (count < utflen) {
    c=bytearr[count] & 0xff;
    if (c > 127) {
      break;
    }
    count++;
    chararr[chararr_count++]=(char)c;
  }
  while (count < utflen) {
    c=bytearr[count] & 0xff;
switch (c >> 4) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
      count++;
    chararr[chararr_count++]=(char)c;
  break;
case 12:
case 13:
count+=2;
if (count > utflen) {
throw new UTFDataFormatException("String_Node_Str");
}
char2=bytearr[count - 1];
if ((char2 & 0xC0) != 0x80) {
throw new UTFDataFormatException("String_Node_Str" + count);
}
chararr[chararr_count++]=(char)(((c & 0x1F) << 6) | (char2 & 0x3F));
break;
case 14:
count+=3;
if (count > utflen) {
throw new UTFDataFormatException("String_Node_Str");
}
char2=bytearr[count - 2];
char3=bytearr[count - 1];
if (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80)) {
throw new UTFDataFormatException("String_Node_Str" + (count - 1));
}
chararr[chararr_count++]=(char)(((c & 0x0F) << 12) | ((char2 & 0x3F) << 6) | ((char3 & 0x3F) << 0));
break;
default :
throw new UTFDataFormatException("String_Node_Str" + count);
}
}
return new String(chararr,0,chararr_count);
}

Fixed version (ground truth):
private static String readUTF(DataInput in) throws IOException {
  int utflen=in.readInt();
  byte[] bytearr=new byte[utflen];
  char[] chararr=new char[utflen];
  int c, char2, char3;
  int count=0;
  int chararr_count=0;
  in.readFully(bytearr,0,utflen);
  while (count < utflen) {
    c=bytearr[count] & 0xff;
    if (c > 127) {
      break;
    }
    count++;
    chararr[chararr_count++]=(char)c;
  }
  while (count < utflen) {
    c=bytearr[count] & 0xff;
switch (c >> 4) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
      count++;
    chararr[chararr_count++]=(char)c;
  break;
case 12:
case 13:
count+=2;
if (count > utflen) {
throw new UTFDataFormatException("String_Node_Str");
}
char2=bytearr[count - 1];
if ((char2 & 0xC0) != 0x80) {
throw new UTFDataFormatException("String_Node_Str" + count);
}
chararr[chararr_count++]=(char)(((c & 0x1F) << 6) | (char2 & 0x3F));
break;
case 14:
count+=3;
if (count > utflen) {
throw new UTFDataFormatException("String_Node_Str");
}
char2=bytearr[count - 2];
char3=bytearr[count - 1];
if (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80)) {
throw new UTFDataFormatException("String_Node_Str" + (count - 1));
}
chararr[chararr_count++]=(char)(((c & 0x0F) << 12) | ((char2 & 0x3F) << 6) | ((char3 & 0x3F) << 0));
break;
default :
throw new UTFDataFormatException("String_Node_Str" + count);
}
}
return new String(chararr,0,chararr_count);
}
Program: 34838
Project: 34838
Buggy source:
private final static void writeUTF(String str,DataOutput out) throws IOException {
  int strlen=str.length();
  int utflen=0;
  int c;
  for (int i=0; i < strlen; i++) {
    c=str.charAt(i);
    if ((c >= 0x0001) && (c <= 0x007F)) {
      utflen++;
    }
 else     if (c > 0x07FF) {
      utflen+=3;
    }
 else {
      utflen+=2;
    }
  }
  out.writeInt(utflen);
  byte[] bytearr=new byte[utflen];
  int count=0;
  int i=0;
  for (; i < strlen; i++) {
    c=str.charAt(i);
    if (!((c >= 0x0001) && (c <= 0x007F))) {
      break;
    }
    bytearr[count++]=(byte)c;
  }
  for (; i < strlen; i++) {
    c=str.charAt(i);
    if ((c >= 0x0001) && (c <= 0x007F)) {
      bytearr[count++]=(byte)c;
    }
 else     if (c > 0x07FF) {
      bytearr[count++]=(byte)(0xE0 | ((c >> 12) & 0x0F));
      bytearr[count++]=(byte)(0x80 | ((c >> 6) & 0x3F));
      bytearr[count++]=(byte)(0x80 | ((c >> 0) & 0x3F));
    }
 else {
      bytearr[count++]=(byte)(0xC0 | ((c >> 6) & 0x1F));
      bytearr[count++]=(byte)(0x80 | ((c >> 0) & 0x3F));
    }
  }
  out.write(bytearr,0,utflen);
}

Fixed version (ground truth):
private static void writeUTF(String str,DataOutput out) throws IOException {
  int strlen=str.length();
  int utflen=0;
  int c;
  for (int i=0; i < strlen; i++) {
    c=str.charAt(i);
    if ((c >= 0x0001) && (c <= 0x007F)) {
      utflen++;
    }
 else     if (c > 0x07FF) {
      utflen+=3;
    }
 else {
      utflen+=2;
    }
  }
  out.writeInt(utflen);
  byte[] bytearr=new byte[utflen];
  int count=0;
  int i=0;
  for (; i < strlen; i++) {
    c=str.charAt(i);
    if (!((c >= 0x0001) && (c <= 0x007F))) {
      break;
    }
    bytearr[count++]=(byte)c;
  }
  for (; i < strlen; i++) {
    c=str.charAt(i);
    if ((c >= 0x0001) && (c <= 0x007F)) {
      bytearr[count++]=(byte)c;
    }
 else     if (c > 0x07FF) {
      bytearr[count++]=(byte)(0xE0 | ((c >> 12) & 0x0F));
      bytearr[count++]=(byte)(0x80 | ((c >> 6) & 0x3F));
      bytearr[count++]=(byte)(0x80 | ((c >> 0) & 0x3F));
    }
 else {
      bytearr[count++]=(byte)(0xC0 | ((c >> 6) & 0x1F));
      bytearr[count++]=(byte)(0x80 | ((c >> 0) & 0x3F));
    }
  }
  out.write(bytearr,0,utflen);
}
Program: 34839
Project: 34839
Buggy source:
private static String readUTF(DataInput in) throws IOException {
  int utflen=in.readInt();
  byte[] bytearr=new byte[utflen];
  char[] chararr=new char[utflen];
  int c, char2, char3;
  int count=0;
  int chararr_count=0;
  in.readFully(bytearr,0,utflen);
  while (count < utflen) {
    c=bytearr[count] & 0xff;
    if (c > 127) {
      break;
    }
    count++;
    chararr[chararr_count++]=(char)c;
  }
  while (count < utflen) {
    c=bytearr[count] & 0xff;
switch (c >> 4) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
      count++;
    chararr[chararr_count++]=(char)c;
  break;
case 12:
case 13:
count+=2;
if (count > utflen) {
throw new UTFDataFormatException("String_Node_Str");
}
char2=bytearr[count - 1];
if ((char2 & 0xC0) != 0x80) {
throw new UTFDataFormatException("String_Node_Str" + count);
}
chararr[chararr_count++]=(char)(((c & 0x1F) << 6) | (char2 & 0x3F));
break;
case 14:
count+=3;
if (count > utflen) {
throw new UTFDataFormatException("String_Node_Str");
}
char2=bytearr[count - 2];
char3=bytearr[count - 1];
if (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80)) {
throw new UTFDataFormatException("String_Node_Str" + (count - 1));
}
chararr[chararr_count++]=(char)(((c & 0x0F) << 12) | ((char2 & 0x3F) << 6) | ((char3 & 0x3F) << 0));
break;
default :
throw new UTFDataFormatException("String_Node_Str" + count);
}
}
return new String(chararr,0,chararr_count);
}

Fixed version (ground truth):
private static String readUTF(DataInput in) throws IOException {
  int utflen=in.readInt();
  byte[] bytearr;
  char[] chararr;
  try {
    bytearr=new byte[utflen];
    chararr=new char[utflen];
  }
 catch (  OutOfMemoryError e) {
    final IOException ex=new IOException("String_Node_Str");
    e.initCause(e);
    throw ex;
  }
  int c, char2, char3;
  int count=0;
  int chararr_count=0;
  in.readFully(bytearr,0,utflen);
  while (count < utflen) {
    c=bytearr[count] & 0xff;
    if (c > 127) {
      break;
    }
    count++;
    chararr[chararr_count++]=(char)c;
  }
  while (count < utflen) {
    c=bytearr[count] & 0xff;
switch (c >> 4) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
      count++;
    chararr[chararr_count++]=(char)c;
  break;
case 12:
case 13:
count+=2;
if (count > utflen) {
throw new UTFDataFormatException("String_Node_Str");
}
char2=bytearr[count - 1];
if ((char2 & 0xC0) != 0x80) {
throw new UTFDataFormatException("String_Node_Str" + count);
}
chararr[chararr_count++]=(char)(((c & 0x1F) << 6) | (char2 & 0x3F));
break;
case 14:
count+=3;
if (count > utflen) {
throw new UTFDataFormatException("String_Node_Str");
}
char2=bytearr[count - 2];
char3=bytearr[count - 1];
if (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80)) {
throw new UTFDataFormatException("String_Node_Str" + (count - 1));
}
chararr[chararr_count++]=(char)(((c & 0x0F) << 12) | ((char2 & 0x3F) << 6) | ((char3 & 0x3F) << 0));
break;
default :
throw new UTFDataFormatException("String_Node_Str" + count);
}
}
return new String(chararr,0,chararr_count);
}
Program: 34840
Project: 34840
Buggy source:
private File getPluginJAR(){
  String qualifierVersion=manifest.getMainAttributes().getValue(Constants.BUNDLE_VERSION);
  String name=manifest.getMainAttributes().getValue(Constants.BUNDLE_SYMBOLIC_NAME);
  if (name.indexOf("String_Node_Str") != -1) {
    name=name.substring(0,(name.indexOf("String_Node_Str") - 1));
  }
  getLog().debug("String_Node_Str" + name);
  File pluginFile=new File(outputDirectory,name + "String_Node_Str" + qualifierVersion+ "String_Node_Str");
  if (pluginFile.exists()) {
    pluginFile.delete();
  }
  return pluginFile;
}

Fixed version (ground truth):
private File getPluginJAR(){
  String qualifierVersion=manifest.getMainAttributes().getValue(Constants.BUNDLE_VERSION);
  if (qualifierVersion != null && qualifierVersion.endsWith("String_Node_Str")) {
    qualifierVersion=qualifierVersion.substring(0,qualifierVersion.lastIndexOf("String_Node_Str"));
  }
  String name=manifest.getMainAttributes().getValue(Constants.BUNDLE_SYMBOLIC_NAME);
  if (name.indexOf("String_Node_Str") != -1) {
    name=name.substring(0,(name.indexOf("String_Node_Str") - 1));
  }
  getLog().debug("String_Node_Str" + name);
  File pluginFile=new File(outputDirectory,name + "String_Node_Str" + qualifierVersion+ "String_Node_Str");
  if (pluginFile.exists()) {
    pluginFile.delete();
  }
  return pluginFile;
}
Program: 34841
Project: 34841
Buggy source:
public static String getcalculatedOSGiVersion(String versionStr){
  Version version=parseVersion(versionStr);
  String calcQualifier=calculateQualifier(version.getQualifier());
  String fullVersion=version.getMajor() + "String_Node_Str" + version.getMinor()+ "String_Node_Str"+ version.getMicro()+ "String_Node_Str"+ calcQualifier;
  return fullVersion;
}

Fixed version (ground truth):
public static String getcalculatedOSGiVersion(String versionStr){
  Version version=parseVersion(versionStr);
  String calcQualifier=calculateQualifier(version.getQualifier());
  String fullVersion=version.getMajor() + "String_Node_Str" + version.getMinor()+ "String_Node_Str"+ version.getMicro();
  if (!calcQualifier.isEmpty()) {
    fullVersion+="String_Node_Str" + calcQualifier;
  }
  return fullVersion;
}
Program: 34842
Project: 34842
Buggy source:
public boolean reload(final String host,final String token){
  if (host != null && token != null && !host.isEmpty() && !token.isEmpty()) {
    api=GitlabAPI.connect(host,token);
    api.ignoreCertificateErrors(true);
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean reload(final String host,final String token){
  if (host != null && token != null && !host.isEmpty() && !token.isEmpty()) {
    api=GitlabAPI.connect(host,token);
    return true;
  }
  return false;
}
Program: 34845
Project: 34845
Buggy source:
private FluidStack drain(int maxDrain,boolean doDrain,int tankID){
  Tank tank=getTanks()[tankID];
  FluidStack drained=tank.drain(maxDrain,doDrain);
  updateRecipe();
  return drained;
}

Fixed version (ground truth):
private FluidStack drain(FluidStack fluid,boolean doDrain,int tankID){
  Tank tank=getTanks()[tankID];
  FluidStack drained=tank.drain(fluid,doDrain);
  updateRecipe();
  return drained;
}
Program: 34846
Project: 34846
Buggy source:
private int fill(FluidStack resouce,boolean doFill,int tankID){
  Tank tank=getTanks()[tankID];
  int filled=tank.fill(resouce,doFill);
  updateRecipe();
  return filled;
}

Fixed version (ground truth):
private int fill(FluidStack resouce,boolean doFill,int tankID){
  Tank tank=getTanks()[tankID];
  int filled=tank.fill(resouce,doFill);
  updateRecipe();
  sync();
  return filled;
}
Program: 34848
Project: 34848
Buggy source:
private void updateHeat(){
  if (worldObj.isRemote || firstTick)   return;
  if (heatTimer == 0) {
    if ((currentHeat > requiredHeat || (energy < energyCost || energyCost == 0)) && currentHeat > 20) {
      currentHeat--;
      isCooling=true;
    }
    if (currentHeat < requiredHeat && (energy >= energyCost && energyCost != 0)) {
      currentHeat++;
      isCooling=false;
    }
    heatTimer=10;
  }
  if (currentHeat == 20)   isCooling=false;
  heatTimer-=1;
}

Fixed version (ground truth):
private void updateHeat(){
  if (worldObj.isRemote || firstTick)   return;
  if (heatTimer == 0) {
    if (((currentHeat > requiredHeat || (energy < energyCost || energyCost == 0)) && currentHeat > 20) || output.isFull()) {
      currentHeat--;
      isCooling=true;
    }
    if ((currentHeat < requiredHeat && (energy >= energyCost && energyCost != 0)) && !output.isFull()) {
      currentHeat++;
      isCooling=false;
    }
    heatTimer=10;
  }
  if (currentHeat == 20)   isCooling=false;
  heatTimer-=1;
}
Program: 34849
Project: 34849
Buggy source:
public FluidStack realDrain(int maxDrain,boolean doDrain){
  FluidStack result=output.drain(maxDrain,doDrain);
  updateRecipe();
  return result;
}

Fixed version (ground truth):
public FluidStack realDrain(FluidStack fluid,boolean doDrain){
  FluidStack result=output.drain(fluid,doDrain);
  updateRecipe();
  return result;
}
Program: 34851
Project: 34851
Buggy source:
@Mod.EventHandler public void preInit(FMLPreInitializationEvent event){
  manager.setupModules();
  ConfigurationHandler.init(event.getSuggestedConfigurationFile());
  PacketHandler.init();
  ItemsAndBlocks.init();
  proxy.registerEntities();
  SpecialListMananger.init();
  BCARecipeManager.duster=new DusterRecipeManager();
  BCARecipeManager.cooling=new CoolingTowerRecipeManager();
  BCARecipeManager.refinery=new RefineryRecipeManager();
  BCAItemManager.dusts=new DustManager();
  manager.preInit(event);
}

Fixed version (ground truth):
@Mod.EventHandler public void preInit(FMLPreInitializationEvent event){
  manager.setupModules();
  ConfigurationHandler.init(event.getSuggestedConfigurationFile());
  PacketHandler.init();
  ItemsAndBlocks.init();
  proxy.registerEntities();
  SpecialListMananger.init();
  BCARecipeManager.duster=new DusterRecipeManager();
  BCARecipeManager.cooling=new CoolingTowerRecipeManager();
  BCARecipeManager.refinery=new RefineryRecipeManager();
  BCAItemManager.dusts=new DustManager();
  OreDictionary.registerOre("String_Node_Str",Items.blaze_rod);
  OreDictionary.registerOre("String_Node_Str",Items.blaze_powder);
  OreDictionary.registerOre("String_Node_Str",Items.snowball);
  OreDictionary.registerOre("String_Node_Str",Blocks.sand);
  OreDictionary.registerOre("String_Node_Str",Blocks.soul_sand);
  manager.preInit(event);
}