nus-yam/ex-repair huggingface dataset:
Program: 56228
Project: 56228
Buggy source:
private final double toMBitPerSec(long numberOfBytes,long profilingPeriod){
  return ((double)numberOfBytes / (BYTE_TO_MEGABIT * profilingPeriod / 1000));
}

Fixed version (ground truth):
private final double toMBitPerSec(long numberOfBytes,long profilingPeriod){
  return (((double)numberOfBytes) / ((double)(BYTE_TO_MEGABIT * profilingPeriod / 1000L)));
}
Program: 56229
Project: 56229
Buggy source:
private Map<ManagementGroupVertex,SWTGroupVertex> addGroupVertices(Map<ManagementStage,SWTStage> stageMap){
  Map<ManagementGroupVertex,SWTGroupVertex> groupMap=new HashMap<ManagementGroupVertex,SWTGroupVertex>();
  Iterator<ManagementStage> iterator=stageMap.keySet().iterator();
  while (iterator.hasNext()) {
    final ManagementStage managementStage=iterator.next();
    final SWTStage parent=stageMap.get(managementStage);
    for (int i=0; i < managementStage.getNumberOfGroupVertices(); i++) {
      final ManagementGroupVertex groupVertex=managementStage.getGroupVertex(i);
      final SWTGroupVertex visualGroupVertex=new SWTGroupVertex(parent,groupVertex);
      groupMap.put(groupVertex,visualGroupVertex);
    }
  }
  iterator=stageMap.keySet().iterator();
  while (iterator.hasNext()) {
    final ManagementStage executionStage=iterator.next();
    for (int i=0; i < executionStage.getNumberOfGroupVertices(); i++) {
      final ManagementGroupVertex sourceVertex=executionStage.getGroupVertex(i);
      final SWTGroupVertex sourceGroupVertex=groupMap.get(sourceVertex);
      for (int j=0; j < sourceVertex.getNumberOfForwardEdges(); j++) {
        final ManagementGroupEdge edge=sourceVertex.getForwardEdge(j);
        final ManagementGroupVertex targetVertex=edge.getTarget();
        final SWTGroupVertex targetGroupVertex=groupMap.get(targetVertex);
        sourceGroupVertex.connectTo(targetGroupVertex);
      }
    }
  }
  return groupMap;
}

Fixed version (ground truth):
private Map<ManagementGroupVertex,SWTGroupVertex> addGroupVertices(Map<ManagementStage,SWTStage> stageMap){
  Map<ManagementGroupVertex,SWTGroupVertex> groupMap=new HashMap<ManagementGroupVertex,SWTGroupVertex>();
  Iterator<Map.Entry<ManagementStage,SWTStage>> iterator=stageMap.entrySet().iterator();
  while (iterator.hasNext()) {
    final Map.Entry<ManagementStage,SWTStage> entry=iterator.next();
    final ManagementStage managementStage=entry.getKey();
    final SWTStage parent=entry.getValue();
    for (int i=0; i < managementStage.getNumberOfGroupVertices(); i++) {
      final ManagementGroupVertex groupVertex=managementStage.getGroupVertex(i);
      final SWTGroupVertex visualGroupVertex=new SWTGroupVertex(parent,groupVertex);
      groupMap.put(groupVertex,visualGroupVertex);
    }
  }
  iterator=stageMap.entrySet().iterator();
  while (iterator.hasNext()) {
    final Map.Entry<ManagementStage,SWTStage> entry=iterator.next();
    final ManagementStage executionStage=entry.getKey();
    for (int i=0; i < executionStage.getNumberOfGroupVertices(); i++) {
      final ManagementGroupVertex sourceVertex=executionStage.getGroupVertex(i);
      final SWTGroupVertex sourceGroupVertex=groupMap.get(sourceVertex);
      for (int j=0; j < sourceVertex.getNumberOfForwardEdges(); j++) {
        final ManagementGroupEdge edge=sourceVertex.getForwardEdge(j);
        final ManagementGroupVertex targetVertex=edge.getTarget();
        final SWTGroupVertex targetGroupVertex=groupMap.get(targetVertex);
        sourceGroupVertex.connectTo(targetGroupVertex);
      }
    }
  }
  return groupMap;
}
Program: 56230
Project: 56230
Buggy source:
@Override public void layout(){
  if (this.networkNode.isLeafNode()) {
    if (LEAFNODEIMAGE != null) {
      this.imageScaleFactor=(float)(this.rect.height - TEXTBOXHEIGHT) / (float)LEAFNODEIMAGERECT.height;
    }
  }
 else {
    if (NODEIMAGE != null) {
      this.imageScaleFactor=(float)(this.rect.height - TEXTBOXHEIGHT) / (float)NODEIMAGERECT.height;
    }
  }
}

Fixed version (ground truth):
@Override public void layout(){
  if (this.networkNode.isLeafNode()) {
    if (this.leafNodeImage != null) {
      this.imageScaleFactor=(float)(this.rect.height - TEXTBOXHEIGHT) / (float)this.leafNodeImageRect.height;
    }
  }
 else {
    if (this.nodeImage != null) {
      this.imageScaleFactor=(float)(this.rect.height - TEXTBOXHEIGHT) / (float)this.nodeImageRect.height;
    }
  }
}
Program: 56232
Project: 56232
Buggy source:
public SWTNetworkNode(Display display,AbstractSWTComponent parentComponent,NetworkNode networkNode){
  super(parentComponent);
  this.networkNode=networkNode;
  if (LEAFNODEIMAGE == null) {
    InputStream in=getClass().getResourceAsStream("String_Node_Str");
    try {
      LEAFNODEIMAGE=new Image(display,in);
      LEAFNODEIMAGERECT=LEAFNODEIMAGE.getBounds();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  if (NODEIMAGE == null) {
    InputStream in=getClass().getResourceAsStream("String_Node_Str");
    try {
      NODEIMAGE=new Image(display,in);
      NODEIMAGERECT=NODEIMAGE.getBounds();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
public SWTNetworkNode(Display display,AbstractSWTComponent parentComponent,NetworkNode networkNode){
  super(parentComponent);
  this.networkNode=networkNode;
synchronized (SWTNetworkNode.class) {
    if (LEAFNODEIMAGE == null) {
      InputStream in=getClass().getResourceAsStream("String_Node_Str");
      try {
        LEAFNODEIMAGE=new Image(display,in);
        LEAFNODEIMAGERECT=LEAFNODEIMAGE.getBounds();
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
    this.leafNodeImage=LEAFNODEIMAGE;
    this.leafNodeImageRect=LEAFNODEIMAGERECT;
    if (NODEIMAGE == null) {
      InputStream in=getClass().getResourceAsStream("String_Node_Str");
      try {
        NODEIMAGE=new Image(display,in);
        NODEIMAGERECT=NODEIMAGE.getBounds();
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
    this.nodeImage=NODEIMAGE;
    this.nodeImageRect=NODEIMAGERECT;
  }
}
Program: 56233
Project: 56233
Buggy source:
private SWTNetworkTopology createSWTNetworkTopology(NetworkTopology networkTopology){
  final SWTNetworkTopology swtNetworkTopology=new SWTNetworkTopology(networkTopology);
  final Map<NetworkNode,SWTNetworkNode> nodeMap=new HashMap<NetworkNode,SWTNetworkNode>();
  Iterator<NetworkNode> it=networkTopology.iterator();
  while (it.hasNext()) {
    final NetworkNode networkNode=it.next();
    final SWTNetworkNode swtNetworkNode=new SWTNetworkNode(getDisplay(),swtNetworkTopology,networkNode);
    swtNetworkTopology.addChild(swtNetworkNode);
    nodeMap.put(networkNode,swtNetworkNode);
    if (networkNode.getParentNode() == null) {
      swtNetworkTopology.setRootNode(swtNetworkNode);
    }
  }
  it=nodeMap.keySet().iterator();
  while (it.hasNext()) {
    final NetworkNode childNode=it.next();
    final NetworkNode parentNode=childNode.getParentNode();
    if (parentNode != null) {
      final SWTNetworkNode swtChildNode=nodeMap.get(childNode);
      final SWTNetworkNode swtParentNode=nodeMap.get(parentNode);
      swtChildNode.setParentNode(swtParentNode);
    }
  }
  return swtNetworkTopology;
}

Fixed version (ground truth):
private SWTNetworkTopology createSWTNetworkTopology(NetworkTopology networkTopology){
  final SWTNetworkTopology swtNetworkTopology=new SWTNetworkTopology(networkTopology);
  final Map<NetworkNode,SWTNetworkNode> nodeMap=new HashMap<NetworkNode,SWTNetworkNode>();
  final Iterator<NetworkNode> it=networkTopology.iterator();
  while (it.hasNext()) {
    final NetworkNode networkNode=it.next();
    final SWTNetworkNode swtNetworkNode=new SWTNetworkNode(getDisplay(),swtNetworkTopology,networkNode);
    swtNetworkTopology.addChild(swtNetworkNode);
    nodeMap.put(networkNode,swtNetworkNode);
    if (networkNode.getParentNode() == null) {
      swtNetworkTopology.setRootNode(swtNetworkNode);
    }
  }
  final Iterator<Map.Entry<NetworkNode,SWTNetworkNode>> it2=nodeMap.entrySet().iterator();
  while (it2.hasNext()) {
    final Map.Entry<NetworkNode,SWTNetworkNode> entry=it2.next();
    final NetworkNode childNode=entry.getKey();
    final NetworkNode parentNode=childNode.getParentNode();
    if (parentNode != null) {
      final SWTNetworkNode swtChildNode=entry.getValue();
      final SWTNetworkNode swtParentNode=nodeMap.get(parentNode);
      swtChildNode.setParentNode(swtParentNode);
    }
  }
  return swtNetworkTopology;
}
Program: 56234
Project: 56234
Buggy source:
/** 
 * Starts a new discovery service.
 * @param ipcPort the network port that is announced for the job manager's IPC service.
 * @throws DiscoveryException thrown if the discovery service could not be started because of network difficulties
 */
public static void startDiscoveryService(int ipcPort) throws DiscoveryException {
  if (discoveryService == null) {
    discoveryService=new DiscoveryService(ipcPort);
    discoveryService.startService();
  }
}

Fixed version (ground truth):
/** 
 * Starts a new discovery service.
 * @param ipcPort the network port that is announced for the job manager's IPC service.
 * @throws DiscoveryException thrown if the discovery service could not be started because of network difficulties
 */
public static synchronized void startDiscoveryService(int ipcPort) throws DiscoveryException {
  if (discoveryService == null) {
    discoveryService=new DiscoveryService(ipcPort);
    discoveryService.startService();
  }
}
Program: 56235
Project: 56235
Buggy source:
/** 
 * Stops the discovery service.
 */
public static void stopDiscoveryService(){
  if (discoveryService != null) {
    discoveryService.stopService();
  }
}

Fixed version (ground truth):
/** 
 * Stops the discovery service.
 */
public static synchronized void stopDiscoveryService(){
  if (discoveryService != null) {
    discoveryService.stopService();
  }
}
Program: 56238
Project: 56238
Buggy source:
/** 
 * Changes the channel type for this edge.
 * @param newChannelType the channel type for this edge
 * @throws GraphConversionException thrown if the new channel type violates a user setting
 */
public synchronized void changeChannelType(ChannelType newChannelType) throws GraphConversionException {
  if (!this.channelType.equals(newChannelType) && this.userDefinedChannelType) {
    throw new GraphConversionException("String_Node_Str");
  }
  final List<ExecutionGroupEdge> edges=this.getSourceVertex().getForwardEdges(this.getTargetVertex());
  final Iterator<ExecutionGroupEdge> it=edges.iterator();
  while (it.hasNext()) {
    final ExecutionGroupEdge edge=it.next();
    this.executionGraph.unwire(edge.sourceVertex,edge.indexOfOutputGate,edge.targetVertex,edge.indexOfInputGate);
    this.executionGraph.wire(edge.sourceVertex,edge.indexOfOutputGate,edge.targetVertex,edge.indexOfInputGate,newChannelType,edge.compressionLevel);
    edge.channelType=newChannelType;
  }
  this.executionGraph.repairStages();
  this.executionGraph.repairInstanceAssignment();
}

Fixed version (ground truth):
/** 
 * Changes the channel type for this edge.
 * @param newChannelType the channel type for this edge
 * @throws GraphConversionException thrown if the new channel type violates a user setting
 */
public synchronized void changeChannelType(ChannelType newChannelType) throws GraphConversionException {
  if (!this.channelType.equals(newChannelType) && this.userDefinedChannelType) {
    throw new GraphConversionException("String_Node_Str");
  }
  final List<ExecutionGroupEdge> edges=this.getSourceVertex().getForwardEdges(this.getTargetVertex());
  final Iterator<ExecutionGroupEdge> it=edges.iterator();
  while (it.hasNext()) {
    final ExecutionGroupEdge edge=it.next();
    CompressionLevel cl=null;
synchronized (edge) {
      edge.channelType=newChannelType;
      cl=edge.compressionLevel;
    }
    this.executionGraph.unwire(edge.sourceVertex,edge.indexOfOutputGate,edge.targetVertex,edge.indexOfInputGate);
    this.executionGraph.wire(edge.sourceVertex,edge.indexOfOutputGate,edge.targetVertex,edge.indexOfInputGate,newChannelType,cl);
  }
  this.executionGraph.repairStages();
  this.executionGraph.repairInstanceAssignment();
}
Program: 56239
Project: 56239
Buggy source:
/** 
 * Returns the number of the stage this group vertex belongs to.
 * @return the number of the stage this group vertex belongs to
 */
public int getStageNumber(){
  ExecutionStage executionStage=null;
synchronized (this.executionStage) {
    executionStage=this.executionStage;
  }
  return executionStage.getStageNumber();
}

Fixed version (ground truth):
/** 
 * Returns the number of the stage this group vertex belongs to.
 * @return the number of the stage this group vertex belongs to
 */
public int getStageNumber(){
  ExecutionStage executionStage=null;
synchronized (this) {
    executionStage=this.executionStage;
  }
  return executionStage.getStageNumber();
}
Program: 56240
Project: 56240
Buggy source:
/** 
 * Deploys and starts the task represented by this vertex on the assigned instance.
 * @return the result of the task submission attempt
 */
public TaskSubmissionResult startTask(){
  AllocatedResource allocatedRes=null;
synchronized (this) {
    if (this.allocatedResource == null) {
      final TaskSubmissionResult result=new TaskSubmissionResult(getID(),AbstractTaskResult.ReturnCode.ERROR);
      result.setDescription("String_Node_Str" + this.toString() + "String_Node_Str");
      return result;
    }
    try {
      prepareChannels();
    }
 catch (    ChannelSetupException e) {
      final TaskSubmissionResult result=new TaskSubmissionResult(getID(),AbstractTaskResult.ReturnCode.ERROR);
      result.setDescription(StringUtils.stringifyException(e));
      return result;
    }
    allocatedRes=this.allocatedResource;
  }
  try {
    return allocatedRes.getInstance().submitTask(this.vertexID,this.executionGraph.getJobConfiguration(),this.environment);
  }
 catch (  IOException e) {
    final TaskSubmissionResult result=new TaskSubmissionResult(getID(),AbstractTaskResult.ReturnCode.ERROR);
    result.setDescription(StringUtils.stringifyException(e));
    return result;
  }
}

Fixed version (ground truth):
/** 
 * Deploys and starts the task represented by this vertex on the assigned instance.
 * @return the result of the task submission attempt
 */
public TaskSubmissionResult startTask(){
  AllocatedResource allocatedRes=null;
  Environment env=null;
synchronized (this) {
    if (this.allocatedResource == null) {
      final TaskSubmissionResult result=new TaskSubmissionResult(getID(),AbstractTaskResult.ReturnCode.ERROR);
      result.setDescription("String_Node_Str" + this.toString() + "String_Node_Str");
      return result;
    }
    try {
      prepareChannels();
    }
 catch (    ChannelSetupException e) {
      final TaskSubmissionResult result=new TaskSubmissionResult(getID(),AbstractTaskResult.ReturnCode.ERROR);
      result.setDescription(StringUtils.stringifyException(e));
      return result;
    }
    allocatedRes=this.allocatedResource;
    env=this.environment;
  }
  try {
    return allocatedRes.getInstance().submitTask(this.vertexID,this.executionGraph.getJobConfiguration(),env);
  }
 catch (  IOException e) {
    final TaskSubmissionResult result=new TaskSubmissionResult(getID(),AbstractTaskResult.ReturnCode.ERROR);
    result.setDescription(StringUtils.stringifyException(e));
    return result;
  }
}
Program: 56241
Project: 56241
Buggy source:
/** 
 * Returns a duplicate of this execution vertex.
 * @param preserveVertexID <code>true</code> to copy the vertex's ID to the duplicated vertex, <code>false</code> to create a new ID
 * @return a duplicate of this execution vertex
 */
public synchronized ExecutionVertex duplicateVertex(boolean preserveVertexID){
  ExecutionVertexID newVertexID;
  if (preserveVertexID) {
    newVertexID=this.vertexID;
  }
 else {
    newVertexID=new ExecutionVertexID();
  }
  final ExecutionVertex duplicatedVertex=new ExecutionVertex(newVertexID,this.invokableClass,this.executionGraph,this.groupVertex);
  duplicatedVertex.environment=this.environment.duplicateEnvironment();
  duplicatedVertex.allocatedResource=this.allocatedResource;
  return duplicatedVertex;
}

Fixed version (ground truth):
/** 
 * Returns a duplicate of this execution vertex.
 * @param preserveVertexID <code>true</code> to copy the vertex's ID to the duplicated vertex, <code>false</code> to create a new ID
 * @return a duplicate of this execution vertex
 */
public synchronized ExecutionVertex duplicateVertex(boolean preserveVertexID){
  ExecutionVertexID newVertexID;
  if (preserveVertexID) {
    newVertexID=this.vertexID;
  }
 else {
    newVertexID=new ExecutionVertexID();
  }
  final ExecutionVertex duplicatedVertex=new ExecutionVertex(newVertexID,this.invokableClass,this.executionGraph,this.groupVertex);
synchronized (duplicatedVertex) {
    duplicatedVertex.environment=this.environment.duplicateEnvironment();
    duplicatedVertex.allocatedResource=this.allocatedResource;
  }
  return duplicatedVertex;
}
Program: 56243
Project: 56243
Buggy source:
/** 
 * Returns the size of the physical memory in bytes on a Mac OS-based operating system
 * @return the size of the physical memory in bytes or <code>-1</code> if the size could not be determined
 */
private static long getSizeOfPhysicalMemoryForMac(){
  try {
    Process proc=Runtime.getRuntime().exec("String_Node_Str");
    BufferedReader bi=new BufferedReader(new InputStreamReader(proc.getInputStream()));
    String line;
    while ((line=bi.readLine()) != null) {
      if (line.startsWith("String_Node_Str")) {
        long memsize=Long.parseLong(line.split("String_Node_Str")[1].trim());
        bi.close();
        proc.destroy();
        return memsize;
      }
    }
  }
 catch (  Exception e) {
    LOG.error(e);
    return -1;
  }
  return -1;
}

Fixed version (ground truth):
/** 
 * Returns the size of the physical memory in bytes on a Mac OS-based operating system
 * @return the size of the physical memory in bytes or <code>-1</code> if the size could not be determined
 */
private static long getSizeOfPhysicalMemoryForMac(){
  BufferedReader bi=null;
  try {
    Process proc=Runtime.getRuntime().exec("String_Node_Str");
    bi=new BufferedReader(new InputStreamReader(proc.getInputStream()));
    String line;
    while ((line=bi.readLine()) != null) {
      if (line.startsWith("String_Node_Str")) {
        long memsize=Long.parseLong(line.split("String_Node_Str")[1].trim());
        bi.close();
        proc.destroy();
        return memsize;
      }
    }
  }
 catch (  Exception e) {
    LOG.error(e);
    return -1;
  }
 finally {
    if (bi != null) {
      try {
        bi.close();
      }
 catch (      IOException ioe) {
      }
    }
  }
  return -1;
}
Program: 56244
Project: 56244
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public String toString(){
  String iaString;
  if (this.hostname != null) {
    iaString=this.hostname;
  }
 else {
    iaString=inetAddress.toString();
    iaString=iaString.replace("String_Node_Str","String_Node_Str");
  }
  return new String(iaString);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public String toString(){
  String iaString;
  if (this.hostname != null) {
    iaString=this.hostname;
  }
 else {
    iaString=inetAddress.toString();
    iaString=iaString.replace("String_Node_Str","String_Node_Str");
  }
  return iaString;
}
Program: 56246
Project: 56246
Buggy source:
/** 
 * Collects the instances required to run the job from the given   {@link ExecutionGraph} and requests them at theloaded instance manager.
 * @param executionGraph the execution graph to collect the required instances from
 * @throws InstanceException thrown if the given execution graph is already processing its final stage
 */
private void requestInstances(ExecutionGraph executionGraph) throws InstanceException {
  final Map<InstanceType,Integer> requiredInstanceTypes=new HashMap<InstanceType,Integer>();
  executionGraph.collectInstanceTypesRequiredForCurrentStage(requiredInstanceTypes,ExecutionState.SCHEDULED);
  if (requiredInstanceTypes.isEmpty()) {
    return;
  }
  final ExecutionGraphIterator it2=new ExecutionGraphIterator(executionGraph,executionGraph.getIndexOfCurrentExecutionStage(),true,true);
  while (it2.hasNext()) {
    final ExecutionVertex vertex=it2.next();
    if (vertex.getExecutionState() == ExecutionState.SCHEDULED) {
      vertex.setExecutionState(ExecutionState.ASSIGNING);
    }
  }
  final Iterator<InstanceType> it=requiredInstanceTypes.keySet().iterator();
  while (it.hasNext()) {
    final InstanceType type=it.next();
    for (int i=0; i < requiredInstanceTypes.get(type).intValue(); i++) {
      LOG.info("String_Node_Str" + type.getIdentifier());
      this.instanceManager.requestInstance(executionGraph.getJobID(),executionGraph.getJobConfiguration(),type);
    }
  }
}

Fixed version (ground truth):
/** 
 * Collects the instances required to run the job from the given   {@link ExecutionGraph} and requests them at theloaded instance manager.
 * @param executionGraph the execution graph to collect the required instances from
 * @throws InstanceException thrown if the given execution graph is already processing its final stage
 */
private void requestInstances(ExecutionGraph executionGraph) throws InstanceException {
  final Map<InstanceType,Integer> requiredInstanceTypes=new HashMap<InstanceType,Integer>();
  executionGraph.collectInstanceTypesRequiredForCurrentStage(requiredInstanceTypes,ExecutionState.SCHEDULED);
  if (requiredInstanceTypes.isEmpty()) {
    return;
  }
  final ExecutionGraphIterator it2=new ExecutionGraphIterator(executionGraph,executionGraph.getIndexOfCurrentExecutionStage(),true,true);
  while (it2.hasNext()) {
    final ExecutionVertex vertex=it2.next();
    if (vertex.getExecutionState() == ExecutionState.SCHEDULED) {
      vertex.setExecutionState(ExecutionState.ASSIGNING);
    }
  }
  final Iterator<Map.Entry<InstanceType,Integer>> it=requiredInstanceTypes.entrySet().iterator();
  while (it.hasNext()) {
    final Map.Entry<InstanceType,Integer> entry=it.next();
    final InstanceType type=entry.getKey();
    for (int i=0; i < entry.getValue().intValue(); i++) {
      LOG.info("String_Node_Str" + type.getIdentifier());
      this.instanceManager.requestInstance(executionGraph.getJobID(),executionGraph.getJobConfiguration(),type);
    }
  }
}
Program: 56247
Project: 56247
Buggy source:
/** 
 * Shuts the task manager down.
 */
public synchronized void shutdown(){
  if (this.isShutDown) {
    return;
  }
  LOG.info("String_Node_Str");
  RPC.stopProxy(this.jobManager);
  this.taskManagerServer.stop();
  if (this.profiler != null) {
    this.profiler.shutdown();
  }
  this.byteBufferedChannelManager.shutdown();
  if (this.ioManager != null) {
    this.ioManager.shutdown();
    this.ioManager=null;
  }
  if (this.memoryManager != null) {
    this.memoryManager.shutdown();
    this.memoryManager=null;
  }
  this.isShutDown=true;
}

Fixed version (ground truth):
/** 
 * Shuts the task manager down.
 */
public synchronized void shutdown(){
  if (this.isShutDown) {
    return;
  }
  LOG.info("String_Node_Str");
  RPC.stopProxy(this.jobManager);
  this.taskManagerServer.stop();
  if (this.profiler != null) {
    this.profiler.shutdown();
  }
  this.byteBufferedChannelManager.shutdown();
  if (this.ioManager != null) {
    this.ioManager.shutdown();
  }
  if (this.memoryManager != null) {
    this.memoryManager.shutdown();
  }
  this.isShutDown=true;
}
Program: 56248
Project: 56248
Buggy source:
public ReadBufferDumpThread(Queue<TransferEnvelope> queueOfTransferEnvelopes,Deque<ByteBuffer> emptyReadBuffers){
  this.queueOfTransferEnvelopes=queueOfTransferEnvelopes;
  this.emptyReadBuffers=emptyReadBuffers;
}

Fixed version (ground truth):
public ReadBufferDumpThread(Queue<TransferEnvelope> queueOfTransferEnvelopes,Deque<ByteBuffer> emptyReadBuffers){
  this.queueOfTransferEnvelopes=queueOfTransferEnvelopes;
}
Program: 56249
Project: 56249
Buggy source:
@Override public void run(){
synchronized (this.queueOfTransferEnvelopes) {
    if (this.queueOfTransferEnvelopes.isEmpty()) {
      return;
    }
    final TransferEnvelope queueHead=this.queueOfTransferEnvelopes.peek();
    final Iterator<TransferEnvelope> it=this.queueOfTransferEnvelopes.iterator();
    while (it.hasNext()) {
      final TransferEnvelope transferEnvelope=it.next();
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
synchronized (this.queueOfTransferEnvelopes) {
    if (this.queueOfTransferEnvelopes.isEmpty()) {
      return;
    }
    final Iterator<TransferEnvelope> it=this.queueOfTransferEnvelopes.iterator();
    while (it.hasNext()) {
      it.next();
    }
  }
}
Program: 56250
Project: 56250
Buggy source:
public synchronized void discard(){
  final Iterator<TransferEnvelope> it=this.queuedEnvelopes.iterator();
  while (it.hasNext()) {
    final TransferEnvelope transferEnvelope=it.next();
    transferEnvelope.getProcessingLog().setWrittenToCheckpoint();
  }
  this.queuedEnvelopes.clear();
  final File file=new File(getFilename());
  if (file.exists()) {
    file.delete();
  }
}

Fixed version (ground truth):
public synchronized void discard(){
  final Iterator<TransferEnvelope> it=this.queuedEnvelopes.iterator();
  while (it.hasNext()) {
    final TransferEnvelope transferEnvelope=it.next();
    transferEnvelope.getProcessingLog().setWrittenToCheckpoint();
  }
  this.queuedEnvelopes.clear();
  final File file=new File(getFilename());
  if (file.exists()) {
    try {
      file.delete();
    }
 catch (    SecurityException e) {
      LOG.error(e);
    }
  }
}
Program: 56251
Project: 56251
Buggy source:
/** 
 * Called by the channel wrapper to retrieve a new processing log for a transfer envelope. The processing log determines whether the envelope is later written to the checkpoint, sent via the network, or both.
 * @return the newly created processing log.
 */
public TransferEnvelopeProcessingLog getProcessingLog(){
  return new TransferEnvelopeProcessingLog((this.channelType == ChannelType.NETWORK),(this.ephemeralCheckpoint != null));
}

Fixed version (ground truth):
/** 
 * Called by the channel wrapper to retrieve a new processing log for a transfer envelope. The processing log determines whether the envelope is later written to the checkpoint, sent via the network, or both.
 * @param individualChannelType the type of the individual channel asking for the processing log
 * @return the newly created processing log.
 */
public TransferEnvelopeProcessingLog getProcessingLog(final ChannelType individualChannelType){
  return new TransferEnvelopeProcessingLog((individualChannelType == ChannelType.NETWORK),(this.ephemeralCheckpoint != null));
}
Program: 56252
Project: 56252
Buggy source:
/** 
 * Called by the attached output channel wrapper to forward a   {@link TransferEnvelope} objectto its final destination. Within this method the provided transfer envelope is possibly also forwarded to the assigned ephemeral checkpoint.
 * @param channelWrapper the channel wrapper which called this method
 * @param outgoingTransferEnvelope the transfer envelope to be forwarded
 */
public void processEnvelope(ByteBufferedOutputChannelWrapper channelWrapper,TransferEnvelope outgoingTransferEnvelope){
  final TransferEnvelopeProcessingLog processingLog=outgoingTransferEnvelope.getProcessingLog();
  if (this.ephemeralCheckpoint != null && processingLog.mustBeWrittenToCheckpoint()) {
    this.ephemeralCheckpoint.addTransferEnvelope(outgoingTransferEnvelope);
    final EventList eventList=outgoingTransferEnvelope.getEventList();
    if (!eventList.isEmpty() && this.channelType == ChannelType.FILE) {
      final Iterator<AbstractEvent> it=eventList.iterator();
      while (it.hasNext()) {
        if (it.next() instanceof ByteBufferedChannelCloseEvent) {
          this.ephemeralCheckpoint.markChannelAsFinished(outgoingTransferEnvelope.getSource());
          if (this.ephemeralCheckpoint.isPersistent()) {
            channelWrapper.processEvent(new ByteBufferedChannelCloseEvent());
          }
          break;
        }
      }
    }
  }
  if (processingLog.mustBeSentViaNetwork()) {
    this.byteBufferedChannelManager.queueOutgoingTransferEnvelope(outgoingTransferEnvelope);
  }
}

Fixed version (ground truth):
/** 
 * Called by the attached output channel wrapper to forward a   {@link TransferEnvelope} objectto its final destination. Within this method the provided transfer envelope is possibly also forwarded to the assigned ephemeral checkpoint.
 * @param channelWrapper the channel wrapper which called this method
 * @param outgoingTransferEnvelope the transfer envelope to be forwarded
 */
public void processEnvelope(ByteBufferedOutputChannelWrapper channelWrapper,TransferEnvelope outgoingTransferEnvelope){
  final TransferEnvelopeProcessingLog processingLog=outgoingTransferEnvelope.getProcessingLog();
  if (this.ephemeralCheckpoint != null && processingLog.mustBeWrittenToCheckpoint()) {
    this.ephemeralCheckpoint.addTransferEnvelope(outgoingTransferEnvelope);
    final EventList eventList=outgoingTransferEnvelope.getEventList();
    if (!eventList.isEmpty() && this.commonChannelType == ChannelType.FILE) {
      final Iterator<AbstractEvent> it=eventList.iterator();
      while (it.hasNext()) {
        if (it.next() instanceof ByteBufferedChannelCloseEvent) {
          this.ephemeralCheckpoint.markChannelAsFinished(outgoingTransferEnvelope.getSource());
          if (this.ephemeralCheckpoint.isPersistent()) {
            channelWrapper.processEvent(new ByteBufferedChannelCloseEvent());
          }
          break;
        }
      }
    }
  }
  if (processingLog.mustBeSentViaNetwork()) {
    this.byteBufferedChannelManager.queueOutgoingTransferEnvelope(outgoingTransferEnvelope);
  }
}
Program: 56253
Project: 56253
Buggy source:
/** 
 * Constructs a new byte buffered output channel group object.
 * @param byteBufferedChannelManager the byte buffered channel manager this object is attached to
 * @param checkpointManager the checkpoint manager used to create ephemeral checkpoints
 * @param channelType the channel type all of the channels attached to this group have in common, possibly <code>null</code>
 * @param executionVertexID the id of the execution vertex this channel group object belongs to
 */
public ByteBufferedOutputChannelGroup(ByteBufferedChannelManager byteBufferedChannelManager,CheckpointManager checkpointManager,ChannelType channelType,ExecutionVertexID executionVertexID){
  this.byteBufferedChannelManager=byteBufferedChannelManager;
  this.channelType=channelType;
  if (channelType == ChannelType.FILE) {
    this.ephemeralCheckpoint=EphemeralCheckpoint.forFileChannel(checkpointManager,executionVertexID);
  }
 else   if (channelType == ChannelType.NETWORK) {
    this.ephemeralCheckpoint=EphemeralCheckpoint.forNetworkChannel(checkpointManager,executionVertexID);
  }
 else {
    this.ephemeralCheckpoint=null;
  }
  if (this.ephemeralCheckpoint != null) {
    this.byteBufferedChannelManager.registerOutOfWriterBuffersListener(this.ephemeralCheckpoint);
  }
}

Fixed version (ground truth):
/** 
 * Constructs a new byte buffered output channel group object.
 * @param byteBufferedChannelManager the byte buffered channel manager this object is attached to
 * @param checkpointManager the checkpoint manager used to create ephemeral checkpoints
 * @param commonChannelType the channel type all of the channels attached to this group have in common, possibly <code>null</code>
 * @param executionVertexID the id of the execution vertex this channel group object belongs to
 */
public ByteBufferedOutputChannelGroup(ByteBufferedChannelManager byteBufferedChannelManager,CheckpointManager checkpointManager,ChannelType commonChannelType,ExecutionVertexID executionVertexID){
  this.byteBufferedChannelManager=byteBufferedChannelManager;
  this.commonChannelType=commonChannelType;
  if (commonChannelType == ChannelType.FILE) {
    this.ephemeralCheckpoint=EphemeralCheckpoint.forFileChannel(checkpointManager,executionVertexID);
  }
 else   if (commonChannelType == ChannelType.NETWORK) {
    this.ephemeralCheckpoint=EphemeralCheckpoint.forNetworkChannel(checkpointManager,executionVertexID);
  }
 else {
    this.ephemeralCheckpoint=null;
  }
  if (this.ephemeralCheckpoint != null) {
    this.byteBufferedChannelManager.registerOutOfWriterBuffersListener(this.ephemeralCheckpoint);
  }
}
Program: 56254
Project: 56254
Buggy source:
/** 
 * Creates a new   {@link TransferEnvelope} object. The method assignsand increases the sequence number.
 * @return a new {@link TransferEnvelope} object
 */
private TransferEnvelope createNewOutgoingTransferEnvelope(){
  final TransferEnvelope transferEnvelope=new TransferEnvelope(this.byteBufferedOutputChannel.getID(),this.byteBufferedOutputChannel.getConnectedChannelID(),this.byteBufferedOutputChannelGroup.getProcessingLog());
  transferEnvelope.setSequenceNumber(this.sequenceNumber++);
  return transferEnvelope;
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link TransferEnvelope} object. The method assignsand increases the sequence number.
 * @return a new {@link TransferEnvelope} object
 */
private TransferEnvelope createNewOutgoingTransferEnvelope(){
  final TransferEnvelope transferEnvelope=new TransferEnvelope(this.byteBufferedOutputChannel.getID(),this.byteBufferedOutputChannel.getConnectedChannelID(),this.byteBufferedOutputChannelGroup.getProcessingLog(this.byteBufferedOutputChannel.getType()));
  transferEnvelope.setSequenceNumber(this.sequenceNumber++);
  return transferEnvelope;
}
Program: 56255
Project: 56255
Buggy source:
/** 
 * {@inheritDoc}
 */
@SuppressWarnings("String_Node_Str") @Override public void read(DataInput in) throws IOException {
  final int numberOfMapEntries=in.readInt();
  for (int i=0; i < numberOfMapEntries; i++) {
    final String keyType=StringRecord.readString(in);
    Class<K> keyClass=null;
    try {
      keyClass=(Class<K>)Class.forName(keyType);
    }
 catch (    ClassNotFoundException e) {
      throw new IOException(StringUtils.stringifyException(e));
    }
    K key=null;
    try {
      key=keyClass.newInstance();
    }
 catch (    Exception e) {
      throw new IOException(StringUtils.stringifyException(e));
    }
    key.read(in);
    final String valueType=StringRecord.readString(in);
    Class<V> valueClass=null;
    try {
      valueClass=(Class<V>)Class.forName(valueType);
    }
 catch (    ClassNotFoundException e) {
      throw new IOException(StringUtils.stringifyException(e));
    }
    V value=null;
    try {
      value=valueClass.newInstance();
    }
 catch (    Exception e) {
      throw new IOException(StringUtils.stringifyException(e));
    }
    put(key,value);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@SuppressWarnings("String_Node_Str") @Override public void read(DataInput in) throws IOException {
  final int numberOfMapEntries=in.readInt();
  for (int i=0; i < numberOfMapEntries; i++) {
    final String keyType=StringRecord.readString(in);
    Class<K> keyClass=null;
    try {
      keyClass=(Class<K>)Class.forName(keyType);
    }
 catch (    ClassNotFoundException e) {
      throw new IOException(StringUtils.stringifyException(e));
    }
    K key=null;
    try {
      key=keyClass.newInstance();
    }
 catch (    Exception e) {
      throw new IOException(StringUtils.stringifyException(e));
    }
    key.read(in);
    final String valueType=StringRecord.readString(in);
    Class<V> valueClass=null;
    try {
      valueClass=(Class<V>)Class.forName(valueType);
    }
 catch (    ClassNotFoundException e) {
      throw new IOException(StringUtils.stringifyException(e));
    }
    V value=null;
    try {
      value=valueClass.newInstance();
    }
 catch (    Exception e) {
      throw new IOException(StringUtils.stringifyException(e));
    }
    value.read(in);
    put(key,value);
  }
}
Program: 56257
Project: 56257
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean equals(Object obj){
  if (super.equals(obj)) {
    return false;
  }
  if (!(obj instanceof ThreadProfilingEvent)) {
    return false;
  }
  final ThreadProfilingEvent threadProfilingEvent=(ThreadProfilingEvent)obj;
  if (this.userTime != threadProfilingEvent.getUserTime()) {
    return false;
  }
  if (this.systemTime != threadProfilingEvent.getSystemTime()) {
    return false;
  }
  if (this.blockedTime != threadProfilingEvent.getBlockedTime()) {
    return false;
  }
  if (this.waitedTime != threadProfilingEvent.getWaitedTime()) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean equals(Object obj){
  if (!super.equals(obj)) {
    return false;
  }
  if (!(obj instanceof ThreadProfilingEvent)) {
    return false;
  }
  final ThreadProfilingEvent threadProfilingEvent=(ThreadProfilingEvent)obj;
  if (this.userTime != threadProfilingEvent.getUserTime()) {
    return false;
  }
  if (this.systemTime != threadProfilingEvent.getSystemTime()) {
    return false;
  }
  if (this.blockedTime != threadProfilingEvent.getBlockedTime()) {
    return false;
  }
  if (this.waitedTime != threadProfilingEvent.getWaitedTime()) {
    return false;
  }
  return true;
}
Program: 56258
Project: 56258
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean equals(Object obj){
  if (!super.equals(obj)) {
    return false;
  }
  if (!(obj instanceof SingleInstanceProfilingEvent)) {
    return false;
  }
  final SingleInstanceProfilingEvent singleInstanceProfilingEvent=(SingleInstanceProfilingEvent)obj;
  if (this.instanceName.equals(singleInstanceProfilingEvent.getInstanceName())) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean equals(Object obj){
  if (!super.equals(obj)) {
    return false;
  }
  if (!(obj instanceof SingleInstanceProfilingEvent)) {
    return false;
  }
  final SingleInstanceProfilingEvent singleInstanceProfilingEvent=(SingleInstanceProfilingEvent)obj;
  if (!this.instanceName.equals(singleInstanceProfilingEvent.getInstanceName())) {
    return false;
  }
  return true;
}
Program: 56259
Project: 56259
Buggy source:
public List<ManagementGroupVertex> getGroupVerticesInReverseTopologicalOrder(){
  final List<ManagementGroupVertex> reverseTopologicalSort=new ArrayList<ManagementGroupVertex>();
  final Deque<ManagementGroupVertex> noOutgoingEdges=new ArrayDeque<ManagementGroupVertex>();
  final Map<ManagementGroupVertex,Integer> outdegrees=new HashMap<ManagementGroupVertex,Integer>();
  final Iterator<ManagementGroupVertex> it=new ManagementGroupVertexIterator(this,false,-1);
  while (it.hasNext()) {
    final ManagementGroupVertex groupVertex=it.next();
    outdegrees.put(groupVertex,new Integer(groupVertex.getNumberOfForwardEdges()));
    if (groupVertex.getNumberOfForwardEdges() == 0) {
      noOutgoingEdges.add(groupVertex);
    }
  }
  while (!noOutgoingEdges.isEmpty()) {
    final ManagementGroupVertex groupVertex=noOutgoingEdges.removeFirst();
    reverseTopologicalSort.add(groupVertex);
    for (int i=0; i < groupVertex.getNumberOfBackwardEdges(); i++) {
      final ManagementGroupVertex sourceVertex=groupVertex.getBackwardEdge(i).getSource();
      Integer outdegree=outdegrees.get(sourceVertex);
      outdegree=new Integer(outdegree.intValue() - 1);
      outdegrees.put(sourceVertex,outdegree);
      if (outdegree.intValue() == 0) {
        noOutgoingEdges.add(sourceVertex);
      }
    }
  }
  return reverseTopologicalSort;
}

Fixed version (ground truth):
public List<ManagementGroupVertex> getGroupVerticesInReverseTopologicalOrder(){
  final List<ManagementGroupVertex> reverseTopologicalSort=new ArrayList<ManagementGroupVertex>();
  final Deque<ManagementGroupVertex> noOutgoingEdges=new ArrayDeque<ManagementGroupVertex>();
  final Map<ManagementGroupVertex,Integer> outdegrees=new HashMap<ManagementGroupVertex,Integer>();
  final Iterator<ManagementGroupVertex> it=new ManagementGroupVertexIterator(this,false,-1);
  while (it.hasNext()) {
    final ManagementGroupVertex groupVertex=it.next();
    outdegrees.put(groupVertex,Integer.valueOf(groupVertex.getNumberOfForwardEdges()));
    if (groupVertex.getNumberOfForwardEdges() == 0) {
      noOutgoingEdges.add(groupVertex);
    }
  }
  while (!noOutgoingEdges.isEmpty()) {
    final ManagementGroupVertex groupVertex=noOutgoingEdges.removeFirst();
    reverseTopologicalSort.add(groupVertex);
    for (int i=0; i < groupVertex.getNumberOfBackwardEdges(); i++) {
      final ManagementGroupVertex sourceVertex=groupVertex.getBackwardEdge(i).getSource();
      Integer outdegree=outdegrees.get(sourceVertex);
      outdegree=Integer.valueOf(outdegree.intValue() - 1);
      outdegrees.put(sourceVertex,outdegree);
      if (outdegree.intValue() == 0) {
        noOutgoingEdges.add(sourceVertex);
      }
    }
  }
  return reverseTopologicalSort;
}
Program: 56260
Project: 56260
Buggy source:
public List<ManagementGroupVertex> getGroupVerticesInTopologicalOrder(){
  final List<ManagementGroupVertex> topologicalSort=new ArrayList<ManagementGroupVertex>();
  final Deque<ManagementGroupVertex> noIncomingEdges=new ArrayDeque<ManagementGroupVertex>();
  final Map<ManagementGroupVertex,Integer> indegrees=new HashMap<ManagementGroupVertex,Integer>();
  final Iterator<ManagementGroupVertex> it=new ManagementGroupVertexIterator(this,true,-1);
  while (it.hasNext()) {
    final ManagementGroupVertex groupVertex=it.next();
    indegrees.put(groupVertex,new Integer(groupVertex.getNumberOfBackwardEdges()));
    if (groupVertex.getNumberOfBackwardEdges() == 0) {
      noIncomingEdges.add(groupVertex);
    }
  }
  while (!noIncomingEdges.isEmpty()) {
    final ManagementGroupVertex groupVertex=noIncomingEdges.removeFirst();
    topologicalSort.add(groupVertex);
    for (int i=0; i < groupVertex.getNumberOfForwardEdges(); i++) {
      final ManagementGroupVertex targetVertex=groupVertex.getForwardEdge(i).getTarget();
      Integer indegree=indegrees.get(targetVertex);
      indegree=new Integer(indegree.intValue() - 1);
      indegrees.put(targetVertex,indegree);
      if (indegree.intValue() == 0) {
        noIncomingEdges.add(targetVertex);
      }
    }
  }
  return topologicalSort;
}

Fixed version (ground truth):
public List<ManagementGroupVertex> getGroupVerticesInTopologicalOrder(){
  final List<ManagementGroupVertex> topologicalSort=new ArrayList<ManagementGroupVertex>();
  final Deque<ManagementGroupVertex> noIncomingEdges=new ArrayDeque<ManagementGroupVertex>();
  final Map<ManagementGroupVertex,Integer> indegrees=new HashMap<ManagementGroupVertex,Integer>();
  final Iterator<ManagementGroupVertex> it=new ManagementGroupVertexIterator(this,true,-1);
  while (it.hasNext()) {
    final ManagementGroupVertex groupVertex=it.next();
    indegrees.put(groupVertex,Integer.valueOf(groupVertex.getNumberOfBackwardEdges()));
    if (groupVertex.getNumberOfBackwardEdges() == 0) {
      noIncomingEdges.add(groupVertex);
    }
  }
  while (!noIncomingEdges.isEmpty()) {
    final ManagementGroupVertex groupVertex=noIncomingEdges.removeFirst();
    topologicalSort.add(groupVertex);
    for (int i=0; i < groupVertex.getNumberOfForwardEdges(); i++) {
      final ManagementGroupVertex targetVertex=groupVertex.getForwardEdge(i).getTarget();
      Integer indegree=indegrees.get(targetVertex);
      indegree=Integer.valueOf(indegree.intValue() - 1);
      indegrees.put(targetVertex,indegree);
      if (indegree.intValue() == 0) {
        noIncomingEdges.add(targetVertex);
      }
    }
  }
  return topologicalSort;
}
Program: 56261
Project: 56261
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public String toString(){
  String str;
  if (this.childNodes.isEmpty()) {
    str=this.name;
  }
 else {
    str="String_Node_Str";
    final Iterator<NetworkNode> it=this.childNodes.iterator();
    while (it.hasNext()) {
      str+=it.next().toString();
      if (it.hasNext()) {
        str+="String_Node_Str";
      }
    }
    str+="String_Node_Str";
  }
  return str;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public String toString(){
  String str;
  if (this.childNodes.isEmpty()) {
    str=this.name;
  }
 else {
    final Iterator<NetworkNode> it=this.childNodes.iterator();
    final StringBuffer buf=new StringBuffer("String_Node_Str");
    while (it.hasNext()) {
      buf.append(it.next().toString());
      if (it.hasNext()) {
        buf.append("String_Node_Str");
      }
    }
    buf.append("String_Node_Str");
    str=buf.toString();
  }
  return str;
}
Program: 56262
Project: 56262
Buggy source:
/** 
 * Loads the configuration files from the specified directory.
 * @param configDir the directory which contains the configuration files
 */
public static void loadConfiguration(String configDir){
  if (configDir == null) {
    if (configDir == null) {
      LOG.warn("String_Node_Str");
      return;
    }
  }
  final File confDirFile=new File(configDir);
  if (!(confDirFile.exists() && confDirFile.isDirectory())) {
    LOG.warn("String_Node_Str" + configDir + "String_Node_Str"+ confDirFile.getAbsolutePath()+ "String_Node_Str");
    return;
  }
  File[] files=confDirFile.listFiles(new FilenameFilter(){
    @Override public boolean accept(    File dir,    String name){
      return dir == confDirFile && name != null && name.endsWith("String_Node_Str");
    }
  }
);
  if (files == null || files.length == 0) {
    LOG.warn("String_Node_Str" + configDir + "String_Node_Str"+ confDirFile.getAbsolutePath()+ "String_Node_Str");
    return;
  }
  for (  File f : files) {
    get().loadResource("String_Node_Str" + f.getAbsolutePath());
  }
  if (configuration != null) {
    configuration.confData.put(CONFIGDIRKEY,configDir);
  }
}

Fixed version (ground truth):
/** 
 * Loads the configuration files from the specified directory.
 * @param configDir the directory which contains the configuration files
 */
public static void loadConfiguration(String configDir){
  if (configDir == null) {
    LOG.warn("String_Node_Str");
    return;
  }
  final File confDirFile=new File(configDir);
  if (!(confDirFile.exists() && confDirFile.isDirectory())) {
    LOG.warn("String_Node_Str" + configDir + "String_Node_Str"+ confDirFile.getAbsolutePath()+ "String_Node_Str");
    return;
  }
  File[] files=confDirFile.listFiles(new FilenameFilter(){
    @Override public boolean accept(    File dir,    String name){
      return dir == confDirFile && name != null && name.endsWith("String_Node_Str");
    }
  }
);
  if (files == null || files.length == 0) {
    LOG.warn("String_Node_Str" + configDir + "String_Node_Str"+ confDirFile.getAbsolutePath()+ "String_Node_Str");
    return;
  }
  for (  File f : files) {
    get().loadResource("String_Node_Str" + f.getAbsolutePath());
  }
  if (configuration != null) {
    configuration.confData.put(CONFIGDIRKEY,configDir);
  }
}
Program: 56263
Project: 56263
Buggy source:
@Override public boolean equals(Object obj){
  if (obj instanceof FSKey) {
    final FSKey key=(FSKey)obj;
    if (!this.scheme.equals(key.scheme)) {
      return false;
    }
    if ((this.authority == null) || (key.authority == null)) {
      if (this.authority == null && key.authority == null) {
        return true;
      }
      return false;
    }
    if (!this.authority.equals(key.authority)) {
      return false;
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean equals(Object obj){
  if (obj instanceof FSKey) {
    final FSKey key=(FSKey)obj;
    if (!this.scheme.equals(key.scheme)) {
      return false;
    }
    if ((this.authority == null) || (key.authority == null)) {
      if (this.authority == null && key.authority == null) {
        return true;
      }
      return false;
    }
    if (!this.authority.equals(key.authority)) {
      return false;
    }
    return true;
  }
  return false;
}
Program: 56264
Project: 56264
Buggy source:
public void map(PactString key,PactString value,Collector<PactString,PactInteger> out){
  if (Integer.parseInt(key.toString()) + Integer.parseInt(value.toString()) < 10) {
    out.collect(value,new PactInteger(Integer.parseInt(key.toString()) + 10));
    LOG.debug("String_Node_Str" + key + "String_Node_Str"+ value+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public void map(PactString key,PactString value,Collector<PactString,PactInteger> out){
  LOG.debug("String_Node_Str" + key + "String_Node_Str"+ value+ "String_Node_Str");
  if (Integer.parseInt(key.toString()) + Integer.parseInt(value.toString()) < 10) {
    out.collect(value,new PactInteger(Integer.parseInt(key.toString()) + 10));
  }
}